Best practices DLL development?

fufie

Peanut Farmer
Joined
Jan 3, 2013
Messages
118
Location
Norway
Various tips for how to develop efficiently with the develop with the DLL seems to be scattered about in various threads. Would it be a good idea to gather some of the good tips in one thread?

Current workflow which feels a bit clunky:
- Has the dll solution opened in VS2008 and disabled the vanilla project (I only need/want the G&K).
- Every build seems to compile everything, something seems wrong with the dependencies, if I only change a .cpp ideally only a new .obj should be generated and then linking. Now it seems to build everything.
- After build, copy dll to mod directory
- In ModBuddy rebuild the mod. The mod has been set up with not altering saves to allow old savegames to use the mod even if a new build implies a new version.
- In Civ5: Mods>Select mod>Load game to a game where I can test the feature I develop.
- Using CUSTOMLOG (from the dll build thread) for logging to a file, which a cygwin window has 'tail -f' on. Can tuner be set up to merge from my custommod logging file too?

Cheers :)
 
Current workflow which feels a bit clunky:
- Has the dll solution opened in VS2008 and disabled the vanilla project (I only need/want the G&K).
VS2008 is long dead, you can edit and build in VS2010 (which is also dead but at least it's warmer than 2008)

- Every build seems to compile everything, something seems wrong with the dependencies, if I only change a .cpp ideally only a new .obj should be generated and then linking. Now it seems to build everything.
Could be a 2008 issue, or you're editing a .h file (and changing the .pch file as a consequence) or asking for a full rebuild (eg by using F7). In 2010 if you use F7 or Build from the top menu it will recompile everything, however if you right click the project in Solution Explorer and build from there it will only recompile the .cpp files that actually changed
- After build, copy dll to mod directory
- In ModBuddy rebuild the mod. The mod has been set up with not altering saves to allow old savegames to use the mod even if a new build implies a new version.
If all you're changing is the dll, you can short-cut the ModBuddy build and copy the dll into both the ModBuddy project area and directly into the built mod folder in the MODS sub-directory
- In Civ5: Mods>Select mod>Load game to a game where I can test the feature I develop.
- Using CUSTOMLOG (from the dll build thread) for logging to a file, which a cygwin window has 'tail -f' on. Can tuner be set up to merge from my custommod logging file too?
FireTuner will only view the lua.log file (and I've found no way to safely write into that file from C++), but there are various other log file browsers out there that will open multiple log files at once, eg BareTail
 
Back
Top Bottom