aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Sloughter <[email protected]>2014-11-03 13:47:30 -0600
committerTristan Sloughter <[email protected]>2014-11-03 13:47:30 -0600
commit5368a5cd945aa3dd0723258cdad051aa8f7b4920 (patch)
tree20cfb07bcd86e4f13be62ab920070e46a246c1ab
parenta3571e3d34665896fc81b8b1c25bd452ed01be22 (diff)
parent4ea2c2de74e72782649c77fe83f6e82bef7b12e1 (diff)
downloadrelx-5368a5cd945aa3dd0723258cdad051aa8f7b4920.tar.gz
relx-5368a5cd945aa3dd0723258cdad051aa8f7b4920.tar.bz2
relx-5368a5cd945aa3dd0723258cdad051aa8f7b4920.zip
Merge pull request #250 from syl20bnr/fix_boot_script_console_windows
Fix *bin_windows.dtl boot script path
-rw-r--r--priv/templates/bin_windows.dtl12
-rw-r--r--priv/templates/extended_bin_windows.dtl16
2 files changed, 21 insertions, 7 deletions
diff --git a/priv/templates/bin_windows.dtl b/priv/templates/bin_windows.dtl
index 170d957..7a8952b 100644
--- a/priv/templates/bin_windows.dtl
+++ b/priv/templates/bin_windows.dtl
@@ -15,6 +15,7 @@
@call :find_erts_dir
@call :find_sys_config
+@call :set_boot_script_var
@set rootdir=%release_root_dir%
@set bindir=%erts_dir%\bin
@@ -33,7 +34,7 @@ cd %rootdir%
@echo Rootdir=%converted_rootdir% >> "%erl_ini%"
:: Start the release in an `erl` shell
-@%erl% %erl_opts% %sys_config% -boot "%rel_dir%\%rel_name%" %*
+@%erl% %erl_opts% %sys_config% -boot "%boot_script%" %*
@goto :eof
@@ -73,3 +74,12 @@ cd %rootdir%
@set sys_config=-config "%possible_sys%"
)
@goto :eof
+
+:: set boot_script variable
+:set_boot_script_var
+@if exist "%rel_dir%\%rel_name%.boot" (
+ @set boot_script=%rel_dir%\%rel_name%
+) else (
+ @set boot_script=%rel_dir%\start
+)
+@goto :eof
diff --git a/priv/templates/extended_bin_windows.dtl b/priv/templates/extended_bin_windows.dtl
index 1f94675..26340a4 100644
--- a/priv/templates/extended_bin_windows.dtl
+++ b/priv/templates/extended_bin_windows.dtl
@@ -29,11 +29,11 @@
@call :find_erts_dir
@call :find_sys_config
+@call :set_boot_script_var
@set bindir=%erts_dir%\bin
@set vm_args=%rel_dir%\vm.args
@set progname=erl.exe
-@set boot_script=%rel_dir%\%rel_name%
@set clean_boot_script=%release_root_dir%\bin\start_clean
@set erlsrv="%bindir%\erlsrv.exe"
@set epmd="%bindir%\epmd.exe"
@@ -55,11 +55,6 @@
:: Write the erl.ini file to set up paths relative to this script
@call :write_ini
-:: If a start.boot file is not present, copy one from the named .boot file
-@if not exist "%rel_dir%\start.boot" (
- @copy "%rel_dir%\%rel_name%.boot" "%rel_dir%\start.boot" >nul
-)
-
@if "%1"=="install" @goto install
@if "%1"=="uninstall" @goto uninstall
@if "%1"=="start" @goto start
@@ -111,6 +106,15 @@
)
@goto :eof
+:: set boot_script variable
+:set_boot_script_var
+@if exist "%rel_dir%\%rel_name%.boot" (
+ @set boot_script=%rel_dir%\%rel_name%
+) else (
+ @set boot_script=%rel_dir%\start
+)
+@goto :eof
+
:: Write the erl.ini file
:write_ini
@set erl_ini=%erts_dir%\bin\erl.ini