whoward69
DLL Minion
Instructions on how to build the Community Patch (CP) DLL from the GitHub repository.
(Instructions on how to download and install the required tools are not given, if you can't find them on the web and figure out how to install them onto your own machine, the complexities of the spaghetti C++ code in the DLL are probably also beyond your reach.)
Download the Civ5 SDK from Steam. If you have previously downloaded it, use Steam to verify your SDK install to make sure you have the latest version of the source code. The SDK will end up in "C:\Program Files (x86)\Steam\SteamApps\common\Sid Meier's Civilization V SDK"
Install VS-2008 (C++) Express (it's a free download from Microsoft and you need the tools from this version to compile the DLL and it must be installed first) - you'll probably already have this installed as ModBuddy uses it.
Optional but assumed: Install VS-2010 (C++) Express (it's also a free download from Microsoft and it's a much nicer IDE)
Compile the unaltered DLL by copying the CvGameCoreSource sub-directory into the Visual Studio projects directory and then following the "How to compile the DLL" tutorial.
Do NOT compile the DLL source code directly in the SDK sub-directory created by Steam. If you verify the SDK any changes will be lost, also you need to keep a "clean" copy of the source code.
Make sure you can compile the unaltered DLL - if you can't, please post on that tutorial thread, NOT here
Do NOT proceed until you can compile the unaltered DLL. (If you can't do that, then what chance do you stand with the modded DLL???)
Create a GitHub account and log-in
Access "https://github.com/LoneGazebo/Community-Patch-DLL/tree/master"
Fork the repository
You will be redirected to you own copy at the end of the fork process)
Bookmark the new url (it'll be something like "https://github.com/{username}/Community-Patch-DLL")
Install the MS-Windows version of git - I'm using git installed in "c:\Program Files (x86)\Git" - you may want to add the bin sub-directory to your PATH
(There are "visual" alternatives to the command line version of git, eg Tortoise for Git, unfortunately these conflict with the source code control system I have to use for work, so I can neither use them nor help you with them!)
Clone the GitHub repository to your hard disk.
Using Windows Explorer, create somewhere to get a local copy of the repository to - I'm using "D:\gitroot\civ5"
Start an MS-DOS command prompt window
Start Visual Studio 2010
Open the project "D:\gitroot\civ5\Community-Patch-DLL\CvGameCoreDLL.vs2010.sln"
Wait for the project to open and scan the files (may take some time)
In the Soultion Explorer window, right click the solution name (Solution 'CvGameCoreDLL.vs2010') and select "Clean Solution" - this removes all temporary files, it's always a good idea to start with a clean slate!
Now right click the solution and select "Build Solution" - this will take some time, you can watch the process in the bottom Output window
Now right click on the CvGameCoreDLL_Expansion2 project in the Solution Explorer window and select Clean
Finally, right click on the CvGameCoreDLL_Expansion2 project in the Solution Explorer window and select Build.
There must be no errors and no code related warnings, you're output will look (something) like
continued in the next post
(Instructions on how to download and install the required tools are not given, if you can't find them on the web and figure out how to install them onto your own machine, the complexities of the spaghetti C++ code in the DLL are probably also beyond your reach.)
Download the Civ5 SDK from Steam. If you have previously downloaded it, use Steam to verify your SDK install to make sure you have the latest version of the source code. The SDK will end up in "C:\Program Files (x86)\Steam\SteamApps\common\Sid Meier's Civilization V SDK"
Install VS-2008 (C++) Express (it's a free download from Microsoft and you need the tools from this version to compile the DLL and it must be installed first) - you'll probably already have this installed as ModBuddy uses it.
Optional but assumed: Install VS-2010 (C++) Express (it's also a free download from Microsoft and it's a much nicer IDE)
Compile the unaltered DLL by copying the CvGameCoreSource sub-directory into the Visual Studio projects directory and then following the "How to compile the DLL" tutorial.
Do NOT compile the DLL source code directly in the SDK sub-directory created by Steam. If you verify the SDK any changes will be lost, also you need to keep a "clean" copy of the source code.
Make sure you can compile the unaltered DLL - if you can't, please post on that tutorial thread, NOT here
Do NOT proceed until you can compile the unaltered DLL. (If you can't do that, then what chance do you stand with the modded DLL???)
Create a GitHub account and log-in
Access "https://github.com/LoneGazebo/Community-Patch-DLL/tree/master"
Fork the repository
Spoiler :
You will be redirected to you own copy at the end of the fork process)
Spoiler :
Bookmark the new url (it'll be something like "https://github.com/{username}/Community-Patch-DLL")
Install the MS-Windows version of git - I'm using git installed in "c:\Program Files (x86)\Git" - you may want to add the bin sub-directory to your PATH
(There are "visual" alternatives to the command line version of git, eg Tortoise for Git, unfortunately these conflict with the source code control system I have to use for work, so I can neither use them nor help you with them!)
Clone the GitHub repository to your hard disk.
Using Windows Explorer, create somewhere to get a local copy of the repository to - I'm using "D:\gitroot\civ5"
Start an MS-DOS command prompt window
- d: (or whatever disk your local copy of the repository will reside on)
- cd \gitroot\civ5 (or whatever directory your local copy of the repository will reside within)
- "c:\Program Files (x86)\Git\bin\git" clone https://github.com/{username}/Community-Patch-DLL.git (the url to your forked copy of the repository is displayed to the right of the GitHub screen)
- cd Community-Patch-DLL
- "c:\Program Files (x86)\Git\bin\git" remote add upstream https://github.com/LoneGazebo/Community-Patch-DLL.git
Spoiler :
Start Visual Studio 2010
Open the project "D:\gitroot\civ5\Community-Patch-DLL\CvGameCoreDLL.vs2010.sln"
Wait for the project to open and scan the files (may take some time)
In the Soultion Explorer window, right click the solution name (Solution 'CvGameCoreDLL.vs2010') and select "Clean Solution" - this removes all temporary files, it's always a good idea to start with a clean slate!
Code:
1>------ Clean started: Project: CvGameCoreDLL_Expansion2, Configuration: Mod Win32 ------
2>------ Clean started: Project: CvGameCoreDLL, Configuration: Mod Win32 ------
3>------ Clean started: Project: CvGameCoreDLL_Expansion1, Configuration: Mod Win32 ------
========== Clean: 3 succeeded, 0 failed, 0 skipped ==========
Code:
1>------ Build started: Project: CvGameCoreDLL_Expansion1, Configuration: Mod Win32 ------
2>------ Build started: Project: CvGameCoreDLL, Configuration: Mod Win32 ------
3>------ Build started: Project: CvGameCoreDLL_Expansion2, Configuration: Mod Win32 ------
1>cl : Command line warning D9040: ignoring option '/analyze'; Code Analysis warnings are not available in this edition of the compiler
1> _precompile.cpp
2>cl : Command line warning D9040: ignoring option '/analyze'; Code Analysis warnings are not available in this edition of the compiler
2> _precompile.cpp
3>cl : Command line warning D9040: ignoring option '/analyze'; Code Analysis warnings are not available in this edition of the compiler
3> _precompile.cpp
... LOTS OF LINES REMOVED ...
========== Build: 3 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
Now right click on the CvGameCoreDLL_Expansion2 project in the Solution Explorer window and select Clean
Finally, right click on the CvGameCoreDLL_Expansion2 project in the Solution Explorer window and select Build.
There must be no errors and no code related warnings, you're output will look (something) like
Code:
1>------ Build started: Project: CvGameCoreDLL_Expansion2, Configuration: Mod Win32 ------
1>cl : Command line warning D9040: ignoring option '/analyze'; Code Analysis warnings are not available in this edition of the compiler
1> _precompile.cpp
1>cl : Command line warning D9040: ignoring option '/analyze'; Code Analysis warnings are not available in this edition of the compiler
... continued in the spoiler
Spoiler :
Code:
... continued from above
1> CvCityManager.cpp
1> CvTargeting.cpp
1> CustomMods.cpp
1> CvAchievementUnlocker.cpp
1> CvAchievementInfo.cpp
1> CvAdvisorCounsel.cpp
1> CvAdvisorRecommender.cpp
1> CvAIOperation.cpp
1> CvArea.cpp
1> CvArmyAI.cpp
1> CvAStar.cpp
1> CvBarbarians.cpp
1> CvBeliefClasses.cpp
1> CvBuilderTaskingAI.cpp
1> CvBuildingClasses.cpp
1> CvBuildingProductionAI.cpp
1> CvCity.cpp
1> CvCityAI.cpp
1> CvCityCitizens.cpp
1> CvCityConnections.cpp
1> Generating Code...
1> Compiling...
1> CvCitySpecializationAI.cpp
1> CvCityStrategyAI.cpp
1> CvCultureClasses.cpp
1> CvDangerPlots.cpp
1> CvDatabaseUtility.cpp
1> CvDealAI.cpp
1> CvDealClasses.cpp
1> CvDiplomacyAI.cpp
1> CvDiplomacyRequests.cpp
1> CvEconomicAI.cpp
1> CvEmphasisClasses.cpp
1> CvEspionageClasses.cpp
1> CvFlavorManager.cpp
1> CvFractal.cpp
1> CvGame.cpp
1> CvGameCoreDLL.cpp
1> CvGameCoreEnumSerialization.cpp
1> CvGameCoreUtils.cpp
1> CvGameQueries.cpp
1> CvGameTextMgr.cpp
1> Generating Code...
1> Compiling...
1> CvGlobals.cpp
1> CvGoodyHuts.cpp
1> CvGrandStrategyAI.cpp
1> CvHomelandAI.cpp
1> CvImprovementClasses.cpp
1> CvInfos.cpp
1> CvInfosSerializationHelper.cpp
1> CvInternalGameCoreUtils.cpp
1> CvMap.cpp
1> CvMapGenerator.cpp
1> CvMilitaryAI.cpp
1> CvMinorCivAI.cpp
1> CvNotificationClasses.cpp
1> CvNotifications.cpp
1> CvPlayer.cpp
1> CvPlayerAI.cpp
1> CvPlayerManager.cpp
1> CvPlot.cpp
1> CvPlotInfo.cpp
1> CvPlotManager.cpp
1> Generating Code...
1> Compiling...
1> CvPolicyAI.cpp
1> CvPolicyClasses.cpp
1> CvPopupInfoSerialization.cpp
1> CvPopupReturn.cpp
1> CvPreGame.cpp
1> CvProcessProductionAI.cpp
1> CvProjectClasses.cpp
1> CvProjectProductionAI.cpp
1> CvPromotionClasses.cpp
1> CvRandom.cpp
1> CvReligionClasses.cpp
1> CvReplayInfo.cpp
1> CvReplayMessage.cpp
1> CvSiteEvaluationClasses.cpp
1> CvStartPositioner.cpp
1> cvStopWatch.cpp
1> CvStructs.cpp
1> CvTacticalAI.cpp
1> CvTacticalAnalysisMap.cpp
1> CvTeam.cpp
1> Generating Code...
1> Compiling...
1> CvTechAI.cpp
1> CvTechClasses.cpp
1> CvTradeClasses.cpp
1> CvTraitClasses.cpp
1> CvTreasury.cpp
1> CvTypes.cpp
1> CvUnit.cpp
1> CvUnitClasses.cpp
1> CvUnitCombat.cpp
1> CvUnitCycler.cpp
1> CvUnitMission.cpp
1> CvUnitMovement.cpp
1> CvUnitProductionAI.cpp
1> CvVotingClasses.cpp
1> CvWonderProductionAI.cpp
1> CvWorldBuilderMapLoader.cpp
1> CvDllBuildInfo.cpp
1> CvDllBuildingInfo.cpp
1> CvDllCity.cpp
1> CvDllCivilizationInfo.cpp
1> Generating Code...
1> Compiling...
1> CvDllColorInfo.cpp
1> CvDllCombatInfo.cpp
1> CvDllContext.cpp
1> CvDllDatabaseUtility.cpp
1> CvDllDeal.cpp
1> CvDllDealAI.cpp
1> CvDllDiplomacyAI.cpp
1> CvDllDlcPackageInfo.cpp
1> CvDllEraInfo.cpp
1> CvDllFeatureInfo.cpp
1> CvDllGame.cpp
1> CvDllGameAsynch.cpp
1> CvDllGameDeals.cpp
1> CvDllGameOptionInfo.cpp