aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--priv/templates/extended_bin_windows13
1 files changed, 13 insertions, 0 deletions
diff --git a/priv/templates/extended_bin_windows b/priv/templates/extended_bin_windows
index 85c57f4..d0c41d8 100644
--- a/priv/templates/extended_bin_windows
+++ b/priv/templates/extended_bin_windows
@@ -56,6 +56,19 @@
:: 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%
+
:: 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