Getting the source

From Unvanquished
Jump to: navigation, search

The Unvanquished source code is hosted on GitHub. You can either download a snapshot of the source code in ZIP archive form, or you can use Git to clone the repository.

Installing Git

If you already have Git installed, you can skip this step.

Windows

Windows users can acquire Git from the MSysGit project. If you would prefer a graphical front-end, there is TortoiseGit, but MSysGit must be installed regardless.

Mac OS X

Apple has included Git with Xcode since version 4. You may download Xcode from Apple's developer website. Please note that while XCode 4 was available for a very brief time for 32-bit and Snow Leopard users for a small price ($5 from the Mac App Store), this is no longer the case; it is now free, but available only to 64-bit Lion users. Snow Leopard (10.6) users and prior may now only use XCode 3, which does not include Git. If you are one of these users, you may acquire a copy of Git from its site. A selection of GUIs for Git is also available.

Linux

Debian & Ubuntu

Install Git using the package manager:

$ sudo apt-get install git

Downloading the source

Command line

The following commands will work on any platform.

$ git clone https://github.com/Unvanquished/Unvanquished.git

This will create a directory called Unvanquished.

If you would like to get the source for a particular version, check out the associated tag:

$ git checkout v0.37.0

To see the list of tags (versions) available to check out,

$ git tag

will produce a list.

Linux

Please see the command line instructions.

Mac OS X

Command Line

Open a Terminal (/Applications/Utilities/Terminal) and follow the command line instructions.

Xcode 4

  1. Start Xcode.
  2. Open the Organizer window (Window → Organizer or ShiftCommand ⌘2)
  3. Hit the "Repositories" button on the top bar.
  4. Hit the "+" button in the lower-left corner, and choose "Checkout or Clone Repository…".
  5. In the rollout sheet that appears, enter https://github.com/Unvanquished/Unvanquished.git into the "Location" field, and hit "Next".
  6. Enter "Unvanquished" into the "Name" field, ensure that the "Type" combo box is set to "Git", and hit "Clone".
  7. You will be prompted where to save the repository. Choose a location and hit "Clone".

Windows

TortoiseGIT

  1. Make and enter a new folder to store the source code in
  2. Right click the inside of the folder → Git Clone...
  3. In the Url textbox enter: https://github.com/Unvanquished/Unvanquished.git
  4. Hit OK.

Command Line

Open the MsysGit terminal and and follow the command line instructions.

Keeping your copy of the source up-to-date

For more information on using git, an excellent resource is the official git book, available to read online for free.

TortoiseGit

  1. Right-click somewhere in the source directory, and choose "Git Sync".

Command-line (All platforms)

Information 48x48.png

Note

If you have checked out a particular commit or tag (e.g., v0.37.0), git will inform you afterwards that you are in what it refers to as a "detached head" state. Before you update your copy of the source, you should check out the master branch first:

$ git checkout master

To pull (i.e., fetch and merge) changes made since you checked out the source—that is, to update your working copy to match the current state of the official repository—you (typically) need only run one command:

$ git pull origin master

Compiling

After getting the source code, you can compile it.