if exist "!USERPROFILE!\.livebookdesktop.bat" (
  call "!USERPROFILE!\.livebookdesktop.bat"
)

set RELEASE_MODE=interactive
if not defined RELEASE_DISTRIBUTION set RELEASE_DISTRIBUTION=none

set vendor_dir=!RELEASE_ROOT!\vendor\livebook-!RELEASE_VSN!
set MIX_ARCHIVES=!vendor_dir!\archives
set MIX_REBAR3=!vendor_dir!\rebar3
if not defined LIVEBOOK_SHUTDOWN_ENABLED set LIVEBOOK_SHUTDOWN_ENABLED=true
if not defined LIVEBOOK_PORT (set LIVEBOOK_PORT=32123)
set PATH=!vendor_dir!\otp\erts-<%= @release.erts_version%>\bin;!vendor_dir!\otp\bin;!vendor_dir!\elixir\bin;!PATH!

if defined LIVEBOOK_NODE set RELEASE_NODE=!LIVEBOOK_NODE!
if defined LIVEBOOK_COOKIE set RELEASE_COOKIE=!LIVEBOOK_COOKIE!

if not defined RELEASE_COOKIE (
  REM Create random cookie. Removes spaces using : =%. Do not remove this comment.
  set RELEASE_COOKIE=cookie-%DATE: =%_%TIME: =%_%RANDOM%
)

cd !HOMEDRIVE!!HOMEPATH!
