mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +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 #
|
# Installation section #
|
||||||
#######################################
|
#######################################
|
||||||
|
|
||||||
install(DIRECTORY config DESTINATION ${DATA_DIR} COMPONENT core)
|
install(DIRECTORY config DESTINATION ${DATA_DIR})
|
||||||
install(DIRECTORY scripts DESTINATION ${DATA_DIR} COMPONENT core)
|
install(DIRECTORY scripts DESTINATION ${DATA_DIR})
|
||||||
install(DIRECTORY Mods DESTINATION ${DATA_DIR} COMPONENT core)
|
install(DIRECTORY Mods DESTINATION ${DATA_DIR})
|
||||||
|
|
||||||
# that script is useless for Windows
|
# that script is useless for Windows
|
||||||
if(NOT WIN32 AND NOT APPLE_IOS)
|
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
|
# Bundle fixing code must be in separate directory to be executed after all other install code
|
||||||
add_subdirectory(osx)
|
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()
|
else()
|
||||||
set(CPACK_GENERATOR TGZ)
|
set(CPACK_GENERATOR TGZ)
|
||||||
endif()
|
endif()
|
||||||
|
@ -264,9 +264,10 @@ enable_pch(vcmiclient)
|
|||||||
|
|
||||||
if(APPLE_IOS)
|
if(APPLE_IOS)
|
||||||
add_custom_command(TARGET vcmiclient POST_BUILD
|
add_custom_command(TARGET vcmiclient POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND} --install "${CMAKE_BINARY_DIR}" --config "$<CONFIG>" --prefix "$<TARGET_BUNDLE_CONTENT_DIR:vcmiclient>"
|
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}/apple_codesign.sh
|
COMMAND ${CMAKE_SOURCE_DIR}/ios/codesign.sh
|
||||||
)
|
)
|
||||||
|
install(TARGETS vcmiclient DESTINATION Payload COMPONENT app) # for ipa generation with cpack
|
||||||
else()
|
else()
|
||||||
install(TARGETS vcmiclient DESTINATION ${BIN_DIR})
|
install(TARGETS vcmiclient DESTINATION ${BIN_DIR})
|
||||||
endif()
|
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…
x
Reference in New Issue
Block a user