# Auto-generated by EclipseNSIS Script Wizard # Dec 12, 2006 2:08:10 PM Name "Freespace 2 Retail" # Defines !define VERSION 1.4b !define COMPANY "Hunter & Turey" !define URL "" # MUI defines ;!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\FS2.ico" # Included files !include Sections.nsh !include MUI.nsh !include ZipDLL.nsh # Reserved Files # Variables # Installer pages !insertmacro MUI_PAGE_WELCOME !insertmacro MUI_PAGE_LICENSE LoA.txt !insertmacro MUI_PAGE_COMPONENTS !insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_PAGE_FINISH # Installer languages !insertmacro MUI_LANGUAGE English # Installer attributes OutFile FreeSpace2Setup.exe InstallDir C:\Games\FreeSpace2 CRCCheck on XPStyle on ShowInstDetails show VIProductVersion 1.0.0.0 VIAddVersionKey ProductName "Freespace 2 Retail" VIAddVersionKey ProductVersion "${VERSION}" VIAddVersionKey CompanyName "${COMPANY}" VIAddVersionKey FileVersion "" VIAddVersionKey FileDescription "" VIAddVersionKey LegalCopyright "" # Installer sections Section "Core Files" SEC0000 AddSize 266698 SetOutPath $INSTDIR SetOverwrite on NSISdl::download http://www.fszmirror.com/files/core.zip $INSTDIR\core.zip !insertmacro ZIPDLL_EXTRACT $INSTDIR\core.zip $INSTDIR Delete /REBOOTOK $INSTDIR\core.zip SetOutPath $INSTDIR\Installer ClearErrors Rename $INSTDIR\Installer\installedversions.txt $INSTDIR\Installer\installedversions2.txt FileOpen $0 $INSTDIR\Installer\installedversions2.txt r FileOpen $1 $INSTDIR\Installer\installedversions.txt w loop1: FileRead $0 $2 FileWrite $1 $2 IfErrors doneloop1 Goto loop1 doneloop1: FileWrite $1 "$\r$\nNAME$\r$\nFreeSpace2 Retail Core$\r$\nVERSION$\r$\nVersion 1" FileClose $1 FileClose $0 Delete /REBOOTOK $INSTDIR\Installer\installedversions2.txt SectionEnd Section "High Quality Graphics" SEC0001 AddSize 259025 SetOutPath $INSTDIR SetOverwrite on NSISdl::download http://www.fszmirror.com/files/higraph.zip $INSTDIR\higraph.zip !insertmacro ZIPDLL_EXTRACT $INSTDIR\higraph.zip $INSTDIR Delete /REBOOTOK $INSTDIR\higraph.zip SectionEnd SectionGroup "Sound Packs" SOUND Section "Voice Pack" SEC0002 AddSize 169107 SetOutPath $INSTDIR SetOverwrite on NSISdl::download http://www.fszmirror.com/files/voice.zip $INSTDIR\voice.zip !insertmacro ZIPDLL_EXTRACT $INSTDIR\voice.zip $INSTDIR Delete /REBOOTOK $INSTDIR\voice.zip SetOutPath $INSTDIR\Installer ClearErrors Rename $INSTDIR\Installer\installedversions.txt $INSTDIR\Installer\installedversions2.txt FileOpen $0 $INSTDIR\Installer\installedversions2.txt r FileOpen $1 $INSTDIR\Installer\installedversions.txt w loop1: FileRead $0 $2 FileWrite $1 $2 IfErrors doneloop1 Goto loop1 doneloop1: FileWrite $1 "$\r$\nNAME$\r$\nFreeSpace2 Voice$\r$\nVERSION$\r$\nVersion 1" FileClose $1 FileClose $0 Delete /REBOOTOK $INSTDIR\Installer\installedversions2.txt SectionEnd Section "Music Pack" SEC0003 AddSize 116072 SetOutPath $INSTDIR SetOverwrite on NSISdl::download http://www.fszmirror.com/files/music.zip $INSTDIR\music.zip !insertmacro ZIPDLL_EXTRACT $INSTDIR\music.zip $INSTDIR Delete /REBOOTOK $INSTDIR\music.zip SetOutPath $INSTDIR\Installer ClearErrors Rename $INSTDIR\Installer\installedversions.txt $INSTDIR\Installer\installedversions2.txt FileOpen $0 $INSTDIR\Installer\installedversions2.txt r FileOpen $1 $INSTDIR\Installer\installedversions.txt w loop1: FileRead $0 $2 FileWrite $1 $2 IfErrors doneloop1 Goto loop1 doneloop1: FileWrite $1 "$\r$\nNAME$\r$\nFreeSpace2 Music$\r$\nVERSION$\r$\nVersion 1" FileClose $1 FileClose $0 Delete /REBOOTOK $INSTDIR\Installer\installedversions2.txt SectionEnd SectionGroupEnd SectionGroup "Animation Packs" ANIS Section "Tech Room Animations" SEC0004 AddSize 120240 SetOutPath $INSTDIR SetOverwrite on NSISdl::download http://www.fszmirror.com/files/techanis.zip $INSTDIR\techanis.zip !insertmacro ZIPDLL_EXTRACT $INSTDIR\techanis.zip $INSTDIR Delete /REBOOTOK $INSTDIR\techanis.zip SetOutPath $INSTDIR\Installer ClearErrors Rename $INSTDIR\Installer\installedversions.txt $INSTDIR\Installer\installedversions2.txt FileOpen $0 $INSTDIR\Installer\installedversions2.txt r FileOpen $1 $INSTDIR\Installer\installedversions.txt w loop1: FileRead $0 $2 FileWrite $1 $2 IfErrors doneloop1 Goto loop1 doneloop1: FileWrite $1 "$\r$\nNAME$\r$\nFreeSpace2 Tech Animations$\r$\nVERSION$\r$\nVersion 1" FileClose $1 FileClose $0 Delete /REBOOTOK $INSTDIR\Installer\installedversions2.txt SectionEnd Section "Act 1 Animations" SEC0005 AddSize 191296 SetOutPath $INSTDIR SetOverwrite on NSISdl::download http://www.fszmirror.com/files/act1anis.zip $INSTDIR\act1anis.zip !insertmacro ZIPDLL_EXTRACT $INSTDIR\act1anis.zip $INSTDIR Delete /REBOOTOK $INSTDIR\act1anis.zip SetOutPath $INSTDIR\Installer ClearErrors Rename $INSTDIR\Installer\installedversions.txt $INSTDIR\Installer\installedversions2.txt FileOpen $0 $INSTDIR\Installer\installedversions2.txt r FileOpen $1 $INSTDIR\Installer\installedversions.txt w loop1: FileRead $0 $2 FileWrite $1 $2 IfErrors doneloop1 Goto loop1 doneloop1: FileWrite $1 "$\r$\nNAME$\r$\nFreeSpace2 Command Briefing Animations$\r$\nVERSION$\r$\nVersion 1" FileClose $1 FileClose $0 Delete /REBOOTOK $INSTDIR\Installer\installedversions2.txt SectionEnd Section "Act 2 Animations" SEC0006 AddSize 71072 SetOutPath $INSTDIR SetOverwrite on NSISdl::download http://www.fszmirror.com/files/act2anis.zip $INSTDIR\act2anis.zip !insertmacro ZIPDLL_EXTRACT $INSTDIR\act2anis.zip $INSTDIR Delete /REBOOTOK $INSTDIR\act2anis.zip SectionEnd Section "Act 3 Animations" SEC0007 AddSize 49313 SetOutPath $INSTDIR SetOverwrite on NSISdl::download http://www.fszmirror.com/files/act3anis.zip $INSTDIR\act3anis.zip !insertmacro ZIPDLL_EXTRACT $INSTDIR\act3anis.zip $INSTDIR Delete /REBOOTOK $INSTDIR\act3anis.zip SectionEnd SectionGroupEnd Section "FreeSpace Open" SEC0008 SetOutPath $INSTDIR SetOverwrite on NSISdl::download http://www.fsoinstaller.com/files/installer/FreeSpaceOpenInstaller.zip $INSTDIR\FreeSpaceOpenInstaller.zip !insertmacro ZIPDLL_EXTRACT $INSTDIR\FreeSpaceOpenInstaller.zip $INSTDIR Delete /REBOOTOK $INSTDIR\FreeSpaceOpenInstaller.zip Exec $INSTDIR\Installer\FreeSpaceOpenInstaller.exe SectionEnd # Installer functions Function .onInit InitPluginsDir Push $R1 ;Puts up the pretty picture at the beginning. File /oname=$PLUGINSDIR\spltmp.bmp orion.bmp advsplash::show 1000 1000 1000 -1 $PLUGINSDIR\spltmp Pop $R1 Pop $R1 SetOutPath $INSTDIR\Installer NSISdl::download http://www.fsoinstaller.com/files/freespace/installedversions.txt $INSTDIR\Installer\installedversions.txt FunctionEnd