Compare commits

..

32 Commits

Author SHA1 Message Date
Florent Rougon
bad115cac0 download_and_compile.sh: add libopenal-dev as mandatory dependency of SimGear
Thanks to Clm76 for the report.
2019-07-06 12:19:42 +02:00
Florent Rougon
696829a260 download_and_compile.sh: add optional dependency on libevent-dev
This is needed for swift support (thanks to wkitty42 for the report).
2019-05-25 21:28:36 +02:00
James Turner
09cc52296d Put compositor back off for now
Need to figure out a way to handle it as another binary build, since
there is no runtime configuration option.
2019-05-24 13:55:59 +01:00
James Turner
abc616b548 Enable Swift in nightly builds 2019-05-24 09:31:51 +01:00
James Turner
c3b9b9a524 Enable compositor in nightly builds 2019-05-23 12:38:02 +01:00
James Turner
2277ba38c7 Fix a typo in DBus installer spec 2019-05-23 11:02:10 +01:00
Lars Toenning
97a72b4934 Add swift dlls to installer script 2019-05-17 10:54:29 +02:00
Florent Rougon
ecd4b9aab3 download_and_compile.sh: fix path in generated default TerraGearGUI.conf
The 'flightgear' path in ~/.config/TerraGear/TerraGearGUI.conf is
supposed to point to $FG_ROOT, not to the FlightGear repository...
2019-05-02 01:36:00 +02:00
Florent Rougon
882ab6ae59 download_and_compile.sh: small fixes for TerraGear and TerraGear GUI
- make all generated scripts executable;
- use correct path for 'terragear' in the generated default config file
  ~/.config/TerraGear/TerraGearGUI.conf (not the 'bin' subdirectory);
- add default for the 'flightgear' path in the same file;
- don't write temporary TerraGearGUI.conf in $CBD (it's useless and
  might overwrite a user-created file);
- simplify a bit (esp. using a here document for generating
  run_terrageargui.sh).
2019-04-29 22:28:21 +02:00
Florent Rougon
f3423dba60 download_and_compile.sh: respect the selected build type for TerraGear
So far, TerraGear was always built by d&c with
-DCMAKE_BUILD_TYPE="Debug". Following [1], d&c will now use, for
TerraGear, the build type selected with its -b option---which by default
is 'RelWithDebInfo'.

(In short: the 'Debug' build type has a very high negative performance
impact, therefore it should only be done intentionally.)

[1] https://sourceforge.net/p/flightgear/mailman/message/36650766/
2019-04-26 23:01:58 +02:00
Florent Rougon
39c1754a7f download_and_compile.sh: improve management of intercomponent dependencies
- new function _depends() to allow declaring intercomponent dependencies
  using a declarative style;

- declare that FGFS depends on SIMGEAR (TERRAGEAR depends on SIMGEAR as
  well, but this was already there---just not in the new, declarative
  style);

- print and log automatically-added components; when this happens, give
  a hint about --ignore-intercomponent-deps;

- log the value of IGNORE_INTERCOMPONENT_DEPS, which reflects whether
  --ignore-intercomponent-deps was used.
