Announcement

Collapse
No announcement yet.

TO: Apolyton and CivFanatics; Civlization 1, 2 and Test of Time, scenario recommendations, for compilation?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • TO: Apolyton and CivFanatics; Civlization 1, 2 and Test of Time, scenario recommendations, for compilation?

    Attention:

    Starting tomorrow, I am going to build a master installer and compilation of the old civ games to fix the 16-bit installer woes that have been present for new Windows versions with fixes, etc.

    Additionally I'm considering, a module or separate installer for making a basic loader for Civilization 1 on the snes and Civilization 2 on Playstation 1 for completeness, but I need currently accessible scenario suggestions for the PC stuff. Thanks.

    I would create an account on CivFanatics but I never got around to it. Thanks to anyone who wants to help.


    I have a lot of experience making complicated installers, and enough coding experience to solve such problems, like I have done for other fandoms, not mentioned here, so this is going to happen. Distribution ideas would be exceptional, as this all contains copyright code. I can't simply upload it, in spite of my wanting to make Classic Civilization Apolyton Edition

    Releases Here:​

    https://github.com/Draythianna/Civil...ics-Collection​​
    "Our words are backed with NUCLEAR WEAPONS!"​​

  • #2
    So I think i'm going to setup a minor outline of what I'm going to do now:

    1) Extract the game files from an actual cd drive or an iso (via drive letter with file existing check)
    2) patch the game files with fixes and delta binary diff patches
    3) fix Indeo video on Windows 10/11 (already know how to)
    4) installer options for paths and components
    5) installer should create shortcuts on start menu and desktop
    6) uninstaller available and functional
    7) Dance into the Fire!
    ​​​
    Last edited by Thorn; June 13, 2024, 14:04.
    "Our words are backed with NUCLEAR WEAPONS!"​​

    Comment


    • #3
      1) and 3) are done, working on next parts


      * How I'm going to make this legal is extracting the files on the fly, so the installer won't be that big actually. And delta patches to the Executables.
      "Our words are backed with NUCLEAR WEAPONS!"​​

      Comment


      • #4
        Click image for larger version  Name:	Screenshot_7.png Views:	5 Size:	232.1 KB ID:	9471712​ 5) and 6) are done

        wip:

        I am working on a ton of pascal code, did i mention pascal sucks!
        Last edited by Thorn; June 14, 2024, 23:14.
        "Our words are backed with NUCLEAR WEAPONS!"​​

        Comment


        • #5
          Some new screenies:
          Click image for larger version

Name:	Screenshot_8.png
Views:	107
Size:	4.03 MB
ID:	9471722 Click image for larger version

Name:	Screenshot_9.png
Views:	104
Size:	515.8 KB
ID:	9471723
          "Our words are backed with NUCLEAR WEAPONS!"​​

          Comment


          • #6
            Giving you the idea of the Vanilla Install Size:
            Click image for larger version

