Commit Graph

790 Commits

Author SHA1 Message Date
James Turner
bbf956b518 Downloads scripts 2020-08-24 06:43:00 -04:00
Florent Rougon
e78b239597 download_and_compile.sh: require qml-module-qtquick-controls2 when building next 2020-07-14 12:32:27 +02:00
Julian Smith
754b347d7c Cope with renamed version => flightgear-version file. 2020-07-04 09:02:27 +01:00
Florent Rougon
cf95fc3530 download_and_compile.sh: more reliable test in _gitDownload()
Before this change, using OSG with download_and_compile.sh several times
in the same directory would fail because the upstream repo for OSG has
none of README, README.txt and README.rst at top-level (it has a
README.md). Testing for the .git dir is definitely more reliable.
2020-07-03 14:21:05 +02:00
Florent Rougon
25d9d717b5 download_and_compile.sh: no component and only --cleanup -> only do cleanup
If --cleanup is used and no component has been specified on the command
line, run the cleanup routine but don't process any component: no
download, no compilation, no installation. Previously(*), this used to
process the default set of components: SIMGEAR FGFS and DATA.

Therefore, if all you want to do is to remove compiled and installed
files, you can now run:

  download_and_compile.sh --cleanup

(*) During less than 24 hours, as --cleanup was added yesterday.
2020-06-30 15:11:02 +02:00
Florent Rougon
aa563cb5cb download_and_compile.sh: refactoring
Move several chunks of code to their own function. This will make the
code easier to follow when largish chunks are executed only under
certain conditions.

Minor changes unrelated to the refactoring:
  - make _logSep print a larger separator (78 chars);
  - write the SELECTED_SUITE at the top of the log file.
2020-06-30 15:11:02 +02:00
Automatic Release Builder
43082ed65b Add AppImage creation script by Brendan Black
Not fully tested yet but want to get this on Jenkins to see how it
goes.
2020-06-30 11:31:44 +01:00
Florent Rougon
9f710a8c84 download_and_compile.sh: add safety net in _cleanup()
Make sure $INSTALL_DIR is really a harmless 'install' directory before
calling 'rm -rf' on it.
2020-06-29 16:07:09 +02:00
Florent Rougon
3099633675 download_and_compile.sh: fix the order of operations in _gitUpdate()
_gitUpdate() used to call 'git pull' then 'git checkout'. If the latter
command really did a branch switch, this could leave the local branch
behind its remote counterpart (that was hopefully fetched by the
'git pull'). From now on, we do:

  git fetch origin
  git checkout --force "$branch"
  git pull --rebase

(the --force option was already there before in the form of -f). This
way, we can be sure that the local branch we check out is up-to-date
when the function returns.

Also replace short options by long ones for better readability of the
code, and use Bash's [[ ... ]] conditional construct instead of [ ... ]
for more efficiency---I think.

Note: 'git stash save' is documented as deprecated in favor of
      'git stash push', however the latter appears to have been
      introduced in 2017, therefore I believe it is too early to use it
      in download_and_compile.sh.
2020-06-29 15:23:53 +02:00
Florent Rougon
21c13c0886 download_and_compile.sh: add option --cleanup
This option recursively deletes build and install directories, but
preserves FGData if present (FGData is in
<base_dir>/install/flightgear/fgdata, hence the need to take special
care of it).

There is currently no way to trigger this cleanup routine whithout
pretending to act on at least one component, since "no components
specified" implies "SIMGEAR FGFS DATA". That said, using -pn -dn -rn -cn
with one of the components you already have should be close enough to
"only do the cleanup".
2020-06-29 14:23:18 +02:00
Florent Rougon
0972e57a5b download_and_compile.sh: use the set_ld_library_path variable
This improves readability a little bit. set_ld_library_path was defined
but unused since commit a5e4c47f. Note that this variable must be set
*after* the OpenBSD-specific code block because its definition relies on
the value of 'paths', which is modified in said block.
2020-06-23 19:22:45 +02:00
Florent Rougon
3bce994ea8 download_and_compile.sh: prompt when building 'next' and logfile not already present
This ensures that users building 'next' have seen the message that warns
about possible instability and are aware of the other options (--lts for
the latest Long Term Support release, -s for the latest release).

