MG/Getting The Code

From MegaGlest
Revision as of 01:28, 13 December 2013 by SoftCoder (talk)
Jump to: navigation, search

MegaGlest has now switched to git for managing the game's source code and data (the svn repo is no longer active). Using the command line you would get the code in one of two ways. Either read-only if you will not contribute changes or read and write if you plan to help contribute to the project as well.

Choose a git client

The MegaGlest source is stored in a Git repository (versions prior to 3.9.0 are in a different SVN repository, however), and requires a Git client to download. Clients exist for all major operating systems.

Linux

This section is currently outdated. You can edit this page to improve that.

Most users will want to use the Apache Software Foundation (ASF) subversion command line interface (CLI), as provided, on most distributions, by the 'subversion' package. Many distributions also provide graphical interfaces which are either frontends to the ASF subversion CLI or are standalone.

Windows

Download Git and install it, then run git-bash.bat in the installation folder to start the Git command line. For those with a preference for a client with a graphical interface, TortoiseGit exists for that, though you will still need to install Git as well as MysisGit.

Check out the source code

Making the directory

Prior to running this command, you should navigate to the folder you wish to place the MegaGlest source.
mkdir megaglest-git
cd megaglest-git

Cloning the sources

Read only

git clone https://github.com/MegaGlest/megaglest-source.git .
cd megaglest-source
git submodule update --init --recursive

Read and write

# This will ask for your standard GitHub username and password
git clone https://github.com/MegaGlest/megaglest-source.git .
cd megaglest-source
# This may ask for your standard GitHub username and password again
git submodule update --init --recursive
cd data/glest_game
git checkout master
cd ../..

GIT

If you chose a git CLI then run the following command to retrieve the latest source code:

git clone https://github.com/MegaGlest/megaglest-source.git .
cd megaglest-source
git submodule update --init --recursive

This will download to the current active folder, so be sure to first navigate to the folder you want to download the GIT project into.


Project folder layout Folder structure.png

Tags and branches

This will check out the trunk directory, which is where active development takes place in. Each release is 'tagged' and a copy resides in the tags directory, so if you wanted an older release you would check out something below instead. Check here to see which ones are available.

Branches are created in the branches subdirectory when required to seperate larger changes from active / stable development, so replace 'trunk' by 'branches' and check with your web brower which ones are available if this is your intention.

See also