Skip to content

Commit

Permalink
Updated Uninstaller
Browse files Browse the repository at this point in the history
  • Loading branch information
krisdb2009 committed Oct 8, 2019
1 parent a20251c commit 4f31ebf
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions SuperGrateInstaller/installer.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ VIAddVersionKey "FileVersion" "${VERSION}"
VIProductVersion "${VERSION}"

!define MUI_ICON "..\SuperGrate\Images\supergrate.ico"
!define MUI_UNICON "..\SuperGrate\Images\supergrate.ico"
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP ".\header.bmp"
!define MUI_WELCOMEFINISHPAGE_BITMAP ".\welcome.bmp"
Expand All @@ -21,6 +22,9 @@ VIProductVersion "${VERSION}"
!define MUI_WELCOMEPAGE_TEXT "${NAME} setup will guide you through the installation process.$\r$\n$\r$\n$\r$\nPress Next to continue."
!define MUI_FINISHPAGE_NOAUTOCLOSE
!define MUI_UNFINISHPAGE_NOAUTOCLOSE
!define MUI_FINISHPAGE_RUN "$INSTDIR\SuperGrate.exe"
!define MUI_FINISHPAGE_LINK "Super Grate - GitHub"
!define MUI_FINISHPAGE_LINK_LOCATION "https://github.com/belowaverage-org/SuperGrate"

InstallDir "$PROGRAMFILES64\Super Suite\Super Grate"

Expand All @@ -35,12 +39,12 @@ InstallDir "$PROGRAMFILES64\Super Suite\Super Grate"

!insertmacro MUI_LANGUAGE "English"

Section "!${NAME}"
Section "!${NAME}" SuperGrate

SetShellVarContext all

WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NAME}" "DisplayName" "${NAME}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NAME}" "UninstallString" "$INSTDIR\Uninstall.exe"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NAME}" "UninstallString" "$INSTDIR\uninstall.exe"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NAME}" "Publisher" "Dylan Bickerstaff"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NAME}" "DisplayVersion" "${VERSION}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NAME}" "DisplayIcon" "$INSTDIR\SuperGrate.exe"
Expand All @@ -54,7 +58,7 @@ ${Else}
File "..\SuperGrate\bin\Release\SuperGrate.exe"
${EndIf}

WriteUninstaller "$INSTDIR\Uninstall.exe"
WriteUninstaller "$INSTDIR\uninstall.exe"

CreateDirectory "$SMPROGRAMS\Super Suite"
CreateShortcut "$SMPROGRAMS\Super Suite\Super Grate.lnk" "$INSTDIR\SuperGrate.exe"
Expand All @@ -63,7 +67,7 @@ SectionEnd



Section "USMT 64-Bit"
Section "USMT 64-Bit" USMT64

SetOutPath "$INSTDIR\USMT\X64"
File /r ".\bin\scratch\x64\usmt\*.*"
Expand All @@ -72,7 +76,7 @@ SectionEnd



Section "USMT 32-Bit"
Section "USMT 32-Bit" USMT32

SetOutPath "$INSTDIR\USMT\X86"
File /r ".\bin\scratch\x86\usmt\*.*"
Expand All @@ -89,10 +93,18 @@ RMDir /r "$INSTDIR\USMT"
RMDir /r "$INSTDIR\STORE"
Delete "$INSTDIR\SuperGrate.xml"
Delete "$INSTDIR\SuperGrate.exe"
Delete "$INSTDIR\Uninstall.exe"
Delete "$INSTDIR\uninstall.exe"
Delete "$SMPROGRAMS\Super Suite\Super Grate.lnk"
RMDir "$SMPROGRAMS\Super Suite"
RMDir "$INSTDIR"
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NAME}"

SectionEnd
SectionEnd



!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${SuperGrate} "This item installs the Super Grate program."
!insertmacro MUI_DESCRIPTION_TEXT ${USMT64} "This item installs the 64-Bit version of USMT."
!insertmacro MUI_DESCRIPTION_TEXT ${USMT32} "This item installs the 32-Bit version of USMT."
!insertmacro MUI_FUNCTION_DESCRIPTION_END

0 comments on commit 4f31ebf

Please sign in to comment.