The default answer is to continue. If --non-interactive has been given,
the prompt is skipped and download_and_compile.sh proceeds as usual.

This commit also adds _yes_no_prompt() which makes more sense than
_yes_no_quit_prompt() here, since the 'no' answer implies that the user
wants to quit.
2020-06-23 11:10:25 +02:00
Florent Rougon
fdf98d0ef3 download_and_compile.sh: consistent indentation for long options in _usage() 2020-06-22 20:38:47 +02:00
Florent Rougon
041dc98c9c download_and_compile.sh: don't hardcode the address of the FG repo
When doing the 'git ls-remote' request to find the latest FG release,
d&c was using a hardcoded address for the FG repo. Use
${REPO_ADDRESS[FGFS]} instead.
2020-06-22 20:05:26 +02:00
Florent Rougon
1f3f4ea353 download_and_compile.sh: only print COMPONENT_BRANCH[foo]=bar for built components
Only those components present in WHATTOBUILD are really interesting when
printing and logging COMPONENT_BRANCH[foo]=bar. Inter-component deps are
taken into account before doing that, since they may add components to
WHATTOBUILD.
2020-06-22 19:13:58 +02:00
Florent Rougon
c4c8f0a099 download_and_compile.sh: add options --lts and --component-branch
Option --lts builds the latest LTS release of components SIMGEAR, FGFS
and DATA. The presence of option -s or --lts affects the version or
branch checked out for each component; however, passing none of these
options doesn't imply that development versions will be used for
everything---this selects development versions for FlightGear and
possibly closely-related software, but for the rest, we aim at something
reasonably usable, as in "current release".

For each component, the default version selected depending on whether
-s, --lts or none of these was given, can be overridden using
'--component-branch COMPONENT=BRANCH' (without the quotes). For
instance:

  download_and_compile.sh --lts \
    --component-branch OSG=OpenSceneGraph-3.6 SIMGEAR FGFS DATA OSG

will build the latest LTS release of FlightGear against the
OpenSceneGraph-3.6 branch of OpenSceneGraph. Option --component-branch
may be used several times and always overrides the defaults determined
by the presence or absence of -s or -lts. Thus, the relative order of
-s, --lts and --component-branch options does not matter.

This commit also adds text to the standard output and log file that
tells users:
  - which "suite" they have selected (default=next, -s or --lts) and
    what this implies;
  - which branch will be checked out for each component (i.e., after
    the overrides from all --component-branch options passed have been
    applied).

It is nonsensical to provide both -s and --lts in the same invocation,
but the last one wins.
2020-06-22 18:26:39 +02:00
Automatic Release Builder
28de5426f2 Localized catalogs: fix name/description bug 2020-06-22 10:02:40 +01:00
Florent Rougon
e105274de4 Update catalog/README.md (and fix a typo) 2020-06-22 00:41:05 +02:00
Florent Rougon
8028ce2888 Python: move test modules and data to python3-flightgear/flightgear/meta/tests/
- Move test_catalog.py, test_sgprops.py and catalog/testData/ to
  python3-flightgear/flightgear/meta/tests/.
- Copy catalog/fgaddon-catalog/ to the same place (it is needed by
  test_catalog.py).
- Adapt test_catalog.py and test_sgprops.py accordingly.
- Remove the executable bits from test_catalog.py and test_sgprops.py:
  this is because test_catalog.py can't be run directly anymore; well,
  it can but 3 tests would fail in this setup. No time to investigate
  why (sorry), but this commit adds a README.txt in
  python3-flightgear/flightgear/meta/tests/README.txt that explains how
  to run the tests in a way that works (basically, run
  'python3 -m unittest' from the python3-flightgear directory).

