Tutorial for MOD installer

How about asking the reg file like NSIS does?
Code:
    #look for standard Civ4:BTS
   ReadRegStr $0 ${MACHINE_REG_ROOT} "${FIRAXIS_REG_KEY}\${BTSREG_STANDARD}" 'INSTALLDIR'
What you really need is locating "Sid Meier's Civilization 4 - Beyond The Sword\InstallPath".
I guess it is possible to make python search for a folder, but as PPQ_Purple said, the mods could be literally any where, so searching for the Sid Meier's Civilization folder won't help.
I think it would be easier to just let the user put in the path if he has the CD version, or if the user has the steam version then it is already filled in.
 
I guess it is possible to make python search for a folder, but as PPQ_Purple said, the mods could be literally any where, so searching for the Sid Meier's Civilization folder won't help.
The windows registry is not a folder. It's quite literally the solution to finding install paths when you don't know where something is installed.
 
As I said previously. At this point I would seriously advise you do this because you absolutely need to learn what the system registry is.
 
Probably not well since it's a project that should take at most 2-3 days work and it's been going for weeks now. He probably lost interest.
 
I still plan to look into NSIS. I took a brief look and it looks like it has the needed features should you ever need an installer. However I do not have an urgent need for an installer. I suppose I could write about what to do once I have used it for something. I do however not have a clue to when that would be as I have more urgent modding tasks right now.
 
How important is cross platform functionality for you on that one? As in how vital is it that the launcher runs on stuff other than windows?

I am asking because to put it bluntly I find configuring java projects to be a horrible pain as nothing ever comes out of the box and you have to install everything manually and waste hours and I am just not willing to put up with hat level of frustration. Where as I can work up a universal launcher in visual studio in a day or two but it'd be Windows only.
 
Last edited:
Well basically from what I gathered a launcher needs to:
1. Adaptively change it's name and stuff to show which mod you are using it with.
2. Can launch the game with the mod on. And can automatically detect where the BTS exe is to do it.
3. Automatically detects modules and lets you turn them on or off.
4. Have an about page or some other form of description and link to the mod here on the forum.
5. Have a button to run the sound integration thing that he mentioned.

And I imagine a couple other things. Again, it's about a day or two of work for me to cook it up as long as I can stick to windows and C#.
 
Probably not well since it's a project that should take at most 2-3 days work and it's been going for weeks now. He probably lost interest.
No, I was just busy with Christmas, New Year and was just enjoying my vacation!:)
Also I was thinking of a strategy of how to do it.
Here is my idea so far:
Make the EXE already exist (can be renamed to whatever you want) and then in the Application Mod Installer when you fill out the fields it creates a Mod Installer file which is read by the EXE, so all you have to do is put in some text and click finish!
I also had to make some research on how to place text, buttons, entries in desired positions.
The Finish Button will be moved lower. Also how many optional modules should there be? I was thinking 3 but maybe some mods would want more?
upload_2021-1-5_19-26-57.png
 
Last edited:
I also don't think that an installer is that needed. A universal mod launcher and module handler on the other hand would be handy.
It would be but for some mods some of the modules might interact with other Xml, Python, or C++ files.
When is a launcher needed? Isn't it enough to make a shortcut and add mod="whatever" as command line arguments?

As for cross platform launcher, would it make sense to bother to make it cross platform if the mod is windows only due to the DLL?
There is a CIV 4 Mod Launcher I believe which I have, basically you open it and choose a mod to play from BtS, Warlords, or Vanilla.
How important is cross platform functionality for you on that one? As in how vital is it that the launcher runs on stuff other than windows?

I am asking because to put it bluntly I find configuring java projects to be a horrible pain as nothing ever comes out of the box and you have to install everything manually and waste hours and I am just not willing to put up with hat level of frustration. Where as I can work up a universal launcher in visual studio in a day or two but it'd be Windows only.
Well you can just create a version for Windows and later on create another version for Mac and Linux.
 
