Installing and using the SDK

You don't need the .obj files. They are created by the compiler. Rhye probably used the old version of CodeBlocks (now unavailable) or Visual Studio 2003 (also unavailable). If you don't know how to alter a makefile (I don't either), I'm afraid you're just stuck.

He used Visual Studio. EmperorFool helped me with the makefile, so I'm good.
 
I am trying to install the Microsoft Platform SDK but I keep getting this error.

Error: Setup was stared in a non-native or WoW enviroment.
Please run the setup package that is appropriate for your operating system installation.

I am using Windows 7 64 bit version. So what do I do now? I am trying to follow the links that were on the main page and on the Wiki but still keep getting this error.

I am learning so not sure what to do now. Any one can help me?
 
I'm having the same blasted problem... and it doesn't help I'm completely noob to this whole thing and trying desperately to make sense of terms I have no concept what they could mean, why I'm downloading this, why its required etc... I can modify many of the pages in the DLL file so why do I need all this exactly? Something about 'making the changes work' so far as I can tell? And how does the SDK not being able to install affect this process? I'm thinking it's pretty much a shutdown to being able to accomplish quite a few things but I really don't know yet as I can't install it to find out what it does...

However, after some investigation, this link might prove helpful... I'm still trying to figure out how all the puzzle pieces go together but I think this one fits the gap.
 
I'm having the same blasted problem... and it doesn't help I'm completely noob to this whole thing and trying desperately to make sense of terms I have no concept what they could mean, why I'm downloading this, why its required etc... I can modify many of the pages in the DLL file so why do I need all this exactly? Something about 'making the changes work' so far as I can tell? And how does the SDK not being able to install affect this process? I'm thinking it's pretty much a shutdown to being able to accomplish quite a few things but I really don't know yet as I can't install it to find out what it does...

However, after some investigation, this link might prove helpful... I'm still trying to figure out how all the puzzle pieces go together but I think this one fits the gap.

First thing's first:
AFAIK, the relevant Microsoft Platform SDK is 32bit only, which means that if you are running a 64 bit OS you should run this installer as a 32 bit application (since I have 32bit XP, I have no idea how to do it, but it should be possible).

I think (but am not sure) that installing the SDK you have linked to won't help, since it might be 64 bit so Civ won't be able to load whatever you compile from it, since it is a 32 bit process. But I could be mistaken (it might contain 32bit-related files as well).

Regarding the entire process and utilities you need to download -

The Visual Studio (and apparently some would say - Code Blocks) is an IDE (integrated development environment) which allows you to edit, compile and debug the code. It has its express version which is free. I understand that VS2010 express won't allow you to debug Civ4 DLL (I have no idea if it's true, but that's what I've read here) so you should probably use VS2008 express.

The Visual C++ toolkit (and the extra .lib files) supply your compilation with the basic C/C++ functionality, and some tools you need to create the DLL such as the compiler and the linker.

The Microsoft Platform SDK gives you more tools you need to compile in a Windows environment, such as the nmake (which uses the makefile) and more functionality as it is implemented in Windows.

The makefile is basically a file which says which source files should be compiled, what should linked with what, and which tools and libraries to use.
You might want to use DannyDaemonic's make file.

There might be alternatives to some (or all) of these, but this is how people started compiling the Civ4 DLL, so this is how people do it now ;)

Hope it makes more sense now.
 
Ok, from what I can tell then, you're right and this file should work instead then. I'm still a bit confused as to why this is necessary but I'll keep reading ;)
 
I just read Asaf's explanation above and understood nothing. :lol: Its not like I'm even trying to figure this out myself, but this compilation thing just involves so much... junk. I guess I should have kept programming from childhood on and then I would surely already have mastered C++. Then I would probably be able to make this happen without any of the outdated guides and whatnot.
 
I just read Asaf's explanation above and understood nothing. :lol: Its not like I'm even trying to figure this out myself, but this compilation thing just involves so much... junk.

That makes me a bit sad, but since Thunderbrd asked for the why's and you're not interested in them, I guess it's OK.
I just hope my explanation was understandable at all.
 
Oh, I'm sure it makes perfect sense to someone like Thunderbrd, who already tried to do compile - even if he failed. I'm sure you would be able to both figure out the easiest, most straight forward way of compiling the SDK - and to put it all down in a readable, easy-to-follow guide.

In fact - if you do write a brand new guide, then I will make a point out of trying to compile my own DLL by following it to the letter. Even if I fail, then you will get the full report on how I managed to fail. So that the guide can be make as fool-proof as possible.

I think its time to get this issue under control, once-and-for-all. Newcomers seem to all fall into some of the same pitfalls, simply because there is no one unambiguous and updated source of information. I'm sure everyone agrees - its just a matter of someone actually investing the time and effort. You clearly have the expertise, at least. :king:
 
