Skip to content

Commit

Permalink
WIP: ios build fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rgriebl committed Apr 9, 2024
1 parent 7b5fbfd commit 8e53836
Show file tree
Hide file tree
Showing 4 changed files with 110 additions and 104 deletions.
186 changes: 93 additions & 93 deletions .github/workflows/build_cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,98 +43,98 @@ jobs:
fail-fast: false
matrix:
config:
- name: "Windows Intel 64bit"
artifact: "Windows-x64"
runs-on: windows-2019
os: windows
qt_host: 'windows'
qt_version: '6.6.3'
qt_arch: 'win64_msvc2019_64'
qt_dir: "msvc2019_64"
environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
cmake_extra_config: '-DSENTRY=ON'

- name: "Windows ARM 64bit"
artifact: "Windows-ARM64"
runs-on: windows-2019
os: windows
qt_host: 'windows'
qt_host_arch: 'win64_msvc2019_64'
qt_version: '6.6.3'
qt_arch: 'win64_msvc2019_arm64'
qt_dir: "msvc2019_arm64"
environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvarsamd64_arm64.bat"
cmake_extra_config: '-DCMAKE_TOOLCHAIN_FILE=%Qt6_DIR%/lib/cmake/Qt6/qt.toolchain.cmake -DQT_HOST_PATH=%Qt6_DIR%/../msvc2019_64'

- name: "Ubuntu 22.04 64bit"
artifact: "Ubuntu-22.04"
runs-on: ubuntu-22.04
os: linux
debian_container: "buildpack-deps:22.04"

- name: "Debian 12 Backend 64bit"
artifact: "Debian-12-Backend"
runs-on: ubuntu-22.04
os: linux
debian_container: "buildpack-deps:bookworm"
cmake_extra_config: "-DBACKEND_ONLY=ON"
generate_docs: true
generate_docker: true

- name: "Linux AppImage 64bit"
artifact: "Linux-AppImage"
runs-on: ubuntu-20.04
os: linux
appimage: true
qt_tools: tools_opensslv3_src
qt_host: 'linux'
qt_version: '6.6.3'
qt_arch: 'gcc_64'

- name: "Ubuntu Snap 64bit"
artifact: "Linux-Snap"
runs-on: ubuntu-22.04
os: linux
snap: true
qt_tools: tools_opensslv3_src
qt_host: 'linux'
qt_version: '6.6.3'
qt_arch: 'gcc_64'

- name: "macOS Universal"
artifact: "macOS"
runs-on: macos-13
os: macos
qt_host: 'mac'
qt_version: '6.6.3'
qt_arch: 'clang_64'
qt_dir: 'macos'
cmake_extra_config: '-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -DSENTRY=ON'
xcode: '15.1' # https://developer.apple.com/forums/thread/740889

- name: "macOS 10 Legacy"
artifact: "macOS-10-Legacy"
runs-on: macos-12
os: macos
qt_host: 'mac'
qt_version: '6.4.3'
qt_arch: 'clang_64'
qt_dir: 'macos'
cmake_extra_config: '-DCMAKE_OSX_ARCHITECTURES="x86_64" -DSENTRY=ON'

- name: "Android"
artifact: "Android"
runs-on: ubuntu-20.04
os: android
android_abi: 'arm64-v8a'
android_ndk: '26.2.11394342'
qt_host: 'linux'
qt_host_arch: 'gcc_64'
qt_target: 'android'
qt_version: '6.6.3'
qt_arch: 'android_x86_64'
qt_extra_archs: 'android_arm64_v8a android_armv7 android_x86'
cmake_extra_config: '-DSENTRY=ON'
# - name: "Windows Intel 64bit"
# artifact: "Windows-x64"
# runs-on: windows-2019
# os: windows
# qt_host: 'windows'
# qt_version: '6.6.3'
# qt_arch: 'win64_msvc2019_64'
# qt_dir: "msvc2019_64"
# environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
# cmake_extra_config: '-DSENTRY=ON'

# - name: "Windows ARM 64bit"
# artifact: "Windows-ARM64"
# runs-on: windows-2019
# os: windows
# qt_host: 'windows'
# qt_host_arch: 'win64_msvc2019_64'
# qt_version: '6.6.3'
# qt_arch: 'win64_msvc2019_arm64'
# qt_dir: "msvc2019_arm64"
# environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvarsamd64_arm64.bat"
# cmake_extra_config: '-DCMAKE_TOOLCHAIN_FILE=%Qt6_DIR%/lib/cmake/Qt6/qt.toolchain.cmake -DQT_HOST_PATH=%Qt6_DIR%/../msvc2019_64'

# - name: "Ubuntu 22.04 64bit"
# artifact: "Ubuntu-22.04"
# runs-on: ubuntu-22.04
# os: linux
# debian_container: "buildpack-deps:22.04"

# - name: "Debian 12 Backend 64bit"
# artifact: "Debian-12-Backend"
# runs-on: ubuntu-22.04
# os: linux
# debian_container: "buildpack-deps:bookworm"
# cmake_extra_config: "-DBACKEND_ONLY=ON"
# generate_docs: true
# generate_docker: true

# - name: "Linux AppImage 64bit"
# artifact: "Linux-AppImage"
# runs-on: ubuntu-20.04
# os: linux
# appimage: true
# qt_tools: tools_opensslv3_src
# qt_host: 'linux'
# qt_version: '6.6.3'
# qt_arch: 'gcc_64'

