Difference between revisions of "Getting Started with Development"

From PioneerWiki
Jump to: navigation, search
(Imported getting started in development from github)
 
(Debugging: fix gdb command)
 
(9 intermediate revisions by 5 users not shown)
Line 4: Line 4:
 
  git clone git://github.com/pioneerspacesim/pioneer.git
 
  git clone git://github.com/pioneerspacesim/pioneer.git
  
This will get you on the "master" branch, which is where new code is merged. This is the latest and greatest development and is quite unstable. To build a specific alpha, you need to checkout the appropriate release tag:
+
This will get you on the "master" branch, which is where new code is merged. This is the latest and greatest development. It should be stable.
  
git checkout alpha20
+
You may also need to clone the [https://github.com/pioneerspacesim/pioneer-thirdparty pioneer-thirdparty] repository, depending on what platform you're on. It is needed to build on Windows. You should clone this in a directory ''next to'' your clone of the pioneer directory (''not'' a sub-directory). Further instructions are in the COMPILING.txt file (linked below).
  
==Compiling Pioneer on Windows==
+
===Coding Conventions===
An MSVC 2008 project file can be found in the win32/vc2008 folder. Open this project file and Pioneer should build just fine. All dependencies are provided so you don't need to compile any libraries.
+
see [[Coding_Conventions]]
  
Copy the .dll files from win32/vc2008 into the root folder (the one containing data, src, win32 directories), and you will be able to run the pioneer .exe file you just compiled.
+
==Compiling==
 +
There are instructions for how to compile the code included in the repository:
  
==Compiling Pioneer on Linux==
+
[https://github.com/pioneerspacesim/pioneer/blob/master/COMPILING.txt COMPILING.txt]
===Requirements===
 
  
* libtool
+
Also available: [[Compiling]]
* sigc++-2.0
+
<!-- Not sure if its outdated. Probably best to pick one source-spot for this. -->
* freetype2
 
* GL and GLU
 
* GLEW
 
* SDL 1.2
 
* SDLimage
 
  
Since pioneer is currently only available from the source repository, you also need autoconf and automake in order to generate the ./configure script (by running ./bootstrap)
+
===Debugging===
 +
For developers on Linux, gdb can be used for debugging
  
You also need git to check the source code out from the repository.
+
  gdb ./build/pioneer
 
+
  run
===Ubuntu commands to install all the requisite libraries===
 
 
 
These may work on other versions of Ubuntu, and possibly Debian or their derivatives too.
 
 
 
====Ubuntu 10.4====
 
 
 
  sudo apt-get install libsigc++-2.0-dev libglut3-dev libglew1.5-dev libsdl1.2-dev libvorbis-dev libsdl-image1.2-dev dh-autoreconf git libfreetype6-dev
 
 
 
====Ubuntu 11.10====
 
 
 
  sudo apt-get install libsigc++-2.0-dev freeglut3-dev libglew1.5-dev libsdl1.2-dev libvorbis-dev libsdl-image1.2-dev dh-autoreconf git libfreetype6-dev
 
 
 
===Fedora commands to install all the requisite libraries===
 
 
 
These might work on other Fedora verisons, and Redhat-based systems.
 
  
====Fedora 16====
+
This starts pioneer in gdb. After a crash, you can get a back trace by typing into the gdb prompt "bt". Bugs, and feature requests, should be logged on the issue tracker.
  
yum install libtool libsigc++20-devel mesa-libGL-devel mesa-libGLU-devel glew-devel SDL-devel SDL_image-devel freetype-devel libvorbis-devel libpng-devel gcc-c++
+
=== Code editing ===
 +
Most development is done on GNU/Linux machines, although there are some developers using MS Visual Studio on Windows.
  
===Building it===
 
 
./bootstrap
 
./configure
 
make
 
 
Currently Pioneer runs from where it is built, and doesn't require (or work with) '''make install'''. To run it:
 
 
./src/pioneer
 
 
===Debugging===
 
 
For developers, gdb can be used for debugging
 
 
gdb ./src/pioneer
 
run
 
  
Bugs, and feature requests, should be logged on the issue tracker.
+
=== Misc. ===
 +
[https://www.samueltaylor.org/articles/how-to-learn-a-codebase.html How to learn a codebase]

Latest revision as of 10:05, 2 September 2023

Getting the Code

Pioneer is managed using Git, and is stored on Github. The official repository is the best one to get. To get it:

git clone git://github.com/pioneerspacesim/pioneer.git

This will get you on the "master" branch, which is where new code is merged. This is the latest and greatest development. It should be stable.

You may also need to clone the pioneer-thirdparty repository, depending on what platform you're on. It is needed to build on Windows. You should clone this in a directory next to your clone of the pioneer directory (not a sub-directory). Further instructions are in the COMPILING.txt file (linked below).

Coding Conventions

see Coding_Conventions

Compiling

There are instructions for how to compile the code included in the repository:

COMPILING.txt

Also available: Compiling

Debugging

For developers on Linux, gdb can be used for debugging

gdb ./build/pioneer
run

This starts pioneer in gdb. After a crash, you can get a back trace by typing into the gdb prompt "bt". Bugs, and feature requests, should be logged on the issue tracker.

Code editing

Most development is done on GNU/Linux machines, although there are some developers using MS Visual Studio on Windows.


Misc.

How to learn a codebase