mirror of
https://github.com/Lime3DS/Lime3DS
synced 2024-12-25 08:32:48 -06:00
Installer: Address review comments
Correctly set permissions on mac installer and create a missing folder
This commit is contained in:
parent
709c89a1d8
commit
e7da39a382
2 changed files with 14 additions and 3 deletions
|
@ -4,7 +4,7 @@ if(WIN32)
|
||||||
set(PLATFORM "windows")
|
set(PLATFORM "windows")
|
||||||
elseif(APPLE)
|
elseif(APPLE)
|
||||||
set(PLATFORM "mac")
|
set(PLATFORM "mac")
|
||||||
elseif(LINUX)
|
elseif(UNIX)
|
||||||
set(PLATFORM "linux")
|
set(PLATFORM "linux")
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "Cannot build installer for this unsupported platform")
|
message(FATAL_ERROR "Cannot build installer for this unsupported platform")
|
||||||
|
@ -13,16 +13,26 @@ endif()
|
||||||
set(DIST_DIR "${BUILD_DIR}/dist")
|
set(DIST_DIR "${BUILD_DIR}/dist")
|
||||||
set(ARCHIVE "${PLATFORM}.7z")
|
set(ARCHIVE "${PLATFORM}.7z")
|
||||||
|
|
||||||
|
file(MAKE_DIRECTORY ${BUILD_DIR})
|
||||||
file(MAKE_DIRECTORY ${DIST_DIR})
|
file(MAKE_DIRECTORY ${DIST_DIR})
|
||||||
file(DOWNLOAD https://github.com/citra-emu/ext-windows-bin/raw/master/qtifw/${ARCHIVE}
|
file(DOWNLOAD https://github.com/citra-emu/ext-windows-bin/raw/master/qtifw/${ARCHIVE}
|
||||||
"${BUILD_DIR}/${ARCHIVE}" SHOW_PROGRESS)
|
"${BUILD_DIR}/${ARCHIVE}" SHOW_PROGRESS)
|
||||||
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xf "${BUILD_DIR}/${ARCHIVE}"
|
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xf "${BUILD_DIR}/${ARCHIVE}"
|
||||||
WORKING_DIRECTORY "${BUILD_DIR}/")
|
WORKING_DIRECTORY "${BUILD_DIR}/")
|
||||||
|
|
||||||
|
set(TARGET_NAME "citra-setup-${PLATFORM}")
|
||||||
set(CONFIG_FILE "${SRC_DIR}/config/config_${PLATFORM}.xml")
|
set(CONFIG_FILE "${SRC_DIR}/config/config_${PLATFORM}.xml")
|
||||||
set(INSTALLER_BASE "${BUILD_DIR}/installerbase_${PLATFORM}")
|
set(INSTALLER_BASE "${BUILD_DIR}/installerbase_${PLATFORM}")
|
||||||
set(BINARY_CREATOR "${BUILD_DIR}/binarycreator_${PLATFORM}")
|
set(BINARY_CREATOR "${BUILD_DIR}/binarycreator_${PLATFORM}")
|
||||||
set(PACKAGES_DIR "${BUILD_DIR}/packages")
|
set(PACKAGES_DIR "${BUILD_DIR}/packages")
|
||||||
file(MAKE_DIRECTORY ${PACKAGES_DIR})
|
file(MAKE_DIRECTORY ${PACKAGES_DIR})
|
||||||
|
|
||||||
|
if (UNIX OR APPLE)
|
||||||
|
execute_process(COMMAND chmod 744 ${BINARY_CREATOR})
|
||||||
|
endif()
|
||||||
|
|
||||||
execute_process(COMMAND ${BINARY_CREATOR} -t ${INSTALLER_BASE} -n -c ${CONFIG_FILE} -p ${PACKAGES_DIR} ${TARGET_FILE})
|
execute_process(COMMAND ${BINARY_CREATOR} -t ${INSTALLER_BASE} -n -c ${CONFIG_FILE} -p ${PACKAGES_DIR} ${TARGET_FILE})
|
||||||
|
|
||||||
|
if (APPLE)
|
||||||
|
execute_process(COMMAND chmod 744 ${TARGET_FILE}.app/Contents/MacOS/${TARGET_NAME})
|
||||||
|
endif()
|
||||||
|
|
3
dist/installer/CMakeLists.txt
vendored
3
dist/installer/CMakeLists.txt
vendored
|
@ -3,13 +3,14 @@ if(WIN32)
|
||||||
set(PLATFORM "windows")
|
set(PLATFORM "windows")
|
||||||
elseif(APPLE)
|
elseif(APPLE)
|
||||||
set(PLATFORM "mac")
|
set(PLATFORM "mac")
|
||||||
elseif(LINUX)
|
elseif(UNIX)
|
||||||
set(PLATFORM "linux")
|
set(PLATFORM "linux")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(BUILD_DIR "${CMAKE_BINARY_DIR}/installer")
|
set(BUILD_DIR "${CMAKE_BINARY_DIR}/installer")
|
||||||
set(DIST_DIR "${BUILD_DIR}/dist")
|
set(DIST_DIR "${BUILD_DIR}/dist")
|
||||||
set(TARGET_FILE "${DIST_DIR}/citra-setup-${PLATFORM}")
|
set(TARGET_FILE "${DIST_DIR}/citra-setup-${PLATFORM}")
|
||||||
|
file(MAKE_DIRECTORY ${BUILD_DIR})
|
||||||
|
|
||||||
# Adds a custom target that will run the BuildInstaller.cmake file
|
# Adds a custom target that will run the BuildInstaller.cmake file
|
||||||
# CMake can't just run a cmake function as a custom command, so this is a way around it.
|
# CMake can't just run a cmake function as a custom command, so this is a way around it.
|
||||||
|
|
Loading…
Reference in a new issue