From f2c64e195fc68892e0b99708bd6ce6544c5677c8 Mon Sep 17 00:00:00 2001 From: Emiliano Vavassori Date: Wed, 30 Mar 2022 00:42:31 +0200 Subject: [PATCH] Correzione file ver. Spero sistemato problema di lingua. --- loaih/__init__.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/loaih/__init__.py b/loaih/__init__.py index c25c045..6964d1a 100644 --- a/loaih/__init__.py +++ b/loaih/__init__.py @@ -215,14 +215,20 @@ class Build(object): buildtarballs.extend([ x for x in self.tarballs[arch] if ('pack' + lang) in x ]) else: buildtarballs.extend([ x for x in self.tarballs[arch] if ('langpack' + lang) in x ]) - else: - # In any other cases, we build with all languages - if not self.offline_help: - buildtarballs.extend([ x for x in self.tarballs[arch] if 'langpack' in x ]) - else: + elif self.language == 'full': + if self.offline_help: # We need also all help. Let's replace buildtarball with the # whole bunch buildtarballs = self.tarballs[arch] + else: + buildtarballs.extend([ x for x in self.tarballs[arch] if 'langpack' in x ]) + else: + # Looping for each language in self.language + for lang in self.language.split(","): + if self.offline_help: + buildtarballs.extend([ x for x in self.tarballs[arch] if ('pack' + lang) in x ]) + else: + buildtarballs.extend([ x for x in self.tarballs[arch] if ('langpack' + lang) in x ]) # Unpacking the tarballs for archive in buildtarballs: @@ -268,7 +274,7 @@ class Build(object): if generalize: subprocess.run("VERSION={version} ./appimagetool -u 'zsync|{zsync}' -v ./{appname}.AppDir/".format(version = self.genappversion, zsync = self.genappimagefilename[arch] + '.zsync', appname = self.appname), shell=True) # Build version file management - with open(self.appimagefilename[arch] + '.ver', 'w') as v: + with open(self.genappimagefilename[arch] + '.ver', 'w') as v: v.write(self.version) else: subprocess.run("VERSION={version} ./appimagetool -u 'zsync|{zsync}' -v ./{appname}.AppDir/".format(version = self.appversion, zsync = self.appimagefilename[arch] + '.zsync', appname = self.appname), shell=True) @@ -276,7 +282,7 @@ class Build(object): else: if generalize: subprocess.run("VERSION={version} ./appimagetool -v ./{appname}.AppDir/".format(version = self.genappversion, appname = self.appname), shell=True) - with open(self.appimagefilename[arch] + '.ver', 'w') as v: + with open(self.genappimagefilename[arch] + '.ver', 'w') as v: v.write(self.version) else: subprocess.run("VERSION={version} ./appimagetool -v ./{appname}.AppDir/".format(version = self.appversion, appname = self.appname), shell=True)