瀏覽代碼

Security update for Qt

- Split build.sh to build-darwin.sh and build-linux.sh
- Updated argument call to Qt's configure to add '--tiff=system' to use a specific libtiff in place of the built-in libtiff source that comes with the qt 5.15.2 src
- Add 3P dependency to O3DE libtiff and zlib in order to use for the libtiff replacement (zlib is needed because overriding tiff to use the system assumes its linking to a shared library)
- Removed QtWebEngine/QtPdf from the build
- Removed Miniconda/python 2.7 dependency needed for QtWebEngine/QtPdf
- Updated build-linux.sh to include information and checks for required pacakges
- Renamed build.bat to build-windows.bat for consistency
- Update install_windows_extras.py to download to the temp folder
- Update package list to build the intermediate package to the temp folder instead
- Fix libqxcb-glx-integration.so to the correct subfolder on Linux
- Add code and files to copy over additional copyright notices
- Update mac build script to make sure xcode is either version 10 or 11
Steve Pham 3 年之前
父節點
當前提交
958ba3beb6

+ 0 - 5
package-system/Qt/FindQt.cmake

@@ -35,7 +35,6 @@ set(QT5_COMPONENTS
     OpenGL
     Svg
     Test
-    WebEngineWidgets
     Widgets
     Xml
 )
@@ -51,8 +50,6 @@ foreach(component ${QT5_COMPONENTS})
 endforeach()
 unset(Qt5Positioning_DIR CACHE)
 unset(Qt5PrintSupport_DIR CACHE)
-unset(Qt5WebChannel_DIR CACHE)
-unset(Qt5WebEngineCore_DIR CACHE)
 unset(Qt5Qml_DIR CACHE)
 unset(Qt5QmlModels_DIR CACHE)
 unset(Qt5Quick_DIR CACHE)
@@ -97,8 +94,6 @@ mark_as_advanced(Qt5_DIR) # Hiding from GUI
 mark_as_advanced(Qt5LinguistTools_DIR) # Hiding from GUI, this variable comes from the LinguistTools module
 mark_as_advanced(Qt5Positioning_DIR)
 mark_as_advanced(Qt5PrintSupport_DIR)
-mark_as_advanced(Qt5WebChannel_DIR)
-mark_as_advanced(Qt5WebEngineCore_DIR)
 mark_as_advanced(Qt5Qml_DIR)
 mark_as_advanced(Qt5QmlModels_DIR)
 mark_as_advanced(Qt5Quick_DIR)

+ 183 - 0
package-system/Qt/LICENSE

@@ -0,0 +1,183 @@
+GENERAL
+-------
+
+O3DE chooses the LGPLv3 license for Qt.
+
+LGPLv3
+----------------
+
+            GNU LESSER GENERAL PUBLIC LICENSE
+
+ The Qt Toolkit is Copyright (C) 2015 The Qt Company Ltd.
+ Contact: http://www.qt.io/licensing/
+
+ You may use, distribute and copy the Qt Toolkit under the terms of
+ GNU Lesser General Public License version 3, which is displayed below.
+ This license makes reference to the version 3 of the GNU General
+ Public License, which you can find in the LICENSE.GPLv3 file.
+
+-------------------------------------------------------------------------
+
+            GNU LESSER GENERAL PUBLIC LICENSE
+                Version 3, 29 June 2007
+
+ Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>
+Everyone is permitted to copy and distribute verbatim copies of this
+licensedocument, but changing it is not allowed.
+
+This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+0. Additional Definitions.
+
+ As used herein, “this License” refers to version 3 of the GNU Lesser
+General Public License, and the “GNU GPL” refers to version 3 of the
+GNU General Public License.
+
+ “The Library” refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An “Application” is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A “Combined Work” is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the “Linked
+Version”.
+
+ The “Minimal Corresponding Source” for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The “Corresponding Application Code” for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+    a) under this License, provided that you make a good faith effort
+    to ensure that, in the event an Application does not supply the
+    function or data, the facility still operates, and performs
+    whatever part of its purpose remains meaningful, or
+
+    b) under the GNU GPL, with none of the additional permissions of
+    this License applicable to that copy.
+
+3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+    a) Give prominent notice with each copy of the object code that
+    the Library is used in it and that the Library and its use are
+    covered by this License.
+
+    b) Accompany the object code with a copy of the GNU GPL and this
+    license document.
+
+4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that, taken
+together, effectively do not restrict modification of the portions of
+the Library contained in the Combined Work and reverse engineering for
+debugging such modifications, if you also do each of the following:
+
+    a) Give prominent notice with each copy of the Combined Work that
+    the Library is used in it and that the Library and its use are
+    covered by this License.
+
+    b) Accompany the Combined Work with a copy of the GNU GPL and this
+    license document.
+
+    c) For a Combined Work that displays copyright notices during
+    execution, include the copyright notice for the Library among
+    these notices, as well as a reference directing the user to the
+    copies of the GNU GPL and this license document.
+
+    d) Do one of the following:
+
+        0) Convey the Minimal Corresponding Source under the terms of
+        this License, and the Corresponding Application Code in a form
+        suitable for, and under terms that permit, the user to
+        recombine or relink the Application with a modified version of
+        the Linked Version to produce a modified Combined Work, in the
+        manner specified by section 6 of the GNU GPL for conveying
+        Corresponding Source.
+
+        1) Use a suitable shared library mechanism for linking with
+        the Library. A suitable mechanism is one that (a) uses at run
+        time a copy of the Library already present on the user's
+        computer system, and (b) will operate properly with a modified
+        version of the Library that is interface-compatible with the
+        Linked Version.
+
+    e) Provide Installation Information, but only if you would
+    otherwise be required to provide such information under section 6
+    of the GNU GPL, and only to the extent that such information is
+    necessary to install and execute a modified version of the
+    Combined Work produced by recombining or relinking the Application
+    with a modified version of the Linked Version. (If you use option
+    4d0, the Installation Information must accompany the Minimal
+    Corresponding Source and Corresponding Application Code. If you
+    use option 4d1, you must provide the Installation Information in
+    the manner specified by section 6 of the GNU GPL for conveying
+    Corresponding Source.)
+
+5. Combined Libraries.
+
+ You may place library facilities that are a work based on the Library
+side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities, conveyed under the terms of this License.
+
+    b) Give prominent notice with the combined library that part of
+    it is a work based on the Library, and explaining where to find
+    the accompanying uncombined form of the same work.
+
+6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+as you received it specifies that a certain numbered version of the
+GNU Lesser General Public License “or any later version” applies to
+it, you have the option of following the terms and conditions either
+of that published version or of any later version published by the
+Free Software Foundation. If the Library as you received it does not
+specify a version number of the GNU Lesser General Public License,
+you may choose any version of the GNU Lesser General Public License
+ever published by the Free Software Foundation.
+
+If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the Library.
+

