3 Replies - 1365 Views - Last Post: 22 May 2013 - 03:16 PM

#1 DreamBliss  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 10
  • Joined: 16-January 12

How do I use the source code I have downloaded?

Posted 20 May 2013 - 05:13 AM

I am really frustrated right now, not thinking clearly, if this is not the right section for this go ahead and move it.

I will illustrate my problem with an example. Say I have gone to the page where ID has placed source code for its old games. I have been told over and over again I need to study code, to tinker with it. So I am taking that advice and trying to do this. Now we will not use the ID page as it is, need to throw in some things someone like me might encounter elsewhere but we'll stick with our example.

Anyhow the ID source is stored on GitHub if memory serves. There's a Download Master or something you can get a copy of everything from. Pretty self explanatory. 7 or 8 times out of 10 getting source code I want to study is not a problem. But what about Subversion? What about these places that take you to seemingly endless FTP links? How do you get the code there? How do you install Subversion or stuff like that on a Windows XP computer and get the code that way? This is the first hurdle.

OK, say we were lucky, as in the case of ID. We have our master. We're also somewhat proficient in our operating system, Windows XP. Can't be a programmer unless you know your way around your OS, right? So extracting is easy. Now we have a bunch of folders, and inside them a bunch of files. We've reached the second hurdle!

This is where I am stuck. I have Doom, Doom3, Quake, CWE (early build of the Uru engine) and a game someone sent me so I could study its editor. How in the heck do I put all this stuff in CodeBlocks or Visual Studio Express? What do I need to do in the IDE? What options do I need to set? How do I configure everything?

Of course the third hurdle is compiling it once you have it all put together in an IDE correctly. Not sure what awaits after that.

I can open a .cpp or .h file in Notepad or CodeBlocks (my preferred IDE) and study the code that way. But in order to tinker with things, figure out how stuff works, well I need to get it compiled and running. I don't know what this process is called, of getting some source code, extracting it, and stuffing it into an IDE so it can be compiled and run. But this is what I would like to know how to do.

If you know of any books I should read, written or video tutorials, could you post the information or links? Also you can consider this a tutorial request. You could even use something like Crystal Space 3D for the project, as the same principles would apply there as far as getting the source code then compiling it.

Please help me with this! I would greatly appreciate it!

Is This A Good Question/Topic? 0
  • +

Replies To: How do I use the source code I have downloaded?

#2 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3616
  • View blog
  • Posts: 11,262
  • Joined: 05-May 12

Re: How do I use the source code I have downloaded?

Posted 20 May 2013 - 06:08 AM

View PostDreamBliss, on 20 May 2013 - 08:13 AM, said:

But what about Subversion? What about these places that take you to seemingly endless FTP links? How do you get the code there? How do you install Subversion or stuff like that on a Windows XP computer and get the code that way?


Yes, you install the appropriate source control client for whatever is hosting the source code you want. If you are lucky, some sites offer multiple SCM (Source Control Management) interfaces even if their backend data is actually stored in a particular SCM package.

If they offer FTP, try to find the FTP option that lets you download everything as a single file (.zip, .tar, etc.).
Was This Post Helpful? 0
  • +
  • -

#3 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3616
  • View blog
  • Posts: 11,262
  • Joined: 05-May 12

Re: How do I use the source code I have downloaded?

Posted 20 May 2013 - 06:14 AM

View PostDreamBliss, on 20 May 2013 - 08:13 AM, said:

This is where I am stuck. I have Doom, Doom3, Quake, CWE (early build of the Uru engine) and a game someone sent me so I could study its editor. How in the heck do I put all this stuff in CodeBlocks or Visual Studio Express? What do I need to do in the IDE? What options do I need to set? How do I configure everything?


If you are lucky, the will have .SLN or .CBP files along with the source code. If not so lucky, they may have Emacs, CodeWright, SlickEdit, or Code Warrior project files. Usually these will refer to a makefiles, jam files, a build script. If you are really unlucky, then you'll find just makefiles, jam files, Ant scripts, or a simple batch file called "build.bat" or "build.cmd". If you don't have the premade .SLN or .CBP files, then you'll have to recreate the project by hand by examining the makefiles, jam files, build scripts, etc.

If the project's whose source code you downloaded believes in the "code + tools = products" philosophy, then they would have checked in their entire build environment, including needed tools and settings, in along with the source code. If they don't, then you'll have to dig around to figure out how to replicate their build environment. Often, the build scripts hint at what needs to be in the environment.

This post has been edited by Skydiver: 20 May 2013 - 06:18 AM

Was This Post Helpful? 0
  • +
  • -

#4 Momerath  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1012
  • View blog
  • Posts: 2,444
  • Joined: 04-October 09

Re: How do I use the source code I have downloaded?

Posted 22 May 2013 - 03:16 PM

I didn't check the others, but Doom3 has a README.TXT file at the root of the directory with instructions on how to compile it.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1