2019-04-26 13:14:38 +02:00
Florent Rougon
f190773790 download_and_compile.sh: use proper string comparison in _elementIn()
In Bash, the [[ <foo> == <bar> ]] and [[ <foo> = <bar> ]] conditionals
interpret <bar> as a shell globbing pattern. This wasn't desired in
_elementIn(), where the <bar> string is provided by the caller, and
might contain pattern metacharacters. Replace this conditional with a
plain string comparison made with '[' (aka, the 'test' command).
2019-04-26 10:44:03 +02:00
Florent Rougon
5b34458439 download_and_compile.sh: add option --ignore-intercomponent-deps
Add option --ignore-intercomponent-deps which does the following:

  Ignore dependencies between components (default: don't).

  Example: TERRAGEAR depends on SIMGEAR. Because of this, running
  'download_and_compile.sh TERRAGEAR' would normally update, rebuild,
  etc. both SIMGEAR and TERRAGEAR. Passing the
  --ignore-intercomponent-deps option can be useful if you want to
  update, rebuild, etc. TERRAGEAR *without* doing the same for SIMGEAR
  (for instance, if you are doing repeated TERRAGEAR builds and you know
  your SIMGEAR is already fine and up-to-date).
2019-04-26 10:30:45 +02:00
Florent Rougon
59c9a55baa download_and_compile.sh: log whether this is a "stable build"
Log "Stable build: yes" or "Stable build: no" depending on whether
option -s has been passed.
2019-04-26 09:29:50 +02:00
Florent Rougon
92f566f1d3 download_and_compile.sh: fix "TERRAGEAR depends on SIMGEAR" implementation
The previous commit enforced this dependency only under the
[[ "$DOWNLOAD_PACKAGES" = "y" ]] condition, which was too restrictive.
2019-04-26 09:25:59 +02:00
Florent Rougon
5b6ba959d9 download_and_compile.sh: update TerraGear dependencies and branch selection
- update dependencies of the TERRAGEAR component (require SimGear,
  libboost-dev and zlib1g-dev apart from what was already listed
  following [0]);

- use TerraGear branch 'scenery/ws2.0' if the -s option has been given,
  otherwise use the 'next' branch.

References: [1] and Scott's reply[2].

[0] 6661d1e10c/
[1] https://sourceforge.net/p/flightgear/mailman/message/36649774/
[2] https://sourceforge.net/p/flightgear/mailman/message/36650028/
2019-04-26 08:40:59 +02:00
Florent Rougon
675e7e6bdc download_and_compile.sh: new generated script: run_ldd.sh
This script can be useful to debug library problems.

$ ./run_ldd.sh --help
Usage: ./run_ldd.sh LDD_ARGUMENT...
Run 'ldd' with the same LD_LIBRARY_PATH setup as done inside run_fgfs.sh.

Examples: 'run_ldd.sh fgfs', 'run_ldd.sh fgcom', etc. (this can be used
for any binary in 'install/flightgear/bin').
2019-04-25 08:29:23 +02:00
Florent Rougon
07d1b0e882 download_and_compile.sh: update warning message 2019-04-24 19:18:57 +02:00
Florent Rougon
f826f8c4b2 download_and_compile.sh: remove useless parameter in URL 2019-04-24 18:56:42 +02:00
Florent Rougon
82f3c85343 download_and_compile.sh: allow setting SG_CMAKEARGS and FG_CMAKEARGS from the environment
This allows one to add custom CMake options for the SG and/or FG
build(s) without modifying download_and_compile.sh.
2019-04-24 18:50:50 +02:00
Florent Rougon
3344c21c71 download_and_compile.sh: add quoting to the generated scripts
run_fgfs.sh and run_fgfs_debug.sh have been tested: now they work fine
when run from a directory whose path contains spaces.

The other scripts have been quickly updated, because the problems were
quite similar, but these haven't been tested (the FGo! startup script
had useless stuff, the FGx one had very weird things like "cd $ " which
probably had not been tested).
2019-04-21 13:37:35 +02:00
Florent Rougon
b2274fbbed download_and_compile.sh: pass -DTRANSLATIONS_SRC_DIR when building FlightGear
When configuring FlightGear, flightgear/CMakeModules/Translations.cmake
checks for the presence of "${FGDATA_SRC_DIR}/Translations/${xlf_file}"
where ${xlf_file} is en_US/FlightGear-Qt.xlf, however this
${FGDATA_SRC_DIR} is *not* initialized from -DFG_DATA_DIR argument
passed on FlightGear's cmake command. The autodetection only works if
FGData is located in ../fgdata from the FlightGear source directory. In
the meantime, make download_and_compile.sh explicitly pass
-DTRANSLATIONS_SRC_DIR:PATH when configuring FG.

The -DFG_DATA_DIR:PATH vs. -DFG_DATA_DIR change is visible in
build/flightgear/CMakeCache.txt but not decisive here.
2019-04-21 11:45:28 +02:00
Florent Rougon
cd80fffbe2 download_and_compile.sh: add quoting around variable expansions
Should behave better in case one of these variables contains whitespace.