I've been working like a bull on this and I think I got one done successfully, except that I stupidly allowed Demonic's little addition of another file, fastdep, to throw me off the trail right near the end. I was having a hard time understanding where exactly his file was supposed to go and I think I ended up screwing up my file structures for my microsoft programs there. It didn't help that I accidentally installed the 2010 version before I realized I'd need the 2008 version and now I have so many files on the subject that I've gotten them all discombubulated.

So I think I'm going to start back over from scratch again and uninstall the lot of it all and then reinstall only what I need.

Actually, having worked through the tutorial, I think we might be making a mountain out of a molehill here. In short, from what I'm getting regarding the whole process, which needs some explaining where various elements of the actions are concerned, (why we're doing what we're doing each step of the way, not just do this do that, is what I need to really understand the process), my impression is that this is just the basic function we need to commit after we've adjusted the dll source files however we like. Otherwise, its only a final step and the rest is much the same as python modding.

However, this is only one step in really understanding what we're doing here. I'm going to need to get a serious clue as to how the references are calling out to other files and so on, a 'structural map' per se, to really grasp how to make all this work. I plan to just stick to analyzing current language structures for a while, trying to find some references on the language itself that will fill in the gaps of my understanding of what I'm reading for now. But eventually, I should be able to get a clear picture of this, I can even see the fuzzy thing on the horizon.

Actually, Baldyr, after all your expertise in Python has been clearly demonstrated, I'm deeply shocked you're struggling with this at all! I must admit, the tutorial doesn't put everything in really clear terms and it takes some thinking around what the guy could mean to put it all together.
 
Well, I'm chocked that you feel the need to actually understand everything that is involved. I thought the point of the guide(s) was to be able to follow some simple steps and be done with the DLL compilation. :p

And any knowledge in Python is utterly useless for something like this. Python requires no compilation at all - in fact, you can edit it while the game is running - so C++ modding seems like less fun to me. I bet I'd spend more time compiling than I would do programming. :rolleyes:
 
From my brief experience there, compiling did not take long really. Would get faster with practice. And the Python coding is nearly identical in theory if not in structure to C++ and the C++ gives more functionality and faster processing. From what I can tell, the Python is sort of a sluggish gap fill portion of the overall picture, a place where quick edits that can't be done in the XML can be made, but with some limited scope. Your understanding of Python would largely spread to the coding process in C++.

Yeah, it drives me nuts to just do things without understanding why I'm doing it or how slight adjustments to what I'm doing would impact the final result. Makes me feel I'm missing the point somehow.
 
@Thunderbrd - well, now you lost me.
I don't understand what you don't understand, or what kind of information you need and can't find.

