mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-09-10 12:03:18 +02:00
script: add support for qt5 ending binaries for copy runtime files
Change-Id: I21f5daceffe9f0322cafa5a220e4a3252d1e05cf
This commit is contained in:
parent
27e17905d0
commit
7168d9f4b0
1 changed files with 28 additions and 4 deletions
|
@ -31,12 +31,12 @@ def execute_cmd(cmd, use_subprocess_pipe=False):
|
|||
p = subprocess.Popen(cmd,
|
||||
shell=True,
|
||||
stdout=subprocess.PIPE if use_subprocess_pipe else sys.stdout)
|
||||
output, error = p.communicate()
|
||||
output, _ = p.communicate()
|
||||
|
||||
if use_subprocess_pipe:
|
||||
if output:
|
||||
return output
|
||||
return error
|
||||
return -1
|
||||
else:
|
||||
if p.returncode != 0:
|
||||
sys.exit()
|
||||
|
@ -54,7 +54,7 @@ class globalVar:
|
|||
output_path = ""
|
||||
|
||||
stamp = execute_cmd('git rev-parse HEAD', True)[0:8]
|
||||
if system_name == "Windows":
|
||||
if type(stamp) is bytes:
|
||||
stamp = stamp.decode("utf-8")
|
||||
stampFile = client_dir + os.sep + ".deploy.stamp"
|
||||
|
||||
|
@ -94,6 +94,14 @@ def setup_parameters(parsed_args):
|
|||
globalVar.qt_path = parsed_args.qtPath
|
||||
else:
|
||||
globalVar.qt_version = execute_cmd('qmake -v', True)
|
||||
if globalVar.qt_version == -1:
|
||||
globalVar.qt_version = execute_cmd('qmake-qt5 -v', True)
|
||||
if globalVar.qt_version == -1:
|
||||
print(bcolors.FAIL + "No qmake found!" + bcolors.ENDC)
|
||||
sys.exit()
|
||||
|
||||
if type(globalVar.qt_version) is bytes:
|
||||
globalVar.qt_version = globalVar.qt_version.decode("utf-8")
|
||||
globalVar.qt_version = globalVar.qt_version.split(
|
||||
'Qt version')[1].split('in')[0].strip()
|
||||
qt_minor_ver = int(globalVar.qt_version.split('.')[1])
|
||||
|
@ -170,12 +178,28 @@ def copy_ringtones():
|
|||
|
||||
|
||||
def release_and_copy_translations():
|
||||
# translations
|
||||
# translations binary
|
||||
lrelease = 'lrelease'
|
||||
|
||||
if globalVar.qt_path:
|
||||
lrelease = globalVar.qt_path + os.sep + 'bin' + os.sep + \
|
||||
'lrelease' + ('.exe' if globalVar.system_name == "Windows" else '')
|
||||
|
||||
if execute_cmd(lrelease + ' -version', True) == -1:
|
||||
lrelease = lrelease.replace('lrelease', 'lrelease-qt5')
|
||||
if execute_cmd(lrelease + ' -version', True) == -1:
|
||||
print(bcolors.FAIL + "No lrelease found!" + bcolors.ENDC)
|
||||
sys.exit()
|
||||
|
||||
qt_version_check = execute_cmd(lrelease + ' -version', True)
|
||||
if type(qt_version_check) is bytes:
|
||||
qt_version_check = qt_version_check.decode("utf-8")
|
||||
qt_version_check = qt_version_check.split('version')[1].strip()
|
||||
qt_minor_ver = int(qt_version_check.split('.')[1])
|
||||
if qt_minor_ver < 14:
|
||||
print(bcolors.WARNING + "Qt version not supported" + bcolors.ENDC)
|
||||
sys.exit()
|
||||
|
||||
# lrc translations
|
||||
lrc_ts_path = globalVar.lrc_path + os.sep + 'translations'
|
||||
copy_to_path = globalVar.output_path + os.sep + 'share' + \
|
||||
|
|
Loading…
Add table
Reference in a new issue