2010-01-26 21:00:30 -06:00
; NSIS Install Script
; created by
; BBF, GlennMaynard, ChrisDanford
; hacked by AJ for sm-ssc
; NOTE: this .NSI script is designed for NSIS v2.0+
2010-06-27 18:49:27 -05:00
;-------------------------------------------------------------------------------
2010-01-26 21:00:30 -06:00
;Includes
!include "MUI.nsh" ; Modern UI
; Product info is in a separate file so that people will change
; the version info for the installer and the program at the same time.
; It's confusing/annoying when the installer and shortcut text doesn't match
; the title screen version text.
!include "src\ProductInfo.inc"
2010-06-27 18:49:27 -05:00
;-------------------------------------------------------------------------------
2010-01-26 21:00:30 -06:00
;General
!system "echo Compressing executables. This may take a moment ..." ignore
!system "utils\upx Program\*.exe" ignore
Name "${PRODUCT_DISPLAY}"
OutFile "${PRODUCT_DISPLAY}.exe"
2010-03-31 17:37:09 -05:00
Caption "${PRODUCT_DISPLAY} | install"
UninstallCaption "${PRODUCT_DISPLAY} | uninstall"
2010-01-26 21:00:30 -06:00
; Some default compiler settings (uncomment and change at will):
!ifdef COMPRESS
SetCompress auto
!else
SetCompress off
!endif
SetDatablockOptimize on ; (can be off)
!ifdef CRC_CHECK
CRCCheck on
!else
CRCCheck off
!endif
2011-03-12 14:22:38 -06:00
; don't forget to change this before releasing a new verson.
; wish this could be automated, but it requires "X.Y.Z.a" format. -aj
VIProductVersion "1.2.3.0"
VIAddVersionKey "ProductName" "${PRODUCT_ID}"
VIAddVersionKey "FileVersion" "${PRODUCT_VER}"
VIAddVersionKey "FileDescription" "${PRODUCT_ID} Installer"
2010-01-26 21:00:30 -06:00
AutoCloseWindow true ; (can be true for the window go away automatically at end)
; ShowInstDetails hide ; (can be show to have them shown, or nevershow to disable)
SetDateSave on ; (can be on to have files restored to their orginal date)
2011-03-12 14:22:38 -06:00
; I think it may need actual admin privs for writing to the registry... -aj
; RequestExecutionLevel user
; this folder may not be the best idea for Windows Vista/7. -aj
2010-01-26 21:00:30 -06:00
InstallDir " $PROGRAMFILES \${PRODUCT_ID}"
InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\${PRODUCT_ID}" ""
2011-03-12 14:22:38 -06:00
2010-01-26 21:00:30 -06:00
; DirShow show ; (make this hide to not let the user change it)
DirText "${PRODUCT_DISPLAY}"
InstallColors /windows
InstProgressFlags smooth
2010-06-27 18:49:27 -05:00
;-------------------------------------------------------------------------------
2010-01-26 21:00:30 -06:00
;Interface Settings
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP "Installer\header-${PRODUCT_BITMAP}.bmp"
!define MUI_WELCOMEFINISHPAGE_BITMAP "Installer\welcome-${PRODUCT_BITMAP}.bmp"
!define MUI_ABORTWARNING
!define MUI_ICON "Installer\install.ico"
!define MUI_UNICON "Installer\uninstall.ico"
2010-06-27 18:49:27 -05:00
;-------------------------------------------------------------------------------
2010-01-26 21:00:30 -06:00
;Language Selection Dialog Settings
;Remember the installer language
!define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
!define MUI_LANGDLL_REGISTRY_KEY "Software\${PRODUCT_ID}"
!define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
2010-06-27 18:49:27 -05:00
;-------------------------------------------------------------------------------
2010-01-26 21:00:30 -06:00
;Pages
!ifdef SHOW_AUTORUN
Page custom ShowAutorun LeaveAutorun
!endif
!insertmacro MUI_PAGE_WELCOME
2010-07-24 00:24:28 -05:00
2010-12-20 23:44:24 -06:00
; include various Windows-only notices
!insertmacro MUI_PAGE_LICENSE ".\Docs\WindowsNotes.txt"
2010-07-24 00:24:28 -05:00
2010-01-26 21:00:30 -06:00
;!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
# These indented statements modify settings for MUI_PAGE_FINISH
!define MUI_FINISHPAGE_NOAUTOCLOSE
2011-05-02 17:26:15 -05:00
!define MUI_FINISHPAGE_RUN " $INSTDIR \Program\StepMania-SSE2.exe"
2010-01-26 21:00:30 -06:00
!define MUI_FINISHPAGE_RUN_NOTCHECKED
!define MUI_FINISHPAGE_RUN_TEXT "$(TEXT_IO_LAUNCH_THE_GAME)"
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
2010-06-27 18:49:27 -05:00
;-------------------------------------------------------------------------------
2010-01-26 21:00:30 -06:00
;Languages
!insertmacro MUI_LANGUAGE "English" # first language is the default language
!insertmacro MUI_LANGUAGE "French"
!insertmacro MUI_LANGUAGE "German"
!insertmacro MUI_LANGUAGE "Spanish"
!insertmacro MUI_LANGUAGE "Italian"
;!insertmacro MUI_LANGUAGE "SimpChinese"
;!insertmacro MUI_LANGUAGE "TradChinese"
;!insertmacro MUI_LANGUAGE "Japanese"
;!insertmacro MUI_LANGUAGE "Korean"
;!insertmacro MUI_LANGUAGE "Dutch"
;!insertmacro MUI_LANGUAGE "Danish"
;!insertmacro MUI_LANGUAGE "Swedish"
;!insertmacro MUI_LANGUAGE "Norwegian"
;!insertmacro MUI_LANGUAGE "Finnish"
;!insertmacro MUI_LANGUAGE "Greek"
;!insertmacro MUI_LANGUAGE "Russian"
;!insertmacro MUI_LANGUAGE "Portuguese"
;!insertmacro MUI_LANGUAGE "PortugueseBR"
;!insertmacro MUI_LANGUAGE "Polish"
;!insertmacro MUI_LANGUAGE "Ukrainian"
;!insertmacro MUI_LANGUAGE "Czech"
;!insertmacro MUI_LANGUAGE "Slovak"
;!insertmacro MUI_LANGUAGE "Croatian"
;!insertmacro MUI_LANGUAGE "Bulgarian"
;!insertmacro MUI_LANGUAGE "Hungarian"
;!insertmacro MUI_LANGUAGE "Thai"
;!insertmacro MUI_LANGUAGE "Romanian"
;!insertmacro MUI_LANGUAGE "Latvian"
;!insertmacro MUI_LANGUAGE "Macedonian"
;!insertmacro MUI_LANGUAGE "Estonian"
;!insertmacro MUI_LANGUAGE "Turkish"
;!insertmacro MUI_LANGUAGE "Lithuanian"
;!insertmacro MUI_LANGUAGE "Catalan"
;!insertmacro MUI_LANGUAGE "Slovenian"
;!insertmacro MUI_LANGUAGE "Serbian"
;!insertmacro MUI_LANGUAGE "SerbianLatin"
;!insertmacro MUI_LANGUAGE "Arabic"
;!insertmacro MUI_LANGUAGE "Farsi"
;!insertmacro MUI_LANGUAGE "Hebrew"
;!insertmacro MUI_LANGUAGE "Indonesian"
;!insertmacro MUI_LANGUAGE "Mongolian"
;!insertmacro MUI_LANGUAGE "Luxembourgish"
;!insertmacro MUI_LANGUAGE "Albanian"
;!insertmacro MUI_LANGUAGE "Breton"
;!insertmacro MUI_LANGUAGE "Belarusian"
;!insertmacro MUI_LANGUAGE "Icelandic"
;!insertmacro MUI_LANGUAGE "Malay"
;!insertmacro MUI_LANGUAGE "Bosnian"
;!insertmacro MUI_LANGUAGE "Kurdish"
; generate, then include installer strings
;!delfile "nsis_strings_temp.inc"
2011-05-02 17:26:15 -05:00
2010-03-31 17:37:09 -05:00
!system '"Program\StepMania.exe" --ExportNsisStrings'
2010-01-26 21:00:30 -06:00
!include "nsis_strings_temp.inc"
2010-06-27 18:49:27 -05:00
;-------------------------------------------------------------------------------
2010-01-26 21:00:30 -06:00
;Reserve Files
;These files should be inserted before other files in the data block
;Keep these lines before any File command
;Only for solid compression (by default, solid compression is enabled for BZIP2 and LZMA)
!insertmacro MUI_RESERVEFILE_LANGDLL
2010-06-27 18:49:27 -05:00
;-------------------------------------------------------------------------------
2010-01-26 21:00:30 -06:00
;Utility Functions
!ifdef ASSOCIATE_SMZIP
!define SHCNE_ASSOCCHANGED 0x08000000
!define SHCNF_IDLIST 0
Function RefreshShellIcons
; By jerome tremblay - april 2003
System :: Call ' shell32.dll:: SHChangeNotify( i, i, i, i) v \
( ${SHCNE_ASSOCCHANGED} , ${SHCNF_IDLIST} , 0, 0)'
FunctionEnd
Function un.RefreshShellIcons
; By jerome tremblay - april 2003
System :: Call ' shell32.dll:: SHChangeNotify( i, i, i, i) v \
( ${SHCNE_ASSOCCHANGED} , ${SHCNF_IDLIST} , 0, 0)'
FunctionEnd
!endif
2010-06-27 18:49:27 -05:00
;-------------------------------------------------------------------------------
2010-01-26 21:00:30 -06:00
;Installer Sections
Section "Main Section" SecMain
; write out uninstaller
SetOutPath " $INSTDIR "
AllowSkipFiles off
SetOverwrite on
!ifdef INSTALL_PROGRAM_LIBRARIES
WriteUninstaller " $INSTDIR \uninstall.exe"
; add registry entries
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\${PRODUCT_ID}" "" " $INSTDIR "
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_ID}" "DisplayName" "$(TEXT_IO_REMOVE_ONLY)"
2010-03-31 17:37:09 -05:00
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_ID}" "DisplayVersion" "$(PRODUCT_VER)"
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_ID}" "Comments" "sm-ssc is a rhythm game simulator (forked from StepMania)."
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_ID}" "Publisher" "the spinal shark collective"
2010-07-24 00:24:28 -05:00
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_ID}" "URLInfoAbout" "http://code.google.com/p/sm-ssc/"
2010-03-31 17:37:09 -05:00
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_ID}" "URLUpdateInfo" "http://code.google.com/p/sm-ssc/"
2010-01-26 21:00:30 -06:00
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_ID}" "UninstallString" '"$INSTDIR\uninstall.exe"'
!endif
!ifdef INSTALL_EXTERNAL_PCKS
; Do this copy before anything else. It's the most likely to fail.
; Possible failure reasons are: scratched CD, user tried to copy the installer but forgot the pcks.
CreateDirectory $INSTDIR \ pcks
CopyFiles "${EXTERNAL_PCK_DIR}\*.pck" $INSTDIR \ pcks 650000 ; assume a CD full of data
IfErrors do_error_pck do_no_error_pck
do_error_pck :
MessageBox MB_OK | MB_ICONSTOP "$(TEXT_IO_FATAL_ERROR_COPYING_PCK)"
Quit
do_no_error_pck :
!endif
!ifdef ASSOCIATE_SMZIP
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Classes\smzipfile" "" "$(TEXT_IO_SMZIP_PACKAGE)"
2010-03-31 17:37:09 -05:00
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Classes\smzipfile\DefaultIcon" "" " $INSTDIR \Program\StepMania.exe,1"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Classes\smzipfile\shell\open\command" "" '"$INSTDIR\Program\StepMania.exe" "%1"'
2010-01-26 21:00:30 -06:00
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Classes\.smzip" "" "smzipfile"
2010-12-15 21:33:02 -06:00
!endif
2010-12-15 19:48:53 -06:00
2010-12-15 21:33:02 -06:00
!ifdef ASSOCIATE_SMURL
2010-12-15 19:48:53 -06:00
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Classes\stepmania" "" "StepMania protocol handler"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Classes\stepmania" "URL Protocol" ""
2010-12-15 21:33:02 -06:00
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Classes\stepmania\DefaultIcon" "" " $INSTDIR \Program\StepMania.exe"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Classes\stepmania\shell\open\command" "" '"$INSTDIR\Program\StepMania.exe" "%1"'
2010-01-26 21:00:30 -06:00
!endif
!ifdef INSTALL_NON_PCK_FILES
CreateDirectory " $INSTDIR \Announcers"
SetOutPath " $INSTDIR \Announcers"
File "Announcers\instructions.txt"
2010-03-30 15:56:28 -05:00
; background/movie related
2010-01-26 21:00:30 -06:00
CreateDirectory " $INSTDIR \BGAnimations"
SetOutPath " $INSTDIR \BGAnimations"
File "BGAnimations\instructions.txt"
2010-03-30 15:56:28 -05:00
CreateDirectory " $INSTDIR \BackgroundEffects"
2010-04-30 22:08:17 -05:00
SetOutPath " $INSTDIR \"
2010-03-30 15:56:28 -05:00
File /r /x CVS /x .svn "BackgroundEffects"
CreateDirectory " $INSTDIR \BackgroundTransitions"
2010-04-30 22:08:17 -05:00
SetOutPath " $INSTDIR \"
2010-03-30 15:56:28 -05:00
File /r /x CVS /x .svn "BackgroundTransitions"
2010-03-31 17:37:09 -05:00
;CreateDirectory "$INSTDIR\RandomMovies"
;SetOutPath "$INSTDIR\RandomMovies"
;File "RandomMovies\instructions.txt"
2010-03-30 15:56:28 -05:00
; end background/movie related
; Nobody should be using this directory anymore. -aj
;CreateDirectory "$INSTDIR\CDTitles"
;SetOutPath "$INSTDIR\CDTitles"
;File "CDTitles\Instructions.txt"
2010-01-26 21:00:30 -06:00
RMDir /r " $INSTDIR \Characters\default"
CreateDirectory " $INSTDIR \Characters\default"
SetOutPath " $INSTDIR \Characters"
File /r /x CVS /x .svn "Characters\default"
2010-04-30 22:08:17 -05:00
File "Characters\instructions.txt"
2010-01-26 21:00:30 -06:00
CreateDirectory " $INSTDIR \Courses"
SetOutPath " $INSTDIR \Courses"
File "Courses\instructions.txt"
2010-03-31 17:37:09 -05:00
File /r /x CVS /x .svn "Courses\Default"
2010-01-26 21:00:30 -06:00
CreateDirectory " $INSTDIR \Packages"
2010-03-31 17:37:09 -05:00
;File "Packages\Instructions.txt"
2010-01-26 21:00:30 -06:00
2010-03-30 15:56:28 -05:00
; remove old noteskins
2010-01-26 21:00:30 -06:00
RMDir /r " $INSTDIR \NoteSkins\common\default"
2010-03-30 15:56:28 -05:00
; dance
2010-01-26 21:00:30 -06:00
RMDir /r " $INSTDIR \NoteSkins\dance\default"
2010-03-30 15:56:28 -05:00
RMDir /r " $INSTDIR \NoteSkins\dance\Delta"
2010-04-30 17:00:39 -05:00
; the "midi-*" noteskin series was formerly known as just "midi".
2010-03-30 15:56:28 -05:00
RMDir /r " $INSTDIR \NoteSkins\dance\midi"
2010-06-27 18:49:27 -05:00
; we may also want to remove the new ones.
2010-04-30 17:00:39 -05:00
RMDir /r " $INSTDIR \NoteSkins\dance\midi-note"
RMDir /r " $INSTDIR \NoteSkins\dance\midi-solo"
RMDir /r " $INSTDIR \NoteSkins\dance\midi-vivid"
RMDir /r " $INSTDIR \NoteSkins\dance\midi-rhythm-p1"
RMDir /r " $INSTDIR \NoteSkins\dance\midi-rhythm-p2"
2010-07-24 00:24:28 -05:00
; retro, retrobar.
2010-03-30 15:56:28 -05:00
RMDir /r " $INSTDIR \NoteSkins\dance\retro"
2010-07-24 00:24:28 -05:00
RMDir /r " $INSTDIR \NoteSkins\dance\retrobar"
RMDir /r " $INSTDIR \NoteSkins\dance\retrobar-splithand_whiteblue"
2010-03-30 15:56:28 -05:00
; pump
2011-02-10 14:18:46 -06:00
RMDir /r " $INSTDIR \NoteSkins\pump\cmd"
RMDir /r " $INSTDIR \NoteSkins\pump\cmd-routine-p1"
RMDir /r " $INSTDIR \NoteSkins\pump\cmd-routine-p2"
RMDir /r " $INSTDIR \NoteSkins\pump\complex"
2010-03-30 15:56:28 -05:00
RMDir /r " $INSTDIR \NoteSkins\pump\default"
2011-02-10 14:18:46 -06:00
RMDir /r " $INSTDIR \NoteSkins\pump\frame5p"
RMDir /r " $INSTDIR \NoteSkins\pump\newextra"
RMDir /r " $INSTDIR \NoteSkins\pump\rhythm"
2010-03-30 15:56:28 -05:00
RMDir /r " $INSTDIR \NoteSkins\pump\simple"
2010-06-27 18:49:27 -05:00
; kb7
RMDir /r " $INSTDIR \NoteSkins\kb7\default"
2010-07-24 00:24:28 -05:00
RMDir /r " $INSTDIR \NoteSkins\kb7\orbital"
2010-09-10 22:19:38 -05:00
; retrobar for kb7
2010-07-24 00:24:28 -05:00
RMDir /r " $INSTDIR \NoteSkins\kb7\retrobar"
RMDir /r " $INSTDIR \NoteSkins\kb7\retrobar-iidx"
RMDir /r " $INSTDIR \NoteSkins\kb7\retrobar-o2jam"
2010-09-10 22:19:38 -05:00
RMDir /r " $INSTDIR \NoteSkins\kb7\retrobar-razor"
RMDir /r " $INSTDIR \NoteSkins\kb7\retrobar-razor_o2"
2010-03-30 15:56:28 -05:00
; lights
RMDir /r " $INSTDIR \NoteSkins\lights\default"
2010-01-26 21:00:30 -06:00
SetOutPath " $INSTDIR \NoteSkins"
File "NoteSkins\instructions.txt"
2011-05-02 17:26:15 -05:00
; common noteskin
2010-01-26 21:00:30 -06:00
SetOutPath " $INSTDIR \NoteSkins\common"
2011-05-02 17:26:15 -05:00
File /r /x CVS /x .svn "NoteSkins\common\common"
2010-01-26 21:00:30 -06:00
2010-03-30 15:56:28 -05:00
; install dance noteskins
2010-01-26 21:00:30 -06:00
SetOutPath " $INSTDIR \NoteSkins\dance"
File /r /x CVS /x .svn "NoteSkins\dance\default"
2010-03-30 15:56:28 -05:00
File /r /x CVS /x .svn "NoteSkins\dance\Delta"
2010-04-30 17:00:39 -05:00
; "midi" noteskin was split out after beta 2.
File /r /x CVS /x .svn "NoteSkins\dance\midi-note"
2011-05-02 17:26:15 -05:00
File /r /x CVS /x .svn "NoteSkins\dance\midi-note-3d"
2010-04-30 20:45:00 -05:00
File /r /x CVS /x .svn "NoteSkins\dance\midi-routine-p1"
File /r /x CVS /x .svn "NoteSkins\dance\midi-routine-p2"
2011-05-02 17:26:15 -05:00
File /r /x CVS /x .svn "NoteSkins\dance\midi-solo"
File /r /x CVS /x .svn "NoteSkins\dance\midi-vivid"
2010-07-24 00:24:28 -05:00
; retro and retrobar
2010-03-30 15:56:28 -05:00
File /r /x CVS /x .svn "NoteSkins\dance\retro"
2010-07-24 00:24:28 -05:00
File /r /x CVS /x .svn "NoteSkins\dance\retrobar"
File /r /x CVS /x .svn "NoteSkins\dance\retrobar-splithand_whiteblue"
2010-01-26 21:00:30 -06:00
SetOutPath " $INSTDIR "
2010-03-30 15:56:28 -05:00
; install pump noteskins
SetOutPath " $INSTDIR \NoteSkins\pump"
2010-07-24 00:24:28 -05:00
File /r /x CVS /x .svn "NoteSkins\pump\cmd"
2011-01-07 17:43:03 -07:00
File /r /x CVS /x .svn "NoteSkins\pump\cmd-routine-p1"
File /r /x CVS /x .svn "NoteSkins\pump\cmd-routine-p2"
2010-07-24 00:24:28 -05:00
File /r /x CVS /x .svn "NoteSkins\pump\complex"
2010-04-30 22:08:17 -05:00
File /r /x CVS /x .svn "NoteSkins\pump\default"
2011-01-07 17:43:03 -07:00
File /r /x CVS /x .svn "NoteSkins\pump\frame5p"
File /r /x CVS /x .svn "NoteSkins\pump\newextra"
2011-02-10 14:18:46 -06:00
File /r /x CVS /x .svn "NoteSkins\pump\rhythm"
2010-04-30 22:08:17 -05:00
File /r /x CVS /x .svn "NoteSkins\pump\simple"
2010-03-30 15:56:28 -05:00
SetOutPath " $INSTDIR "
2010-01-26 21:00:30 -06:00
2010-06-27 18:49:27 -05:00
; install kb7 noteskins
SetOutPath " $INSTDIR \NoteSkins\kb7"
File /r /x CVS /x .svn "NoteSkins\kb7\default"
2011-05-02 17:26:15 -05:00
;File /r /x CVS /x .svn "NoteSkins\kb7\orbital"
2010-07-24 00:24:28 -05:00
; retrobar
File /r /x CVS /x .svn "NoteSkins\kb7\retrobar"
File /r /x CVS /x .svn "NoteSkins\kb7\retrobar-iidx"
File /r /x CVS /x .svn "NoteSkins\kb7\retrobar-o2jam"
2010-09-10 22:19:38 -05:00
File /r /x CVS /x .svn "NoteSkins\kb7\retrobar-razor"
File /r /x CVS /x .svn "NoteSkins\kb7\retrobar-razor_o2"
2010-06-27 18:49:27 -05:00
SetOutPath " $INSTDIR "
2010-03-30 15:56:28 -05:00
; install lights noteskin
SetOutPath " $INSTDIR \NoteSkins\lights"
2010-04-30 22:08:17 -05:00
File /r /x CVS /x .svn "NoteSkins\lights\default"
2010-03-30 15:56:28 -05:00
SetOutPath " $INSTDIR "
2010-01-26 21:00:30 -06:00
2010-03-30 15:56:28 -05:00
; make songs dir
2010-01-26 21:00:30 -06:00
CreateDirectory " $INSTDIR \Songs"
SetOutPath " $INSTDIR \Songs"
2010-03-31 17:37:09 -05:00
;File "Songs\Instructions.txt"
2010-01-26 21:00:30 -06:00
2010-03-30 15:56:28 -05:00
; remove and install themes
RMDir /r " $INSTDIR \Themes\_fallback"
RMDir /r " $INSTDIR \Themes\_portKit-sm4"
2010-01-26 21:00:30 -06:00
RMDir /r " $INSTDIR \Themes\default"
CreateDirectory " $INSTDIR \Themes"
SetOutPath " $INSTDIR \Themes"
2010-03-31 17:37:09 -05:00
;File "Themes\instructions.txt"
2010-03-30 15:56:28 -05:00
File /r /x CVS /x .svn "Themes\_fallback"
File /r /x CVS /x .svn "Themes\_portKit-sm4"
2010-01-26 21:00:30 -06:00
File /r /x CVS /x .svn "Themes\default"
CreateDirectory " $INSTDIR \Data"
SetOutPath " $INSTDIR \Data"
File /r /x CVS /x .svn "Data\*"
!endif
!ifdef INSTALL_INTERNAL_PCKS
CreateDirectory " $INSTDIR \pcks"
SetOutPath " $INSTDIR \pcks"
File /r "pcks\*.*"
!endif
2010-03-30 15:56:28 -05:00
2010-01-26 21:00:30 -06:00
SetOutPath " $INSTDIR \Program"
!ifdef INSTALL_EXECUTABLES
2011-05-02 17:20:02 -05:00
; normal exec
2010-03-31 17:37:09 -05:00
File "Program\StepMania.exe"
File "Program\StepMania.vdi"
2010-03-30 15:56:28 -05:00
; sse2 exec
2010-03-31 17:37:09 -05:00
File "Program\StepMania-SSE2.exe"
File "Program\StepMania-SSE2.vdi"
2010-03-30 15:56:28 -05:00
; other programs
2010-01-26 21:00:30 -06:00
File "Program\Texture Font Generator.exe"
2011-05-02 17:20:02 -05:00
; AJ can never get this built properly:
2010-09-10 22:19:38 -05:00
;File "Program\tools.exe" ; to be replaced eventually
2010-01-26 21:00:30 -06:00
!endif
!ifdef ASSOCIATE_SMZIP
Call RefreshShellIcons
!endif
2010-12-15 21:33:02 -06:00
!ifdef ASSOCIATE_SMURL
Call RefreshShellIcons
!endif
2010-01-26 21:00:30 -06:00
!ifdef INSTALL_PROGRAM_LIBRARIES
2010-03-30 15:56:28 -05:00
; microsoft!
2010-07-24 00:24:28 -05:00
; xxx: how many of these do we really need?
2010-01-26 21:00:30 -06:00
File "Program\mfc71.dll"
File "Program\msvcr71.dll"
2010-03-30 15:56:28 -05:00
File "Program\msvcr80.dll"
2010-07-24 00:24:28 -05:00
File "Program\msvcr90.dll"
2010-01-26 21:00:30 -06:00
File "Program\msvcp71.dll"
2010-03-30 15:56:28 -05:00
File "Program\msvcp80.dll"
2010-07-24 00:24:28 -05:00
File "Program\msvcp90.dll"
; FFmpeg and related
2010-03-30 15:56:28 -05:00
File "Program\avcodec-52.dll"
File "Program\avdevice-52.dll"
File "Program\avformat-52.dll"
File "Program\avutil-50.dll"
File "Program\swscale-0.dll"
; parallel lights
File "Program\parallel_lights_io.dll"
; others
2010-01-26 21:00:30 -06:00
File "Program\dbghelp.dll"
2010-03-30 15:56:28 -05:00
File "Program\jpeg.dll"
2010-01-26 21:00:30 -06:00
File "Program\zlib1.dll"
2010-03-30 15:56:28 -05:00
; documentation
CreateDirectory " $INSTDIR \Docs"
SetOutPath " $INSTDIR \Docs"
2010-03-31 17:37:09 -05:00
File "Docs\Licenses.txt"
File "Docs\credits.txt"
File "Docs\Changelog_sm-ssc.txt"
2011-05-02 17:18:13 -05:00
File "Docs\Changelog_sm5.txt"
File "Docs\Changelog_SSCformat.txt"
2010-03-31 17:37:09 -05:00
File "Docs\CommandLineArgs.txt"
2010-07-24 00:24:28 -05:00
File /r /x CVS /x .svn "Docs\license-ext"
File /r /x CVS /x .svn "Docs\Luadoc"
File /r /x CVS /x .svn "Docs\Themerdocs"
2010-01-26 21:00:30 -06:00
CreateDirectory " $INSTDIR \Manual"
SetOutPath " $INSTDIR \Manual"
File /r /x CVS /x .svn /x _* /x desktop.ini "Manual\*.*"
; Create Start Menu icons
SetShellVarContext current # 'all' doesn't work on Win9x
CreateDirectory " $SMPROGRAMS \${PRODUCT_ID}\"
2011-05-02 17:26:15 -05:00
; todo: make desktop shortcut an option
2010-04-30 22:08:17 -05:00
!ifdef MAKE_DESKTOP_SHORTCUT
2010-06-27 18:49:27 -05:00
CreateShortCut " $DESKTOP \$(TEXT_IO_RUN).lnk" " $INSTDIR \Program\StepMania-SSE2.exe"
2010-04-30 22:08:17 -05:00
!endif
2010-07-24 00:24:28 -05:00
2010-06-27 18:49:27 -05:00
CreateShortCut " $SMPROGRAMS \${PRODUCT_ID}\$(TEXT_IO_RUN).lnk" " $INSTDIR \Program\StepMania-SSE2.exe"
CreateShortCut " $SMPROGRAMS \${PRODUCT_ID}\$(TEXT_IO_RUN_WITHOUT_SSE2).lnk" " $INSTDIR \Program\StepMania.exe"
2010-07-24 00:24:28 -05:00
2010-01-26 21:00:30 -06:00
!ifdef MAKE_OPEN_PROGRAM_FOLDER_SHORTCUT
CreateShortCut " $SMPROGRAMS \${PRODUCT_ID}\$(TEXT_IO_OPEN_PROGRAM_FOLDER).lnk" " $WINDIR \explorer.exe" " $INSTDIR \"
!endif
2010-07-24 00:24:28 -05:00
!ifdef MAKE_OPEN_SETTINGS_FOLDER_SHORTCUT
2011-03-12 14:22:38 -06:00
CreateShortCut " $SMPROGRAMS \${PRODUCT_ID}\$(TEXT_IO_OPEN_SETTINGS_FOLDER).lnk" " $WINDIR \explorer.exe" " $APPDATA \${PRODUCT_ID}"
2010-07-24 00:24:28 -05:00
!endif
;CreateShortCut "$SMPROGRAMS\${PRODUCT_ID}\$(TEXT_IO_VIEW_STATISTICS).lnk" "$INSTDIR\Program\tools.exe" "--machine-profile-stats"
2010-09-10 22:19:38 -05:00
;CreateShortCut "$SMPROGRAMS\${PRODUCT_ID}\$(TEXT_IO_TOOLS).lnk" "$INSTDIR\Program\tools.exe"
2010-07-24 00:24:28 -05:00
CreateShortCut " $SMPROGRAMS \${PRODUCT_ID}\$(TEXT_IO_MANUAL).lnk" " $INSTDIR \Manual\index.html"
CreateShortCut " $SMPROGRAMS \${PRODUCT_ID}\$(TEXT_IO_UNINSTALL).lnk" " $INSTDIR \uninstall.exe"
CreateShortCut " $SMPROGRAMS \${PRODUCT_ID}\$(TEXT_IO_WEB_SITE).lnk" "${PRODUCT_URL}"
2011-03-12 14:22:38 -06:00
CreateShortCut " $SMPROGRAMS \${PRODUCT_ID}\$(TEXT_IO_TEXTURE_FONT_GENERATOR).lnk" '"$INSTDIR\Program\Texture Font Generator.exe"'
2010-01-26 21:00:30 -06:00
!ifdef MAKE_UPDATES_SHORTCUT
CreateShortCut " $SMPROGRAMS \${PRODUCT_ID}\$(TEXT_IO_CHECK_FOR_UPDATES).lnk" "${UPDATES_URL}"
!endif
2010-06-27 21:33:54 -05:00
CreateShortCut " $INSTDIR \${PRODUCT_ID}.lnk" " $INSTDIR \Program\StepMania-SSE2.exe"
CreateShortCut " $INSTDIR \${PRODUCT_ID} (non-SSE2).lnk" " $INSTDIR \Program\StepMania.exe"
2010-01-26 21:00:30 -06:00
!endif
IfErrors do_error do_no_error
do_error :
MessageBox MB_OK | MB_ICONSTOP "$(TEXT_IO_FATAL_ERROR_INSTALL)"
Quit
do_no_error :
2010-07-24 00:24:28 -05:00
2010-01-26 21:00:30 -06:00
SectionEnd
2010-06-27 18:49:27 -05:00
;-------------------------------------------------------------------------------
2010-01-26 21:00:30 -06:00
;Installer Functions
!ifdef SHOW_AUTORUN
Var hwnd ; Window handle of the custom page
Function ShowAutorun
!insertmacro MUI_HEADER_TEXT "$(TEXT_IO_TITLE)" "$(TEXT_IO_SUBTITLE)"
InstallOptions :: initDialog /NOUNLOAD " $PLUGINSDIR \custom.ini"
; In this mode InstallOptions returns the window handle so we can use it
Pop $hwnd
GetDlgItem $1 $HWNDPARENT 1 ; Next button
ShowWindow $1 0
!ifdef AUTORUN_SHOW_ONLY_INSTALL
Goto show_only_install
!endif
StrCpy $R1 " $INSTDIR \uninst.exe"
StrCpy $R2 "_="
IfFileExists " $R1 " show_play_and_reinstall
StrCpy $R1 " $INSTDIR \uninstall.exe"
StrCpy $R2 "_?="
IfFileExists " $R1 " show_play_and_reinstall
show_only_install :
GetDlgItem $1 $hwnd 1201 ; Second cutom control
ShowWindow $1 0
GetDlgItem $1 $hwnd 1202 ; Third cutom control
ShowWindow $1 0
Goto done
show_play_and_reinstall :
GetDlgItem $1 $hwnd 1200 ; First cutom control
ShowWindow $1 0
done :
; Now show the dialog and wait for it to finish
InstallOptions :: show
; Finally fetch the InstallOptions status value (we don't care what it is though)
Pop $0
FunctionEnd
Function LeaveAutorun
; At this point the user has either pressed Next or one of our custom buttons
; We find out which by reading from the INI file
ReadINIStr $0 " $PLUGINSDIR \custom.ini" "Settings" "State"
StrCmp $0 1 install
StrCmp $0 2 play
StrCmp $0 3 install
Goto proceed
install :
Call PreInstall
GoTo proceed
2010-03-31 17:37:09 -05:00
2010-01-26 21:00:30 -06:00
play :
2011-05-02 17:26:15 -05:00
Exec " $INSTDIR \Program\StepMania-SSE2.exe"
2010-01-26 21:00:30 -06:00
IfErrors play_error
quit
play_error :
MessageBox MB_ICONEXCLAMATION "$(TEXT_IO_COULD_NOT_EXECUTE)"
abort
proceed :
GetDlgItem $1 $HWNDPARENT 1 ; Next button
ShowWindow $1 1
FunctionEnd
!endif
Function PreInstall
!ifdef INSTALL_PROGRAM_LIBRARIES
; force uninstall of previous version using NSIS
; We need to wait until the uninstaller finishes before continuing, since it's possible
; to click the next button again before the uninstaller's window appears and takes focus.
; This is tricky: we can't just ExecWait the uninstaller, since it copies off the uninstaller
; EXE and exec's that (otherwise it couldn't delete itself), so it appears to exit immediately.
; We need to copy it off ourself, run it with the hidden parameter to tell it it's a copy,
; and then delete the copy ourself. There's one more trick: the hidden parameter changed
; between NSIS 1 and 2: in 1.x it was _=C:\Foo, in 2.x it's _?=C:\Foo. Rename the installer
; for newer versions, so we can tell the difference: "uninst.exe" is the old 1.x uninstaller,
; "uninstall.exe" is 2.x.
StrCpy $R1 " $INSTDIR \uninst.exe"
StrCpy $R2 "_="
IfFileExists " $R1 " prompt_uninstall_nsis
StrCpy $R1 " $INSTDIR \uninstall.exe"
StrCpy $R2 "_?="
IfFileExists " $R1 " prompt_uninstall_nsis old_nsis_not_installed
prompt_uninstall_nsis :
MessageBox MB_YESNO | MB_ICONINFORMATION "$(TEXT_IO_UNINSTALL_PREVIOUS)" IDYES do_uninstall_nsis
Abort
do_uninstall_nsis :
GetTempFileName $R3
CopyFiles /SILENT $R1 $R3
ExecWait '$R3 $R2$INSTDIR' $R4
; Delete the copy of the installer.
Delete $R3
; $R4 is the exit value of the uninstaller. 0 means success, anything else is
; failure (eg. aborted).
IntCmp $R4 0 old_nsis_not_installed ; jump if 0
MessageBox MB_YESNO | MB_DEFBUTTON2 | MB_ICONINFORMATION "$(TEXT_IO_UNINSTALL_FAILED_INSTALL_ANYWAY)" IDYES old_nsis_not_installed
Abort
old_nsis_not_installed :
; Check for DirectX 8.0 (to be moved to the right section later)
; We only use this for sound. Actually, I could probably make the sound
; work with an earlier one; I'm not sure if that's needed or not. For one
; thing, forcing people to upgrade drivers is somewhat of a good thing;
; but upgrading to DX8 if you really don't have to is also somewhat
; annoying, too ... -g
ReadRegStr $0 HKEY_LOCAL_MACHINE "Software\Microsoft\DirectX" "Version"
StrCpy $1 $0 2 2 ; 8.1 is "4.08.01.0810"
IntCmpU $1 8 check_subversion old_dx ok
check_subversion :
StrCpy $1 $0 2 5
IntCmpU $1 0 ok old_dx ok
; We can function without it (using WaveOut), so don't *require* this.
old_dx :
!ifdef DIRECTX_81_REDIST_PRESENT
MessageBox MB_YESNO | MB_ICONINFORMATION "$(TEXT_IO_INSTALL_DIRECTX)" IDNO ok
Exec "DirectX81\dxsetup.exe"
quit
ok :
!else
MessageBox MB_YESNO | MB_ICONINFORMATION "$(TEXT_IO_DIRECTX_VISIT_MICROSOFT)" IDNO ok
ExecShell "" "http://www.microsoft.com/directx/"
Abort
ok :
!endif
!else
; Check that full version is installed.
2010-03-31 17:37:09 -05:00
IfFileExists " $INSTDIR \Program\StepMania.exe" proceed_with_patch
2010-01-26 21:00:30 -06:00
MessageBox MB_YESNO | MB_ICONINFORMATION "$(TEXT_IO_FULL_INSTALL_NOT_FOUND)" IDYES proceed_with_patch
Abort
proceed_with_patch :
!endif
FunctionEnd
Function .onInit
; Force show language selection for debugging
;!define MUI_LANGDLL_ALWAYSSHOW
!insertmacro MUI_LANGDLL_DISPLAY
!ifdef SHOW_AUTORUN
;
; Extract files for the InstallOptions page
;
!insertmacro MUI_INSTALLOPTIONS_EXTRACT_AS "Installer\custom.ini" "custom.ini"
;$PLUGINSDIR will automatically be removed when the installer closes
InitPluginsDir
WriteINIStr $PLUGINSDIR \ custom.ini "Field 1" "Text" "$(TEXT_IO_INSTALL)"
WriteINIStr $PLUGINSDIR \ custom.ini "Field 2" "Text" "$(TEXT_IO_PLAY)"
WriteINIStr $PLUGINSDIR \ custom.ini "Field 3" "Text" "$(TEXT_IO_REINSTALL)"
WriteINIStr $PLUGINSDIR \ custom.ini "Field 4" "Text" "${PRODUCT_URL}"
WriteINIStr $PLUGINSDIR \ custom.ini "Field 4" "State" "${PRODUCT_URL}"
File /oname = $PLUGINSDIR \ image.bmp "Installer\custom-${PRODUCT_BITMAP}.bmp"
WriteINIStr $PLUGINSDIR \ custom.ini "Field 5" "Text" $PLUGINSDIR \ image.bmp
!else
call PreInstall
!endif
FunctionEnd
2010-06-27 18:49:27 -05:00
;-------------------------------------------------------------------------------
2010-01-26 21:00:30 -06:00
;Uninstaller Section
2010-03-31 17:37:09 -05:00
; todo: update big time
2010-01-26 21:00:30 -06:00
Section "Uninstall"
; add delete commands to delete whatever files/registry keys/etc you installed here.
DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\${PRODUCT_ID}"
DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_ID}"
!ifdef INSTALL_EXTERNAL_PCKS | INSTALL_INTERNAL_PCKS
RMDir /r " $INSTDIR \pcks"
!endif
!ifdef ASSOCIATE_SMZIP
DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Classes\smzipfile"
DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Classes\.smzip"
!endif
2010-12-15 21:33:02 -06:00
!ifdef ASSOCIATE_SMURL
DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Classes\stepmania"
!endif
2010-01-26 21:00:30 -06:00
!ifdef INSTALL_NON_PCK_FILES
Delete " $INSTDIR \Announcers\instructions.txt"
RMDir " $INSTDIR \Announcers"
Delete " $INSTDIR \BGAnimations\instructions.txt"
RMDir " $INSTDIR \BGAnimations"
RMDir /r " $INSTDIR \Cache"
Delete " $INSTDIR \CDTitles\Instructions.txt"
RMDir " $INSTDIR \CDTitles"
RMDir /r " $INSTDIR \Characters\default"
RMDir " $INSTDIR \Characters"
RMDir /r " $INSTDIR \Cache"
Delete " $INSTDIR \Packages\instructions.txt"
RMDir " $INSTDIR \Packages"
Delete " $INSTDIR \Courses\instructions.txt"
2010-03-31 17:37:09 -05:00
RMDir /r " $INSTDIR \Courses\Default"
2010-01-26 21:00:30 -06:00
RMDir " $INSTDIR \Courses"
Delete " $INSTDIR \NoteSkins\instructions.txt"
RMDir /r " $INSTDIR \NoteSkins\common\default"
RMDir " $INSTDIR \NoteSkins\common"
RMDir /r " $INSTDIR \NoteSkins\dance\default"
2010-06-27 18:49:27 -05:00
RMDir /r " $INSTDIR \NoteSkins\dance\Delta"
RMDir /r " $INSTDIR \NoteSkins\dance\midi-note"
RMDir /r " $INSTDIR \NoteSkins\dance\midi-routine-p1"
RMDir /r " $INSTDIR \NoteSkins\dance\midi-routine-p2"
RMDir /r " $INSTDIR \NoteSkins\dance\midi-solo"
RMDir /r " $INSTDIR \NoteSkins\dance\midi-vivid"
RMDir /r " $INSTDIR \NoteSkins\dance\retro"
2010-07-24 00:24:28 -05:00
RMDir /r " $INSTDIR \NoteSkins\dance\retrobar"
RMDir /r " $INSTDIR \NoteSkins\dance\retrobar-splithand_whiteblue"
2010-01-26 21:00:30 -06:00
RMDir " $INSTDIR \NoteSkins\dance"
2010-06-27 18:49:27 -05:00
2010-07-24 00:24:28 -05:00
RMDir /r " $INSTDIR \NoteSkins\pump\cmd"
RMDir /r " $INSTDIR \NoteSkins\pump\complex"
2010-01-26 21:00:30 -06:00
RMDir /r " $INSTDIR \NoteSkins\pump\default"
2010-06-27 18:49:27 -05:00
RMDir /r " $INSTDIR \NoteSkins\pump\simple"
2010-01-26 21:00:30 -06:00
RMDir " $INSTDIR \NoteSkins\pump"
2010-06-27 18:49:27 -05:00
RMDir /r " $INSTDIR \NoteSkins\kb7\default"
2010-07-24 00:24:28 -05:00
RMDir /r " $INSTDIR \NoteSkins\kb7\orbital"
RMDir /r " $INSTDIR \NoteSkins\kb7\retrobar"
RMDir /r " $INSTDIR \NoteSkins\kb7\retrobar-iidx"
RMDir /r " $INSTDIR \NoteSkins\kb7\retrobar-o2jam"
2010-09-10 22:19:38 -05:00
RMDir /r " $INSTDIR \NoteSkins\kb7\retrobar-razor"
RMDir /r " $INSTDIR \NoteSkins\kb7\retrobar-razor_o2"
2010-06-27 18:49:27 -05:00
RMDir " $INSTDIR \NoteSkins\kb7"
2010-07-24 00:24:28 -05:00
; we don't currently install para noteskins...
2010-06-27 18:49:27 -05:00
;RMDir /r "$INSTDIR\NoteSkins\para\default"
;RMDir "$INSTDIR\NoteSkins\para"
;RMDir "$INSTDIR\NoteSkins"
2010-01-26 21:00:30 -06:00
RMDir /r " $INSTDIR \BackgroundEffects"
RMDir /r " $INSTDIR \BackgroundTransitions"
Delete " $INSTDIR \RandomMovies\instructions.txt"
RMDir " $INSTDIR \RandomMovies"
Delete " $INSTDIR \Songs\Instructions.txt"
RMDir " $INSTDIR \Songs" ; will delete only if empty
Delete " $INSTDIR \Themes\instructions.txt"
2010-06-27 21:33:54 -05:00
RMDir /r " $INSTDIR \Themes\_fallback"
RMDir /r " $INSTDIR \Themes\_portKit-sm4"
2010-01-26 21:00:30 -06:00
RMDir /r " $INSTDIR \Themes\default"
RMDir " $INSTDIR \Themes"
Delete " $INSTDIR \Data\*.*"
RMDir " $INSTDIR \Data"
!endif
!ifdef INSTALL_EXECUTABLES
2010-03-31 17:37:09 -05:00
Delete " $INSTDIR \Program\StepMania.exe"
Delete " $INSTDIR \Program\StepMania.vdi"
Delete " $INSTDIR \Program\StepMania-SSE2.exe"
Delete " $INSTDIR \Program\StepMania-SSE2.vdi"
2010-01-26 21:00:30 -06:00
Delete " $INSTDIR \Program\tools.exe"
Delete " $INSTDIR \Program\Texture Font Generator.exe"
!endif
!ifdef ASSOCIATE_SMZIP
Call un.RefreshShellIcons
!endif
2010-12-15 21:33:02 -06:00
!ifdef ASSOCIATE_SMURL
Call un.RefreshShellIcons
!endif
2010-01-26 21:00:30 -06:00
!ifdef INSTALL_PROGRAM_LIBRARIES
Delete " $INSTDIR \Program\mfc71.dll"
Delete " $INSTDIR \Program\msvcr71.dll"
Delete " $INSTDIR \Program\msvcp71.dll"
2010-07-24 00:24:28 -05:00
Delete " $INSTDIR \Program\msvcr80.dll"
Delete " $INSTDIR \Program\msvcp80.dll"
Delete " $INSTDIR \Program\msvcr90.dll"
Delete " $INSTDIR \Program\msvcp90.dll"
; FFmpeg and related
Delete " $INSTDIR \Program\avcodec-52.dll"
Delete " $INSTDIR \Program\avdevice-52.dll"
Delete " $INSTDIR \Program\avformat-52.dll"
Delete " $INSTDIR \Program\avutil-50.dll"
Delete " $INSTDIR \Program\swscale-0.dll"
; others
2010-01-26 21:00:30 -06:00
Delete " $INSTDIR \Program\dbghelp.dll"
2010-07-24 00:24:28 -05:00
Delete " $INSTDIR \Program\jpeg.dll"
2010-01-26 21:00:30 -06:00
Delete " $INSTDIR \Program\zlib1.dll"
RMDir " $INSTDIR \Program"
Delete " $INSTDIR \Licenses.txt"
RMDir /r " $INSTDIR \Manual"
!endif
Delete " $INSTDIR \log.txt"
Delete " $INSTDIR \info.txt"
Delete " $INSTDIR \crashinfo.txt"
Delete " $INSTDIR \${PRODUCT_ID}.lnk"
2010-06-27 21:33:54 -05:00
Delete " $INSTDIR \${PRODUCT_ID} (non-SSE2).lnk"
2010-01-26 21:00:30 -06:00
RMDir " $INSTDIR " ; will delete only if empty
SetShellVarContext current
Delete " $DESKTOP \Play StepMania CVS.lnk"
Delete " $DESKTOP \${PRODUCT_DISPLAY}.lnk"
; I'm being paranoid here:
Delete " $SMPROGRAMS \${PRODUCT_ID}\*.*"
RMDir " $SMPROGRAMS \${PRODUCT_ID}"
Delete " $INSTDIR \Uninstall.exe"
DeleteRegKey /ifempty HKEY_LOCAL_MACHINE "SOFTWARE\${PRODUCT_ID}"
SectionEnd
2010-06-27 18:49:27 -05:00
;-------------------------------------------------------------------------------
2010-01-26 21:00:30 -06:00
;Uninstaller Functions
Function un.onInit
!insertmacro MUI_UNGETLANGUAGE
FunctionEnd