This repository has been archived on 2024-03-23. You can view files and clone it, but cannot push or open issues or pull requests.
2023-04-28 20:02:53 +00:00
|
|
|
# To use this as a script, make sure you pass in the variables BASE_DIR, SRC_DIR, BUILD_DIR, and TARGET_FILE
|
2017-09-28 16:27:42 +00:00
|
|
|
|
|
|
|
if(WIN32)
|
|
|
|
set(PLATFORM "windows")
|
|
|
|
elseif(APPLE)
|
|
|
|
set(PLATFORM "mac")
|
2017-09-29 01:38:27 +00:00
|
|
|
elseif(UNIX)
|
2017-09-28 16:27:42 +00:00
|
|
|
set(PLATFORM "linux")
|
|
|
|
else()
|
|
|
|
message(FATAL_ERROR "Cannot build installer for this unsupported platform")
|
|
|
|
endif()
|
|
|
|
|
2023-04-28 20:02:53 +00:00
|
|
|
list(APPEND CMAKE_MODULE_PATH "${BASE_DIR}/CMakeModules")
|
|
|
|
include(DownloadExternals)
|
|
|
|
download_qt_external(tools_ifw QT_PREFIX)
|
2017-09-28 16:27:42 +00:00
|
|
|
|
2023-04-28 20:02:53 +00:00
|
|
|
file(GLOB_RECURSE INSTALLER_BASE "${QT_PREFIX}/**/installerbase*")
|
|
|
|
file(GLOB_RECURSE BINARY_CREATOR "${QT_PREFIX}/**/binarycreator*")
|
2017-09-28 16:27:42 +00:00
|
|
|
|
|
|
|
set(CONFIG_FILE "${SRC_DIR}/config/config_${PLATFORM}.xml")
|
|
|
|
set(PACKAGES_DIR "${BUILD_DIR}/packages")
|
|
|
|
file(MAKE_DIRECTORY ${PACKAGES_DIR})
|
|
|
|
|
|
|
|
execute_process(COMMAND ${BINARY_CREATOR} -t ${INSTALLER_BASE} -n -c ${CONFIG_FILE} -p ${PACKAGES_DIR} ${TARGET_FILE})
|