From 87ce10fe8b006ab4ec075afa608e7440c2eaad25 Mon Sep 17 00:00:00 2001 From: Cris Stringfellow <22254235+crislin2046@users.noreply.github.com> Date: Thu, 29 Aug 2024 14:58:50 +0000 Subject: [PATCH] Windows builds --- .gitignore | 2 ++ 3/sea-config.json | 14 ++++++++++++++ scripts/build_only.sh | 4 ++-- stampers/win.bat | 9 +++++++++ 4 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 3/sea-config.json diff --git a/.gitignore b/.gitignore index 91ba660..a8845de 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +*.blob +.\build\* 22120-arc .*.swp diff --git a/3/sea-config.json b/3/sea-config.json new file mode 100644 index 0000000..881cf24 --- /dev/null +++ b/3/sea-config.json @@ -0,0 +1,14 @@ +{ + "main": "2", + "output": "sea-prep.blob", + "disableExperimentalSEAWarning": true, + "useCodeCache": true, + "assets": { + "index.html": "public/index.html", + "favicon.ico": "public/favicon.ico", + "top.html": "public/top.html", + "style.css": "public/style.css", + "injection.js": "public/injection.js", + "redirector.html": "public/redirector.html" + } +} diff --git a/scripts/build_only.sh b/scripts/build_only.sh index 22a94e7..20598e2 100755 --- a/scripts/build_only.sh +++ b/scripts/build_only.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -set -x +#set -x source $HOME/.nvm/nvm.sh rm -rf build @@ -33,7 +33,7 @@ if [[ "$OSTYPE" == darwin* ]]; then ./stampers/macos.sh dn build/cjs/dn.cjs build/bin/ elif [[ "$(node.exe -p process.platform)" == win* ]]; then echo "Using windows builder..." >&2 - ./stampers/win.bat dn build/cjs/dn.cjs build/bin/ + ./stampers/win.bat dn-win.exe ./build/cjs/dn.cjs ./build/bin/ else echo "Using linux builder..." >&2 ./stampers/nix.sh dn build/cjs/dn.cjs build/bin/ diff --git a/stampers/win.bat b/stampers/win.bat index 4f01721..1b1528e 100644 --- a/stampers/win.bat +++ b/stampers/win.bat @@ -11,6 +11,15 @@ if "%~3"=="" ( set "EXE_NAME=%~1" set "JS_SOURCE_FILE=%~2" set "OUTPUT_FOLDER=%~3" +set "SEA_CONFIG=sea-config.json" + +echo "Exe name: %EXE_NAME%" +echo "JS source: %JS_SOURCE_FILE%" +echo "Output folder: %OUTPUT_FOLDER%" +echo "SEA Config file: %SEA_CONFIG%" + +set /p "user_input=Press enter to continue" + :: Ensure output folder exists if not exist "%OUTPUT_FOLDER%" mkdir "%OUTPUT_FOLDER%"