/* Copyright 2005-2013 Nicolai Sandow (kolya@schwarzsilber.de) with additional coding for Thief Gold by Daniel Grayshon (saleck@saleck.net) Distributed under the terms of the GNU General Public License. The TGTool is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. The TGTool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with the TGTool. If not, see . This license refers to the installer software known as TGTool. Note that elements installed by the TGTool may be copyright of their respective authors or publishers and their licenses. */ ;=== Notes /* - Escape "quotes" with preceding $\ and a dollar-sign with a preceding dollar sign ($$) ;=== Changelog 1.0.5.2 - 20th July 2016 ----------------------- * Fixed spelling mistakes, * Updated Installer to use NSIS 3.0 RC2. 1.0.5.0 - 5th May 2016 ----------------------- * Updated Installer to use NSIS 3.0 RC1, * Updated NewDark to v1.24, * Updated DromEd to v1.24. 1.0.4.8 - 4th March 2016 ----------------------- * Compatibility improvements. 1.0.4.6 - 22nd September 2015 ----------------------- * Happy 21st birthday System Shock! Enjoy your re-release! * Updated NewDark to v1.23, * Updated DromEd Editor, * Updated the TTLG link to point to TTLG.com over TTLG.org 1.0.4.4 - 22nd September 2014 ----------------------- * Updated NewDark to v1.22, * Updated DromEd Editor, * Included source files for "contrib" into the packages, * Added Shortcuts to the FM Manager in the Start Menu, * Added nicer icons to the Start Menu icons. 1.0.4.2 - 6th March 2014 ----------------------- * Fixed some spelling mistakes. 1.0.4.0 - 6th June 2013 ----------------------- * Massive reorganizing of code to make it easier to navigate and edit in NotePad++, * Added release_notes.txt and troubleshooting.txt to newdark_tg.7z, * Added a Custom Logo and a Changelog page to the installer, * Minor Spelling Mistakes and Bug Fixes. 1.0.3.0 - 3rd June 2013 ----------------------- * Added GOG version checks. TGTool will clean up DDFix stuff more efficiently now. 1.0.2.1 - 1st June 2013 ----------------------- * Disabled crop movies by default as it doesn't work well with Thief, * Added some warnings about both the crop movies feature and the multi-sampling options, * Changed download locations of the updates. 1.0.2.0 - 29th May 2013 ----------------------- * Killed a nasty bug that would cause TG/T2Tool to mess up on making compressed/combined CRFs, * Added lots more checks. TGTool can now tell what version of Thief Gold it is working with and will select/deselect the appropriate check boxes: * DDFix and files from a 'Steam' installation, * Unused CD files from a 'CD Copy' installation. 1.0.1.0 - 26th May 2013 ----------------------- * Added option for compressing the CRFs if the user wants to save some HD space, disabled by default, * Disabled DromEd installation by default. 1.0.0.0 - 22nd May 2013 ----------------------- * Initial Release. */ ;====================================================== !AddPluginDir ./plugins !include "MUI.nsh" !include "Sections.nsh" !include "LogicLib.nsh" !include "FileFunc.nsh" !include WinMessages.nsh ;====================================================== !define SetTitleBar "!insertmacro SetTitleBar" !macro SetTitlebar Str SendMessage $HWNDPARENT ${WM_SETTEXT} 0 "STR:${Str}" !macroend ;====================================================== ;How to make Section Groups Read-Only - http://nsis.sourceforge.net/Managing_Sections_on_Runtime !macro GroupRO GroupId Push $0 IntOp $0 ${SF_SECGRP} | ${SF_RO} SectionSetFlags ${GroupId} $0 Pop $0 !macroend ;====================================================== ;This code makes a log! - http://nsis.sourceforge.net/Dump_log_to_file ;!define LVM_GETITEMCOUNT 0x1004 ;!define LVM_GETITEMTEXT 0x102D ;====================================================== ; Declare Any Custom Variables Here var filename var longname var repo_path_0 var repo_path_1 var repo_path_2 var repo_name_0 var repo_name_1 var repo_name_2 var MUI_COMPONENTSPAGE_TEXT_TOP var MUI_DIRECTORYPAGE_TEXT_TOP ;====================================================== ; When compiling, all these program details are read and put into the resulting EXE !define NAME "TGTool" !define SEPARATOR "_v" !define VERSION "1.0.5.2" !define CLEANNAME " v1.0.5.2" !define MUI_COMPONENTSPAGE_TEXT_TOP $MUI_COMPONENTSPAGE_TEXT_TOP !define MUI_DIRECTORYPAGE_TEXT_TOP $MUI_DIRECTORYPAGE_TEXT_TOP Name "${NAME}" RequestExecutionLevel user OutFile "${NAME}${SEPARATOR}${VERSION}.exe" Caption "${NAME}${CLEANNAME} - By Saleck" VIProductVersion "${VERSION}" VIAddVersionKey ProductName "${NAME}" VIAddVersionKey Comments "For infos and support see: http://www.saleck.net" VIAddVersionKey CompanyName "Saleck" VIAddVersionKey LegalCopyright "saleck@saleck.net, et al." VIAddVersionKey FileDescription "${NAME}" VIAddVersionKey FileVersion "${VERSION}" VIAddVersionKey ProductVersion "${VERSION}" VIAddVersionKey InternalName "${NAME}" VIAddVersionKey OriginalFilename "${NAME}${SEPARATOR}${VERSION}.exe" ;====================================================== ; Interface Settings Go Here !define MUI_ICON "ico_install.ico" !define MUI_HEADERIMAGE !define MUI_HEADERIMAGE_BITMAP "header.bmp" !define MUI_HEADERIMAGE_RIGHT !define MUI_WELCOMEFINISHPAGE_BITMAP "TGTool.bmp" !define MUI_COMPONENTSPAGE_SMALLDESC !define MUI_LICENSEPAGE_TEXT_TOP "Changelog of ${NAME} v${VERSION}" !define MUI_LICENSEPAGE_TEXT_BOTTOM "Click Next to continue" !define MUI_LICENSEPAGE_BUTTON "Next >" !define MUI_PAGE_HEADER_TEXT "Changelog" !define MUI_PAGE_HEADER_SUBTEXT "" BrandingText "Saleck.net" ; Installation Directory. Default install directory is the current location of the program InstallDir $Exedir ;====================================================== ; Runtime Switches SetCompressor /SOLID lzma ShowInstDetails show CRCCheck on AutoCloseWindow True ;====================================================== ; Pages. These will appear as the user goes through the installation process !insertmacro MUI_PAGE_WELCOME !insertmacro MUI_PAGE_LICENSE "changelog_tgtool.txt" !insertmacro MUI_PAGE_LICENSE "gpl.txt" !insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_COMPONENTS !insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_UNPAGE_CONFIRM !insertmacro MUI_UNPAGE_INSTFILES !insertmacro MUI_LANGUAGE "English" ;====================================================== ; Start of the main part of the program =============== ;====================================================== Function .onInit strcpy $repo_name_1 "Saleck.net" strcpy $repo_name_2 "Dropbox.com" strcpy $repo_path_1 "http://www.saleck.net/downloads/thieftools/files/" strcpy $repo_path_2 "https://dl.dropboxusercontent.com/u/23045282/downloads/thief-tools/" StrCpy $MUI_COMPONENTSPAGE_TEXT_TOP "Original CD release detected." StrCpy $MUI_DIRECTORYPAGE_TEXT_TOP "Select the game folder that contains Thief.exe. $\n$\nThe game should NOT be installed to the $\"Program Files$\" or $\"Program Files (x86)$\"folder and TGTool will not accept this location. $\nIf necessary, move the game folder to another location, eg C:\Games\Thief Gold" FunctionEnd ;====================================================== SectionGroup "System Requirements" startingchecks ;------------------------------------------ Section "DirectX Update" directx SectionIn RO ;writes the TGToolversion to the TGTool log file DetailPrint "TGTool ${VERSION}" strcpy $filename "directx_Jun2010_redist.exe" strcpy $longname "Microsoft DirectX End-User Runtimes (June 2010)" strcpy $repo_name_0 "Microsoft" strcpy $repo_path_0 "http://www.microsoft.com/download/en/details.aspx?id=8109" DetailPrint "Checking if $longname is installed" IfFileExists $WINDIR\system32\d3dx9_43.dll donedirectx IfFileExists "$EXEDIR\$fileName" offlineinstdirectx MessageBox MB_OK "Your system does not have the required $longName installed.$\n$\nYou will now be taken to the $repo_name_0 download page.$\nRun TGTool again after you have installed this update." ExecShell "open" "$repo_path_0" Quit offlineinstdirectx: DetailPrint "Installing $longname from offline source" ExecWait "$EXEDIR\$fileName\dxsetup.exe /silent" DetailPrint "$longname returned $0" donedirectx: DetailPrint "$longname is installed" SectionEnd ;------------------------------------------ Section "MS Visual C++ 2008 runtimes" MSVS2008 SectionIn RO strcpy $filename "vcredist_x86.exe" strcpy $longname "Microsoft Visual C++ 2008 SP1 Runtime" strcpy $repo_name_0 "Microsoft" strcpy $repo_path_0 "http://download.microsoft.com/download/d/d/9/dd9a82d0-52ef-40db-8dab-795376989c03" DetailPrint "Checking if $longname is installed" ;Check 1 ClearErrors ReadRegDword $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{9A25302D-30C0-39D9-BD6F-21E6EC160475}" "Version" IfErrors 0 doneMSVC2008 ;Check 2 ReadRegDword $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{1F1C2DFC-2D24-3E06-BCB8-725134ADF989}" "Version" IfErrors 0 doneMSVC2008 ;Check 3 ReadRegDword $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{9BE518E6-ECC6-35A9-88E4-87755C07200F}" "Version" IfErrors 0 doneMSVC2008 ;At this point we have to assume MSVC2008SP1 is not installed, so we download and run the installer. If MSVC2008SP1 was installed after all, it will do nothing. MessageBox MB_OKCANCEL|MB_ICONQUESTION "Your system does not have the required $longname installed.$\n$\nWould you like to download and install this update now? (recommended)" IDOK instMSVC2008 IDCANCEL doneMSVC2008 instMSVC2008: IfFileExists "$EXEDIR\$filename" offlineinstMSVC2008 DetailPrint "Downloading $longname ($filename) from $repo_name_0" inetc::get "$repo_path_0/$filename" "$INSTDIR\$filename" /END Pop $R0 ${IF} $R0 != "OK" DetailPrint "Download from $repo_name_0 failed, trying mirror at $repo_name_1." inetc::get "$repo_path_1/$filename" "$INSTDIR\$filename" /END Pop $R0 ${ENDIF} ${IF} $R0 != "OK" ;Download error Push "$longname ($filename)" Call ErrorDL ${ENDIF} DetailPrint "Installing $longname" ExecWait '$INSTDIR\$filename /q:a /c:"VCREDI~3.EXE /q:a /c:""msiexec /i vcredist.msi /qn"" "' $0 # Only progress bar DetailPrint "$longname returned $0" Delete "$INSTDIR\$filename" goto doneMSVC2008 offlineinstMSVC2008: DetailPrint "Found offline source for $longname" DetailPrint "Installing $longname" ExecWait '$EXEDIR\$filename /q:a /c:"VCREDI~3.EXE /q:a /c:""msiexec /i vcredist.msi /qn"" "' $0 # Only progress bar DetailPrint "$longname returned $0" doneMSVC2008: DetailPrint "$longname is installed" SectionEnd SectionGroupEnd ;====================================================== SectionGroup "Getting Mod Ready" Getmodready ;------------------------------------------ Section /o "Compress the CRF archives" compressCRFs IfFileExists "$INSTDIR\*.crf" compressRootCRFs IfFileExists "$INSTDIR\RES\*.crf" compressRESCRFs IfFileExists "$INSTDIR\Data\RES\*.crf" doneCRFs compressRESCRFs: DetailPrint "Compressing the CRFs with Ultra compression" ;Set output path to the installation directory. SetOutPath $INSTDIR ;Create a temp-folder which we will use to merge the CRFs CreateDirectory "$INSTDIR\temp" ;Copying 7zip into the $INSTDIR (TG game folder) File "7za.exe" DetailPrint "Extract the contents of the big CRFs to the temp folder first" ExecWait "7za.exe x -y -otemp/bitmap .\RES\bitmap.crf" ExecWait "7za.exe x -y -otemp/books .\RES\books.crf" ExecWait "7za.exe x -y -otemp/default .\RES\default.crf" ExecWait "7za.exe x -y -otemp/editor .\RES\editor.crf" ExecWait "7za.exe x -y -otemp/fam .\RES\fam.crf" ExecWait "7za.exe x -y -otemp/intrface .\RES\intrface.crf" ExecWait "7za.exe x -y -otemp/mesh .\RES\mesh.crf" ExecWait "7za.exe x -y -otemp/motions .\RES\motions.crf" ExecWait "7za.exe x -y -otemp/obj .\RES\obj.crf" ExecWait "7za.exe x -y -otemp/pal .\RES\pal.crf" ExecWait "7za.exe x -y -otemp/snd .\RES\snd.crf" ExecWait "7za.exe x -y -otemp/strings .\RES\strings.crf" SetDetailsPrint none Delete "$INSTDIR\7za.exe" SetDetailsPrint both DetailPrint "Compressing the original CRFs" SetOutPath "$INSTDIR\temp\bitmap" File "7za.exe" ;Wait while executing "7za.exe Update -archive-Type:zip -compression-Method:5 -Updateoptions ../../target-archive AllFiles -eXcluding!7za.exe" ExecWait "7za.exe u -tzip -mx9 -up1q1r2x2y2z2w2 ../../bitmap.crf * -x!7za.exe" CopyFiles "$INSTDIR\bitmap.crf" "$INSTDIR\RES\" Delete "$INSTDIR\bitmap.crf" SetOutPath "$INSTDIR\temp\books" File "7za.exe" ExecWait "7za.exe u -tzip -mx9 -up1q1r2x2y2z2w2 ../../books.crf * -x!7za.exe" CopyFiles "$INSTDIR\books.crf" "$INSTDIR\RES\" Delete "$INSTDIR\books.crf" SetOutPath "$INSTDIR\temp\default" File "7za.exe" ExecWait "7za.exe u -tzip -mx9 -up1q1r2x2y2z2w2 ../../default.crf * -x!7za.exe" CopyFiles "$INSTDIR\default.crf" "$INSTDIR\RES\" Delete "$INSTDIR\default.crf" SetOutPath "$INSTDIR\temp\editor" File "7za.exe" ExecWait "7za.exe u -tzip -mx9 -up1q1r2x2y2z2w2 ../../editor.crf * -x!7za.exe" CopyFiles "$INSTDIR\editor.crf" "$INSTDIR\RES\" Delete "$INSTDIR\editor.crf" SetOutPath "$INSTDIR\temp\fam" File "7za.exe" ExecWait "7za.exe u -tzip -mx9 -up1q1r2x2y2z2w2 ../../fam.crf * -x!7za.exe" CopyFiles "$INSTDIR\fam.crf" "$INSTDIR\RES\" Delete "$INSTDIR\fam.crf" SetOutPath "$INSTDIR\temp\intrface" File "7za.exe" ExecWait "7za.exe u -tzip -mx9 -up1q1r2x2y2z2w2 ../../intrface.crf * -x!7za.exe" CopyFiles "$INSTDIR\intrface.crf" "$INSTDIR\RES\" Delete "$INSTDIR\intrface.crf" SetOutPath "$INSTDIR\temp\mesh" File "7za.exe" ExecWait "7za.exe u -tzip -mx9 -up1q1r2x2y2z2w2 ../../mesh.crf * -x!7za.exe" CopyFiles "$INSTDIR\mesh.crf" "$INSTDIR\RES\" Delete "$INSTDIR\mesh.crf" SetOutPath "$INSTDIR\temp\motions" File "7za.exe" ExecWait "7za.exe u -tzip -mx9 -up1q1r2x2y2z2w2 ../../motions.crf * -x!7za.exe" CopyFiles "$INSTDIR\motions.crf" "$INSTDIR\RES\" Delete "$INSTDIR\motions.crf" SetOutPath "$INSTDIR\temp\obj" File "7za.exe" ExecWait "7za.exe u -tzip -mx9 -up1q1r2x2y2z2w2 ../../obj.crf * -x!7za.exe" CopyFiles "$INSTDIR\obj.crf" "$INSTDIR\RES\" Delete "$INSTDIR\obj.crf" SetOutPath "$INSTDIR\temp\pal" File "7za.exe" ExecWait "7za.exe u -tzip -mx9 -up1q1r2x2y2z2w2 ../../pal.crf * -x!7za.exe" CopyFiles "$INSTDIR\pal.crf" "$INSTDIR\RES\" Delete "$INSTDIR\pal.crf" SetOutPath "$INSTDIR\temp\snd" File "7za.exe" ExecWait "7za.exe u -tzip -mx9 -up1q1r2x2y2z2w2 ../../snd.crf * -x!7za.exe" CopyFiles "$INSTDIR\snd.crf" "$INSTDIR\RES\" Delete "$INSTDIR\snd.crf" SetOutPath "$INSTDIR\temp\strings" File "7za.exe" ExecWait "7za.exe u -tzip -mx9 -up1q1r2x2y2z2w2 ../../strings.crf * -x!7za.exe" CopyFiles "$INSTDIR\strings.crf" "$INSTDIR\RES\" Delete "$INSTDIR\strings.crf" ;Recursively silently delete the temp folder SetDetailsPrint none SetOutPath $INSTDIR RMDir /r "$INSTDIR\temp" SetDetailsPrint both goto doneCRFs compressRootCRFs: SetOutPath $INSTDIR CreateDirectory "$INSTDIR\temp" File "7za.exe" DetailPrint "Extract the contents of the root CRFs to the temp folder" ExecWait "7za.exe x -y -otemp/bitmap .\bitmap.crf" ExecWait "7za.exe x -y -otemp/books .\books.crf" ExecWait "7za.exe x -y -otemp/default .\default.crf" ExecWait "7za.exe x -y -otemp/editor .\editor.crf" ExecWait "7za.exe x -y -otemp/fam .\fam.crf" ExecWait "7za.exe x -y -otemp/intrface .\intrface.crf" ExecWait "7za.exe x -y -otemp/mesh .\mesh.crf" ExecWait "7za.exe x -y -otemp/motions .\motions.crf" ExecWait "7za.exe x -y -otemp/obj .\obj.crf" ExecWait "7za.exe x -y -otemp/pal .\pal.crf" ExecWait "7za.exe x -y -otemp/snd .\snd.crf" ExecWait "7za.exe x -y -otemp/strings .\strings.crf" SetDetailsPrint none Delete "$INSTDIR\7za.exe" SetDetailsPrint both DetailPrint "Compressing the original CRFs" SetOutPath "$INSTDIR\temp\bitmap" File "7za.exe" ;Wait while executing "7za.exe Update -archive-Type:zip -compression-Method:5 -Updateoptions ../../target-archive AllFiles -eXcluding!7za.exe" ExecWait "7za.exe u -tzip -mx9 -up1q1r2x2y2z2w2 ../../bitmap.crf * -x!7za.exe" ExecWait "7za.exe u -tzip -mx9 -up1q1r2x2y2z2w2 ../../books.crf * -x!7za.exe" SetOutPath "$INSTDIR\temp\default" File "7za.exe" ExecWait "7za.exe u -tzip -mx9 -up1q1r2x2y2z2w2 ../../default.crf * -x!7za.exe" SetOutPath "$INSTDIR\temp\editor" File "7za.exe" ExecWait "7za.exe u -tzip -mx9 -up1q1r2x2y2z2w2 ../../editor.crf * -x!7za.exe" SetOutPath "$INSTDIR\temp\fam" File "7za.exe" ExecWait "7za.exe u -tzip -mx9 -up1q1r2x2y2z2w2 ../../fam.crf * -x!7za.exe" SetOutPath "$INSTDIR\temp\intrface" File "7za.exe" ExecWait "7za.exe u -tzip -mx9 -up1q1r2x2y2z2w2 ../../intrface.crf * -x!7za.exe" SetOutPath "$INSTDIR\temp\mesh" File "7za.exe" ExecWait "7za.exe u -tzip -mx9 -up1q1r2x2y2z2w2 ../../mesh.crf * -x!7za.exe" SetOutPath "$INSTDIR\temp\motions" File "7za.exe" ExecWait "7za.exe u -tzip -mx9 -up1q1r2x2y2z2w2 ../../motions.crf * -x!7za.exe" SetOutPath "$INSTDIR\temp\obj" File "7za.exe" ExecWait "7za.exe u -tzip -mx9 -up1q1r2x2y2z2w2 ../../obj.crf * -x!7za.exe" SetOutPath "$INSTDIR\temp\pal" File "7za.exe" ExecWait "7za.exe u -tzip -mx9 -up1q1r2x2y2z2w2 ../../pal.crf * -x!7za.exe" SetOutPath "$INSTDIR\temp\snd" File "7za.exe" ExecWait "7za.exe u -tzip -mx9 -up1q1r2x2y2z2w2 ../../snd.crf * -x!7za.exe" SetOutPath "$INSTDIR\temp\strings" File "7za.exe" ExecWait "7za.exe u -tzip -mx9 -up1q1r2x2y2z2w2 ../../strings.crf * -x!7za.exe" ;Recursively silently delete the temp folder SetDetailsPrint none SetOutPath $INSTDIR RMDir /r "$INSTDIR\temp" SetDetailsPrint both doneCRFs: SectionEnd ;------------------------------------------ !insertmacro Locate Section "Move original files" MoveOriFiles DetailPrint "Creating folders for original game data" CreateDirectory "$INSTDIR\Data" CreateDirectory "$INSTDIR\Data\RES" CreateDirectory "$INSTDIR\Data\MOVIES" DetailPrint "Moving original game files to new folders" SetOutPath "$INSTDIR\Data" File "!Original Game Files - Do Not Touch.txt" SetOutPath "$INSTDIR" CopyFiles "$INSTDIR\motiondb.bin" "$INSTDIR\Data" Delete "$INSTDIR\motiondb.bin" ;File Moving loop for MIS files StrCpy $R0 "$INSTDIR" ;Directory move from StrCpy $R1 "$INSTDIR\Data" ;Directory move into StrCpy $R2 0 StrCpy $R3 0 ${Locate} "$R0" "/L=F /M=*.mis" "loopfunction" ;File Moving loops StrCpy $R0 "$INSTDIR" ;Directory move from StrCpy $R1 "$INSTDIR\Data" ;Directory move into ;File Moving loop for RES files StrCpy $R2 0 StrCpy $R3 0 ${Locate} "$R0" "/L=F /M=*.res" "loopfunction" ;File Moving loop for DIF files StrCpy $R2 0 StrCpy $R3 0 ${Locate} "$R0" "/L=F /M=*.res" "loopfunction" ;File Moving loop for GAM files StrCpy $R2 0 StrCpy $R3 0 ${Locate} "$R0" "/L=F /M=*.gam" "loopfunction" ;File Moving loop for OSM files StrCpy $R2 0 StrCpy $R3 0 ${Locate} "$R0" "/L=F /M=*.osm" "loopfunction" ;File Moving loop for CRF files StrCpy $R0 "$INSTDIR" ;Directory move from StrCpy $R1 "$INSTDIR\Data\res" ;Directory move into StrCpy $R2 0 StrCpy $R3 0 ${Locate} "$R0" "/L=F /M=*.crf" "loopfunction" ;File Moving loop for movie files StrCpy $R0 "$INSTDIR\MOVIES" ;Directory move from StrCpy $R1 "$INSTDIR\Data\MOVIES" ;Directory move into StrCpy $R2 0 StrCpy $R3 0 ${Locate} "$R0" "/L=F /M=*.**" "loopfunction" RMDir /r "$INSTDIR\MOVIES" RMDir /r "$INSTDIR\RES" ; IfErrors 0 +2 ; DetailPrint "There were errors while I tried moving the CRFs.' IDOK +4 ; StrCmp $R3 0 0 +2 ; MessageBox MB_OK '$R2 CRFs were moved.' IDOK +2 IfErrors 0 +3 DetailPrint "There were errors while moving the CRFs." Goto +3 StrCmp $R3 0 0 +2 DetailPrint "$R2 CRFs were moved." SectionEnd ;------------------------------------------ Function loopfunction StrCmp $R8 $R1 +6 IfFileExists '$R1\$R7' +4 Rename $R9 '$R1\$R7' IntOp $R2 $R2 + 1 goto +2 IntOp $R3 $R3 + 1 Push $0 FunctionEnd ;------------------------------------------ Section "Create mod folders" modFolders DetailPrint "Creating mod folders" CreateDirectory "$INSTDIR\USERMODS" SetOutPath "$INSTDIR\USERMODS" File "!Place Your Mods Here.txt" SectionEnd ;------------------------------------------ Section "Install Custom CFG files" installcfg DetailPrint "Installing custom CFG files" SetOutPath $INSTDIR Delete "$INSTDIR\install.cfg" File "install.cfg" File "Steam_install.cfg" SectionEnd ;------------------------------------------ Section "NewDark v1.24" newdark strcpy $filename "newdark_tg.7z" strcpy $longname "NewDark 1.24" IfFileExists "$EXEDIR\$filename" offlineinstnewdark DetailPrint "Downloading $longname patch from $repo_name_1" inetc::get "$repo_path_1/$filename" "$INSTDIR\$filename" /END Pop $R0 ${IF} $R0 != "OK" DetailPrint "Downloading $longname from $repo_name_1 failed, trying mirror at $repo_name_2" inetc::get "$repo_path_2/$filename" "$INSTDIR\$filename" /END Pop $R0 ${ENDIF} ${IF} $R0 != "OK" ;Download error Push "$longname ($filename)" Call ErrorDL ${ENDIF} SetOutPath $INSTDIR File "7za.exe" DetailPrint "Installing $longname" ExecWait "7za.exe x -y $filename" Delete "$INSTDIR\$filename" Delete "$INSTDIR\7za.exe" goto donenewdark offlineinstnewdark: DetailPrint "Found offline source for $longname" CopyFiles "$EXEDIR\$filename" "$INSTDIR" SetOutPath $INSTDIR DetailPrint "Installing $longname" File "7za.exe" ExecWait "7za.exe x -y $filename" Delete "$INSTDIR\$filename" Delete "$INSTDIR\7za.exe" donenewdark: Delete "$INSTDIR\LGVID.AX" ; not needed anymore DetailPrint "$longname is installed" SectionEnd ;------------------------------------------ Section /o "DromEd Level Editor v1.24" dromed strcpy $filename "dromed.7z" strcpy $longname "DromEd v1.24" IfFileExists "$EXEDIR\$filename" offlineinstdromed DetailPrint "Downloading $longname patch from $repo_name_1" inetc::get "$repo_path_1/$filename" "$INSTDIR\$filename" /END Pop $R0 ${IF} $R0 != "OK" DetailPrint "Downloading $longname from $repo_name_1 failed, trying mirror at $repo_name_2" inetc::get "$repo_path_2/$filename" "$INSTDIR\$filename" /END Pop $R0 ${ENDIF} ${IF} $R0 != "OK" ;Download error Push "$longname ($filename)" Call ErrorDL ${ENDIF} SetOutPath $INSTDIR File "7za.exe" DetailPrint "Installing $longname" ExecWait "7za.exe x -y $filename" Delete "$INSTDIR\$filename" Delete "$INSTDIR\7za.exe" goto donedromed offlineinstdromed: DetailPrint "Found offline source for $longname" CopyFiles "$EXEDIR\$filename" "$INSTDIR" SetOutPath $INSTDIR DetailPrint "Installing $longname" File "7za.exe" ExecWait "7za.exe x -y $filename" Delete "$INSTDIR\$filename" Delete "$INSTDIR\7za.exe" donedromed: DetailPrint "$longname is installed" SectionEnd ;------------------------------------------ Section "Connect Mod Folders" connectmodfolders SectionIn RO DetailPrint "Connecting mod folders in cam_mod.ini" Push "$INSTDIR\cam_mod.ini" Push "mod_path" Push "mod_path usermods" Call ReplaceLineStr SectionEnd ;------------------------------------------ SectionGroupEnd ;====================================================== SectionGroup "Bug Fixes" BugFixes ;------------------------------------------ Section "Audio Fix" AudioFix ; We're not downloading the OpenAL installer anymore. ; Just copy the DLLs to the game dir - done. strcpy $longname "OpenAL" IfFileExists "$INSTDIR\OpenAL32.dll" doneopenal DetailPrint "Installing $longname to game dir" SetOutPath "$INSTDIR" File "oal\OpenAL32.dll" File "oal\wrap_oal.dll" doneopenal: DetailPrint "$longname is installed" DetailPrint "Adjusting settings in cam.cfg for $longname" Push "$INSTDIR\cam.cfg" Push "sfx_vol_2d" Push "sfx_vol_2d 0" Call ReplaceLineStr Push "$INSTDIR\cam.cfg" Push "sfx_channels" Push "sfx_channels 48" Call ReplaceLineStr Push "$INSTDIR\cam.cfg" Push "game_hardware" Push "game_hardware 1" Call ReplaceLineStr Push "$INSTDIR\cam.cfg" Push "sfx_device" Push "sfx_device 4" Call ReplaceLineStr Push "$INSTDIR\cam.cfg" Push "sfx_eax" Push "sfx_eax 1" Call ReplaceLineStr SectionEnd ;------------------------------------------ SectionGroupEnd ;====================================================== SectionGroup "Clean Up" CleanUp ;------------------------------------------ Section "Remove Thief_no_ddfix.exe" thiefddfix Delete "$INSTDIR\THIEF_no_ddfix.EXE" SectionEnd ;------------------------------------------ Section "Remove old DDFix files" ddfixfiles Delete "$INSTDIR\ddfix.dll" Delete "$INSTDIR\ddfix_readme.txt" Delete "$INSTDIR\ddfix readme.txt" Delete "$INSTDIR\ddfix.ini" SectionEnd ;------------------------------------------ Section "Clean Up CD files" unusedCDfiles Delete "$INSTDIR\ILIST.F" Delete "$INSTDIR\ILIST.M" Delete "$INSTDIR\ILIST.T" SectionEnd ;------------------------------------------ SectionGroupEnd ;====================================================== SectionGroup "Game Features" feats ;------------------------------------------ Section "Enable weather effects" weather DetailPrint "Enabling weather effects in cam.cfg" Push "$INSTDIR\cam.cfg" Push "fogging" Push "fogging 1" Call ReplaceLineStr Push "$INSTDIR\cam.cfg" Push "enhanced_sky" Push "enhanced_sky 1" Call ReplaceLineStr Push "$INSTDIR\cam.cfg" Push "render_weather" Push "render_weather 1" Call ReplaceLineStr SectionEnd ;------------------------------------------ Section "New mantle" newmantle DetailPrint "Enabling new mantle in cam_ext.cfg" Push "$INSTDIR\cam_ext.cfg" Push ";new_mantle" Push "new_mantle" Call ReplaceLineStr SectionEnd ;------------------------------------------ Section "Limit GPU buffer" limitgpubuffer DetailPrint "Limiting GPU buffer to 1 frame (menu and game) in cam_ext.cfg" Push "$INSTDIR\cam_ext.cfg" Push "d3d_disp_limit_gpu_frames 1" Push ";d3d_disp_limit_gpu_frames 1" Call ReplaceLineStr Push "$INSTDIR\cam_ext.cfg" Push ";d3d_disp_limit_gpu_frames 1 1" Push "d3d_disp_limit_gpu_frames 1 1" Call ReplaceLineStr SectionEnd ;------------------------------------------ Section /o "Crop movies" cropmovies DetailPrint "Enabling crop movies in cam_ext.cfg" ;backup this line Push "$INSTDIR\cam_ext.cfg" Push ";crop_movies 0 70 640 340" Push ";;crop_movies 0 70 640 340" Push "noappend" Call ReplaceLineStr ;modify Push "$INSTDIR\cam_ext.cfg" Push ";crop_movies" Push "crop_movies" Call ReplaceLineStr ;restore backup Push "$INSTDIR\cam_ext.cfg" Push ";;crop_movies 0 70 640 340" Push ";crop_movies 0 70 640 340" Push "noappend" Call ReplaceLineStr SectionEnd ;------------------------------------------ Section "Multisample anti-aliasing" msaa DetailPrint "Enabling multisample anti-aliasing in cam_ext.cfg" Push "$INSTDIR\cam_ext.cfg" Push ";multisampletype 8" Push "multisampletype 8" Call ReplaceLineStr SectionEnd ;------------------------------------------ Section "Soft bloom effect" softbloom DetailPrint "Setting soft bloom in cam_ext.cfg" Push "$INSTDIR\cam_ext.cfg" Push ";postprocess" Push "postprocess 1" Call ReplaceLineStr Push "$INSTDIR\cam_ext.cfg" Push ";bloomscale" Push "bloomscale 4" Call ReplaceLineStr Push "$INSTDIR\cam_ext.cfg" Push ";bloom_threshold" Push "bloom_threshold 0.7" Call ReplaceLineStr SectionEnd ;------------------------------------------ Section /o "Start menu items" startMenuTG ;Cleanup and Create some shortcuts Delete "$INSTDIR\IG.URL" Delete "$INSTDIR\LGT.URL" ;Create a StartMenu folder if we don't have one already CreateDirectory "$SMPROGRAMS\Thief Gold" ;This is important as it sets the Start In path of the link: SetOutPath "$INSTDIR" createShortCut "$SMPROGRAMS\Thief Gold\Thief Gold.lnk" "$INSTDIR\THIEF.exe" \ "" "$INSTDIR\icon.ico" createShortCut "$SMPROGRAMS\Thief Gold\Thief Gold - FM Manager.lnk" "$INSTDIR\THIEF.exe" \ "-fm" "$INSTDIR\icon.ico" createShortCut "$SMPROGRAMS\Thief Gold\Trouble Shooting Guide.lnk" "$INSTDIR\doc\troubleshooting.txt" createShortCut "$SMPROGRAMS\Thief Gold\Release Notes NewDark v1.24.lnk" "$INSTDIR\doc\release_notes.txt" createShortCut "$SMPROGRAMS\Thief Gold\Thief.log.lnk" "$INSTDIR\Thief.log" File "links\Saleck.net.URL" File "links\TTLG.com.URL" createShortCut "$SMPROGRAMS\Thief Gold\Saleck.net.lnk" "$INSTDIR\Saleck.net.URL" createShortCut "$SMPROGRAMS\Thief Gold\TTLG.com.lnk" "$INSTDIR\TTLG.com.URL" SectionEnd ;------------------------------------------ SectionGroupEnd ;====================================================== SectionGroup "Safe Mode" safemode ;------------------------------------------ Section /o "Use DirectX 6" dx6 SetOutPath $INSTDIR ;Let's delete any previously existing occurrences of "use_d3d_display" Push "$INSTDIR\cam_ext.cfg" Push "use_d3d_display" Push ";use_d3d_display" Call ReplaceLineStr SectionEnd ;------------------------------------------ Section /o "Disable HW sound" HWsound Push "$INSTDIR\cam.cfg" Push "sfx_device" Push "sfx_device 1" Call ReplaceLineStr SectionEnd ;------------------------------------------ SectionGroupEnd ;====================================================== ; FUNCTIONS ;====================================================== Function ReplaceLineStr Pop $0 ${If} $0 != "noappend" ; Don't append if needle not found? Push $0 ; Push back on stack ${EndIf} Exch $R0 ; string to replace that whole line with Exch Exch $R1 ; needle Exch Exch 2 Exch $R2 ; file (haystack) Push $R3 ; file handle Push $R4 ; temp file Push $R5 ; temp file handle Push $R6 ; global Push $R7 ; input string length Push $R8 ; line string length Push $R9 ; global Var /GLOBAL T0 ; counter StrCpy $T0 0 ; reset StrLen $R7 $R1 GetTempFileName $R4 FileOpen $R5 $R4 w FileOpen $R3 $R2 r ReadLoop: ClearErrors FileRead $R3 $R6 IfErrors Done StrLen $R8 $R6 StrCpy $R9 $R6 $R7 -$R8 StrCmp $R9 $R1 0 +4 FileWrite $R5 "$R0$\r$\n" IntOp $T0 $T0 + 1 Goto ReadLoop FileWrite $R5 $R6 Goto ReadLoop Done: FileClose $R3 FileClose $R5 SetDetailsPrint none Delete $R2 Rename $R4 $R2 SetDetailsPrint both ${If} $T0 != 0 DetailPrint "$T0 lines starting with $\"$R1$\" replaced with $\"$R0$\" in $\"$R2$\"." ${ElseIf} $0 != "noappend" FileOpen $T0 $R2 a FileSeek $T0 0 END FileWrite $T0 $R0 FileWriteByte $T0 "13" FileWriteByte $T0 "10" FileClose $T0 DetailPrint "No line starts with $\"$R1$\" in $\"$R2$\", appended $\"$R0$\" to EOF." ${Else} DetailPrint "No line starts with $\"$R1$\" in $\"$R2$\", no changes made." ${EndIf} Pop $R9 Pop $R8 Pop $R7 Pop $R6 Pop $R5 Pop $R4 Pop $R3 Pop $R2 Pop $R1 Pop $R0 ;MessageBox MB_OK "Append setting is: $0" ;debug setting FunctionEnd ;------------------------------------------ ; This function needs to be defined in the Interface Settings above ; Function myGUIInit ; SetOutPath $TEMP ; do something ; FunctionEnd ;------------------------------------------ Function ErrorDL pop $0 DetailPrint "Downloading of $0 failed from all known locations.$\nMake sure TGTool can connect to the internet." MessageBox MB_OK "Downloading of $0 failed from all known locations.$\nMake sure TGTool can connect to the internet." StrCpy $0 "$INSTDIR\tgtool.log" Push $0 Call DumpLog Quit FunctionEnd ;------------------------------------------ Function .onInstSuccess DetailPrint "Creating log file" StrCpy $0 "$INSTDIR\tgtool.log" Push $0 Call DumpLog ;DetailPrint "Play a simple melody" ;SetOutPath $INSTDIR ;File "madplay.exe" ;File "triop.mp3" ;nsExec::Exec "madplay.exe triop.mp3" ;Delete "$INSTDIR\madplay.exe" ;Delete "$INSTDIR\triop.mp3" FunctionEnd ;------------------------------------------ ;Dump log to file function (http://nsis.sourceforge.net/Dump_log_to_file) Function DumpLog Exch $5 Push $0 Push $1 Push $2 Push $3 Push $4 Push $6 FindWindow $0 "#32770" "" $HWNDPARENT GetDlgItem $0 $0 1016 StrCmp $0 0 exit FileOpen $5 $5 "w" StrCmp $5 "" exit SendMessage $0 ${LVM_GETITEMCOUNT} 0 0 $6 System::Alloc ${NSIS_MAX_STRLEN} Pop $3 StrCpy $2 0 System::Call "*(i, i, i, i, i, i, i, i, i) i \ (0, 0, 0, 0, 0, r3, ${NSIS_MAX_STRLEN}) .r1" loop: StrCmp $2 $6 done System::Call "User32::SendMessageA(i, i, i, i) i \ ($0, ${LVM_GETITEMTEXT}, $2, r1)" System::Call "*$3(&t${NSIS_MAX_STRLEN} .r4)" FileWrite $5 "$4$\r$\n" IntOp $2 $2 + 1 Goto loop done: FileClose $5 System::Free $1 System::Free $3 exit: Pop $6 Pop $4 Pop $3 Pop $2 Pop $1 Pop $0 Exch $5 FunctionEnd ;Require thief.exe to be present in installdir, avoid bad installdirs Function .onVerifyInstDir StrLen $0 $WINDIR #note string length of the bad dir path StrCpy $0 $INSTDIR $0 #copy instdir-path but only up to the previously set length (in case instdir was a subdir of bad dir) StrCmp $0 $WINDIR 0 instcheck2 #compare shortened installdir path to bad dir path Abort instcheck2: StrLen $0 $PROGRAMFILES64 StrCpy $0 $INSTDIR $0 StrCmp $0 $PROGRAMFILES64 0 instcheck3 Abort instcheck3: StrLen $0 $PROGRAMFILES StrCpy $0 $INSTDIR $0 StrCmp $0 $PROGRAMFILES 0 instcheck4 Abort instcheck4: IfFileExists $INSTDIR\THIEF.exe PathGood 0 Abort PathGood: ;========================================================================================= ;========================================================================================= ; Steam Detection Code ${If} ${FileExists} "$INSTDIR\Steam_install.cfg" ; Unselects the Checkbox !insertmacro UnselectSection ${unusedCDfiles} ; Disables the Checkbox SectionSetFlags ${unusedCDfiles} ${SF_RO} StrCpy $MUI_COMPONENTSPAGE_TEXT_TOP "Steam version detected" ${EndIf} ;-------------------------------------------------------------- ; v1.33 Patch Detection Code ;${If} ${FileExists} "$INSTDIR\patch.wri" ; ; Unselects the Checkbox ; !insertmacro UnselectSection ${t2118patch} ; ; ; ; Disables the Checkbox ; SectionSetFlags ${t2118patch} ${SF_RO} ; ; StrCpy $MUI_COMPONENTSPAGE_TEXT_TOP "Game v1.18 detected, patch.wri found" ; ;${EndIf} ; This isnt being used for Thief Gold ; But could it be used to patch Thief 1 to 1.33 ??? ;-------------------------------------------------------------- ; Copied CD Detection Code ${If} ${FileExists} "$INSTDIR\ILIST.F" ; Selects the Checkbox !insertmacro SelectSection ${unusedCDfiles} ${Else} !insertmacro UnselectSection ${unusedCDfiles} SectionSetFlags ${unusedCDfiles} ${SF_RO} ${EndIf} ;-------------------------------------------------------------- ; GOG.com Version Detection Code ${If} ${FileExists} "$INSTDIR\goggame.dll" StrCpy $MUI_COMPONENTSPAGE_TEXT_TOP "GOG.com version detected" ${EndIf} ;-------------------------------------------------------------- ; ddfix detection ${If} ${FileExists} "$INSTDIR\thief_no_ddfix.exe" !insertmacro SelectSection ${thiefddfix} !insertmacro SelectSection ${ddfixfiles} ${Else} !insertmacro UnselectSection ${thiefddfix} !insertmacro UnselectSection ${ddfixfiles} SectionSetFlags ${thiefddfix} ${SF_RO} SectionSetFlags ${ddfixfiles} ${SF_RO} ${EndIf} FunctionEnd Function .onSelChange ; Toggle "connectmodfolders" when "modfolders" is un/selected ${If} ${SectionIsSelected} ${modfolders} !insertmacro SelectSection ${connectmodfolders} ${Else} !insertmacro UnselectSection ${connectmodfolders} ${EndIf} FunctionEnd ;------------------------------------------ LangString DESC_startingchecks ${LANG_ENGLISH} "System Requirements get checked (required feature)" LangString DESC_directx ${LANG_ENGLISH} "Check for the required DirectX runtimes" LangString DESC_MSVS2008 ${LANG_ENGLISH} "Download and install Microsoft Visual C++ 2008 SP1 if necessary" LangString DESC_patchup ${LANG_ENGLISH} "Install the patch and merge the added CRFs with the existing archives" LangString DESC_compressCRFs ${LANG_ENGLISH} "Compress the CRF files and frees up some HD space" LangString DESC_moveCRFs ${LANG_ENGLISH} "Move the CRFs to the Data\RES folder" LangString DESC_Getmodready ${LANG_ENGLISH} "Prepare the game for modifications and fan missions" LangString DESC_MoveOriFiles ${LANG_ENGLISH} "Move original game files to the new folders Data\RES and Data\MOVIES" LangString DESC_modFolders ${LANG_ENGLISH} "Create mod folders" LangString DESC_installcfg ${LANG_ENGLISH} "Portable install.cfg and Steam_install.cfg files" LangString DESC_BugFixes ${LANG_ENGLISH} "Bug fixes" LangString DESC_AudioFix ${LANG_ENGLISH} "3D audio settings and updated OpenAL DLLs (OpenAL32.dll 6.14.357.25, wrap_oal.dll 2.2.0.7)" LangString DESC_CleanUp ${LANG_ENGLISH} "Clean up any old files" LangString DESC_thiefddfix ${LANG_ENGLISH} "Delete this unused Thief EXE" LangString DESC_ddfixfiles ${LANG_ENGLISH} "Delete the old unused DDFix files" LangString DESC_unusedCDfiles ${LANG_ENGLISH} "Deletes any unneeded CD files carried over from copying the 'THIEF' folder" LangString DESC_newdark ${LANG_ENGLISH} "Install the unofficial patch, updating to game version to v1.24" LangString DESC_dromed ${LANG_ENGLISH} "Install the DromEd level editor v1.24" LangString DESC_connectmodfolders ${LANG_ENGLISH} "Connect the mod folders via mod_path in cam_mod.ini (Gets autoselected when creating mod folders)" LangString DESC_feats ${LANG_ENGLISH} "Various game features" LangString DESC_weather ${LANG_ENGLISH} "Enable weather effects, still needs to be supported by the mission" LangString DESC_newmantle ${LANG_ENGLISH} "Smoother mantling onto ledges" LangString DESC_limitgpubuffer ${LANG_ENGLISH} "Reduce mouse lag by limiting GPU buffer to 1 frame in menu and in game. (Disable for CrossFire/SLI)" LangString DESC_cropmovies ${LANG_ENGLISH} "Crop movies to fill out widescreen displays. CAUTION: May make some text in movies unreadable." LangString DESC_msaa ${LANG_ENGLISH} "Enable multisample anti-aliasing. CAUTION: Some Intel Graphics chipsets may not like this option." LangString DESC_blendingexplosions ${LANG_ENGLISH} "Make normal and pyro explosions and shockwave spangs use additive blending" LangString DESC_softbloom ${LANG_ENGLISH} "Soft bloom effect on bright white textures" LangString DESC_startMenuTG ${LANG_ENGLISH} "Add items for Thief Gold to the Windows Start menu" LangString DESC_safemode ${LANG_ENGLISH} "Only use this in case of problems" LangString DESC_dx6 ${LANG_ENGLISH} "Use DirectX 6 renderer instead of DirectX 9 with old graphics cards (integrated Intel graphics)" LangString DESC_HWsound ${LANG_ENGLISH} "Disable hardware sound acceleration in case of sound problems" ;Assign language strings to sections !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN !insertmacro MUI_DESCRIPTION_TEXT ${startingchecks} $(DESC_startingchecks) !insertmacro MUI_DESCRIPTION_TEXT ${directx} $(DESC_directx) !insertmacro MUI_DESCRIPTION_TEXT ${MSVS2008} $(DESC_MSVS2008) !insertmacro MUI_DESCRIPTION_TEXT ${moveCRFs} $(DESC_moveCRFs) !insertmacro MUI_DESCRIPTION_TEXT ${compressCRFs} $(DESC_compressCRFs) !insertmacro MUI_DESCRIPTION_TEXT ${Getmodready} $(DESC_Getmodready) !insertmacro MUI_DESCRIPTION_TEXT ${MoveOriFiles} $(DESC_MoveOriFiles) !insertmacro MUI_DESCRIPTION_TEXT ${modFolders} $(DESC_modFolders) !insertmacro MUI_DESCRIPTION_TEXT ${installcfg} $(DESC_installcfg) !insertmacro MUI_DESCRIPTION_TEXT ${BugFixes} $(DESC_BugFixes) !insertmacro MUI_DESCRIPTION_TEXT ${AudioFix} $(DESC_AudioFix) !insertmacro MUI_DESCRIPTION_TEXT ${CleanUp} $(DESC_CleanUp) !insertmacro MUI_DESCRIPTION_TEXT ${thiefddfix} $(DESC_thiefddfix) !insertmacro MUI_DESCRIPTION_TEXT ${ddfixfiles} $(DESC_ddfixfiles) !insertmacro MUI_DESCRIPTION_TEXT ${unusedCDfiles} $(DESC_unusedCDfiles) !insertmacro MUI_DESCRIPTION_TEXT ${newdark} $(DESC_newdark) !insertmacro MUI_DESCRIPTION_TEXT ${dromed} $(DESC_dromed) !insertmacro MUI_DESCRIPTION_TEXT ${connectmodfolders} $(DESC_connectmodfolders) !insertmacro MUI_DESCRIPTION_TEXT ${feats} $(DESC_feats) !insertmacro MUI_DESCRIPTION_TEXT ${weather} $(DESC_weather) !insertmacro MUI_DESCRIPTION_TEXT ${newmantle} $(DESC_newmantle) !insertmacro MUI_DESCRIPTION_TEXT ${limitgpubuffer} $(DESC_limitgpubuffer) !insertmacro MUI_DESCRIPTION_TEXT ${cropmovies} $(DESC_cropmovies) !insertmacro MUI_DESCRIPTION_TEXT ${msaa} $(DESC_msaa) !insertmacro MUI_DESCRIPTION_TEXT ${softbloom} $(DESC_softbloom) !insertmacro MUI_DESCRIPTION_TEXT ${startMenuTG} $(DESC_startMenuTG) !insertmacro MUI_DESCRIPTION_TEXT ${safemode} $(DESC_safemode) !insertmacro MUI_DESCRIPTION_TEXT ${dx6} $(DESC_dx6) !insertmacro MUI_DESCRIPTION_TEXT ${HWsound} $(DESC_HWsound) !insertmacro MUI_FUNCTION_DESCRIPTION_END