Well you can just create a version for Windows and later on create another version for Mac and Linux.
Not really. Like the issue is that basically I can't be bothered to put in the week or so of time configuring an IDE for Java to actually work and use a GUI library where as with visual studio it just works out of the box. So like with me it's windows only or nothing.

Not unless you can recommend me an IDE for Java or Python that works out of the box with zero configuration where I can literally go New->Gui Project and start programming. So far the best I came up with is that I wasted some 3 hours trying to get eclipse to run with JavaFX before I gave up.

Seriously like, I despise IDE developers that can't get that one simple thing right. Either make it work out of the box or don't make it at all. C++ is excluded simply because I love it more than anything and am willing to put up with it's crap. But Java has no excuse.
 
Not really. Like the issue is that basically I can't be bothered to put in the week or so of time configuring an IDE for Java to actually work and use a GUI library where as with visual studio it just works out of the box. So like with me it's windows only or nothing.

Not unless you can recommend me an IDE for Java or Python that works out of the box with zero configuration where I can literally go New->Gui Project and start programming. So far the best I came up with is that I wasted some 3 hours trying to get eclipse to run with JavaFX before I gave up.
Well I only know 2 IDE's that I'm pretty sure you heard of anyway, VSCode and PyCharm.

Better Windows then nothing, and I'm sure a lot of Civ 4 players and modders have Windows.
 
Visual Studio in general just works. Like you can literally start anything you like be that a database or web design or GUI project or a console application or anything and in any of microsofts supported languages as well with a click of a button and zero configuration work. Also a lot of the common C++ IDEs do as well although you might have to fiddle a bit more with importing libraries. But like in codeblocks I newer once had to do anything more than copy paste a .h file and write include. Same for python really, just run that command you wrote a while ago and download the library you need.
But in Java it's always like pulling teeth. You have to find the right files online, configure the IDE, configure your build system (because of course you need a separate build system... idiots.) and than it does not work. So you go into your path variable and edit that. Only it does not work. So you go online, look at tutorials and guides and a couple hours later the guy that's been programming for 20 years gives up and ragequits.

By the way, that GUI you made looks nice. What library are you using for it in python? I might just try that one out instead.
 
Visual Studio in general just works. Like you can literally start anything you like be that a database or web design or GUI project or a console application or anything and in any of microsofts supported languages as well with a click of a button and zero configuration work. Also a lot of the common C++ IDEs do as well although you might have to fiddle a bit more with importing libraries. But like in codeblocks I newer once had to do anything more than copy paste a .h file and write include. Same for python really, just run that command you wrote a while ago and download the library you need.
But in Java it's always like pulling teeth. You have to find the right files online, configure the IDE, configure your build system (because of course you need a separate build system... idiots.) and than it does not work. So you go into your path variable and edit that. Only it does not work. So you go online, look at tutorials and guides and a couple hours later the guy that's been programming for 20 years gives up and ragequits.
I started using Visual Studio, I didn't know what version was the best so I just installed as many as I wanted :lol: (2015, 2017, and 2019)!
By the way, that GUI you made looks nice. What library are you using for it in python? I might just try that one out instead.
I'm using Tkinter, the module that comes with python, so no need to install anything else. But because you are a more advanced coder I definitely do not suggest using Tkinter, I started with Tkinter and now I'm used to it (I'll probably change though). The other GUI module for python is called Pyqt5. A lot of programmers said it is more complex, but allows more things to be done, so for you I definitely suggest using Pyqt5 as a GUI module but you can try out Tkinter as well, its pretty easy and a lot of tutorials covering it.
 
So like with me it's windows only or nothing.
That's enough.
If a player is skilled enough to install Civ4 and mods on Linux or Mac, than he is also skilled enough to enable modules manually if needed. Obviously the later is the easier thing.
 
In that case I'll get on it as soon as I figure out QT for visual studio. Because now I am infected. :)
Until than you figure out if my list has any features lacking. And Luis can finish up his installer by than as well so we can ship it all together.
 
Back
Top Bottom