From eefbf4a82ce23641862699733703c245908ad344 Mon Sep 17 00:00:00 2001 From: SamTV12345 <40429738+samtv12345@users.noreply.github.com> Date: Sat, 9 Mar 2024 22:43:00 +0100 Subject: [PATCH] Fixed windows build. --- admin/src/pages/HomePage.tsx | 2 +- admin/src/pages/SettingsPage.tsx | 4 ++-- bin/buildForWindows.sh | 4 +++- bin/installOnWindows.bat | 10 ++++++---- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/admin/src/pages/HomePage.tsx b/admin/src/pages/HomePage.tsx index 423434f4a..fd29e390e 100644 --- a/admin/src/pages/HomePage.tsx +++ b/admin/src/pages/HomePage.tsx @@ -164,7 +164,7 @@ export const HomePage = () => { {plugins.map((plugin) => { return - {plugin.name} + {plugin.name} {plugin.description} {plugin.version} {plugin.time} diff --git a/admin/src/pages/SettingsPage.tsx b/admin/src/pages/SettingsPage.tsx index 43fcdfbb4..b72507c3a 100644 --- a/admin/src/pages/SettingsPage.tsx +++ b/admin/src/pages/SettingsPage.tsx @@ -36,9 +36,9 @@ export const SettingsPage = ()=>{
- -
diff --git a/bin/buildForWindows.sh b/bin/buildForWindows.sh index 570cd53e8..6c7d7f817 100755 --- a/bin/buildForWindows.sh +++ b/bin/buildForWindows.sh @@ -41,7 +41,7 @@ try cd "${TMP_FOLDER}" # setting NODE_ENV=production ensures that dev dependencies are not installed, # making the windows package smaller -export NODE_ENV=production +export NODE_ENV=development rm -rf node_modules || true rm -rf src/node_modules || true @@ -55,6 +55,8 @@ try pnpm install try pnpm run build cd .. +# Nuke the admin folder as it is not needed anymore :D +rm -rf admin log "copy the windows settings template..." try cp settings.json.template settings.json diff --git a/bin/installOnWindows.bat b/bin/installOnWindows.bat index bf8e6a321..e6fef72f9 100644 --- a/bin/installOnWindows.bat +++ b/bin/installOnWindows.bat @@ -9,11 +9,13 @@ cmd /C node -e "" || ( echo "Please install node.js ( https://nodejs.org )" && e echo _ echo Ensure that all dependencies are up to date... If this is the first time you have run Etherpad please be patient. -mkdir node_modules -cd /D node_modules -mklink /D "ep_etherpad-lite" "..\src" -cd /D ..\src +:: Install admin ui +cd /D ..\admin +cmd /C pnpm i || exit /B 1 +cmd /C pnpm run build || exit /B 1 +cd /D .. + cmd /C pnpm i || exit /B 1 cd /D "%~dp0\.."