Purge iOS from project codebase

This commit is contained in:
OpenSauce04 2024-07-31 12:56:21 +01:00 committed by OpenSauce
parent 8fd0fb8bf0
commit 33bc972901
7 changed files with 17 additions and 108 deletions

View file

@ -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

View file

@ -234,34 +234,6 @@ jobs:
with: with:
name: ${{ env.OS }}-${{ env.TARGET }} name: ${{ env.OS }}-${{ env.TARGET }}
path: src/android/app/artifacts/ 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: release:
permissions: permissions:
contents: write contents: write

View file

@ -32,18 +32,8 @@ if (APPLE)
set(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>") set(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
set(CMAKE_CXX_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>") set(CMAKE_CXX_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
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 # Minimum macOS 11
set(CMAKE_OSX_DEPLOYMENT_TARGET "11.0") set(CMAKE_OSX_DEPLOYMENT_TARGET "11.0")
endif()
endif() endif()
if (CMAKE_BUILD_TYPE STREQUAL Debug) if (CMAKE_BUILD_TYPE STREQUAL Debug)
@ -62,24 +52,24 @@ else()
endif() endif()
option(ENABLE_SDL2 "Enable using SDL2" ON) 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) option(USE_SYSTEM_SDL2 "Use the system SDL2 lib (instead of the bundled one)" OFF)
# Set bundled qt as dependent options. # Set bundled qt as dependent options.
option(ENABLE_QT "Enable the Qt frontend" ON) option(ENABLE_QT "Enable the Qt frontend" ON)
option(ENABLE_QT_TRANSLATION "Enable translations for the Qt frontend" OFF) 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) option(ENABLE_TESTS "Enable generating tests executable" ON)
CMAKE_DEPENDENT_OPTION(ENABLE_DEDICATED_ROOM "Enable generating dedicated room executable" ON "NOT ANDROID AND NOT IOS" OFF) 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_WEB_SERVICE "Enable web services (telemetry, etc.)" ON)
option(ENABLE_SCRIPTING "Enable RPC server for scripting" 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) 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_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) 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 (APPLE)
if (NOT IOS)
# Umbrella framework for everything GUI-related # Umbrella framework for everything GUI-related
find_library(COCOA_LIBRARY Cocoa REQUIRED) find_library(COCOA_LIBRARY Cocoa REQUIRED)
endif()
find_library(AVFOUNDATION_LIBRARY AVFoundation REQUIRED) find_library(AVFOUNDATION_LIBRARY AVFoundation REQUIRED)
find_library(IOSURFACE_LIBRARY IOSurface REQUIRED) find_library(IOSURFACE_LIBRARY IOSurface REQUIRED)
set(PLATFORM_LIBRARIES ${COCOA_LIBRARY} ${AVFOUNDATION_LIBRARY} ${IOSURFACE_LIBRARY} ${MOLTENVK_LIBRARY}) set(PLATFORM_LIBRARIES ${COCOA_LIBRARY} ${AVFOUNDATION_LIBRARY} ${IOSURFACE_LIBRARY} ${MOLTENVK_LIBRARY})
@ -445,7 +433,7 @@ endif()
# Create target for outputting distributable bundles. # Create target for outputting distributable bundles.
# Not supported for mobile platforms as distributables are built differently. # Not supported for mobile platforms as distributables are built differently.
if (NOT ANDROID AND NOT IOS) if (NOT ANDROID)
include(BundleTarget) include(BundleTarget)
if (ENABLE_SDL2_FRONTEND) if (ENABLE_SDL2_FRONTEND)
bundle_target(lime) bundle_target(lime)

View file

@ -47,16 +47,6 @@ function(determine_qt_parameters target host_out type_out arch_out arch_path_out
set(type "desktop") set(type "desktop")
set(arch "clang_64") set(arch "clang_64")
set(arch_path "macos") 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() else()
set(host "linux") set(host "linux")
set(type "desktop") set(type "desktop")
@ -170,25 +160,15 @@ function(download_qt target)
endfunction() endfunction()
function(download_moltenvk) function(download_moltenvk)
if (IOS)
set(MOLTENVK_PLATFORM "iOS")
else()
set(MOLTENVK_PLATFORM "macOS") set(MOLTENVK_PLATFORM "macOS")
endif()
set(MOLTENVK_DIR "${CMAKE_BINARY_DIR}/externals/MoltenVK") set(MOLTENVK_DIR "${CMAKE_BINARY_DIR}/externals/MoltenVK")
set(MOLTENVK_TAR "${CMAKE_BINARY_DIR}/externals/MoltenVK.tar") set(MOLTENVK_TAR "${CMAKE_BINARY_DIR}/externals/MoltenVK.tar")
if (NOT EXISTS ${MOLTENVK_DIR}) if (NOT EXISTS ${MOLTENVK_DIR})
if (NOT EXISTS ${MOLTENVK_TAR}) 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 file(DOWNLOAD https://github.com/KhronosGroup/MoltenVK/releases/download/v1.2.9/MoltenVK-all.tar
${MOLTENVK_TAR} SHOW_PROGRESS) ${MOLTENVK_TAR} SHOW_PROGRESS)
endif() endif()
endif()
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xf "${MOLTENVK_TAR}" execute_process(COMMAND ${CMAKE_COMMAND} -E tar xf "${MOLTENVK_TAR}"
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/externals") WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/externals")

View file

@ -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 // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
@ -22,13 +22,8 @@
#define LEGACY_EMU_DATA_DIR "Citra" #define LEGACY_EMU_DATA_DIR "Citra"
#elif defined(__APPLE__) #elif defined(__APPLE__)
#include <TargetConditionals.h> #include <TargetConditionals.h>
#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 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" #define LEGACY_APPLE_EMU_DATA_DIR "Library" DIR_SEP "Application Support" DIR_SEP "Citra"
#endif
// For compatibility with XDG paths. // For compatibility with XDG paths.
#define EMU_DATA_DIR "lime3ds-emu" #define EMU_DATA_DIR "lime3ds-emu"
#define LEGACY_EMU_DATA_DIR "citra-emu" #define LEGACY_EMU_DATA_DIR "citra-emu"

View file

@ -278,17 +278,6 @@ if (APPLE)
MACOSX_BUNDLE_ICON_FILE "lime.icns" MACOSX_BUNDLE_ICON_FILE "lime.icns"
RESOURCE "${APPLE_RESOURCES}" 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) elseif(WIN32)
# compile as a win32 gui application instead of a console application # compile as a win32 gui application instead of a console application
target_link_libraries(lime-qt PRIVATE Qt6::EntryPointImplementation) target_link_libraries(lime-qt PRIVATE Qt6::EntryPointImplementation)

View file

@ -1,4 +1,4 @@
// Copyright 2014 Citra Emulator Project // Copyright Citra Emulator Project / Lime3DS Emulator Project
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
@ -392,7 +392,7 @@ static Frontend::WindowSystemType GetWindowSystemType() {
else if (platform_name == QStringLiteral("wayland") || else if (platform_name == QStringLiteral("wayland") ||
platform_name == QStringLiteral("wayland-egl")) platform_name == QStringLiteral("wayland-egl"))
return Frontend::WindowSystemType::Wayland; return Frontend::WindowSystemType::Wayland;
else if (platform_name == QStringLiteral("cocoa") || platform_name == QStringLiteral("ios")) else if (platform_name == QStringLiteral("cocoa"))
return Frontend::WindowSystemType::MacOS; return Frontend::WindowSystemType::MacOS;
LOG_CRITICAL(Frontend, "Unknown Qt platform!"); LOG_CRITICAL(Frontend, "Unknown Qt platform!");