Supporto portable.

This commit is contained in:
Emiliano Vavassori 2022-03-21 01:29:27 +01:00
parent 1c46f9846f
commit ae974e613a
1 changed files with 4 additions and 0 deletions

View File

@ -167,6 +167,10 @@ class Build(object):
os.makedirs(self.appimagedir, exist_ok = True)
# At this point, let's decompress the deb packages
subprocess.run("find .. -iname '*.deb' -exec dpkg -x {} . \;", shell=True, cwd=self.appimagedir)
if self.portable:
shortversion = self.version.split('.')[0-2].join('.')
subprocess.run("find . -type f -iname 'bootstraprc' -exec sed -i 's|^UserInstallation=.*|UserInstallation=\$SYSUSERCONFIG/libreoffice/{version}|g' {} \+".format(version = shortversion), shell=True, cwd=self.appimagedir)
# Changing desktop file
subprocess.run("find . -iname startcenter.desktop -exec cp {} . \;", shell=True, cwd=self.appimagedir)
subprocess.run("sed -i -e 's:^Name=.*$:Name=%s:' startcenter.desktop" % self.appname, shell=True, cwd=self.appimagedir)