For a bit more context, see
<https://sourceforge.net/p/flightgear/mailman/message/37042247/>.
2020-06-22 00:30:51 +02:00
Automatic Release Builder
cef19a8b13 Catalog I18N support
Read I18N satrings form aircraft data and add to the catalog
2020-06-21 19:25:18 +01:00
Florent Rougon
3a36bdd474 i18n: move the scripts to the top-level 'i18n' directory
Also add a README.md to python3-flightgear explaining how to use the
PYTHONPATH environment variable or a .pth file in order to run the
Python scripts in FGMeta, and pointing to the top-level directories
'catalog' and 'i18n'.
2020-06-19 18:26:43 +02:00
Florent Rougon
b86452cf08 fg-copy-weather-scenarios-to-default-locale: adjust the sgprops import 2020-06-19 18:15:30 +02:00
Florent Rougon
1c2d17d869 Reorganize catalog modules
- Move the support modules inside python3-flightgear/flightgear/ and
  remove their shebang, if any.
- Accordingly adapt the import statements.
- Change shebangs from e.g. '#! /usr/bin/python' to
  '#! /usr/bin/env python3'.
- Small changes to make Python 3 happy with all scripts.

catalog/check_aircraft.py should be run under Python 3 from now on.
2020-06-19 18:15:25 +02:00
Florent Rougon
d259ec0b76 i18n Python scripts: improve fg-copy-weather-scenarios-to-default-locale
- Use the new flightgear.meta.strutils.simplify() function.
- Automatically add a comment to the generated file to indicate that it
  was automatically generated and shouldn't be manually modified, etc.
- Improve error handling: abort with a clear error message if any of the
  'id', 'name' and 'desc' children of a 'scenario' element is
  problematic (empty or missing, for instance).
- Rename make_xml_leaf() to makeXmlLeaf() + other minor renaming.
2020-06-18 14:23:03 +02:00
Florent Rougon
52e84741d0 i18n Python scripts: add module flightgear.meta.strutils
For now, the module only contains the simplify() function, which will be
used by fg-copy-weather-scenarios-to-default-locale.
2020-06-18 14:22:57 +02:00
Automatic Release Builder
c2a241c357 Review feedback from Florent 2020-06-18 10:16:06 +01:00
Florent Rougon
120d02e5fb i18n Python scripts: rename BasicL10NResourceManager._readFgResourceFile()
Class method BasicL10NResourceManager._readFgResourceFile() was not
meant to be private; remove the leading underscore.
2020-06-18 01:06:37 +02:00
Florent Rougon
14eb302022 i18n Python scripts: fix a typo in TranslationUnit._stringsKey()
I believe the problematic code could only be reached when reading buggy
versions (i.e., with duplicate ids) of the legacy FlightGear XML
non-master l10n files, which is why we haven't tripped on it so far.
2020-06-18 00:56:37 +02:00
Automatic Release Builder
d502afa171 Add weather-scenarios to i18n list 2020-06-17 17:08:50 +01:00
Automatic Release Builder
14b3950d44 Script to create default translation for weather 2020-06-17 17:03:25 +01:00
Florent Rougon
eabc8534b0 i18n Python scripts: define the list of basic categories at the top
Introduce a BASIC_CATEGORIES variable at the top of
python3-flightgear/flightgear/meta/i18n.py that lists all categories
handled by BasicL10NResourceManager. Since currently all of our
translation files can be handled this way (the XML master files all have
a flat structure), we only need to say BASIC_CATEGORIES = CATEGORIES.

