medfall

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit cd7c3877a4d3aea21bd8aa7fd123849179206bd5
parent cdddc73c84f3bf8710d0fd243e04af1a8eca4fcb
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Wed Mar 29 22:06:57 +0300

NSIS installer config

Diffstat:
installer.nsi | 66++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 66 insertions(+), 0 deletions(-)
diff --git a/installer.nsi b/installer.nsi @@ -0,0 +1,66 @@ +!include "MUI2.nsh" + +Name "Medfall" +Outfile "MedfallInstall.exe" + +InstallDir "$PROGRAMFILES64\Medfall" +InstallDirRegKey HKCU "Software\Medfall" "" +RequestExecutionLevel admin + +!insertmacro MUI_PAGE_DIRECTORY +!insertmacro MUI_PAGE_INSTFILES + +Section "Install" SectionInstall + # Install stuff + SetOutPath $INSTDIR + File launcher.exe + + # Start menu shortcut + CreateDirectory "$SMPROGRAMS\Medfall" + CreateShortCut "$SMPROGRAMS\Medfall\Medfall.lnk" "$INSTDIR\launcher.exe" + + # Uninstaller + WriteUninstaller "$INSTDIR\uninstall.exe" + + # Registry keys + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Medfall" "DisplayName" "Medfall" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Medfall" "UninstallString" "$INSTDIR\uninstall.exe" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Medfall" "DisplayIcon" "$INSTDIR\logo.ico" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Medfall" "Publisher" "Medfall Yes Son" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Medfall" "DisplayVersion" "0.0.0.0" + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Medfall" "NoModify" 1 + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Medfall" "NoRepair" 1 + + SectionGetSize ${SectionInstall} $0 + IntFmt $1 "0x%08X" $0 + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Medfall" "EstimatedSize" $1 +SectionEnd + +Function un.onInit + MessageBox MB_OKCANCEL "Really uninstall Medfall?" IDOK next + Abort + next: +FunctionEnd + +Section "Uninstall" + # Files + Delete "$INSTDIR\medfall.exe" + Delete "$INSTDIR\launcher.exe" + Delete "$INSTDIR\uninstall.exe" + Delete "$INSTDIR\version.txt" + Delete "$INSTDIR\manifest.txt" + + Delete "$INSTDIR\LiberationSans-Regular.ttf" + + RMDir /r "$INSTDIR\logs" + RMDir /r "$INSTDIR\terrains" + RMDir /r "$INSTDIR\update" + RMDir "$INSTDIR" + + # Start menu shortcut + Delete "$SMPROGRAMS\Medfall\Medfall.lnk" + RMDir "$SMPROGRAMS\Medfall" + + # Registry keys + DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Medfall" +SectionEnd