diff --git a/loaih/__init__.py b/loaih/__init__.py index a33726f..d682d94 100644 --- a/loaih/__init__.py +++ b/loaih/__init__.py @@ -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)