From 2a8aef5f15d9fbaa84894d5cdce51fd161d5e0a8 Mon Sep 17 00:00:00 2001 From: SamTV12345 <40429738+samtv12345@users.noreply.github.com> Date: Fri, 15 Mar 2024 21:36:12 +0100 Subject: [PATCH] Fixed windows install and run.sh command. --- bin/buildForWindows.sh | 8 ++++++++ bin/run.sh | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/bin/buildForWindows.sh b/bin/buildForWindows.sh index 6c7d7f817..67f4eeae1 100755 --- a/bin/buildForWindows.sh +++ b/bin/buildForWindows.sh @@ -55,9 +55,17 @@ try pnpm install try pnpm run build cd .. + + + # Nuke the admin folder as it is not needed anymore :D rm -rf admin +export NODE_ENV=production +try pnpm install --production + + + log "copy the windows settings template..." try cp settings.json.template settings.json diff --git a/bin/run.sh b/bin/run.sh index 0709b5d4e..654897fa4 100755 --- a/bin/run.sh +++ b/bin/run.sh @@ -29,10 +29,12 @@ fi # Prepare the environment bin/installDeps.sh "$@" || exit 1 + ## Create the admin ui if [ -z "$NODE_ENV" ] || [ "$NODE_ENV" = "development" ]; then + ADMIN_UI_PATH="$(dirname $0)/../admin" log "Creating the admin UI..." - (cd ../admin && pnpm run build) + (cd $ADMIN_UI_PATH && pnpm run build) else log "Cannot create the admin UI in production mode" fi