diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8f863d5023..cd33422bf3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -119,8 +119,8 @@ jobs: with: name: "OpenRCT2-NT5.1" path: bin/openrct2.exe - macos: - name: macOS + macos-xcode: + name: macOS (x64) using Xcode runs-on: macos-latest needs: [check-code-formatting] steps: @@ -148,6 +148,29 @@ jobs: else echo 'Not going to push build' fi + macos-cmake: + name: macOS (x64) using CMake + runs-on: macos-latest + needs: [check-code-formatting] + steps: + - name: Checkout + uses: actions/checkout@v1 + - name: Build OpenRCT2 + run: | + brew install ninja + . scripts/setenv -q && build -DWITH_TESTS=on -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_SHARED_LIBS=on + - name: Run Tests + shell: bash + run: . scripts/setenv -q && run-tests + - name: Build artifacts + shell: bash + run: . scripts/setenv -q && build-portable artifacts/OpenRCT2-MacOS-x64-cmake.tar.gz bin/install/usr + - name: Upload artifacts (CI) + uses: actions/upload-artifact@v2-preview + with: + name: "OpenRCT2-macOS-cmake" + path: artifacts + linux-portable: name: Linux (x64, portable) runs-on: ubuntu-latest diff --git a/CMakeLists.txt b/CMakeLists.txt index 89eb58de39..abcdcd4af0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,6 +19,11 @@ if (CCache_FOUND) endif (OPENRCT2_USE_CCACHE) endif (CCache_FOUND) +if (APPLE) + set(CMAKE_OSX_ARCHITECTURES "x86_64") + set(CMAKE_OSX_DEPLOYMENT_TARGET "10.14") +endif () + project(openrct2 CXX) include(cmake/platform.cmake) @@ -36,7 +41,6 @@ set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}") -set(CMAKE_MACOSX_RPATH 1) set(TITLE_SEQUENCE_URL "https://github.com/OpenRCT2/title-sequences/releases/download/v0.1.2c/title-sequences.zip") set(TITLE_SEQUENCE_SHA1 "304d13a126c15bf2c86ff13b81a2f2cc1856ac8d") @@ -55,6 +59,7 @@ option(DOWNLOAD_TITLE_SEQUENCES "Download title sequences during installation." option(DOWNLOAD_OBJECTS "Download objects during installation." ON) CMAKE_DEPENDENT_OPTION(DOWNLOAD_REPLAYS "Download replays during installation." ON "WITH_TESTS" OFF) +option(MACOS_USE_DEPENDENCIES "Use OpenRCT2 dependencies instead of system libraries" ON) # Options option(STATIC "Create a static build.") @@ -95,6 +100,54 @@ if (APPIMAGE) set(CMAKE_INSTALL_RPATH "$ORIGIN/../lib") endif () +if (APPLE AND MACOS_USE_DEPENDENCIES) + # if we're building on macOS, then we need the dependencies + # update dylibs + set(MACOS_DYLIBS_VERSION "28") + set(MACOS_DYLIBS_ZIPFILE "openrct2-libs-v${MACOS_DYLIBS_VERSION}-x64-macos-dylibs.zip") + set(MACOS_DYLIBS_DIR "${ROOT_DIR}/lib/macos") + set(MACOS_DYLIBS_URL "https://github.com/OpenRCT2/Dependencies/releases/download/v${MACOS_DYLIBS_VERSION}/${MACOS_DYLIBS_ZIPFILE}") + + if (NOT EXISTS ${MACOS_DYLIBS_DIR}) + set(DOWNLOAD_DYLIBS 1) + else () + file(READ "${MACOS_DYLIBS_DIR}/libversion" MACOS_DYLIBS_CACHED_VERSION) + if (NOT ${MACOS_DYLIBS_CACHED_VERSION} STREQUAL ${MACOS_DYLIBS_VERSION}) + message("Cached macOS dylibs out of date") + set(DOWNLOAD_DYLIBS 1) + endif () + endif () + if (DOWNLOAD_DYLIBS) + message("Downloading macOS dylibs") + file(DOWNLOAD "${MACOS_DYLIBS_URL}" "${MACOS_DYLIBS_DIR}/${MACOS_DYLIBS_ZIPFILE}") + file(ARCHIVE_EXTRACT + INPUT "${MACOS_DYLIBS_DIR}/${MACOS_DYLIBS_ZIPFILE}" + DESTINATION "${MACOS_DYLIBS_DIR}" + ) + file(WRITE + "${MACOS_DYLIBS_DIR}/libversion" + "${MACOS_DYLIBS_VERSION}" + ) + file(REMOVE "${MACOS_DYLIBS_DIR}/${MACOS_DYLIBS_ZIPFILE}") + endif () + # TODO: make the above routine a function, use it for objects, title sequences, and languages + + set(CMAKE_MACOSX_RPATH 1) + list(APPEND CMAKE_PREFIX_PATH "${MACOS_DYLIBS_DIR}") + + # the RPATH to be used when installing, but only if it's not a system directory + list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir) + if("${isSystemDir}" STREQUAL "-1") + set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") + endif("${isSystemDir}" STREQUAL "-1") + + # if the DESTDIR env var is defined, use it in the install RPATH + if(DEFINED ENV{DESTDIR}) + get_filename_component(destdirRealPath "$ENV{DESTDIR}" REALPATH BASE_DIR "${CMAKE_BINARY_DIR}") + set(CMAKE_INSTALL_RPATH "${destdirRealPath}${CMAKE_INSTALL_PREFIX}/lib") + endif() +endif () + # LIST of supported flags, use SET_CHECK_CXX_FLAGS() to apply to target. # Use ADD_CHECK_CXX_COMPILER_FLAG() to add to list. set(SUPPORTED_CHECK_CXX_COMPILER_FLAGS "") @@ -160,9 +213,14 @@ if (NOT DISABLE_DISCORD_RPC) add_definitions(-D__ENABLE_DISCORD__) include_directories(DISCORDRPC_PROCESS_INCLUDES) endif() - endif() - - if (NOT HAVE_DISCORD_RPC AND EXISTS "${ROOT_DIR}/discord-rpc") + elseif (APPLE AND MACOS_USE_DEPENDENCIES) + find_package(discordrpc CONFIG REQUIRED) + if(${DISCORDRPC_FOUND}) + add_definitions(-D__ENABLE_DISCORD__) + set(HAVE_DISCORD_RPC TRUE) + message("Building with libdiscord-rpc.dylib") + endif() + elseif(NOT HAVE_DISCORD_RPC AND EXISTS "${ROOT_DIR}/discord-rpc") # Don't build discord's examples, some of which are in C and do not honour # the flags we set for C++. Also we don't use the provided examples. set(BUILD_EXAMPLES OFF CACHE BOOL "Build example apps") @@ -402,3 +460,10 @@ if (NOT DISABLE_GUI) endif() install(FILES "distribution/linux/openrct2-mimeinfo.xml" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/mime/packages/" RENAME "openrct2.xml") install(DIRECTORY "distribution/man/" DESTINATION "${CMAKE_INSTALL_MANDIR}/man6" FILES_MATCHING PATTERN "*.6") + +if (APPLE AND MACOS_USE_DEPENDENCIES) + # Note: dependencies may have the same names as system installed libraries + # (via homebrew). A local CMAKE_INSTALL_PREFIX is recommended to avoid issues + file(GLOB DYLIB_FILES "${MACOS_DYLIBS_DIR}/lib/*.dylib") + install(FILES ${DYLIB_FILES} DESTINATION "${CMAKE_INSTALL_LIBDIR}") +endif() diff --git a/OpenRCT2.xcodeproj/project.pbxproj b/OpenRCT2.xcodeproj/project.pbxproj index 78666ebe03..592441cae8 100644 --- a/OpenRCT2.xcodeproj/project.pbxproj +++ b/OpenRCT2.xcodeproj/project.pbxproj @@ -73,9 +73,34 @@ 4CF67197206B7E720034ADDD /* object in Resources */ = {isa = PBXBuildFile; fileRef = 4CF67196206B7E720034ADDD /* object */; }; 6341F4E12400AA0F0052902B /* Drawing.Sprite.RLE.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6341F4DF2400AA0E0052902B /* Drawing.Sprite.RLE.cpp */; }; 6341F4E22400AA0F0052902B /* Drawing.Sprite.BMP.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6341F4E02400AA0F0052902B /* Drawing.Sprite.BMP.cpp */; }; + 660BA37625AAB40F00317E9A /* libbz2.1.0.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 660BA37225AAB3F200317E9A /* libbz2.1.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 660BA37825AAB40F00317E9A /* libcrypto.1.1.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 660BA35C25AAB3F100317E9A /* libcrypto.1.1.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 660BA37A25AAB40F00317E9A /* libdiscord-rpc.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 660BA36825AAB3F200317E9A /* libdiscord-rpc.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 660BA37C25AAB40F00317E9A /* libduktape.2.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 660BA36F25AAB3F200317E9A /* libduktape.2.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 660BA37F25AAB40F00317E9A /* libfreetype.6.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 660BA35F25AAB3F100317E9A /* libfreetype.6.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 660BA38225AAB40F00317E9A /* libicudata.67.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 660BA35A25AAB3F100317E9A /* libicudata.67.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 660BA38E25AAB40F00317E9A /* libicuuc.67.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 660BA35625AAB3F100317E9A /* libicuuc.67.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 660BA39225AAB40F00317E9A /* libpng16.16.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 660BA35025AAB3F000317E9A /* libpng16.16.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 660BA39425AAB40F00317E9A /* libSDL2-2.0.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 660BA35D25AAB3F100317E9A /* libSDL2-2.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 660BA39725AAB40F00317E9A /* libspeexdsp.1.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 660BA36325AAB3F100317E9A /* libspeexdsp.1.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 660BA39925AAB40F00317E9A /* libssl.1.1.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 660BA36A25AAB3F200317E9A /* libssl.1.1.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 660BA39C25AAB40F00317E9A /* libz.1.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 660BA36625AAB3F200317E9A /* libz.1.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 660BA39F25AAB40F00317E9A /* libzip.5.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 660BA34E25AAB3F000317E9A /* libzip.5.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 660BA3AC25AAB6B200317E9A /* libbz2.1.0.6.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 660BA36025AAB3F100317E9A /* libbz2.1.0.6.dylib */; }; + 660BA3AF25AAB6B200317E9A /* libcrypto.1.1.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 660BA35C25AAB3F100317E9A /* libcrypto.1.1.dylib */; }; + 660BA3B025AAB6B200317E9A /* libdiscord-rpc.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 660BA36825AAB3F200317E9A /* libdiscord-rpc.dylib */; }; + 660BA3B325AAB6B200317E9A /* libduktape.2.4.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 660BA35425AAB3F000317E9A /* libduktape.2.4.0.dylib */; }; + 660BA3B525AAB6B200317E9A /* libfreetype.6.17.4.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 660BA35525AAB3F000317E9A /* libfreetype.6.17.4.dylib */; }; + 660BA3B925AAB6B200317E9A /* libicudata.67.1.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 660BA36E25AAB3F200317E9A /* libicudata.67.1.dylib */; }; + 660BA3C525AAB6B200317E9A /* libicuuc.67.1.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 660BA36B25AAB3F200317E9A /* libicuuc.67.1.dylib */; }; + 660BA3C625AAB6B200317E9A /* libpng16.16.37.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 660BA36925AAB3F200317E9A /* libpng16.16.37.0.dylib */; }; + 660BA3CA25AAB6B300317E9A /* libSDL2-2.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 660BA35D25AAB3F100317E9A /* libSDL2-2.0.dylib */; }; + 660BA3CC25AAB6B300317E9A /* libspeexdsp.1.2.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 660BA36425AAB3F100317E9A /* libspeexdsp.1.2.0.dylib */; }; + 660BA3CF25AAB6B300317E9A /* libssl.1.1.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 660BA36A25AAB3F200317E9A /* libssl.1.1.dylib */; }; + 660BA3D125AAB6B300317E9A /* libz.1.2.11.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 660BA37425AAB3F200317E9A /* libz.1.2.11.dylib */; }; + 660BA3D425AAB6B300317E9A /* libzip.5.3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 660BA35225AAB3F000317E9A /* libzip.5.3.dylib */; }; 662578A625803AA90002C77E /* discord_rpc.h in Headers */ = {isa = PBXBuildFile; fileRef = 662578A525803AA90002C77E /* discord_rpc.h */; }; 662578AD25803CE50002C77E /* libdiscord-rpc.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 662578A325803A6C0002C77E /* libdiscord-rpc.a */; }; - 662578AE25803D040002C77E /* libdiscord-rpc.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 662578A325803A6C0002C77E /* libdiscord-rpc.a */; settings = {ATTRIBUTES = (Required, ); }; }; 66A10EA2257F1DE100DD651A /* BalloonPressAction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 66A10EA0257F1DE000DD651A /* BalloonPressAction.cpp */; }; 66A10EA3257F1DE100DD651A /* BalloonPressAction.h in Headers */ = {isa = PBXBuildFile; fileRef = 66A10EA1257F1DE000DD651A /* BalloonPressAction.h */; }; 66A10EC0257F1DF800DD651A /* BannerPlaceAction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 66A10EA6257F1DF600DD651A /* BannerPlaceAction.cpp */; }; @@ -259,10 +284,6 @@ 933F2CB820935653001B33FD /* LocalisationService.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 933F2CB620935653001B33FD /* LocalisationService.cpp */; }; 933F2CB920935653001B33FD /* LocalisationService.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 933F2CB620935653001B33FD /* LocalisationService.cpp */; }; 933F2CBB20935668001B33FD /* LocalisationService.h in Headers */ = {isa = PBXBuildFile; fileRef = 933F2CBA20935668001B33FD /* LocalisationService.h */; }; - 933F32EA24183CBB008376CE /* libicuuc.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 933F32E824183CBB008376CE /* libicuuc.dylib */; }; - 933F32EB24183CBB008376CE /* libicuuc.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 933F32E824183CBB008376CE /* libicuuc.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; - 933F32EC24183CBB008376CE /* libicudata.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 933F32E924183CBB008376CE /* libicudata.dylib */; }; - 933F32ED24183CBB008376CE /* libicudata.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 933F32E924183CBB008376CE /* libicudata.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; 9344BEF920C1E6180047D165 /* Crypt.h in Headers */ = {isa = PBXBuildFile; fileRef = 9344BEF720C1E6180047D165 /* Crypt.h */; }; 9344BEFA20C1E6180047D165 /* Crypt.OpenSSL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9344BEF820C1E6180047D165 /* Crypt.OpenSSL.cpp */; }; 9346F9D8208A191900C77D91 /* Guest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9346F9D6208A191900C77D91 /* Guest.cpp */; }; @@ -341,8 +362,6 @@ 93FB272124ED3601008241C9 /* Cursors.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93FB272024ED3601008241C9 /* Cursors.cpp */; }; 93FC08FF2418F3ED00CA3054 /* duktape.h in Headers */ = {isa = PBXBuildFile; fileRef = 93FC08FD2418F3ED00CA3054 /* duktape.h */; }; 93FC09002418F3ED00CA3054 /* duk_config.h in Headers */ = {isa = PBXBuildFile; fileRef = 93FC08FE2418F3ED00CA3054 /* duk_config.h */; }; - 93FC09022418F3F500CA3054 /* libduktape.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 93FC09012418F3F500CA3054 /* libduktape.dylib */; }; - 93FC09032418F41700CA3054 /* libduktape.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 93FC09012418F3F500CA3054 /* libduktape.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; C61ADB1F1FB6A0A70024F2EF /* TopToolbar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C61ADB1E1FB6A0A60024F2EF /* TopToolbar.cpp */; }; C61ADB211FB7DC060024F2EF /* Scenery.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C61ADB201FB7DC060024F2EF /* Scenery.cpp */; }; C61ADB231FBBCB8B0024F2EF /* GameBottomToolbar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C61ADB221FBBCB8A0024F2EF /* GameBottomToolbar.cpp */; }; @@ -607,31 +626,19 @@ C688793420289B9B0084B384 /* WaterCoaster.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C93F1A41F8B748900A9330D /* WaterCoaster.cpp */; }; C68879A420289C060084B384 /* Platform.macOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = F7B20489201E91BF0000AD7E /* Platform.macOS.mm */; }; C68D98BC1FC6B8AB008E8378 /* TileInspector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C68D98BB1FC6B8AB008E8378 /* TileInspector.cpp */; }; - C6CB94F21EFFBF860065888F /* libfreetype.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D45A38B41CF3006400659A24 /* libfreetype.dylib */; }; C6D2BEE21F9BAA6C008B557C /* Ride.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6D2BEE11F9BAA6C008B557C /* Ride.cpp */; }; C6D2BEE61F9BAACE008B557C /* TrackList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6D2BEE31F9BAACC008B557C /* TrackList.cpp */; }; C6D2BEE71F9BAACE008B557C /* MapTooltip.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6D2BEE41F9BAACD008B557C /* MapTooltip.cpp */; }; C6D2BEE81F9BAACE008B557C /* MazeConstruction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6D2BEE51F9BAACD008B557C /* MazeConstruction.cpp */; }; C6D2BEEA1F9BB83C008B557C /* NetworkStatus.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6D2BEE91F9BB83B008B557C /* NetworkStatus.cpp */; }; C6E415511FAFD6DC00D4A52A /* RideConstruction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6E415501FAFD6DB00D4A52A /* RideConstruction.cpp */; }; - C6E96E361E0408B40076A04F /* libzip.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = C6E96E351E0408B40076A04F /* libzip.dylib */; }; - C6E96E371E040E040076A04F /* libzip.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = C6E96E351E0408B40076A04F /* libzip.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; C9C630B62235A22D009AD16E /* GameStateSnapshots.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C9C630B52235A22C009AD16E /* GameStateSnapshots.cpp */; }; D41B73EF1C2101890080A7B9 /* libcurl.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = D41B73EE1C2101890080A7B9 /* libcurl.tbd */; }; D41B741D1C210A7A0080A7B9 /* libiconv.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = D41B741C1C210A7A0080A7B9 /* libiconv.tbd */; }; D41B74731C2125E50080A7B9 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D41B74721C2125E50080A7B9 /* Assets.xcassets */; }; D43407E21D0E14CE00C2B3D4 /* shaders in Resources */ = {isa = PBXBuildFile; fileRef = D43407E11D0E14CE00C2B3D4 /* shaders */; }; - D45A38BC1CF3006400659A24 /* libcrypto.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D45A38B31CF3006400659A24 /* libcrypto.dylib */; }; - D45A38C11CF3006400659A24 /* libSDL2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D45A38B81CF3006400659A24 /* libSDL2.dylib */; }; - D45A38C21CF3006400659A24 /* libspeexdsp.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D45A38B91CF3006400659A24 /* libspeexdsp.dylib */; }; - D45A39591CF300AF00659A24 /* libcrypto.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D45A38B31CF3006400659A24 /* libcrypto.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; - D45A395A1CF300AF00659A24 /* libfreetype.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D45A38B41CF3006400659A24 /* libfreetype.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; - D45A395E1CF300AF00659A24 /* libSDL2.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D45A38B81CF3006400659A24 /* libSDL2.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; - D45A395F1CF300AF00659A24 /* libspeexdsp.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D45A38B91CF3006400659A24 /* libspeexdsp.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; D47304D51C4FF8250015C0EA /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = D47304D41C4FF8250015C0EA /* libz.tbd */; }; D48AFDB71EF78DBF0081C644 /* BenchGfxCommmands.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D48AFDB61EF78DBF0081C644 /* BenchGfxCommmands.cpp */; }; - D4A8B4B41DB41873007A2F29 /* libpng16.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D4A8B4B31DB41873007A2F29 /* libpng16.dylib */; }; - D4A8B4B51DB4188D007A2F29 /* libpng16.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D4A8B4B31DB41873007A2F29 /* libpng16.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; D4EC48E61C2637710024B507 /* g2.dat in Resources */ = {isa = PBXBuildFile; fileRef = D4EC48E31C2637710024B507 /* g2.dat */; }; D4EC48E71C2637710024B507 /* language in Resources */ = {isa = PBXBuildFile; fileRef = D4EC48E41C2637710024B507 /* language */; }; D4EC48E81C2637710024B507 /* sequence in Resources */ = {isa = PBXBuildFile; fileRef = D4EC48E51C2637710024B507 /* sequence */; }; @@ -733,18 +740,7 @@ F7D7748E1EC66FA000BE6EBC /* libiconv.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = D41B741C1C210A7A0080A7B9 /* libiconv.tbd */; }; F7D7748F1EC66FA900BE6EBC /* libcurl.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = D41B73EE1C2101890080A7B9 /* libcurl.tbd */; }; F7D774901EC66FB000BE6EBC /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = D47304D41C4FF8250015C0EA /* libz.tbd */; }; - F7D774911EC66FBA00BE6EBC /* libcrypto.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D45A38B31CF3006400659A24 /* libcrypto.dylib */; }; - F7D774921EC66FBA00BE6EBC /* libfreetype.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D45A38B41CF3006400659A24 /* libfreetype.dylib */; }; - F7D774941EC66FBA00BE6EBC /* libpng16.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D4A8B4B31DB41873007A2F29 /* libpng16.dylib */; }; - F7D774951EC66FBA00BE6EBC /* libspeexdsp.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D45A38B91CF3006400659A24 /* libspeexdsp.dylib */; }; - F7D774961EC66FBA00BE6EBC /* libzip.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = C6E96E351E0408B40076A04F /* libzip.dylib */; }; - F7D774971EC6705F00BE6EBC /* libcrypto.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D45A38B31CF3006400659A24 /* libcrypto.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; - F7D774981EC6705F00BE6EBC /* libfreetype.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D45A38B41CF3006400659A24 /* libfreetype.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; - F7D7749A1EC6705F00BE6EBC /* libpng16.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D4A8B4B31DB41873007A2F29 /* libpng16.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; - F7D7749B1EC6705F00BE6EBC /* libspeexdsp.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D45A38B91CF3006400659A24 /* libspeexdsp.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; - F7D7749C1EC6705F00BE6EBC /* libzip.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = C6E96E351E0408B40076A04F /* libzip.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; F7D7749E1EC6713200BE6EBC /* Cli.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C857D1EC4E80E00FA49E2 /* Cli.cpp */; }; - F7D774A21EC6715C00BE6EBC /* libSDL2.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D45A38B81CF3006400659A24 /* libSDL2.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; F7D774AC1EC6741D00BE6EBC /* language in CopyFiles */ = {isa = PBXBuildFile; fileRef = D4EC48E41C2637710024B507 /* language */; }; F7D774AD1EC6741D00BE6EBC /* shaders in CopyFiles */ = {isa = PBXBuildFile; fileRef = D43407E11D0E14CE00C2B3D4 /* shaders */; }; F7D774AE1EC6741D00BE6EBC /* sequence in CopyFiles */ = {isa = PBXBuildFile; fileRef = D4EC48E51C2637710024B507 /* sequence */; }; @@ -788,15 +784,19 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( - 933F32EB24183CBB008376CE /* libicuuc.dylib in Embed Frameworks */, - C6E96E371E040E040076A04F /* libzip.dylib in Embed Frameworks */, - D45A39591CF300AF00659A24 /* libcrypto.dylib in Embed Frameworks */, - 93FC09032418F41700CA3054 /* libduktape.dylib in Embed Frameworks */, - D45A395A1CF300AF00659A24 /* libfreetype.dylib in Embed Frameworks */, - D4A8B4B51DB4188D007A2F29 /* libpng16.dylib in Embed Frameworks */, - D45A395E1CF300AF00659A24 /* libSDL2.dylib in Embed Frameworks */, - 933F32ED24183CBB008376CE /* libicudata.dylib in Embed Frameworks */, - D45A395F1CF300AF00659A24 /* libspeexdsp.dylib in Embed Frameworks */, + 660BA37625AAB40F00317E9A /* libbz2.1.0.dylib in Embed Frameworks */, + 660BA37825AAB40F00317E9A /* libcrypto.1.1.dylib in Embed Frameworks */, + 660BA37A25AAB40F00317E9A /* libdiscord-rpc.dylib in Embed Frameworks */, + 660BA37C25AAB40F00317E9A /* libduktape.2.dylib in Embed Frameworks */, + 660BA37F25AAB40F00317E9A /* libfreetype.6.dylib in Embed Frameworks */, + 660BA38225AAB40F00317E9A /* libicudata.67.dylib in Embed Frameworks */, + 660BA38E25AAB40F00317E9A /* libicuuc.67.dylib in Embed Frameworks */, + 660BA39225AAB40F00317E9A /* libpng16.16.dylib in Embed Frameworks */, + 660BA39425AAB40F00317E9A /* libSDL2-2.0.dylib in Embed Frameworks */, + 660BA39725AAB40F00317E9A /* libspeexdsp.1.dylib in Embed Frameworks */, + 660BA39925AAB40F00317E9A /* libssl.1.1.dylib in Embed Frameworks */, + 660BA39C25AAB40F00317E9A /* libz.1.dylib in Embed Frameworks */, + 660BA39F25AAB40F00317E9A /* libzip.5.dylib in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -807,12 +807,6 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( - F7D774A21EC6715C00BE6EBC /* libSDL2.dylib in Embed Frameworks */, - F7D774971EC6705F00BE6EBC /* libcrypto.dylib in Embed Frameworks */, - F7D774981EC6705F00BE6EBC /* libfreetype.dylib in Embed Frameworks */, - F7D7749A1EC6705F00BE6EBC /* libpng16.dylib in Embed Frameworks */, - F7D7749B1EC6705F00BE6EBC /* libspeexdsp.dylib in Embed Frameworks */, - F7D7749C1EC6705F00BE6EBC /* libzip.dylib in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -1173,6 +1167,50 @@ 51160A24250C7A15002029F6 /* GuestPathfinding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GuestPathfinding.h; sourceTree = ""; }; 6341F4DF2400AA0E0052902B /* Drawing.Sprite.RLE.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Drawing.Sprite.RLE.cpp; sourceTree = ""; }; 6341F4E02400AA0F0052902B /* Drawing.Sprite.BMP.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Drawing.Sprite.BMP.cpp; sourceTree = ""; }; + 660BA34925AAB3F000317E9A /* libzip.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libzip.dylib; sourceTree = ""; }; + 660BA34A25AAB3F000317E9A /* libicuio.67.1.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libicuio.67.1.dylib; sourceTree = ""; }; + 660BA34B25AAB3F000317E9A /* libcrypto.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libcrypto.dylib; sourceTree = ""; }; + 660BA34C25AAB3F000317E9A /* libduktape.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libduktape.dylib; sourceTree = ""; }; + 660BA34D25AAB3F000317E9A /* libicudata.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libicudata.dylib; sourceTree = ""; }; + 660BA34E25AAB3F000317E9A /* libzip.5.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libzip.5.dylib; sourceTree = ""; }; + 660BA34F25AAB3F000317E9A /* libbz2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libbz2.dylib; sourceTree = ""; }; + 660BA35025AAB3F000317E9A /* libpng16.16.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libpng16.16.dylib; sourceTree = ""; }; + 660BA35125AAB3F000317E9A /* libicuio.67.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libicuio.67.dylib; sourceTree = ""; }; + 660BA35225AAB3F000317E9A /* libzip.5.3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libzip.5.3.dylib; sourceTree = ""; }; + 660BA35325AAB3F000317E9A /* libicutu.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libicutu.dylib; sourceTree = ""; }; + 660BA35425AAB3F000317E9A /* libduktape.2.4.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libduktape.2.4.0.dylib; sourceTree = ""; }; + 660BA35525AAB3F000317E9A /* libfreetype.6.17.4.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libfreetype.6.17.4.dylib; sourceTree = ""; }; + 660BA35625AAB3F100317E9A /* libicuuc.67.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libicuuc.67.dylib; sourceTree = ""; }; + 660BA35725AAB3F100317E9A /* libicui18n.67.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libicui18n.67.dylib; sourceTree = ""; }; + 660BA35825AAB3F100317E9A /* libfreetype.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libfreetype.dylib; sourceTree = ""; }; + 660BA35925AAB3F100317E9A /* libicui18n.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libicui18n.dylib; sourceTree = ""; }; + 660BA35A25AAB3F100317E9A /* libicudata.67.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libicudata.67.dylib; sourceTree = ""; }; + 660BA35B25AAB3F100317E9A /* libicutu.67.1.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libicutu.67.1.dylib; sourceTree = ""; }; + 660BA35C25AAB3F100317E9A /* libcrypto.1.1.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libcrypto.1.1.dylib; sourceTree = ""; }; + 660BA35D25AAB3F100317E9A /* libSDL2-2.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = "libSDL2-2.0.dylib"; sourceTree = ""; }; + 660BA35E25AAB3F100317E9A /* libSDL2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libSDL2.dylib; sourceTree = ""; }; + 660BA35F25AAB3F100317E9A /* libfreetype.6.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libfreetype.6.dylib; sourceTree = ""; }; + 660BA36025AAB3F100317E9A /* libbz2.1.0.6.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libbz2.1.0.6.dylib; sourceTree = ""; }; + 660BA36125AAB3F100317E9A /* libicuuc.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libicuuc.dylib; sourceTree = ""; }; + 660BA36225AAB3F100317E9A /* libicuio.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libicuio.dylib; sourceTree = ""; }; + 660BA36325AAB3F100317E9A /* libspeexdsp.1.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libspeexdsp.1.dylib; sourceTree = ""; }; + 660BA36425AAB3F100317E9A /* libspeexdsp.1.2.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libspeexdsp.1.2.0.dylib; sourceTree = ""; }; + 660BA36525AAB3F100317E9A /* libpng.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libpng.dylib; sourceTree = ""; }; + 660BA36625AAB3F200317E9A /* libz.1.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libz.1.dylib; sourceTree = ""; }; + 660BA36725AAB3F200317E9A /* libspeexdsp.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libspeexdsp.dylib; sourceTree = ""; }; + 660BA36825AAB3F200317E9A /* libdiscord-rpc.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = "libdiscord-rpc.dylib"; sourceTree = ""; }; + 660BA36925AAB3F200317E9A /* libpng16.16.37.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libpng16.16.37.0.dylib; sourceTree = ""; }; + 660BA36A25AAB3F200317E9A /* libssl.1.1.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libssl.1.1.dylib; sourceTree = ""; }; + 660BA36B25AAB3F200317E9A /* libicuuc.67.1.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libicuuc.67.1.dylib; sourceTree = ""; }; + 660BA36C25AAB3F200317E9A /* libicui18n.67.1.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libicui18n.67.1.dylib; sourceTree = ""; }; + 660BA36D25AAB3F200317E9A /* libssl.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libssl.dylib; sourceTree = ""; }; + 660BA36E25AAB3F200317E9A /* libicudata.67.1.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libicudata.67.1.dylib; sourceTree = ""; }; + 660BA36F25AAB3F200317E9A /* libduktape.2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libduktape.2.dylib; sourceTree = ""; }; + 660BA37025AAB3F200317E9A /* libicutu.67.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libicutu.67.dylib; sourceTree = ""; }; + 660BA37125AAB3F200317E9A /* libpng16.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libpng16.dylib; sourceTree = ""; }; + 660BA37225AAB3F200317E9A /* libbz2.1.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libbz2.1.0.dylib; sourceTree = ""; }; + 660BA37325AAB3F200317E9A /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libz.dylib; sourceTree = ""; }; + 660BA37425AAB3F200317E9A /* libz.1.2.11.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libz.1.2.11.dylib; sourceTree = ""; }; 662578A325803A6C0002C77E /* libdiscord-rpc.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libdiscord-rpc.a"; path = "discord-rpc/build/src/libdiscord-rpc.a"; sourceTree = ""; }; 662578A525803AA90002C77E /* discord_rpc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = discord_rpc.h; path = "discord-rpc/include/discord_rpc.h"; sourceTree = ""; }; 66A10EA0257F1DE000DD651A /* BalloonPressAction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BalloonPressAction.cpp; sourceTree = ""; }; @@ -1355,8 +1393,6 @@ 933CBDBE20CB1BCA00134678 /* Window.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Window.cpp; sourceTree = ""; }; 933F2CB620935653001B33FD /* LocalisationService.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LocalisationService.cpp; sourceTree = ""; }; 933F2CBA20935668001B33FD /* LocalisationService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocalisationService.h; sourceTree = ""; }; - 933F32E824183CBB008376CE /* libicuuc.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libicuuc.dylib; sourceTree = ""; }; - 933F32E924183CBB008376CE /* libicudata.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libicudata.dylib; sourceTree = ""; }; 9344BEF720C1E6180047D165 /* Crypt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Crypt.h; sourceTree = ""; }; 9344BEF820C1E6180047D165 /* Crypt.OpenSSL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Crypt.OpenSSL.cpp; sourceTree = ""; }; 9346F9D6208A191900C77D91 /* Guest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Guest.cpp; sourceTree = ""; }; @@ -1656,7 +1692,6 @@ 93FB272024ED3601008241C9 /* Cursors.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Cursors.cpp; sourceTree = ""; }; 93FC08FD2418F3ED00CA3054 /* duktape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = duktape.h; sourceTree = ""; }; 93FC08FE2418F3ED00CA3054 /* duk_config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = duk_config.h; sourceTree = ""; }; - 93FC09012418F3F500CA3054 /* libduktape.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libduktape.dylib; sourceTree = ""; }; C61ADB1E1FB6A0A60024F2EF /* TopToolbar.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TopToolbar.cpp; sourceTree = ""; }; C61ADB201FB7DC060024F2EF /* Scenery.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Scenery.cpp; sourceTree = ""; }; C61ADB221FBBCB8A0024F2EF /* GameBottomToolbar.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GameBottomToolbar.cpp; sourceTree = ""; }; @@ -1753,7 +1788,6 @@ C6E415501FAFD6DB00D4A52A /* RideConstruction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RideConstruction.cpp; sourceTree = ""; }; C6E96E331E0408A80076A04F /* zip.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = zip.h; sourceTree = ""; }; C6E96E341E0408A80076A04F /* zipconf.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = zipconf.h; sourceTree = ""; }; - C6E96E351E0408B40076A04F /* libzip.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libzip.dylib; sourceTree = ""; }; C9C630B42235A22C009AD16E /* GameStateSnapshots.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GameStateSnapshots.h; sourceTree = ""; }; C9C630B52235A22C009AD16E /* GameStateSnapshots.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GameStateSnapshots.cpp; sourceTree = ""; }; D41B73EE1C2101890080A7B9 /* libcurl.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libcurl.tbd; path = usr/lib/libcurl.tbd; sourceTree = SDKROOT; }; @@ -1761,10 +1795,6 @@ D41B74721C2125E50080A7B9 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = distribution/macos/Assets.xcassets; sourceTree = SOURCE_ROOT; }; D43407E11D0E14CE00C2B3D4 /* shaders */ = {isa = PBXFileReference; lastKnownFileType = folder; name = shaders; path = data/shaders; sourceTree = SOURCE_ROOT; }; D43BAB921F8C2B2B00A9E362 /* OpenGLAPIProc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OpenGLAPIProc.h; sourceTree = ""; }; - D45A38B31CF3006400659A24 /* libcrypto.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libcrypto.dylib; sourceTree = ""; }; - D45A38B41CF3006400659A24 /* libfreetype.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libfreetype.dylib; sourceTree = ""; }; - D45A38B81CF3006400659A24 /* libSDL2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libSDL2.dylib; sourceTree = ""; }; - D45A38B91CF3006400659A24 /* libspeexdsp.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libspeexdsp.dylib; sourceTree = ""; }; D45A38C71CF3007A00659A24 /* png.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = png.h; sourceTree = ""; }; D45A38C81CF3007A00659A24 /* pngconf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pngconf.h; sourceTree = ""; }; D45A38C91CF3007A00659A24 /* pnglibconf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pnglibconf.h; sourceTree = ""; }; @@ -1915,7 +1945,6 @@ D4974F1A1FA04A1900F7FD7F /* TransparencyDepth.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TransparencyDepth.cpp; sourceTree = ""; }; D4974F1B1FA04A1900F7FD7F /* TransparencyDepth.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TransparencyDepth.h; sourceTree = ""; }; D497D0781C20FD52002BF46A /* OpenRCT2.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = OpenRCT2.app; sourceTree = BUILT_PRODUCTS_DIR; }; - D4A8B4B31DB41873007A2F29 /* libpng16.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libpng16.dylib; sourceTree = ""; }; D4EC48E31C2637710024B507 /* g2.dat */ = {isa = PBXFileReference; lastKnownFileType = file; name = g2.dat; path = data/g2.dat; sourceTree = SOURCE_ROOT; }; D4EC48E41C2637710024B507 /* language */ = {isa = PBXFileReference; lastKnownFileType = folder; name = language; path = data/language; sourceTree = SOURCE_ROOT; }; D4EC48E51C2637710024B507 /* sequence */ = {isa = PBXFileReference; lastKnownFileType = folder; name = sequence; path = data/sequence; sourceTree = SOURCE_ROOT; }; @@ -2148,22 +2177,25 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 660BA3AC25AAB6B200317E9A /* libbz2.1.0.6.dylib in Frameworks */, + 660BA3AF25AAB6B200317E9A /* libcrypto.1.1.dylib in Frameworks */, + 660BA3B025AAB6B200317E9A /* libdiscord-rpc.dylib in Frameworks */, + 660BA3B325AAB6B200317E9A /* libduktape.2.4.0.dylib in Frameworks */, + 660BA3B525AAB6B200317E9A /* libfreetype.6.17.4.dylib in Frameworks */, + 660BA3B925AAB6B200317E9A /* libicudata.67.1.dylib in Frameworks */, + 660BA3C525AAB6B200317E9A /* libicuuc.67.1.dylib in Frameworks */, + 660BA3C625AAB6B200317E9A /* libpng16.16.37.0.dylib in Frameworks */, + 660BA3CA25AAB6B300317E9A /* libSDL2-2.0.dylib in Frameworks */, + 660BA3CC25AAB6B300317E9A /* libspeexdsp.1.2.0.dylib in Frameworks */, + 660BA3CF25AAB6B300317E9A /* libssl.1.1.dylib in Frameworks */, + 660BA3D125AAB6B300317E9A /* libz.1.2.11.dylib in Frameworks */, + 660BA3D425AAB6B300317E9A /* libzip.5.3.dylib in Frameworks */, C6887847202897B70084B384 /* Cocoa.framework in Frameworks */, C6887846202897B30084B384 /* Foundation.framework in Frameworks */, F76C88921EC539A300FA49E2 /* libopenrct2.a in Frameworks */, D47304D51C4FF8250015C0EA /* libz.tbd in Frameworks */, D41B73EF1C2101890080A7B9 /* libcurl.tbd in Frameworks */, D41B741D1C210A7A0080A7B9 /* libiconv.tbd in Frameworks */, - D45A38BC1CF3006400659A24 /* libcrypto.dylib in Frameworks */, - 93FC09022418F3F500CA3054 /* libduktape.dylib in Frameworks */, - 933F32EC24183CBB008376CE /* libicudata.dylib in Frameworks */, - 933F32EA24183CBB008376CE /* libicuuc.dylib in Frameworks */, - D4A8B4B41DB41873007A2F29 /* libpng16.dylib in Frameworks */, - D45A38C11CF3006400659A24 /* libSDL2.dylib in Frameworks */, - C6CB94F21EFFBF860065888F /* libfreetype.dylib in Frameworks */, - D45A38C21CF3006400659A24 /* libspeexdsp.dylib in Frameworks */, - C6E96E361E0408B40076A04F /* libzip.dylib in Frameworks */, - 662578AE25803D040002C77E /* libdiscord-rpc.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2178,11 +2210,6 @@ F7D774901EC66FB000BE6EBC /* libz.tbd in Frameworks */, F7D7748F1EC66FA900BE6EBC /* libcurl.tbd in Frameworks */, F7D7748E1EC66FA000BE6EBC /* libiconv.tbd in Frameworks */, - F7D774911EC66FBA00BE6EBC /* libcrypto.dylib in Frameworks */, - F7D774921EC66FBA00BE6EBC /* libfreetype.dylib in Frameworks */, - F7D774941EC66FBA00BE6EBC /* libpng16.dylib in Frameworks */, - F7D774951EC66FBA00BE6EBC /* libspeexdsp.dylib in Frameworks */, - F7D774961EC66FBA00BE6EBC /* libzip.dylib in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3012,15 +3039,50 @@ D4EC48C31C2634870024B507 /* lib */ = { isa = PBXGroup; children = ( - D45A38B31CF3006400659A24 /* libcrypto.dylib */, - 93FC09012418F3F500CA3054 /* libduktape.dylib */, - D45A38B41CF3006400659A24 /* libfreetype.dylib */, - 933F32E924183CBB008376CE /* libicudata.dylib */, - 933F32E824183CBB008376CE /* libicuuc.dylib */, - D4A8B4B31DB41873007A2F29 /* libpng16.dylib */, - D45A38B81CF3006400659A24 /* libSDL2.dylib */, - D45A38B91CF3006400659A24 /* libspeexdsp.dylib */, - C6E96E351E0408B40076A04F /* libzip.dylib */, + 660BA36025AAB3F100317E9A /* libbz2.1.0.6.dylib */, + 660BA37225AAB3F200317E9A /* libbz2.1.0.dylib */, + 660BA34F25AAB3F000317E9A /* libbz2.dylib */, + 660BA35C25AAB3F100317E9A /* libcrypto.1.1.dylib */, + 660BA34B25AAB3F000317E9A /* libcrypto.dylib */, + 660BA36825AAB3F200317E9A /* libdiscord-rpc.dylib */, + 660BA35425AAB3F000317E9A /* libduktape.2.4.0.dylib */, + 660BA36F25AAB3F200317E9A /* libduktape.2.dylib */, + 660BA34C25AAB3F000317E9A /* libduktape.dylib */, + 660BA35525AAB3F000317E9A /* libfreetype.6.17.4.dylib */, + 660BA35F25AAB3F100317E9A /* libfreetype.6.dylib */, + 660BA35825AAB3F100317E9A /* libfreetype.dylib */, + 660BA36E25AAB3F200317E9A /* libicudata.67.1.dylib */, + 660BA35A25AAB3F100317E9A /* libicudata.67.dylib */, + 660BA34D25AAB3F000317E9A /* libicudata.dylib */, + 660BA36C25AAB3F200317E9A /* libicui18n.67.1.dylib */, + 660BA35725AAB3F100317E9A /* libicui18n.67.dylib */, + 660BA35925AAB3F100317E9A /* libicui18n.dylib */, + 660BA34A25AAB3F000317E9A /* libicuio.67.1.dylib */, + 660BA35125AAB3F000317E9A /* libicuio.67.dylib */, + 660BA36225AAB3F100317E9A /* libicuio.dylib */, + 660BA35B25AAB3F100317E9A /* libicutu.67.1.dylib */, + 660BA37025AAB3F200317E9A /* libicutu.67.dylib */, + 660BA35325AAB3F000317E9A /* libicutu.dylib */, + 660BA36B25AAB3F200317E9A /* libicuuc.67.1.dylib */, + 660BA35625AAB3F100317E9A /* libicuuc.67.dylib */, + 660BA36125AAB3F100317E9A /* libicuuc.dylib */, + 660BA36525AAB3F100317E9A /* libpng.dylib */, + 660BA36925AAB3F200317E9A /* libpng16.16.37.0.dylib */, + 660BA35025AAB3F000317E9A /* libpng16.16.dylib */, + 660BA37125AAB3F200317E9A /* libpng16.dylib */, + 660BA35D25AAB3F100317E9A /* libSDL2-2.0.dylib */, + 660BA35E25AAB3F100317E9A /* libSDL2.dylib */, + 660BA36425AAB3F100317E9A /* libspeexdsp.1.2.0.dylib */, + 660BA36325AAB3F100317E9A /* libspeexdsp.1.dylib */, + 660BA36725AAB3F200317E9A /* libspeexdsp.dylib */, + 660BA36A25AAB3F200317E9A /* libssl.1.1.dylib */, + 660BA36D25AAB3F200317E9A /* libssl.dylib */, + 660BA37425AAB3F200317E9A /* libz.1.2.11.dylib */, + 660BA36625AAB3F200317E9A /* libz.1.dylib */, + 660BA37325AAB3F200317E9A /* libz.dylib */, + 660BA35225AAB3F000317E9A /* libzip.5.3.dylib */, + 660BA34E25AAB3F000317E9A /* libzip.5.dylib */, + 660BA34925AAB3F000317E9A /* libzip.dylib */, ); path = lib; sourceTree = ""; @@ -4211,7 +4273,6 @@ buildConfigurationList = F76C809D1EC4D9FA00FA49E2 /* Build configuration list for PBXNativeTarget "libopenrct2" */; buildPhases = ( F76C809F1EC4DB0300FA49E2 /* Get Git Variables */, - 66257898258032500002C77E /* Get discord-rpc */, F76C80961EC4D9FA00FA49E2 /* Sources */, F76C88381EC4EB5900FA49E2 /* Resources */, F76C80981EC4D9FA00FA49E2 /* Headers */, @@ -4338,24 +4399,6 @@ shellPath = /bin/sh; shellScript = "version=\"1.0.20\"\nzipname=\"objects.zip\"\nliburl=\"https://github.com/OpenRCT2/objects/releases/download/v$version/$zipname\"\n\n[[ ! -d \"${SRCROOT}/data/object\" || ! -e \"${SRCROOT}/objectsversion\" || $(head -n 1 \"${SRCROOT}/objectsversion\") != $version ]]\noutdated=$?\n\nif [[ $outdated -eq 0 ]]; then\nif [[ -d \"${SRCROOT}/data/object\" ]]; then rm -r \"${SRCROOT}/data/object\"; fi\nmkdir -p \"${SRCROOT}/data/object\"\n\ncurl -L -o \"${SRCROOT}/data/object/$zipname\" \"$liburl\"\nunzip -uaq -d \"${SRCROOT}/data/object\" \"${SRCROOT}/data/object/$zipname\"\nrm \"${SRCROOT}/data/object/$zipname\"\n\necho $version > \"${SRCROOT}/objectsversion\"\nfi\n"; }; - 66257898258032500002C77E /* Get discord-rpc */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - ); - name = "Get discord-rpc"; - outputFileListPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "if [[ ! -d \"${SRCROOT}/discord-rpc\" ]]; then\n . ${SRCROOT}/scripts/get-discord-rpc\nfi\n\nif [[ -d \"${SRCROOT}/discord-rpc\" ]]; then\n cd ${SRCROOT}/discord-rpc\n mkdir build\n cd build\n cmake ..\n cmake --build . --config Release\nfi\n"; - }; C68B2D471EC790710020651C /* Download Libraries */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -4368,7 +4411,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "version=\"26\"\nzipname=\"openrct2-libs-v26-x64-macos-dylibs.zip\"\nliburl=\"https://github.com/OpenRCT2/Dependencies/releases/download/v$version/$zipname\"\n\n[[ ! -d \"${SRCROOT}/libxc\" || ! -e \"${SRCROOT}/libversion\" || $(head -n 1 \"${SRCROOT}/libversion\") != $version ]]\noutdated=$?\n\nif [[ $outdated -eq 0 ]]; then\nif [[ -d \"${SRCROOT}/libxc\" ]]; then rm -r \"${SRCROOT}/libxc\"; fi\nmkdir \"${SRCROOT}/libxc\"\n\ncurl -L -o \"${SRCROOT}/libxc/$zipname\" \"$liburl\"\nunzip -uaq -d \"${SRCROOT}/libxc\" \"${SRCROOT}/libxc/$zipname\"\nrm \"${SRCROOT}/libxc/$zipname\"\n\necho $version > \"${SRCROOT}/libversion\"\nfi\n"; + shellScript = "version=\"28\"\nzipname=\"openrct2-libs-v28-x64-macos-dylibs.zip\"\nliburl=\"https://github.com/OpenRCT2/Dependencies/releases/download/v$version/$zipname\"\n\n[[ ! -d \"${SRCROOT}/libxc\" || ! -e \"${SRCROOT}/libversion\" || $(head -n 1 \"${SRCROOT}/libversion\") != $version ]]\noutdated=$?\n\nif [[ $outdated -eq 0 ]]; then\nif [[ -d \"${SRCROOT}/libxc\" ]]; then rm -r \"${SRCROOT}/libxc\"; fi\nmkdir \"${SRCROOT}/libxc\"\n\ncurl -L -o \"${SRCROOT}/libxc/$zipname\" \"$liburl\"\nunzip -uaq -d \"${SRCROOT}/libxc\" \"${SRCROOT}/libxc/$zipname\"\nrm \"${SRCROOT}/libxc/$zipname\"\n\necho $version > \"${SRCROOT}/libversion\"\nfi\n"; }; D42C09D21C254F4E00309751 /* Build g2.dat */ = { isa = PBXShellScriptBuildPhase; diff --git a/cmake/discordrpcConfig.cmake b/cmake/discordrpcConfig.cmake new file mode 100644 index 0000000000..ee98098dd2 --- /dev/null +++ b/cmake/discordrpcConfig.cmake @@ -0,0 +1,34 @@ +# This file is modified from duktapeConfig.cmake + +# - Try to find discordrpc +# Once done this will define +# +# DISCORDRPC_FOUND - system has discordrpc +# DISCORDRPC_INCLUDE_DIRS - the discordrpc include directory +# DISCORDRPC_LIBRARIES - Link these to use discordrpc +# DISCORDRPC_DEFINITIONS - Compiler switches required for using discordrpc +# + +PKG_CHECK_MODULES(PC_DISCORD_RPC QUIET discord-rpc libdiscord-rpc) + +find_path(DISCORDRPC_INCLUDE_DIR discord_rpc.h + HINTS ${PC_DISCORD_RPC_INCLUDEDIR} ${PC_DISCORD_RPC_INCLUDE_DIRS} + PATH_SUFFIXES discord-rpc) + +find_library(DISCORDRPC_LIBRARY + NAMES discord-rpc libdiscord-rpc + HINTS ${PC_DISCORD_RPC_LIBDIR} ${PC_DISCORD_RPC_LIBRARY_DIRS}) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(discordrpc + REQUIRED_VARS DISCORDRPC_LIBRARY DISCORDRPC_INCLUDE_DIR) + +if (DISCORDRPC_FOUND) + set (DISCORDRPC_LIBRARIES ${DISCORDRPC_LIBRARY}) + set (DISCORDRPC_INCLUDE_DIRS ${DISCORDRPC_INCLUDE_DIR} ) +endif () + +MARK_AS_ADVANCED( + DISCORDRPC_INCLUDE_DIR + DISCORDRPC_LIBRARY +) diff --git a/readme.md b/readme.md index 2d37954767..5b07bd2633 100644 --- a/readme.md +++ b/readme.md @@ -147,12 +147,7 @@ msbuild openrct2.proj /t:PublishPortable The recommended way of building OpenRCT2 for macOS is with Xcode. The Xcode build will create a self-contained application bundles which include all the necessary game files and dependencies. Open the project file OpenRCT2.xcodeproj in Xcode and build from there. Building this way will handle the dependencies for you automatically. You can also invoke an Xcode build from the command line using `xcodebuild`. #### CMake: -A command line version of OpenRCT2 can be built using CMake. This type of build requires you to provide the dependencies yourself. The supported method of doing this is with [Homebrew](https://brew.sh). Once you have Homebrew installed, you can download all the required libraries with this command: -``` -brew install cmake duktape freetype icu4c libpng libzip nlohmann-json openssl pkg-config sdl2 speexdsp -``` - -Once you have the dependencies installed, you can build the project using CMake using the following commands: +A command line version of OpenRCT2 can be built using CMake. CMake will retrieve the dependences from [Dependencies](https://github.com/OpenRCT2/Dependencies/) automatically. You can build the project using CMake using the following commands: ``` mkdir build cd build diff --git a/scripts/build b/scripts/build index 1880799218..160d7c331b 100755 --- a/scripts/build +++ b/scripts/build @@ -2,7 +2,11 @@ set -e # Ensure we are in root directory -basedir="$(readlink -f `dirname $0`/..)" +if [[ $(uname) == "Darwin" ]]; then + basedir="$(perl -MCwd=abs_path -le 'print abs_path readlink(shift);' `dirname $0`/..)" +else + basedir="$(readlink -f `dirname $0`/..)" +fi cd $basedir if [[ "$OSTYPE" == "cygwin" || "$OSTYPE" == "msys" ]]; then @@ -30,8 +34,10 @@ else mkdir -p bin && cd bin export DESTDIR=install cmake .. -G Ninja -DCMAKE_INSTALL_PREFIX=/usr "$@" + if [[ "$TESTPAINT" == "true" ]]; then testpaint_target=testpaint fi + ninja -k0 $testpaint_target all install fi diff --git a/scripts/run-tests b/scripts/run-tests index 1930912053..a5cc969a77 100755 --- a/scripts/run-tests +++ b/scripts/run-tests @@ -2,7 +2,11 @@ set -e # Ensure we are in root directory -basedir="$(readlink -f `dirname $0`/..)" +if [[ $(uname) == "Darwin" ]]; then + basedir="$(perl -MCwd=abs_path -le 'print abs_path readlink(shift);' `dirname $0`/..)" +else + basedir="$(readlink -f `dirname $0`/..)" +fi cd $basedir/bin # Scan objects first so that does not happen within a test diff --git a/src/openrct2-ui/CMakeLists.txt b/src/openrct2-ui/CMakeLists.txt index 89b621bc64..49b8bc55fd 100644 --- a/src/openrct2-ui/CMakeLists.txt +++ b/src/openrct2-ui/CMakeLists.txt @@ -12,8 +12,8 @@ if (MSVC) find_package(SDL2 REQUIRED) find_library(SPEEX_LDFLAGS libspeexdsp) else () - PKG_CHECK_MODULES(SDL2 REQUIRED sdl2) - PKG_CHECK_MODULES(SPEEX REQUIRED speexdsp) + PKG_CHECK_MODULES(SDL2 REQUIRED IMPORTED_TARGET sdl2) + PKG_CHECK_MODULES(SPEEX REQUIRED IMPORTED_TARGET speexdsp) endif () if (NOT DISABLE_OPENGL) @@ -43,9 +43,16 @@ add_executable(${PROJECT_NAME} ${OPENRCT2_UI_SOURCES} ${OPENRCT2_UI_MM_SOURCES}) SET_CHECK_CXX_FLAGS(${PROJECT_NAME}) ipo_set_target_properties(${PROJECT_NAME}) -target_link_libraries(${PROJECT_NAME} "libopenrct2" - ${SDL2_LDFLAGS} - ${SPEEX_LDFLAGS}) +# mingw builds cannot use the PkgConfig imported targets +if (NOT MSVC AND NOT WIN32) + target_link_libraries(${PROJECT_NAME} "libopenrct2" + PkgConfig::SDL2 + PkgConfig::SPEEX) +else () + target_link_libraries(${PROJECT_NAME} "libopenrct2" + ${SDL2_LDFLAGS} + ${SPEEX_LDFLAGS}) +endif () target_link_platform_libraries(${PROJECT_NAME}) if (NOT DISABLE_OPENGL) diff --git a/src/openrct2/CMakeLists.txt b/src/openrct2/CMakeLists.txt index 9dc8650d9c..a17e5f6252 100644 --- a/src/openrct2/CMakeLists.txt +++ b/src/openrct2/CMakeLists.txt @@ -19,6 +19,9 @@ if (APPLE) endif () add_library(${PROJECT_NAME} ${OPENRCT2_CORE_SOURCES} ${OPENRCT2_CORE_MM_SOURCES}) +if (APPLE) + target_link_platform_libraries(${PROJECT_NAME}) +endif () set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "") SET_CHECK_CXX_FLAGS(${PROJECT_NAME}) @@ -34,10 +37,11 @@ if (NOT DISABLE_NETWORK OR NOT DISABLE_HTTP) target_link_libraries(${PROJECT_NAME} bcrypt) else () if (APPLE) - # Needed for linking with non-broken OpenSSL on Apple platforms - set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/opt/openssl/lib/pkgconfig") + if (NOT MACOS_USE_DEPENDENCIES) + # Needed for linking with non-broken OpenSSL on Apple platforms + set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/opt/openssl/lib/pkgconfig") + endif () endif () - find_package(OpenSSL 1.0.0 REQUIRED) target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC ${OPENSSL_INCLUDE_DIR}) @@ -78,7 +82,7 @@ if (NOT DISABLE_TTF) if (MSVC) find_package(freetype REQUIRED) else () - PKG_CHECK_MODULES(FREETYPE REQUIRED freetype2) + PKG_CHECK_MODULES(FREETYPE REQUIRED IMPORTED_TARGET freetype2) endif () target_include_directories(${PROJECT_NAME} SYSTEM PRIVATE ${FREETYPE_INCLUDE_DIRS}) @@ -118,16 +122,16 @@ if (MSVC) find_path(LIBZIP_INCLUDE_DIRS zip.h) find_library(LIBZIP_LIBRARIES zip) else () - PKG_CHECK_MODULES(LIBZIP REQUIRED libzip>=1.0) - PKG_CHECK_MODULES(ZLIB REQUIRED zlib) + PKG_CHECK_MODULES(LIBZIP REQUIRED IMPORTED_TARGET libzip>=1.0) + PKG_CHECK_MODULES(ZLIB REQUIRED IMPORTED_TARGET zlib) - PKG_CHECK_MODULES(PNG libpng>=1.6) + PKG_CHECK_MODULES(PNG IMPORTED_TARGET libpng>=1.6) if (NOT PNG_FOUND) - PKG_CHECK_MODULES(PNG libpng16) + PKG_CHECK_MODULES(PNG IMPORTED_TARGET libpng16) if (NOT PNG_FOUND) - PKG_CHECK_MODULES(PNG libpng>=1.2) + PKG_CHECK_MODULES(PNG IMPORTED_TARGET libpng>=1.2) if (NOT PNG_FOUND) - PKG_CHECK_MODULES(PNG REQUIRED libpng12) + PKG_CHECK_MODULES(PNG REQUIRED IMPORTED_TARGET libpng12) endif () endif () endif () @@ -139,10 +143,17 @@ if (STATIC) ${ZLIB_STATIC_LIBRARIES} ${LIBZIP_STATIC_LIBRARIES}) else () - target_link_libraries(${PROJECT_NAME} + if (NOT MSVC) + target_link_libraries(${PROJECT_NAME} + PkgConfig::PNG + PkgConfig::ZLIB + PkgConfig::LIBZIP) + else () + target_link_libraries(${PROJECT_NAME} ${PNG_LIBRARIES} ${ZLIB_LIBRARIES} ${LIBZIP_LIBRARIES}) + endif () endif () if (MINGW) @@ -182,7 +193,11 @@ if (NOT DISABLE_TTF) target_link_libraries(${PROJECT_NAME} ${FONTCONFIG_STATIC_LIBRARIES}) endif () else () - target_link_libraries(${PROJECT_NAME} ${FREETYPE_LIBRARIES}) + if (NOT MSVC) + target_link_libraries(${PROJECT_NAME} PkgConfig::FREETYPE) + else () + target_link_libraries(${PROJECT_NAME} ${FREETYPE_LIBRARIES}) + endif () if (UNIX AND NOT APPLE) target_link_libraries(${PROJECT_NAME} ${FONTCONFIG_LIBRARIES}) diff --git a/src/openrct2/platform/Platform.macOS.mm b/src/openrct2/platform/Platform.macOS.mm index 74aa0b7574..fc19d67fe6 100644 --- a/src/openrct2/platform/Platform.macOS.mm +++ b/src/openrct2/platform/Platform.macOS.mm @@ -49,10 +49,17 @@ namespace Platform NSBundle* bundle = [NSBundle mainBundle]; if (bundle) { - auto resources = bundle.resourcePath.UTF8String; - if (Path::DirectoryExists(resources)) + // This method may return a valid bundle object even for unbundled apps. + // See https://developer.apple.com/documentation/foundation/nsbundle/1410786-mainbundle?language=objc + // Therefore, double check this is a valid bundle (has an ID string) + auto bundleId = bundle.bundleIdentifier.UTF8String; + if (bundleId) { - return resources; + auto resources = bundle.resourcePath.UTF8String; + if (Path::DirectoryExists(resources)) + { + return resources; + } } } return std::string(); @@ -70,23 +77,36 @@ namespace Platform if (!path.empty()) { path = Path::GetAbsolute(path); + return path; } else { - auto exePath = GetCurrentExecutablePath(); - auto exeDirectory = Path::GetDirectory(exePath); - path = Path::Combine(exeDirectory, "data"); - NSString* nsPath = [NSString stringWithUTF8String:path.c_str()]; - if (![[NSFileManager defaultManager] fileExistsAtPath:nsPath]) + // check if this is an app bundle + path = GetBundlePath(); + if (!path.empty()) { - path = GetBundlePath(); - if (path.empty()) - { - path = "/"; + return path; + } + else + { + // this is not in an app bundle + auto exePath = GetCurrentExecutablePath(); + auto exeDirectory = Path::GetDirectory(exePath); + + // check build and install paths + NSArray *dataSearchLocations = @[@"data", @"../share/openrct2"]; + + for (NSString *searchLocation in dataSearchLocations) { + path = Path::Combine(exeDirectory, [searchLocation UTF8String]); + NSString* nsPath = [NSString stringWithUTF8String:path.c_str()]; + if ([[NSFileManager defaultManager] fileExistsAtPath:nsPath]) + { + return path; + } } } } - return path; + return "/"; } std::string GetCurrentExecutablePath()