Skip to content

Commit

Permalink
Purge iOS from project codebase
Browse files Browse the repository at this point in the history
  • Loading branch information
OpenSauce04 authored and Gamer64ytb committed Aug 1, 2024
1 parent 2a54a2b commit 5fcca17
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 101 deletions.
15 changes: 0 additions & 15 deletions .ci/ios.sh

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
runs-on: ubuntu-latest
needs: [windows, linux, macos-universal, android, source]
Expand Down
34 changes: 11 additions & 23 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,8 @@ if (APPLE)
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>")

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)
Expand All @@ -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)
Expand Down Expand Up @@ -279,10 +269,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})
Expand Down Expand Up @@ -446,7 +434,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(mandarine)
Expand Down
22 changes: 4 additions & 18 deletions CMakeModules/DownloadExternals.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -105,7 +95,7 @@ function(download_qt_configuration prefix_out target host type arch arch_path ba

if (NOT EXISTS "${prefix}")
message(STATUS "Downloading Qt binaries for ${target}:${host}:${type}:${arch}:${arch_path}")
set(AQT_PREBUILD_BASE_URL "https://github.com/miurahr/aqtinstall/releases/download/v3.1.9")
set(AQT_PREBUILD_BASE_URL "https://github.com/miurahr/aqtinstall/releases/download/v3.1.16")
if (WIN32)
set(aqt_path "${base_path}/aqt.exe")
if (NOT EXISTS "${aqt_path}")
Expand Down Expand Up @@ -170,18 +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})
file(DOWNLOAD https://github.com/KhronosGroup/MoltenVK/releases/download/v1.2.7-rc2/MoltenVK-all.tar
${MOLTENVK_TAR} SHOW_PROGRESS)
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}"
Expand Down
5 changes: 0 additions & 5 deletions src/common/common_paths.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,8 @@
#define LEGACY_EMU_DATA_DIR "Citra"
#elif defined(__APPLE__)
#include <TargetConditionals.h>
#if TARGET_OS_IPHONE // TODO: Kill iOS
#define APPLE_EMU_DATA_DIR "Documents" DIR_SEP "Mandarine"
#define LEGACY_APPLE_EMU_DATA_DIR "Documents" DIR_SEP "Citra"
#else
#define APPLE_EMU_DATA_DIR "Library" DIR_SEP "Application Support" DIR_SEP "Mandarine"
#define LEGACY_APPLE_EMU_DATA_DIR "Library" DIR_SEP "Application Support" DIR_SEP "Citra"
#endif
// For compatibility with XDG paths.
#define EMU_DATA_DIR "mandarine-emu"
#define LEGACY_EMU_DATA_DIR "citra-emu"
Expand Down
11 changes: 0 additions & 11 deletions src/mandarine_qt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -274,17 +274,6 @@ if (APPLE)
MACOSX_BUNDLE_ICON_FILE "mandarine.icns"
RESOURCE "${APPLE_RESOURCES}"
)

if (IOS)
set_target_properties(mandarine-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(mandarine-qt PRIVATE Qt6::EntryPointImplementation)
Expand Down
2 changes: 1 addition & 1 deletion src/mandarine_qt/bootmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,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!");
Expand Down

0 comments on commit 5fcca17

Please sign in to comment.