- makensis resolves relative -DICON/-DARTIFACT against the script directory, so CI now passes $PWD-based absolute paths (reproduced locally in the same ubuntu:24.04 container; installer builds, 7z shows step-line.exe + uninstall.exe) - Install as step-line.exe (no spaces: NSIS /oname splits on whitespace) - OutFile overridable via -DOUT - tools/generate_textures.py icon.ico now produced via ImageMagick with classic BMP entries (NSIS-compatible); PIL PNG-compressed ICOs rejected by NSIS
75 lines
2.4 KiB
NSIS
75 lines
2.4 KiB
NSIS
; Step Line Windows installer (NSIS 3).
|
|
; Build from the repo root with the exported self-contained exe:
|
|
; makensis /DVERSION=0.2.0 /DARTIFACT=build/step-line-windows-0.2.0.exe \
|
|
; /DICON=packaging/windows/step-line.ico packaging/windows/step-line.nsi
|
|
; Outputs: build/step-line-setup-<VERSION>.exe
|
|
|
|
!ifndef VERSION
|
|
!define VERSION "0.0.0"
|
|
!endif
|
|
!ifndef ARTIFACT
|
|
!error "ARTIFACT define required (path to exported windows exe)"
|
|
!endif
|
|
!ifndef ICON
|
|
!define ICON "packaging\windows\step-line.ico"
|
|
!endif
|
|
|
|
; The installed executable uses this clean name (no spaces — NSIS /oname tokens
|
|
; on whitespace, so a spaced name breaks the File directive).
|
|
!define INSTALLED_EXE "step-line.exe"
|
|
!ifndef OUT
|
|
!define OUT "build\step-line-setup-${VERSION}.exe"
|
|
!endif
|
|
!define COMPANY "Step Line Project"
|
|
!define UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\Step Line"
|
|
|
|
Unicode true
|
|
ManifestDPIAware true
|
|
Icon "${ICON}"
|
|
UninstallIcon "${ICON}"
|
|
|
|
Name "Step Line ${VERSION}"
|
|
OutFile "${OUT}"
|
|
InstallDir "$PROGRAMFILES64\Step Line"
|
|
RequestExecutionLevel admin
|
|
|
|
Page directory
|
|
Page instfiles
|
|
UninstPage uninstConfirm
|
|
UninstPage instfiles
|
|
|
|
Section "Install"
|
|
SetOutPath "$INSTDIR"
|
|
|
|
; The self-contained executable contains ALL game data (embedded PCK).
|
|
File "/oname=${INSTALLED_EXE}" "${ARTIFACT}"
|
|
|
|
WriteUninstaller "$INSTDIR\uninstall.exe"
|
|
|
|
; Shortcuts
|
|
CreateDirectory "$SMPROGRAMS\Step Line"
|
|
CreateShortCut "$SMPROGRAMS\Step Line\Step Line.lnk" "$INSTDIR\${INSTALLED_EXE}"
|
|
CreateShortCut "$SMPROGRAMS\Step Line\Uninstall.lnk" "$INSTDIR\uninstall.exe"
|
|
CreateShortCut "$DESKTOP\Step Line.lnk" "$INSTDIR\${INSTALLED_EXE}"
|
|
|
|
; Registry (Add/Remove Programs)
|
|
WriteRegStr HKLM "${UNINST_KEY}" "DisplayName" "Step Line"
|
|
WriteRegStr HKLM "${UNINST_KEY}" "DisplayVersion" "${VERSION}"
|
|
WriteRegStr HKLM "${UNINST_KEY}" "Publisher" "${COMPANY}"
|
|
WriteRegStr HKLM "${UNINST_KEY}" "DisplayIcon" "$INSTDIR\${INSTALLED_EXE}"
|
|
WriteRegStr HKLM "${UNINST_KEY}" "UninstallString" '"$INSTDIR\uninstall.exe"'
|
|
WriteRegDWORD HKLM "${UNINST_KEY}" "NoModify" 1
|
|
WriteRegDWORD HKLM "${UNINST_KEY}" "NoRepair" 1
|
|
SectionEnd
|
|
|
|
Section "Uninstall"
|
|
Delete "$INSTDIR\${INSTALLED_EXE}"
|
|
Delete "$INSTDIR\uninstall.exe"
|
|
RMDir "$INSTDIR"
|
|
Delete "$SMPROGRAMS\Step Line\Step Line.lnk"
|
|
Delete "$SMPROGRAMS\Step Line\Uninstall.lnk"
|
|
RMDir "$SMPROGRAMS\Step Line"
|
|
Delete "$DESKTOP\Step Line.lnk"
|
|
DeleteRegKey HKLM "${UNINST_KEY}"
|
|
SectionEnd
|