From aebdf4f457a5da513c1dd6f6e14c528091a4e000 Mon Sep 17 00:00:00 2001 From: Bikram Chatterjee Date: Wed, 6 Sep 2017 14:15:51 +0200 Subject: extra flags from vm.args to erlsrv --- priv/templates/extended_bin_windows | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/priv/templates/extended_bin_windows b/priv/templates/extended_bin_windows index 139edaa..fc15b74 100644 --- a/priv/templates/extended_bin_windows +++ b/priv/templates/extended_bin_windows @@ -53,6 +53,19 @@ set cookie=%%J ) +:: 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% + :: Write the erl.ini file to set up paths relative to this script @call :write_ini -- cgit v1.2.3 From 3e89b1f8abdf5e5d8b5abd1f68a2ba55007f7ccc Mon Sep 17 00:00:00 2001 From: Agustin Cautin Date: Tue, 12 Sep 2017 14:39:08 +0200 Subject: Do not write erl.ini file with absolute path pointing to the build location. --- priv/templates/extended_bin_windows | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/priv/templates/extended_bin_windows b/priv/templates/extended_bin_windows index fc15b74..f4dae66 100644 --- a/priv/templates/extended_bin_windows +++ b/priv/templates/extended_bin_windows @@ -66,9 +66,6 @@ ) @endlocal && set erl_opts=%erl_opts% -:: 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 @@ -136,17 +133,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^) -- cgit v1.2.3 From b7b8622cf925bf889edae51eaf290ec35b6a1aef Mon Sep 17 00:00:00 2001 From: Agustin Cautin Date: Tue, 12 Sep 2017 15:37:31 +0200 Subject: Remove erl.ini on the extended windows script to move erts freely. --- priv/templates/extended_bin_windows | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/priv/templates/extended_bin_windows b/priv/templates/extended_bin_windows index f4dae66..d5361b6 100644 --- a/priv/templates/extended_bin_windows +++ b/priv/templates/extended_bin_windows @@ -66,6 +66,12 @@ ) @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" ( copy "%rel_dir%\%rel_name%.boot" "%rel_dir%\start.boot" >nul -- cgit v1.2.3 From 6821e8cc2c22e3bf4fa77a31a68f822f2180e294 Mon Sep 17 00:00:00 2001 From: Bikram Chatterjee Date: Tue, 26 Sep 2017 18:19:52 +0200 Subject: reverted ini file delete, extra args from vm.args --- priv/templates/extended_bin_windows | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/priv/templates/extended_bin_windows b/priv/templates/extended_bin_windows index 7c88b66..656aa05 100644 --- a/priv/templates/extended_bin_windows +++ b/priv/templates/extended_bin_windows @@ -53,6 +53,9 @@ 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 @( @@ -139,6 +142,17 @@ ) @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^) -- cgit v1.2.3 From ad4df725fd01785dc07a7fea06d03dd039f956a8 Mon Sep 17 00:00:00 2001 From: Bikram Chatterjee Date: Tue, 26 Sep 2017 18:21:49 +0200 Subject: reverted ini deletion --- priv/templates/extended_bin_windows | 6 ------ 1 file changed, 6 deletions(-) diff --git a/priv/templates/extended_bin_windows b/priv/templates/extended_bin_windows index 656aa05..d0c41d8 100644 --- a/priv/templates/extended_bin_windows +++ b/priv/templates/extended_bin_windows @@ -69,12 +69,6 @@ ) @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" ( copy "%rel_dir%\%rel_name%.boot" "%rel_dir%\start.boot" >nul -- cgit v1.2.3