1
0
Fork 0

Refactoring di determinato codice, vediamo se potrebbe funzionare.

This commit is contained in:
Emiliano Vavassori 2022-03-31 01:19:51 +02:00
parent 5ce7f5cc07
commit c88e10b2ac
2 changed files with 20 additions and 51 deletions

View file

@ -8,6 +8,7 @@ import tempfile, os, sys, glob, subprocess, shutil, re
class Build(object):
LANGSTD = [ 'ar', 'de', 'en-GB', 'es', 'fr', 'it', 'ja', 'ko', 'pt', 'pt-BR', 'ru', 'zh-CN', 'zh-TW' ]
LANGBASIC = [ 'en-GB' ]
ARCHSTD = [ u'x86', u'x86_64' ]
def __init__(self, query, arch):
"""Build all versions that can be found in the indicated repo."""
@ -35,7 +36,7 @@ class Build(object):
self.appname = 'LibreOffice' if not self.query == 'daily' and not self.query == 'prerelease' else 'LibreOfficeDev'
self.version = v.version
self.url = v.basedirurl
self.built = { 'x86': False, 'x86_64': False }
self.built = { u'x86': False, u'x86_64': False }
# Preparing the default for the relative path on the storage for
# different versions.
@ -73,12 +74,10 @@ class Build(object):
# If the build was called by queried name, build from latest release available but build with the most generic name
myver = str.join('.', self.version.split('.')[0:2])
self.genappversion = myver + self.languagepart + self.helppart
self.genappimagefilename['x86'] = self.appname + '-' + self.genappversion + '-x86.AppImage'
self.genappimagefilename['x86_64'] = self.appname + '-' + self.genappversion + '-x86_64.AppImage'
self.appversion = self.version + self.languagepart + self.helppart
self.appimagefilename['x86'] = self.appname + '-' + self.appversion + '-x86.AppImage'
self.appimagefilename['x86_64'] = self.appname + '-' + self.appversion + '-x86_64.AppImage'
for arch in ARCHSTD:
self.genappimagefilename[arch] = self.appname + '-' + self.genappversion + f'-{arch}.AppImage'
self.appimagefilename[arch] = self.appname + '-' + self.appversion + f'-{arch}.AppImage'
for arch in self.arch:
# For generalized builds, we need to check if there are .ver file