Name:	Screenshot_10.png
Views:	109
Size:	327.0 KB
ID:	9471728
            "Our words are backed with NUCLEAR WEAPONS!"​​

            Comment


            • #7
              Great service to the gaming community!

              BTW, any chance I will someday be able to play Civ2 on my Mac again?
              Apolyton's Grim Reaper 2008, 2010 & 2011
              RIP lest we forget... SG (2) and LaFayette -- Civ2 Succession Games Brothers-in-Arms

              Comment


              • #8
                Just letting everyone know I made a lot of progress, but with programming a program I realize that not everyone wants to type in paths and filenames with no drag and drop ability and would rather browse to the files or drive, with that in mind I decided to rewrite parts of it, Right now I have over 7000 lines of code for the GUI installer, and 320 needed to do the basic work (part1).

                I still need to finish 4) and 2) is easy to do; it will take me only an hour or so. I decided to use InnoSetup as I am familiar, and with all the coding variables, procedures, and functions which are all custom code make up the brunt of the work now. I could release a basic non gui program in like a day, but i want this to look and feel professional.

                I'm having a few issues in the GUI code right now, not compile time but functional, once I air them out I can finish 4).

                The reason this is so difficult is that I'm not simply repackaging the full installers, as that would still be sharing a lot of copywrite code, even with the MIT license I can't do that safely. Basically the program will take an original source install, be it a disc, disc image, or archive, and extract and collate everything properly. It also has a lot of checks to make sure it doesn't do things it can't, like processor architecture, and Windows Versions, that add a bit of code, but most of the code is custom relating to options selected, and doing stuff depending on the options selected that is where it currently stands.

                If anyone has a rip of a full install of Civ2mge or Civtot and can't work it on windows 8+ I have a very useful multi cpu arch fix for the Indeo Video Woes that crash it on startup, PM me if you can't wait.

                This has been my most complicated Install project, but when it is polished it is something for me to be proud of. I'll keep you updated.
                "Our words are backed with NUCLEAR WEAPONS!"​​

                Comment


                • #9
                  Also Jrabbit, as Mac is basically Darwin linux on the interior, it would be easier to emulate it via Wine or run it from windows via Parallels. I don't program for Macs, I'm familiar with it and some linux distros, but as far as mac stuff goes a lot of the stuff to run old programs is coded in Rosetta and that is not something anyone but Apple can update easily and they don't want to.

                  If it was a 3d program (thankfully not) the easiest route on a Mac or Linux is using qemu, kvm, and a passthrough card, kinda a pain. I've done this before on Debian/Ubuntu, and I can run MacOS on Linux via VMs. If you really want me to take a look at it, tell me what System Version it stopped working on, that will give me and idea of what level of fix it would be? -Thanks
                  "Our words are backed with NUCLEAR WEAPONS!"​​

                  Comment


                  • -Jrabbit
                    -Jrabbit commented
                    Editing a comment
                    Thanks for the detailed reply. Frankly, I'm not THAT invested. It would be a sort of "nice to have" item for me; no worries.

                • #10
                  Would TOT installed this way have any issues running the TOT Patch Project? I don't imagine so but I know basically nothing of programming.
                  1011 1100
                  Pyrebound--a free online serial fantasy novel

                  Comment


                  • #11
                    Originally posted by Elok View Post
                    Would TOT installed this way have any issues running the TOT Patch Project? I don't imagine so but I know basically nothing of programming.
                    No it won't have any issues, if someone could give me the contact information of TOT Patch Project and MGE lua luancher; or give me permission I'd even include it, but as it stands now there is only limited stuff my installer can do. Vanilla Install, Patch the game to the latest patch, nocd, and x64 fix, also extract the music from the cd images, or whatnot for preperation for 3rd party patches. It does have an option for setting up desktop and start menu items for those 3rd party patches when installed.

                    I've been busy working on this project its functional few bugs with the installer nothing too harmful, but I'm not ready to release it yet. I've reached a bit of a stumbling block not with what i'm doing but understanding InnoSetup functions for "TRadioButtons", taking me 3 days (8-10 hours a day at least) for one section of code to fix. Its a really simple issue, all the complex stuff is done.

                    Is anyone here familiar with pascal or C++ possibly? I'm pulling my hair out at this point, with this one thing, and I have a major trip coming up so i'll be shutdown working for a month.

                    here, is the snippet i'm having issues with (I have all the variables linked and set to the right types

                    Code:
                    ///.... bunch of unrelated stuff.... installer based
                    var
                      CivISOData: array[0..2] of TInputFileWizardPage;
                      CivDriveData: array[0..2] of TInputDirWizardPage;
                      CivArchiveData: array[0..2] of TInputFileWizardPage;
                      Result1: array[1..13] of String;
                      AfterID: Integer;
                      // BeforeID: Integer;
                      OptionPageID: array[0..3] of Integer;
                      OptionPage: array[0..3] of TWizardPage;
                      LabelOption: array[0..3] of TLabel;
                      PrepareToInstallWithProgressPage: TOutputProgressWizardPage;
                      RadioButton: array[0..11] of TRadioButton;
                      Radio: array[0..11] of Boolean;
                    procedure RadioButtonClick(Sender: TObject);
                    
                    begin
                      AfterID :=  wpInfoAfter;
                      if Sender = RadioButton[0] then
                        begin
                      if Civ[0] < 1 then
                        begin
                          inc(Civ[0]);
                          CivISOData[0] :=  CreateInputFilePage(AfterID, 'Source', 'Select ISO Extraction Source Files', '*.iso *.bin *.img');
                          CivISOData[0].Add('&Civilization Install Location:', 'Image Files|*.iso;*bin;*.img|All Files|*.*', '*.*');
                          Result1[1] :=  CivISOData[0].Values[0];
                          AfterID :=  CivISOData[0].ID;
                          SetIniString('Install', 'Civ1ISO', Result1[1], ExpandConstant('{tmp}') + '\Setup.ini');
                        end;
                        end
                        else
                        if Sender = RadioButton[1] then
                          begin
                        if Civ[0] < 1 then
                          begin
                            inc(Civ[0]);
                            CivDriveData[0] :=  CreateInputDirPage(AfterID, 'Source', 'Please Select Drive Letter or Folder', 'Select?', False, 'New Folder');
                            CivDriveData[0].Add('&Civilization Install Location:');
                            Result1[2] :=  CivDriveData[0].Values[0];
                            CivDriveData[0].Values[0] :=  'D:\';
                            AfterID :=  CivDriveData[0].ID;
                            SetIniString('Install', 'Civ1Drive', Result1[2], ExpandConstant('{tmp}') + '\Setup.ini');
                          end;
                          end
                          else
                        if Sender = RadioButton[2] then
                          begin
                        if Civ[0] < 1 then
                          begin
                            inc(Civ[0]);
                            CivArchiveData[0] :=  CreateInputFilePage(AfterID, 'Source', 'Select Full File Archive Extraction Source Files', '*.zip *.rar *.7z');
                            CivArchiveData[0].Add('&Civilization Install Location:', 'Archive Files|*.zip;*.rar;*.7z|All Files|*.*', '*.*');
                            Result1[3] :=  CivArchiveData[0].Values[0];
                            SetIniString('Install', 'Civ1Data', Result1[3], ExpandConstant('{tmp}') + '\Setup.ini');
                          end;
                    //if else to compare against next section (truncated), after 3 values, stop doing the "else if" then again until done in 3 groups
                          end
                          else
                        if Sender = RadioButton[3] then
                          begin  
                        if Civ[1] < 1 then
                          begin
                            inc(Civ[1]);​
                    ///............. this 3 times in 3 groups....
                    
                    ///.... then it jumps to this section
                    procedure InitializeWizard;
                    ​///....skip a bunch of unrelated stuff for gui prettyness
                    ///.....
                          if IsComponentSelected('Install\Custom\Civ1') or IsComponentSelected('Install\Full') then
                            begin
                              OptionPage[0] :=  CreateCustomPage(wpInstalling, 'Civilization 1 Source?', 'Select Install Choice');
                              LabelOption[0] :=  TLabel.Create(OptionPage[0]);
                              LabelOption[0].Parent :=  WizardForm;
                              LabelOption[0].Top :=  168;
                              LabelOption[0].Left :=  6;
                              LabelOption[0].Caption :=  '&Civilization 1 Options:';
                              RadioButton[0] :=  TNewRadioButton.Create(OptionPage[0]);
                              RadioButton[0].Parent :=  OptionPage[0].Surface;
                              RadioButton[0].Top :=  LabelOption[0].Top - 160;
                              RadioButton[0].Left :=  LabelOption[0].Left;
                              RadioButton[0].Width :=  LabelOption[0].Width * 5;
                              RadioButton[0].Caption :=  '&ISO';
                              RadioButton[0].OnClick :=  @RadioButtonClick;
                    
                              RadioButton[1] :=  TNewRadioButton.Create(OptionPage[0]);
                              RadioButton[1].Parent :=  OptionPage[0].Surface;
                              RadioButton[1].Top :=  LabelOption[0].Top - 120;
                              RadioButton[1].Left :=  LabelOption[0].Left;
                              RadioButton[1].Width :=  LabelOption[0].Width * 5;
                              RadioButton[1].Caption :=  '&Drive';
                              RadioButton[1].OnClick :=  @RadioButtonClick;
                    
                              RadioButton[2] :=  TNewRadioButton.Create(OptionPage[0]);
                              RadioButton[2].Parent :=  OptionPage[0].Surface;
                              RadioButton[2].Top :=  LabelOption[0].Top - 80;
                              RadioButton[2].Left :=  LabelOption[0].Left;
                              RadioButton[2].Width :=  LabelOption[0].Width * 5;
                              RadioButton[2].Caption :=  '&Archive';
                              RadioButton[2].OnClick :=  @RadioButtonClick
                            end;​
                    
                    ///...... continues with this in 3 groups
                    So basically the problem i'm having is its looping each selection with the question 6 times, i tried incrementing to stop it from looping but I dunno what the heck is wrong at this point. I may post this entire project all to github if anyone thinks its useful... undecided. Depends if i can fix it fast enough for my trip... unknown
                    "Our words are backed with NUCLEAR WEAPONS!"​​

                    Comment


                    • #12
                      This is what loops 6 times (same question per game, a total of 6x4, ugh):
                      Click image for larger version  Name:	2024-06-24_20-58.png Views:	1 Size:	138.8 KB ID:	9472155​​​
                      This part works fine:

                      ​​​ Click image for larger version  Name:	2024-06-24_20-59.png Views:	1 Size:	108.4 KB ID:	9472156​​​
                      "Our words are backed with NUCLEAR WEAPONS!"​​

                      Comment


                      • #13
                        so much for my work, got hit with a major storm power out for up to 3-4 days
                        "Our words are backed with NUCLEAR WEAPONS!"​​

                        Comment


                        • #14
                          So I am still working on this, not as intensely, I got the installer finished fully about a month ago (took me quite a while to fix that glitch), and now I'm just working on some of the install scripts to make it bug free, idiot proof, I could release the first version in a week probably. I may make this open source and add it to my GitHub, still deciding.

                          Also need to get 2) done from earlier as otherwise it just creates perfect, pre-patched vanilla installs which would still require a CD-ROM drive lol.


                          Asnippet here is a teaser of some code i'm working on:
                          Code:
                          for %%i in (%drive%) do set CDCUE=%%~dpni.cue
                          mkdir "%CivPath%\CIVNET"
                          cd "%CivPath%\CIVNET"
                          mkdir TMP
                          cd TMP
                          %civmain%\bchunk.v1.2.1_repub.1.exe -w "%CDBIN%" "%CDCUE%" TRACK
                          for %%i in (*.wav) do %civmain%\lame.exe -b 320 -h %%i %%~ni.mp3
                          %civmain%\7z.exe x TRACK01.iso
                          xcopy /S /C /H /R /Y "%drive%\CIVGUIDE" ../
                          xcopy /S /C /H /R /Y "%drive%\INTERNET" ../
                          cd ..
                          TMP\Install.exe
                          xcopy /S /C /H /R /Y C:\mps\CIVNET .
                          rd /S /Q C:\mps\CIVNET
                          rmdir C:\mps
                          %civmain%\I5comp.exe x TMP\data1.cab
                          mkdir Music
                          move TMP\*.wav Music\
                          move TMP\*.mp3 Music\
                          rd /S /Q TMP
                          %civmain%\7z.exe x "%archive%"
                          if exist "%CivPath%\CivNet\CivNet" echo a | move "%CivPath%\CivNet\CivNet" ..\ && rd /s /q CivNet
                          if exist "%CivPath%\common\FULL.TXT" goto civmge
                          if exist "%CivPath%\common\CIVMGE.TXT" goto civmge
                          if exist "%CivPath%\common\CIVTOT.TXT" goto civtot​
                          "Our words are backed with NUCLEAR WEAPONS!"​​

                          Comment


                          • #15
                            Here is some more snippets showing how I got things to fix:

                            Code:
                            var
                            Civ: array[0..11] of String;
                            CivISO: array[0..3] of TInputFileWizardPage;
                            CivDrive: array[0..3] of TInputDirWizardPage;
                            CivArchive: array[0..3] of TInputFileWizardPage;
                            Result1: array[0..12] of String;
                            AfterID: Integer;
                            OptionPageID: array[0..3] of Integer;
                            OptionPage: array[0..3] of TWizardPage;
                            LabelOption: array[0..3] of TLabel;
                            PrepareToInstallWithProgressPage: TOutputProgressWizardPage;
                            RadioButton: array[0..11] of TRadioButton;
                            Radio: array[0..11] of Boolean;
                            IniFileName: String;
                            a: array[0..11] of Integer;
                            procedure RadioButtonClick(Sender: TObject);
                            begin
                            AfterID := OptionPage[3].ID;
                            if Sender = RadioButton[0] then
                            begin
                            CivISO[0] := CreateInputFilePage(AfterID, 'Source', 'Select ISO Extraction Source Files', '*.iso *.bin *.img');
                            CivISO[0].Add('&Civilization Install Location:', 'Image Files|*.iso;*bin;*.img|All Files|*.*', '*.*');
                            a[0] := 1;
                            end;
                            if Sender = RadioButton[1] then
                            begin
                            CivDrive[0] := CreateInputDirPage(AfterID, 'Source', 'Please Select Drive Letter or Folder', 'Select?', False, 'New Folder');
                            CivDrive[0].Add('&Civilization Install Location:');
                            CivDrive[0] := 'D:\';
                            a[1] := 2;
                            end;
                            if Sender = RadioButton[2] then
                            begin
                            CivArchive[0] := CreateInputFilePage(AfterID, 'Source', 'Select Full File Archive Extraction Source Files', '*.zip *.rar *.7z');
                            CivArchive[0].Add('&Civilization Install Location:', 'Archive Files|*.zip;*.rar;*.7z|All Files|*.*', '*.*');
                            a[2] := 3;
                            end;
                            if Sender = RadioButton[3] then
                            begin
                            CivISO[1] := CreateInputFilePage(AfterID, 'Source', 'Select Disc Image Source Files', '*.iso *.bin *.img');
                            CivISO[1].Add('&CivNet Install Location:', 'Image Files|*.iso;*bin;*.img|All Files|*.*', '*.*');
                            a[3] := 4;
                            end;​
                            Code:
                            function GetCiv1ISO(Param: String): String;
                            begin
                            if a[0] = 1 then
                            Result := ExpandConstant(CivISO[0].Values[0]);
                            end;
                            
                            function GetCiv1Drive(Param: String): String;
                            begin
                            if a[1] = 2 then
                            Result := ExpandConstant(CivDrive[0].Values[0]);
                            end;
                            
                            function GetCiv1Data(Param: String): String;
                            begin
                            if a[2] = 3 then
                            Result := ExpandConstant(CivArchive[0].Values[0]);
                            end;
                            
                            function GetCivNetISO(Param: String): String;
                            begin
                            if a[3] = 4 then
                            Result := ExpandConstant(CivISO[1].Values[0]);
                            end;
                            
                            function GetCivNetDrive(Param: String): String;
                            begin
                            if a[4] = 5 then
                            Result := ExpandConstant(CivDrive[1].Values[0]);
                            end;
                            
                            function GetCivNetData(Param: String): String;
                            begin
                            if a[5] = 6 then
                            Result := ExpandConstant(CivArchive[1].Values[0]);
                            end;​
                            Code:
                            [INI]
                            Filename: "{tmp}\Setup.ini"; Section: "Install"; Key: "Civ1ISO"; String: "{code:GetCiv1ISO}"
                            Filename: "{tmp}\Setup.ini"; Section: "Install"; Key: "Civ1Drive"; String: "{code:GetCiv1Drive}"
                            Filename: "{tmp}\Setup.ini"; Section: "Install"; Key: "Civ1Data"; String: "{code:GetCiv1Data}"
                            Filename: "{tmp}\Setup.ini"; Section: "Install"; Key: "CivNetISO"; String: "{code:GetCivNetISO}"
                            Filename: "{tmp}\Setup.ini"; Section: "Install"; Key: "CivNetDrive"; String: "{code:GetCivNetDrive}"
                            Filename: "{tmp}\Setup.ini"; Section: "Install"; Key: "CivNetArchive"; String: "{code:GetCivNetData}"
                            Filename: "{tmp}\Setup.ini"; Section: "Install"; Key: "Civ2ISO"; String: "{code:GetCiv2ISO}"
                            Filename: "{tmp}\Setup.ini"; Section: "Install"; Key: "Civ2Drive"; String: "{code:GetCiv2ISO}"
                            Filename: "{tmp}\Setup.ini"; Section: "Install"; Key: "Civ2Archive"; String: "{code:GetCiv2Data}"
                            Filename: "{tmp}\Setup.ini"; Section: "Install"; Key: "CivToTISO"; String: "{code:GetCivToTISO}"
                            Filename: "{tmp}\Setup.ini"; Section: "Install"; Key: "CivToTDrive"; String: "{code:GetCivToTDrive}"
                            Filename: "{tmp}\Setup.ini"; Section: "Install"; Key: "CivToTArchive"; String: "{code:GetCivToTData}"​
                            The reason it was repeating was quite annoying.

                            Code:
                             function PrepareToInstall(var NeedsRestart: Boolean): String;
                            
                            var
                            Result2: Boolean;
                            ResultCode: Integer;
                            begin
                            if IsComponentSelected('Install\Custom\Civ1') then
                            begin
                            c1 := True;
                            end;
                            if IsComponentSelected('Install\Custom\CivNet') then
                            begin
                            cn := True;
                            end;
                            if IsComponentSelected('Install\Custom\Civ2MGE') then
                            begin
                            c2 := True;
                            end;
                            if IsComponentSelected('Install\Custom\Civ2ToT') then
                            begin
                            ct := True;
                            end;
                            if IsComponentSelected('Install\Full') then
                            begin
                            c1 := True;
                            cn := True;
                            c2 := True;
                            ct := True;
                            end;
                            if c1 = True then
                            begin
                            OptionPage[0] := CreateCustomPage(wpPreparing, 'Civilization 1 Source?', 'Select Install Choice');​
                            Needed some boolean checks ugh, and arrays.
                            "Our words are backed with NUCLEAR WEAPONS!"​​

                            Comment

                            Working...
                            X