Commit bea9a3b1 authored by Carsten Sprung's avatar Carsten Sprung

Merge branch 'master' into 'master'

Allow optional prefix for eclipse execution

Sometimes there is the need to set environment variables for the eclipse executable. (I.e. if Unity breaks something again). This addition allows the user to specify a prefix for each executable.

See merge request !2
parents e72608ea bbd27441
......@@ -2,6 +2,7 @@
"launcher": "/home/user/.local/share/applications/eclipse.desktop",
"name": "Eclipse",
"icon": "eclipse.png",
"execPrefix": "",
"actions": {
"installer": {
"name": "Oomph Installer",
......
......@@ -74,6 +74,12 @@ for child in locations.findall('installation'):
with open(configpath) as config_file:
config = json.load(config_file, object_pairs_hook=OrderedDict)
# Handle non-existance of keys
executionPrefix = ""
if 'execPrefix' in config:
executionPrefix = config['execPrefix'] + ' '
# Write launcher
if (args.dryrun):
f = sys.stdout
......@@ -95,7 +101,7 @@ f.write('update;\n\n')
for installation in installations:
f.write('[Desktop Action ' + installation[0]+ ']\n')
f.write('Name=' + installation[0]+ '\n')
f.write('Exec=' + installation[1]+ '\n')
f.write('Exec=' + executionPrefix + installation[1]+ '\n')
f.write('\n')
for key, value in config['actions'].items():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment