Installer: Converted the build scripts to cmake and added an "installer" target
This commit is contained in:
parent
d11cf9a0a5
commit
709c89a1d8
8 changed files with 53 additions and 78 deletions
28
CMakeModules/BuildInstaller.cmake
Normal file
28
CMakeModules/BuildInstaller.cmake
Normal file
|
@ -0,0 +1,28 @@
|
|||
# To use this as a script, make sure you pass in the variables SRC_DIR BUILD_DIR and TARGET_FILE
|
||||
|
||||
if(WIN32)
|
||||
set(PLATFORM "windows")
|
||||
elseif(APPLE)
|
||||
set(PLATFORM "mac")
|
||||
elseif(LINUX)
|
||||
set(PLATFORM "linux")
|
||||
else()
|
||||
message(FATAL_ERROR "Cannot build installer for this unsupported platform")
|
||||
endif()
|
||||
|
||||
set(DIST_DIR "${BUILD_DIR}/dist")
|
||||
set(ARCHIVE "${PLATFORM}.7z")
|
||||
|
||||
file(MAKE_DIRECTORY ${DIST_DIR})
|
||||
file(DOWNLOAD https://github.com/citra-emu/ext-windows-bin/raw/master/qtifw/${ARCHIVE}
|
||||
"${BUILD_DIR}/${ARCHIVE}" SHOW_PROGRESS)
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xf "${BUILD_DIR}/${ARCHIVE}"
|
||||
WORKING_DIRECTORY "${BUILD_DIR}/")
|
||||
|
||||
set(CONFIG_FILE "${SRC_DIR}/config/config_${PLATFORM}.xml")
|
||||
set(INSTALLER_BASE "${BUILD_DIR}/installerbase_${PLATFORM}")
|
||||
set(BINARY_CREATOR "${BUILD_DIR}/binarycreator_${PLATFORM}")
|
||||
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})
|
Loading…
Add table
Add a link
Reference in a new issue