-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
Name "Imprimis" | ||
Icon icon.ico | ||
OutFile "imprimis_windows.exe" | ||
|
||
InstallDir $PROGRAMFILES64\Imprimis | ||
|
||
InstallDirRegKey HKLM "Software\Imprimis" "Install_Dir" | ||
|
||
RequestExecutionLevel admin | ||
SetCompressor /SOLID lzma | ||
XPStyle on | ||
|
||
Page components | ||
Page directory | ||
Page instfiles | ||
|
||
UninstPage uninstConfirm | ||
UninstPage instfiles | ||
|
||
Section "Imprimis (required)" | ||
|
||
SectionIn RO | ||
|
||
SetOutPath $INSTDIR\config | ||
File /r "..\config\*.*" | ||
SetOutPath $INSTDIR\bin64 | ||
File /r "..\bin64\*.*" | ||
SetOutPath $INSTDIR\media | ||
File /r "..\media\*.*" | ||
SetOutPath $INSTDIR\doc | ||
File /r "..\doc\*.*" | ||
SetOutPath $INSTDIR | ||
File "..\imprimis.bat" | ||
File "icon.ico" | ||
|
||
WriteRegStr HKLM SOFTWARE\Imprimis "Install_Dir" "$INSTDIR" | ||
|
||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Imprimis" "DisplayName" "Imprimis" | ||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Imprimis" "UninstallString" '"$INSTDIR\uninstall.exe"' | ||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Imprimis" "NoModify" 1 | ||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Imprimis" "NoRepair" 1 | ||
WriteUninstaller "uninstall.exe" | ||
|
||
IfFileExists "$DOCUMENTS\My Games\Imprimis\config\saved.cfg" ConfigFound NoConfig | ||
ConfigFound: | ||
Delete "$DOCUMENTS\My Games\Imprimis\config\old-saved.cfg" | ||
Rename "$DOCUMENTS\My Games\Imprimis\config\saved.cfg" "$DOCUMENTS\My Games\Imprimis\config\old-saved.cfg" | ||
NoConfig: | ||
|
||
SectionEnd | ||
|
||
Section "Start Menu Shortcuts" | ||
|
||
CreateDirectory "$SMPROGRAMS\Imprimis" | ||
|
||
CreateDirectory "$DOCUMENTS\My Games\Imprimis" | ||
|
||
SetOutPath "$INSTDIR" | ||
|
||
CreateShortCut "$INSTDIR\Imprimis.lnk" "$INSTDIR\imprimis.bat" "" "$INSTDIR\bin64\Imprimis.exe" 0 SW_SHOWMINIMIZED | ||
CreateShortCut "$SMPROGRAMS\Imprimis\Imprimis.lnk" "$INSTDIR\imprimis.bat" "" "$INSTDIR\bin64\Imprimis.exe" 0 SW_SHOWMINIMIZED | ||
; CreateShortCut "$SMPROGRAMS\Imprimis\README.lnk" "$INSTDIR\README.html" "" "$INSTDIR\README.html" 0 | ||
|
||
CreateShortCut "$INSTDIR\User Data.lnk" "$DOCUMENTS\My Games\Imprimis" | ||
CreateShortCut "$SMPROGRAMS\Imprimis\User Data.lnk" "$DOCUMENTS\My Games\Imprimis" | ||
|
||
CreateShortCut "$SMPROGRAMS\Imprimis\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 | ||
SectionEnd | ||
|
||
Section "Uninstall" | ||
|
||
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Imprimis" | ||
DeleteRegKey HKLM SOFTWARE\Imprimis | ||
|
||
RMDir /r "$SMPROGRAMS\Imprimis" | ||
RMDir /r "$INSTDIR" | ||
|
||
SectionEnd |