From 25caea972d8d571448ee97ae6ad18e8b6f04609a Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Mon, 31 Oct 2005 20:50:42 +0000 Subject: [PATCH] use Modern UI for multilanguage installer --- stepmania/installer-header.bmp | Bin 0 -> 9664 bytes stepmania/stepmania.nsi | 824 +++++++++++++++++++-------------- 2 files changed, 464 insertions(+), 360 deletions(-) create mode 100644 stepmania/installer-header.bmp diff --git a/stepmania/installer-header.bmp b/stepmania/installer-header.bmp new file mode 100644 index 0000000000000000000000000000000000000000..db67870238c3a57b11e8f8c9535d5eb0eed0097c GIT binary patch literal 9664 zcmc(k30Tzi*2fPs|Nnnh*$13q9fpA!_GPAl2ynx#)NWZ8nYfW=mXbH?_Lk-C+Twb} z(9}{(%rXOTqdPK>*0`-Clg6@v#9mJ^(dh07u@)^BaCoKlI0Mzx@UZxi9#+3EqBhW+nXmZX`7Bjfd*pv2f+nXvlhB3CG_IgWN6AaBW*G)TT{?OCLtV z>9>{8ygvcTc1?k*Ju~3yj;WCMX*~SnqgXiq{^QVk_$koroegydpM-yHoer6s6BhyTn6B`7-nGKLQHw<1{I2&G1nvUNO!`fAgK{wb2 zJ2r&Fs)hdW*}Kod?S>z~c=H!9bY_BSuoBEe&G66clhD(y0gJvHEW>?Z()EDFq=Wt+ z0dAeLfvyua(D027+{$1;_emzc643cQ0WHT#xOJL>?jI@WJi&&6GaP6*#)qmyJQz4@ z3%wbW;QYs2$lJq*f%8t#`hyb;UT}x6-xa{F*PTGU&j%WRl)-;2_ku+Uu26j{9?tGk zz@6N=&~y1oxSRhp+%0?#`g31|p{tAG>i6^E@Rm4uZ*>F=U0Vq?7ZRbbUTZ^fzAuQ-2}ox^uyFs~AiJ*Wu31E9g-f40K!pZEp$8nHdM>JJn#m zTMNe9H}JI{x?76DaJvrf_SJ$}*8$hBT!i7fo$%|qJ#g~7gV1oJ5G;m%uo!P+92@a< z5WO9O%^$oCVzD>of(7PYI0$pj?}w+d4#TWdpTo=_QX%2{T`=R@9W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80w7fLq4nvLDe3Gl9IWt;)$bE{^(z4Zmv z4GlmvL5ijv*-G_H`$#;kLV^@_OkLLy<1O4ujm~=$VCQ{zO{iMpl9kkOZEkhBuQnetS_#i?W}JsD5>u2 zZ)$3y{VXdhGf>makensis.exe /v3 /cd "m:\Dev Projects\CVS\stepmania\stepmania.nsi" -; ; NOTE: this .NSI script is designed for NSIS v2.0+ +;-------------------------------- +;Includes -; 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 when the installer and shortcut text doesn't match the -; title screen version text. -!include "src\ProductInfo.inc" + !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 when the installer and shortcut text doesn't match the + ; title screen version text. + !include "src\ProductInfo.inc" -!system "echo This may take a moment ..." ignore -!system "utils\upx Program\*.exe Program\*.dll" ignore +;-------------------------------- +;General -Name "${PRODUCT_NAME_VER}" -OutFile "${PRODUCT_NAME_VER}.exe" + !system "echo This may take a moment ..." ignore + !system "utils\upx Program\*.exe Program\*.dll" ignore -; Don't say "StepMania 3.9 Setup"; just say "StepMania 3.9". -Caption "${PRODUCT_NAME_VER}" -UninstallCaption "${PRODUCT_NAME_VER}" + Name "${PRODUCT_NAME_VER}" + OutFile "${PRODUCT_NAME_VER}.exe" -; Some default compiler settings (uncomment and change at will): -SetCompress auto ; (can be off or force) -SetDatablockOptimize on ; (can be off) -CRCCheck on ; (can be off) -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) -InstallDir "$PROGRAMFILES\${PRODUCT_ID}" -InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\${PRODUCT_NAME}\${PRODUCT_ID}" "" -; DirShow show ; (make this hide to not let the user change it) -DirText "${PRODUCT_NAME_VER}" -InstallColors /windows -InstProgressFlags smooth + Caption "${PRODUCT_NAME_VER}" + UninstallCaption "${PRODUCT_NAME_VER}" -PageEx directory - Caption " " -PageExEnd -Page instfiles + ; Some default compiler settings (uncomment and change at will): + SetCompress auto ; (can be off or force) + SetDatablockOptimize on ; (can be off) + CRCCheck on ; (can be off) + 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) + InstallDir "$PROGRAMFILES\${PRODUCT_ID}" + InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\${PRODUCT_NAME}\${PRODUCT_ID}" "" + ; DirShow show ; (make this hide to not let the user change it) + DirText "${PRODUCT_NAME_VER}" + InstallColors /windows + InstProgressFlags smooth +;-------------------------------- +;Interface Settings + + !define MUI_HEADERIMAGE + !define MUI_HEADERIMAGE_BITMAP "installer-header.bmp" + !define MUI_ABORTWARNING + !define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\win-install.ico" + !define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\win-uninstall.ico" + +;-------------------------------- +;Language Selection Dialog Settings + + ;Remember the installer language + !define MUI_LANGDLL_REGISTRY_ROOT "HKCU" + !define MUI_LANGDLL_REGISTRY_KEY "Software\${PRODUCT_NAME}\${PRODUCT_ID}" + !define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language" + +;-------------------------------- +;Pages + + ;!insertmacro MUI_PAGE_LICENSE "${NSISDIR}\Docs\Modern UI\License.txt" + ;!insertmacro MUI_PAGE_COMPONENTS + !insertmacro MUI_PAGE_DIRECTORY + !insertmacro MUI_PAGE_INSTFILES + + !insertmacro MUI_UNPAGE_CONFIRM + !insertmacro MUI_UNPAGE_INSTFILES + +;-------------------------------- +;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 "SimpChinese" + ;!insertmacro MUI_LANGUAGE "TradChinese" + ;!insertmacro MUI_LANGUAGE "Japanese" + ;!insertmacro MUI_LANGUAGE "Korean" + !insertmacro MUI_LANGUAGE "Italian" + ;!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" + +;-------------------------------- +;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 + +;-------------------------------- +;Installer Sections + +Section "Main Section" SecMain + + ; write out uninstaller + SetOutPath "$INSTDIR" + AllowSkipFiles off + SetOverwrite on + WriteUninstaller "$INSTDIR\uninstall.exe" + + ; add registry entries + WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\${PRODUCT_NAME}\${PRODUCT_ID}" "" "$INSTDIR" + WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_ID}" "DisplayName" "${PRODUCT_ID} (remove only)" + WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_ID}" "UninstallString" '"$INSTDIR\uninstall.exe"' + + WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Classes\Applications\smpackage.exe\shell\open\command" "" '"$INSTDIR\Program\smpackage.exe" "%1"' + WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Classes\smzipfile" "" "SMZIP package" + WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Classes\smzipfile\DefaultIcon" "" "$INSTDIR\Program\smpackage.exe,0" + WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Classes\smzipfile\shell\open\command" "" '"$INSTDIR\Program\smpackage.exe" "%1"' + WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Classes\.smzip" "" "smzipfile" + + ; Begin copying files + CreateDirectory "$INSTDIR\Announcers" + SetOutPath "$INSTDIR\Announcers" + File "Announcers\instructions.txt" + + CreateDirectory "$INSTDIR\BGAnimations" + SetOutPath "$INSTDIR\BGAnimations" + File "BGAnimations\instructions.txt" + + CreateDirectory "$INSTDIR\CDTitles" + SetOutPath "$INSTDIR\CDTitles" + File "CDTitles\Instructions.txt" + + RMDir /r "$INSTDIR\Characters\default" + CreateDirectory "$INSTDIR\Characters\default" + SetOutPath "$INSTDIR\Characters" + File /r "Characters\default" + # File "Characters\instructions.txt" + + CreateDirectory "$INSTDIR\Courses" + SetOutPath "$INSTDIR\Courses" + File "Courses\instructions.txt" + File /r "Courses\Samples" + + CreateDirectory "$INSTDIR\Packages" + File "Packages\Instructions.txt" + + RMDir /r "$INSTDIR\NoteSkins\common\default" + RMDir /r "$INSTDIR\NoteSkins\dance\MAX" + RMDir /r "$INSTDIR\NoteSkins\dance\default" + RMDir /r "$INSTDIR\NoteSkins\dance\flat" + RMDir /r "$INSTDIR\NoteSkins\dance\note" + RMDir /r "$INSTDIR\NoteSkins\dance\solo" + SetOutPath "$INSTDIR\NoteSkins" + File "NoteSkins\instructions.txt" + + SetOutPath "$INSTDIR\NoteSkins\common" + File /r "NoteSkins\common\default" + + SetOutPath "$INSTDIR\NoteSkins\dance" + File /r "NoteSkins\dance\default" + File /r "NoteSkins\dance\flat" + File /r "NoteSkins\dance\note" + File /r "NoteSkins\dance\solo" + + SetOutPath "$INSTDIR\NoteSkins\pump" + File /r "NoteSkins\pump\Classic" ; what the heck, they're tiny + File /r "NoteSkins\pump\default" + + ; temporarily disabled--noteskin needs updating + ;SetOutPath "$INSTDIR\NoteSkins\ez2" + ;File /r "NoteSkins\ez2\original" + + ;SetOutPath "$INSTDIR\NoteSkins\para" + ;File /r "NoteSkins\para\original" + + SetOutPath "$INSTDIR" + + CreateDirectory "$INSTDIR\BackgroundEffects" + File /r "BackgroundEffects" + + CreateDirectory "$INSTDIR\BackgroundTransitions" + File /r "BackgroundTransitions" + + CreateDirectory "$INSTDIR\RandomMovies" + SetOutPath "$INSTDIR\RandomMovies" + File "RandomMovies\instructions.txt" + + CreateDirectory "$INSTDIR\Songs" + SetOutPath "$INSTDIR\Songs" + File "Songs\Instructions.txt" + + RMDir /r "$INSTDIR\Themes\default" + CreateDirectory "$INSTDIR\Themes" + SetOutPath "$INSTDIR\Themes" + File "Themes\instructions.txt" + File /r "Themes\default" + + CreateDirectory "$INSTDIR\Docs" + SetOutPath "$INSTDIR\Docs" + File "Docs\ChangeLog.txt" + + CreateDirectory "$INSTDIR\Data" + SetOutPath "$INSTDIR\Data" + File "Data\Translations.xml" + File "Data\AI.ini" + File "Data\splash.png" + + SetOutPath "$INSTDIR\Program" + File "Program\${PRODUCT_NAME}.exe" + File "Program\${PRODUCT_NAME}.vdi" + File "Program\smpackage.exe" + File "Program\msvcr70.dll" + File "Program\msvcp70.dll" + File "Program\jpeg.dll" + File "Program\avcodec.dll" + File "Program\avformat.dll" + File "Program\resample.dll" + File "Program\dbghelp.dll" + File "Program\zlib1.dll" + + SetOverwrite off + SetOutPath "$INSTDIR\Save\MachineProfile" + File "Docs\Stats.xml" + SetOverwrite on + + SetOutPath "$INSTDIR" + File "Docs\Copying.txt" + File "README-FIRST.html" + File "NEWS" + + ; What to do here? Better to just delete an existing INI than to + ; drop the local one in ... -glenn + ; Agreed. - Chris + ; But we shouldn't delete, either, since that'll wipe peoples' prefs. + ; Better to address upgrade problems than to make people nuke INI's. + ; Maybe we should remove this for snapshot releases; that way we can + ; track down problems with INI upgrades (and then possibly restore it + ; for the release if we're not confident we've fixed most problems) -glenn + ; Added message box to ask user. -Chris + ; This is a silly check, because we force an uninstall and the installer + ; removes stepmania.ini. -Chris + + ;IfFileExists "$INSTDIR\${PRODUCT_NAME}.ini" stepmania_ini_present + ;IfFileExists "$INSTDIR\Data\${PRODUCT_NAME}.ini" stepmania_ini_present + ;IfFileExists "$INSTDIR\Save\${PRODUCT_NAME}.ini" stepmania_ini_present + ;Goto stepmania_ini_not_present + ;stepmania_ini_present: + ;MessageBox MB_YESNO|MB_ICONQUESTION "Your settings from the previous installation of ${PRODUCT_ID} were found.$\nWould you like to keep these settings?" IDNO stepmania_ini_not_present + ;Delete "$INSTDIR\Save\${PRODUCT_NAME}.ini" + ;stepmania_ini_not_present: + ;; Move ini into Save\ + ;Rename "$INSTDIR\Save\${PRODUCT_NAME}.ini" "$INSTDIR\${PRODUCT_NAME}.ini" + + ; Create Start Menu icons + SetShellVarContext current # 'all' doesn't work on Win9x + CreateDirectory "$SMPROGRAMS\${PRODUCT_ID}\" + CreateShortCut "$DESKTOP\${PRODUCT_NAME_VER}.lnk" "$INSTDIR\Program\${PRODUCT_NAME}.exe" + CreateShortCut "$SMPROGRAMS\${PRODUCT_ID}\${PRODUCT_NAME_VER}.lnk" "$INSTDIR\Program\${PRODUCT_NAME}.exe" + CreateShortCut "$SMPROGRAMS\${PRODUCT_ID}\Open ${PRODUCT_NAME} Program Folder.lnk" "$WINDIR\explorer.exe" "$INSTDIR\" + CreateShortCut "$SMPROGRAMS\${PRODUCT_ID}\View Machine Statistics.lnk" "$INSTDIR\Save\MachineProfile\Stats.xml" + CreateShortCut "$SMPROGRAMS\${PRODUCT_ID}\${PRODUCT_NAME} Tools and Package Exporter.lnk" "$INSTDIR\Program\smpackage.exe" + CreateShortCut "$SMPROGRAMS\${PRODUCT_ID}\README-FIRST.lnk" "$INSTDIR\README-FIRST.html" + CreateShortCut "$SMPROGRAMS\${PRODUCT_ID}\Uninstall ${PRODUCT_NAME_VER}.lnk" "$INSTDIR\uninstall.exe" + CreateShortCut "$SMPROGRAMS\${PRODUCT_ID}\Go To the ${PRODUCT_NAME} web site.lnk" "${PRODUCT_URL}" + + CreateShortCut "$INSTDIR\${PRODUCT_NAME}.lnk" "$INSTDIR\Program\${PRODUCT_NAME}.exe" + + # We want to delete a few old desktop icons, since they weren't being + # uninstalled correctly during alpha 2 and 3. They were installed in + # the 'all' context. Try to delete them in both contexts. + SetShellVarContext all + Delete "$DESKTOP\Play StepMania 3.9 alpha 2.lnk" + Delete "$DESKTOP\Play StepMania 3.9 alpha 3.lnk" + + SetShellVarContext current + Delete "$DESKTOP\Play StepMania 3.9 alpha 2.lnk" + Delete "$DESKTOP\Play StepMania 3.9 alpha 3.lnk" + + Exec '$WINDIR\explorer.exe "$SMPROGRAMS\${PRODUCT_ID}\"' + +SectionEnd + +;-------------------------------- +;Installer Functions -; -; .oninit is called before window is shown -; Function .onInit + !insertmacro MUI_LANGDLL_DISPLAY -; 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 + ; 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 "The previous version of ${PRODUCT_ID} must be uninstalled before continuing.$\nDo you wish to continue?" IDYES do_uninstall_nsis -Abort + prompt_uninstall_nsis: + MessageBox MB_YESNO|MB_ICONINFORMATION "The previous version of ${PRODUCT_ID} must be uninstalled before continuing.$\nDo you wish to continue?" 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 + 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 + ; $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 "Uninstallation failed. Install anyway?" IDYES old_nsis_not_installed -Abort + MessageBox MB_YESNO|MB_DEFBUTTON2|MB_ICONINFORMATION "Uninstallation failed. Install anyway?" IDYES old_nsis_not_installed + Abort -old_nsis_not_installed: + 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 + ; 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: -MessageBox MB_YESNO|MB_ICONINFORMATION "The latest version of DirectX (8.1 or higher) is strongly recommended.$\n Do you wish to visit Microsoft's site now?" IDNO ok -ExecShell "" "http://www.microsoft.com/directx/" -Abort + ; We can function without it (using WaveOut), so don't *require* this. + old_dx: + MessageBox MB_YESNO|MB_ICONINFORMATION "The latest version of DirectX (8.1 or higher) is strongly recommended.$\n Do you wish to visit Microsoft's site now?" IDNO ok + ExecShell "" "http://www.microsoft.com/directx/" + Abort -ok: + ok: FunctionEnd +;-------------------------------- +;Descriptions -; -; The default install section -; -Section "" + ;USE A LANGUAGE STRING IF YOU WANT YOUR DESCRIPTIONS TO BE LANGAUGE SPECIFIC -; write out uninstaller -SetOutPath "$INSTDIR" -AllowSkipFiles off -SetOverwrite on -WriteUninstaller "$INSTDIR\uninstall.exe" + ;Assign descriptions to sections + !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN + !insertmacro MUI_DESCRIPTION_TEXT ${SecMain} "A test section." + !insertmacro MUI_FUNCTION_DESCRIPTION_END -; add registry entries -WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\${PRODUCT_NAME}\${PRODUCT_ID}" "" "$INSTDIR" -WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_ID}" "DisplayName" "${PRODUCT_ID} (remove only)" -WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_ID}" "UninstallString" '"$INSTDIR\uninstall.exe"' + +;-------------------------------- +;Uninstaller Section -WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Classes\Applications\smpackage.exe\shell\open\command" "" '"$INSTDIR\Program\smpackage.exe" "%1"' -WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Classes\smzipfile" "" "SMZIP package" -WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Classes\smzipfile\DefaultIcon" "" "$INSTDIR\Program\smpackage.exe,0" -WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Classes\smzipfile\shell\open\command" "" '"$INSTDIR\Program\smpackage.exe" "%1"' -WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Classes\.smzip" "" "smzipfile" +Section "Uninstall" -; Begin copying files -CreateDirectory "$INSTDIR\Announcers" -SetOutPath "$INSTDIR\Announcers" -File "Announcers\instructions.txt" + ; add delete commands to delete whatever files/registry keys/etc you installed here. + Delete "$INSTDIR\uninstall.exe" + DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\${PRODUCT_NAME}\${PRODUCT_ID}" + DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_ID}" -CreateDirectory "$INSTDIR\BGAnimations" -SetOutPath "$INSTDIR\BGAnimations" -File "BGAnimations\instructions.txt" + DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Classes\Applications\smpackage.exe\shell\open\command" + DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Classes\smzipfile" + DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Classes\.smzip" -CreateDirectory "$INSTDIR\CDTitles" -SetOutPath "$INSTDIR\CDTitles" -File "CDTitles\Instructions.txt" + Delete "$INSTDIR\Announcers\instructions.txt" + RMDir "$INSTDIR\Announcers" -RMDir /r "$INSTDIR\Characters\default" -CreateDirectory "$INSTDIR\Characters\default" -SetOutPath "$INSTDIR\Characters" -File /r "Characters\default" -# File "Characters\instructions.txt" + Delete "$INSTDIR\BGAnimations\instructions.txt" + RMDir "$INSTDIR\BGAnimations" -CreateDirectory "$INSTDIR\Courses" -SetOutPath "$INSTDIR\Courses" -File "Courses\instructions.txt" -File /r "Courses\Samples" + Delete "$INSTDIR\Cache\instructions.txt" + RMDir "$INSTDIR\Cache" -CreateDirectory "$INSTDIR\Packages" -File "Packages\Instructions.txt" + Delete "$INSTDIR\CDTitles\Instructions.txt" + RMDir "$INSTDIR\CDTitles" -RMDir /r "$INSTDIR\NoteSkins\common\default" -RMDir /r "$INSTDIR\NoteSkins\dance\MAX" -RMDir /r "$INSTDIR\NoteSkins\dance\default" -RMDir /r "$INSTDIR\NoteSkins\dance\flat" -RMDir /r "$INSTDIR\NoteSkins\dance\note" -RMDir /r "$INSTDIR\NoteSkins\dance\solo" -SetOutPath "$INSTDIR\NoteSkins" -File "NoteSkins\instructions.txt" + RMDir /r "$INSTDIR\Characters\default" + RMDir "$INSTDIR\Characters" -SetOutPath "$INSTDIR\NoteSkins\common" -File /r "NoteSkins\common\default" + RMDir /r "$INSTDIR\Cache" -SetOutPath "$INSTDIR\NoteSkins\dance" -File /r "NoteSkins\dance\default" -File /r "NoteSkins\dance\flat" -File /r "NoteSkins\dance\note" -File /r "NoteSkins\dance\solo" + Delete "$INSTDIR\Packages\instructions.txt" + RMDir "$INSTDIR\Packages" -SetOutPath "$INSTDIR\NoteSkins\pump" -File /r "NoteSkins\pump\Classic" ; what the heck, they're tiny -File /r "NoteSkins\pump\default" + Delete "$INSTDIR\Courses\instructions.txt" + RMDir /r "$INSTDIR\Courses\Samples" + RMDir "$INSTDIR\Courses" -; temporarily disabled--noteskin needs updating -;SetOutPath "$INSTDIR\NoteSkins\ez2" -;File /r "NoteSkins\ez2\original" + Delete "$INSTDIR\NoteSkins\instructions.txt" + RMDir /r "$INSTDIR\NoteSkins\common\default" + RMDir "$INSTDIR\NoteSkins\common" + RMDir /r "$INSTDIR\NoteSkins\dance\default" + RMDir /r "$INSTDIR\NoteSkins\dance\flat" + RMDir /r "$INSTDIR\NoteSkins\dance\note" + RMDir /r "$INSTDIR\NoteSkins\dance\solo" + RMDir "$INSTDIR\NoteSkins\dance" + RMDir /r "$INSTDIR\NoteSkins\pump\classic" + RMDir /r "$INSTDIR\NoteSkins\pump\default" + RMDir "$INSTDIR\NoteSkins\pump" + RMDir /r "$INSTDIR\NoteSkins\ez2\original" + RMDir "$INSTDIR\NoteSkins\ez2" + RMDir /r "$INSTDIR\NoteSkins\para\original" + RMDir "$INSTDIR\NoteSkins\para" + RMDir "$INSTDIR\NoteSkins" -;SetOutPath "$INSTDIR\NoteSkins\para" -;File /r "NoteSkins\para\original" + Delete "$INSTDIR\RandomMovies\instructions.txt" + RMDir "$INSTDIR\RandomMovies" -SetOutPath "$INSTDIR" + Delete "$INSTDIR\Songs\Instructions.txt" + RMDir "$INSTDIR\Songs" ; will delete only if empty -CreateDirectory "$INSTDIR\BackgroundEffects" -File /r "BackgroundEffects" + Delete "$INSTDIR\Themes\instructions.txt" + RMDir /r "$INSTDIR\Themes\default" + RMDir "$INSTDIR\Themes" -CreateDirectory "$INSTDIR\BackgroundTransitions" -File /r "BackgroundTransitions" + Delete "$INSTDIR\Visualizations\instructions.txt" + RMDir "$INSTDIR\Visualizations" -CreateDirectory "$INSTDIR\RandomMovies" -SetOutPath "$INSTDIR\RandomMovies" -File "RandomMovies\instructions.txt" + Delete "$INSTDIR\Docs\ChangeLog.txt" + RMDir "$INSTDIR\Docs" -CreateDirectory "$INSTDIR\Songs" -SetOutPath "$INSTDIR\Songs" -File "Songs\Instructions.txt" + ; Don't delete high scores. + Delete "$INSTDIR\Data\Translations.xml" + Delete "$INSTDIR\Data\AI.ini" + Delete "$INSTDIR\Data\splash.png" + RMDir "$INSTDIR\Data" -RMDir /r "$INSTDIR\Themes\default" -CreateDirectory "$INSTDIR\Themes" -SetOutPath "$INSTDIR\Themes" -File "Themes\instructions.txt" -File /r "Themes\default" + Delete "$INSTDIR\Program\${PRODUCT_NAME}.exe" + Delete "$INSTDIR\Program\smpackage.exe" + Delete "$INSTDIR\Program\${PRODUCT_NAME}.vdi" + Delete "$INSTDIR\Program\msvcr70.dll" + Delete "$INSTDIR\Program\msvcp70.dll" + Delete "$INSTDIR\Program\jpeg.dll" + Delete "$INSTDIR\Program\avcodec.dll" + Delete "$INSTDIR\Program\avformat.dll" + Delete "$INSTDIR\Program\resample.dll" + Delete "$INSTDIR\Program\dbghelp.dll" + Delete "$INSTDIR\Program\zlib1.dll" + Delete "$INSTDIR\Program\lua.dll" + RMDir "$INSTDIR\Program" -CreateDirectory "$INSTDIR\Docs" -SetOutPath "$INSTDIR\Docs" -File "Docs\ChangeLog.txt" + ; It's harmless to delete this, as long as we leave Stats.xml alone; it'll be rewritten + ; by the program the next time it's run. + Delete "$INSTDIR\Save\MachineProfile\stats.html" + RMDir "$INSTDIR\Save\MachineProfile" -CreateDirectory "$INSTDIR\Data" -SetOutPath "$INSTDIR\Data" -File "Data\Translations.xml" -File "Data\AI.ini" -File "Data\splash.png" + Delete "$INSTDIR\COPYING.txt" + Delete "$INSTDIR\README-FIRST.html" + Delete "$INSTDIR\NEWS" + Delete "$INSTDIR\log.txt" + Delete "$INSTDIR\info.txt" + Delete "$INSTDIR\crashinfo.txt" + Delete "$INSTDIR\${PRODUCT_NAME}.lnk" -SetOutPath "$INSTDIR\Program" -File "Program\${PRODUCT_NAME}.exe" -File "Program\${PRODUCT_NAME}.vdi" -File "Program\smpackage.exe" -File "Program\msvcr70.dll" -File "Program\msvcp70.dll" -File "Program\jpeg.dll" -File "Program\avcodec.dll" -File "Program\avformat.dll" -File "Program\resample.dll" -File "Program\dbghelp.dll" -File "Program\zlib1.dll" + RMDir "$INSTDIR" ; will delete only if empty -SetOverwrite off -SetOutPath "$INSTDIR\Data\MachineProfile" -File "Docs\Stats.xml" -SetOverwrite on + SetShellVarContext current + Delete "$DESKTOP\Play StepMania CVS.lnk" + Delete "$DESKTOP\${PRODUCT_NAME_VER}.lnk" + ; I'm being paranoid here: + Delete "$SMPROGRAMS\${PRODUCT_ID}\*.*" + RMDir "$SMPROGRAMS\${PRODUCT_ID}" -SetOutPath "$INSTDIR" -File "Docs\Copying.txt" -File "README-FIRST.html" -File "NEWS" + Delete "$INSTDIR\Uninstall.exe" -; What to do here? Better to just delete an existing INI than to -; drop the local one in ... -glenn -; Agreed. - Chris -; But we shouldn't delete, either, since that'll wipe peoples' prefs. -; Better to address upgrade problems than to make people nuke INI's. -; Maybe we should remove this for snapshot releases; that way we can -; track down problems with INI upgrades (and then possibly restore it -; for the release if we're not confident we've fixed most problems) -glenn -; Added message box to ask user. -Chris -; This is a silly check, because we force an uninstall and the installer -; removes stepmania.ini. -Chris + DeleteRegKey /ifempty HKEY_LOCAL_MACHINE "SOFTWARE\${PRODUCT_NAME}\${PRODUCT_ID}" -;IfFileExists "$INSTDIR\${PRODUCT_NAME}.ini" stepmania_ini_present -;IfFileExists "$INSTDIR\Data\${PRODUCT_NAME}.ini" stepmania_ini_present -;Goto stepmania_ini_not_present -;stepmania_ini_present: -;MessageBox MB_YESNO|MB_ICONQUESTION "Your settings from the previous installation of ${PRODUCT_ID} were found.$\nWould you like to keep these settings?" IDNO stepmania_ini_not_present -;Delete "$INSTDIR\Data\${PRODUCT_NAME}.ini" -;stepmania_ini_not_present: -;; Move ini into Data\ -;Rename "$INSTDIR\Data\${PRODUCT_NAME}.ini" "$INSTDIR\${PRODUCT_NAME}.ini" +SectionEnd -; Create Start Menu icons -SetShellVarContext current # 'all' doesn't work on Win9x -CreateDirectory "$SMPROGRAMS\${PRODUCT_ID}\" -CreateShortCut "$DESKTOP\${PRODUCT_NAME_VER}.lnk" "$INSTDIR\Program\${PRODUCT_NAME}.exe" -CreateShortCut "$SMPROGRAMS\${PRODUCT_ID}\${PRODUCT_NAME_VER}.lnk" "$INSTDIR\Program\${PRODUCT_NAME}.exe" -CreateShortCut "$SMPROGRAMS\${PRODUCT_ID}\Open ${PRODUCT_NAME} Program Folder.lnk" "$WINDIR\explorer.exe" "$INSTDIR\" -CreateShortCut "$SMPROGRAMS\${PRODUCT_ID}\View Machine Statistics.lnk" "$INSTDIR\Data\MachineProfile\Stats.xml" -CreateShortCut "$SMPROGRAMS\${PRODUCT_ID}\${PRODUCT_NAME} Tools and Package Exporter.lnk" "$INSTDIR\Program\smpackage.exe" -CreateShortCut "$SMPROGRAMS\${PRODUCT_ID}\README-FIRST.lnk" "$INSTDIR\README-FIRST.html" -CreateShortCut "$SMPROGRAMS\${PRODUCT_ID}\Uninstall ${PRODUCT_NAME_VER}.lnk" "$INSTDIR\uninstall.exe" -CreateShortCut "$SMPROGRAMS\${PRODUCT_ID}\Go To ${PRODUCT_NAME} web site.lnk" "${PRODUCT_URL}" +;-------------------------------- +;Uninstaller Functions -CreateShortCut "$INSTDIR\${PRODUCT_NAME}.lnk" "$INSTDIR\Program\${PRODUCT_NAME}.exe" +Function un.onInit -# We want to delete a few old desktop icons, since they weren't being -# uninstalled correctly during alpha 2 and 3. They were installed in -# the 'all' context. Try to delete them in both contexts. -SetShellVarContext all -Delete "$DESKTOP\Play StepMania 3.9 alpha 2.lnk" -Delete "$DESKTOP\Play StepMania 3.9 alpha 3.lnk" - -SetShellVarContext current -Delete "$DESKTOP\Play StepMania 3.9 alpha 2.lnk" -Delete "$DESKTOP\Play StepMania 3.9 alpha 3.lnk" - -Exec '$WINDIR\explorer.exe "$SMPROGRAMS\${PRODUCT_ID}\"' - -SectionEnd ; end of default section - - -; -; begin uninstall settings/section -; -UninstallText "This will uninstall ${PRODUCT_ID} from your system.$\nAny add-on packs or songs you have installed will not be deleted." - -Section Uninstall - -; add delete commands to delete whatever files/registry keys/etc you installed here. -Delete "$INSTDIR\uninstall.exe" -DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\${PRODUCT_NAME}\${PRODUCT_ID}" -DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_ID}" - -DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Classes\Applications\smpackage.exe\shell\open\command" -DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Classes\smzipfile" -DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Classes\.smzip" - -Delete "$INSTDIR\Announcers\instructions.txt" -RMDir "$INSTDIR\Announcers" - -Delete "$INSTDIR\BGAnimations\instructions.txt" -RMDir "$INSTDIR\BGAnimations" - -Delete "$INSTDIR\Cache\instructions.txt" -RMDir "$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" -RMDir /r "$INSTDIR\Courses\Samples" -RMDir "$INSTDIR\Courses" - -Delete "$INSTDIR\NoteSkins\instructions.txt" -RMDir /r "$INSTDIR\NoteSkins\common\default" -RMDir "$INSTDIR\NoteSkins\common" -RMDir /r "$INSTDIR\NoteSkins\dance\default" -RMDir /r "$INSTDIR\NoteSkins\dance\flat" -RMDir /r "$INSTDIR\NoteSkins\dance\note" -RMDir /r "$INSTDIR\NoteSkins\dance\solo" -RMDir "$INSTDIR\NoteSkins\dance" -RMDir /r "$INSTDIR\NoteSkins\pump\classic" -RMDir /r "$INSTDIR\NoteSkins\pump\default" -RMDir "$INSTDIR\NoteSkins\pump" -RMDir /r "$INSTDIR\NoteSkins\ez2\original" -RMDir "$INSTDIR\NoteSkins\ez2" -RMDir /r "$INSTDIR\NoteSkins\para\original" -RMDir "$INSTDIR\NoteSkins\para" -RMDir "$INSTDIR\NoteSkins" - -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" -RMDir /r "$INSTDIR\Themes\default" -RMDir "$INSTDIR\Themes" - -Delete "$INSTDIR\Visualizations\instructions.txt" -RMDir "$INSTDIR\Visualizations" - -Delete "$INSTDIR\Docs\ChangeLog.txt" -RMDir "$INSTDIR\Docs" - -; Don't delete high scores. -Delete "$INSTDIR\Data\Translations.xml" -Delete "$INSTDIR\Data\AI.ini" -; Don't delete setting files so that they remain after an upgrade. -;Delete "$INSTDIR\Data\${PRODUCT_NAME}.ini" -;Delete "$INSTDIR\Data\Keymaps.ini" -;Delete "$INSTDIR\Data\GamePrefs.ini" -Delete "$INSTDIR\Data\splash.png" -RMDir "$INSTDIR\Data" - -Delete "$INSTDIR\Program\${PRODUCT_NAME}.exe" -Delete "$INSTDIR\Program\smpackage.exe" -Delete "$INSTDIR\Program\${PRODUCT_NAME}.vdi" -Delete "$INSTDIR\Program\msvcr70.dll" -Delete "$INSTDIR\Program\msvcp70.dll" -Delete "$INSTDIR\Program\jpeg.dll" -Delete "$INSTDIR\Program\avcodec.dll" -Delete "$INSTDIR\Program\avformat.dll" -Delete "$INSTDIR\Program\resample.dll" -Delete "$INSTDIR\Program\dbghelp.dll" -Delete "$INSTDIR\Program\zlib1.dll" -Delete "$INSTDIR\Program\lua.dll" -RMDir "$INSTDIR\Program" - -; It's harmless to delete this, as long as we leave Stats.xml alone; it'll be rewritten -; by the program the next time it's run. -Delete "$INSTDIR\Data\MachineProfile\stats.html" -RMDir "$INSTDIR\Data\MachineProfile" - -Delete "$INSTDIR\COPYING.txt" -Delete "$INSTDIR\README-FIRST.html" -Delete "$INSTDIR\NEWS" -Delete "$INSTDIR\log.txt" -Delete "$INSTDIR\info.txt" -Delete "$INSTDIR\crashinfo.txt" -Delete "$INSTDIR\${PRODUCT_NAME}.lnk" - -RMDir "$INSTDIR" ; will delete only if empty - -SetShellVarContext current -Delete "$DESKTOP\Play StepMania CVS.lnk" -Delete "$DESKTOP\${PRODUCT_NAME_VER}.lnk" -; I'm being paranoid here: -Delete "$SMPROGRAMS\${PRODUCT_ID}\*.*" -RMDir "$SMPROGRAMS\${PRODUCT_ID}" - -SectionEnd ; end of uninstall section - -; eof + !insertmacro MUI_UNGETLANGUAGE + +FunctionEnd \ No newline at end of file