From b8a6ee325671e3bc5c4516765cccb0fc34d18f9d Mon Sep 17 00:00:00 2001 From: Dale Glass Date: Thu, 2 Jan 2020 10:41:15 +0100 Subject: [PATCH 1/3] Unpack files with any kind of supported compression, not just gzip --- hifi_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hifi_utils.py b/hifi_utils.py index 24e43dc83c..d117011c99 100644 --- a/hifi_utils.py +++ b/hifi_utils.py @@ -118,6 +118,6 @@ def downloadAndExtract(url, destPath, hash=None, hasher=hashlib.sha512(), isZip= zip.extractall(destPath) else: # Extract the archive - with tarfile.open(tempFileName, 'r:gz') as tgz: + with tarfile.open(tempFileName, 'r:*') as tgz: tgz.extractall(destPath) os.remove(tempFileName) From 47043766f36e6991d46d5eefa54f0f1204fd198a Mon Sep 17 00:00:00 2001 From: Dale Glass Date: Thu, 2 Jan 2020 10:42:09 +0100 Subject: [PATCH 2/3] Remove usage of deprecated platform.linux_distribution() Also, make error reporting slightly friendlier, and add experimental support for Ubuntu 19.10. --- hifi_vcpkg.py | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/hifi_vcpkg.py b/hifi_vcpkg.py index f0e8840621..e6ffeb8dbb 100644 --- a/hifi_vcpkg.py +++ b/hifi_vcpkg.py @@ -9,6 +9,7 @@ import tempfile import json import xml.etree.ElementTree as ET import functools +import distro from os import path print = functools.partial(print, flush=True) @@ -286,15 +287,32 @@ endif() elif platform.system() == 'Darwin': url = self.assets_url + '/dependencies/vcpkg/qt5-install-5.12.3-macos.tar.gz%3FversionId=bLAgnoJ8IMKpqv8NFDcAu8hsyQy3Rwwz' elif platform.system() == 'Linux': - if platform.linux_distribution()[1][:3] == '16.': - url = self.assets_url + '/dependencies/vcpkg/qt5-install-5.12.3-ubuntu-16.04-with-symbols.tar.gz' - elif platform.linux_distribution()[1][:3] == '18.': - url = self.assets_url + '/dependencies/vcpkg/qt5-install-5.12.3-ubuntu-18.04.tar.gz' + dist = distro.linux_distribution() + + if distro.id() == 'ubuntu': + u_major = int( distro.major_version() ) + u_minor = int( distro.minor_version() ) + + if u_major == 16: + url = self.assets_url + '/dependencies/vcpkg/qt5-install-5.12.3-ubuntu-16.04-with-symbols.tar.gz' + elif u_major == 18: + url = self.assets_url + '/dependencies/vcpkg/qt5-install-5.12.3-ubuntu-18.04.tar.gz' + elif u_major == 19 and u_minor == 10: + url = self.assets_url + '/dependencies/vcpkg/qt5-install-5.12.6-ubuntu-19.10.tar.xz' + elif u_major > 18 and ( u_major != 19 and u_minor != 4): + print("We don't support " + distro.name(pretty=True) + " yet. Perhaps consider helping us out?") + else: + print("Sorry, " + distro.name(pretty=True) + " is old and won't be officially supported. Please consider upgrading."); else: - print('UNKNOWN LINUX VERSION!!!') + print("Sorry, " + distro.name(pretty=True) + " is not supported. Please consider helping us out.") + print("It's also possible to build Qt for your distribution, please see the documentation at:") + print("https://github.com/kasenvr/project-athena/tree/kasen/core/tools/qt-builder") return; else: print('UNKNOWN OPERATING SYSTEM!!!') + print("System : " + platform.system()) + print("Architecture: " + platform.architecture()) + print("Machine : " + platform.machine()) return; print('Extracting ' + url + ' to ' + dest) From 1e34a59c6b0b766d963b1e0eb14cf0baa464d37f Mon Sep 17 00:00:00 2001 From: Dale Glass Date: Sun, 12 Jan 2020 21:22:03 +0100 Subject: [PATCH 3/3] Add python3-distro to list of required Linux packages Also changed python3.6 to python, because "python3.6" doesn't work on Ubuntu 19.10, but "python3" works everywhere. --- BUILD_LINUX.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BUILD_LINUX.md b/BUILD_LINUX.md index 14bd8c6af4..41f4238f0e 100644 --- a/BUILD_LINUX.md +++ b/BUILD_LINUX.md @@ -63,9 +63,9 @@ sudo apt-get install libasound2 libxmu-dev libxi-dev freeglut3-dev libasound2-de ```bash sudo apt-get -y install libpulse0 libnss3 libnspr4 libfontconfig1 libxcursor1 libxcomposite1 libxtst6 libxslt1.1 ``` -1. Install Python 3: +1. Install Python 3 and required packages ```bash -sudo apt-get install python3.6 +sudo apt-get install python3 python3-distro ``` 1. Install node, required to build the jsdoc documentation ```bash