Files
rusty-path-of-building/packaging/windows/installer.nsi
T
faumaray 4118c3943f
CI / check (push) Failing after 7s
Native release / linux (push) Successful in 1m33s
Native release / windows (push) Failing after 9s
Native release / publish (push) Skipped
Release 0.3.6 with a game chooser and native installers
2026-11-27 21:48:45 +03:00

58 lines
2.0 KiB
NSIS

Unicode true
!include "MUI2.nsh"
Name "Rusty Path of Building"
OutFile "${OUTPUT}"
RequestExecutionLevel user
InstallDir "$LOCALAPPDATA\Programs\Rusty Path of Building"
SetCompressor /SOLID lzma
!define APP "rusty-path-of-building.exe"
!define UNINSTALL_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\RustyPathOfBuilding"
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"
Function .onInit
SetRegView 64
ReadRegStr $0 HKCU "${UNINSTALL_KEY}" "InstallLocation"
StrCmp $0 "" +2
StrCpy $INSTDIR $0
FunctionEnd
Section "Rusty Path of Building"
SetShellVarContext current
SetOutPath "$INSTDIR"
File "payload\${APP}"
SetOutPath "$INSTDIR\licenses"
File "payload\licenses\LICENSE.txt"
File "payload\licenses\LiberationSans.txt"
File "payload\licenses\VeraMono.txt"
SetOutPath "$INSTDIR"
WriteUninstaller "$INSTDIR\Uninstall.exe"
CreateShortcut "$SMPROGRAMS\Rusty Path of Building.lnk" "$INSTDIR\${APP}"
WriteRegStr HKCU "${UNINSTALL_KEY}" "DisplayName" "Rusty Path of Building"
WriteRegStr HKCU "${UNINSTALL_KEY}" "DisplayVersion" "${VERSION}"
WriteRegStr HKCU "${UNINSTALL_KEY}" "DisplayIcon" "$INSTDIR\${APP}"
WriteRegStr HKCU "${UNINSTALL_KEY}" "InstallLocation" "$INSTDIR"
WriteRegStr HKCU "${UNINSTALL_KEY}" "UninstallString" '"$INSTDIR\Uninstall.exe"'
WriteRegDWORD HKCU "${UNINSTALL_KEY}" "NoModify" 1
WriteRegDWORD HKCU "${UNINSTALL_KEY}" "NoRepair" 1
SectionEnd
Section "Uninstall"
SetRegView 64
SetShellVarContext current
Delete "$SMPROGRAMS\Rusty Path of Building.lnk"
Delete "$INSTDIR\${APP}"
Delete "$INSTDIR\licenses\LICENSE.txt"
Delete "$INSTDIR\licenses\LiberationSans.txt"
Delete "$INSTDIR\licenses\VeraMono.txt"
RMDir "$INSTDIR\licenses"
Delete "$INSTDIR\Uninstall.exe"
RMDir "$INSTDIR"
DeleteRegKey HKCU "${UNINSTALL_KEY}"
SectionEnd