diff --git a/cmake/build_helpers.cmake b/cmake/build_helpers.cmake index 9ce3918f3..cd5f19630 100644 --- a/cmake/build_helpers.cmake +++ b/cmake/build_helpers.cmake @@ -129,9 +129,9 @@ macro(configurePackingResources) string(TIMESTAMP CURR_YEAR "%Y") set(MACOSX_BUNDLE_COPYRIGHT "Copyright © 2020 - ${CURR_YEAR} WerWolv. All rights reserved." ) if ("${CMAKE_GENERATOR}" STREQUAL "Xcode") - set (IMHEX_BUNDLE_PATH "${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}/ImHex.app") + set (IMHEX_BUNDLE_PATH "${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}/imhex.app") else () - set (IMHEX_BUNDLE_PATH "${CMAKE_BINARY_DIR}/ImHex.app") + set (IMHEX_BUNDLE_PATH "${CMAKE_BINARY_DIR}/imhex.app") endif() set(PLUGINS_INSTALL_LOCATION "${IMHEX_BUNDLE_PATH}/Contents/MacOS/plugins") @@ -259,7 +259,7 @@ macro(createPackage) set(CPACK_GENERATOR "DragNDrop") set (CPACK_BUNDLE_ICON "${CMAKE_SOURCE_DIR}/resources/dist/macos/AppIcon.icns" ) - set (CPACK_BUNDLE_PLIST "${CMAKE_BINARY_DIR}/ImHex.app/Contents/Info.plist") + set (CPACK_BUNDLE_PLIST "${CMAKE_BINARY_DIR}/imhex.app/Contents/Info.plist") else() install(TARGETS main RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) if(WIN32) # Forwarder is only needed on Windows diff --git a/cmake/modules/PostprocessBundle.cmake b/cmake/modules/PostprocessBundle.cmake index 09a760827..7a3b67374 100644 --- a/cmake/modules/PostprocessBundle.cmake +++ b/cmake/modules/PostprocessBundle.cmake @@ -24,6 +24,12 @@ if(CMAKE_GENERATOR) return() endif() +# IMHEX PATCH BEGIN +# The function defined above doesn't keep in mind that if we are cross-compiling to MacOS, APPLE must be 1, +# so we force it here (where else would this script be run anyway ? This seems to be MacOS-specific code) +SET(APPLE 1) +# IMHEX PATCHE END + get_filename_component(BUNDLE_PATH "${BUNDLE_PATH}" ABSOLUTE) message(STATUS "Fixing up application bundle: ${BUNDLE_PATH}") diff --git a/dist/macOS/arm64.Dockerfile b/dist/macOS/arm64.Dockerfile new file mode 100644 index 000000000..bd80ad8eb --- /dev/null +++ b/dist/macOS/arm64.Dockerfile @@ -0,0 +1,163 @@ +# see arm64.crosscompile.Dockerfile +FROM crosscompile as build + +ENV MACOSX_DEPLOYMENT_TARGET 12.1 + +# -- DOWNLOADING STUFF + +## Install make +RUN --mount=type=cache,target=/var/lib/apt/lists/ apt update && apt install -y make + +## fix environment +### add install_name_tool for cmake command that won't have the right env set (see PostprocessBundle.cmake function postprocess_bundle()) +RUN cp /osxcross/build/cctools-port/cctools/misc/install_name_tool /usr/bin/install_name_tool +### a cmake thing wants 'otool' and not '' apparently +RUN cp /osxcross/target/bin/aarch64-apple-darwin23-otool /usr/bin/otool + +## Clone glfw +RUN <