+ 6 - 0
package-system/Qt/Platform/Linux/QtPlugin_linux.cmake

@@ -54,5 +54,11 @@ ly_add_target_files(TARGETS 3rdParty::Qt::Gui::Plugins
     OUTPUT_SUBDIRECTORY platforms
 )
 
+ly_add_target_files(TARGETS 3rdParty::Qt::Gui::Plugins
+    FILES
+        ${QT_PATH}/plugins/xcbglintegrations/libqxcb-glx-integration.so
+    OUTPUT_SUBDIRECTORY xcbglintegrations
+)
+
 ly_add_dependencies(3rdParty::Qt::Widgets::Plugins Qt5::DBus)
 ly_add_dependencies(3rdParty::Qt::Widgets::Plugins Qt5::XcbQpa)

+ 4 - 0
package-system/Qt/QT-NOTICE.TXT

@@ -0,0 +1,4 @@
+The O3DE Editor includes components of Qt, http://www.qt-project.org/, that are licensed under Version 3 of the GNU Lesser General Public License.  Source code for the Qt distributions used in O3DE can be found here:
+    https://o3de-legal-prod.s3-us-west-2.amazonaws.com/LicenseConformance/Qt/Src.zip
+
+Qt also includes a number of third party components that are licensed under other license terms; for details see https://doc.qt.io/qt-5/licenses-used-in-qt.html.

+ 26 - 22
package-system/Qt/build.sh → package-system/Qt/build-darwin.sh

@@ -13,28 +13,31 @@ set -euo pipefail
 export NINJAJOBS=-j12
 MAKE_FLAGS=-j32
 
+# Only Xcodebuilder 10.x or 11.x are known to build this version of Qt on mac successfully
+XCODEBUILD_VERSION=`xcodebuild -version | grep Xcode | awk '{print $2}'`
+XCODEBUILD_VERSION_MAJOR=`echo $XCODEBUILD_VERSION | awk -F. '{print $1}'`
+echo Xcodebuild version $XCODEBUILD_VERSION detected.
+if [ $XCODEBUILD_VERSION_MAJOR -gt "11" ]; then
+  echo Error: Xcodebuild version $XCODEBUILD_VERSION detected. Only Xcodebuild version 10 or 11 have been tested with this version of Qt
+  exit 1
+elif [ $XCODEBUILD_VERSION_MAJOR -lt "10" ]; then
+  echo Error: Xcodebuild version $XCODEBUILD_VERSION detected. Only Xcodebuild version 10 or 11 have been tested with this version of Qt
+  exit 1
+fi
+
 # TEMP_FOLDER and TARGET_INSTALL_ROOT get set from the pull_and_build_from_git.py script