With this change, adding a new basic category such as
'weather-scenarios' only requires one to add it to CATEGORIES.
2020-06-17 13:12:31 +02:00
Automatic Release Builder
a80917705d Update trunk FGaddon catalog metadata
Ensure next is usable for trunk FGaddon.
2020-06-16 12:54:11 +01:00
Automatic Release Builder
e92948a44e track submodule changes for release 2020-06-15 12:33:58 +01:00
Automatic Release Builder
fd2b26a975 new version: 2020.3.0 2020-06-15 12:33:58 +01:00
Automatic Release Builder
40b6272570 new version: 2020.2.1 2020-06-15 12:33:58 +01:00
Automatic Release Builder
a82e6f7f6b Adjust for new LTS release 2020-06-15 12:33:20 +01:00
legoboyvdlp R
e34d02edbc Windows install: re-add js_demo.exe
The former is an advanced configuration tool for users' joysticks.
2020-05-25 09:26:12 +01:00
Florent Rougon
3810a31230 download_and_compile.sh: improve user-interaction
Since the prompt is repeated by _yes_no_quit_prompt() every time an
invalid answer is given, a short sentence is better than the empty
string.
2020-05-24 16:31:26 +02:00
Florent Rougon
00710497b0 download_and_compile.sh: add missing quoting
This is needed because $answer will be empty in case the default $2 is
empty and the user hits Enter at the prompt.
2020-05-24 11:39:27 +02:00
Florent Rougon
420034d5b5 download_and_compile.sh: make initial cloning of FGData easy and secure
Because cloning FGData from SourceForge using https does not work (this
has been the case for *years*) whereas normal updates of an existing
clone do work, and so does cloning the repository from its official
GitLab mirror using https, this commits implements a special case in
_gitDownload():

  If the assembled clone URL is
  <https://git.code.sf.net/p/flightgear/fgdata>, then ask the user if he
  agrees to automatically clone FGData from GitLab and arrange the
  repository setup to fetch subsequent updates from SourceForge. This
  should be fine because <https://gitlab.com/flightgear/fgdata> is an
  official mirror of FGData. The default answer is thus to do so. It is
  automatically chosen when download_and_compile.sh is called with
  --non-interactive (new option).

This implies that the initial use of download_and_compile.sh is again as
easy as subsequent ones.

This commits also adds the utility function _yes_no_quit_prompt() to
repeatedly ask a question ($1) until a valid answer has been provided.
The function automatically uses the default answer ($2) if
--non-interactive has been passed to download_and_compile.sh. See the
“discussion” at
<https://sourceforge.net/p/flightgear/mailman/message/37017469/>.
2020-05-24 11:14:36 +02:00
Florent Rougon
b3893f7bda i18n Python scripts: allow autodetection of translation files
- Add class method availableTranslations() to AbstractFormatHandler in
  i18n.py.

- Use it in fg-update-translation-files to allow autodetection of the
  available translations when no LANGUAGE_CODE is passed to
  fg-update-translation-files.

This should address James' wish at
<https://sourceforge.net/p/flightgear/mailman/message/37003967/>.
2020-05-08 10:33:35 +02:00
James Turner
4e28b88c22 Windows: fixes for compositor builds 2020-05-03 19:02:26 +01:00
Florent Rougon
fa0dcb5d4d download_and_compile.sh: add libssl-dev as mandatory dep for CMake
Unless SSL support is turned off, libssl-dev is needed to build CMake.
Thanks to Jeff Davis for the report.
2020-05-01 17:39:46 +02:00
James Turner
819074136a Re-enable ‘full-fat’ nightlies for macOS
May need to tweak the bundle IDs for notarization, let’s see.
2020-05-01 12:00:59 +01:00
James Turner
03ac46120c Windows: remove erroneous space breaking build
This was causing to pick the second prefix path as the source dir,
which doesn’t work so well.
2020-05-01 08:46:49 +01:00
James Turner
cc76052038 Trunk FGAddon hangar: support 2020.* versions 2020-04-29 14:58:14 +01:00
legoboyvdlp R
3f38a3cf18 Add support for compositor to windows builds 2020-04-29 08:37:50 +01:00
James Turner
1c7dcaf5d5 macOS: package libSentry 2020-04-29 08:32:15 +01:00
James Turner
dbdfc52a00 Adjust release script 2020-04-27 09:31:38 +01:00
James Turner
d4489091e2 track submodule changes for release 2020-04-27 09:30:09 +01:00