diff --git a/cmake/Packaging.cmake b/cmake/Packaging.cmake index 2a75515b4c..83e91d73ee 100644 --- a/cmake/Packaging.cmake +++ b/cmake/Packaging.cmake @@ -125,6 +125,39 @@ install(FILES ${_cmake_package_dest} DESTINATION ./Tools/Redistributables/CMake ) +# temporary workaround for acquiring the 3rd party SPDX license manifest, the desired location is from +# another git repository that's private. once it's public, only how the URL is formed should change +set(LY_INSTALLER_3RD_PARTY_LICENSE_URL "" CACHE STRING "URL to the 3rd party SPDX license manifest file for inclusion in packaging.") + +if(${LY_VERSION_STRING} VERSION_GREATER "0.0.0.0" AND NOT LY_INSTALLER_3RD_PARTY_LICENSE_URL) + message(FATAL_ERROR "Missing required URL for the 3rd party SPDX license manifest file. " + "Please specifiy where to acquire the file via LY_INSTALLER_3RD_PARTY_LICENSE_URL") +endif() + +string(REPLACE "/" ";" _url_components ${LY_INSTALLER_3RD_PARTY_LICENSE_URL}) +list(POP_BACK _url_components _3rd_party_license_filename) + +set(_3rd_party_license_dest ${CPACK_BINARY_DIR}/${_3rd_party_license_filename}) + +# use the plain file downloader as we don't have the file hash available and using a dummy will +# delete the file once it fails hash verification +file(DOWNLOAD + ${LY_INSTALLER_3RD_PARTY_LICENSE_URL} + ${_3rd_party_license_dest} + STATUS _status + TLS_VERIFY ON +) +list(POP_FRONT _status _status_code) + +if (${_status_code} EQUAL 0 AND EXISTS ${_3rd_party_license_dest}) + install(FILES ${_3rd_party_license_dest} + DESTINATION . + ) +else() + file(REMOVE ${_3rd_party_license_dest}) + message(FATAL_ERROR "Failed to acquire the 3rd Party license manifest file. Error: ${_status}") +endif() + # checks for and removes trailing slash function(strip_trailing_slash in_url out_url) string(LENGTH ${in_url} _url_length) diff --git a/scripts/build/Platform/Windows/build_config.json b/scripts/build/Platform/Windows/build_config.json index c16e9a5dbe..04e32e9481 100644 --- a/scripts/build/Platform/Windows/build_config.json +++ b/scripts/build/Platform/Windows/build_config.json @@ -315,7 +315,7 @@ "CONFIGURATION": "profile", "OUTPUT_DIRECTORY": "build\\windows_vs2019", "CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0 -DLY_UNITY_BUILD=TRUE -DLY_DISABLE_TEST_MODULES=TRUE -DCPACK_WIX_ROOT=\"!WIX! \"", - "EXTRA_CMAKE_OPTIONS": "-DLY_INSTALLER_AUTO_GEN_TAG=ON -DLY_INSTALLER_DOWNLOAD_URL=https://dkb1uj4hs9ikv.cloudfront.net -DLY_INSTALLER_LICENSE_URL=https://example.com", + "EXTRA_CMAKE_OPTIONS": "-DLY_INSTALLER_AUTO_GEN_TAG=ON -DLY_INSTALLER_DOWNLOAD_URL=https://dkb1uj4hs9ikv.cloudfront.net -DLY_INSTALLER_LICENSE_URL=https://example.com -DLY_INSTALLER_3RD_PARTY_LICENSE_URL=https://dkb1uj4hs9ikv.cloudfront.net/SPDX-Licenses.txt", "CPACK_BUCKET": "spectra-prism-staging-us-west-2", "CMAKE_LY_PROJECTS": "", "CMAKE_TARGET": "ALL_BUILD",