-# We use Miniconda to get a Python 2.7 executable, which is needed for WebEngine to build
-MINICONDA_PATH=$TEMP_FOLDER/miniconda
 
-export PATH=$MINICONDA_PATH:$PATH
+# Base the Tiff of the dependent tiff O3DE package (static)
+TIFF_PREFIX=$TEMP_FOLDER/tiff-4.2.0.15-rev3-mac/tiff
+TIFF_INCDIR=$TIFF_PREFIX/include
+TIFF_LIBDIR=$TIFF_PREFIX/lib
 
-# Replace PYTHONPATH with our Miniconda Python paths so that only the Python 2.7 from Miniconda
-# will be found. Otherwise, there will be an invalid syntax error in site.py because the build
-# machine will likely have a different version of Python (most likely Python 3) on the PATH,
-# and since the build_package script will be launched from the Python 3 that is pulled down
-# for O3DE, its paths will be in the PATH as well.
-export PYTHONPATH=$MINICONDA_PATH:$MINICONDA_PATH/lib
+# We need to also bring in the zlib dependency since Tiff is a static lib dependency
+ZLIB_PREFIX=$TEMP_FOLDER/zlib-1.2.11-rev5-mac/zlib
+ZLIB_INCDIR=$ZLIB_PREFIX/include
+ZLIB_LIBDIR=$ZLIB_PREFIX/lib
 
 BUILD_PATH=$TEMP_FOLDER/build
-if [[ "$OSTYPE" == "darwin"* ]]; then
-    EXTRA_CONFIG_OPTIONS=""
-else
-    EXTRA_CONFIG_OPTIONS="-c++std c++1z \
-    -openssl \
-    -reduce-relocations \
-    -fontconfig"
-fi
 
 [[ -d $BUILD_PATH ]] || mkdir $BUILD_PATH
 cd $BUILD_PATH
@@ -55,6 +58,7 @@ echo Configuring Qt...
 -qt-libjpeg \
 -no-feature-vnc \
 -no-feature-linuxfb \
+--tiff=system \
 -qt-zlib \
 -v \
 -no-cups \
@@ -63,13 +67,13 @@ echo Configuring Qt...
 -no-feature-getentropy \
 -no-feature-statx \
 -no-egl \
-$EXTRA_CONFIG_OPTIONS
+-I $TIFF_INCDIR \
+-I $ZLIB_INCDIR \
+-L $TIFF_LIBDIR \
+-L $ZLIB_LIBDIR
 
 echo Qt configured, building modules...
-qtarray=(qtbase qtgraphicaleffects qtimageformats qtsvg qttools qtwebengine)
-if [[ "$OSTYPE" == "darwin"* ]]; then
-    qtarray+=(qtmacextras qttranslations)
-fi
+qtarray=(qtbase qtgraphicaleffects qtimageformats qtsvg qttools qtmacextras qttranslations)
 
 for qtlib in "${qtarray[@]}"; do
     echo Building $qtlib...

+ 104 - 0
package-system/Qt/build-linux.sh

