Skip to content

Commit

Permalink
Merge pull request #356 from pchote/appimage
Browse files Browse the repository at this point in the history
Switch backend engines to AppImages.
  • Loading branch information
pchote authored Oct 27, 2019
2 parents 67b1233 + d777a88 commit 21f976d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
19 changes: 17 additions & 2 deletions openra/settings.py.example
Original file line number Diff line number Diff line change
Expand Up @@ -166,17 +166,32 @@ ACCOUNT_ACTIVATION_DAYS = 7
# Path to directory where OpenRA versions are stored
OPENRA_ROOT_PATH = ''

# OpenRA versions matching their directory names
# OpenRA Versions matching their directory names
# Reverse chronological order - newer versions must be listed first!
OPENRA_VERSIONS = [
'playtest-20191021',
'release-20190314',
'release-20180923',
'release-20180307',
'release-20180218',
'release-20171014',
]

# Versions that should be run using the legacy mono environment
# Versions not in this list will be treated as an extracted AppImage bundle
OPENRA_LEGACY_VERSIONS = [
'release-20190314',
'playtest-20190106',
'release-20180923',
'release-20180307',
'release-20180218',
'release-20171014',
]

# List of versions that each version can update from
OPENRA_UPDATE_VERSIONS = {
'playtest-20180825': ['release-20180307', 'release-20171014']
'playtest-20191021': ['release-20190314', 'release-20181215', 'release-20180923', 'release-20180307', 'release-20171014'],
'release-20190314': ['playtest-20190106', 'release-20180923', 'release-20180307', 'release-20180218', 'release-20171014'],
}

# Email address (FROM) in our custom mail methods
Expand Down
2 changes: 1 addition & 1 deletion openra/templates/uploadMap.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

$('.upload-map-form-parser option:first-child').attr("selected", "selected");

$('.upload-map-form-parser option:first-child').append(' (the latest published)')
$('.upload-map-form-parser option:first-child').append(' (latest version)')
});
</script>

Expand Down
7 changes: 5 additions & 2 deletions openra/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@ def run_utility_command(parser, game_mod, args, cwd=None):
if game_mod not in ['ra', 'cnc', 'd2k', 'ts']:
game_mod = 'ra'

popen = Popen([os.path.join(settings.OPENRA_ROOT_PATH, parser, game_mod + '.AppImage'), '--utility'] + args,
stdout=PIPE, cwd=cwd)
utility_args = [os.path.join(settings.OPENRA_ROOT_PATH, parser, game_mod, 'AppRun'), '--utility']
if parser in settings.OPENRA_LEGACY_VERSIONS:
utility_args = ['mono', '--debug', os.path.join(settings.OPENRA_ROOT_PATH, parser, 'OpenRA.Utility.exe'), game_mod]

popen = Popen(utility_args + args, stdout=PIPE, cwd=cwd)

output = b''
for chunk in popen.stdout:
Expand Down

0 comments on commit 21f976d

Please sign in to comment.