Преглед на файлове

AWSGamelift 5.0.0 Linux support (#199)

* Update 3P scripts for Linux to support AWS Gamelift SDK 5.0.0
* Remove Debug builds from package
* Bump revision for linux to rev2
* Removed '--quiet' argument from docker cp command due to not being supported by docker cp

Co-authored-by: Alex Peterson <[email protected]>
Signed-off-by: Steve Pham <[email protected]>
Steve Pham преди 2 години
родител
ревизия
d43190fda8

+ 91 - 49
Scripts/extras/pull_and_build_from_git.py

@@ -38,9 +38,16 @@ be different by platform, and all are required. The keys are:
 
 
 The following keys can exist at the root level or the target-platform level:
 The following keys can exist at the root level or the target-platform level:
 
 
+
 * git_url               : The git clone url for the source to pull for building
 * git_url               : The git clone url for the source to pull for building
 * git_tag               : The git tag or branch to identify the branch to pull from for building
 * git_tag               : The git tag or branch to identify the branch to pull from for building
 * git_commit            : (optional) A specific git commit to check out. This is useful for upstream repos that do not tag their releases.
 * git_commit            : (optional) A specific git commit to check out. This is useful for upstream repos that do not tag their releases.
+
+* src_package_url       : The download URI to retrieve the source package compressed tar from
+* src_package_sha1      : The sha1 fingerprint of the downloaded source package compressed tar for verification
+
+** Note: Either both git_url + git_tag/git_commit OR src_package_url + src_package_sha1 must be supplied, but not both
+
 * package_version       : (required) The string to describe the package version. This string is used to build the full package name.
 * package_version       : (required) The string to describe the package version. This string is used to build the full package name.
                           This can be uniform for all platforms or can be set for a specific platform
                           This can be uniform for all platforms or can be set for a specific platform
 * prebuilt_source       : (optional) If the 3rd party library files are prebuilt and accessible, then setting this key to the relative location of
 * prebuilt_source       : (optional) If the 3rd party library files are prebuilt and accessible, then setting this key to the relative location of
@@ -240,8 +247,21 @@ class PackageInfo(object):
                 raise BuildError(f"Required key '{value_key}' not found in build config")
                 raise BuildError(f"Required key '{value_key}' not found in build config")
             return result
             return result
 
 
-        self.git_url = _get_value("git_url")
-        self.git_tag = _get_value("git_tag")
+        self.git_url = _get_value("git_url", required=False)
+        self.git_tag = _get_value("git_tag", required=False)
+        self.src_package_url = _get_value("src_package_url", required=False)
+        self.src_package_sha1 = _get_value("src_package_sha1", required=False)
+
+        if not self.git_url and not self.src_package_url:
+            raise BuildError(f"Either 'git_url' or 'src_package_url' must be provided for the source in the build config.")
+        if self.git_url and self.src_package_url:
+            raise BuildError(f"Only 'git_url' or 'src_package_url' can be specified, not both. Both were specified in this build config.")
+
+        if self.git_url and not self.git_tag:
+            raise BuildError(f"Missing 'git_tag' entry for the git repo  {self.git_url} in the build config.")
+        if self.src_package_url and not self.src_package_sha1:
+            raise BuildError(f"Missing 'src_package_sha1' entry for the source package at  {self.src_package_url} in the build config.")
+
         self.package_version = _get_value("package_version")
         self.package_version = _get_value("package_version")
         self.patch_file = _get_value("patch_file", required=False)
         self.patch_file = _get_value("patch_file", required=False)
         self.git_commit = _get_value("git_commit", required=False)
         self.git_commit = _get_value("git_commit", required=False)
@@ -507,55 +527,69 @@ class BuildInfo(object):
         """
         """
         Sync the 3rd party from its git source location (either cloning if its not there or syncing)
         Sync the 3rd party from its git source location (either cloning if its not there or syncing)
         """
         """
+
         if self.skip_git:
         if self.skip_git:
             return
             return
 
 
-        # Validate Git is installed
-        git_version = validate_git()
-        print(f"Detected Git: {git_version}")
+        if self.package_info.git_url:
+            # Validate Git is installed
+            git_version = validate_git()
+            print(f"Detected Git: {git_version}")
 
 
-        # Sync to the source folder
-        if self.src_folder.is_dir():
-            print(f"Checking git status of path '{self.src_folder}' ...")
-            git_status_cmd = ['git', 'status', '-s']
-            call_result = subprocess.run(subp_args(git_status_cmd),
-                                         shell=True,
-                                         capture_output=True,
-                                         cwd=str(self.src_folder.resolve()))
-            # If any error, this is not a valid git folder, proceed with cloning
-            if call_result.returncode != 0:
-                print(f"Path '{self.src_folder}' is not a valid git folder. Deleting and re-cloning...")
-                # Not a valid git folder, okay to remove and re-clone
-                delete_folder(self.src_folder)
-                self.clone_to_local()
+            # Sync to the source folder
+            if self.src_folder.is_dir():
+                print(f"Checking git status of path '{self.src_folder}' ...")
+                git_status_cmd = ['git', 'status', '-s']
+                call_result = subprocess.run(subp_args(git_status_cmd),
+                                             shell=True,
+                                             capture_output=True,
+                                             cwd=str(self.src_folder.resolve()))
+                # If any error, this is not a valid git folder, proceed with cloning
+                if call_result.returncode != 0:
+                    print(f"Path '{self.src_folder}' is not a valid git folder. Deleting and re-cloning...")
+                    # Not a valid git folder, okay to remove and re-clone
+                    delete_folder(self.src_folder)
+                    self.clone_to_local()
+                else:
+                    # If this is a valid git folder, check if the patch was applied or if the source was
+                    # altered.
+                    if len(call_result.stdout.decode('utf-8', 'ignore')):
+                        # If anything changed, then restore the entire source tree
+                        print(f"Path '{self.src_folder}' was modified. Restoring...")
+                        git_restore_cmd = ['git', 'restore', '--recurse-submodules', ':/']
+                        call_result = subprocess.run(subp_args(git_restore_cmd),
+                                                     shell=True,
+                                                     capture_output=False,
+                                                     cwd=str(self.src_folder.resolve()))
+                        if call_result.returncode != 0:
+                            # If we cannot restore through git, then delete the folder and re-clone
+                            print(f"Unable to restore {self.src_folder}. Deleting and re-cloning...")
+                            delete_folder(self.src_folder)
+                            self.clone_to_local()
+
+                # Do a re-pull
+                git_pull_cmd = ['git',
+                                'pull']
+                call_result = subprocess.run(subp_args(git_pull_cmd),
+                                             shell=True,
+                                             capture_output=True,
+                                             cwd=str(self.src_folder.resolve()))
+                if call_result.returncode != 0:
+                    raise BuildError(f"Error pulling source from GitHub: {call_result.stderr.decode('UTF-8', 'ignore')}")
             else:
             else:
-                # If this is a valid git folder, check if the patch was applied or if the source was
-                # altered.
-                if len(call_result.stdout.decode('utf-8', 'ignore')):
-                    # If anything changed, then restore the entire source tree
-                    print(f"Path '{self.src_folder}' was modified. Restoring...")
-                    git_restore_cmd = ['git', 'restore', '--recurse-submodules', ':/']
-                    call_result = subprocess.run(subp_args(git_restore_cmd),
-                                                 shell=True,
-                                                 capture_output=False,
-                                                 cwd=str(self.src_folder.resolve()))
-                    if call_result.returncode != 0:
-                        # If we cannot restore through git, then delete the folder and re-clone
-                        print(f"Unable to restore {self.src_folder}. Deleting and re-cloning...")
-                        delete_folder(self.src_folder)
-                        self.clone_to_local()
-
-            # Do a re-pull
-            git_pull_cmd = ['git',
-                            'pull']
-            call_result = subprocess.run(subp_args(git_pull_cmd),
-                                         shell=True,
-                                         capture_output=True,
-                                         cwd=str(self.src_folder.resolve()))
-            if call_result.returncode != 0:
-                raise BuildError(f"Error pulling source from GitHub: {call_result.stderr.decode('UTF-8', 'ignore')}")
+                self.clone_to_local()
+        elif self.package_info.src_package_url:
+
+            downloaded_package_file = download_and_verify(src_url=self.package_info.src_package_url,
+                                                          src_zip_hash=self.package_info.src_package_sha1,
+                                                          src_zip_hash_algorithm="sha1",
+                                                          target_folder=self.base_temp_folder)
+            extracted_package_path = extract_package(src_package_file=downloaded_package_file,
+                                                     target_folder=self.src_folder.resolve())
+
         else:
         else:
-            self.clone_to_local()
+            raise BuildError(f"Missing both 'git_url' and 'src_package_url' from the build config")
+
 
 
         if self.package_info.additional_src_files:
         if self.package_info.additional_src_files:
             for additional_src in self.package_info.additional_src_files:
             for additional_src in self.package_info.additional_src_files:
@@ -591,10 +625,18 @@ class BuildInfo(object):
             if not patch_file_path.is_file():
             if not patch_file_path.is_file():
                 raise BuildError(f"Invalid/missing patch file '{patch_file_path}' specified in the build config.")
                 raise BuildError(f"Invalid/missing patch file '{patch_file_path}' specified in the build config.")
 
 
-            patch_cmd = ['git',
-                         'apply',
-                         "--ignore-whitespace",
-                         str(patch_file_path.absolute())]
+            if self.package_info.git_url:
+                patch_cmd = ['git',
+                             'apply',
+                             "--ignore-whitespace",
+                             str(patch_file_path.absolute())]
+            elif self.package_info.src_package_url:
+                patch_cmd = ['patch',
+                             '--unified',
+                             '--strip=1',
+                             f'--directory={str(self.src_folder.absolute())}',
+                             '<',
+                             str(patch_file_path.absolute())]
 
 
             patch_result = subprocess.run(subp_args(patch_cmd),
             patch_result = subprocess.run(subp_args(patch_cmd),
                                           shell=True,
                                           shell=True,

+ 50 - 0
package-system/AWSGameLiftServerSDK/Dockerfile

@@ -0,0 +1,50 @@
+#
+# 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
+#
+
+# This docker file uses ubuntu 22.04 as the base image so that the AWS Native C++ libraries will use OpenSSL 3 as the base
+# for its dependencies
+#
+
+
+ARG INPUT_ARCHITECTURE=amd64
+ARG INPUT_IMAGE=ubuntu:20.04
+ARG INPUT_DOCKER_BUILD_SCRIPT
+
+FROM ${INPUT_ARCHITECTURE}/${INPUT_IMAGE}
+
+ARG INPUT_DOCKER_BUILD_SCRIPT
+
+WORKDIR /data/workspace
+
+# Initilize apt cache
+RUN apt-get clean && apt-get update
+
+# Setup time zone and locale data (necessary for SSL and HTTPS packages)
+RUN DEBIAN_FRONTEND="noninteractive" apt-get -y install tzdata locales keyboard-configuration
+
+# Install the development packages needed to build AWS Gamelift
+RUN apt-get install -y build-essential \
+                       git \
+                       cmake \
+                       python3 \
+                       ninja-build \
+                       libssl-dev
+
+# Prevent the copying of the src folder from being cached
+ARG CACHEBUST=1
+
+RUN cd /data/workspace && \
+    mkdir src
+
+# Copy the git synced source from the context base to this container
+COPY src  /data/workspace/src/
+
+# Copy the build script specific to this Docker script in order to execute the build
+COPY ${INPUT_DOCKER_BUILD_SCRIPT} /data/workspace/
+
+
+

+ 11 - 2
package-system/AWSGameLiftServerSDK/FindAWSGameLiftServerSDK.cmake.Linux

@@ -14,18 +14,27 @@ if (TARGET ${TARGET_WITH_NAMESPACE})
     return()
     return()
 endif()
 endif()
 
 
+if ("${OPENSSL_VERSION}" STREQUAL "")
+    message(FATAL_ERROR "OpenSSL not detected. The OpenSSL dev package is required for O3DE")
+elseif ("${OPENSSL_VERSION}" VERSION_LESS "3.0.0")
+    set(SRC_OPENSSL_BASE openssl-1)
+else()
+    set(SRC_OPENSSL_BASE openssl-3)
+endif()
+
+
 set(LIB_NAME "AWSGameLiftServerSDK")
 set(LIB_NAME "AWSGameLiftServerSDK")
 
 
 set(${LIB_NAME}_INCLUDE_DIR ${CMAKE_CURRENT_LIST_DIR}/${LIB_NAME}/include)
 set(${LIB_NAME}_INCLUDE_DIR ${CMAKE_CURRENT_LIST_DIR}/${LIB_NAME}/include)
 
 
 if (LY_MONOLITHIC_GAME)
 if (LY_MONOLITHIC_GAME)
-    set(AWSGAMELIFTSERVERSDK_LIB_PATH ${CMAKE_CURRENT_LIST_DIR}/${LIB_NAME}/lib/$<IF:$<CONFIG:Debug>,Debug,Release>)
+    set(AWSGAMELIFTSERVERSDK_LIB_PATH ${CMAKE_CURRENT_LIST_DIR}/${LIB_NAME}/lib/${SRC_OPENSSL_BASE})
 
 
     set(AWSGAMELIFTSERVERSDK_LIBS
     set(AWSGAMELIFTSERVERSDK_LIBS
         ${AWSGAMELIFTSERVERSDK_LIB_PATH}/libaws-cpp-sdk-gamelift-server.a
         ${AWSGAMELIFTSERVERSDK_LIB_PATH}/libaws-cpp-sdk-gamelift-server.a
     )
     )
 else()
 else()
-    set(AWSGAMELIFTSERVERSDK_LIB_PATH ${CMAKE_CURRENT_LIST_DIR}/${LIB_NAME}/bin/$<IF:$<CONFIG:Debug>,Debug,Release>)
+    set(AWSGAMELIFTSERVERSDK_LIB_PATH ${CMAKE_CURRENT_LIST_DIR}/${LIB_NAME}/bin//${SRC_OPENSSL_BASE})
 
 
     set(AWSGAMELIFTSERVERSDK_LIBS
     set(AWSGAMELIFTSERVERSDK_LIBS
         ${AWSGAMELIFTSERVERSDK_LIB_PATH}/libaws-cpp-sdk-gamelift-server.so
         ${AWSGAMELIFTSERVERSDK_LIB_PATH}/libaws-cpp-sdk-gamelift-server.so

+ 12 - 0
package-system/AWSGameLiftServerSDK/aws_gamelift_5.0.0.patch

@@ -0,0 +1,12 @@
+diff --unified --recursive --no-dereference a/GameLift-Cpp-ServerSDK-5.0.0/gamelift-server-sdk/include/aws/gamelift/internal/model/request/UpdatePlayerSessionCreationPolicyRequest.h b/GameLift-Cpp-ServerSDK-5.0.0/gamelift-server-sdk/include/aws/gamelift/internal/model/request/UpdatePlayerSessionCreationPolicyRequest.h
+--- a/GameLift-SDK-Release-5.0.0/GameLift-SDK-Release-5.0.0/GameLift-Cpp-ServerSDK-5.0.0/gamelift-server-sdk/include/aws/gamelift/internal/model/request/UpdatePlayerSessionCreationPolicyRequest.h	2023-02-08 13:28:26.000000000 -0800
++++ b/GameLift-SDK-Release-5.0.0/GameLift-SDK-Release-5.0.0/GameLift-Cpp-ServerSDK-5.0.0/gamelift-server-sdk/include/aws/gamelift/internal/model/request/UpdatePlayerSessionCreationPolicyRequest.h	2023-05-08 07:52:32.249104692 -0700
+@@ -114,7 +114,7 @@
+         static constexpr const char* NOT_SET = "NOT_SET";
+ 
+         std::string m_gameSessionId;
+-        WebSocketPlayerSessionCreationPolicy m_playerSessionCreationPolicy;
++        WebSocketPlayerSessionCreationPolicy m_playerSessionCreationPolicy = WebSocketPlayerSessionCreationPolicy::NOT_SET;
+     };
+ } // namespace Internal
+ } // namespace GameLift

+ 216 - 0
package-system/AWSGameLiftServerSDK/build-linux.sh

@@ -0,0 +1,216 @@
+#!/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
+#
+
+# This script will utilize Docker to build on either AMD64 or AARCH64 architectures. The script will 
+# also build on both Ubuntu 20.04 (focal) and Ubuntu 22.04 (jammy) systems because of the dependencies
+# on OpenSSL 1.1.1 and Open 3.0 respectively
+
+DOCKER_IMAGE_NAME_BASE=aws_gamelift_server_sdk
+DOCKER_BUILD_SCRIPT=docker_build_linux.sh
+
+# Determine the host architecture
+CURRENT_HOST_ARCH=$(uname -m)
+
+# Get the path within the source tarball to the root of the source folder for the build
+SDK_SRC_SUBPATH=${1:-.}
+
+# Use the host architecture if not supplied
+TARGET_ARCH=${2:-$(uname -m)}
+
+# Prepare the target install path
+INSTALL_PACKAGE_PATH=${TEMP_FOLDER}/install/
+
+# If the host and target architecture does not match, make sure the necessary cross compilation packages are installed
+if [ "${CURRENT_HOST_ARCH}" != ${TARGET_ARCH} ]
+then
+    echo "Checking cross compiling requirements."
+    for package_check in docker-ce qemu binfmt-support qemu-user-static
+    do
+        echo "Checking package $package_check"
+        dpkg -s $package_check > /dev/null 2>&1
+        if [ $? -ne 0 ]
+        then
+            echo ""
+            echo "Missing package $package_check. Make sure to install it with your local package manager." 
+            echo ""
+            exit 1
+        fi
+    done
+
+    # Only cross compilation of an ARM64 image on an x86_64 host is supported
+    if [ "${TARGET_ARCH}" = "aarch64" ]
+    then
+        # Make sure qemu-aarch64 is installed properly
+        QEMU_AARCH_COUNT=$(update-binfmts --display | grep qemu-aarch64 | wc -l)
+        if [ $QEMU_AARCH_COUNT -eq 0 ]
+        then
+            echo ""
+            echo "QEMU aarch64 binary format not registered."
+            echo "Run the following command to register"
+            echo ""
+            echo "sudo docker run --rm --privileged multiarch/qemu-user-static --reset -p yes"
+            echo ""
+            exit 1
+        fi
+        echo ""
+        echo "Cross compiling aarch64 on an amd64 machine validated."
+        echo ""
+    fi
+else
+    echo "Building ${TARGET_ARCH} natively."
+fi
+
+# Make sure docker is installed
+DOCKER_VERSION=$(docker --version)
+if [ $? -ne 0 ]
+then
+    echo "Required package docker is not installed"
+    echo "Follow instructions on https://docs.docker.com/engine/install/ubuntu/ to install docker properly"
+    exit 1
+fi
+echo "Detected Docker Version $DOCKER_VERSION"
+
+
+# Setup the docker arguments 
+if [ "${TARGET_ARCH}" = "x86_64" ]
+then
+    echo "Processing Docker for amd64"
+
+    DOCKER_INPUT_ARCHITECTURE=amd64
+    TARGET_DOCKER_PLATFORM_ARG=linux/amd64
+    DOCKER_BUILD_ARG=1
+
+elif [ "${TARGET_ARCH}" = "aarch64" ] 
+then
+    echo "Processing Docker for aarch64"
+
+    DOCKER_INPUT_ARCHITECTURE=arm64v8
+    TARGET_DOCKER_PLATFORM_ARG=linux/arm64/v8
+    DOCKER_BUILD_ARG=3
+else
+    echo "Unsupported architecture ${TARGET_ARCH}"
+    exit 1
+fi
+
+# Prepare to build on both Ubuntu 20.04 and Ubuntu 22.04 based docker images
+
+mkdir -p ${TEMP_FOLDER}
+cp -f ${DOCKER_BUILD_SCRIPT} ${TEMP_FOLDER}/
+
+# Args
+# $1 : Ubuntu version
+# $2 : Include
+# $3 : Docker run platform
+
+function execute_docker() {
+
+    # Determine the openssl version based on the ubuntu version (20.04/OpenSSL 1.1.1.x vs 22.04/OpenSSL 3.x)
+    if [ $1 = "20.04" ]
+    then
+        echo "Preparing for OpenSSL 1.1.1.x version"
+        BIN_SUBFOLDER_NAME=openssl-1
+    elif [ $1 = "22.04" ]
+    then
+        echo "Preparing for OpenSSL 3.x version"
+        BIN_SUBFOLDER_NAME=openssl-3
+    else
+        echo "Unsupported base build image ubuntu version ${1}"
+        exit 1
+    fi
+
+    # Build the Docker Image 
+    DOCKER_IMAGE_NAME=${DOCKER_IMAGE_NAME_BASE}_focal_${DOCKER_INPUT_ARCHITECTURE}_3p
+
+    echo "Building the docker build script for ${DOCKER_IMAGE_NAME_BASE} on ${DOCKER_INPUT_ARCHITECTURE} for Ubuntu $1"
+    echo ""
+    echo docker build --build-arg INPUT_DOCKER_BUILD_SCRIPT=${DOCKER_BUILD_SCRIPT} \
+                 --build-arg INPUT_ARCHITECTURE=${DOCKER_INPUT_ARCHITECTURE} \
+                 --build-arg INPUT_IMAGE=ubuntu:${1} \
+                 -f Dockerfile -t ${DOCKER_IMAGE_NAME}:latest temp 
+    docker build --build-arg INPUT_DOCKER_BUILD_SCRIPT=${DOCKER_BUILD_SCRIPT} \
+                 --build-arg INPUT_ARCHITECTURE=${DOCKER_INPUT_ARCHITECTURE} \
+                 --build-arg INPUT_IMAGE=ubuntu:${1} \
+                 -f Dockerfile -t ${DOCKER_IMAGE_NAME}:latest temp 
+    if [ $? -ne 0 ]
+    then
+        echo "Error occurred creating Docker image ${DOCKER_IMAGE_NAME}:latest." 
+        exit 1
+    fi
+
+    # Run the build script in the docker image
+    echo "Running build script in the docker image ${DOCKER_IMAGE_NAME}"
+    echo ""
+    echo docker run --platform ${TARGET_DOCKER_PLATFORM_ARG} \
+                   -it --tty \
+                   ${DOCKER_IMAGE_NAME}:latest /data/workspace/${DOCKER_BUILD_SCRIPT} ${SDK_SRC_SUBPATH}
+    docker run --platform ${TARGET_DOCKER_PLATFORM_ARG} \
+               --tty \
+               ${DOCKER_IMAGE_NAME}:latest /data/workspace/${DOCKER_BUILD_SCRIPT} ${SDK_SRC_SUBPATH}
+    if [ $? -ne 0 ]
+    then
+        echo Failed to build from docker image ${DOCKER_IMAGE_NAME}:latest
+        echo "To log into and troubleshoot the docker container, run the following command:"
+        echo ""
+        echo "docker run --platform ${TARGET_DOCKER_PLATFORM_ARG} -it --tty ${DOCKER_IMAGE_NAME}:latest"
+        echo ""
+        exit 1
+    fi
+
+    echo "Build Complete"
+
+    # Copy the build artifacts from the docker image
+
+    # Capture the Docker Image ID
+    IMAGE_ID=$(docker images -q ${DOCKER_IMAGE_NAME}:latest)
+    if [ -z $IMAGE_ID ]
+    then
+        echo "Error: Cannot find Image ID for ${DOCKER_IMAGE_NAME}"
+        exit 1
+    fi
+
+    # Capture the container ID
+    echo "Capturing the Container ID"
+    CONTAINER_ID=$(docker container ls -l -q --filter "ancestor=${DOCKER_IMAGE_NAME}:latest")
+    if [ -z $CONTAINER_ID ]
+    then
+        echo "Error: Cannot find Container ID for Image ${DOCKER_IMAGE_NAME}"
+        exit 1
+    fi
+
+    DOCKER_BUILD_ROOT=/data/workspace/build/
+
+    if [ ! -f ${INSTALL_PACKAGE_PATH}/include ]
+    then
+        docker cp $CONTAINER_ID:${DOCKER_BUILD_ROOT}/build_static/prefix/include  ${INSTALL_PACKAGE_PATH}/
+    fi
+    if [ ! -f ${INSTALL_PACKAGE_PATH}/cmake ]
+    then
+        docker cp $CONTAINER_ID:${DOCKER_BUILD_ROOT}/build_static/prefix/cmake  ${INSTALL_PACKAGE_PATH}/
+    fi
+
+    docker cp $CONTAINER_ID:${DOCKER_BUILD_ROOT}/build_static/prefix/lib  ${INSTALL_PACKAGE_PATH}/lib/${BIN_SUBFOLDER_NAME}
+    docker cp $CONTAINER_ID:${DOCKER_BUILD_ROOT}/build_shared/prefix/lib  ${INSTALL_PACKAGE_PATH}/bin/${BIN_SUBFOLDER_NAME}
+}
+
+rm -rf ${INSTALL_PACKAGE_PATH}
+
+mkdir -p ${INSTALL_PACKAGE_PATH}
+mkdir -p ${INSTALL_PACKAGE_PATH}/lib
+mkdir -p ${INSTALL_PACKAGE_PATH}/bin
+
+# Build for Ubuntu 20.04
+execute_docker 20.04 
+
+# Build for Ubuntu 22.04
+execute_docker 22.04 
+
+echo "Build successful"
+
+exit 0
+

+ 40 - 0
package-system/AWSGameLiftServerSDK/build_config.json

@@ -0,0 +1,40 @@
+{
+    "src_package_url": "https://gamelift-release.s3-us-west-2.amazonaws.com/GameLift-SDK-Release-5.0.0.zip",
+    "src_package_sha1": "25cfa89252a934925c14830ba75e91855bf02e5d",
+    "package_name": "AWSGameLiftServerSDK",
+    "package_version": "5.0.0-rev2",
+    "package_url": "https://aws.amazon.com/documentation/gamelift/",
+    "package_license": "Apache-2.0",
+    "package_license_file": "GameLift-SDK-Release-5.0.0/GameLift-SDK-Release-5.0.0/GameLift-Cpp-ServerSDK-5.0.0/LICENSE_AMAZON_GAMELIFT_SDK.TXT",
+    "cmake_find_target": "FindAWSGameLiftServerSDK.cmake",
+    "Platforms": {
+        "Linux": {
+            "Linux":{
+                "patch_file":"aws_gamelift_5.0.0.patch",
+                "cmake_find_source": "FindAWSGameLiftServerSDK.cmake.Linux",
+                "custom_build_cmd": [
+                    "./build-linux.sh",
+                    "GameLift-SDK-Release-5.0.0/GameLift-SDK-Release-5.0.0/GameLift-Cpp-ServerSDK-5.0.0",
+                    "x86_64"
+                ],
+                "custom_install_cmd": [
+                    "./install-linux.sh",
+                    "GameLift-SDK-Release-5.0.0/GameLift-SDK-Release-5.0.0/GameLift-Cpp-ServerSDK-5.0.0"
+                ]
+              },
+              "Linux-aarch64":  {
+                "patch_file":"aws_gamelift_5.0.0.patch",
+                "cmake_find_source": "FindAWSGameLiftServerSDK.cmake.Linux",
+                "custom_build_cmd": [
+                    "./build-linux.sh",
+                    "GameLift-SDK-Release-5.0.0/GameLift-SDK-Release-5.0.0/GameLift-Cpp-ServerSDK-5.0.0",
+                    "aarch64"
+                ],
+                "custom_install_cmd": [
+                    "./install-linux.sh",
+                    "GameLift-SDK-Release-5.0.0/GameLift-SDK-Release-5.0.0/GameLift-Cpp-ServerSDK-5.0.0"
+                ]
+            }
+        }
+    }
+}

+ 62 - 0
package-system/AWSGameLiftServerSDK/docker_build_linux.sh

@@ -0,0 +1,62 @@
+#!/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
+#
+
+
+WORKSPACE_DIR=/data/workspace
+SDK_SRC_SUBPATH=${1:-.}
+SRC_PATH=${WORKSPACE_DIR}/src/${SDK_SRC_SUBPATH}
+
+if [ ! -d ${SRC_PATH} ]
+then
+    echo "Unable to locate source path at ${SRC_PATH}"
+    exit 1
+fi
+
+# Perform a cmake project generation and build
+# 
+# Arguments:
+#   $1 : BUILD path
+#   $2 : Build SHARED libs
+#   $3 : Build Type
+build_package() {
+
+    echo "Generating $1"
+
+    cmake -G Ninja -S ${SRC_PATH} -B $1 -DBUILD_SHARED_LIBS=$2 -DCMAKE_BUILD_TYPE=Release
+    if [ $? -ne 0 ]
+    then
+        echo "Error generating AWS Gamelift Server SDK for $1" 
+        exit 1
+    fi
+    cmake --build $1
+    if [ $? -ne 0 ]
+    then
+        echo "Error building AWS Gamelift Server SDK for $1" 
+        exit 1
+    fi
+
+    if [ ! -d $1/prefix ]
+    then
+        echo "Error installing AWS Gamelift Server SDK for $1" 
+        exit 1
+    fi
+}
+
+BUILD_PATH_ROOT=${WORKSPACE_DIR}/build
+
+#### Build Static ####
+echo "Building Static/Release ..."
+build_package ${BUILD_PATH_ROOT}/build_static OFF
+
+#### Build Shared ####
+echo "Building Shared/Release..."
+build_package ${BUILD_PATH_ROOT}/build_shared ON
+
+echo "Build Succeeded."
+
+exit 0

+ 67 - 0
package-system/AWSGameLiftServerSDK/install-linux.sh

@@ -0,0 +1,67 @@
+#!/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
+#
+
+echo "TEMP_FOLDER=${TEMP_FOLDER}"
+echo "TARGET_INSTALL_ROOT=${TARGET_INSTALL_ROOT}"
+
+# Get the path within the source tarball to the root of the source folder for the build
+SDK_SRC_SUBPATH=${1:-.}
+
+# Get the install path from the build as the source for the final install package
+SRC_INSTALL_PACKAGE_PATH=${TEMP_FOLDER}/install/
+if [ ! -d ${SRC_INSTALL_PACKAGE_PATH} ]
+then
+    echo "Invalid source package path ${SRC_INSTALL_PACKAGE_PATH}"
+    exit 1
+fi
+
+# Copy an additional notice file
+ADDITIONAL_NOTICE_FILE=${TEMP_FOLDER}/src/${SDK_SRC_SUBPATH}/NOTICE_C++_AMAZON_GAMELIFT_SDK.TXT
+if [ ! -f ${ADDITIONAL_NOTICE_FILE} ]
+then
+    echo "Invalid source package path ${SRC_INSTALL_PACKAGE_PATH}"
+    exit 1
+fi
+echo "Copying the additional notice file ${ADDITIONAL_NOTICE_FILE} -> ${TARGET_INSTALL_ROOT}"
+cp ${TEMP_FOLDER}/src/${SDK_SRC_SUBPATH}/NOTICE_C++_AMAZON_GAMELIFT_SDK.TXT ${TARGET_INSTALL_ROOT}
+
+
+# Copy folder with messaging and error checks
+# 
+# Arguments:
+#   $1 : Source folder
+#   $2 : Destination folder
+copy_folder() {
+
+    SRC_FOLDER=$1
+    TGT_FOLDER=$2
+    if [ ! -d ${SRC_FOLDER} ]
+    then
+        echo "Invalid source folder copy path ${SRC_FOLDER}"
+        exit 1
+    fi
+    echo "Copying ${SRC_FOLDER} -> ${TGT_FOLDER}"
+    cp -r ${SRC_FOLDER} ${TGT_FOLDER}/
+    if [ $? -ne 0 ]
+    then
+        echo "Error copying ${SRC_FOLDER} -> ${TGT_FOLDER}"
+        exit 1
+    fi
+}
+
+copy_folder ${SRC_INSTALL_PACKAGE_PATH}/include ${TARGET_INSTALL_ROOT}/
+
+copy_folder ${SRC_INSTALL_PACKAGE_PATH}/cmake ${TARGET_INSTALL_ROOT}/
+
+copy_folder ${SRC_INSTALL_PACKAGE_PATH}/bin ${TARGET_INSTALL_ROOT}/
+
+copy_folder ${SRC_INSTALL_PACKAGE_PATH}/lib ${TARGET_INSTALL_ROOT}/
+
+echo "Installation complete"
+
+exit 0

+ 1 - 1
package-system/googlebenchmark/build-linux.sh

@@ -78,7 +78,7 @@ fi
 echo "Copying the built contents from the docker container for image ${DOCKER_IMAGE_NAME}"
 echo "Copying the built contents from the docker container for image ${DOCKER_IMAGE_NAME}"
 
 
 mkdir -p build
 mkdir -p build
-docker cp --quiet $CONTAINER_ID:/data/workspace/package/. build  
+docker cp $CONTAINER_ID:/data/workspace/package/. build  
 if [ $? -ne 0 ]
 if [ $? -ne 0 ]
 then
 then
     echo "Error occurred copying build artifacts from Docker image ${DOCKER_IMAGE_NAME}:latest." 
     echo "Error occurred copying build artifacts from Docker image ${DOCKER_IMAGE_NAME}:latest." 

+ 1 - 1
package-system/lz4/build-archlinux.sh

@@ -148,7 +148,7 @@ fi
 echo "Copying the built contents from the docker container for image ${DOCKER_IMAGE_NAME}"
 echo "Copying the built contents from the docker container for image ${DOCKER_IMAGE_NAME}"
 
 
 mkdir -p build
 mkdir -p build
-docker cp --quiet $CONTAINER_ID:/data/workspace/package/. build
+docker cp $CONTAINER_ID:/data/workspace/package/. build
 if [ $? -ne 0 ]
 if [ $? -ne 0 ]
 then
 then
     echo "Error occurred copying build artifacts from Docker image ${DOCKER_IMAGE_NAME}:latest."
     echo "Error occurred copying build artifacts from Docker image ${DOCKER_IMAGE_NAME}:latest."

+ 1 - 1
package-system/lz4/build-linux.sh

@@ -150,7 +150,7 @@ fi
 echo "Copying the built contents from the docker container for image ${DOCKER_IMAGE_NAME}"
 echo "Copying the built contents from the docker container for image ${DOCKER_IMAGE_NAME}"
 
 
 mkdir -p build
 mkdir -p build
-docker cp --quiet $CONTAINER_ID:/data/workspace/package/. build
+docker cp $CONTAINER_ID:/data/workspace/package/. build
 if [ $? -ne 0 ]
 if [ $? -ne 0 ]
 then
 then
     echo "Error occurred copying build artifacts from Docker image ${DOCKER_IMAGE_NAME}:latest."
     echo "Error occurred copying build artifacts from Docker image ${DOCKER_IMAGE_NAME}:latest."

+ 1 - 1
package-system/squish-ccr/build-linux.sh

@@ -145,7 +145,7 @@ fi
 echo "Copying the built contents from the docker container for image ${DOCKER_IMAGE_NAME}"
 echo "Copying the built contents from the docker container for image ${DOCKER_IMAGE_NAME}"
 
 
 mkdir -p build
 mkdir -p build
-docker cp --quiet $CONTAINER_ID:/data/workspace/package/. build  
+docker cp $CONTAINER_ID:/data/workspace/package/. build  
 if [ $? -ne 0 ]
 if [ $? -ne 0 ]
 then
 then
     echo "Error occurred copying build artifacts from Docker container ($CONTAINER_ID)" 
     echo "Error occurred copying build artifacts from Docker container ($CONTAINER_ID)" 

+ 2 - 2
package_build_list_host_linux-aarch64.json

@@ -6,7 +6,7 @@
     "build_from_source": {
     "build_from_source": {
         "assimp-5.2.5-rev1-linux-aarch64":  "Scripts/extras/pull_and_build_from_git.py ../../package-system/assimp --platform-name Linux-aarch64 --clean",
         "assimp-5.2.5-rev1-linux-aarch64":  "Scripts/extras/pull_and_build_from_git.py ../../package-system/assimp --platform-name Linux-aarch64 --clean",
         "astc-encoder-3.2-rev3-linux-aarch64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/astc-encoder --platform-name Linux-aarch64 --clean",
         "astc-encoder-3.2-rev3-linux-aarch64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/astc-encoder --platform-name Linux-aarch64 --clean",
-        "AWSGameLiftServerSDK-5.0.0-rev1-linux-openssl-1-aarch64": "package-system/AWSGameLiftServerSDK/build_package_image.py --platform-name linux-aarch64",
+        "AWSGameLiftServerSDK-5.0.0-rev2-linux-aarch64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/AWSGameLiftServerSDK --platform-name Linux-aarch64 --clean",
         "AwsIotDeviceSdkCpp-1.15.2-rev1-linux-aarch64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/AwsIotDeviceSdkCpp --platform-name Linux-aarch64 --clean",
         "AwsIotDeviceSdkCpp-1.15.2-rev1-linux-aarch64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/AwsIotDeviceSdkCpp --platform-name Linux-aarch64 --clean",
         "AWSNativeSDK-1.9.50-rev2-linux-openssl-1-aarch64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/AWSNativeSDK --platform-name Linux-OpenSSL-1-aarch64 --clean",
         "AWSNativeSDK-1.9.50-rev2-linux-openssl-1-aarch64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/AWSNativeSDK --platform-name Linux-OpenSSL-1-aarch64 --clean",
         "AWSNativeSDK-1.9.50-rev2-linux-openssl-3-aarch64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/AWSNativeSDK --platform-name Linux-OpenSSL-3-aarch64 --clean",
         "AWSNativeSDK-1.9.50-rev2-linux-openssl-3-aarch64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/AWSNativeSDK --platform-name Linux-OpenSSL-3-aarch64 --clean",
@@ -46,7 +46,7 @@
     "build_from_folder": {
     "build_from_folder": {
         "assimp-5.2.5-rev1-linux-aarch64": "package-system/assimp/temp/assimp-linux-aarch64",
         "assimp-5.2.5-rev1-linux-aarch64": "package-system/assimp/temp/assimp-linux-aarch64",
         "astc-encoder-3.2-rev3-linux-aarch64": "package-system/astc-encoder/temp/astc-encoder-linux-aarch64",
         "astc-encoder-3.2-rev3-linux-aarch64": "package-system/astc-encoder/temp/astc-encoder-linux-aarch64",
-        "AWSGameLiftServerSDK-5.0.0-rev1-linux-openssl-1-aarch64": "package-system/AWSGameLiftServerSDK-linux-aarch64",
+        "AWSGameLiftServerSDK-5.0.0-rev2-linux-aarch64": "package-system/AWSGameLiftServerSDK/temp/AWSGameLiftServerSDK-linux-aarch64",
         "AwsIotDeviceSdkCpp-1.15.2-rev1-linux-aarch64": "package-system/AwsIotDeviceSdkCpp/temp/AwsIotDeviceSdkCpp-linux-aarch64",
         "AwsIotDeviceSdkCpp-1.15.2-rev1-linux-aarch64": "package-system/AwsIotDeviceSdkCpp/temp/AwsIotDeviceSdkCpp-linux-aarch64",
         "AWSNativeSDK-1.9.50-rev2-linux-openssl-1-aarch64": "package-system/AWSNativeSDK/temp/AWSNativeSDK-linux-openssl-1-aarch64",
         "AWSNativeSDK-1.9.50-rev2-linux-openssl-1-aarch64": "package-system/AWSNativeSDK/temp/AWSNativeSDK-linux-openssl-1-aarch64",
         "AWSNativeSDK-1.9.50-rev2-linux-openssl-3-aarch64": "package-system/AWSNativeSDK/temp/AWSNativeSDK-linux-openssl-3-aarch64",
         "AWSNativeSDK-1.9.50-rev2-linux-openssl-3-aarch64": "package-system/AWSNativeSDK/temp/AWSNativeSDK-linux-openssl-3-aarch64",

+ 4 - 2
package_build_list_host_linux.json

@@ -5,7 +5,8 @@
     "comment4" : "Note:  Build from source occurs before build_from_folder",
     "comment4" : "Note:  Build from source occurs before build_from_folder",
     "build_from_source": {
     "build_from_source": {
         "assimp-5.2.5-rev1-linux":  "Scripts/extras/pull_and_build_from_git.py ../../package-system/assimp --platform-name Linux --package-root ../../package-system --clean",
         "assimp-5.2.5-rev1-linux":  "Scripts/extras/pull_and_build_from_git.py ../../package-system/assimp --platform-name Linux --package-root ../../package-system --clean",
-        "AWSGameLiftServerSDK-5.0.0-rev1-linux-openssl-1": "package-system/AWSGameLiftServerSDK/build_package_image.py --platform-name linux",
+        "AWSGameLiftServerSDK-5.0.0-rev2-linux-aarch64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/AWSGameLiftServerSDK --platform-name Linux-aarch64 --clean",
+        "AWSGameLiftServerSDK-5.0.0-rev2-linux": "Scripts/extras/pull_and_build_from_git.py ../../package-system/AWSGameLiftServerSDK --platform-name Linux --clean",
         "AWSNativeSDK-1.9.50-rev2-linux-openssl-1": "Scripts/extras/pull_and_build_from_git.py ../../package-system/AWSNativeSDK --platform-name Linux-OpenSSL-1 --package-root ../../package-system/AWSNativeSDK/temp --clean",
         "AWSNativeSDK-1.9.50-rev2-linux-openssl-1": "Scripts/extras/pull_and_build_from_git.py ../../package-system/AWSNativeSDK --platform-name Linux-OpenSSL-1 --package-root ../../package-system/AWSNativeSDK/temp --clean",
         "AWSNativeSDK-1.9.50-rev2-linux-openssl-3": "Scripts/extras/pull_and_build_from_git.py ../../package-system/AWSNativeSDK --platform-name Linux-OpenSSL-3 --package-root ../../package-system/AWSNativeSDK/temp --clean",
         "AWSNativeSDK-1.9.50-rev2-linux-openssl-3": "Scripts/extras/pull_and_build_from_git.py ../../package-system/AWSNativeSDK --platform-name Linux-OpenSSL-3 --package-root ../../package-system/AWSNativeSDK/temp --clean",
         "cityhash-1.1-rev1-linux":  "Scripts/extras/pull_and_build_from_git.py ../../package-system/cityhash --platform-name Linux --clean",
         "cityhash-1.1-rev1-linux":  "Scripts/extras/pull_and_build_from_git.py ../../package-system/cityhash --platform-name Linux --clean",
@@ -47,7 +48,8 @@
     },
     },
     "build_from_folder": {
     "build_from_folder": {
         "assimp-5.2.5-rev1-linux": "package-system/assimp-linux",
         "assimp-5.2.5-rev1-linux": "package-system/assimp-linux",
-        "AWSGameLiftServerSDK-5.0.0-rev1-linux-openssl-1": "package-system/AWSGameLiftServerSDK-linux",
+        "AWSGameLiftServerSDK-5.0.0-rev2-linux": "package-system/AWSGameLiftServerSDK/temp/AWSGameLiftServerSDK-linux",
+        "AWSGameLiftServerSDK-5.0.0-rev2-linux-aarch64": "package-system/AWSGameLiftServerSDK/temp/AWSGameLiftServerSDK-linux-aarch64",
         "AWSNativeSDK-1.9.50-rev2-linux-openssl-1": "package-system/AWSNativeSDK/temp/AWSNativeSDK-linux-openssl-1",
         "AWSNativeSDK-1.9.50-rev2-linux-openssl-1": "package-system/AWSNativeSDK/temp/AWSNativeSDK-linux-openssl-1",
         "AWSNativeSDK-1.9.50-rev2-linux-openssl-3": "package-system/AWSNativeSDK/temp/AWSNativeSDK-linux-openssl-3",
         "AWSNativeSDK-1.9.50-rev2-linux-openssl-3": "package-system/AWSNativeSDK/temp/AWSNativeSDK-linux-openssl-3",
         "cityhash-1.1-rev1-linux": "package-system/cityhash/temp/cityhash-linux",
         "cityhash-1.1-rev1-linux": "package-system/cityhash/temp/cityhash-linux",