diff options
Diffstat (limited to 'priv/templates')
-rw-r--r-- | priv/templates/extended_bin_windows | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/priv/templates/extended_bin_windows b/priv/templates/extended_bin_windows index 85c57f4..7c88b66 100644 --- a/priv/templates/extended_bin_windows +++ b/priv/templates/extended_bin_windows @@ -53,8 +53,24 @@ set cookie=%%J ) -:: Write the erl.ini file to set up paths relative to this script -@call :write_ini +:: Collect any additional VM args into erl_opts +@setlocal EnableDelayedExpansion +@for /f "usebackq tokens=1-2" %%I in (`findstr /r "^[^#]" "%vm_args%"`) do @( + if not "%%I" == "-name" ( + if not "%%I" == "-sname" ( + if not "%%I" == "-setcookie" ( + set erl_opts=!erl_opts! %%I %%J + ) + ) + ) +) +@endlocal && set erl_opts=%erl_opts% + +:: Remove erl.ini to move the erts_dir freely +@set erl_ini=%erts_dir%\bin\erl.ini +@if exist "%erl_ini%" ( + del "%erl_ini%" +) :: If a start.boot file is not present, copy one from the named .boot file @if not exist "%rel_dir%\start.boot" ( @@ -123,17 +139,6 @@ ) @goto :eof -:: Write the erl.ini file -:write_ini -@set erl_ini=%erts_dir%\bin\erl.ini -@set converted_bindir=%bindir:\=\\% -@set converted_rootdir=%rootdir:\=\\% -@echo [erlang] > "%erl_ini%" -@echo Bindir=%converted_bindir% >> "%erl_ini%" -@echo Progname=%progname% >> "%erl_ini%" -@echo Rootdir=%converted_rootdir% >> "%erl_ini%" -@goto :eof - :: Display usage information :usage @echo usage: %~n0 ^(install^|uninstall^|start^|stop^|restart^|upgrade^|downgrade^|console^|ping^|list^|attach^) |