I tried giving you an overview of the components (I admit it lacked in details, but I didn't want to write too much), but apparently you need something more.

Try asking specific questions.
 
Ok, from what I can tell then, you're right and this file should work instead then. I'm still a bit confused as to why this is necessary but I'll keep reading ;)

Well, that also doesn't work, I can't install it. First, it stopped after, I guess, it had completed a sixth of the install bar, and after waiting something like 10 minutes, I closed it. It couldn't be closed though, it needed to do something, so I waited for it to do whatever it wanted to, but after 5 minutes with again no progress, I used Ctrl Alt Delete to close it. Now, however, I can't even launch the installation process, because the Windows installer is installing something else, or whatever it sayed. Restarting the computer solves nothing, and it sure isn't installing anything else. It also isn't sneakily working on the background, as far as I can see with the task manager.
 
@Thunderbrd - well, now you lost me.
I don't understand what you don't understand, or what kind of information you need and can't find.

I tried giving you an overview of the components (I admit it lacked in details, but I didn't want to write too much), but apparently you need something more.

Try asking specific questions.

My last comments weren't really aimed at you. And yeah, I may have some questions but I'll wait til' I've done this a couple times before asking them.



I had an easy time downloading that file the first time around but I'm having a bit of similar trouble now. It seems that once you've tried to use that file once, it doesn't like you trying to use it again so it takes redownloading... hmph. I'll have more advice on the subject later.
 
From my brief experience there, compiling did not take long really. Would get faster with practice. And the Python coding is nearly identical in theory if not in structure to C++ and the C++ gives more functionality and faster processing. From what I can tell, the Python is sort of a sluggish gap fill portion of the overall picture, a place where quick edits that can't be done in the XML can be made, but with some limited scope. Your understanding of Python would largely spread to the coding process in C++.
I agree, but just looking at the SDK makes me think that it would be no fun to edit it. :p I guess it would be worth the effort nonetheless. But I do mod and code for fun.

Yeah, it drives me nuts to just do things without understanding why I'm doing it or how slight adjustments to what I'm doing would impact the final result. Makes me feel I'm missing the point somehow.
Yeah, I can totally sympathize. But in this case I would be soo happy if I could just hit a button and the whole thing would sort itself out. (Especially since its not supposed to be a process where you need to set any parameters differently every time or make any other considerations. Just repeat the same steps as last time, and hope that you haven't forgotten how to jump through some of those hoops.)

I wouldn't even mind all the waiting for the end result. So I don't really feel the need to understand any of it, because, well, its technical. I'm that way about the car, also. :lol:
 
Well, that also doesn't work, I can't install it. First, it stopped after, I guess, it had completed a sixth of the install bar, and after waiting something like 10 minutes, I closed it. It couldn't be closed though, it needed to do something, so I waited for it to do whatever it wanted to, but after 5 minutes with again no progress, I used Ctrl Alt Delete to close it. Now, however, I can't even launch the installation process, because the Windows installer is installing something else, or whatever it sayed. Restarting the computer solves nothing, and it sure isn't installing anything else. It also isn't sneakily working on the background, as far as I can see with the task manager.

Having a bit of trouble with this too... It seems to download every so often and I'm wondering if its my hazy internet connection causing trouble. So far, after many attempts, the best result I've had so far was to remove the program entirely and start again. But I'm reluctant to do that again since I seem to have a good amount of the program elements fully in place already and it really takes a heck of a long time to download.

The first time I downloaded this (and it seemed to be successful at the time) I had 2010 express installed... I wonder if that simplified it somehow. Anyhow, if you have trouble trying to run the installer again, it seems to be because the installer does these intermittent downloads throughout the process and will check to see if it is a 'signed' file, a status which seems to only work the first time you try to use the file so it needs redownloaded on every attempt.

I'm thinking of trying the ISO version if this doesn't work out too well and we'll see if that works any better. Might be a longer download but the thing really needs to download EVERYTHING and then have a go at installing I think.
 
Well, it seems that somehow, today, without doing anything new other than double clicking on the .exe yet again, it actually could remove itself and then install itself... But how can I merge the CvGameCoreDLL.dll's of RevDCM and that of the BonusCommerceModifiers mod (which I found in this topic (http://forums.civfanatics.com/showthread.php?t=405005))?

EDIT: Copied from another thread:

Well, I've tried everything, but still, the compiling doesn't work. Here's what I do and have, exactly:

I have created a MyMod folder in BTS, in it are the files:

CvGameCoreDLL.ncb
CvGameCoreDLL.sln
CvGameCoreDLL.vcproj
What seems to be a backup presumely caused by a failed compilation, CvGameCoreDLL.vcproj.*the computer's / user's name*
a .7z file that I downloaded from your guide
depends
Makefile
MakefileORG (the one where I hadn't changed the path locations, thus, the original, hence the ORG)
sources.mk

And any other files from your guide which I needed, including the map CvGameCoreDLL if I remember correctly. Your guide said something about opening a file inside that map, if I remember correctly, although I hadn't put that file in that map, but instead, just in the MyMod folder. I tried both ways anyway. Both, however, gave an error, it couldn't find a location, the path was wrong, something like that.

Then, experimenting, I also put in the BTS folders, and overwrote those with the RevDCM folders (which I already had merged with that BonusCommerceModifiers mod). Yet, still, a path was wrong, it gave the same error. As was to be expected.

1>------ Build started: Project: CvGameCoreDLL, Configuration: Release Win32 ------
1>Performing Makefile project actions
1>Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>Het bestand is niet gevonden
1>Het bestand is niet gevonden
1> "C:\Program Files (x86)\Microsoft Visual Studio 9.0\bin\cl.exe" /nologo /MD /O2 /Oy /Oi /G7 /DNDEBUG /DFINAL_RELEASE /Fp"Release\CvGameCoreDLL.pch" /GR /Gy /W3 /EHsc /Gd /Gm- /DWIN32 /D_WINDOWS /D_USRDLL /DCVGAMECOREDLL_EXPORTS /Yu"CvGameCoreDLL.h" /IBoost-1.32.0/include /IPython24/include /I"C:\Program Files (x86)\Microsoft Visual Studio 9.0/include" /I"C:\Program Files (x86)\WindowsSDK/Include" /I"C:\Program Files (x86)\WindowsSDK/Include/mfc" /I"C:\Program Files (x86)\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword\CvGameCoreDLL\Boost-1.32.0/include" /I"C:\Program Files (x86)\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword\CvGameCoreDLL\Python24/include" /YcCvGameCoreDLL.h /Fo"Release\_precompile.obj" /c _precompile.cpp
1>C:\Program wordt niet herkend als een interne
1>of externe opdracht, programma of batchbestand.
1>NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\bin\cl.exe' : return code '0x1'
1>Stop.
1>Project : error PRJ0019: A tool returned an error code from "Performing Makefile project actions"
1>Build log was saved at "file://c:\Program Files (x86)\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword\MyMod\Release\BuildLog.htm"
1>CvGameCoreDLL - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Well, that's the error. I'm guessing I'm doing something stupid, but I can't figure out what...
 
Back
Top Bottom