mirror of
https://github.com/palera1n/palera1n.git
synced 2026-10-21 09:47:01 +02:00
feat(ci): setup exe for windows builds
Update installer.nsi
This commit is contained in:
2 files changed
+102
-3
No files matched your search
@@ -228,7 +228,10 @@ jobs:
|
|||||||
mv "libusbK-tmp/${LIBUSBK_VERSION}" libusbK
|
mv "libusbK-tmp/${LIBUSBK_VERSION}" libusbK
|
||||||
mv "${LIBUSBK_WDFCOINSTALLER}" "${LIBUSBK_WDFCOINSTALLER_RENAMED}"
|
mv "${LIBUSBK_WDFCOINSTALLER}" "${LIBUSBK_WDFCOINSTALLER_RENAMED}"
|
||||||
|
|
||||||
- name: Set up MSYS2
|
- name: Install dependencies (choco)
|
||||||
|
run: choco install nsis.portable
|
||||||
|
|
||||||
|
- name: Install dependencies (msys2)
|
||||||
uses: msys2/setup-msys2@v2
|
uses: msys2/setup-msys2@v2
|
||||||
with:
|
with:
|
||||||
msystem: MINGW64
|
msystem: MINGW64
|
||||||
@@ -253,11 +256,20 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
make palera1n_mingw WITH_STATIC=1 WITH_GUI=1 BUILD_TYPE=Release JOBS=$(nproc)
|
make palera1n_mingw WITH_STATIC=1 WITH_GUI=1 BUILD_TYPE=Release JOBS=$(nproc)
|
||||||
strip -s build/palera1n.exe
|
strip -s build/palera1n.exe
|
||||||
|
|
||||||
|
- name: Package
|
||||||
|
run: |
|
||||||
|
mkdir -p dist\installer
|
||||||
|
copy build\*.exe dist\installer\
|
||||||
|
copy build\*.dll dist\installer\
|
||||||
|
copy packaging\installer.nsi dist\installer\
|
||||||
|
copy resources\palera1n.ico dist\installer\icon.ico
|
||||||
|
makensis dist\installer\installer.nsi
|
||||||
|
move dist\installer\installer.exe dist\palera1n-windows-x86_64-setup.exe
|
||||||
|
|
||||||
- name: Upload
|
- name: Upload
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: palera1n-windows-x86_64
|
name: palera1n-windows-x86_64
|
||||||
path: |
|
path: |
|
||||||
build/*.exe
|
dist/palera1n-windows-x86_64-setup.exe
|
||||||
build/*.dll
|
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
;===========================================================
|
||||||
|
; Modern NSIS Installer for a Single EXE (64-bit)
|
||||||
|
;===========================================================
|
||||||
|
|
||||||
|
!define APPNAME "palera1n"
|
||||||
|
!define APPEXE "palera1n.exe"
|
||||||
|
!define COMPANY "palera1n"
|
||||||
|
|
||||||
|
Name "${APPNAME}"
|
||||||
|
BrandingText "${APPNAME} Setup"
|
||||||
|
|
||||||
|
OutFile "installer.exe"
|
||||||
|
|
||||||
|
RequestExecutionLevel admin
|
||||||
|
InstallDir "$PROGRAMFILES64\${APPNAME}"
|
||||||
|
InstallDirRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "InstallLocation"
|
||||||
|
|
||||||
|
;-----------------------------------------------------------
|
||||||
|
; Modern UI 2
|
||||||
|
;-----------------------------------------------------------
|
||||||
|
!include "MUI2.nsh"
|
||||||
|
|
||||||
|
!define MUI_ABORTWARNING
|
||||||
|
!define MUI_ICON "icon.ico"
|
||||||
|
!define MUI_UNICON "icon.ico"
|
||||||
|
|
||||||
|
;-----------------------------------------------------------
|
||||||
|
; Installer Pages
|
||||||
|
;-----------------------------------------------------------
|
||||||
|
!insertmacro MUI_PAGE_WELCOME
|
||||||
|
!insertmacro MUI_PAGE_DIRECTORY
|
||||||
|
!insertmacro MUI_PAGE_INSTFILES
|
||||||
|
!insertmacro MUI_PAGE_FINISH
|
||||||
|
|
||||||
|
;-----------------------------------------------------------
|
||||||
|
; Uninstaller Pages
|
||||||
|
;-----------------------------------------------------------
|
||||||
|
!insertmacro MUI_UNPAGE_WELCOME
|
||||||
|
!insertmacro MUI_UNPAGE_CONFIRM
|
||||||
|
!insertmacro MUI_UNPAGE_INSTFILES
|
||||||
|
!insertmacro MUI_UNPAGE_FINISH
|
||||||
|
|
||||||
|
!insertmacro MUI_LANGUAGE "English"
|
||||||
|
|
||||||
|
;===========================================================
|
||||||
|
; Installer Section
|
||||||
|
;===========================================================
|
||||||
|
Section "Install"
|
||||||
|
|
||||||
|
SetOutPath "$INSTDIR"
|
||||||
|
File "${APPEXE}"
|
||||||
|
File "*.dll"
|
||||||
|
|
||||||
|
; Start Menu entries
|
||||||
|
CreateDirectory "$SMPROGRAMS\${APPNAME}"
|
||||||
|
CreateShortcut "$SMPROGRAMS\${APPNAME}\${APPNAME}.lnk" "$INSTDIR\${APPEXE}"
|
||||||
|
|
||||||
|
CreateShortcut "$DESKTOP\${APPNAME}.lnk" "$INSTDIR\${APPEXE}"
|
||||||
|
|
||||||
|
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
||||||
|
|
||||||
|
; 64-bit registry uninstall entry
|
||||||
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "DisplayName" "${APPNAME}"
|
||||||
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "Publisher" "${COMPANY}"
|
||||||
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "InstallLocation" "$INSTDIR"
|
||||||
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "UninstallString" "$INSTDIR\Uninstall.exe"
|
||||||
|
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "NoModify" 1
|
||||||
|
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "NoRepair" 1
|
||||||
|
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
|
;===========================================================
|
||||||
|
; Uninstaller Section
|
||||||
|
;===========================================================
|
||||||
|
Section "Uninstall"
|
||||||
|
|
||||||
|
Delete "$DESKTOP\${APPNAME}.lnk"
|
||||||
|
Delete "$SMPROGRAMS\${APPNAME}\${APPNAME}.lnk"
|
||||||
|
RMDir "$SMPROGRAMS\${APPNAME}"
|
||||||
|
|
||||||
|
; Delete all files
|
||||||
|
Delete "$INSTDIR\*.*"
|
||||||
|
RMDir /r "$INSTDIR"
|
||||||
|
|
||||||
|
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}"
|
||||||
|
|
||||||
|
SectionEnd
|
||||||
Reference in new issue
Block a user