From 414cacbf280c3fc2060cc6ac1bb9c4e805f9a01f Mon Sep 17 00:00:00 2001 From: Rafael Kitover Date: Sun, 31 Oct 2021 08:50:05 -0700 Subject: [PATCH] Suffix zip files with arch + minor cmake fixes. Instead of suffixing release zip files with 32bit or 64bit, add an architecture suffix, which would be one of: x86_32 x86_64 arm32 arm64 Allow codesign to fail on mac without aborting. Disable the interactive pause for gpg signing because there is no passphrase anymore. Signed-off-by: Rafael Kitover --- cmake/Architecture.cmake | 9 +++++++++ src/wx/CMakeLists.txt | 14 +++++++------- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/cmake/Architecture.cmake b/cmake/Architecture.cmake index d9d5731f..9fa6a7b4 100644 --- a/cmake/Architecture.cmake +++ b/cmake/Architecture.cmake @@ -28,10 +28,13 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "[xX]86|i[3-9]86|[aA][mM][dD]64") set(X86_32 ON) set(X86 ON) set(WINARCH x86) + set(ARCH_NAME x86_32) elseif(CMAKE_C_SIZEOF_DATA_PTR EQUAL 8) set(AMD64 ON) set(X64 ON) + set(X86_64 ON) set(WINARCH x64) + set(ARCH_NAME x86_64) endif() if(DEFINED VCPKG_TARGET_TRIPLET) @@ -41,4 +44,10 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "[xX]86|i[3-9]86|[aA][mM][dD]64") message(FATAL_ERROR "Wrong build environment architecture for VCPKG_TARGET_TRIPLET, you specified ${target_arch} but your compiler is for ${WINARCH}") endif() endif() +elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "[aA][aA][rR][cC][hH]|[aA][rR][mM]") + if(CMAKE_C_SIZEOF_DATA_PTR EQUAL 4) # 32 bit + set(ARCH_NAME arm32) + elseif(CMAKE_C_SIZEOF_DATA_PTR EQUAL 8) + set(ARCH_NAME arm64) + endif() endif() diff --git a/src/wx/CMakeLists.txt b/src/wx/CMakeLists.txt index 8e3903da..65dd600f 100644 --- a/src/wx/CMakeLists.txt +++ b/src/wx/CMakeLists.txt @@ -1115,9 +1115,9 @@ if(UPSTREAM_RELEASE AND WIN32) endif() if(CMAKE_BUILD_TYPE MATCHES Debug) - set(exezip visualboyadvance-m-Win-${BITS}bit-debug${ZIP_SUFFIX}.zip) + set(exezip visualboyadvance-m-Win-${ARCH_NAME}-debug${ZIP_SUFFIX}.zip) else() - set(exezip visualboyadvance-m-Win-${BITS}bit${ZIP_SUFFIX}.zip) + set(exezip visualboyadvance-m-Win-${ARCH_NAME}${ZIP_SUFFIX}.zip) endif() unset(pdb_file) @@ -1137,7 +1137,7 @@ if(UPSTREAM_RELEASE AND WIN32) add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/translations.zip.asc COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_BINARY_DIR}/translations.zip.asc - COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/interactive-pause.cmake +# COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/interactive-pause.cmake COMMAND ${GPG_PROGRAM} --detach-sign -a ${CMAKE_BINARY_DIR}/translations.zip DEPENDS translations-zip ) @@ -1150,7 +1150,7 @@ if(UPSTREAM_RELEASE AND WIN32) TARGET visualboyadvance-m POST_BUILD COMMAND ${CMAKE_COMMAND} -E remove ${exezip}.asc - COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/interactive-pause.cmake +# COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/interactive-pause.cmake COMMAND ${GPG_PROGRAM} --detach-sign -a ${exezip} WORKING_DIRECTORY ${CMAKE_BINARY_DIR} ) @@ -1211,7 +1211,7 @@ if(APPLE AND (UPSTREAM_RELEASE OR ENABLE_ONLINEUPDATES)) add_custom_command( TARGET visualboyadvance-m POST_BUILD - COMMAND codesign --sign "Developer ID Application" --force --deep ./visualboyadvance-m.app + VERBATIM COMMAND sh -c [=[codesign --sign "Developer ID Application" --force --deep ./visualboyadvance-m.app || :]=] WORKING_DIRECTORY ${CMAKE_BINARY_DIR} ) @@ -1230,7 +1230,7 @@ if(APPLE AND (UPSTREAM_RELEASE OR ENABLE_ONLINEUPDATES)) endif() if(UPSTREAM_RELEASE) - set(appzip visualboyadvance-m-Mac-${BITS}bit${ZIP_SUFFIX}.zip) + set(appzip visualboyadvance-m-Mac-${ARCH_NAME}${ZIP_SUFFIX}.zip) add_custom_command( TARGET visualboyadvance-m @@ -1245,7 +1245,7 @@ if(APPLE AND (UPSTREAM_RELEASE OR ENABLE_ONLINEUPDATES)) TARGET visualboyadvance-m POST_BUILD COMMAND ${CMAKE_COMMAND} -E remove ${appzip}.asc - COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/interactive-pause.cmake +# COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/interactive-pause.cmake COMMAND ${GPG_PROGRAM} --detach-sign -a ${appzip} WORKING_DIRECTORY ${CMAKE_BINARY_DIR} )