@@ -0,0 +1,104 @@
+#!/bin/bash
+
+#
+# Copyright (c) Contributors to the Open 3D Engine Project.
+# For complete copyright and license terms please see the LICENSE at the root of this distribution.
+#
+# SPDX-License-Identifier: Apache-2.0 OR MIT
+#
+
+# TEMP_FOLDER and TARGET_INSTALL_ROOT get set from the pull_and_build_from_git.py script
+
+set -euo pipefail
+
+MAKE_FLAGS=-j32
+
+echo ""
+echo "------ BUILDING QT5 FROM SOURCE ------"
+echo ""
+echo "BASIC REQUIREMENTS in case something goes wrong:"
+echo "   - git installed and in PATH"
+echo "   - QT5 packages needed for building (https://wiki.qt.io/Building_Qt_5_from_Git)"
+echo "   - Note: This script is currently written for buildng on Ubuntu Linux only."
+echo "   - Note: installing binaries with pip must result with them being on PATH."
+echo ""
+
+# Make sure we have all the required dev packages
+REQUIRED_DEV_PACKAGES="libx11-xcb-dev libxcb-icccm4-dev libxcb-shm0-dev libxcb-image0 libxcb-image0-dev libxcb-util-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-render-util0-dev libxcb-sync-dev libxcb-xinerama0-dev libxcb-glx0-dev libgbm-dev libxcb-shape0-dev sudo apt install libxcb-xfixes0-dev libxcb-xkb-dev"
+ALL_PACKAGES=`apt list 2>/dev/null`
+for req_package in $REQUIRED_DEV_PACKAGES
+do
+    PACKAGE_COUNT=`echo $ALL_PACKAGES | grep $req_package | wc -l`
+    if [[ $PACKAGE_COUNT -eq 0 ]]; then
+        echo Missing required package $req_package
+        exit 1
+    fi
+done
+
+# Base the Tiff of the dependent tiff O3DE package (static)
+TIFF_PREFIX=$TEMP_FOLDER/tiff-4.2.0.15-rev3-linux/tiff
+TIFF_INCDIR=$TIFF_PREFIX/include
+TIFF_LIBDIR=$TIFF_PREFIX/lib
+
+# We need to also bring in the zlib dependency since Tiff is a static lib dependency
+ZLIB_PREFIX=$TEMP_FOLDER/zlib-1.2.11-rev5-linux/zlib
+ZLIB_INCDIR=$ZLIB_PREFIX/include
+ZLIB_LIBDIR=$ZLIB_PREFIX/lib
+
+BUILD_PATH=$TEMP_FOLDER/build
+
+[[ -d $BUILD_PATH ]] || mkdir $BUILD_PATH
+cd $BUILD_PATH
+
+echo Configuring Qt...
+../src/configure \
+-prefix ${TARGET_INSTALL_ROOT} \
+-opensource \
+-nomake examples \
+-nomake tests \
+-confirm-license \
+-no-icu \
+-dbus \
+-no-separate-debug-info \
+-release \
+-force-debug-info \
+-qt-libpng \
+-qt-libjpeg \
+-no-feature-vnc \
+-no-feature-linuxfb \
+--tiff=system \
+-qt-zlib \
+-v \
+-no-cups \
+-no-glib \
+-no-feature-renameat2 \
+-no-feature-getentropy \
+-no-feature-statx \
+-no-egl \
+-I $TIFF_INCDIR \
+-I $ZLIB_INCDIR \
+-L $TIFF_LIBDIR \
+-L $ZLIB_LIBDIR \
+-c++std c++1z \
+-openssl \
+-reduce-relocations \
+-fontconfig
+
+
+echo Qt configured, building modules...
+qtarray=(qtbase qtgraphicaleffects qtimageformats qtsvg qttools qtx11extras)
+
+for qtlib in "${qtarray[@]}"; do
+    echo Building $qtlib...
+    make module-$qtlib $MAKE_FLAGS
+    echo Built $qtlib.
+done
+
+echo Finished building modules, installing...
+for qtlib in "${qtarray[@]}"; do
+    echo Installing $qtlib...
+    make module-$qtlib-install_subtargets
+    echo $qtlib installed.
+done
+
+echo Qt installed successfully!

+ 19 - 14
package-system/Qt/build.bat → package-system/Qt/build-windows.bat

@@ -10,7 +10,7 @@ REM
 
 REM Set these before running the script
 if not defined VCVARS_PATH set VCVARS_PATH="C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat"
-if not defined QTARRAY set QTARRAY=(qtbase,qtgraphicaleffects,qtimageformats,qtsvg,qttools,qtwebengine)
+if not defined QTARRAY set QTARRAY=(qtbase,qtgraphicaleffects,qtimageformats,qtsvg,qttools,qtwinextras)
 
 REM TEMP_FOLDER and TARGET_INSTALL_ROOT get set from the pull_and_build_from_git.py script
 set CHECKS_FAILED=0
@@ -30,30 +30,30 @@ REM We need jom and ICU to build on Windows
 set JOM_PATH=%TEMP_FOLDER%\jom
 set ICU_PATH=%TEMP_FOLDER%\icu\bin64
 
-REM We use Miniconda to get a Python 2.7 executable, which is needed for WebEngine to build
-set MINICONDA_PATH=%TEMP_FOLDER%\miniconda
-
-set PATH=%MINICONDA_PATH%;%PATH%;%JOM_PATH%;%ICU_PATH%
-
-REM Replace PYTHONPATH with our Miniconda Python paths so that only the Python 2.7 from Miniconda
-REM will be found. Otherwise, there will be an invalid syntax error in site.py because the build
-REM machine will likely have a different version of Python (most likely Python 3) on the PATH,
-REM and since the build_package script will be launched from the Python 3 that is pulled down
-REM for O3DE, its paths will be in the PATH as well.
-set PYTHONPATH=%MINICONDA_PATH%;%MINICONDA_PATH%\Lib
+set PATH=%PATH%;%JOM_PATH%;%ICU_PATH%
 
 REM The Qt source directory will get cloned into a local temp\src folder
 set BUILD_ROOT=%TEMP_FOLDER%\src
 set BUILD_PATH=%BUILD_ROOT%\qtbase
 
 REM For OpenSSL support
