Start erlang packaging image in windows

Source: Internet
Author: User

Start erlang packaging image in windows

In a linux environment, erlang generates an image package by running the systools: make_script ("", []) and systools: make_tar () commands, first installs the image package, and then installs the image package, replace erl. in src, and then output to erl again, and then use erl-sname cache-boot .. /releases/0.1.0/start to start the application. In windows, if you want to port the package to another computer, you need to take the following two steps:

First, modify Bindir and Rootdir in erts-5.9.1/bin/erl. ini, Rootdir corresponds to $ ROOT in Application name. script, so as to find the relevant lib package;

Second, use erl-boot .. to load and start.

To facilitate the startup, the first and second steps are merged. The bat script is used to double-click the script. The script is as follows:

@ Echo off

Color 0a

: Modify the path in erts/bin/erl. ini and install erts

Setlocal enbledelayedexpansion

: Get the current path

Set rootdir = % ~ Dp0

: Get the erts file name

Dir e */B> temp.txt

Set/p erts = <temp.txt & del temp.txt

: Specify the path of erts bin.

Set bindir = % rootdir % erts % \ bin

: Change \ In Path \\

Set rootdir =! Rootdir: \= \\!

Set bindir =! Bindir: \= \\!

: Delete erl. ini in the bin path and generate a new erl. ini file in the new path after replacement.

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

: Start the application

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

Related Article

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.