livebook/rel/app/env.bat.eex
2023-09-28 11:12:23 +02:00

21 lines
839 B
Elixir

if exist "!USERPROFILE!\.livebookdesktop.bat" (
call "!USERPROFILE!\.livebookdesktop.bat"
)
set RELEASE_NODE=livebook_app
set RELEASE_MODE=interactive
set MIX_ARCHIVES=!RELEASE_ROOT!\vendor\archives
set MIX_REBAR3=!RELEASE_ROOT!\vendor\rebar3
set LIVEBOOK_SHUTDOWN_ENABLED=true
set LIVEBOOK_DESKTOP=true
if not defined LIVEBOOK_PORT (set LIVEBOOK_PORT=0)
set PATH=!RELEASE_ROOT!\vendor\otp\erts-<%= @release.erts_version%>\bin;!RELEASE_ROOT!\vendor\otp\bin;!RELEASE_ROOT!\vendor\elixir\bin;!PATH!
set cookie_path=!RELEASE_ROOT!\releases\COOKIE
if not exist %cookie_path% (
for /f "skip=1" %%X in ('wmic os get localdatetime') do if not defined TIMESTAMP set TIMESTAMP=%%X
:: '| set /p=""' is so that we don't add ' \r\n' to the cookie
echo | set /p="cookie-!TIMESTAMP:~0,11!-!RANDOM!" > %cookie_path%
)
cd !HOMEDRIVE!!HOMEPATH!