From 8a2ef698738fa2b0e9c6ec04c14f54245a8e9045 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Fri, 13 May 2022 17:07:10 -0400 Subject: [PATCH] Windows build: Move NSIS installer script to this repo --- .github/workflows/windows-installer.yml | 10 +---- .gitignore | 1 + src/bin/nsis/README.md | 9 +++++ src/bin/nsis/brand.ico | Bin 0 -> 4286 bytes src/bin/nsis/etherpad.nsi | 48 ++++++++++++++++++++++++ 5 files changed, 60 insertions(+), 8 deletions(-) create mode 100644 src/bin/nsis/README.md create mode 100644 src/bin/nsis/brand.ico create mode 100644 src/bin/nsis/etherpad.nsi diff --git a/.github/workflows/windows-installer.yml b/.github/workflows/windows-installer.yml index a70922bc..8a68dc1b 100644 --- a/.github/workflows/windows-installer.yml +++ b/.github/workflows/windows-installer.yml @@ -45,20 +45,14 @@ jobs: - name: Extract the .zip into folder run: 7z x etherpad-win.zip -oetherpad-lite-new - - - name: Grab nsis config - run: git clone https://github.com/ether/etherpad_nsis.git - name: Create installer uses: joncloud/makensis-action@v3.6 with: - script-file: 'etherpad_nsis/etherpad.nsi' - - - name: Check something.. - run: ls etherpad_nsis + script-file: 'src/bin/nsis/etherpad.nsi' - name: Archive production artifacts uses: actions/upload-artifact@v3 with: name: etherpad-server-windows.exe - path: etherpad_nsis/etherpad-server-windows.exe + path: etherpad-server-windows.exe diff --git a/.gitignore b/.gitignore index 3d8c3841..8d30d12f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +/etherpad-server-windows.exe /etherpad-win.zip node_modules /settings.json diff --git a/src/bin/nsis/README.md b/src/bin/nsis/README.md new file mode 100644 index 00000000..21e2def9 --- /dev/null +++ b/src/bin/nsis/README.md @@ -0,0 +1,9 @@ +A simple NSIS script to Install Etherpad (Server) on Windows and start it. + +# TODO +1. i18n +1. Run as Service +1. Display messages during install + +# License +Apache 2 diff --git a/src/bin/nsis/brand.ico b/src/bin/nsis/brand.ico new file mode 100644 index 0000000000000000000000000000000000000000..cb7d6a01979f6a117a77b07a18366948eb5bc986 GIT binary patch literal 4286 zcmeHL%WlFj5On{br=F2|>8an)&+Tu(0VH061Emlk2||P*AS6I|v-KDm^^k`nm9_^j z8Z5kVc6Vmi2N-+cpInaNo4r3W_QV)_;ow{BjRX6_xbOM(it7erq)juR8Tc0roX=-k zuh+C(E@QFTZ0K^i+$G=DYDKkLjY_3bEEk)`hPVK1KA%&&{Xs$CCms1wpX<6b8jVB_sK>S~ zGEGxS2dNoq%!PV`Hw)e=2`KFET>U~sE(JRZ|< zI25|?_j~GeKKVR(sqvvbdcRO8WI{flr)INB$Kz4NfbNoW^nzh@X*Qds#>cEcKg+T* z13fDZ@33uK)Q_CH-Hzx*>A&ZSK7ba}=~RRX!%*lCZhylN7xAGx3|ydosZCN2&=N3o47k8t)AF-nMTz4Yfi7RHMTCGyKTvi6^i!$_*Wtr6L^+?WU)N|kW@ErOE q^Q!{z41J>v@xf)BKkAI!!#$)5c}B0A0nLDBKr@hy0r@|`U#(v+aH~lG literal 0 HcmV?d00001 diff --git a/src/bin/nsis/etherpad.nsi b/src/bin/nsis/etherpad.nsi new file mode 100644 index 00000000..a32ce55f --- /dev/null +++ b/src/bin/nsis/etherpad.nsi @@ -0,0 +1,48 @@ +;Include Modern UI +!include "MUI2.nsh" + +;-------------------------------- +;Styling +!define MUI_ICON "brand.ico" +Icon "brand.ico" +BrandingText "Etherpad Foundation" +Name "Etherpad Server" +OutFile "..\..\..\etherpad-server-windows.exe" + +!insertmacro MUI_LANGUAGE "English" + +Page directory +Page instfiles + +; The default installation directory +InstallDir "$LocalAppData\Programs\Etherpad Foundation\Etherpad Server" + +Section + SectionIn RO + + ; Set output path to the installation directory. + SetOutPath $INSTDIR + + ; Put files there + File /r "..\..\..\etherpad-lite-new\*" + +SectionEnd + +Section + CreateDirectory "$SMPROGRAMS\Etherpad Foundation" + CreateShortCut "$SMPROGRAMS\Etherpad Foundation\Etherpad Server.lnk" "$INSTDIR\start.bat" "brand.ico" "Etherpad Server" + CreateShortCut "$SMPROGRAMS\Etherpad Foundation\Etherpad.lnk" "http://127.0.0.1:9001" "brand.ico" "Etherpad" + CreateShortCut "$SMPROGRAMS\Etherpad Foundation\Etherpad Admin.lnk" "http://127.0.0.1:9001/admin" "brand.ico" "Etherpad Admin" + CreateShortCut "$SMPROGRAMS\Etherpad Foundation\Uninstall Etherpad Server.lnk" "$INSTDIR\uninstall.exe" + WriteUninstaller "$INSTDIR\uninstall.exe" + Exec '$INSTDIR\start.bat' +SectionEnd + +UninstPage instfiles + +Section Uninstall + Delete "$INSTDIR\*" + Delete "$INSTDIR\uninstall.exe" + RMDir "$INSTDIR" + SetAutoClose false +SectionEnd