manual:chapter1:buildfromsource

This is an old revision of the document!


Building newRPL from source code

Linux The following instructions are for Ubuntu, package names might change slightly on other distros.

Packages to install (either use synaptic package manager, or apt):

git libelf-dev libudev-dev

If using other distros, verify that these other packages are installed: gcc g++ libc6-dev

and for Qt, some 3D related headers (even though not used by newRPL) are needed, therefore these packages need to be installed as well:

libgl-dev

Time to install the Qt framework, go to http://qt-project.org and download the open source version. It will download a file named 'qt-unified-….', change the permissions to allow executing it as a program and run it to install Qt. When it's time to select components, install the latest Qt version (5.10.0 at the time of this writing), the only component needed is the one labeled “Desktop gcc 64-bits”.

Linux

While at your user's home, open a terminal and run:

git clone https://git.code.sf.net/p/newrpl/sources newrpl-sources

The first tool that needs building is elf2rom.

Open Qt Creator, select Open Project, and go into newrpl-sources/tools/elf2rom, then select the elf2rom.pro project file.

When prompted, just click on 'Configure project'. At the bottom-left of the screen, there will be an icon that looks like a screen and shows 'Debug'. Change it to 'Release'. On the left toolbox, select the wrench 'Projects' to access the build settings. Make sure 'Release' is the selected configuration, then 'Add Build Step' / 'Make', and in the 'Make arguments:' box type 'install' (without quotes). Now from the top menu, 'Build', 'Run QMake', then 'Rebuild All'. From the bottom of the screen, check the 'Compile Output' pane to see if everything went well. Quite often, the last step 'make install' says there's nothing new to install when there's actually a newly built executable. Another round of 'Run QMake' and 'Rebuild All' usually shows in the output pane that the file is being copied to newrpl/tools-bin which is the expected result.

It's done, the elf2rom tool was built and installed in the appropriate location to be used by the other projects. Select 'Close all projects and editors' from the main menu to end the session.

Open Qt Creator, select Open Project, and go into newrpl-sources, then select the newrpl-comp.pro project file.

When prompted, just click on 'Configure project'. At the bottom-left of the screen, there will be an icon that looks like a screen and shows 'Debug'. Change it to 'Release'. On the left toolbox, select the wrench 'Projects' to access the build settings. Make sure 'Release' is the selected configuration, then 'Add Build Step' / 'Make', and in the 'Make arguments:' box type 'install' (without quotes). Now from the top menu, 'Build', 'Run QMake', then 'Rebuild All'. From the bottom of the screen, check the 'Compile Output' pane to see if everything went well. Quite often, the last step 'make install' says there's nothing new to install when there's actually a newly built executable. Another round of 'Run QMake' and 'Rebuild All' usually shows in the output pane that the file is being copied to newrpl/tools-bin which is the expected result.

Finished, the newrpl-comp tool was built and installed in the appropriate location to be used by the other projects.

Open Qt Creator, select Open Project, and go into newrpl-sources, then select the newrpl-comp.pro project file.

When prompted, just click on 'Configure project'. At the bottom-left of the screen, there will be an icon that looks like a screen and shows 'Debug'. Change it to 'Release'. Now from the top menu, 'Build', 'Run QMake', then 'Rebuild All'. From the bottom of the screen, check the 'Compile Output' pane to see if everything went well. There might be some warnings, but there should be no hard errors.

At the lower left area of the screen, use the upper 'Play' button (Run without debugging) to start the application.

  • manual/chapter1/buildfromsource.1514212023.txt.gz
  • Last modified: 2017/12/25 06:27
  • by claudio