# How do I get the source code from a Google Code game project?

I'm trying to get the Hedgewars source code. When I went to the downloads tab, it doesn't specify which is the actual game. I tried downloading it using the SVN Checkout on Tortoise, but it seems like it doesn't work on the browse section of Source.

(Hg>project_files>Android_build>SDL-android-project)

I then proceeded to the wiki but I got stuck at step two because I don't know anything about Mercurial. Some other things I don't know from the wiki is "FreePascal" "Android NDK" and "Tar" files. They are new to me so I am really confused.

So my question is, how can I download the source code from Hedge Wars for Android without having to browse the source code inside the source tab?

• I also want this question answered in a general response because I would like to download and learn more from other source codes in the future – Blue Mar 21 '12 at 17:42
• Mercurial is an alternative to SVN, you will probably need to install someting like TortoiseHg (HG is the element mercurial) to download from the repositories. As for FreePascal it's a programming language. And the Android NDK is something used to write native code for android device. It's probably used by the Hedgewars guys. – Roy T. Mar 21 '12 at 17:48
• Afaik hedgewars is a mix of freepascal with some C++. (SDL?) probably need the NDK for assembler+linking (and maybe the C++ compiler) – Marco van de Voort Oct 27 '16 at 9:21

Google Code supports several version control systems (SVN, Mercurial and git as of this writing). Hedgewars appears to be using Mercurial, as you can see from the Source -> Checkout tab on Google Code. To get the code, you must clone the repository as described on that page, using either the command line Mercurial tools or a GUI wrapper like TortoiseHg.

In general, to get the code from any Google Code project, you navigate to that project's Source -> Checkout page and follow the instructions. Some projects will also create .zip or tarballs of the their code and host them on the Downloads tab, but Hedgewars does not appear to do this currently, so you'll have to get the code the aforementioned way.

Some projects also provide a wiki page, like the one you linked, that further explain any dependencies or special steps you'd need to take to acquire and build the code. Not all projects do this, however.

• Thanks but I'm getting an error from the cloning. hg clone hedgewars.googlecode.com/hg hedgewars - I copied from https to hegewars and inserted it into the Source, and I put my destination to an empty folder on the desktop. But an error comes up. – Blue Mar 21 '12 at 19:11
• "an error" isn't helpful -- you should specify which error. – user1430 Mar 21 '12 at 19:19
• Sorry, the program was unresponsive so i was forced to close it so i couldn't get the error message, I'm cloning it right now. – Blue Mar 21 '12 at 19:24

To checkout the source code you need to use mercurial as there is no official svn repository. Simply hg clone https://code.google.com/p/hedgewars/ as stated on the google code page.

If you are not comfortable with the command line you can try using one of the Mercurial user interfaces.

If you don't want to use mercurial the download section on the hedgewars website has a direct link to a compressed archive of the source code.