Compile With Eclipse
Eclipse is open source multiplatform IDE comparable with Visual Studio.
Eclipse IDE for C/C++ Developers can be downloaded here. To compile FreeOrion with Eclipse it is required to install plugins for Eclipse to support:
- 1 Plugins
- 2 Settings
- 3 Checkout from repository
- 4 Install missing libraries and headers
- 5 Compile FreeOrion from Eclipse
- 6 Run FreeOrion from Eclipse
Click on Help->Install New Software menu, select work with All Avalaible Sites and install Collaboration->Subversive SVN Team Provider.
Add update url(Help->Install New Software->Add) for subversion connector plugin in Eclipse. Install it via Subversive SVN Connectors-> and check:
- Subversive SVN Connectors
- SVNKit 1.3.x Implementation.
Add update url(Help->Install New Software->Add) for Pydev plugin in Eclipse. Install it for developing FreeOrion AI written in Python. PyDev->PyDev for Eclipse
Insert spaces for tabs
Under Window>Preferences>General>Editors>Text Editors turn on
- Insert spaces for tabs
Under Window>Preferences>C/C++>Code Style->Edit change Tab Policy
- Spaces only
Under Windows->Preferences->General->Workspace turn on
- Refresh automatically
Changing minimum and maximum memory for Eclipse
Change eclipse.ini file with lines Xms(minimal memory) and Xmx(maximal memory) to
Turn automatic Eclipse updates on
Under Windows->Preferences->Install/Update->Automatic Updates turn on
- Automatically find new updates and notify me
- Download new updates automatically and notify me when ready to install them
Checkout from repository
Switch to SVN Repository Exploring perspective(Window->Open Perspective->Other) and add location
Select FreeOrion, use option using wizard and confirm. On the next screen, change project to C++, select Makefile project and confirm Hello World screen. After Eclipse downloads sources from subversion repository, switch to C++ perspective. Or look at nice manual [here]
After some changes in svn repository you can update it from Eclipse(project name->Team->Synchronize with repository and update file)
Install missing libraries and headers
Install GG to system
Compile in console GG and install it.
Set GG headers to Eclipse
Right click on project name and select Properties. Under C/C++ General->Paths and symbols->Includes->Gnu C++
add path where installed headers are(on Linux it is /usr/local/includes/GG)
Set Boost headers to Eclipse
Similarly add path where Boost headers are installed(on Linux it is /usr/includes/boost)
Set Ogre headers to Eclipse
Add path where Ogre headers are installed(on Linux it is /usr/local/include/OGRE)
Install pylint library for Python error checking
Ubuntu and Debian
Install with command:
(sudo) apt-get install pylint
Compile FreeOrion from Eclipse
First time, you have to compile FreeOrion from console because it will generate configuration and will compile correctly project. Then it is possible to compile FreeOrion with Eclipse. After changing some FreeOrion file in Eclipse, run scons via Eclipse External Tools and compile FreeOrion.
Run FreeOrion from Eclipse
Run->Run Configurations->C/C++ Application and clicked with right mouse button New.
Update Location to where C/C++ Application is installed with selecting Browse and find file freeorion(you have to compile FreeOrion first)
Clicked Apply and Run to test this configuration.