//////////////////////////////////////////////////////////////////////////////// // // IIIIIII SSSSSS // II SS InstallShield (R) // II SSSSSS (c) 1996-1998, InstallShield Software Corporation // II SS (c) 1990-1996, InstallShield Corporation // IIIIIII SSSSSS All Rights Reserved. // // // This code is generated as a starting setup template. You should // modify it to provide all necessary steps for your setup. // // // File Name: Setup.rul // // Description: InstallShield script // // Comments: This template script performs a basic setup. With minor // modifications, this template can be adapted to create // new, customized setups. // //////////////////////////////////////////////////////////////////////////////// // Include header files #include "sdlang.h" #include "sddialog.h" #include "isrtp.h" // Globals STRING svValue, svExe; BOOL EarthFound, SpawnFound; // Finding Earth STRING svName, svResult1, svComponentSource, svComponent, svFileGroup, svFile, szData; NUMBER nResult, nResult2, nResult3, nDisk, nvType, nvSize, nPos, nvError, nData; // RTPatch STRING sv1, sv2, sv3, sv4; NUMBER n1, n2, n3; // System Check BOOL bIs32BitSetup; NUMBER nvResult; STRING svResult; // Main program Disable (BACKGROUND); EarthFound = TRUE; SpawnFound = TRUE; svExe = "Earth2150spawn.exe"; LongPathToQuote (svExe, FALSE); // set 'setup' operation mode bIs32BitSetup = TRUE; GetSystemInfo( ISTYPE, nvResult, svResult ); if (nvResult = 16) then bIs32BitSetup = FALSE; // running 16-bit setup endif; // Finding Earth The Final Frontier Before We Have To Race To The Blue Planet RegDBSetDefaultRoot (HKEY_LOCAL_MACHINE); nResult = RegDBKeyExist ("Software\\Topware\\Earth 2150\\BaseGame\\FileSystem"); if (nResult = 1) then nResult = RegDBGetKeyValueEx ("Software\\Topware\\Earth 2150\\BaseGame\\FileSystem", "OutputDir", nvType, svValue, nvSize); if (nResult = 0) then nResult = FindFile (svValue, "Earth2150.exe", svResult1); if (nResult = 0) then TARGETDIR = svValue; else EarthFound = FALSE; endif; else EarthFound = FALSE; endif; else EarthFound = FALSE; endif; // Finding the fuckin Spawning flies RegDBSetDefaultRoot (HKEY_LOCAL_MACHINE); nResult = RegDBKeyExist ("Software\\Topware\\Earth 2150\\BaseGame\\FileSystem"); if (nResult = 1) then nResult = RegDBGetKeyValueEx ("Software\\Topware\\Earth 2150\\BaseGame\\FileSystem", "OutputDir", nvType, svValue, nvSize); if (nResult = 0) then nResult = FindFile (svValue, svExe, svResult1); if (nResult = 0) then TARGETDIR = svValue; else SpawnFound = FALSE; endif; else SpawnFound = FALSE; endif; else SpawnFound = FALSE; endif; if (EarthFound = FALSE && SpawnFound = FALSE) then SetDialogTitle (DLG_MSG_INFORMATION, @EARTH_PATCH); MessageBox (@EARTH_NOT_FOUND, INFORMATION); endif; // RTPatch Shit // Spawn EXE if (SpawnFound = TRUE) then sv1 = SRCDIR ^ "EarthspPatch1_1.rtp"; sv2 = svValue; sv3 = "Earth 2150 1.1 Patch"; sv4 = "-u"; n1 = ISPATCH_LOG_FILE; n2 = ISPATCH_CENTER; n3 = ISPATCH_CENTER; ISRTPatch(sv1, sv2, sv3, sv4, n1, n2, n3); endif; // Regular Exe if (EarthFound = TRUE) then sv1 = SRCDIR ^ "EarthPatch1_1.rtp"; sv2 = svValue; sv3 = "Earth 2150 1.1 Patch"; sv4 = "-u"; n1 = ISPATCH_LOG_FILE; n2 = ISPATCH_CENTER; n3 = ISPATCH_CENTER; ISRTPatch(sv1, sv2, sv3, sv4, n1, n2, n3); endif; endprogram // --- include script file section --- #include "sddialog.rul" #include "isrtp.rul"