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