49e8f35858
* configure/generation working Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * Generates deb package forLinux Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * Fixes to EngineFinder Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * changes the owner of the installed folder so it is writable by the user Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * jenkins scripts Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * Fixes execution permission for scripts Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * Fixes wrong parameter to build for linux Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * removal of clang parameters in build_config.json Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * Simplifies and fixes build configs Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * fixes to EngineFinder Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * Adds linux deb package upload and small fixes/organization cleanup Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * fixes checksum generation Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * Some more small fixes for reviewing Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * Test if this space is necessary for cpack Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * More fixes for installer jobs Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * Adding eval to variables that need to double-expand Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * Removing unused variables being passed Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * Do not remove symlink Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * Use cmake_path for concatenating paths Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * removing quotes so the variable expands Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * cleaned up some variables that have way too many ways to be passed Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * Multiple fixes for Jenkins Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * Cleanup/re-organization Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * fixes some temp variables so we can run cpack jenkins jobs locally Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * Delays cmake download to install step Cleanup on installer_windows.cmd, we already have the path to cpack (same as cmake, which is added to the path) Some simplification in the windows installer generation, we now generate the same even if we dont upload Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * Fixes mac install Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * CPack can generate hashes for us Defiine CPACK_OUTPUT_FILE_PREFIX to prevent the exe/msi from ending in the bin dir Remove unnecessary generation of folder from 3rdPartyPacakges which fails when including from cpack Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * multiple fixes Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * fixes typo Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * more fixes Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * Fixes for linux/mac/windows (fixing discrepancies with Jenkins) Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * uploads to S3 from the upload directory and fixes the latest upload Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * Adds ERROR_VARIABLE to S3 upload to find a Jenkins issue Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * printing command invocation to try to figure out the errors Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * Changes the hashing algorithm to sha256 and fixes the cmd used to call to pythojn Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * wrong path being passed in mac Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * removes compiler parameters from a config job (after rebase) Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * more fixes fro deb packaging job Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * small fix for fingerprint patching for latest Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * Changing extension of public key and leaving better TODO places for code signing Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * Removes sdl as a dependency, leaving it commented since it is needed for wwise Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * fixes runtime copy during install, makes it more consistent with regular runtime dependencies and optimizes copy when there is already an install Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * $ENV{DESTDIR} and CMAKE_INSTALL_PREFIX cannot be used in cmake_path because the CMAKE_INSTALL_PREFIX is absolute Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * Fixing some runtime_dependencies optimizations, we cannot take size of a bundle Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * Fixes warning in mac for an unused variable Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * Fixes a variable that was being passed to fix qt frameworks Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * More fixes for Jenkins Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * Updates email to use for maintainer to match certificate Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * make directory because in some cases the dependency is copied before the actual library and the directory has to be created Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * Fix for a new warning/error in linux Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * The sha file is created after the upload happens, so creating it Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * remove the size comparison for install since it stomps over the copy from the target and doesnt trigger stripping Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
140 lines
5.3 KiB
CMake
140 lines
5.3 KiB
CMake
#
|
|
# 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
|
|
#
|
|
#
|
|
|
|
set(LY_INSTALLER_WIX_ROOT "" CACHE PATH "Path to the WiX install path")
|
|
|
|
if(LY_INSTALLER_WIX_ROOT)
|
|
if(NOT EXISTS ${LY_INSTALLER_WIX_ROOT})
|
|
message(FATAL_ERROR "Invalid path supplied for LY_INSTALLER_WIX_ROOT argument")
|
|
endif()
|
|
else()
|
|
# early out as no path to WiX has been supplied effectively disabling support
|
|
return()
|
|
endif()
|
|
|
|
# IMPORTANT: CPACK_WIX_ROOT is a built-in variable that is required to propagate the path supplied
|
|
# via command line down to the cpack internals
|
|
set(CPACK_WIX_ROOT ${LY_INSTALLER_WIX_ROOT})
|
|
|
|
set(CPACK_GENERATOR WIX)
|
|
|
|
set(_cmake_package_name "cmake-${CPACK_DESIRED_CMAKE_VERSION}-windows-x86_64")
|
|
set(CPACK_CMAKE_PACKAGE_FILE "${_cmake_package_name}.zip")
|
|
set(CPACK_CMAKE_PACKAGE_HASH "15a49e2ab81c1822d75b1b1a92f7863f58e31f6d6aac1c4103eef2b071be3112")
|
|
|
|
# workaround for shortening the path cpack installs to by stripping the platform directory
|
|
set(CPACK_TOPLEVEL_TAG "")
|
|
|
|
# CPack will generate the WiX product/upgrade GUIDs further down the chain if they weren't supplied
|
|
# however, they are unique for each run. instead, let's do the auto generation here and add it to
|
|
# the cache for run persistence and have the ability to detect if they are still being used.
|
|
set(_wix_guid_namespace "6D43F57A-2917-4AD9-B758-1F13CDB08593")
|
|
|
|
function(generate_wix_guid out_value seed)
|
|
string(UUID _guid
|
|
NAMESPACE ${_wix_guid_namespace}
|
|
NAME ${seed}
|
|
TYPE SHA1
|
|
UPPER
|
|
)
|
|
|
|
set(${out_value} ${_guid} PARENT_SCOPE)
|
|
endfunction()
|
|
|
|
set(_guid_seed_base "${PROJECT_NAME}_${LY_VERSION_STRING}")
|
|
generate_wix_guid(_wix_default_product_guid "${_guid_seed_base}_ProductID" )
|
|
generate_wix_guid(_wix_default_upgrade_guid "${_guid_seed_base}_UpgradeCode")
|
|
|
|
set(LY_WIX_PRODUCT_GUID "" CACHE STRING "GUID for the Product ID field. Format: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX")
|
|
set(LY_WIX_UPGRADE_GUID "" CACHE STRING "GUID for the Upgrade Code field. Format: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX")
|
|
|
|
# clear previously cached default values to correct future runs. this will
|
|
# unfortunately only work if the seed properties still haven't changed
|
|
if(LY_WIX_PRODUCT_GUID STREQUAL ${_wix_default_product_guid})
|
|
unset(LY_WIX_PRODUCT_GUID CACHE)
|
|
endif()
|
|
if(LY_WIX_UPGRADE_GUID STREQUAL ${_wix_default_upgrade_guid})
|
|
unset(LY_WIX_UPGRADE_GUID CACHE)
|
|
endif()
|
|
|
|
if(NOT (LY_WIX_PRODUCT_GUID AND LY_WIX_UPGRADE_GUID))
|
|
message(STATUS "One or both WiX GUIDs were auto generated. It is recommended you supply your own GUIDs through LY_WIX_PRODUCT_GUID and LY_WIX_UPGRADE_GUID.")
|
|
|
|
if(NOT LY_WIX_PRODUCT_GUID)
|
|
set(LY_WIX_PRODUCT_GUID ${_wix_default_product_guid})
|
|
message(STATUS "-> Default LY_WIX_PRODUCT_GUID = ${LY_WIX_PRODUCT_GUID}")
|
|
endif()
|
|
|
|
if(NOT LY_WIX_UPGRADE_GUID)
|
|
set(LY_WIX_UPGRADE_GUID ${_wix_default_upgrade_guid})
|
|
message(STATUS "-> Default LY_WIX_UPGRADE_GUID = ${LY_WIX_UPGRADE_GUID}")
|
|
endif()
|
|
endif()
|
|
|
|
set(CPACK_WIX_PRODUCT_GUID ${LY_WIX_PRODUCT_GUID})
|
|
set(CPACK_WIX_UPGRADE_GUID ${LY_WIX_UPGRADE_GUID})
|
|
|
|
set(CPACK_WIX_PRODUCT_LOGO ${CPACK_SOURCE_DIR}/Platform/Windows/Packaging/product_logo.png)
|
|
set(CPACK_WIX_PRODUCT_ICON ${CPACK_SOURCE_DIR}/Platform/Windows/Packaging/product_icon.ico)
|
|
|
|
set(CPACK_WIX_TEMPLATE "${CPACK_SOURCE_DIR}/Platform/Windows/Packaging/Template.wxs.in")
|
|
|
|
set(CPACK_WIX_EXTRA_SOURCES
|
|
"${CPACK_SOURCE_DIR}/Platform/Windows/Packaging/PostInstallSetup.wxs"
|
|
"${CPACK_SOURCE_DIR}/Platform/Windows/Packaging/Shortcuts.wxs"
|
|
)
|
|
|
|
set(CPACK_WIX_EXTENSIONS
|
|
WixUtilExtension
|
|
)
|
|
|
|
set(_embed_artifacts "yes")
|
|
|
|
set(_hyperlink_license [[
|
|
<Hypertext Name="EulaHyperlink" X="42" Y="202" Width="-42" Height="51" TabStop="yes" FontId="1" HideWhenDisabled="yes">#(loc.InstallEulaAcceptance)</Hypertext>
|
|
]])
|
|
|
|
set(_raw_text_license [[
|
|
<Richedit Name="EulaRichedit" X="42" Y="202" Width="-42" Height="-84" TabStop="yes" FontId="2" HexStyle="0x800000" />
|
|
<Text Name="EulaAcceptance" X="42" Y="-56" Width="-42" Height="18" TabStop="yes" FontId="1" HideWhenDisabled="yes">#(loc.InstallEulaAcceptance)</Text>
|
|
]])
|
|
|
|
set(WIX_THEME_WARNING_IMAGE ${CPACK_SOURCE_DIR}/Platform/Windows/Packaging/warning.png)
|
|
|
|
if(LY_INSTALLER_LICENSE_URL)
|
|
set(WIX_THEME_INSTALL_LICENSE_ELEMENTS ${_hyperlink_license})
|
|
set(WIX_THEME_EULA_ACCEPTANCE_TEXT "<a href=\"#\">Terms of Use</a>")
|
|
else()
|
|
set(WIX_THEME_INSTALL_LICENSE_ELEMENTS ${_raw_text_license})
|
|
set(WIX_THEME_EULA_ACCEPTANCE_TEXT "Terms of Use above")
|
|
endif()
|
|
|
|
# theme ux file
|
|
configure_file(
|
|
"${CPACK_SOURCE_DIR}/Platform/Windows/Packaging/BootstrapperTheme.xml.in"
|
|
"${CPACK_BINARY_DIR}/BootstrapperTheme.xml"
|
|
@ONLY
|
|
)
|
|
|
|
# theme localization file
|
|
configure_file(
|
|
"${CPACK_SOURCE_DIR}/Platform/Windows/Packaging/BootstrapperTheme.wxl.in"
|
|
"${CPACK_BINARY_DIR}/BootstrapperTheme.wxl"
|
|
@ONLY
|
|
)
|
|
|
|
set(_embed_artifacts "no")
|
|
|
|
# the bootstrapper will at the very least need a different upgrade guid
|
|
generate_wix_guid(CPACK_WIX_BOOTSTRAP_UPGRADE_GUID "${_guid_seed_base}_Bootstrap_UpgradeCode")
|
|
|
|
set(CPACK_WIX_CANDLE_EXTRA_FLAGS
|
|
-dCPACK_EMBED_ARTIFACTS=${_embed_artifacts}
|
|
-dCPACK_CMAKE_PACKAGE_NAME=${_cmake_package_name}
|
|
)
|