diff --git a/cmake/LYWrappers.cmake b/cmake/LYWrappers.cmake index f6a36afc89..2f8349c840 100644 --- a/cmake/LYWrappers.cmake +++ b/cmake/LYWrappers.cmake @@ -334,7 +334,8 @@ function(ly_add_target) if(NOT ly_add_target_IMPORTED) if(NOT ly_add_target_INSTALL_COMPONENT) - set(ly_add_target_INSTALL_COMPONENT ${LY_DEFAULT_INSTALL_COMPONENT}) + #set(ly_add_target_INSTALL_COMPONENT ${LY_DEFAULT_INSTALL_COMPONENT}) + set(ly_add_target_INSTALL_COMPONENT ${ly_add_target_NAMESPACE}) endif() ly_install_target( diff --git a/cmake/Platform/Common/Install_common.cmake b/cmake/Platform/Common/Install_common.cmake index 8fe2fe2c1c..46d23f7b91 100644 --- a/cmake/Platform/Common/Install_common.cmake +++ b/cmake/Platform/Common/Install_common.cmake @@ -286,7 +286,7 @@ endfunction() function(ly_setup_others) # List of directories we want to install relative to engine root - set(DIRECTORIES_TO_INSTALL Tools/LyTestTools Tools/RemoteConsole) + set(DIRECTORIES_TO_INSTALL Tools/LyTestTools Tools/RemoteConsole Tools/Redistributables/CMake) foreach(dir ${DIRECTORIES_TO_INSTALL}) get_filename_component(install_path ${dir} DIRECTORY) diff --git a/cmake/Platform/Windows/Packaging/PostInstallSetup.wxs b/cmake/Platform/Windows/Packaging/PostInstallSetup.wxs new file mode 100644 index 0000000000..ebcaa9502f --- /dev/null +++ b/cmake/Platform/Windows/Packaging/PostInstallSetup.wxs @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cmake/Platform/Windows/Packaging/Template.wxs.in b/cmake/Platform/Windows/Packaging/Template.wxs.in index 2900b96f41..e14e064fbc 100644 --- a/cmake/Platform/Windows/Packaging/Template.wxs.in +++ b/cmake/Platform/Windows/Packaging/Template.wxs.in @@ -17,8 +17,7 @@ - @@ -41,8 +40,24 @@ + + + + + + + NOT Installed Or REINSTALL + + + NOT Installed Or REINSTALL + + + NOT Installed Or REINSTALL + + + diff --git a/cmake/Platform/Windows/Packaging_windows.cmake b/cmake/Platform/Windows/Packaging_windows.cmake index ce73e9a07b..b7db250fda 100644 --- a/cmake/Platform/Windows/Packaging_windows.cmake +++ b/cmake/Platform/Windows/Packaging_windows.cmake @@ -83,9 +83,14 @@ set(CPACK_WIX_PRODUCT_ICON ${CPACK_SOURCE_DIR}/Platform/Windows/Packaging/produc 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") if(LY_INSTALLER_DOWNLOAD_URL) diff --git a/scripts/setup.bat b/scripts/setup.bat deleted file mode 100644 index 34251ad861..0000000000 --- a/scripts/setup.bat +++ /dev/null @@ -1,93 +0,0 @@ -@echo off -rem -rem All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or -rem its licensors. -rem -rem For complete copyright and license terms please see the LICENSE at the root of this -rem distribution (the "License"). All use of this software is governed by the License, -rem or, if provided, by the license below or the license accompanying this file. Do not -rem remove or modify any license notices. This file is distributed on an "AS IS" BASIS, -rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -rem - -pushd %~dp0% - -pushd %~dp0.. -set ENGINE_ROOT=%CD% -popd - -set cmake_version=3.19.1 - -if not "%1"=="" ( - set LY_3RDPARTY_PATH=%1 -) -if "%LY_3RDPARTY_PATH%"=="" goto no_3rd_party - -if not exist %LY_3RDPARTY_PATH% mkdir %LY_3RDPARTY_PATH% -goto install_cmake - -:no_3rd_party -echo A path to where the 3rd party folder is required for setup. -echo Either supply one through the LY_3RDPARTY_PATH environment -echo variable or as an argument to this script -goto fail - - -:install_cmake -set cmake_install_path=%LY_3RDPARTY_PATH%\CMake\%cmake_version%\Windows -set cmake_archive_name=cmake-%cmake_version%-win64-x64 -set cmake_archive_path="%ENGINE_ROOT%\Tools\Redistributables\CMake\%cmake_archive_name%.zip" -if exist "%cmake_install_path%\bin\cmake.exe" goto install_python - -echo Installing CMake %cmake_version% to %cmake_install_path% -if not exist %cmake_install_path% mkdir %cmake_install_path% -powershell.exe -nologo -noprofile -command^ - "& { Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::ExtractToDirectory('%cmake_archive_path%', '%cmake_install_path%'); }" -if ERRORLEVEL 1 goto cmake_failed - -set cmake_extracted_path=%cmake_install_path%\%cmake_archive_name% -for /d %%a in ("%cmake_extracted_path%\*") do move "%%a" "%cmake_install_path%\" -rmdir %cmake_extracted_path% - -goto success - -if ERRORLEVEL 1 goto cmake_failed -set LY_CMAKE_PATH="%cmake_install_path%\bin" -goto install_python - -:cmake_failed -echo Failed to extract cmake to path %cmake_install_path% -goto fail - - -:install_python -echo Installing python... -call %ENGINE_ROOT%\python\get_python.bat -if ERRORLEVEL 1 goto python_failed -goto register_engine - -:python_failed -echo Failed to acquire python -goto fail - - -:register_engine -echo Registering engine... -call %ENGINE_ROOT%\scripts\o3de.bat register --this-engine -if ERRORLEVEL 1 goto registration_failed -goto success - -:registration_failed -echo Failed to register the engine -goto fail - - -:fail -echo O3DE setup failed -popd -exit /b 1 - -:success -echo O3DE setup complete -popd -exit /b %ERRORLEVEL%