Fedora Packages and Compiling: Difference between revisions

Jump to navigation Jump to search
m
Remove 2020.3 procedures
m (Rmove 2020.3 procedures)
m (Remove 2020.3 procedures)
Line 40: Line 40:
Version 2024.2, or next, is where features beyond 2024.1 continue development.
Version 2024.2, or next, is where features beyond 2024.1 continue development.
</pre>
</pre>
In each of the following examples, the directories used and the structures is quite flexible. The examples use the following build-directory structures:
Each example is in a build directory under your HOME. The name is your choice. I use the FlightGear version under consideration in the example.
This build directory contains at least two directories of source: simgear and flightgear. It may include fgdata, although that may be elsewhere. It may also include an install directory when system-level directories are not used. Simgear is built and installed first. Flightgear can then be built as it requires a completed simgear.
=== Current Release Version 2020.3 Private copy===
This example builds a standalone FlightGear fully under your HOME directory.
Fetch sources from sourceforge.
mkdir $HOME/fg2020.3
cd $HOME/fg2020.3
git clone --single-branch --branch release/2020.3 https://git.code.sf.net/p/flightgear/simgear simgear
git clone --single-branch --branch release/2020.3 https://git.code.sf.net/p/flightgear/flightgear flightgear
git clone --single-branch --branch release/2020.3 git://git.code.sf.net/p/flightgear/fgdata fgdata
Make two empty directories in which to perform the build. These can be named arbitrarily and there may be more than one set for different configurations. Also make an empty directory to hold the installed version of FlightGear. Code will be in install/bin and install/lib. The fgdata directory is at the same level as the source and build directories and is found automagically by cmake.
mkdir fgbuild
mkdir sgbuild
mkdir install
For 2020.3, you must make one change to the cmake configuration files in both simgear and flightgear. This change is already in 2024.1 and 2024.2 so it is only needed for version 2020.3.
# Edit CMakeLists.txt in both flightgear and simgear directories
# For each, change the line
set(CMAKE_CXX_STANDARD 11)
to
set(CMAKE_CXX_STANDARD 17)
Build and install simgear. The cmake command is only needed for the initial configuration. Future edits and re-builds just need the make commands. If you wish to change configuration options, the easiest way is to delete everything and start over with a new cmake command or use a different sgbuild and fgbuild directory set.
cd $HOME/fg2020.3/sgbuild
cmake ../simgear -DCMAKE_INSTALL_PREFIX=$HOME/fg2020.3/install -DCMAKE_BUILD_TYPE=Release
make -j$NPROC
make install
Build and install flightgear. As with simgear, the cmake command is only needed for the initial configuration.
cd $HOME/fg2020.3/fgbuild
cmake ../flightgear -DCMAKE_INSTALL_PREFIX=$HOME/fg2020.3/install -DCMAKE_BUILD_TYPE=Release
make -j$NPROC
make install
Set your path to find your new version of flightgear:
export PATH=$HOME/fg2020.3/install/bin:$PATH
=== Current Release Version 2020.3 Public copy for everyone on your system===
This example builds a public system available to any users on your system. Programs and libraries will install to /usr/local. Fgdata is installed to /usr/local/share.
Each user should already have /usr/local/bin in their $PATH by default.
Fetch sources from sourceforge.
mkdir $HOME/fg2020.3
cd $HOME/fg2020.3
git clone --single-branch --branch release/2020.3 https://git.code.sf.net/p/flightgear/simgear simgear
git clone --single-branch --branch release/2020.3 https://git.code.sf.net/p/flightgear/flightgear flightgear
git clone --single-branch --branch release/2020.3 git://git.code.sf.net/p/flightgear/fgdata fgdata
sudo mv fgdata /usr/local/share
sudo chown -R root:root /usr/local/share/fgdata
Make two empty directories in which to perform the build. These can be named arbitrarily and there may be more than one set for different configurations.
mkdir fgbuild
mkdir sgbuild
As before for 2020.3, you must once again make one change to the cmake configuration files in both simgear and flightgear as in the example above.
# Edit CMakeLists.txt in both flightgear and simgear directories
# For each, change the line
set(CMAKE_CXX_STANDARD 11)
to
set(CMAKE_CXX_STANDARD 17)
Build and install simgear.
cd $HOME/fg2020.3/sgbuild
cmake ../simgear -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release
make -j$NPROC
sudo make install
Build and install flightgear. We need an additional configuration option to tell flightgear where to find fgdata.
cd $HOME/fg2020.3/fgbuild
cmake ../flightgear -DFG_DATA_DIR=/usr/local/share/fgdata -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release
make -j$NPROC
sudo make install
=== Current Release Version 2020.3 Public Copy to override a binary release===
The fgdata download is quite large. You may have already installed the Fedora dnf packages for FlightGear and wish to rebuild the code, but use the existing fgdata in /usr/share/flightgear. This is similar to the previous example except that you point flightgear at the already existing fgdata release. No other changes are needed.
cd $HOME/fg2020.3/fgbuild
cmake ../flightgear -DFG_DATA_DIR=/usr/share/flightgear -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release
make -j$NPROC
sudo make install
The default PATH for users already has /usr/local/bin ahead of /usr/bin and so the newly rebuilt version of fgfs, the FlightGear exutable will be found before the dnf-installed version.


===Current release version 2024.1===
===Current release version 2024.1===
50

edits

Navigation menu