mirror of
https://github.com/palera1n/palera1n.git
synced 2026-10-24 11:09:48 +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
@@ -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