mirror of
https://git.crafterpika.cc/crafterpika/SplatTool-public.git
synced 2026-08-17 10:42:15 +02:00
initial commit
This commit is contained in:
parent
64b4a24e61
commit
3ab62216aa
31 changed files with 2790 additions and 1 deletions
55
SplatTool_Installer.nsi
Normal file
55
SplatTool_Installer.nsi
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
!define PKG_DIR "pkg-win"
|
||||
|
||||
!ifndef VERSION
|
||||
!error "VERSION not defined (pass with -DVERSION=...)"
|
||||
!endif
|
||||
|
||||
!ifndef SHORT_SHA
|
||||
!error "SHORT_SHA not defined (pass with -DSHORT_SHA=...)"
|
||||
!endif
|
||||
|
||||
Name "SplatTool"
|
||||
OutFile "SplatTool-${VERSION}-${SHORT_SHA}-Setup.exe"
|
||||
InstallDir "$PROGRAMFILES64\SplatTool"
|
||||
RequestExecutionLevel admin ; Needed to write to Program Files
|
||||
|
||||
Page directory
|
||||
Page instfiles
|
||||
|
||||
Section "Install Files"
|
||||
|
||||
SetOutPath "$INSTDIR"
|
||||
|
||||
File /r "${PKG_DIR}\*.*"
|
||||
|
||||
; Create shortcuts
|
||||
CreateDirectory "$SMPROGRAMS\SplatTool"
|
||||
CreateShortCut "$DESKTOP\SplatTool.lnk" "$INSTDIR\SplatTool.exe" "" "$INSTDIR\icon.ico"
|
||||
CreateShortCut "$SMPROGRAMS\SplatTool\SplatTool.lnk" "$INSTDIR\SplatTool.exe" "" "$INSTDIR\icon.ico"
|
||||
|
||||
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
||||
|
||||
; Register in Add/Remove Programs
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SplatTool" "DisplayName" "SplatTool"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SplatTool" "UninstallString" "$INSTDIR\Uninstall.exe"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SplatTool" "DisplayIcon" "$INSTDIR\icon.ico"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SplatTool" "DisplayVersion" "${VERSION}"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SplatTool" "Publisher" "CrafterPika"
|
||||
|
||||
SectionEnd
|
||||
|
||||
Section "Uninstall"
|
||||
|
||||
Delete "$INSTDIR\SplatTool.exe"
|
||||
Delete "$INSTDIR\icon.ico"
|
||||
|
||||
RMDir /r "$INSTDIR"
|
||||
|
||||
Delete "$DESKTOP\SplatTool.lnk"
|
||||
Delete "$SMPROGRAMS\SplatTool\SplatTool.lnk"
|
||||
RMDir "$SMPROGRAMS\SplatTool"
|
||||
|
||||
; Remove registry keys on uninstall
|
||||
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SplatTool"
|
||||
|
||||
SectionEnd
|
||||
Loading…
Reference in a new issue