Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: karajorma on March 21, 2008, 07:23:06 am
-
Shamelessly stolen from the old "How to use TortoiseCVS" post :D
Here's how you set things up
- Go to the Tortoise SVN homepage (http://tortoisesvn.tigris.org/) and download the latest version
- Install it. You'll have to restart your PC afterwards
- Make a new folder on your HD where you'd like to install the code. You'll need a fair bit of space for the code + the intermediate files created when building it.
- Press right mouse in the new folder and choose SVN Checkout from the list.
(http://homepage.ntlworld.com/karajorma/FAQ/FAQ-Images/Coding/CheckingOutSVN1.jpg) - An new window will open up. Cut and paste this into the URL of repository box svn://svn.icculus.org/fs2open/trunk/fs2_open
- By default the HEAD revision will be selected. You probably don't want to change this. Your screen should now look like this
(http://homepage.ntlworld.com/karajorma/FAQ/FAQ-Images/Coding/CheckingOutSVN2.jpg) - Press OK to begin downloading from the repository. The process shouldn't take long if you have a reasonably fast connection.
-
We should probably start referring to it as "trunk" now, to distinguish it from "HEAD". New source control, so new terminology. Also, we want to prevent people from getting confused and saying, "Wait, didn't you say to never ever ever check out HEAD?"
-
True but the program refers to it as HEAD so at least here that's what I have to call it. :D Besides, what used to be called HEAD is currently also in the trunk folder so that's likely to cause some confusion too.
-
GREAT :yes: :yes:
I've updated Wiki (http://www.hard-light.net/wiki/index.php/Getting_the_FreeSpace2:_SCP_Source_Code) but please:
- Fix the stupid things that I've probably written. :nervous: :nervous:
- Someone has to add the images. I can't do it.
- Someone has to update the Unix help.
- When you have finished setting up the repository, I think you should explain how to get:
- The original FS2 and FRED2 code.
- The different available unstable and stable branches (with whichever new names they have)
-
True but the program refers to it as HEAD so at least here that's what I have to call it. :D Besides, what used to be called HEAD is currently also in the trunk folder so that's likely to cause some confusion too.
Actually, HEAD is the very most recent revision, regardless of branch. I think I confused some terms when I set up the original 3.6.9 arrangement. :)
-
What differences are there between svc and ftp, and what are the advantages of using one over the other?
-
If I've been working on a piece of code and another programmer also has SVN will merge both pieces of code together and (generally) allow me to update my code with everyone else's fairly painlessly.
Now imagine trying to do that from an FTP? First I'd have to figure out which pieces of code are new, then I'd have to manually compare them against my own files if I'd altered the same one, then I'd have to merge in any changes by hand.
That's not the only difference but that one alone makes it worth it. FTP is great if you have files that only one person changes. Otherwise you need some kind of versioning to make sure new stuff isn't overwritten by old stuff.
-
If I've been working on a piece of code and another programmer also has SVN will merge both pieces of code together and (generally) allow me to update my code with everyone else's fairly painlessly.
Now imagine trying to do that from an FTP? First I'd have to figure out which pieces of code are new, then I'd have to manually compare them against my own files if I'd altered the same one, then I'd have to merge in any changes by hand.
That's not the only difference but that one alone makes it worth it. FTP is great if you have files that only one person changes. Otherwise you need some kind of versioning to make sure new stuff isn't overwritten by old stuff.
Thank you.
-
Now how do I use the code I now have. Do I need a compiler or something?
-
Yes and no. You need a compiler to make you own builds, but to simply fiddle with the code, all you really need is a text editor and some understanding of c/c++. Using an IDE or a programming-oriented editor (like emacs), when messing with the code makes things much easier though, so getting something like Visual Studio Express set up on your system will be worth the effort if you intend to get serious about it.
And once you've made some changes and want to post a patch, winmerge is a good choice for making it.
-
No, I just want to make an .EXE or whatever. And on a side note, is C to advanced a code to start out with?
-
To make an exe then, yes, you do need a compiler. The one included with visual studio express will do it, though you won't be able to compile FRED with it, as will gcc if you're running linux.
C is sort of an intermediary language, making it a bit more complex than a true high level language, but I wouldn't call it too advanced. I know several people whose first true programming language was C. If you know any Java, that might even make it easier to get started, as the syntax is similar in many ways. Perhaps the big thing about C is that it lets you make mistakes - You are given power to do stuff, but with that, you are also given the power to mess things up horribly.
-
So how would I go about doing this?
-
Umh?
Go to MS Express Edition page and download the whole lot in a DVD install or do one of web installs. After you finish the installation and having downloaded the FS Open sourcecode from SVN start the C++ express edition, go to 'file > open > project or solution'. Go to the directory where you placed the fs open sourcecode and select 'projects > MSVC_2005 > Freespace2.sln'. Wait a bit for it load properly. And assuming you had everything setup already all you need to do now is to select either debug or release option from the top menu and then select from the top bar 'build -> build solution'.
Or did you mean something else?
-
No, that's what I want. To make an .EXE.
-
Well the procedure i described should have produced an .exe file.. To projects/msvc_2005/debug (or release) directory...
-
It had to convert it, and said "Some Warnings". Is that OK?
-
Warnings are ok (I've never been able to compile with less than 3 warnings, myself, except by turning them off), errors are not. Basically, as long as it produces an exe, you're in business.
-
Btw, without a full copy of Visual C++, you won't be able to compile FRED. It requires the MFC (Microsoft Foundation Classes), which the Express editions do not come with. Neither do the additional SDKs. So, just for compiling FSO, you only need VC++ Express 2008. You should be able to convert the VS2005 project in place and compile with no additional changes necessary. I copy the 2005 project folder to a new one so it doesn't interfere with Tortoise every time I want to update the local code base.