User Tools

Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
cppdev:gettingstarted [2011-11-04 11:24]
Carsten [Subversion Repository Access]
cppdev:gettingstarted [2013-10-20 12:20]
Carsten Clarified installation instructions for Git and SCons under Linux
Line 10: Line 10:
  
 This section explains how you initially get the Cafu source code. This section explains how you initially get the Cafu source code.
-The Cafu source code can be obtained from a compressed archive or by checking out from its Subversion ​repository.+The Cafu source code can be obtained from a compressed archive or by checking ​it out from its Git repository.
  
  
 ==== Downloading a Compressed Archive ==== ==== Downloading a Compressed Archive ====
  
-The easiest way to get the Cafu source code is to download ​the compressed archive for your platform from [[http://​www.cafu.de/​downloads|www.cafu.de/​downloads]].+The easiest way to get the Cafu source code is to download ​compressed archive for your platform from [[http://​www.cafu.de/​downloads|www.cafu.de/​downloads]].
  
-The contents of the Windows and Linux archives is the same (inclusive end-of-line style), but Linux users should still get tar archive as it properly sets the executable flags that are required for the build scripts.+The contents of the Windows ​(''​zip''​) ​and Linux (''​gz'',​ ''​bz2''​) ​archives is the same (inclusive end-of-line style), but Linux users should still get the ''​gz''​ or ''​bz2'' ​archive ​type, as it properly sets the executable flags that are required for the build scripts.
  
 Extract the archive contents into an arbitrary directory and you're ready for the [[#​python_and_scons|next step]]. Extract the archive contents into an arbitrary directory and you're ready for the [[#​python_and_scons|next step]].
  
  
-==== Subversion ​Repository Access ====+==== Git Repository Access ====
  
-Alternatively,​ you can also check out the Cafu source code directly from its Subversion ​repository.+Alternatively,​ you can also check out the Cafu source code directly from its Git repository. 
 +/* (We recently migrated from Subversion to Git, a detailed report is at [[http://​www.cafu.de/​forum/​viewtopic.php?​f=14&​t=1090|Part 1]], [[http://​www.cafu.de/​forum/​viewtopic.php?​f=14&​t=1092|Part 2]].) */
  
-Subversion ​is a version control system that allows the Cafu developers to work on their copy of the source code independently of each other, and to distribute the latest version of the source code to users and developers at any time.+Git is a version control system that allows the Cafu developers to work on their copy of the source code independently of each other, and to distribute the latest version of the source code to users and developers at any time
 +Moreover, many developers prefer to manage their project independently in their own version control system, but also wish to integrate the latest changes (e.g. bug-fixes and new features) from the official Cafu repository into theirs from time to time: Git makes the synchronization of the projects code with the original Cafu source code as convenient and automatic as possible.
  
-If you don't know Subversion ​yet, please ​have a look at the [[http://subversion.apache.org|Subversion ​website]] and the [[http://svnbook.red-bean.com|Subversion Book]]. The book is very well written and available for free in several languages.+If you don't know Git yet, have a look at the [[http://git-scm.com|Git website]] and the [[http://git-scm.com/​documentation|Git documentation]]. The "Pro Git" ​book is very well written and available for free in several languages.
  
-We recommend that you prefer ​checking out the source code from the repository over getting it from a compressed archive whenever possible: +You should ​prefer ​getting ​the source code from the repository over getting it from a compressed archive whenever possible: 
-The code from the repository is always the latest and can easily be updated at any time. There is no better way to get and share new features and bug fixes conveniently and simple.+The code from the repository is always the latest and can easily be updated at any time. 
 +There is no better way to get and share new features and bug fixes conveniently and simple.
  
-Check out the source code at the command-line under Windows or Linux with this command+For Windows and many other systems, you can get Git from the [[http://​git-scm.com/​downloads|Git downloads]] page. Popular Git clients with a graphical user interface are available ​at the Git downloads page as well. 
-<​code>​ + 
-svn checkout https://​srv7.svn-repos.de/​dev123/​projects/​cafu/​trunk Cafu+With most Linux distributions,​ installing Git via the systems package manager is usually preferred. For example, under Ubuntu
 +<​code ​bash
 +sudo apt-get install git gitk
 </​code>​ </​code>​
-This command assumes that you have already installed ​the Subversion ​command-line ​client. + 
-You can get Subversion binaries from the [[http://subversion.apache.org/packages.html|Subversion Binary Packages]] website for Windows, Linux and many other systems+Then check out the source code at the command-line ​under Windows or Linux with this command: 
-Note that with most Linux distributions,​ installing Subversion via the systems package manager is usually preferred. +<code bash> 
-For Windows, a popular Subversion client with a graphical user interface ​is [[http://tortoisesvn.tigris.org/|TortoiseSVN]].+> git clone https://bitbucket.org/cafu/cafu.git Cafu 
 +</​code>​ 
 + 
 +Our Git project page is https://bitbucket.org/cafu/cafu, where you can browse the repository online, create forks, post pull requests, and find very good additional help.
  
  
Line 56: Line 64:
 Under Windows, Under Windows,
   * first get and install Python **2.7** (//not// one of the newer, but backwards-incompatible 3.x editions!) from [[http://​www.python.org/​download/​]],​   * first get and install Python **2.7** (//not// one of the newer, but backwards-incompatible 3.x editions!) from [[http://​www.python.org/​download/​]],​
-  * then get and install SCons **2.0** (or any later version; with VS 2010, you even need version **2.1 (alpha)**) from [[http://​www.scons.org/​download.php]].+  * then get and install SCons **2.3** (or any later version) from [[http://​www.scons.org/​download.php]].
  
-If in doubt, pick the Windows installers for both Python 2.7 and SCons 2.0: they are easy to use, lightweight,​ and automatically setup the proper environment variables.+If in doubt, pick the Windows installers for both Python 2.7 and SCons 2.3: they are easy to use, lightweight,​ and automatically setup the proper environment variables.
  
 Important notes: Important notes:
-  * Pick the **32-bit** edition of Python even on 64-bit systems! (Unfortunately,​ SCons does not yet work with the 64-bit builds of Python.) That is, [[http://​www.python.org/​ftp/​python/​2.7/​python-2.7.msi|python-2.7.msi]] is the right file for all Windows systems. +  * Pick the **32-bit** edition of Python even on 64-bit systems! (Unfortunately,​ SCons does not yet work with the 64-bit builds of Python.) That is, [[http://​www.python.org/​ftp/​python/​2.7.5/python-2.7.5.msi|python-2.7.5.msi]] is the right file for all Windows systems. 
-  * On Windows Vista and Windows 7, run the SCons installer via right-click,​ then select **"Run as administrator"​**.+  * On Windows Vista, 7 and 8, run the SCons installer via right-click,​ then select **"Run as administrator"​**.
  
-That is normally all, but you may wish to check if the Python installer added Pythons ​''​Scripts''​ directory to the ''​PATH''​ environment variable of your system.+That is normally all, but you may wish to check if the Python installer added Python'​s ​''​Scripts''​ directory to the ''​PATH''​ environment variable of your system.
 For example, if Python was installed in ''​C:​\Python27'',​ then ''​PATH''​ should contain both ''​C:​\Python27''​ and ''​C:​\Python27\Scripts''​. For example, if Python was installed in ''​C:​\Python27'',​ then ''​PATH''​ should contain both ''​C:​\Python27''​ and ''​C:​\Python27\Scripts''​.
 Otherwise, you have to add the proper directories manually: See http://​support.microsoft.com/​kb/​310519 and http://​vlaurie.com/​computers2/​Articles/​environment.htm for additional information. Otherwise, you have to add the proper directories manually: See http://​support.microsoft.com/​kb/​310519 and http://​vlaurie.com/​computers2/​Articles/​environment.htm for additional information.
Line 78: Line 86:
 > scons -v > scons -v
 SCons by Steven Knight et al.: SCons by Steven Knight et al.:
-        ​engine: v2.0.0.final.0.r50232010/06/14 22:05:46, by scons on scons-dev +        ​script: v2.3.0, 2013/03/03 09:48:35, by garyo on reepicheep 
-Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation+        engine: v2.3.0, 2013/03/03 09:48:35, by garyo on reepicheep 
 +        engine path: ['​C:​\\Python27\\Scripts\\..\\Lib\\site-packages\\scons-2.3.0\\SCons'​] 
 +Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation
 </​code>​ </​code>​
 The report of the SCons version indicates that both Python and SCons are ready for use. The report of the SCons version indicates that both Python and SCons are ready for use.
-Please make sure that you use SCons version **2.or newer**, older versions don't work!+Please make sure that you use SCons version **2.or newer**, older versions don't work!
  
  
Line 88: Line 98:
  
 Under Linux, just use the systems package manager in order to install SCons. Under Linux, just use the systems package manager in order to install SCons.
-The package manager will automatically install SCons and all software that SCons depends on, such as Python.+The package manager will automatically install SCons and all software that SCons depends on, such as Python. ​For example, under Ubuntu: 
 +<code bash> 
 +> sudo apt-get install scons 
 +</​code>​
  
  
Line 195: Line 208:
  
  
-===== What Next? =====+===== What next? =====
  
 Congratulations! When you get here, you have managed to successfully compile the Cafu source code and run the resulting binaries. Congratulations! When you get here, you have managed to successfully compile the Cafu source code and run the resulting binaries.
Line 201: Line 214:
  
 One way to do this is to approach Cafu from a map designers perspective,​ for example by exploring the Cafu World Editor CaWE. One way to do this is to approach Cafu from a map designers perspective,​ for example by exploring the Cafu World Editor CaWE.
-CaWE is not only a map editor, it also contains the GUI editor, a font conversion tool, a materials viewer and (soon) ​a model editor.+CaWE is not only a map editor, it also contains the GUI editor, a font conversion tool, a materials viewer and a model editor.
 CaWE can also act as a bridge towards scripting: map scripting, GUI scripting, materials scripting and vegetation scripting are CaWE can also act as a bridge towards scripting: map scripting, GUI scripting, materials scripting and vegetation scripting are
 powerful features in Cafu, and it doesn'​t stop there! powerful features in Cafu, and it doesn'​t stop there!
  
-Programmers ​may instead prefer to dig into the source code right away -- just pick your favorite piece of code, and start reading and hacking.+Programmers ​should definitively have a look at the other sections in this chapter ([[:​start#​at_the_corethe_cafu_source_code|At the Core: The Cafu Source Code]]), such as [[cppdev:​ides]] or [[cppdev:​startnewgame]]. If instead ​you prefer to dig into the source code right away -- just pick your favorite piece of code, and start reading and hacking.
  
 Consider [[cppdev:​fbxsdk]] in order to add support for several additional file formats in the Model Editor. Consider [[cppdev:​fbxsdk]] in order to add support for several additional file formats in the Model Editor.
cppdev/gettingstarted.txt · Last modified: 2017-01-06 11:33 by Carsten