From 2cbc4f0dc50e07f1e3231d41d0dfe4f4c20678c8 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Mon, 26 Aug 2002 19:30:58 +0000 Subject: [PATCH] added Start Menu icons, uninstall force, and more to installer --- stepmania/Announcers/instructions.txt | 1 + stepmania/BGAnimations/instructions.txt | 1 + stepmania/Courses/instructions.txt | 1 + stepmania/NEWS | 1 + stepmania/NoteSkins/instructions.txt | 1 + stepmania/RandomMovies/instructions.txt | 1 + stepmania/Themes/instructions.txt | 1 + stepmania/src/ThemeManager.cpp | 4 + stepmania/src/smpackage/manage.bmp | Bin 31578 -> 31578 bytes stepmania/src/smpackage/resource.h | 1 - stepmania/src/smpackage/smpackage.rc | 10 +- stepmania/src/smpackage/smpackageDlg.cpp | 22 +-- stepmania/stepmania.nsi | 174 ++++++++++++++++------- 13 files changed, 153 insertions(+), 65 deletions(-) create mode 100644 stepmania/Announcers/instructions.txt create mode 100644 stepmania/BGAnimations/instructions.txt create mode 100644 stepmania/Courses/instructions.txt create mode 100644 stepmania/NoteSkins/instructions.txt create mode 100644 stepmania/RandomMovies/instructions.txt create mode 100644 stepmania/Themes/instructions.txt diff --git a/stepmania/Announcers/instructions.txt b/stepmania/Announcers/instructions.txt new file mode 100644 index 0000000000..7fe08cf32d --- /dev/null +++ b/stepmania/Announcers/instructions.txt @@ -0,0 +1 @@ +Place announcer folders in this directory. See the readme for more details. diff --git a/stepmania/BGAnimations/instructions.txt b/stepmania/BGAnimations/instructions.txt new file mode 100644 index 0000000000..37b5689739 --- /dev/null +++ b/stepmania/BGAnimations/instructions.txt @@ -0,0 +1 @@ +Place BGAnimation folders in here. See the readme for details. diff --git a/stepmania/Courses/instructions.txt b/stepmania/Courses/instructions.txt new file mode 100644 index 0000000000..653e8d4f53 --- /dev/null +++ b/stepmania/Courses/instructions.txt @@ -0,0 +1 @@ +Place CRS and course banner files here. See the readme for details. diff --git a/stepmania/NEWS b/stepmania/NEWS index 039452bd99..b3fa8b6020 100644 --- a/stepmania/NEWS +++ b/stepmania/NEWS @@ -1,4 +1,5 @@ ------------------------CVS after 3.00 beta 6---------------- +CHANGE: New Nullsoft NSIS installer. CHANGE: NG no longer breaks combo. NEW FEATURE: Hidden easter egg. You have to be "perfect" to find it. And cheaters never prosper! diff --git a/stepmania/NoteSkins/instructions.txt b/stepmania/NoteSkins/instructions.txt new file mode 100644 index 0000000000..11ca8adaea --- /dev/null +++ b/stepmania/NoteSkins/instructions.txt @@ -0,0 +1 @@ +Place Note Skin folders in the appropriate game folder. See the readme for details. \ No newline at end of file diff --git a/stepmania/RandomMovies/instructions.txt b/stepmania/RandomMovies/instructions.txt new file mode 100644 index 0000000000..75398ee91f --- /dev/null +++ b/stepmania/RandomMovies/instructions.txt @@ -0,0 +1 @@ +Movie files in this directory will be cycled through randomly if the Background Mode is set to "Random Movies" \ No newline at end of file diff --git a/stepmania/Themes/instructions.txt b/stepmania/Themes/instructions.txt new file mode 100644 index 0000000000..9a50545b82 --- /dev/null +++ b/stepmania/Themes/instructions.txt @@ -0,0 +1 @@ +Place Theme folders here. More more information on the theme format, see the readme file. \ No newline at end of file diff --git a/stepmania/src/ThemeManager.cpp b/stepmania/src/ThemeManager.cpp index 51506a3cce..884bfa1fdb 100644 --- a/stepmania/src/ThemeManager.cpp +++ b/stepmania/src/ThemeManager.cpp @@ -390,7 +390,9 @@ CString ThemeManager::GetPathTo( ThemeElement te, CString sThemeName ) CString ThemeManager::GetPathTo( CString sAssetCategory, CString sFileName ) { +#ifdef _DEBUG try_element_again: +#endif sAssetCategory.MakeLower(); sFileName.MakeLower(); @@ -510,7 +512,9 @@ CString ThemeManager::GetMetricsPathFromName( CString sThemeName ) CString ThemeManager::GetMetric( CString sScreenName, CString sValueName ) { +#ifdef _DEBUG try_metric_again: +#endif CString sCurMetricPath = GetMetricsPathFromName(m_sCurThemeName); CString sDefaultMetricPath = GetMetricsPathFromName(BASE_THEME_NAME); diff --git a/stepmania/src/smpackage/manage.bmp b/stepmania/src/smpackage/manage.bmp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={soedyb4Z@{bTe90?pJ*-%sCQ3(l9-~R5lopow6xQteWCbrl$(f&pD91t(5fs7kS5N^WBplIcL%5588!-{kxuFLwh>8xF z0xGB}KnNEpC@xVXiYS1fL;*w-9STKckFAye$oJlOm*qG{^7zfn`@Z+hd(VEBif5^~ zdwYDDE2Vt%MoQNWe;xlveCEp6ul{`W*ZlnajVJe?zWmn>@2q?!gd1L79ntGzyXiRY zy00h07b_kMeRN_2HqTBNIy=*OF@{(7Dd z9}5a84XkgStd!FF?)%{os3x1f%y6=*S+ef|Cz6ubJ{Nk|^r4>e!J%mQcmvGCz^U?7 zgek4Jay76D!th8LI9&EsX7{TYcpe4ebL+-)Tp#!4aNK|DV3oT~e;vS#q zP2DC`yN4N31VYB768djp_d=o)o?dy z(Q5aogb^lwOirVeCDjUgd`v#?QTMcsB5Q4!bmgBtLy&ZY^5)wKhLPER$I+tOEI392T{q##+>39`!hn_inMY>^MlQ zuO*=+qdI)~j}mx+O{-ow3aMOcE;Y(sqVSX*E^=VNOI58Bq~ zz91Ciqd`|NzOufSB(qIYB@_54(Pcxv#R7D1?hB-KLH~XHryht4B&>e8Me;mWnYA)6 zs<--TVC5>Q_v+smmiUn*m<9)oM}4w99-!bs!?Vo~-makensis.exe /v3 /cd "m:\Dev Projects\CVS\stepmania\stepmania.nsi" ; ; NOTE: this .NSI script is designed for NSIS v1.8+ Name "StepMania" -OutFile "stepmania-install.exe" +OutFile "stepmania300beta6.exe" +!define PRODUCT_NAME "StepMania 3.0 beta 6" + ; 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 false ; (can be true for the window go away automatically at end) +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 off ; (can be on to have files restored to their orginal date) - InstallDir "$PROGRAMFILES\StepMania" InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\StepMania\StepMania" "" DirShow show ; (make this hide to not let the user change it) DirText "Select the directory to install StepMania in:" -; Since there's only 1 page, let's check for DX when the user selects NEXT - +; +; .oninit is called before window is shown +; Function .onInit +; force uninstall of previous version using Vise +IfFileExists "$INSTDIR\uninstal.log" prompt_uninstall_vise old_vise_not_installed +prompt_uninstall_vise: +MessageBox MB_YESNO|MB_ICONINFORMATION "The previous version of StepMania must be uninstalled before continuing.$\nDo you wish to continue?" IDYES do_uninstall_vise +Abort +do_uninstall_vise: +Exec '$WINDIR\unvise32.exe $INSTDIR\uninstal.log' ; don't use quotes here, or unvise32 will fail +old_vise_not_installed: + +; force uninstall of previous version using NSIS +IfFileExists "$INSTDIR\uninst.exe" prompt_uninstall_nsis old_nsis_not_installed +prompt_uninstall_nsis: +MessageBox MB_YESNO|MB_ICONINFORMATION "The previous version of StepMania must be uninstalled before continuing.$\nDo you wish to continue?" IDYES do_uninstall_nsis +Abort +do_uninstall_nsis: +Exec "$INSTDIR\uninst.exe" +old_nsis_not_installed: + ; Check for DirextX 8.1 (to be moved to the right section later) ReadRegStr $0 HKEY_LOCAL_MACHINE "Software\Microsoft\DirectX" "Version" StrCpy $1 $0 2 2 ; 8.1 is "4.08.01.0810" @@ -47,111 +67,169 @@ ok: FunctionEnd -Section "" ; (default section) +; +; The default install section +; +Section "" + +; write out uninstaller SetOutPath "$INSTDIR" -; add files / whatever that need to be installed here. +SetOverwrite on +WriteUninstaller "$INSTDIR\uninst.exe" + +; add registry entries WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\StepMania\StepMania" "" "$INSTDIR" WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\StepMania" "DisplayName" "StepMania (remove only)" WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\StepMania" "UninstallString" '"$INSTDIR\uninst.exe"' -SetOverwrite on -; write out uninstaller -WriteUninstaller "$INSTDIR\uninst.exe" -; Begin SM Install +WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Classes\Applications\smpackage.exe\shell\open\command" "" '"$INSTDIR\smpackage.exe" "%1"' +WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Classes\smzipfile" "" "StepMania package" +WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Classes\smzipfile\DefaultIcon" "" "$INSTDIR\smpackage.exe,0" +WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Classes\smzipfile\shell\open\command" "" '"$INSTDIR\smpackage.exe" "%1"' +WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Classes\.smzip" "" "smzipfile" + +; Begin copying files SetOverwrite ifnewer -; Announcer: CreateDirectory "$INSTDIR\Announcers" SetOutPath "$INSTDIR\Announcers" -File /r "Announcers\default" +File "Announcers\instructions.txt" CreateDirectory "$INSTDIR\BGAnimations" -SetOutPath "$INSTDIR" -File /r "BGAnimations" +SetOutPath "$INSTDIR\BGAnimations" +File "BGAnimations\instructions.txt" CreateDirectory "$INSTDIR\Cache" SetOutPath "$INSTDIR\Cache" -File "Cache\README.TXT" +File "Cache\instructions.txt" + +CreateDirectory "$INSTDIR\CDTitles" +SetOutPath "$INSTDIR\CDTitles" +File "CDTitles\instructions.txt" CreateDirectory "$INSTDIR\Courses" SetOutPath "$INSTDIR\Courses" -File "Courses\README.TXT" +File "Courses\instructions.txt" -CreateDirectory "$INSTDIR\Skins" -SetOutPath "$INSTDIR\Skins" -File /r "Skins\dance" -File /r "Skins\ez2" -File /r "Skins\pump" +CreateDirectory "$INSTDIR\Music" +SetOutPath "$INSTDIR\Music" +File "Music\instructions.txt" + +CreateDirectory "$INSTDIR\NoteSkins\dance\MAX" +SetOutPath "$INSTDIR\NoteSkins" +File "NoteSkins\instructions.txt" +SetOutPath "$INSTDIR\NoteSkins\dance" +File /r "NoteSkins\dance\MAX" + +CreateDirectory "$INSTDIR\RandomMovies" +SetOutPath "$INSTDIR\RandomMovies" +File "RandomMovies\instructions.txt" CreateDirectory "$INSTDIR\Songs" SetOutPath "$INSTDIR\Songs" -File "Songs\Instructions.txt" +File "Songs\instructions.txt" CreateDirectory "$INSTDIR\Themes" SetOutPath "$INSTDIR\Themes" +File "Themes\instructions.txt" File /r "Themes\default" -File /r "Themes\dance" -File /r "Themes\ez2" -File /r "Themes\pump" CreateDirectory "$INSTDIR\Visualizations" SetOutPath "$INSTDIR\Visualizations" -File "Visualizations\Visualization movie files go here" +File "Visualizations\instructions.txt" SetOutPath "$INSTDIR" File "bass.dll" File "COPYING.txt" File "README-FIRST.TXT" -File "StepMania.exe" +File "stepmania.exe" +File "stepmania.ini" +File "smpackage.exe" + +; Create Start Menu icons +SetShellVarContext all ; install in "All Users" if NT +CreateDirectory "$SMPROGRAMS\StepMania\" +CreateShortCut "$DESKTOP\Play ${PRODUCT_NAME}.lnk" "$INSTDIR\stepmania.exe" +CreateShortCut "$SMPROGRAMS\StepMania\${PRODUCT_NAME}.lnk" "$INSTDIR\stepmania.exe" +CreateShortCut "$SMPROGRAMS\StepMania\Open Songs Folder.lnk" "$WINDIR\explorer.exe" "$INSTDIR\Songs\" +CreateShortCut "$SMPROGRAMS\StepMania\Package Exporter.lnk" "$INSTDIR\smpackage.exe" +CreateShortCut "$SMPROGRAMS\StepMania\README.lnk" "$INSTDIR\README-FIRST.txt" +CreateShortCut "$SMPROGRAMS\StepMania\Uninstall ${PRODUCT_NAME}.lnk" "$INSTDIR\uninst.exe" +CreateShortCut "$SMPROGRAMS\StepMania\Go To StepMania web site.lnk" "http://www.stepmania.com" + +Exec '$WINDIR\explorer.exe "$SMPROGRAMS\StepMania\"' SectionEnd ; end of default section +; ; begin uninstall settings/section -UninstallText "This will uninstall StepMania from your system.$\n BE SURE TO BACKUP YOUR SONGS BEFORE DOING THIS." +; +UninstallText "This will uninstall StepMania 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\uninst.exe" DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\StepMania\StepMania" DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\StepMania" -; Nicely try to clean out everything... +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" -RMDir /r "$INSTDIR\Announcers\default" -RMDir "$INSTDIR\Announcers" ; Only remove it if it's empty now +Delete "$INSTDIR\Announcers\instructions.txt" +RMDir "$INSTDIR\Announcers" -RMDir /r "$INSTDIR\BGAnimations" +Delete "$INSTDIR\BGAnimations\instructions.txt" +RMDir "$INSTDIR\BGAnimations" -Delete "$INSTDIR\Cache\README.TXT" +Delete "$INSTDIR\Cache\instructions.txt" RMDir "$INSTDIR\Cache" -Delete "$INSTDIR\Courses\README.TXT" +Delete "$INSTDIR\CDTitles\instructions.txt" +RMDir "$INSTDIR\CDTitles" + +Delete "$INSTDIR\Cache\instructions.txt" +RMDir "$INSTDIR\Cache" + +Delete "$INSTDIR\Courses\instructions.txt" RMDir "$INSTDIR\Courses" -RMDir /r "$INSTDIR\Skins\dance" -RMDir /r "$INSTDIR\Skins\ez2" -RMDir /r "$INSTDIR\Skins\pump" -RMDir "$INSTDIR\Skins" +Delete "$INSTDIR\Music\instructions.txt" +RMDir "$INSTDIR\Music" -Delete "$INSTDIR\Songs\Instructions.txt" -RMDir "$INSTDIR\Songs" ; It'll only remove it if it's empty ( I hope ) +Delete "$INSTDIR\NoteSkins\instructions.txt" +RMDir /r "$INSTDIR\NoteSkins\dance" +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 /r "$INSTDIR\Themes\dance" -RMDir /r "$INSTDIR\Themes\ez2" -RMDir /r "$INSTDIR\Themes\pump" RMDir "$INSTDIR\Themes" -Delete "$INSTDIR\Visualizations\Visualization movie files go here" +Delete "$INSTDIR\Visualizations\instructions.txt" RMDir "$INSTDIR\Visualizations" Delete "$INSTDIR\bass.dll" Delete "$INSTDIR\COPYING.txt" Delete "$INSTDIR\README-FIRST.TXT" -Delete "$INSTDIR\StepMania.exe" +Delete "$INSTDIR\stepmania.exe" +Delete "$INSTDIR\stepmania.ini" +Delete "$INSTDIR\smpackage.exe" + +RMDir "$INSTDIR" ; will delete only if empty + +SetShellVarContext all ; delete from "All Users" if NT +Delete "$DESKTOP\Play {PRODUCT_NAME}.lnk" +Delete "$SMPROGRAMS\StepMania\*.*" +RMDir "$SMPROGRAMS\StepMania" -RMDir "$INSTDIR" SectionEnd ; end of uninstall section ; eof