Windows under Erlang package mirroring starts

Source: Internet
Author: User

In a Linux environment, Erlang generates a mirrored package with Systools:make_script (", []") and Systools:make_tar () commands, installs the mirror package, installs the mirroring package, That is, by replacing the path in the ERL.SRC and then re-outputting to the ERL completion, and then through the Erl-sname cache-boot. /releases/0.1.0/start complete the startup of the relevant application. Under Windows, it takes two steps to migrate to another computer after packaging:

First, modify the Erts-5.9.1/bin/erl.ini in the Bindir and rootdir,rootdir corresponding to the application name. Script in the $root, so as to be able to find the relevant Lib under the package;

Second, through the erl-boot. The load starts.

In order to be able to start more easily, the first and second steps are merged, through the bat script, double-click the direct completion, the script is as follows:

@echo off

Color 0a

:: Modify the path in Erts/bin/erl.ini, install ERTs

Setlocal enbledelayedexpansion

:: Gets the current path

Set Rootdir=%~dp0

:: Gets the file name of the ERTs

Dir e*/b > Temp.txt

set/p ERTs =<temp.txt&del Temp.txt

:: The path where the bin of the ERTs is spelled out

Set Bindir=%rootdir%%erts%\bin

:: Change \ in path to \ \

Set rootdir=!rootdir:\=\\!

Set bindir=!bindir:\=\\!

:: Delete The Erl.ini under the bin path and regenerate the new Erl.ini with the new replacement path

CD%bindir%

Del Erl.ini

echo [Erlang] >>%bindir%\\erl.ini

Echo bindir=%bindir% >>%bindir%\\erl.ini

Echo Progname=erl >>%bindir%\\erl.ini

Echo rootdir=%rootdir% >>%bindir%\\erl.ini

:: Launch App

Erl-boot. \.. \releases\0.1.0\start

Windows under Erlang package mirroring starts

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.