1; icebreaker.nsi 2; 3; This script is used by the Nullsoft (SuperPiMP|Scriptable) Install System 4; (which works under Wine, but is open source so theoretically could be 5; ported to run on Linux natively -- has anyone done this already?) to make 6; the Win32 installer for IceBreaker. 7 8Name "IceBreaker" 9OutFile "icebreaker-%ICEBREAKERVERSION.exe" 10 11BrandingText "Install System by Nullsoft" 12 13Icon "../icebreaker_16c.ico" 14WindowIcon on 15BGGradient off 16CRCCheck on 17 18InstallDir $PROGRAMFILES\IceBreaker 19InstallDirRegKey HKLM "Software\IceBreaker" "InstallDir" 20 21LicenseText "IceBreaker is Free Software; you can redistribute or modify it under the terms of the GNU GPL. Copyright � 2000-2002 Matthew Miller <mattdm@mattdm.org>, et al." "Continue" 22LicenseData "LICENSE.txt" 23 24DirShow show 25DirText "Visit the IceBreaker web site at <http://www.mattdm.org/icebreaker/> to get more information or to check for the latest version. IceBreaker development is ongoing, and we welcome feedback and other contributions." "Where should IceBreaker be installed?" 26 27InstallColors C0C0C0 404040 28InstProgressFlags smooth colored 29ShowInstDetails show 30 31SetOverwrite on 32SetCompress auto 33SetDatablockOptimize on 34SetDateSave on 35AutoCloseWindow true 36 37Section "IceBreaker" 38 SetOutPath $INSTDIR 39 File icebreaker.exe 40 File *.dll 41 File lockhelper.lck 42 SetFileAttributes $INSTDIR\lockhelper.lck FILE_ATTRIBUTE_HIDDEN 43 DetailPrint "Linux rules." 44 File *.wav 45 File *.bmp 46 File *.ibt 47 File *.txt 48 File *.tgz 49 WriteRegStr HKLM "Software\IceBreaker" "InstallDir" "$INSTDIR" 50 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\IceBreaker" "DisplayName" "IceBreaker" 51 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\IceBreaker" "UninstallString" '"$INSTDIR\uninstall.exe"' 52 WriteUninstaller "uninstall.exe" 53SectionEnd 54 55Section "Start Menu Shortcuts" 56 CreateDirectory "$SMPROGRAMS\IceBreaker" 57 CreateShortCut "$SMPROGRAMS\IceBreaker\IceBreaker.lnk" "$INSTDIR\icebreaker.exe" "" "$INSTDIR\icebreaker.exe" 0 58 CreateShortCut "$SMPROGRAMS\IceBreaker\ReadMe.lnk" "$INSTDIR\README.txt" "" "" 0 59 CreateShortCut "$SMPROGRAMS\IceBreaker\IceBreaker - fullscreen.lnk" "$INSTDIR\icebreaker.exe" "-f" "$INSTDIR\icebreaker.exe" 0 60 CreateShortCut "$SMPROGRAMS\IceBreaker\IceBreaker - random themes.lnk" "$INSTDIR\icebreaker.exe" "-trandom" "$INSTDIR\icebreaker.exe" 0 61 CreateShortCut "$SMPROGRAMS\IceBreaker\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 62 DetailPrint "Installation Finished." 63SectionEnd 64 65UninstallText "This will delete IceBreaker from your computer. Hit Uninstall to continue, sadly." 66 67Section "Uninstall" 68 SetAutoClose false 69 SetDetailsView show 70 71 Delete "$SMPROGRAMS\IceBreaker\*.*" 72 RMDir "$SMPROGRAMS\IceBreaker" 73 74 DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\IceBreaker" 75 DeleteRegKey HKLM "Software\IceBreaker" 76 77 Delete $INSTDIR\lockhelper.lck 78 Delete $INSTDIR\icebreaker.exe 79 Delete $INSTDIR\*.dll 80 Delete $INSTDIR\*.wav 81 Delete $INSTDIR\*.bmp 82 Delete $INSTDIR\*.ibt 83 Delete $INSTDIR\*.txt 84 Delete $INSTDIR\*.tgz 85 Delete $INSTDIR\uninstall.exe 86 87 IfFileExists $INSTDIR\icebreaker.cfg HaveCSFiles 88 IfFileExists $INSTDIR\icebreaker.scores HaveCSFiles EndDelCSFiles 89 HaveCSFiles: 90 MessageBox MB_YESNO "Remove high score / configuration files?" IDNO NoDelCSFiles 91 Delete $INSTDIR\icebreaker.cfg 92 Delete $INSTDIR\icebreaker.scores 93 Goto EndDelCSFiles 94 NoDelCSFiles: 95 IfFileExists $INSTDIR\icebreaker.cfg NotRemCMesg CheckRemSMesg 96 NotRemCMesg: 97 DetailPrint "Not removing file $INSTDIR\icebreaker.cfg" 98 CheckRemSMesg: 99 IfFileExists $INSTDIR\icebreaker.scores NotRemSMesg EndDelCSFiles 100 NotRemSMesg: 101 DetailPrint "Not removing file $INSTDIR\icebreaker.scores" 102 EndDelCSFiles: 103 104 IfFileExists $INSTDIR\icebreaker.* NoRMDir 105 RMDir "$INSTDIR" 106 Goto EndRMDir 107 NoRMDir: 108 DetailPrint "Not removing directory $INSTDIR" 109 EndRMDir: 110SectionEnd 111 112Function .onInstSuccess 113 MessageBox MB_YESNO "Installation Successful. Run IceBreaker now?" IDNO NoReadme 114 Exec $INSTDIR\icebreaker.exe 115 NoReadme: 116FunctionEnd 117 118 119; eof 120