Note: I didn't look inside the generated scripts such as run_fgfs.sh,
      they may have similar issues.
2019-04-21 08:39:34 +02:00
Florent Rougon
5e25bc9277 download_and_compile.sh: don't attempt to install libcppunit-dev anymore
According to Edward, installing the system CppUnit library is not really
useful and likely to cause problems.[1]

This reverts commit 6caf43f9e7.

[1] https://sourceforge.net/p/flightgear/mailman/message/36636483/
2019-04-11 10:34:29 +02:00
Florent Rougon
06d84d1d5b download_and_compile.sh: don't install CMake from distro package when we build it
Don't install the 'cmake' distro package when the CMAKE component has
been selected.
2019-04-09 10:34:39 +02:00
Florent Rougon
6661d1e10c download_and_compile.sh: only install dependencies for selected components
For instance, don't attempt to install TerraGear dependencies unless
TERRAGEAR is in WHATTOBUILD. This should significantly reduce the number
of packages downloaded by the first use of download_and_compile.sh that
doesn't have -pn in the options.

We may get reports of missing dependencies for some components as a side
effect of this change; we'll just have to add the missing dependencies
wherever they are required (this can happen if, for instance, some
particular dependency was so far listed in the comments only as a
TERRAGEAR dependency, but was actually required by *another component*
such as FGFS). Incorrect dependency information needs to be fixed,
that's all there is to it.
2019-04-09 10:34:30 +02:00
Florent Rougon
6caf43f9e7 download_and_compile.sh: add optional dependency on libcppunit-dev
The dependency is optional because CppUnit is shipped with the FG
sources. However, when installed via the distro package manager as we
are attempting here:
  - the FG build will be quicker;
  - libcppunit-dev will be updated like other distro packages (e.g.,
    it will receive security updates).
2019-04-09 09:40:28 +02:00
chris_blues
7b51c99439 FGmeta/Nasa2FGearthview
-----------------------
* merge contribution of eatdirt <chris@ringeval.com>
  add download, conversion and generation of normalmaps
  Big thanks Chris!
* update README and some minor updates to the script
2019-03-25 18:20:43 +01:00
Florent Rougon
1cf284bd6f download_and_compile.sh: add optional dependency on qttools5-dev
This package is needed to embed translations in the built-in launcher
(it contains Qt5LinguistToolsConfig.cmake). Thanks to Clm76 for the
feedback.
2019-03-25 11:09:13 +01:00
Florent Rougon
1f27f8e39a download_and_compile.sh: create openscenegraph dir only when OSG build is enabled
Dont create the 'openscenegraph' directory when the OSG build is
not selected (request from user ctesc356 of the French forum).
2019-03-23 14:34:51 +01:00
Torsten Dreyer
caaad41e26 track submodule changes for release 2019-03-13 21:21:07 +01:00
Torsten Dreyer
120055fa43 new version: 2019.2.0 2019-03-13 21:21:07 +01:00
13 changed files with 1029 additions and 392 deletions

8
.gitmodules vendored
View File

@@ -1,11 +1,11 @@
[submodule "simgear"]
path = simgear
url = ../simgear
branch = release/2019.1
branch = next
[submodule "flightgear"]
path = flightgear
url = ../flightgear
branch = release/2019.1
branch = next
[submodule "fgrun"]
path = fgrun
url = ../fgrun
@@ -13,7 +13,7 @@
[submodule "fgdata"]
path = fgdata
url = ../fgdata
branch = release/2019.1
branch = next
[submodule "windows-3rd-party"]
path = windows-3rd-party
url = ../windows-3rd-party
@@ -21,4 +21,4 @@
[submodule "getstart"]
path = getstart
url = ../getstart
branch = release/2019.1
branch = next

View File

@@ -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"

View File

@@ -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

View File

@@ -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

View File

@@ -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 ..

View File

@@ -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

Submodule fgdata updated: dade6b7218...dce80cbf83

View File

@@ -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

Submodule simgear updated: d6bbad87c4...f964374027

View File

@@ -1 +1 @@
2019.1.2
2019.2.0