Compare commits
32 Commits
version/20
...
next-gen/v
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bad115cac0 | ||
|
|
696829a260 | ||
|
|
09cc52296d | ||
|
|
abc616b548 | ||
|
|
c3b9b9a524 | ||
|
|
2277ba38c7 | ||
|
|
97a72b4934 | ||
|
|
ecd4b9aab3 | ||
|
|
882ab6ae59 | ||
|
|
f3423dba60 | ||
|
|
39c1754a7f | ||
|
|
f190773790 | ||
|
|
5b34458439 | ||
|
|
59c9a55baa | ||
|
|
92f566f1d3 | ||
|
|
5b6ba959d9 | ||
|
|
675e7e6bdc | ||
|
|
07d1b0e882 | ||
|
|
f826f8c4b2 | ||
|
|
82f3c85343 | ||
|
|
3344c21c71 | ||
|
|
b2274fbbed | ||
|
|
cd80fffbe2 | ||
|
|
5e25bc9277 | ||
|
|
06d84d1d5b | ||
|
|
6661d1e10c | ||
|
|
6caf43f9e7 | ||
|
|
7b51c99439 | ||
|
|
1cf284bd6f | ||
|
|
1f27f8e39a | ||
|
|
caaad41e26 | ||
|
|
120055fa43 |
@@ -85,6 +85,8 @@ Source: "{#ThirdPartyDir}\3rdParty\bin\libintl-8.dll"; DestDir: "{app}\bin"; Che
|
||||
Source: "{#ThirdPartyDir}\3rdParty\bin\CrashRpt1403.dll"; DestDir: "{app}\bin"; Check: not Is64BitInstallMode
|
||||
Source: "{#ThirdPartyDir}\3rdParty\bin\crashrpt_lang.ini"; DestDir: "{app}\bin"; Check: not Is64BitInstallMode
|
||||
Source: "{#ThirdPartyDir}\3rdParty\bin\CrashSender1403.exe"; DestDir: "{app}\bin"; Check: not Is64BitInstallMode
|
||||
Source: "{#ThirdPartyDir}\3rdParty\bin\dbus-1-3.dll"; DestDir: "{app}\bin"; Check: not Is64BitInstallMode
|
||||
Source: "{#ThirdPartyDir}\3rdParty\bin\event_core.dll"; DestDir: "{app}\bin"; Check: not Is64BitInstallMode
|
||||
|
||||
; 64 bits install
|
||||
Source: "{#InstallDir64}\bin\*.*"; DestDir: "{app}\bin"; Excludes: "{#ExcludedBinaries}"; Flags: ignoreversion recursesubdirs; Check: Is64BitInstallMode
|
||||
@@ -99,6 +101,8 @@ Source: "{#ThirdPartyDir}\3rdParty.x64\bin\libintl-8.dll"; DestDir: "{app}\bin";
|
||||
Source: "{#ThirdPartyDir}\3rdParty.x64\bin\CrashRpt1403.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
|
||||
Source: "{#ThirdPartyDir}\3rdParty.x64\bin\crashrpt_lang.ini"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
|
||||
Source: "{#ThirdPartyDir}\3rdParty.x64\bin\CrashSender1403.exe"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
|
||||
Source: "{#ThirdPartyDir}\3rdParty.x64\bin\dbus-1-3.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
|
||||
Source: "{#ThirdPartyDir}\3rdParty.x64\bin\event_core.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
|
||||
|
||||
; Include the base package
|
||||
#if IncludeData == "TRUE"
|
||||
|
||||
@@ -1,96 +1,123 @@
|
||||
# Nasa2FGearthview
|
||||
A bash-script to convert NASA satellite images to ready-to-use
|
||||
textures for FG's EarthView using ImageMagick.
|
||||
textures for FG's EarthView using ImageMagick and normalmap
|
||||
|
||||
For info about FGearthview, see the forum thread:
|
||||
You can get "normalmap" there:
|
||||
https://github.com/planrich/normalmap
|
||||
|
||||
For info about FGearthview, see the forum thread:\
|
||||
https://forum.flightgear.org/viewtopic.php?f=6&t=15754
|
||||
or this FG-wiki-page:
|
||||
|
||||
or this FG-wiki-page:\
|
||||
http://wiki.flightgear.org/Earthview
|
||||
|
||||
### Caution!
|
||||
Don't use this script on a server! It will most likely cause
|
||||
Denial-of-service (DoS). When working on these huge images, the
|
||||
harddisk throughput will cease occasionally and CPU / RAM usage will
|
||||
spike tremendously! So, only use this script on your home desktop
|
||||
computer, or if you don't mind several long server-outages...
|
||||
|
||||
|
||||
------------------------------------
|
||||
About:
|
||||
## About:
|
||||
|
||||
This script runs on Linux (maybe Mac also?) in a Bash
|
||||
(Bourne Again Shell) - Windows is not supported (by the nature of the
|
||||
script). Maybe it works on windows as well, I don't know, feel free
|
||||
to try, and please let me know! :)
|
||||
|
||||
This will download the raw images from http://visibleearth.nasa.gov -
|
||||
their server is not very fast, so I provide an alternative download
|
||||
location: https://musicchris.de/download/FG/EarthView/raw-data-NASA.7z
|
||||
This one is much quicker! If you really want the images directly from
|
||||
NASA, then provide "nasa" to the script (see below)
|
||||
|
||||
In the end you will have 8 world-textures in .png and .dds format.
|
||||
Generally .dds is better in performance, but it won't work on some
|
||||
graphics cards. If this is the case for you, then try the .png files.
|
||||
For further information see:
|
||||
For further information see:\
|
||||
http://wiki.flightgear.org/index.php?title=DDS_Textures_in_FlightGear&redirect=no
|
||||
|
||||
If you also converted the clouds, then you'll also find 8 cloud-
|
||||
textures in the format .png. Because the .dds-format has trouble with
|
||||
rendering heavy alpha images, which is because of it's compression
|
||||
algorythm [1], I think it's useless to also build faulty files.
|
||||
However, this is not entirely true! It is possible to switch off the
|
||||
.dds/DXT compression. But this results in huge files and is rather
|
||||
heavy on the GPU's RAM.
|
||||
If you also converted the clouds and the height maps, then you'll also
|
||||
find 8 cloud- and 8 height textures (as well as their conversion to
|
||||
normal maps) in the format .png. Because the .dds-format has trouble
|
||||
with rendering heavy alpha images, which is because of it's
|
||||
compression algorythm [1], I think it's useless to also build faulty
|
||||
files. However, this is not entirely true! It is possible to switch
|
||||
off the .dds/DXT compression. But this results in huge files and is
|
||||
rather heavy on the GPU's RAM.
|
||||
|
||||
Buckaroo has created a nice overview on dds-compression:
|
||||
[1] http://www.buckarooshangar.com/flightgear/tut_dds.html
|
||||
|
||||
------------------------------------
|
||||
Installation and usage:
|
||||
## Installation and usage:
|
||||
|
||||
Simply copy "convert.sh" into a folder of your liking and run it:
|
||||
|
||||
$ ./convert.sh
|
||||
```shell
|
||||
./convert.sh
|
||||
```
|
||||
|
||||
This will show a help text, since you didn't specify any target(s).
|
||||
Possible targets are:
|
||||
* world
|
||||
* clouds
|
||||
* heights
|
||||
* all
|
||||
|
||||
Additionally, there are some options you could specify (further
|
||||
explained below):
|
||||
* 1k | 2k | 4k | 8k | 16k
|
||||
* nasa
|
||||
* no-download
|
||||
* download | no-download
|
||||
* world
|
||||
* clouds
|
||||
* heights
|
||||
* cleanup
|
||||
* rebuild
|
||||
* check
|
||||
|
||||
So your call could look sth like this:
|
||||
|
||||
$ ./convert.sh world no-download cleanup 8k
|
||||
```shell
|
||||
./convert.sh world download alt cleanup 8k
|
||||
```
|
||||
|
||||
|
||||
------------------------------------
|
||||
Requirements:
|
||||
## Requirements:
|
||||
|
||||
WARNING!
|
||||
|
||||
This script uses a *lot* disk space! Make sure you have at least 90GB
|
||||
available!
|
||||
This script uses a *lot* disk space! In my last test run, which
|
||||
generated all maps in all resolutions, the disk usage was about 330GB!
|
||||
Beware!\
|
||||
Also, I wouldn't recommend doing this on a SSD! While SSDs are
|
||||
generally faster, they also get more wear-and-tear when write such
|
||||
huge files. So this script might cause your SSD to die earlier as it
|
||||
should. Generally speaking, this won't kill your SSD, but it might
|
||||
cause it to die earlier. HDDs are much more robust in that respect.
|
||||
|
||||
Also, this script will run for a *very long* time! It might be best to
|
||||
let it run over night - your computer might become unresponsive from
|
||||
time to time, due to the heavy CPU and memory load, which tends to
|
||||
occur, when converting 54000x27000 images. ;-)
|
||||
I also recommend to deactivate swapping!
|
||||
$ sudo swapoff -a
|
||||
To reactivate swapping do:
|
||||
$ sudo swapon -a
|
||||
|
||||
This script relies on wget and imagemagick. Both are easily installed
|
||||
by your systems package-management-system.
|
||||
(On Debian/Ubuntu this is "apt-get")
|
||||
I also recommend to deactivate swapping!
|
||||
```shell
|
||||
sudo swapoff -a
|
||||
```
|
||||
To reactivate swapping do:
|
||||
```shell
|
||||
$ sudo swapon -a
|
||||
```
|
||||
|
||||
This script relies on wget, ImageMagick and, for converting the height
|
||||
maps to normal maps, on "normalmap". Some of these programs are easily
|
||||
installed by your systems package-management-system.\ (On
|
||||
Debian/Ubuntu this is "apt-get").
|
||||
|
||||
So, on Debian for instance, you only need to put the following into
|
||||
the console:
|
||||
|
||||
$ sudo apt-get install wget imagemagick
|
||||
```shell
|
||||
sudo apt-get install wget imagemagick
|
||||
```
|
||||
|
||||
Depending on your distro, the package names might differ slightly! Use
|
||||
a search engine of your choice to find out, how the packages are named
|
||||
@@ -98,70 +125,92 @@ in your distro!
|
||||
|
||||
You may want to check:
|
||||
|
||||
$ apt search imagemagick
|
||||
```shell
|
||||
apt search imagemagick
|
||||
```
|
||||
|
||||
### IMPORTANT!
|
||||
Check out your ```/etc/ImageMagick-6/policy.xml```
|
||||
On some distros, there are limits set, which will cause IM to abort
|
||||
the conversion of images larger than
|
||||
[rediculously small images](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=860763).
|
||||
Edit and set to our needs:
|
||||
* width: at least 55000
|
||||
* height: at least 55000
|
||||
* area: less than your free RAM
|
||||
|
||||
### Normalmap
|
||||
For normalmap, you can download and compile it from
|
||||
https://github.com/planrich/normalmap
|
||||
|
||||
You can install the binary into your system, or just copy it next to
|
||||
convert.sh - both should work.
|
||||
|
||||
------------------------------------
|
||||
Targets:
|
||||
## Targets:
|
||||
|
||||
world
|
||||
Generates the world tiles, needed to run FG with EarthView.
|
||||
You will find the results in output/[$resolution]/*. Copy
|
||||
these into $FGDATA/Models/Astro/*. More about the installation
|
||||
of these textures can be found here:
|
||||
http://wiki.flightgear.org/Earthview#Customization
|
||||
**world**\
|
||||
Generates the world tiles, needed to run FG with EarthView.
|
||||
You will find the results in output/[$resolution]/\*. Copy
|
||||
these into $FGDATA/Models/Astro/\*. More about the installation
|
||||
of these textures can be found here:
|
||||
http://wiki.flightgear.org/Earthview#Customization
|
||||
|
||||
clouds
|
||||
Generates the cloud tiles, needed to run FG with EarthView.
|
||||
The locations are the same as the other textures mentioned
|
||||
above. Note that clouds are only available with up to 8k
|
||||
resolution, due to the available data at NASA.
|
||||
**clouds**\
|
||||
Generates the cloud tiles, needed to run FG with EarthView.
|
||||
The locations are the same as the other textures mentioned
|
||||
above. Note that clouds are only available with up to 8k
|
||||
resolution, due to the available data at NASA.
|
||||
|
||||
all
|
||||
Converts everything needed for a full-blown earthview texture
|
||||
set. Does the same as:
|
||||
$ ./convert.sh world clouds
|
||||
**heights**\
|
||||
Generates the height tiles, which are then converted to the
|
||||
normal maps needed to run FG with EarthView. The locations are
|
||||
the same as the other textures mentioned above. Note that
|
||||
heights are only available with up to 8k resolution, due to the
|
||||
available data at NASA.
|
||||
|
||||
**all**\
|
||||
Converts everything needed for a full-blown earthview texture
|
||||
set. Does the same as:
|
||||
```./convert.sh world clouds heights```
|
||||
|
||||
|
||||
Options:
|
||||
## Options:
|
||||
|
||||
1k | 2k | 4k | 8k | 16k
|
||||
Lets you specify a desired resolution of the textures.
|
||||
Possible values are 1k, 2k, 4k, 8k and 16k. If nothing is
|
||||
specified, the script will generate all of the resolutions.
|
||||
16k is only available for earth textures.
|
||||
**1k | 2k | 4k | 8k | 16k**\
|
||||
Lets you specify a desired resolution of the textures.
|
||||
Possible values are 1k, 2k, 4k, 8k and 16k. If nothing is
|
||||
specified, the script will generate all of the resolutions.
|
||||
16k is recommended only for earth textures, it will induce
|
||||
oversampling from clouds and height maps.
|
||||
|
||||
nasa
|
||||
Causes the script to download directly from
|
||||
http://visibleearth.nasa.gov . If omitted the script will
|
||||
download from
|
||||
https://musicchris.de/download/FG/EarthView/raw-data-NASA.7z
|
||||
which is much faster!
|
||||
Uses wget either way.
|
||||
**download**\
|
||||
Causes the script to download the needed data, this is the
|
||||
default behavior (and can be omitted).
|
||||
|
||||
no-download
|
||||
Causes the script to skip the download function. If you
|
||||
already have the source images, then you don't need to
|
||||
re-download them. (About 2.4GB!)
|
||||
If omitted, the script will download the source images from
|
||||
https://musicchris.de/download/FG/EarthView/raw-data-NASA.7z
|
||||
**no-download**\
|
||||
Causes the script to skip the download function. If you
|
||||
already have the source images, then you don't need to
|
||||
re-download them. (About 2.4GB!)
|
||||
If omitted, the script will download the source images from
|
||||
the default location.
|
||||
|
||||
cleanup
|
||||
Deletes the temporary files created during texture generation.
|
||||
These can be found in tmp/
|
||||
Note: if for some reason you later want some other resolution,
|
||||
then it's good to have the data there. So only do this, when
|
||||
you're quite sure that you're done.
|
||||
Frees up a lot of disk-space! Which would have to be
|
||||
regenerated if needed again.
|
||||
**cleanup**\
|
||||
Deletes the temporary files created during texture generation.
|
||||
These can be found in tmp/
|
||||
Note: if for some reason you later want some other resolution,
|
||||
then it's good to have the data there. So only do this, when
|
||||
you're quite sure that you're done.
|
||||
Frees up a lot of disk-space! Which would have to be
|
||||
regenerated if needed again.
|
||||
|
||||
rebuild
|
||||
Deletes only the temporary files of the given target. So if
|
||||
you call './convert.sh rebuild world' the script will delete
|
||||
all corresponding temp-files of the target world, which will
|
||||
trigger a complete regeneration of the relevant (instead of
|
||||
skipping existing files)
|
||||
**rebuild**\
|
||||
Deletes only the temporary files of the given target. So if
|
||||
you call ```./convert.sh rebuild world``` the script will delete
|
||||
all corresponding temp-files of the target world, which will
|
||||
trigger a complete regeneration of the relevant (instead of
|
||||
skipping existing files)
|
||||
|
||||
check
|
||||
Creates mosaics of the tiles, so you can look at them and see
|
||||
if all went well.
|
||||
**check**\
|
||||
Creates mosaics of the tiles, so you can look at them and see
|
||||
if all went well.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -41,7 +41,7 @@ cp simgear-*.tar.bz2 ../output/.
|
||||
#####################################################################################
|
||||
echo "Starting on FlightGear"
|
||||
cd ../fgBuild
|
||||
cmake -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -DSIMGEAR_SHARED:BOOL="ON" -DFG_BUILD_TYPE=Release ../flightgear
|
||||
cmake -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -DSIMGEAR_SHARED:BOOL="ON" -DENABLE_SWIFT:BOOL=ON -DFG_BUILD_TYPE=Release ../flightgear
|
||||
|
||||
# compile
|
||||
make
|
||||
|
||||
@@ -37,7 +37,8 @@ cmake ..\flightgear -G "Visual Studio 14" ^
|
||||
-DBOOST_ROOT=%WORKSPACE%/windows-3rd-party ^
|
||||
-DOSG_FSTREAM_EXPORT_FIXED=1 ^
|
||||
-DCMAKE_PREFIX_PATH=%QT5SDK32%;%OSG32% ^
|
||||
-DFG_BUILD_TYPE=%FGBUILDTYPE%
|
||||
-DFG_BUILD_TYPE=%FGBUILDTYPE% ^
|
||||
-DENABLE_SWIFT:BOOL=ON
|
||||
cmake --build . --config RelWithDebInfo --target INSTALL
|
||||
|
||||
cd ..
|
||||
@@ -62,7 +63,8 @@ cmake ..\flightgear -G "Visual Studio 14 Win64" ^
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=%WORKSPACE%/install/msvc140-64 ^
|
||||
-DCMAKE_PREFIX_PATH=%QT5SDK64%;%OSG64% ^
|
||||
-DOSG_FSTREAM_EXPORT_FIXED=1 ^
|
||||
-DFG_BUILD_TYPE=%FGBUILDTYPE%
|
||||
-DFG_BUILD_TYPE=%FGBUILDTYPE% ^
|
||||
-DENABLE_SWIFT:BOOL=ON
|
||||
cmake --build . --config RelWithDebInfo --target INSTALL
|
||||
|
||||
cd ..
|
||||
|
||||
@@ -49,7 +49,7 @@ _elementIn(){
|
||||
|
||||
shift
|
||||
for e; do
|
||||
if [[ "$e" == "$valueToCheck" ]]; then
|
||||
if [ "$e" = "$valueToCheck" ]; then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
@@ -118,18 +118,18 @@ function _gitUpdate(){
|
||||
if [ "$DOWNLOAD" != "y" ]; then
|
||||
return
|
||||
fi
|
||||
branch=$1
|
||||
branch="$1"
|
||||
set +e
|
||||
git diff --exit-code 2>&1 > /dev/null
|
||||
if [ $? != 1 ]; then
|
||||
set -e
|
||||
git pull -r
|
||||
git checkout -f $branch
|
||||
git checkout -f "$branch"
|
||||
else
|
||||
set -e
|
||||
git stash save -u -q
|
||||
git pull -r
|
||||
git checkout -f $branch
|
||||
git checkout -f "$branch"
|
||||
git stash pop -q
|
||||
fi
|
||||
}
|
||||
@@ -186,8 +186,8 @@ function _gitDownload(){
|
||||
|
||||
function _make(){
|
||||
if [ "$COMPILE" = "y" ]; then
|
||||
pkg=$1
|
||||
cd "$CBD"/build/$pkg
|
||||
pkg="$1"
|
||||
cd "$CBD/build/$pkg"
|
||||
_printLog "MAKE $pkg"
|
||||
make $JOPTION $OOPTION 2>&1 | _logOutput
|
||||
_printLog "INSTALL $pkg"
|
||||
@@ -278,6 +278,23 @@ function _find_package_alternative(){
|
||||
fi
|
||||
}
|
||||
|
||||
# If component $1 is in WHATTOBUILD, add components $2, $3, etc., to
|
||||
# WHATTOBUILD unless they are already there.
|
||||
function _depends(){
|
||||
local component="$1"
|
||||
shift
|
||||
|
||||
if _elementIn "$component" "${WHATTOBUILD[@]}"; then
|
||||
for dependency in "$@"; do
|
||||
if ! _elementIn "$dependency" "${WHATTOBUILD[@]}"; then
|
||||
_printLog "$component: adding depended-on component $dependency"
|
||||
WHATTOBUILD+=("$dependency")
|
||||
nb_added_intercomponent_deps=$((nb_added_intercomponent_deps + 1))
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
function _printVersion(){
|
||||
echo "$PROGNAME version $VERSION"
|
||||
echo
|
||||
@@ -340,6 +357,12 @@ function _usage() {
|
||||
echo " -j X pass -jX to the Make program"
|
||||
echo " -O X pass -OX to the Make program"
|
||||
echo " -r y|n y=reconfigure programs before compiling them, n=don't reconfigure default=y"
|
||||
echo " --ignore-intercomponent-deps"
|
||||
echo " Ignore dependencies between components (default: don't)."
|
||||
echo " Example: TERRAGEAR depends on SIMGEAR. Passing the option can be"
|
||||
echo " useful if you want to update, rebuild, etc. TERRAGEAR without"
|
||||
echo " doing the same for SIMGEAR (e.g., if doing repeated TERRAGEAR"
|
||||
echo " builds and you know your SIMGEAR is already fine and up-to-date)."
|
||||
echo " -s compile only the last known stable versions"
|
||||
}
|
||||
|
||||
@@ -363,6 +386,7 @@ DOWNLOAD_PACKAGES="y"
|
||||
COMPILE="y"
|
||||
RECONFIGURE="y"
|
||||
DOWNLOAD="y"
|
||||
IGNORE_INTERCOMPONENT_DEPS="n"
|
||||
|
||||
SUDO="sudo"
|
||||
PKG_MGR="apt-get"
|
||||
@@ -371,7 +395,7 @@ PKG_MGR="apt-get"
|
||||
#
|
||||
# - 'https' used to be fine, but is currently unreliable at SourceForge (esp.
|
||||
# for FGData, see
|
||||
# <https://forum.flightgear.org/viewtopic.php?f=20&t=33620&start=90&sid=afb8b688a02c01ea4ea9306c35487bd0>);
|
||||
# <https://forum.flightgear.org/viewtopic.php?f=20&t=33620&start=90>);
|
||||
# - 'git' is insecure (no way to guarantee you are downloading what you expect
|
||||
# to be downloading);
|
||||
# - 'ssh' is secure, but requires an account at SourceForge (may be created at
|
||||
@@ -384,8 +408,10 @@ REPO_DEFAULT_USERNAME=''
|
||||
JOPTION=""
|
||||
OOPTION=""
|
||||
BUILD_TYPE="RelWithDebInfo"
|
||||
SG_CMAKEARGS=""
|
||||
FG_CMAKEARGS=""
|
||||
|
||||
# Non user-exposed variable used to decide whether to print a “helpful”
|
||||
# message
|
||||
declare -i nb_added_intercomponent_deps=0
|
||||
|
||||
declare -a UNMATCHED_OPTIONAL_PKG_ALTERNATIVES
|
||||
|
||||
@@ -433,7 +459,7 @@ REPO_SITE[TERRAGEARGUI]="SourceForge"
|
||||
# built-in function, it allows one to define long options.
|
||||
TEMP=$(getopt -o '+shc:p:a:d:r:j:O:ib:' \
|
||||
--longoptions git-clone-default-proto:,git-clone-site-params:,help \
|
||||
--longoptions package-manager:,sudo:,version \
|
||||
--longoptions package-manager:,sudo:,ignore-intercomponent-deps,version \
|
||||
-n "$PROGNAME" -- "$@")
|
||||
|
||||
case $? in
|
||||
@@ -504,6 +530,7 @@ while true; do
|
||||
;;
|
||||
--package-manager) PKG_MGR="$2"; shift 2 ;;
|
||||
--sudo) SUDO="$2"; shift 2 ;;
|
||||
--ignore-intercomponent-deps) IGNORE_INTERCOMPONENT_DEPS="y"; shift ;;
|
||||
-r) RECONFIGURE="$2"; shift 2 ;;
|
||||
-j) JOPTION=" -j$2"; shift 2 ;;
|
||||
-O) OOPTION=" -O$2"; shift 2 ;;
|
||||
@@ -559,16 +586,18 @@ unset -v site
|
||||
#######################################################
|
||||
# Warning about compilation time and size
|
||||
# Idea from Jester
|
||||
echo "**************************************"
|
||||
echo "* *"
|
||||
echo "* Warning, the compilation process *"
|
||||
echo "* is going to use 12 or more Gbytes *"
|
||||
echo "* of space and at least a couple of *"
|
||||
echo "* hours to download and build FG. *"
|
||||
echo "* *"
|
||||
echo "* Please, be patient ...... *"
|
||||
echo "* *"
|
||||
echo "**************************************"
|
||||
echo '**********************************************************************'
|
||||
echo '* *'
|
||||
echo '* Warning: a typical SimGear + FlightGear + FGData build requires *'
|
||||
echo '* about 12 GiB of disk space. The compilation part may last from a *'
|
||||
echo '* few minutes to hours, depending on your computer. *'
|
||||
echo '* *'
|
||||
echo '* Hint: use the -j option if your CPU has several cores, as in: *'
|
||||
echo '* *'
|
||||
echo '* download_and_compile.sh -j$(nproc) *'
|
||||
echo '* *'
|
||||
echo '**********************************************************************'
|
||||
echo
|
||||
|
||||
#######################################################
|
||||
#######################################################
|
||||
@@ -577,18 +606,59 @@ echo "$0 $*" > "$LOGFILE"
|
||||
_log "VERSION=$VERSION"
|
||||
_log "APT_GET_UPDATE=$APT_GET_UPDATE"
|
||||
_log "DOWNLOAD_PACKAGES=$DOWNLOAD_PACKAGES"
|
||||
_log "IGNORE_INTERCOMPONENT_DEPS=$IGNORE_INTERCOMPONENT_DEPS"
|
||||
_log "COMPILE=$COMPILE"
|
||||
_log "RECONFIGURE=$RECONFIGURE"
|
||||
_log "DOWNLOAD=$DOWNLOAD"
|
||||
_log "JOPTION=$JOPTION"
|
||||
_log "OOPTION=$OOPTION"
|
||||
_log "BUILD_TYPE=$BUILD_TYPE"
|
||||
_log "SG_CMAKEARGS=$SG_CMAKEARGS"
|
||||
_log "FG_CMAKEARGS=$FG_CMAKEARGS"
|
||||
_log "DIRECTORY=$CBD"
|
||||
|
||||
if [ "$STABLE" = "STABLE" ]; then
|
||||
_log "Stable build: yes"
|
||||
else
|
||||
_log "Stable build: no"
|
||||
fi
|
||||
|
||||
_logSep
|
||||
|
||||
#######################################################
|
||||
#######################################################
|
||||
|
||||
# ****************************************************************************
|
||||
# * Inter-component Dependencies *
|
||||
# ****************************************************************************
|
||||
|
||||
if [ "$IGNORE_INTERCOMPONENT_DEPS" = "n" ]; then
|
||||
# FlightGear requires SimGear
|
||||
_depends FGFS SIMGEAR
|
||||
# TerraGear requires SimGear
|
||||
_depends TERRAGEAR SIMGEAR
|
||||
|
||||
# Print a helpful message if some components were automatically added
|
||||
if (( nb_added_intercomponent_deps > 0 )); then
|
||||
if (( nb_added_intercomponent_deps > 1 )); then
|
||||
comp_word='components'
|
||||
else
|
||||
comp_word='component'
|
||||
fi
|
||||
_printLog "$PROGNAME: automatically added $nb_added_intercomponent_deps" \
|
||||
"$comp_word based on"
|
||||
_printLog "intercomponent dependencies. Use option" \
|
||||
"--ignore-intercomponent-deps if you"
|
||||
_printLog "want to disable this behavior."
|
||||
_printLog
|
||||
unset -v comp_word
|
||||
fi
|
||||
fi
|
||||
|
||||
# ****************************************************************************
|
||||
# * Component dependencies on distribution packages *
|
||||
# ****************************************************************************
|
||||
|
||||
if [[ "$DOWNLOAD_PACKAGES" = "y" ]]; then
|
||||
if [[ "$APT_GET_UPDATE" = "y" ]]; then
|
||||
_aptUpdate
|
||||
@@ -601,51 +671,82 @@ if [[ "$DOWNLOAD_PACKAGES" = "y" ]]; then
|
||||
fi
|
||||
|
||||
# Minimum
|
||||
PKG=(build-essential cmake git)
|
||||
PKG=(build-essential git)
|
||||
_mandatory_pkg_alternative libcurl4-openssl-dev libcurl4-gnutls-dev
|
||||
# cmake
|
||||
PKG+=(libarchive-dev libbz2-dev libexpat1-dev libjsoncpp-dev liblzma-dev
|
||||
libncurses5-dev procps zlib1g-dev)
|
||||
# TG
|
||||
PKG+=(libcgal-dev libgdal-dev libtiff5-dev)
|
||||
# TGGUI/OpenRTI
|
||||
PKG+=(libqt4-dev)
|
||||
# SG/FG
|
||||
PKG+=(zlib1g-dev freeglut3-dev libglew-dev libboost-dev)
|
||||
_mandatory_pkg_alternative libopenscenegraph-3.4-dev libopenscenegraph-dev \
|
||||
'libopenscenegraph-[0-9]+\.[0-9]+-dev'
|
||||
# FG
|
||||
PKG+=(libopenal-dev libudev-dev libdbus-1-dev libplib-dev)
|
||||
_mandatory_pkg_alternative libpng-dev libpng12-dev libpng16-dev
|
||||
# The following packages are needed for the built-in launcher
|
||||
_optional_pkg_alternative qt5-default
|
||||
_optional_pkg_alternative qtdeclarative5-dev
|
||||
_optional_pkg_alternative qtbase5-dev-tools # for rcc
|
||||
_optional_pkg_alternative qttools5-dev-tools # for lrelease
|
||||
_optional_pkg_alternative qml-module-qtquick2
|
||||
_optional_pkg_alternative qml-module-qtquick-window2
|
||||
_optional_pkg_alternative qml-module-qtquick-dialogs
|
||||
_optional_pkg_alternative libqt5opengl5-dev
|
||||
_optional_pkg_alternative libqt5svg5-dev
|
||||
_optional_pkg_alternative libqt5websockets5-dev
|
||||
# The following packages are only needed for the Qt-based remote Canvas
|
||||
# (comment written at the time of FG 2018.2).
|
||||
_optional_pkg_alternative qtbase5-private-dev
|
||||
_optional_pkg_alternative qtdeclarative5-private-dev
|
||||
# FGPanel
|
||||
PKG+=(fluid libbz2-dev libfltk1.3-dev libxi-dev libxmu-dev)
|
||||
# FGAdmin
|
||||
PKG+=(libxinerama-dev libjpeg-dev libxft-dev)
|
||||
# ATC-Pie
|
||||
PKG+=(python3-pyqt5 python3-pyqt5.qtmultimedia libqt5multimedia5-plugins)
|
||||
# FGo
|
||||
PKG+=(python-tk)
|
||||
# FGx (FGx is not compatible with Qt5, however we have installed Qt5 by default)
|
||||
#PKG+=(libqt5xmlpatterns5-dev libqt5webkit5-dev)
|
||||
|
||||
# CMake
|
||||
if _elementIn "CMAKE" "${WHATTOBUILD[@]}"; then
|
||||
PKG+=(libarchive-dev libbz2-dev libexpat1-dev libjsoncpp-dev liblzma-dev
|
||||
libncurses5-dev procps zlib1g-dev)
|
||||
else
|
||||
PKG+=(cmake)
|
||||
fi
|
||||
|
||||
# TerraGear
|
||||
if _elementIn "TERRAGEAR" "${WHATTOBUILD[@]}"; then
|
||||
PKG+=(libboost-dev libcgal-dev libgdal-dev libtiff5-dev zlib1g-dev)
|
||||
fi
|
||||
|
||||
# TerraGear GUI and OpenRTI
|
||||
if _elementIn "TERRAGEARGUI" "${WHATTOBUILD[@]}" || \
|
||||
_elementIn "OPENRTI" "${WHATTOBUILD[@]}"; then
|
||||
PKG+=(libqt4-dev)
|
||||
fi
|
||||
|
||||
# SimGear and FlightGear
|
||||
if _elementIn "SIMGEAR" "${WHATTOBUILD[@]}" || \
|
||||
_elementIn "FGFS" "${WHATTOBUILD[@]}"; then
|
||||
PKG+=(zlib1g-dev freeglut3-dev libglew-dev libopenal-dev libboost-dev)
|
||||
_mandatory_pkg_alternative libopenscenegraph-3.4-dev libopenscenegraph-dev \
|
||||
'libopenscenegraph-[0-9]+\.[0-9]+-dev'
|
||||
fi
|
||||
|
||||
# FlightGear
|
||||
if _elementIn "FGFS" "${WHATTOBUILD[@]}"; then
|
||||
PKG+=(libudev-dev libdbus-1-dev libplib-dev)
|
||||
_mandatory_pkg_alternative libpng-dev libpng12-dev libpng16-dev
|
||||
# The following packages are needed for the built-in launcher
|
||||
_optional_pkg_alternative qt5-default
|
||||
_optional_pkg_alternative qtdeclarative5-dev
|
||||
_optional_pkg_alternative qttools5-dev
|
||||
_optional_pkg_alternative qtbase5-dev-tools # for rcc
|
||||
_optional_pkg_alternative qttools5-dev-tools # for lrelease
|
||||
_optional_pkg_alternative qml-module-qtquick2
|
||||
_optional_pkg_alternative qml-module-qtquick-window2
|
||||
_optional_pkg_alternative qml-module-qtquick-dialogs
|
||||
_optional_pkg_alternative libqt5opengl5-dev
|
||||
_optional_pkg_alternative libqt5svg5-dev
|
||||
_optional_pkg_alternative libqt5websockets5-dev
|
||||
# The following packages are only needed for the Qt-based remote Canvas
|
||||
# (comment written at the time of FG 2018.2).
|
||||
_optional_pkg_alternative qtbase5-private-dev
|
||||
_optional_pkg_alternative qtdeclarative5-private-dev
|
||||
# FGPanel
|
||||
PKG+=(fluid libbz2-dev libfltk1.3-dev libxi-dev libxmu-dev)
|
||||
# FGAdmin
|
||||
PKG+=(libxinerama-dev libjpeg-dev libxft-dev)
|
||||
# swift
|
||||
_optional_pkg_alternative libevent-dev
|
||||
fi
|
||||
|
||||
# ATC-pie
|
||||
if _elementIn "ATCPIE" "${WHATTOBUILD[@]}"; then
|
||||
PKG+=(python3-pyqt5 python3-pyqt5.qtmultimedia libqt5multimedia5-plugins)
|
||||
fi
|
||||
|
||||
# FGo!
|
||||
if _elementIn "FGO" "${WHATTOBUILD[@]}"; then
|
||||
PKG+=(python-tk)
|
||||
fi
|
||||
|
||||
# if _elementIn "FGX" "${WHATTOBUILD[@]}"; then
|
||||
# FGx (FGx is not compatible with Qt5, however we have installed Qt5 by
|
||||
# default)
|
||||
# PKG+=(libqt5xmlpatterns5-dev libqt5webkit5-dev)
|
||||
# fi
|
||||
|
||||
_aptInstall "${PKG[@]}"
|
||||
else
|
||||
_printLog
|
||||
_printLog "Note: option -p of $PROGNAME set to 'n' (no), therefore no"
|
||||
_printLog " package will be installed via ${PKG_MGR}. Compilation of" \
|
||||
"some components"
|
||||
@@ -690,7 +791,7 @@ _printLog
|
||||
# cmake
|
||||
#######################################################
|
||||
CMAKE_INSTALL_DIR=cmake
|
||||
INSTALL_DIR_CMAKE=$INSTALL_DIR/$CMAKE_INSTALL_DIR
|
||||
INSTALL_DIR_CMAKE="$INSTALL_DIR/$CMAKE_INSTALL_DIR"
|
||||
cd "$CBD"
|
||||
if _elementIn "CMAKE" "${WHATTOBUILD[@]}"; then
|
||||
_printLog "****************************************"
|
||||
@@ -725,7 +826,7 @@ fi
|
||||
# PLIB
|
||||
#######################################################
|
||||
PLIB_INSTALL_DIR=plib
|
||||
INSTALL_DIR_PLIB=$INSTALL_DIR/$PLIB_INSTALL_DIR
|
||||
INSTALL_DIR_PLIB="$INSTALL_DIR/$PLIB_INSTALL_DIR"
|
||||
cd "$CBD"
|
||||
if _elementIn "PLIB" "${WHATTOBUILD[@]}"; then
|
||||
_printLog "****************************************"
|
||||
@@ -754,7 +855,7 @@ fi
|
||||
# OPENRTI
|
||||
#######################################################
|
||||
OPENRTI_INSTALL_DIR=openrti
|
||||
INSTALL_DIR_OPENRTI=$INSTALL_DIR/$OPENRTI_INSTALL_DIR
|
||||
INSTALL_DIR_OPENRTI="$INSTALL_DIR/$OPENRTI_INSTALL_DIR"
|
||||
cd "$CBD"
|
||||
if _elementIn "OPENRTI" "${WHATTOBUILD[@]}"; then
|
||||
_printLog "****************************************"
|
||||
@@ -788,15 +889,15 @@ fi
|
||||
# OpenSceneGraph
|
||||
#######################################################
|
||||
OSG_INSTALL_DIR=openscenegraph
|
||||
INSTALL_DIR_OSG=$INSTALL_DIR/$OSG_INSTALL_DIR
|
||||
INSTALL_DIR_OSG="$INSTALL_DIR/$OSG_INSTALL_DIR"
|
||||
cd "$CBD"
|
||||
mkdir -p "openscenegraph"
|
||||
if _elementIn "OSG" "${WHATTOBUILD[@]}"; then
|
||||
_printLog "****************************************"
|
||||
_printLog "**************** OSG *******************"
|
||||
_printLog "****************************************"
|
||||
|
||||
cd "$CBD"/openscenegraph
|
||||
mkdir -p "openscenegraph"
|
||||
cd "openscenegraph"
|
||||
_gitDownload OSG
|
||||
_gitUpdate OpenSceneGraph-3.4
|
||||
|
||||
@@ -830,7 +931,7 @@ fi
|
||||
# SIMGEAR
|
||||
#######################################################
|
||||
SIMGEAR_INSTALL_DIR=simgear
|
||||
INSTALL_DIR_SIMGEAR=$INSTALL_DIR/$SIMGEAR_INSTALL_DIR
|
||||
INSTALL_DIR_SIMGEAR="$INSTALL_DIR/$SIMGEAR_INSTALL_DIR"
|
||||
cd "$CBD"
|
||||
if _elementIn "SIMGEAR" "${WHATTOBUILD[@]}"; then
|
||||
_printLog "****************************************"
|
||||
@@ -840,7 +941,7 @@ if _elementIn "SIMGEAR" "${WHATTOBUILD[@]}"; then
|
||||
mkdir -p "simgear"
|
||||
cd "$CBD"/simgear
|
||||
_gitDownload SIMGEAR
|
||||
_gitUpdate $FGVERSION
|
||||
_gitUpdate "$FGVERSION"
|
||||
|
||||
if [ "$RECONFIGURE" = "y" ]; then
|
||||
cd "$CBD"
|
||||
@@ -861,7 +962,7 @@ fi
|
||||
# FGFS
|
||||
#######################################################
|
||||
FGFS_INSTALL_DIR=flightgear
|
||||
INSTALL_DIR_FGFS=$INSTALL_DIR/$FGFS_INSTALL_DIR
|
||||
INSTALL_DIR_FGFS="$INSTALL_DIR/$FGFS_INSTALL_DIR"
|
||||
cd "$CBD"
|
||||
if _elementIn "FGFS" "${WHATTOBUILD[@]}" || \
|
||||
_elementIn "DATA" "${WHATTOBUILD[@]}"; then
|
||||
@@ -874,7 +975,7 @@ if _elementIn "FGFS" "${WHATTOBUILD[@]}" || \
|
||||
_printLog "****************************************"
|
||||
|
||||
_gitDownload DATA
|
||||
_gitUpdate $FGVERSION
|
||||
_gitUpdate "$FGVERSION"
|
||||
fi
|
||||
|
||||
mkdir -p "$CBD"/flightgear
|
||||
@@ -886,7 +987,7 @@ if _elementIn "FGFS" "${WHATTOBUILD[@]}" || \
|
||||
_printLog "****************************************"
|
||||
|
||||
_gitDownload FGFS
|
||||
_gitUpdate $FGVERSION
|
||||
_gitUpdate "$FGVERSION"
|
||||
|
||||
if [ "$RECONFIGURE" = "y" ]; then
|
||||
cd "$CBD"
|
||||
@@ -897,7 +998,8 @@ if _elementIn "FGFS" "${WHATTOBUILD[@]}" || \
|
||||
-DENABLE_FLITE=ON \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH="$INSTALL_DIR_FGFS" \
|
||||
-DCMAKE_PREFIX_PATH="$INSTALL_DIR_SIMGEAR;$INSTALL_DIR_OSG;$INSTALL_DIR_OPENRTI;$INSTALL_DIR_PLIB" \
|
||||
-DFG_DATA_DIR="$INSTALL_DIR_FGFS/fgdata" \
|
||||
-DFG_DATA_DIR:PATH="$INSTALL_DIR_FGFS/fgdata" \
|
||||
-DTRANSLATIONS_SRC_DIR:PATH="$INSTALL_DIR_FGFS/fgdata/Translations" \
|
||||
$FG_CMAKEARGS \
|
||||
../../flightgear 2>&1 | _logOutput
|
||||
fi
|
||||
@@ -908,27 +1010,53 @@ if _elementIn "FGFS" "${WHATTOBUILD[@]}" || \
|
||||
|
||||
SCRIPT=run_fgfs.sh
|
||||
echo "#!/bin/sh" > $SCRIPT
|
||||
echo "cd \$(dirname \$0)" >> $SCRIPT
|
||||
echo "cd $SUB_INSTALL_DIR/$FGFS_INSTALL_DIR/bin" >> $SCRIPT
|
||||
echo "export LD_LIBRARY_PATH=../../$SIMGEAR_INSTALL_DIR/lib:../../$OSG_INSTALL_DIR/lib:../../$OPENRTI_INSTALL_DIR/lib:../../$PLIB_INSTALL_DIR/lib\${LD_LIBRARY_PATH:+:}\${LD_LIBRARY_PATH}" \
|
||||
echo "cd \"\$(dirname \"\$0\")\"" >> $SCRIPT
|
||||
echo "cd '$SUB_INSTALL_DIR/$FGFS_INSTALL_DIR/bin'" >> $SCRIPT
|
||||
echo "export LD_LIBRARY_PATH='../../$SIMGEAR_INSTALL_DIR/lib:../../$OSG_INSTALL_DIR/lib:../../$OPENRTI_INSTALL_DIR/lib:../../$PLIB_INSTALL_DIR/lib'\"\${LD_LIBRARY_PATH:+:}\${LD_LIBRARY_PATH}\"" \
|
||||
>> $SCRIPT
|
||||
echo "./fgfs --fg-root=\$PWD/../fgdata/ \$@" >> $SCRIPT
|
||||
echo "./fgfs --fg-root=\"\$PWD/../fgdata\" \"\$@\"" >> $SCRIPT
|
||||
chmod 755 $SCRIPT
|
||||
|
||||
SCRIPT=run_fgfs_debug.sh
|
||||
echo "#!/bin/sh" > $SCRIPT
|
||||
echo "cd \$(dirname \$0)" >> $SCRIPT
|
||||
echo "cd $SUB_INSTALL_DIR/$FGFS_INSTALL_DIR/bin" >> $SCRIPT
|
||||
echo "export LD_LIBRARY_PATH=../../$SIMGEAR_INSTALL_DIR/lib:../../$OSG_INSTALL_DIR/lib:../../$OPENRTI_INSTALL_DIR/lib:../../$PLIB_INSTALL_DIR/lib\${LD_LIBRARY_PATH:+:}\${LD_LIBRARY_PATH}" \
|
||||
echo "cd \"\$(dirname \"\$0\")\"" >> $SCRIPT
|
||||
echo "cd '$SUB_INSTALL_DIR/$FGFS_INSTALL_DIR/bin'" >> $SCRIPT
|
||||
echo "export LD_LIBRARY_PATH='../../$SIMGEAR_INSTALL_DIR/lib:../../$OSG_INSTALL_DIR/lib:../../$OPENRTI_INSTALL_DIR/lib:../../$PLIB_INSTALL_DIR/lib'\"\${LD_LIBRARY_PATH:+:}\${LD_LIBRARY_PATH}\"" \
|
||||
>> $SCRIPT
|
||||
echo "gdb --directory=$CBD/flightgear/src --args fgfs --fg-root=\$PWD/../fgdata/ \$@" >> $SCRIPT
|
||||
echo "gdb --directory='$CBD/flightgear/src' --args ./fgfs --fg-root=\"\$PWD/../fgdata\" \"\$@\"" >> $SCRIPT
|
||||
chmod 755 $SCRIPT
|
||||
|
||||
# Useful for debugging library problems.
|
||||
SCRIPT=run_ldd.sh
|
||||
cat >"$SCRIPT" <<EndOfScriptText
|
||||
#!/bin/sh
|
||||
|
||||
usage() {
|
||||
echo "Usage: \$0 LDD_ARGUMENT..."
|
||||
echo "Run 'ldd' with the same LD_LIBRARY_PATH setup as done inside run_fgfs.sh."
|
||||
echo
|
||||
echo "Examples: 'run_ldd.sh fgfs', 'run_ldd.sh fgcom', etc. (this can be used"
|
||||
echo "for any binary in '$SUB_INSTALL_DIR/$FGFS_INSTALL_DIR/bin')."
|
||||
}
|
||||
|
||||
if [ \$# -eq 0 ] || [ "\$1" = "--help" ]; then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd "\$(dirname "\$0")"
|
||||
cd '$SUB_INSTALL_DIR/$FGFS_INSTALL_DIR/bin'
|
||||
export LD_LIBRARY_PATH='../../$SIMGEAR_INSTALL_DIR/lib:../../$OSG_INSTALL_DIR/lib:../../$OPENRTI_INSTALL_DIR/lib:../../$PLIB_INSTALL_DIR/lib'"\${LD_LIBRARY_PATH:+:}\${LD_LIBRARY_PATH}"
|
||||
|
||||
ldd "\$@"
|
||||
EndOfScriptText
|
||||
chmod 755 "$SCRIPT"
|
||||
|
||||
SCRIPT=run_fgcom.sh
|
||||
echo "#!/bin/sh" > $SCRIPT
|
||||
echo "cd \$(dirname \$0)" >> $SCRIPT
|
||||
echo "cd $SUB_INSTALL_DIR/$FGFS_INSTALL_DIR/bin" >> $SCRIPT
|
||||
echo "./fgcom \$@" >> $SCRIPT
|
||||
echo "cd \"\$(dirname \"\$0\")\"" >> $SCRIPT
|
||||
echo "cd '$SUB_INSTALL_DIR/$FGFS_INSTALL_DIR/bin'" >> $SCRIPT
|
||||
echo "./fgcom \"\$@\"" >> $SCRIPT
|
||||
chmod 755 $SCRIPT
|
||||
fi
|
||||
|
||||
@@ -936,7 +1064,7 @@ fi
|
||||
# FGRUN
|
||||
#######################################################
|
||||
FGRUN_INSTALL_DIR=fgrun
|
||||
INSTALL_DIR_FGRUN=$INSTALL_DIR/$FGRUN_INSTALL_DIR
|
||||
INSTALL_DIR_FGRUN="$INSTALL_DIR/$FGRUN_INSTALL_DIR"
|
||||
cd "$CBD"
|
||||
if _elementIn "FGRUN" "${WHATTOBUILD[@]}"; then
|
||||
_printLog "****************************************"
|
||||
@@ -946,7 +1074,7 @@ if _elementIn "FGRUN" "${WHATTOBUILD[@]}"; then
|
||||
mkdir -p "fgrun"
|
||||
cd "$CBD"/fgrun
|
||||
_gitDownload FGRUN
|
||||
_gitUpdate $FGVERSION
|
||||
_gitUpdate "$FGVERSION"
|
||||
|
||||
if [ "$RECONFIGURE" = "y" ]; then
|
||||
cd "$CBD"
|
||||
@@ -965,11 +1093,11 @@ if _elementIn "FGRUN" "${WHATTOBUILD[@]}"; then
|
||||
|
||||
SCRIPT=run_fgrun.sh
|
||||
echo "#!/bin/sh" > $SCRIPT
|
||||
echo "cd \$(dirname \$0)" >> $SCRIPT
|
||||
echo "cd $SUB_INSTALL_DIR/$FGRUN_INSTALL_DIR/bin" >> $SCRIPT
|
||||
echo "export LD_LIBRARY_PATH=../../$SIMGEAR_INSTALL_DIR/lib:../../$OSG_INSTALL_DIR/lib:../../$OPENRTI_INSTALL_DIR/lib:../../$PLIB_INSTALL_DIR/lib\${LD_LIBRARY_PATH:+:}\${LD_LIBRARY_PATH}" \
|
||||
echo "cd \"\$(dirname \"\$0\")\"" >> $SCRIPT
|
||||
echo "cd '$SUB_INSTALL_DIR/$FGRUN_INSTALL_DIR/bin'" >> $SCRIPT
|
||||
echo "export LD_LIBRARY_PATH='../../$SIMGEAR_INSTALL_DIR/lib:../../$OSG_INSTALL_DIR/lib:../../$OPENRTI_INSTALL_DIR/lib:../../$PLIB_INSTALL_DIR/lib'\"\${LD_LIBRARY_PATH:+:}\${LD_LIBRARY_PATH}\"" \
|
||||
>> $SCRIPT
|
||||
echo "./fgrun --fg-exe=\$PWD/../../$FGFS_INSTALL_DIR/bin/fgfs --fg-root=\$PWD/../../$FGFS_INSTALL_DIR/fgdata \$@" >> $SCRIPT
|
||||
echo "./fgrun --fg-exe=\"\$PWD\"/../../'$FGFS_INSTALL_DIR/bin/fgfs' --fg-root=\"\$PWD\"/../../'$FGFS_INSTALL_DIR/fgdata' \"\$@\"" >> $SCRIPT
|
||||
chmod 755 $SCRIPT
|
||||
fi
|
||||
|
||||
@@ -977,7 +1105,7 @@ fi
|
||||
# FGO!
|
||||
#######################################################
|
||||
FGO_INSTALL_DIR=fgo
|
||||
INSTALL_DIR_FGO=$INSTALL_DIR/$FGO_INSTALL_DIR
|
||||
INSTALL_DIR_FGO="$INSTALL_DIR/$FGO_INSTALL_DIR"
|
||||
cd "$CBD"
|
||||
if _elementIn "FGO" "${WHATTOBUILD[@]}"; then
|
||||
_printLog "****************************************"
|
||||
@@ -996,11 +1124,10 @@ if _elementIn "FGO" "${WHATTOBUILD[@]}"; then
|
||||
|
||||
SCRIPT=run_fgo.sh
|
||||
echo "#!/bin/sh" > $SCRIPT
|
||||
echo "cd \$(dirname \$0)" >> $SCRIPT
|
||||
echo "cd $SUB_INSTALL_DIR" >> $SCRIPT
|
||||
echo "p=\$(pwd)" >> $SCRIPT
|
||||
echo "cd $FGO_INSTALL_DIR" >> $SCRIPT
|
||||
echo "python fgo" >> $SCRIPT
|
||||
echo "cd \"\$(dirname \"\$0\")\"" >> $SCRIPT
|
||||
echo "cd '$SUB_INSTALL_DIR'" >> $SCRIPT
|
||||
echo "cd '$FGO_INSTALL_DIR'" >> $SCRIPT
|
||||
echo "python ./fgo" >> $SCRIPT
|
||||
chmod 755 $SCRIPT
|
||||
fi
|
||||
|
||||
@@ -1008,7 +1135,7 @@ fi
|
||||
# FGx
|
||||
#######################################################
|
||||
FGX_INSTALL_DIR=fgx
|
||||
INSTALL_DIR_FGX=$INSTALL_DIR/$FGX_INSTALL_DIR
|
||||
INSTALL_DIR_FGX="$INSTALL_DIR/$FGX_INSTALL_DIR"
|
||||
cd "$CBD"
|
||||
if _elementIn "FGX" "${WHATTOBUILD[@]}"; then
|
||||
_printLog "****************************************"
|
||||
@@ -1036,13 +1163,13 @@ if _elementIn "FGX" "${WHATTOBUILD[@]}"; then
|
||||
|
||||
cd ..
|
||||
if [ "$RECONFIGURE" = "y" ]; then
|
||||
mkdir -p $INSTALL_DIR_FGX
|
||||
cd $INSTALL_DIR_FGX
|
||||
mkdir -p "$INSTALL_DIR_FGX"
|
||||
cd "$INSTALL_DIR_FGX"
|
||||
qmake ../../fgx/src
|
||||
fi
|
||||
|
||||
if [ "$COMPILE" = "y" ]; then
|
||||
cd $INSTALL_DIR_FGX
|
||||
cd "$INSTALL_DIR_FGX"
|
||||
_printLog "MAKE AND INSTALL FGX"
|
||||
_printLog "make $JOPTION $OOPTION"
|
||||
make $JOPTION $OOPTION 2>&1 | _logOutput
|
||||
@@ -1053,11 +1180,9 @@ if _elementIn "FGX" "${WHATTOBUILD[@]}"; then
|
||||
|
||||
SCRIPT=run_fgx.sh
|
||||
echo "#!/bin/sh" > $SCRIPT
|
||||
echo "cd \$(dirname \$0)" >> $SCRIPT
|
||||
echo "cd $ " >> $SCRIPT
|
||||
echo "p=\$(pwd)" >> $SCRIPT
|
||||
echo "cd $FGX_INSTALL_DIR" >> $SCRIPT
|
||||
echo "./fgx" >> $SCRIPT
|
||||
echo "cd \"\$(dirname \"\$0\")\"" >> $SCRIPT
|
||||
echo "cd '$FGX_INSTALL_DIR'" >> $SCRIPT
|
||||
echo "./fgx \"\$@\"" >> $SCRIPT
|
||||
chmod 755 $SCRIPT
|
||||
fi
|
||||
|
||||
@@ -1065,7 +1190,7 @@ fi
|
||||
# ATC-PIE
|
||||
#######################################################
|
||||
ATCPIE_INSTALL_DIR=atc-pie
|
||||
INSTALL_DIR_ATCPIE=$INSTALL_DIR/$ATCPIE_INSTALL_DIR
|
||||
INSTALL_DIR_ATCPIE="$INSTALL_DIR/$ATCPIE_INSTALL_DIR"
|
||||
cd "$CBD"
|
||||
if _elementIn "ATCPIE" "${WHATTOBUILD[@]}"; then
|
||||
_printLog "****************************************"
|
||||
@@ -1073,7 +1198,7 @@ if _elementIn "ATCPIE" "${WHATTOBUILD[@]}"; then
|
||||
_printLog "****************************************"
|
||||
|
||||
mkdir -p "$INSTALL_DIR_ATCPIE"
|
||||
cd $INSTALL_DIR_ATCPIE
|
||||
cd "$INSTALL_DIR_ATCPIE"
|
||||
_gitDownload ATCPIE
|
||||
_gitUpdate master
|
||||
|
||||
@@ -1081,9 +1206,9 @@ if _elementIn "ATCPIE" "${WHATTOBUILD[@]}"; then
|
||||
|
||||
SCRIPT=run_atcpie.sh
|
||||
echo "#!/bin/sh" > $SCRIPT
|
||||
echo "cd \$(dirname \$0)" >> $SCRIPT
|
||||
echo "cd $SUB_INSTALL_DIR/$ATCPIE_INSTALL_DIR" >> $SCRIPT
|
||||
echo "./ATC-pie.py \$@" >> $SCRIPT
|
||||
echo "cd \"\$(dirname \"\$0\")\"" >> $SCRIPT
|
||||
echo "cd '$SUB_INSTALL_DIR/$ATCPIE_INSTALL_DIR'" >> $SCRIPT
|
||||
echo "./ATC-pie.py \"\$@\"" >> $SCRIPT
|
||||
chmod 755 $SCRIPT
|
||||
fi
|
||||
|
||||
@@ -1091,7 +1216,7 @@ fi
|
||||
# OPENRADAR
|
||||
#######################################################
|
||||
OR_INSTALL_DIR=openradar
|
||||
INSTALL_DIR_OR=$INSTALL_DIR/$OR_INSTALL_DIR
|
||||
INSTALL_DIR_OR="$INSTALL_DIR/$OR_INSTALL_DIR"
|
||||
cd "$CBD"
|
||||
if _elementIn "OPENRADAR" "${WHATTOBUILD[@]}"; then
|
||||
_printLog "****************************************"
|
||||
@@ -1107,7 +1232,7 @@ if _elementIn "OPENRADAR" "${WHATTOBUILD[@]}"; then
|
||||
|
||||
SCRIPT=run_openradar.sh
|
||||
echo "#!/bin/sh" > $SCRIPT
|
||||
echo "cd \$(dirname \$0)" >> $SCRIPT
|
||||
echo "cd \"\$(dirname \"\$0\")\"" >> $SCRIPT
|
||||
echo "cd install/OpenRadar" >> $SCRIPT
|
||||
echo "java -jar OpenRadar.jar" >> $SCRIPT
|
||||
chmod 755 $SCRIPT
|
||||
@@ -1118,7 +1243,7 @@ fi
|
||||
#######################################################
|
||||
|
||||
TG_INSTALL_DIR=terragear
|
||||
INSTALL_DIR_TG=$INSTALL_DIR/$TG_INSTALL_DIR
|
||||
INSTALL_DIR_TG="$INSTALL_DIR/$TG_INSTALL_DIR"
|
||||
cd "$CBD"
|
||||
if _elementIn "TERRAGEAR" "${WHATTOBUILD[@]}"; then
|
||||
_printLog "****************************************"
|
||||
@@ -1128,14 +1253,21 @@ if _elementIn "TERRAGEAR" "${WHATTOBUILD[@]}"; then
|
||||
mkdir -p "terragear"
|
||||
cd "$CBD"/terragear
|
||||
_gitDownload TERRAGEAR
|
||||
_gitUpdate scenery/ws2.0
|
||||
|
||||
if [ "$STABLE" = "STABLE" ]; then
|
||||
branch='scenery/ws2.0'
|
||||
else
|
||||
branch='next'
|
||||
fi
|
||||
|
||||
_gitUpdate "$branch"
|
||||
|
||||
if [ "$RECONFIGURE" = "y" ]; then
|
||||
cd "$CBD"
|
||||
mkdir -p build/terragear
|
||||
cd "$CBD"/build/terragear
|
||||
rm -f CMakeCache.txt
|
||||
"$CMAKE" -DCMAKE_BUILD_TYPE="Debug" \
|
||||
"$CMAKE" -DCMAKE_BUILD_TYPE="$BUILD_TYPE" \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH="$INSTALL_DIR_TG" \
|
||||
-DCMAKE_PREFIX_PATH="$INSTALL_DIR_SIMGEAR;$INSTALL_DIR_CGAL" \
|
||||
../../terragear/ 2>&1 | _logOutput
|
||||
@@ -1145,25 +1277,27 @@ if _elementIn "TERRAGEAR" "${WHATTOBUILD[@]}"; then
|
||||
|
||||
cd "$CBD"
|
||||
echo "#!/bin/sh" > run_tg-construct.sh
|
||||
echo "cd $(dirname $0)" >> run_tg-construct.sh
|
||||
echo "cd \"\$(dirname \"\$0\")\"" >> run_tg-construct.sh
|
||||
echo "cd install/terragear/bin" >> run_tg-construct.sh
|
||||
echo "export LD_LIBRARY_PATH=$INSTALL_DIR_SIMGEAR/lib\${LD_LIBRARY_PATH:+:}\${LD_LIBRARY_PATH}" \
|
||||
echo "export LD_LIBRARY_PATH='$INSTALL_DIR_SIMGEAR/lib'\"\${LD_LIBRARY_PATH:+:}\${LD_LIBRARY_PATH}\"" \
|
||||
>> run_tg-construct.sh
|
||||
echo "./tg-construct \$@" >> run_tg-construct.sh
|
||||
echo "./tg-construct \"\$@\"" >> run_tg-construct.sh
|
||||
|
||||
echo "#!/bin/sh" > run_ogr-decode.sh
|
||||
echo "cd $(dirname $0)" >> run_ogr-decode.sh
|
||||
echo "cd \"\$(dirname \"\$0\")\"" >> run_ogr-decode.sh
|
||||
echo "cd install/terragear/bin" >> run_ogr-decode.sh
|
||||
echo "export LD_LIBRARY_PATH=$INSTALL_DIR_SIMGEAR/lib\${LD_LIBRARY_PATH:+:}\${LD_LIBRARY_PATH}" \
|
||||
echo "export LD_LIBRARY_PATH='$INSTALL_DIR_SIMGEAR/lib'\"\${LD_LIBRARY_PATH:+:}\${LD_LIBRARY_PATH}\"" \
|
||||
>> run_ogr-decode.sh
|
||||
echo "./ogr-decode \$@" >> run_ogr-decode.sh
|
||||
echo "./ogr-decode \"\$@\"" >> run_ogr-decode.sh
|
||||
|
||||
echo "#!/bin/sh" > run_genapts850.sh
|
||||
echo "cd $(dirname $0)" >> run_genapts850.sh
|
||||
echo "cd \"\$(dirname \"\$0\")\"" >> run_genapts850.sh
|
||||
echo "cd install/terragear/bin" >> run_genapts850.sh
|
||||
echo "export LD_LIBRARY_PATH=$INSTALL_DIR_SIMGEAR/lib\${LD_LIBRARY_PATH:+:}\${LD_LIBRARY_PATH}" \
|
||||
echo "export LD_LIBRARY_PATH='$INSTALL_DIR_SIMGEAR/lib'\"\${LD_LIBRARY_PATH:+:}\${LD_LIBRARY_PATH}\"" \
|
||||
>> run_genapts850.sh
|
||||
echo "./genapts850 \$@" >> run_genapts850.sh
|
||||
echo "./genapts850 \"\$@\"" >> run_genapts850.sh
|
||||
|
||||
chmod 755 run_tg-construct.sh run_ogr-decode.sh run_genapts850.sh
|
||||
fi
|
||||
_logSep
|
||||
|
||||
@@ -1172,7 +1306,7 @@ _logSep
|
||||
#######################################################
|
||||
|
||||
TGGUI_INSTALL_DIR=terrageargui
|
||||
INSTALL_DIR_TGGUI=$INSTALL_DIR/$TGGUI_INSTALL_DIR
|
||||
INSTALL_DIR_TGGUI="$INSTALL_DIR/$TGGUI_INSTALL_DIR"
|
||||
cd "$CBD"
|
||||
if _elementIn "TERRAGEARGUI" "${WHATTOBUILD[@]}"; then
|
||||
_printLog "****************************************"
|
||||
@@ -1198,22 +1332,26 @@ if _elementIn "TERRAGEARGUI" "${WHATTOBUILD[@]}"; then
|
||||
_make terrageargui
|
||||
|
||||
cd "$CBD"
|
||||
# Fill TerraGear Root field
|
||||
if [ ! -f ~/.config/TerraGear/TerraGearGUI.conf ]; then
|
||||
_log "Fill TerraGear Root field"
|
||||
echo "[paths]" > TerraGearGUI.conf
|
||||
echo "terragear=$INSTALL_DIR_TG/bin" >> TerraGearGUI.conf
|
||||
|
||||
cfgFile="$HOME/.config/TerraGear/TerraGearGUI.conf"
|
||||
if [ ! -f "$cfgFile" ]; then
|
||||
_log "Writing a default config file for TerraGear GUI: $cfgFile"
|
||||
mkdir -p ~/.config/TerraGear
|
||||
mv TerraGearGUI.conf ~/.config/TerraGear
|
||||
echo "[paths]" > "$cfgFile"
|
||||
echo "terragear=$INSTALL_DIR_TG" >> "$cfgFile"
|
||||
echo "flightgear=$INSTALL_DIR_FGFS/fgdata" >> "$cfgFile"
|
||||
fi
|
||||
|
||||
_log "Create run_terrageargui.sh"
|
||||
echo "#!/bin/sh" > run_terrageargui.sh
|
||||
echo "cd \$(dirname \$0)" >> run_terrageargui.sh
|
||||
echo "cd install/terrageargui/bin" >> run_terrageargui.sh
|
||||
echo "export LD_LIBRARY_PATH=$INSTALL_DIR_SIMGEAR/lib\${LD_LIBRARY_PATH:+:}\${LD_LIBRARY_PATH}" \
|
||||
>> run_terrageargui.sh
|
||||
echo "./TerraGUI \$@" >> run_terrageargui.sh
|
||||
SCRIPT=run_terrageargui.sh
|
||||
_log "Creating $SCRIPT"
|
||||
cat >"$SCRIPT" <<EndOfScriptText
|
||||
#! /bin/sh
|
||||
cd "\$(dirname "\$0")"
|
||||
cd '$SUB_INSTALL_DIR/$TGGUI_INSTALL_DIR/bin'
|
||||
export LD_LIBRARY_PATH='$INSTALL_DIR_SIMGEAR/lib'"\${LD_LIBRARY_PATH:+:}\${LD_LIBRARY_PATH}"
|
||||
./TerraGUI "\$@"
|
||||
EndOfScriptText
|
||||
chmod 755 "$SCRIPT"
|
||||
fi
|
||||
|
||||
# Print optional package alternatives that didn't match (this helps with
|
||||
|
||||
2
fgdata
2
fgdata
Submodule fgdata updated: 67bf0c8e19...dce80cbf83
Submodule flightgear updated: 2140d23b04...f007dd3ea1
2
getstart
2
getstart
Submodule getstart updated: bc1678f097...b7ab2fa1e9
@@ -46,7 +46,7 @@ else
|
||||
FGBUILDTYPE=Nightly
|
||||
fi
|
||||
|
||||
cmake -DFG_BUILD_TYPE=$FGBUILDTYPE -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -DCMAKE_BUILD_TYPE=RelWithDebInfo ../flightgear
|
||||
cmake -DFG_BUILD_TYPE=$FGBUILDTYPE -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -DENABLE_SWIFT:BOOL=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo ../flightgear
|
||||
|
||||
make
|
||||
|
||||
|
||||
2
simgear
2
simgear
Submodule simgear updated: 6d89cc6c1d...f964374027
Reference in New Issue
Block a user