Do not download Qt if Qt_CMAKE_PREFIX_PATH as an environment variable

This commit is contained in:
danteruiz 2019-09-19 22:35:59 -07:00
parent 97ef2c030e
commit da655c837e

View file

@ -257,26 +257,27 @@ endif()
def installQt(self): def installQt(self):
qt5InstallPath = self.getQt5InstallPath() qt5InstallPath = self.getQt5InstallPath()
if not os.path.isdir(qt5InstallPath): if os.getenv('QT_CMAKE_PREFIX_PATH') == None:
print ('Downloading Qt from AWS') if not os.path.isdir(qt5InstallPath):
dest, tail = os.path.split(qt5InstallPath) print ('Downloading Qt from AWS')
dest, tail = os.path.split(qt5InstallPath)
url = 'NOT DEFINED' url = 'NOT DEFINED'
if platform.system() == 'Windows': if platform.system() == 'Windows':
url = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/qt5-install-5.12.3-windows3.tar.gz' url = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/qt5-install-5.12.3-windows3.tar.gz'
elif platform.system() == 'Darwin': elif platform.system() == 'Darwin':
url = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/qt5-install-5.12.3-macos3.tar.gz' url = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/qt5-install-5.12.3-macos3.tar.gz'
elif platform.system() == 'Linux': elif platform.system() == 'Linux':
if platform.linux_distribution()[1][:3] == '16.': if platform.linux_distribution()[1][:3] == '16.':
url = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/qt5-install-5.12.3-ubuntu-16.04-with-symbols.tar.gz' url = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/qt5-install-5.12.3-ubuntu-16.04-with-symbols.tar.gz'
elif platform.linux_distribution()[1][:3] == '18.': elif platform.linux_distribution()[1][:3] == '18.':
url = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/qt5-install-5.12.3-ubuntu-18.04.tar.gz' url = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/qt5-install-5.12.3-ubuntu-18.04.tar.gz'
else:
print('UNKNOWN LINUX VERSION!!!')
else: else:
print('UNKNOWN LINUX VERSION!!!') print('UNKNOWN OPERATING SYSTEM!!!')
else:
print('UNKNOWN OPERATING SYSTEM!!!')
print('Extracting ' + url + ' to ' + dest) print('Extracting ' + url + ' to ' + dest)
hifi_utils.downloadAndExtract(url, dest) hifi_utils.downloadAndExtract(url, dest)
else: else:
print ('Qt has already been downloaded') print ('Qt has already been downloaded')