Commit 76d27292 authored by Alexandre Detiste's avatar Alexandre Detiste

Fix launcher scripts generated in BINDIR

I'm thinking about moving those bits of code to GDP-runtime
parent c9fa54f9
......@@ -3,6 +3,9 @@ game-data-packager (48) unstable; urgency=medium
* Enhancements and bug fixes:
- Add a button to "Doom II Masterlevels" launcher to start
chocolate-doom-setup from there. [adetiste]
- Fix launcher scripts generated in BINDIR,
impacted games: Z-code text-mode adventures (H2G2, Zork...)
and multilingual ScummVM games [adetiste]
-- Simon McVittie <smcv@debian.org> Thu, 24 Nov 2016 08:15:30 +0100
......
......@@ -72,9 +72,9 @@ class DosboxTask(PackagingTask):
super(DosboxTask, self).fill_extra_files(package, destdir)
pgm = package.name[:len(package.name)-5]
mkdir_p(os.path.join(destdir, self.packaging.BINDIR.strip('/')))
os.symlink('dosgame',
os.path.join(destdir, self.packaging.BINDIR.strip('/'), pgm))
bindir = self.packaging.substitute(self.packaging.BINDIR, package.name)
mkdir_p(os.path.join(destdir, bindir.strip('/')))
os.symlink('dosgame', os.path.join(destdir, bindir.strip('/'), pgm))
appdir = os.path.join(destdir, 'usr/share/applications')
mkdir_p(appdir)
......
......@@ -146,7 +146,8 @@ class ScummvmTask(PackagingTask):
else:
pgm = package.name[0:len(package.name)-len('-data')]
entry['Exec'] = pgm
bindir = os.path.join(destdir, self.packaging.BINDIR.strip('/'))
bindir = self.packaging.substitute(self.packaging.BINDIR, package.name)
bindir = os.path.join(destdir, bindir.strip('/'))
assert bindir.startswith(destdir + '/'), (bindir, destdir)
mkdir_p(bindir)
path = os.path.join(bindir, pgm)
......
......@@ -123,8 +123,10 @@ class ZCodeTask(PackagingTask):
'usr/share/applications/%s.desktop %s'
% (package.name, engine))
bindir = os.path.join(destdir, self.packaging.BINDIR.strip('/'))
bindir = self.packaging.substitute(self.packaging.BINDIR, package.name)
bindir = os.path.join(destdir, bindir.strip('/'))
assert bindir.startswith(destdir + '/'), (bindir, destdir)
assert '$' not in bindir
mkdir_p(bindir)
pgm = package.name[0:len(package.name)-len('-data')]
path = os.path.join(bindir, pgm)
......
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