From 33bc972901ec6319993a709bb5c6ab71fc54e1ec Mon Sep 17 00:00:00 2001 From: OpenSauce04 Date: Wed, 31 Jul 2024 12:56:21 +0100 Subject: [PATCH] Purge iOS from project codebase --- .ci/ios.sh | 15 ------------ .github/workflows/build.yml | 28 ----------------------- CMakeLists.txt | 34 +++++++++------------------- CMakeModules/DownloadExternals.cmake | 26 +++------------------ src/common/common_paths.h | 7 +----- src/lime_qt/CMakeLists.txt | 11 --------- src/lime_qt/bootmanager.cpp | 4 ++-- 7 files changed, 17 insertions(+), 108 deletions(-) delete mode 100755 .ci/ios.sh diff --git a/.ci/ios.sh b/.ci/ios.sh deleted file mode 100755 index 92e1776c8..000000000 --- a/.ci/ios.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -ex - -mkdir build && cd build -cmake .. -GNinja \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_SYSTEM_NAME=iOS \ - -DCMAKE_OSX_ARCHITECTURES=arm64 \ - -DCMAKE_C_COMPILER_LAUNCHER=ccache \ - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ - -DENABLE_QT_TRANSLATION=ON \ - -DCITRA_ENABLE_COMPATIBILITY_REPORTING=ON \ - -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -ninja - -ccache -s -v diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1b7e2cd3b..b39b52128 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -234,34 +234,6 @@ jobs: with: name: ${{ env.OS }}-${{ env.TARGET }} path: src/android/app/artifacts/ - ios: - runs-on: macos-14 - if: ${{ !startsWith(github.ref, 'refs/tags/') }} - env: - CCACHE_DIR: ${{ github.workspace }}/.ccache - CCACHE_COMPILERCHECK: content - CCACHE_SLOPPINESS: time_macros - OS: ios - TARGET: arm64 - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - name: Set up cache - uses: actions/cache@v4 - with: - path: ${{ env.CCACHE_DIR }} - key: ${{ runner.os }}-ios-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-ios- - - name: Setup XCode - uses: maxim-lobanov/setup-xcode@v1 - with: - xcode-version: latest-stable - - name: Install tools - run: brew install ccache ninja - - name: Build - run: ./.ci/ios.sh release: permissions: contents: write diff --git a/CMakeLists.txt b/CMakeLists.txt index e132473f5..21765e607 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,18 +32,8 @@ if (APPLE) set(CMAKE_C_ARCHIVE_FINISH " -no_warning_for_no_symbols -c ") set(CMAKE_CXX_ARCHIVE_FINISH " -no_warning_for_no_symbols -c ") - if (IOS) - # Minimum iOS 14 - set(CMAKE_OSX_DEPLOYMENT_TARGET "14.0") - - # Enable searching CMAKE_PREFIX_PATH for bundled dependencies. - set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH) - set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH) - set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE BOTH) - else() - # Minimum macOS 11 - set(CMAKE_OSX_DEPLOYMENT_TARGET "11.0") - endif() + # Minimum macOS 11 + set(CMAKE_OSX_DEPLOYMENT_TARGET "11.0") endif() if (CMAKE_BUILD_TYPE STREQUAL Debug) @@ -62,24 +52,24 @@ else() endif() option(ENABLE_SDL2 "Enable using SDL2" ON) -CMAKE_DEPENDENT_OPTION(ENABLE_SDL2_FRONTEND "Enable the SDL2 frontend" ON "ENABLE_SDL2;NOT ANDROID AND NOT IOS" OFF) +CMAKE_DEPENDENT_OPTION(ENABLE_SDL2_FRONTEND "Enable the SDL2 frontend" ON "ENABLE_SDL2;NOT ANDROID" OFF) option(USE_SYSTEM_SDL2 "Use the system SDL2 lib (instead of the bundled one)" OFF) # Set bundled qt as dependent options. option(ENABLE_QT "Enable the Qt frontend" ON) option(ENABLE_QT_TRANSLATION "Enable translations for the Qt frontend" OFF) -CMAKE_DEPENDENT_OPTION(ENABLE_QT_UPDATER "Enable built-in updater for the Qt frontend" ON "NOT IOS" OFF) +option(ENABLE_QT_UPDATER "Enable built-in updater for the Qt frontend" ON) -CMAKE_DEPENDENT_OPTION(ENABLE_TESTS "Enable generating tests executable" ON "NOT IOS" OFF) -CMAKE_DEPENDENT_OPTION(ENABLE_DEDICATED_ROOM "Enable generating dedicated room executable" ON "NOT ANDROID AND NOT IOS" OFF) +option(ENABLE_TESTS "Enable generating tests executable" ON) +CMAKE_DEPENDENT_OPTION(ENABLE_DEDICATED_ROOM "Enable generating dedicated room executable" ON "NOT ANDROID" OFF) option(ENABLE_WEB_SERVICE "Enable web services (telemetry, etc.)" ON) option(ENABLE_SCRIPTING "Enable RPC server for scripting" ON) -CMAKE_DEPENDENT_OPTION(ENABLE_CUBEB "Enables the cubeb audio backend" ON "NOT IOS" OFF) +option(ENABLE_CUBEB "Enables the cubeb audio backend" ON) option(ENABLE_OPENAL "Enables the OpenAL audio backend" ON) -CMAKE_DEPENDENT_OPTION(ENABLE_LIBUSB "Enable libusb for GameCube Adapter support" ON "NOT IOS" OFF) +option(ENABLE_LIBUSB "Enable libusb for GameCube Adapter support" ON) CMAKE_DEPENDENT_OPTION(ENABLE_SOFTWARE_RENDERER "Enables the software renderer" ON "NOT ANDROID" OFF) CMAKE_DEPENDENT_OPTION(ENABLE_OPENGL "Enables the OpenGL renderer" ON "NOT APPLE AND NOT (LINUX AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"aarch64\")" OFF) @@ -278,10 +268,8 @@ find_package(tsl-robin-map QUIET) # ====================================== if (APPLE) - if (NOT IOS) - # Umbrella framework for everything GUI-related - find_library(COCOA_LIBRARY Cocoa REQUIRED) - endif() + # Umbrella framework for everything GUI-related + find_library(COCOA_LIBRARY Cocoa REQUIRED) find_library(AVFOUNDATION_LIBRARY AVFoundation REQUIRED) find_library(IOSURFACE_LIBRARY IOSurface REQUIRED) set(PLATFORM_LIBRARIES ${COCOA_LIBRARY} ${AVFOUNDATION_LIBRARY} ${IOSURFACE_LIBRARY} ${MOLTENVK_LIBRARY}) @@ -445,7 +433,7 @@ endif() # Create target for outputting distributable bundles. # Not supported for mobile platforms as distributables are built differently. -if (NOT ANDROID AND NOT IOS) +if (NOT ANDROID) include(BundleTarget) if (ENABLE_SDL2_FRONTEND) bundle_target(lime) diff --git a/CMakeModules/DownloadExternals.cmake b/CMakeModules/DownloadExternals.cmake index cfc8a8c27..8c5b649b6 100644 --- a/CMakeModules/DownloadExternals.cmake +++ b/CMakeModules/DownloadExternals.cmake @@ -47,16 +47,6 @@ function(determine_qt_parameters target host_out type_out arch_out arch_path_out set(type "desktop") set(arch "clang_64") set(arch_path "macos") - - if (IOS AND NOT tool) - set(host_type "${type}") - set(host_arch "${arch}") - set(host_arch_path "${arch_path}") - - set(type "ios") - set(arch "ios") - set(arch_path "ios") - endif() else() set(host "linux") set(type "desktop") @@ -170,24 +160,14 @@ function(download_qt target) endfunction() function(download_moltenvk) - if (IOS) - set(MOLTENVK_PLATFORM "iOS") - else() - set(MOLTENVK_PLATFORM "macOS") - endif() + set(MOLTENVK_PLATFORM "macOS") set(MOLTENVK_DIR "${CMAKE_BINARY_DIR}/externals/MoltenVK") set(MOLTENVK_TAR "${CMAKE_BINARY_DIR}/externals/MoltenVK.tar") if (NOT EXISTS ${MOLTENVK_DIR}) if (NOT EXISTS ${MOLTENVK_TAR}) - # Note: v1.27 is the last version that uses dylib on iOS; future versions use dynamic XCFramework - if (IOS) - file(DOWNLOAD https://github.com/KhronosGroup/MoltenVK/releases/download/v1.2.7/MoltenVK-all.tar - ${MOLTENVK_TAR} SHOW_PROGRESS) - else() - file(DOWNLOAD https://github.com/KhronosGroup/MoltenVK/releases/download/v1.2.9/MoltenVK-all.tar - ${MOLTENVK_TAR} SHOW_PROGRESS) - endif() + file(DOWNLOAD https://github.com/KhronosGroup/MoltenVK/releases/download/v1.2.9/MoltenVK-all.tar + ${MOLTENVK_TAR} SHOW_PROGRESS) endif() execute_process(COMMAND ${CMAKE_COMMAND} -E tar xf "${MOLTENVK_TAR}" diff --git a/src/common/common_paths.h b/src/common/common_paths.h index 609fb44da..de3db35f1 100644 --- a/src/common/common_paths.h +++ b/src/common/common_paths.h @@ -1,4 +1,4 @@ -// Copyright 2013 Dolphin Emulator Project / 2014 Citra Emulator Project +// Copyright Citra Emulator Project / Lime3DS Emulator Project // Licensed under GPLv2 or any later version // Refer to the license.txt file included. @@ -22,13 +22,8 @@ #define LEGACY_EMU_DATA_DIR "Citra" #elif defined(__APPLE__) #include -#if TARGET_OS_IPHONE // TODO: Kill iOS -#define APPLE_EMU_DATA_DIR "Documents" DIR_SEP "Lime3DS" -#define LEGACY_APPLE_EMU_DATA_DIR "Documents" DIR_SEP "Citra" -#else #define APPLE_EMU_DATA_DIR "Library" DIR_SEP "Application Support" DIR_SEP "Lime3DS" #define LEGACY_APPLE_EMU_DATA_DIR "Library" DIR_SEP "Application Support" DIR_SEP "Citra" -#endif // For compatibility with XDG paths. #define EMU_DATA_DIR "lime3ds-emu" #define LEGACY_EMU_DATA_DIR "citra-emu" diff --git a/src/lime_qt/CMakeLists.txt b/src/lime_qt/CMakeLists.txt index 5cd6ecbfe..e508736c5 100644 --- a/src/lime_qt/CMakeLists.txt +++ b/src/lime_qt/CMakeLists.txt @@ -278,17 +278,6 @@ if (APPLE) MACOSX_BUNDLE_ICON_FILE "lime.icns" RESOURCE "${APPLE_RESOURCES}" ) - - if (IOS) - set_target_properties(lime-qt PROPERTIES - # Have Xcode copy and sign MoltenVK into app bundle. - XCODE_EMBED_FRAMEWORKS "${MOLTENVK_LIBRARY}" - XCODE_EMBED_FRAMEWORKS_CODE_SIGN_ON_COPY YES - XCODE_ATTRIBUTE_LD_RUNPATH_SEARCH_PATHS "@executable_path/Frameworks" - # Support iPhone and iPad. - XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1,2" - ) - endif() elseif(WIN32) # compile as a win32 gui application instead of a console application target_link_libraries(lime-qt PRIVATE Qt6::EntryPointImplementation) diff --git a/src/lime_qt/bootmanager.cpp b/src/lime_qt/bootmanager.cpp index 6fc0798c0..9e9926f33 100644 --- a/src/lime_qt/bootmanager.cpp +++ b/src/lime_qt/bootmanager.cpp @@ -1,4 +1,4 @@ -// Copyright 2014 Citra Emulator Project +// Copyright Citra Emulator Project / Lime3DS Emulator Project // Licensed under GPLv2 or any later version // Refer to the license.txt file included. @@ -392,7 +392,7 @@ static Frontend::WindowSystemType GetWindowSystemType() { else if (platform_name == QStringLiteral("wayland") || platform_name == QStringLiteral("wayland-egl")) return Frontend::WindowSystemType::Wayland; - else if (platform_name == QStringLiteral("cocoa") || platform_name == QStringLiteral("ios")) + else if (platform_name == QStringLiteral("cocoa")) return Frontend::WindowSystemType::MacOS; LOG_CRITICAL(Frontend, "Unknown Qt platform!");