mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
generate zip with ipa structure using cpack
fix kambala-decapitator/vcmi#6
This commit is contained in:
parent
e0244c69a3
commit
8dcd3146e7
@ -439,9 +439,9 @@ endif()
|
||||
# Installation section #
|
||||
#######################################
|
||||
|
||||
install(DIRECTORY config DESTINATION ${DATA_DIR} COMPONENT core)
|
||||
install(DIRECTORY scripts DESTINATION ${DATA_DIR} COMPONENT core)
|
||||
install(DIRECTORY Mods DESTINATION ${DATA_DIR} COMPONENT core)
|
||||
install(DIRECTORY config DESTINATION ${DATA_DIR})
|
||||
install(DIRECTORY scripts DESTINATION ${DATA_DIR})
|
||||
install(DIRECTORY Mods DESTINATION ${DATA_DIR})
|
||||
|
||||
# that script is useless for Windows
|
||||
if(NOT WIN32 AND NOT APPLE_IOS)
|
||||
@ -584,6 +584,10 @@ elseif(APPLE_MACOS AND NOT ENABLE_MONOLITHIC_INSTALL)
|
||||
|
||||
# Bundle fixing code must be in separate directory to be executed after all other install code
|
||||
add_subdirectory(osx)
|
||||
elseif(APPLE_IOS)
|
||||
set(CPACK_GENERATOR ZIP)
|
||||
set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY OFF)
|
||||
set(CPACK_INSTALL_CMAKE_PROJECTS "${CMAKE_CURRENT_BINARY_DIR};${CMAKE_PROJECT_NAME};app;/")
|
||||
else()
|
||||
set(CPACK_GENERATOR TGZ)
|
||||
endif()
|
||||
|
@ -264,9 +264,10 @@ enable_pch(vcmiclient)
|
||||
|
||||
if(APPLE_IOS)
|
||||
add_custom_command(TARGET vcmiclient POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} --install "${CMAKE_BINARY_DIR}" --config "$<CONFIG>" --prefix "$<TARGET_BUNDLE_CONTENT_DIR:vcmiclient>"
|
||||
COMMAND ${CMAKE_SOURCE_DIR}/apple_codesign.sh
|
||||
COMMAND ${CMAKE_COMMAND} --install "${CMAKE_BINARY_DIR}" --component "${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME}" --config "$<CONFIG>" --prefix "$<TARGET_BUNDLE_CONTENT_DIR:vcmiclient>"
|
||||
COMMAND ${CMAKE_SOURCE_DIR}/ios/codesign.sh
|
||||
)
|
||||
install(TARGETS vcmiclient DESTINATION Payload COMPONENT app) # for ipa generation with cpack
|
||||
else()
|
||||
install(TARGETS vcmiclient DESTINATION ${BIN_DIR})
|
||||
endif()
|
||||
|
9
ios/zip2ipa.sh
Executable file
9
ios/zip2ipa.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
generatedZip="$1"
|
||||
if [[ -z "$generatedZip" ]]; then
|
||||
echo 'generated zip not provided as param'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mv "$generatedZip" "$(basename "$generatedZip" .zip).ipa"
|
Loading…
Reference in New Issue
Block a user