How to build and contribute to the Community Patch DLL

That worked

========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
 
Yes, although the resulting build DLL is twice as large as the one that comes with it. My changes are being reflected though, and everything seems fine, so I think I'm just making a debug build and need to sort out the proper settings for a release build.
 
Yes, although the resulting build DLL is twice as large as the one that comes with it. My changes are being reflected though, and everything seems fine, so I think I'm just making a debug build and need to sort out the proper settings for a release build.

I wouldn't worry about a release build if you are just debugging.
 
To get the VS2013 solution working on my local machine, I had to manually rejigger the executable directories in the project configuration. It has trouble finding the compilers from Vs2010 if I don't do this. These changes pose a problem to maintaining my fork in a form consumable to the master branch.

I have need of one of two things. One, tips on how to fix the environment variables to make my local clean again. Or two, advice on how to use Git to interact with the repo but preserving the project properties on my local copy. Git stash doesn't seem correct for this, and git halts on unstaged, changed tracked files.

I have to admit that the use of the v90 toolset for a project development that is only being maintained in the Vs2013 environment and became incompatible with pre-Windows 7 a long time ago has me befuddled.
 
To get the VS2013 solution working on my local machine, I had to manually rejigger the executable directories in the project configuration. It has trouble finding the compilers from Vs2010 if I don't do this. These changes pose a problem to maintaining my fork in a form consumable to the master branch.

I have need of one of two things. One, tips on how to fix the environment variables to make my local clean again. Or two, advice on how to use Git to interact with the repo but preserving the project properties on my local copy. Git stash doesn't seem correct for this, and git halts on unstaged, changed tracked files.

I have to admit that the use of the v90 toolset for a project development that is only being maintained in the Vs2013 environment and became incompatible with pre-Windows 7 a long time ago has me befuddled.

Because of civ's age, we can't use the 2013 environment compilers alone. The game crashes (I tested thoroughly). You have to have 2008 or 2010 compilers to make it work.

All environment variables should be stored in your .suo and project files- delete them and download the projects from the github repo.
 
All environment variables should be stored in your .suo and project files- delete them and download the projects from the github repo.
...

...

Utterly. Ridiculous. Demolishing my repo and starting over, redownloading, gave me a solution properties file whose executable directories were a smaller list than before.
And now it compiles.:wallbash:

... Computers, man. Gonna go blow off steam then get back to coding. :hammer:
 
Okay I just pushed the branch for the additions I tested to my fork. I added the Community Patch .civ5proj to the commit in the form that uses the original DLL, and committed the changed source files as well as the database update in a standalone xml file with an obvious name.

The reason I'm posting to this how-to thread is: Every time I build anything, Git highlights some contents of the Build directory as modified, unstaged files. I didn't explicitly modify these files - I never even opened "/PNM MODS DB/DIPLO/AI WARMONGER ADJUSTMENTS" or "/TEXT/CoreText_en_US.sql", so I'm not sure what to do with them. I'd like to just ignore them but they could be a problem down the line. It's confusing also because it only says that some of the files there are modified, when from my perspective either they all are, or none of them matter.

What do I tell Git to do with the Build directory's files, i.e. how do I maintain my working directory going forward?
 
Okay I just pushed the branch for the additions I tested to my fork. I added the Community Patch .civ5proj to the commit in the form that uses the original DLL, and committed the changed source files as well as the database update in a standalone xml file with an obvious name.

The reason I'm posting to this how-to thread is: Every time I build anything, Git highlights some contents of the Build directory as modified, unstaged files. I didn't explicitly modify these files - I never even opened "/PNM MODS DB/DIPLO/AI WARMONGER ADJUSTMENTS" or "/TEXT/CoreText_en_US.sql", so I'm not sure what to do with them. I'd like to just ignore them but they could be a problem down the line. It's confusing also because it only says that some of the files there are modified, when from my perspective either they all are, or none of them matter.

What do I tell Git to do with the Build directory's files, i.e. how do I maintain my working directory going forward?
Add the directory to the gitignore file.
 
Build/ is already a line in the gitignore. Line 45. Isn't doing any good. But it's nice to know I can ignore them.
I'll just not stage the files. If my foresight is correct, I just have to bear the mess until my changes are merged upstream and I resync with that.

I'm looking at upgrading the traderoute tooltip now. Just some string-building in LUA, but I gotta get all the tooltips. While I'm experimenting, would you confirm that CP/LUA/TradeRouteHelpers.lua is used for CP despite its line 1 annotation,
Code:
print("This is the modded TradeRouteHelpers from CBP")
?
 
Build/ is already a line in the gitignore. Line 45. Isn't doing any good. But it's nice to know I can ignore them.
I'll just not stage the files. If my foresight is correct, I just have to bear the mess until my changes are merged upstream and I resync with that.

I'm looking at upgrading the traderoute tooltip now. Just some string-building in LUA, but I gotta get all the tooltips. While I'm experimenting, would you confirm that CP/LUA/TradeRouteHelpers.lua is used for CP despite its line 1 annotation,
Code:
print("This is the modded TradeRouteHelpers from CBP")
?

The file is from the CBP. I just use it in the CP as well.
 
you need the source code and a matching PDB file to resolve the callstack where it's crashing. easiest way to get it is to pull the latest from github, do a debug build (should work right out of the box with the VC++ 2008 compiler) and drop the resulting DLL/PDB into the Community Patch folder. Now start the game, load the mod, attach the VS debugger, reproduce your crash and you should see exactly what goes wrong. Good luck!

Good tip thought I'd plonk it here
 
there's a solution file called VoxPopuli_vs2013.sln in the repository, use that to build and you should get the desired CvGameCoreExpansion2.dll/pdb. if you put the pdb next to the dll, the VS debugger will find it automatically and you don't need to set the symbol path manually.

but you need to have the 2008 toolchain installed, else you won't be able to link to the libs provided in the Civ5 SDK. note that you may still use a newer IDE version.

Con't
 
I tried to compile the 12-15 master. I got "gStackWalker not defined" error. I've added STACKWALKER to preprocessor definitions and needed to changle 1 #include because it couldn't find CvGameCoreDLLPCH.h (because those stackwalker files are in sub-folder, not the main folder). After that I managed to successfully compile the DLL and tested it in the game (works ok).
I have a question. I cannot compile vanilla and G&K versions - getting "enum redefine" error, which Idk how to fix. Anyway - are those old versions used for anything? Do I even need to compile them or change anything there?
 
I tried to compile the 12-15 master. I got "gStackWalker not defined" error. I've added STACKWALKER to preprocessor definitions and needed to changle 1 #include because it couldn't find CvGameCoreDLLPCH.h (because those stackwalker files are in sub-folder, not the main folder). After that I managed to successfully compile the DLL and tested it in the game (works ok).
I have a question. I cannot compile vanilla and G&K versions - getting "enum redefine" error, which Idk how to fix. Anyway - are those old versions used for anything? Do I even need to compile them or change anything there?
Expansion 2 DLL is all you need.

@ilteroi added some stuff in VS you may need to add to compile out of the box re:stackwalker. Also make sure you’re in VS 2008 or 2010.
 
Is anyone else having issues after compiling the DLL using the Github repository from the 04/11 update? I was compiling and using it just fine before the last commit. The issue is that the DLL compiles just fine, but when I try loading existing savegames the game crashes. Creating new games seems to work fine for some reason.

When I use the DLL provided by Gazebo in the 04/11 installer, my previous saves work just fine. I guess that there is something that has to be changed to guarantee compatibility with previous saves, that is not in the repository?
 
Top Bottom