Déja
Beyond the Mod
- Joined
- Dec 19, 2005
- Messages
- 353
Well, since I had to dig out my VS2003 disks and dust them off in order to work with the CivIV SDK, I figured I would make it worth my while and use VS2003 for not only the SDK, but also for working with the python and XML. I figured I would share my experience here (along with the solution files).
Unfortunately, as I am currently only working with the Warlords SDK, I've adapted the project files to that end.
Also, I'm not 100% sure where to put this as it is technically not a tool or utility, but rather a set of project files, so mods, feel free to relocate as desired.
Now, on to the actual solution. The solution requires a little bit of prep work:
Phase 1: Installation
In order for this solution to work the best, you'll need three pieces of software:
#1 Visual Studio 2003 - This is the only mandatory bit of software
#2 Python 2.4 - This is required for #3, though I needed to install ActivePython (ftp://ftp.activestate.com/ActivePython/windows/2.4/ActivePython-2.4.3.12-win32-x86.msi) before the third installer recognized my python install. This could be because I'm running Windows Vista which required me to work around the python installer.
#3 Visual Python - This enables syntax highlighting (among other things) of Python code files in Visual Studio 2003. ActiveState discontinued its work on Visual Python and thus made it "free" to the public (you will get an occasional pop-up complaining that it can't find the license file, but it will still open the file and work as normal. I'm still waiting to hear back from ActiveState on how to obtain an "unlimited license", so I will post that info once I receive it.
Now, with those three bits of software installed, it's time to set up the mod folder
Phase 2: Setting up the mod folder
This solution makes a couple assumptions about what your mod's Assets folder contains. It should contain, at bare minimum:
\XML
\Python
\CvGameCoreDLL
This last one is simply a copy of the CvGameCoreDLL folder from the main warlords folder. The solution's projects will go into each of these folders, and the way the builds are configured, the XML and Python projects will be skipped over while the CvGameCoreDLL project will place the resulting .dll file in your mod's assets folder, ready to be renamed.
That's all the prep-work that needs to be done... now on to the main event!
Phase 3: Extracting the solution
Fire up 7z, WinZip or even Windows Explorer and extract all the files into your mod's Assets folder.
Then, simply open CivIVMod.sln and away you go!
Appendix 1: Creating your own solution
Really, the only thing I've done is to create the projects, add all the relevant files, and tweeked a few settings to place the DLL in the proper place and to not build the other projects. However, here are a couple notes in case you desire to do this sort of thing yourself:
In the DLL project's properties page, simply change the Linker > General > Output File option to point to whatever folder you want it to dump the .dll file into
In the other two project's properties pages, switch to All Configurations in the dropdown at the top of the window and then
1. Change General > Configuration Type to Makefile and click Apply
2. Change NMake > Command Line to: echo "Skipping Python" or whatever you'd like to be spit out when it skips the compile.
Voila
I hope that at least one person out there finds this useful, and if you do, don't be afraid to let me know
Unfortunately, as I am currently only working with the Warlords SDK, I've adapted the project files to that end.
Also, I'm not 100% sure where to put this as it is technically not a tool or utility, but rather a set of project files, so mods, feel free to relocate as desired.
Now, on to the actual solution. The solution requires a little bit of prep work:
Phase 1: Installation
In order for this solution to work the best, you'll need three pieces of software:
#1 Visual Studio 2003 - This is the only mandatory bit of software
#2 Python 2.4 - This is required for #3, though I needed to install ActivePython (ftp://ftp.activestate.com/ActivePython/windows/2.4/ActivePython-2.4.3.12-win32-x86.msi) before the third installer recognized my python install. This could be because I'm running Windows Vista which required me to work around the python installer.
#3 Visual Python - This enables syntax highlighting (among other things) of Python code files in Visual Studio 2003. ActiveState discontinued its work on Visual Python and thus made it "free" to the public (you will get an occasional pop-up complaining that it can't find the license file, but it will still open the file and work as normal. I'm still waiting to hear back from ActiveState on how to obtain an "unlimited license", so I will post that info once I receive it.
Now, with those three bits of software installed, it's time to set up the mod folder
Phase 2: Setting up the mod folder
This solution makes a couple assumptions about what your mod's Assets folder contains. It should contain, at bare minimum:
\XML
\Python
\CvGameCoreDLL
This last one is simply a copy of the CvGameCoreDLL folder from the main warlords folder. The solution's projects will go into each of these folders, and the way the builds are configured, the XML and Python projects will be skipped over while the CvGameCoreDLL project will place the resulting .dll file in your mod's assets folder, ready to be renamed.
That's all the prep-work that needs to be done... now on to the main event!
Phase 3: Extracting the solution
Fire up 7z, WinZip or even Windows Explorer and extract all the files into your mod's Assets folder.
Then, simply open CivIVMod.sln and away you go!
Appendix 1: Creating your own solution
Really, the only thing I've done is to create the projects, add all the relevant files, and tweeked a few settings to place the DLL in the proper place and to not build the other projects. However, here are a couple notes in case you desire to do this sort of thing yourself:
In the DLL project's properties page, simply change the Linker > General > Output File option to point to whatever folder you want it to dump the .dll file into
In the other two project's properties pages, switch to All Configurations in the dropdown at the top of the window and then
1. Change General > Configuration Type to Makefile and click Apply
2. Change NMake > Command Line to: echo "Skipping Python" or whatever you'd like to be spit out when it skips the compile.
Voila
I hope that at least one person out there finds this useful, and if you do, don't be afraid to let me know