-set OPENSSL_ROOT=%TEMP_FOLDER%\OpenSSL-1.1.1b-rev2-windows\OpenSSL
+set OPENSSL_ROOT=%TEMP_FOLDER%\OpenSSL-1.1.1m-rev1-windows\OpenSSL
 set OPENSSL_INCLUDE=%OPENSSL_ROOT%\include
 set OPENSSL_LIB_DEBUG=%OPENSSL_ROOT%\debug\lib
 set OPENSSL_LIB_RELEASE=%OPENSSL_ROOT%\lib
 set INCLUDE=%OPENSSL_INCLUDE%;%INCLUDE%
 set LIB=%OPENSSL_LIB_DEBUG%;%OPENSSL_LIB_RELEASE%;%LIB%
 
+REM Base the Tiff of the dependent tiff O3DE package (static)
+set TIFF_PREFIX=%TEMP_FOLDER%\tiff-4.2.0.15-rev3-windows\tiff
+set TIFF_INCDIR=%TIFF_PREFIX%\include
+set TIFF_LIBDIR=%TIFF_PREFIX%\lib
+
+REM  We need to also bring in the zlib dependency since Tiff is a static lib dependency
+set ZLIB_PREFIX=%TEMP_FOLDER%\zlib-1.2.11-rev5-windows\zlib
+set ZLIB_INCDIR=%ZLIB_PREFIX%\include
+set ZLIB_LIBDIR=%ZLIB_PREFIX%\lib
+
 cd %BUILD_PATH%
 
 set _OPTS=-v^
@@ -65,8 +65,13 @@ set _OPTS=-v^
     -nomake examples ^
     -nomake tests ^
     -shared ^
+    --tiff=system ^
     -opengl dynamic ^
-    -openssl-linked
+    -openssl-linked ^
+    -I %TIFF_INCDIR% ^
+    -I %ZLIB_INCDIR% ^
+    -L %TIFF_LIBDIR% ^
+    -L %ZLIB_LIBDIR%
 
 cmd /c ""%BUILD_ROOT%\configure.bat" %_OPTS%" || goto FAILURE
 

+ 19 - 8
package-system/Qt/build_config.json

@@ -3,7 +3,7 @@
     "git_tag": "5.15.1-o3de",
     "git_commit": "b3a1a6947422928e8aecb14ad607199e9720d266",
     "package_name": "qt",
-    "package_version": "5.15.2-rev4",
+    "package_version": "5.15.2-rev7",
     "package_url": "https://www.qt.io/",
     "package_license": "LGPL-3.0",
     "package_license_file": "qt/LICENSE.LGPLv3",