# - name: "Ubuntu Snap 64bit"
# artifact: "Linux-Snap"
# runs-on: ubuntu-22.04
# os: linux
# snap: true
# qt_tools: tools_opensslv3_src
# qt_host: 'linux'
# qt_version: '6.6.3'
# qt_arch: 'gcc_64'

# - name: "macOS Universal"
# artifact: "macOS"
# runs-on: macos-13
# os: macos
# qt_host: 'mac'
# qt_version: '6.6.3'
# qt_arch: 'clang_64'
# qt_dir: 'macos'
# cmake_extra_config: '-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -DSENTRY=ON'
# xcode: '15.1' # https://developer.apple.com/forums/thread/740889

# - name: "macOS 10 Legacy"
# artifact: "macOS-10-Legacy"
# runs-on: macos-12
# os: macos
# qt_host: 'mac'
# qt_version: '6.4.3'
# qt_arch: 'clang_64'
# qt_dir: 'macos'
# cmake_extra_config: '-DCMAKE_OSX_ARCHITECTURES="x86_64" -DSENTRY=ON'

# - name: "Android"
# artifact: "Android"
# runs-on: ubuntu-20.04
# os: android
# android_abi: 'arm64-v8a'
# android_ndk: '26.2.11394342'
# qt_host: 'linux'
# qt_host_arch: 'gcc_64'
# qt_target: 'android'
# qt_version: '6.6.3'
# qt_arch: 'android_x86_64'
# qt_extra_archs: 'android_arm64_v8a android_armv7 android_x86'
# cmake_extra_config: '-DSENTRY=ON'

- name: "iOS"
artifact: "iOS"
Expand All @@ -143,7 +143,7 @@ jobs:
qt_host: 'mac'
qt_host_arch: 'clang_64'
qt_target: 'ios'
qt_version: '6.7.0'
qt_version: '6.6.0'
qt_arch: 'ios'
cmake_extra_config: ''
xcode: '15.2'
Expand Down
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ if (APPLE)
if (LTO_STATUS)
set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "-Wl,-object_path_lto -Wl,lto.o")
endif()
set(QT_NO_SET_PLIST_LOCALIZATIONS, ON) # we handle this ourselves
if (IOS)
set_target_properties(${PROJECT_NAME} PROPERTIES
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_SOURCE_DIR}/macos/Info.ios.plist"
Expand All @@ -342,6 +343,12 @@ if (APPLE)
MACOSX_PACKAGE_LOCATION "Resources"
)

set(PRIVACY_INFO "${CMAKE_SOURCE_DIR}/macos/PrivacyInfo.xcprivacy")
target_sources(${PROJECT_NAME} PRIVATE ${PRIVACY_INFO})
set_source_files_properties(${PRIVACY_INFO} PROPERTIES
MACOSX_PACKAGE_LOCATION "Resources"
)

# restrict the number of deployed plugins in static builds
qt_import_plugins(${PROJECT_NAME}
EXCLUDE_BY_TYPE qmltooling
Expand All @@ -353,7 +360,6 @@ if (APPLE)
INCLUDE_BY_TYPE sqldrivers
Qt::QSQLiteDriverPlugin
)
set_property(TARGET ${PROJECT_NAME} APPEND PROPERTY RESOURCE "macos/PrivacyInfo.xcprivacy")
else()
set_target_properties(${PROJECT_NAME} PROPERTIES
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_SOURCE_DIR}/macos/Info.macos.plist"
Expand Down
10 changes: 5 additions & 5 deletions macos/Info.ios.plist
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<string>BrickStore</string>

<key>CFBundleExecutable</key>
<string>@EXECUTABLE@</string>
<string>${EXECUTABLE}</string>

<key>CFBundleIconName</key>
<string>AppIcon</string>

<key>CFBundleIdentifier</key>
<string>@MACOSX_BUNDLE_GUI_IDENTIFIER@</string>
<string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>

<key>CFBundleName</key>
<string>BrickStore</string>
Expand All @@ -21,10 +21,10 @@
<string>APPL</string>

<key>CFBundleShortVersionString</key>
<string>@VERSION@</string>
<string>${VERSION}</string>

<key>CFBundleVersion</key>
<string>@BUILD_NUMBER@</string>
<string>${BUILD_NUMBER}</string>

<key>CFBundleDevelopmentRegion</key>
<string>en</string>
Expand All @@ -33,7 +33,7 @@
<true/>

<key>MinimumOSVersion</key>
<string>@MACOSX_DEPLOYMENT_TARGET@</string>
<string>${MACOSX_DEPLOYMENT_TARGET}</string>

<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
Expand Down
10 changes: 5 additions & 5 deletions macos/Info.macos.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,25 @@
<string>APPL</string>

<key>NSHumanrReadableCopyright</key>
<string>Copyright © @COPYRIGHT@</string>
<string>Copyright © ${COPYRIGHT}</string>

<key>CFBundleIdentifier</key>
<string>@MACOSX_BUNDLE_GUI_IDENTIFIER@</string>
<string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>

<key>CFBundleSignature</key>
<string>ttxt</string>

<key>CFBundleExecutable</key>
<string>@EXECUTABLE@</string>
<string>${EXECUTABLE}</string>

<key>CFBundleName</key>
<string>BrickStore</string>

<key>CFBundleShortVersionString</key>
<string>@VERSION@</string>
<string>${VERSION}</string>

<key>CFBundleVersion</key>
<string>@BUILD_NUMBER@</string>
<string>${BUILD_NUMBER}</string>

<key>NSCameraUsageDescription</key>
<string>BrickStore needs access to your camera, if you want to identify parts with it.</string>
Expand Down

0 comments on commit 8e53836

Please sign in to comment.