Difference between revisions of "MG/Getting The Code"

From MegaGlest
Jump to navigation Jump to search
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Choose a subversion client==
+
'''*NOTE: Due to problems converting to GIT we are STILL using svn, so skip down to the section titled SVN below until further notice!'''
  
For source code management, i.e. software versioning and revision control, we use the [http://en.wikipedia.org/wiki/Apache_Subversion subversion system]. You need to install a subversion client on your computer to access and work with it properly.
+
 
 +
[[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.6.0.2 are in a different SVN repository, however), and requires a Git client to download. Clients exist for all major operating systems.
  
 
====Linux====
 
====Linux====
 
+
:''This section is currently outdated. You can [http://glest.wikia.com/index.php?title=MG/Getting_The_Code&action=edit edit] this page to improve that.''
 
Most users will want to use the [https://subversion.apache.org/ 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.
 
Most users will want to use the [https://subversion.apache.org/ 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====
 
====Windows====
 
+
Download [http://git-scm.com/ Git] and install it, then run <tt>git-bash.bat</tt> in the installation folder to start the Git command line. For those with a preference for a client with a graphical interface, [http://code.google.com/p/tortoisegit/ TurtoiseGit] exists for that, though you will still need to install Git as well as [http://code.google.com/p/msysgit/ MysisGit].
If you fancy graphical interfaces then [http://tortoisesvn.tigris.org/ Tortoise] is for you. It allows you to manage the subversion repository from within Windows Explorer. However, if you prefer to work on a command line, then [http://www.sliksvn.com/en/download/ SlikSVN] is the utility you want.
 
 
 
Windows 7 note: If you are going to use subversion on 64-bit Windows 7 and get error messages like ''The file or directory is corrupted and unreadable'' then that's because your OS's only primary file system [http://glest.org/glest_board/?topic=5611.msg58480#msg58480 is buggy].
 
  
 
==Check out the source code==
 
==Check out the source code==
[[MegaGlest]] has now switched to git (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.
 
 
 
===Making the directory===
 
===Making the directory===
 +
:''Prior to running this command, you should navigate to the folder you wish to place the MegaGlest source.''
 
  mkdir megaglest-git
 
  mkdir megaglest-git
 
  cd megaglest-git
 
  cd megaglest-git
Line 35: Line 35:
 
  ln -s -T ../megaglest-data data
 
  ln -s -T ../megaglest-data data
  
 +
===With TortoiseGit===
 +
:''This section only applies to those using TortoiseGit instead of the command line.''
 +
Once TortoiseGit and its prerequisites of Git and MysisGit are installed, right click in the folder you wish to place the sources and choose "Git Clone" from the context menu. Enter the following links in one at a time, waiting for TortoiseGit to finish downloading each one.
 +
git://megaglest.git.sourceforge.net/gitroot/megaglest/megaglest /megaglest-source
 +
git://megaglest.git.sourceforge.net/gitroot/megaglest/megaglest /megaglest-data
 +
git://megaglest.git.sourceforge.net/gitroot/megaglest/megaglest /megaglest-data-source
  
'''The SVN section is now deprecated''', but will work for version 3.6.0.2 and lower
+
==SVN==
 +
'''The SVN section is now deprecated''', but will work for version 3.6.0.2 and earlier.
  
 
If you chose a subversion CLI then run the following command to retrieve the latest source code:
 
If you chose a subversion CLI then run the following command to retrieve the latest source code:
 
  svn co https://megaglest.svn.sourceforge.net/svnroot/megaglest/trunk megaglest
 
  svn co https://megaglest.svn.sourceforge.net/svnroot/megaglest/trunk megaglest
  
==Project folder layout==
+
===Project folder layout===
 
 
 
[[File:Folder_structure.png]]
 
[[File:Folder_structure.png]]
 
 
  
 
==Tags and branches==
 
==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 [https://megaglest.svn.sourceforge.net/svnroot/megaglest/tags/ here] to see which ones are available.
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
 
https://megaglest.svn.sourceforge.net/svnroot/megaglest/tags/
 
 
 
instead. Just use your web browser to click on this URL and 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.
 
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.
  
More info about the SVN Structure: [[MG/SVN Structure|SVN Structure]]
+
==See also==
 +
*[[MG/SVN Structure|SVN Structure]]
 
[[Category:MG]]
 
[[Category:MG]]

Revision as of 08:08, 25 January 2012

*NOTE: Due to problems converting to GIT we are STILL using svn, so skip down to the section titled SVN below until further notice!


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.6.0.2 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, TurtoiseGit 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 git://megaglest.git.sourceforge.net/gitroot/megaglest/megaglest-source
git clone git://megaglest.git.sourceforge.net/gitroot/megaglest/megaglest-data
git clone git://megaglest.git.sourceforge.net/gitroot/megaglest/megaglest-data-source

Read and write

git clone ssh://<sourceforge-username>@megaglest.git.sourceforge.net/gitroot/megaglest/megaglest-source
git clone ssh://<sourceforge-username>@megaglest.git.sourceforge.net/gitroot/megaglest/megaglest-data
git clone ssh://<sourceforge-username>@megaglest.git.sourceforge.net/gitroot/megaglest/megaglest-data-source

Create the link

cd megaglest-source
ln -s -T ../megaglest-data data

With TortoiseGit

This section only applies to those using TortoiseGit instead of the command line.

Once TortoiseGit and its prerequisites of Git and MysisGit are installed, right click in the folder you wish to place the sources and choose "Git Clone" from the context menu. Enter the following links in one at a time, waiting for TortoiseGit to finish downloading each one.

git://megaglest.git.sourceforge.net/gitroot/megaglest/megaglest /megaglest-source
git://megaglest.git.sourceforge.net/gitroot/megaglest/megaglest /megaglest-data
git://megaglest.git.sourceforge.net/gitroot/megaglest/megaglest /megaglest-data-source

SVN

The SVN section is now deprecated, but will work for version 3.6.0.2 and earlier.

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

svn co https://megaglest.svn.sourceforge.net/svnroot/megaglest/trunk megaglest

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