@@ -12,13 +12,15 @@
     "Platforms": {
         "Windows": {
             "Windows": {
+                "patch_file": "qt-image-format-windows.patch",
                 "depends_on_packages": [
-                    ["OpenSSL-1.1.1b-rev2-windows", "9af1c50343f89146b4053101a7aeb20513319a3fe2f007e356d7ce25f9241040", ""]
+                    ["OpenSSL-1.1.1m-rev1-windows", "7d8d3904c70b7da471f777ee788678614a9b20d3ac926b7c0d60ccf2a17c7959", ""],
+                    ["tiff-4.2.0.15-rev3-windows", "c6000a906e6d2a0816b652e93dfbeab41c9ed73cdd5a613acd53e553d0510b60", ""],
+                    ["zlib-1.2.11-rev5-windows", "8847112429744eb11d92c44026fc5fc53caa4a06709382b5f13978f3c26c4cbd", ""]
                 ],
                 "custom_build_cmd": [
-                    "install_miniconda.py",
                     "install_windows_extras.py",
-                    "build.bat"
+                    "build-windows.bat"
                 ],
                 "custom_install_cmd": [
                     "copy_platform_cmakes.py"
@@ -27,9 +29,13 @@
         },
         "Darwin": {
             "Mac": {
-                "package_version": "5.15.2-rev5",
+                "patch_file": "qt-image-format.patch",
+                "depends_on_packages": [
+                    ["tiff-4.2.0.15-rev3-mac", "c2615ccdadcc0e1d6c5ed61e5965c4d3a82193d206591b79b805c3b3ff35a4bf", ""],
+                    ["zlib-1.2.11-rev5-mac", "b6fea9c79b8bf106d4703b67fecaa133f832ad28696c2ceef45fb5f20013c096", ""]
+                ],
                 "custom_build_cmd": [
-                    "./build.sh"
+                    "./build-darwin.sh"
                 ],
                 "custom_install_cmd": [
                     "{python} copy_platform_cmakes.py"
@@ -38,9 +44,14 @@
         },
         "Linux": {
             "Linux": {
-                "package_version": "5.15.2-rev5",
+                "package_version": "5.15.2-rev8",
+                "patch_file": "qt-image-format.patch",
+                "depends_on_packages": [
+                    ["tiff-4.2.0.15-rev3-linux", "2377f48b2ebc2d1628d9f65186c881544c92891312abe478a20d10b85877409a", ""],
+                    ["zlib-1.2.11-rev5-linux", "9be5ea85722fc27a8645a9c8a812669d107c68e6baa2ca0740872eaeb6a8b0fc", ""]
+                ],
                 "custom_build_cmd": [
-                    "./build.sh"
+                    "./build-linux.sh"
                 ],
                 "custom_install_cmd": [
                     "{python} copy_platform_cmakes.py"

+ 12 - 0
package-system/Qt/copy_platform_cmakes.py

@@ -37,3 +37,15 @@ files = glob.iglob(os.path.join(platform_folder, "*.cmake"))
 for file in files:
     print(f"Copying {file} => {platform_install_folder}")
     shutil.copy2(file, platform_install_folder)
+
+# Install additional copyright notices to the package/qt root
+package_qt_root = os.path.join(package_root, "qt")
+additional_copyright_notices = ["QT-NOTICE.TXT",
+                                "LICENSE",
+                                os.path.join("temp","src", "qtfeedback", "LGPL_EXCEPTION.txt")]
+for file in additional_copyright_notices:
+    if not os.path.isfile(file):
+        printf(f"Error: Cannot locate copyright notice file: {file}")
+        sys.exit(1)
+    print(f"Copying {file} => {package_qt_root}")
+    shutil.copy2(file, package_qt_root)

+ 0 - 81
package-system/Qt/install_miniconda.py

@@ -1,81 +0,0 @@
-#
-# Copyright (c) Contributors to the Open 3D Engine Project.
-# For complete copyright and license terms please see the LICENSE at the root of this distribution.
-#
-# SPDX-License-Identifier: Apache-2.0 OR MIT
-#
-#
-
-import os
-import platform
-import shutil
-import subprocess
-import sys
-import urllib.request
-
-
-# To build WebEngine for Qt, we need Python 2.7, so we need to do a temporary, local
-# installation of miniconda (https://conda.io/projects/conda/en/latest/index.html) which
-# will provide us a python 2.7 executable just for the Qt build process
-miniconda_installer_links = {
-    "windows": "https://repo.anaconda.com/miniconda/Miniconda2-py27_4.8.3-Windows-x86_64.exe",
-    "linux": "https://repo.anaconda.com/miniconda/Miniconda2-py27_4.8.3-Linux-x86_64.sh",
-    "darwin": "https://repo.anaconda.com/miniconda/Miniconda2-py27_4.8.3-MacOSX-x86_64.sh"
-}
-
-platform_system = platform.system().lower()
-
-print("Attempting to install Miniconda (for Python 2.7)")
-
-if not platform_system in miniconda_installer_links:
-    print(f"Unknown platform: {platform_system}") 
-    sys.exit(1)
-
-installer_link = miniconda_installer_links[platform_system]
-installer_file_name = os.path.basename(installer_link)
-
-# Download the installer (if we haven't already, so that this script can be run iteratively)
-if not os.path.exists(installer_file_name):
-    print(f"Downloading Miniconda from {installer_link}")
-
-    urllib.request.urlretrieve(installer_link, installer_file_name)
-
-    print(f"Download of Miniconda complete => {os.path.abspath(installer_file_name)}")
-
-# We will install miniconda into the local temp directory for our package
-miniconda_install_dir = os.path.abspath(os.path.join('temp', 'miniconda'))
-print(f"Installing Miniconda to {miniconda_install_dir}")
-
-# Execute the installer in silent mode so it doesn't require any user
-# interaction, and so that it doesn't modify any system PATH
-exe_suffix = ""
-if platform_system == "windows":
-    exe_suffix = ".exe"
-    result = subprocess.run(
-        ["start",
-         "/wait",
-         installer_file_name,
-         "/InstallationType=JustMe",
-         "/RegisterPython=0",
-         "/S",
-         "/D=" + miniconda_install_dir
-    ], shell=True)
-else:
-    result = subprocess.run(
-        ["bash",
-         installer_file_name,
-         "-b",
-         "-p",
-         miniconda_install_dir
-    ])
-
-# Copy the python binary (python.exe/python) to python2 so that the Qt configure for WebEngine
-# can find it easier
-python_binary = os.path.join(miniconda_install_dir, 'python' + exe_suffix)
-shutil.copyfile(python_binary, os.path.join(miniconda_install_dir, 'python2' + exe_suffix))
-
-if result.returncode == 0:
-    print("Miniconda successfully installed!")
-else:
-    print("Error installing Miniconda")
-sys.exit(result.returncode)

+ 27 - 15
package-system/Qt/install_windows_extras.py

@@ -18,25 +18,37 @@ dependencies = {
     "icu": "https://github.com/unicode-org/icu/releases/download/release-65-1/icu4c-65_1-Win64-MSVC2017.zip"
 }
 
-for name in dependencies:
-    print(f"Attempting to install {name}")
+current_dir = os.getcwd()
 
-    installer_link = dependencies[name]
-    file_name = os.path.basename(installer_link)
+try:
 
-    # Download the zip (if we haven't already, so that this script can be run iteratively)
-    if not os.path.exists(file_name):
-        print(f"Downloading {name} from {installer_link}")
+    # Set the current working directory to temp
+    current_dir = os.getcwd()
+    os.chdir("temp")
+    temp_dir = os.getcwd()
 
-        urllib.request.urlretrieve(installer_link, file_name)
+    for name in dependencies:
+        print(f"Attempting to install {name}")
 
-        print(f"Download of {name} complete => {os.path.abspath(file_name)}")
+        installer_link = dependencies[name]
+        file_name = os.path.basename(installer_link)
 
-    # We will unzip the package into the local temp directory
-    install_dir = os.path.abspath(os.path.join('temp', name))
-    print(f"Installing {name} to {install_dir}")
+        # Download the zip if needed
+        if not os.path.exists(file_name):
+            print(f"Downloading {name} from {installer_link}")
 
-    with zipfile.ZipFile(file_name, 'r') as dep_zip:
-        dep_zip.extractall(install_dir)
+            urllib.request.urlretrieve(installer_link, file_name)
 
-    print(f"Successfully installed {name}") 
+            print(f"Download of {name} complete => {os.path.abspath(file_name)}")
+
+        # We will unzip the package into the local temp directory
+        install_dir = os.path.abspath(os.path.join(temp_dir, name))
+        print(f"Installing {name} to {install_dir}")
+
+        with zipfile.ZipFile(file_name, 'r') as dep_zip:
+            dep_zip.extractall(install_dir)
+
+        print(f"Successfully installed {name}") 
+
+finally:
+    os.chdir(current_dir)

+ 13 - 0
package-system/Qt/qt-image-format-windows.patch

@@ -0,0 +1,13 @@
+diff --git a/qtimageformats/src/imageformats/configure.json b/qtimageformats/src/imageformats/configure.json
+index 5b876c3..f2fa1cc 100644
+--- a/qtimageformats/src/imageformats/configure.json
++++ b/qtimageformats/src/imageformats/configure.json
+@@ -85,7 +85,7 @@
+             },
+             "sources": [
+                 { "type": "pkgConfig", "args": "libtiff-4" },
+-                { "libs": "-ltiff" }
++                { "libs": "-ltiff  -lzlibstatic" }
+             ]
+         },
+         "webp": {

+ 13 - 0
package-system/Qt/qt-image-format.patch

@@ -0,0 +1,13 @@
+diff --git a/qtimageformats/src/imageformats/configure.json b/qtimageformats/src/imageformats/configure.json
+index 5b876c3..f2fa1cc 100644
+--- a/qtimageformats/src/imageformats/configure.json
++++ b/qtimageformats/src/imageformats/configure.json
+@@ -85,7 +85,7 @@
+             },
+             "sources": [
+                 { "type": "pkgConfig", "args": "libtiff-4" },
+-                { "libs": "-ltiff" }
++                { "libs": "-ltiff  -lz" }
+             ]
+         },
+         "webp": {

+ 2 - 2
package_build_list_host_darwin.json

@@ -41,7 +41,7 @@
         "mcpp-2.7.2_az.2-rev1-mac": "package-system/mcpp/get_and_build_mcpp.py mcpp-2.7.2_az.2-rev1",
         "mikkelsen-1.0.0.4-mac": "package-system/mikkelsen/build_package_image.py --platform mac",
         "mikkelsen-1.0.0.4-ios": "package-system/mikkelsen/build_package_image.py --platform ios",
-        "qt-5.15.2-rev5-mac": "Scripts/extras/pull_and_build_from_git.py ../../package-system/Qt --platform-name Mac --package-root ../../package-system --clean",
+        "qt-5.15.2-rev7-mac": "Scripts/extras/pull_and_build_from_git.py ../../package-system/Qt --platform-name Mac --package-root ../../package-system/Qt/temp --clean",
         "zlib-1.2.11-rev5-mac": "Scripts/extras/pull_and_build_from_git.py ../../package-system/zlib --platform-name Mac --package-root ../../package-system --clean",
         "zlib-1.2.11-rev5-ios": "Scripts/extras/pull_and_build_from_git.py ../../package-system/zlib --platform-name iOS --package-root ../../package-system --clean",
         "lz4-1.9.3-vcpkg-rev4-mac": "package-system/lz4/build_package_image.py --platform-name mac",
@@ -93,7 +93,7 @@
         "azslc-1.7.35-rev1-mac": "package-system/azslc-mac",
         "SQLite-3.37.2-rev2-mac": "package-system/SQLite-mac",
         "xxhash-0.7.4-rev1-multiplatform": "package-system/xxhash-multiplatform",
-        "qt-5.15.2-rev5-mac": "package-system/qt-mac",
+        "qt-5.15.2-rev7-mac": "package-system/Qt/temp/qt-mac",
         "zlib-1.2.11-rev5-mac": "package-system/zlib-mac",
         "zlib-1.2.11-rev5-ios": "package-system/zlib-ios",
         "lz4-1.9.3-vcpkg-rev4-mac": "package-system/lz4-mac",

+ 2 - 2
package_build_list_host_linux.json

@@ -32,7 +32,7 @@
         "tiff-4.2.0.15-rev3-linux": "Scripts/extras/pull_and_build_from_git.py ../../package-system/tiff --platform-name Linux --package-root ../../package-system --clean",
         "python-3.7.12-rev2-linux": "package-system/python/build_package_image.py",
         "mikkelsen-1.0.0.4-linux": "package-system/mikkelsen/build_package_image.py",
-        "qt-5.15.2-rev5-linux": "Scripts/extras/pull_and_build_from_git.py ../../package-system/Qt --platform-name Linux --package-root ../../package-system --clean",
+        "qt-5.15.2-rev8-linux": "Scripts/extras/pull_and_build_from_git.py ../../package-system/Qt --platform-name Linux --package-root ../../package-system/Qt/temp --clean",
         "zlib-1.2.11-rev5-linux": "Scripts/extras/pull_and_build_from_git.py ../../package-system/zlib --platform-name Linux --package-root ../../package-system --clean",
         "lz4-1.9.3-vcpkg-rev4-linux": "package-system/lz4/build_package_image.py --platform-name linux",
         "expat-2.4.2-rev2-linux": "Scripts/extras/pull_and_build_from_git.py ../../package-system/expat --platform-name Linux --package-root ../../package-system/expat/temp --clean"
@@ -68,7 +68,7 @@
         "unwind-1.2.1-linux": "package-system/unwind-linux",
         "SQLite-3.37.2-rev1-linux": "package-system/SQLite-linux",
         "xxhash-0.7.4-rev1-multiplatform": "package-system/xxhash-multiplatform",
-        "qt-5.15.2-rev5-linux": "package-system/qt-linux",
+        "qt-5.15.2-rev8-linux": "package-system/Qt/temp/qt-linux",
         "zlib-1.2.11-rev5-linux": "package-system/zlib-linux",
         "lz4-1.9.3-vcpkg-rev4-linux": "package-system/lz4-linux",
         "expat-2.4.2-rev2-linux": "package-system/expat/temp/expat-linux"

+ 2 - 2
package_build_list_host_windows.json

@@ -45,7 +45,7 @@
         "poly2tri-7f0487a-rev1-windows": "package-system/poly2tri/build_package_image.py --platform-name windows",
         "pybind11-2.4.3-rev3-multiplatform": "Scripts/extras/pull_and_build_from_git.py ../../package-system/pybind11 --platform-name multiplatform --package-root ../../package-system --clean",
         "python-3.7.12-rev2-windows": "package-system/python/build_package_image.py",
-        "qt-5.15.2-rev4-windows": "Scripts/extras/pull_and_build_from_git.py ../../package-system/Qt --platform-name Windows --package-root ../../package-system --clean",
+        "qt-5.15.2-rev7-windows": "Scripts/extras/pull_and_build_from_git.py ../../package-system/Qt --platform-name Windows --package-root ../../package-system/Qt/temp --clean",
         "RapidJSON-1.1.0-rev1-multiplatform": "Scripts/extras/pull_and_build_from_git.py ../../package-system/RapidJSON --platform-name multiplatform --package-root ../../package-system",
         "SPIRVCross-2021.04.29-rev1-windows": "Scripts/extras/pull_and_build_from_git.py ../../package-system/SPIRVCross --platform-name Windows --package-root ../../package-system --clean",
         "SQLite-3.37.2-rev1-windows": "Scripts/extras/pull_and_build_from_git.py ../../package-system/sqlite --platform-name Windows --package-root ../../package-system --clean",
@@ -110,7 +110,7 @@
     "pybind11-2.4.3-rev3-multiplatform": "package-system/pybind11-multiplatform",
     "pyside2-qt-5.15.1-rev2-windows": "package-system/pyside2-windows",
     "python-3.7.12-rev2-windows": "package-system/python/win_x64/package",
-    "qt-5.15.2-rev4-windows": "package-system/qt-windows",
+    "qt-5.15.2-rev7-windows": "package-system/Qt/temp/qt-windows",
     "RapidJSON-1.1.0-rev1-multiplatform": "package-system/RapidJSON-multiplatform",
     "RapidXML-1.13-rev1-multiplatform": "package-system/RapidXML-multiplatform",    
     "SPIRVCross-2021.04.29-rev1-windows": "package-system/SPIRVCross-windows",