The Unofficial XCSoar Manual
Advanced:Development/Setup
From XCSoar
Instructions on setting up your development environment...
Contents |
Basic Setup
- Windows 2000+ - you need a copy. Although you can use VMWare server http://www.vmware.com/products/server/ for use on Linux (there is also a Mac version now) or Parallels (http://www.parallels.com/)
- EVC 4.0, SP4 and the PocketPC 2003 SDK
Extra and Optional Tools
- Perl for support and build scripts - see also ActiveState Perl.
First Time XCSoar Developer Setup for Windows
How to set up an IBM PC to compile XCSoar for PPC2002 and PPC2003 platforms
You need two versions of Microsoft's C++ compiler (one for PPC2002 and one for PPC2003) which can be installed both on the same machine at the same time. You'll also need to install Activesync 4.5 and TortoiseCVS on your PC. Below are notes for installing all these items. (Note there may be other compilers besides MSFT that work.)
Getting the Source code to your machine:
Browsing XCSoar Source Code:
First, you can explore the XCSoar source code via the http://xcsoar.cvs.sourceforge.net/xcsoar/ website. This won't let you compile, but you can at least see the structure of the project, and look at individual files. The takeaway for a first-time developer of XCSoar is that there are multiple projects, and the only one you need to make the XCSoar executable is in the root folder called "source" http://xcsoar.cvs.sourceforge.net/xcsoar/source Note there are multiple subfolders, one for each platform: PPC2002, PPC2003, PPC, and PC. Different platforms will require different compiler tools, as described below.
Downloading XCSoar Source Code:
For all platforms, you need to install TortoiseCVS on your machine to download the source code from XCSoar's website. If you don't know what TortoiseCVS is, its a source control program. This means that it tracks all the files in a project, let's individual developers "check out," modify, and "check in" source code. It also provides tools for "merging" source code that has been developed my multiple developers, and for tracking different versions of each file that has changed. Most importantly, it will download all your source code files for you. TortoiseCVS is a wonderfully simple GUI interface for CVS that integrates with your Windows Explorer and lets you view all the files in your shared project, and check in/out each file.
Setting Up TortoiseCVS for XCSoar
Download and install the "Stable (for deployment), Windows 2000 and later" release of TortoiseCVS. When installation is complete, open your Windows Explorer (Not Internet Explorer -- this is the "My Documents/ My Computer" browser). Click the menu File > CVS Checkout. Enter the parameters:
CVSROOT: :pserver:anonymous@xcsoar.cvs.sourceforge.net:/cvsroot/xcsoar Protocol: Password server (:pserver:) Port: leave this blank Server: xcsoar.cvs.sourceforge.net Repository Folder: /cvsroot/xcsoar User Name: anonymous Module: source
Then click [OK]. It will take several minutes, but will download everything to your c: drive (whatever folder your windows explorer is pointed to at the time). Note: using the above "anonymous" login, you can change the code locally, but not change the code back on the sourceforge.net server. This is probably a good thing because you don't need to worry about breaking anything for anybody else. For full project access, please contact the developer team.
Set up to compile for the PPC2003 target platform:
Note this is separate compiler from that used for PPC 2002, but can be installed on the same machine as the PPC 2002 compiler without conflicts
- Download and install ActiveSync 4.5 on your PC.
- Download and install eMbedded Visual C++ 4.0. The product key to use when installing is listed on the download page under the heading 'Instructions'. (TRT7H-KD36T-FRH8D-6QH8P-VFJHQ).
- Download and install eMbedded Visual C++ 4.0 SP4
- Download and install SDK for Windows Mobile 2003-based Pocket PCs
Finally, Compile XCSoar for PPC2003
Start C++ 4.0, open the Workspace file ("File > Open Workspace" menu) located in the c:\source\PPC2003\XCSoar folder. Choose the Active Configuration and Default device from the drop-down lists, and then click the menu "Build > Build XCSoar.exe" You can debug directly using the emulator from the "Build > Start Debug" menu. This will start the emulator. The first time the emulator is started, you need to share an XCSoardata folder so all your files will be accessed by the emulator. After you've set up the emulator to share the XCSoarData folder, rerun the "Start Debug" command from the compiler and it will start XCSoar running on the emulator with the shared XCSoardata folder.
Set up to compile for the PPC2002 target platform:
Note this is separate compiler from that used for PPC 2003, but can be installed on the same machine as the PPC 2003 compiler without conflicts
- Download and install Activesync 4.5 on your PC.
- Download and install eMbedded Visual Tools 3.0 - 2002 Edition. The product key to use when installing is listed on the download page under the heading 'Instructions'. (TRT7H-KD36T-FRH8D-6QH8P-VFJHQ)
This includes both the C++ compiler and the PPC2002 SDK, so once you done it you're ready to compile. Unlike the C++ 4.0 software required for PPC2003, if you're compiling for PPC2002, you just need to install this single program.
Finally, Compile XCSoar for PPC2002
Start C++ 3.0, open the Workspace file ("File > Open Workspace" menu) located in the c:\source\PPC2002\XCSoar folder. Choose the Active Configuration and Default device from the drop-down lists, and then click the menu "Build > Build XCSoar.exe." You can debug directly using the emulator from the "Build > Start Debug" menu. This will start the emulator.
The first time the emulator is started, you need to share an XCSoardata folder so all your files will be accessed by the emulator. After you've set up the emulator to share the XCSoarData folder, rerun the "Start Debug" command from the compiler and it will start XCSoar running on the emulator with the shared XCSoardata folder.
