diff options
Diffstat (limited to 'platform/osx')
-rw-r--r-- | platform/osx/app/mapboxgl-app.gypi | 77 | ||||
-rw-r--r-- | platform/osx/bitrise.yml | 12 | ||||
-rw-r--r-- | platform/osx/platform.gyp | 328 | ||||
-rw-r--r-- | platform/osx/scripts/configure.sh | 2 | ||||
-rw-r--r-- | platform/osx/scripts/defaults.mk | 5 | ||||
-rwxr-xr-x | platform/osx/scripts/install.sh | 7 | ||||
-rw-r--r-- | platform/osx/scripts/osxsdk.xcscheme | 99 | ||||
-rw-r--r-- | platform/osx/scripts/osxtest.xcscheme | 56 | ||||
-rwxr-xr-x | platform/osx/scripts/package.sh | 56 | ||||
-rwxr-xr-x | platform/osx/scripts/run.sh | 21 | ||||
-rwxr-xr-x | platform/osx/scripts/setup.sh | 8 | ||||
-rwxr-xr-x | platform/osx/scripts/test.sh | 19 | ||||
-rw-r--r-- | platform/osx/sdk/framework-osx.gypi | 68 | ||||
-rw-r--r-- | platform/osx/test/osxtest.gypi | 84 |
14 files changed, 389 insertions, 453 deletions
diff --git a/platform/osx/app/mapboxgl-app.gypi b/platform/osx/app/mapboxgl-app.gypi deleted file mode 100644 index 8b8cc17276..0000000000 --- a/platform/osx/app/mapboxgl-app.gypi +++ /dev/null @@ -1,77 +0,0 @@ -{ - 'includes': [ - '../../../gyp/common.gypi', - ], - 'targets': [ - { - 'target_name': 'osxapp', - 'product_name': 'Mapbox GL', - 'type': 'executable', - 'product_extension': 'app', - 'mac_bundle': 1, - 'mac_bundle_resources': [ - 'Credits.rtf', - 'Icon.icns', - 'MainMenu.xib', - 'MapDocument.xib', - ], - - 'dependencies': [ - 'osxsdk', - ], - - 'sources': [ - './AppDelegate.h', - './AppDelegate.m', - './DroppedPinAnnotation.h', - './DroppedPinAnnotation.m', - './LocationCoordinate2DTransformer.h', - './LocationCoordinate2DTransformer.m', - './MapDocument.h', - './MapDocument.m', - './OfflinePackNameValueTransformer.h', - './OfflinePackNameValueTransformer.m', - './TimeIntervalTransformer.h', - './TimeIntervalTransformer.m', - './NSValue+Additions.h', - './NSValue+Additions.m', - './main.m', - ], - - 'xcode_settings': { - 'CLANG_ENABLE_OBJC_ARC': 'YES', - 'INFOPLIST_FILE': '../platform/osx/app/Info.plist', - 'LD_RUNPATH_SEARCH_PATHS': [ - '\${inherited}', - '@executable_path/../Frameworks', - ], - 'PRODUCT_BUNDLE_IDENTIFIER': 'com.mapbox.MapboxGL', - 'SDKROOT': 'macosx', - 'SUPPORTED_PLATFORMS': 'macosx', - }, - - 'configurations': { - 'Debug': { - 'xcode_settings': { - 'COPY_PHASE_STRIP': 'NO', - }, - }, - 'Release': { - 'xcode_settings': { - 'COPY_PHASE_STRIP': 'YES', - }, - }, - }, - - 'copies': [ - { - 'destination': '<(PRODUCT_DIR)/${FRAMEWORKS_FOLDER_PATH}', - 'files': [ - '<(PRODUCT_DIR)/Mapbox.framework', - ], - 'xcode_code_sign': 1, - } - ], - }, - ] -} diff --git a/platform/osx/bitrise.yml b/platform/osx/bitrise.yml index 70fe9041bf..7170fa3f66 100644 --- a/platform/osx/bitrise.yml +++ b/platform/osx/bitrise.yml @@ -1,11 +1,6 @@ format_version: 1.1.0 default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git -app: - envs: - - BITRISE_APP_TITLE: "Mapbox GL – OS X" - - BITRISE_DEV_BRANCH: "master" - trigger_map: - pattern: "*" is_pull_request_allowed: true @@ -28,12 +23,15 @@ workflows: envman add --key SKIPCI --value false fi - script: - title: Run SDK unit tests + title: Run build script run_if: '{{enveq "SKIPCI" "false"}}' inputs: - content: |- #!/bin/bash - make xctest BUILDTYPE=Debug + set -eu -o pipefail + export BUILDTYPE=Debug + make osx + make test-osx - is_debug: 'yes' - slack: title: Post to Slack diff --git a/platform/osx/platform.gyp b/platform/osx/platform.gyp new file mode 100644 index 0000000000..120e5c592d --- /dev/null +++ b/platform/osx/platform.gyp @@ -0,0 +1,328 @@ +{ + 'variables': { + 'loop_lib': 'darwin', + 'headless_lib': 'cgl', + }, + 'xcode_settings': { + # Force all build output to the build directory. Must + # be an absolute path or xcodebuild will ignore it. + 'SYMROOT': '<!(cd ../../build/osx-x86_64 && pwd)', + }, + 'includes': [ + '../../mbgl.gypi', + '../../test/test.gypi', + '../../bin/glfw.gypi', + '../../bin/render.gypi', + '../../bin/offline.gypi', + ], + 'targets': [ + { + 'target_name': 'platform-lib', + 'product_name': 'mbgl-platform-osx', + 'type': 'static_library', + 'standalone_static_library': 1, + 'hard_dependency': 1, + 'dependencies': [ + 'core', + ], + + 'include_dirs': [ + 'include', + '../darwin/include', + '../default', + '../../include', + '../../src', # TODO: eliminate + ], + + 'sources': [ + '../default/asset_file_source.cpp', + '../default/default_file_source.cpp', + '../default/online_file_source.cpp', + '../default/mbgl/storage/offline.hpp', + '../default/mbgl/storage/offline.cpp', + '../default/mbgl/storage/offline_database.hpp', + '../default/mbgl/storage/offline_database.cpp', + '../default/mbgl/storage/offline_download.hpp', + '../default/mbgl/storage/offline_download.cpp', + '../default/sqlite3.hpp', + '../default/sqlite3.cpp', + '../darwin/src/http_request_nsurl.mm', + '../darwin/src/log_nslog.mm', + '../darwin/src/string_nsstring.mm', + '../darwin/src/image.mm', + '../darwin/src/nsthread.mm', + '../darwin/src/reachability.m', + ], + + 'xcode_settings': { + 'OTHER_CPLUSPLUSFLAGS': [ + '<@(boost_cflags)', + '<@(sqlite_cflags)', + '<@(zlib_cflags)', + '<@(rapidjson_cflags)', + '<@(variant_cflags)', + ], + 'CLANG_ENABLE_OBJC_ARC': 'YES', + 'CLANG_ENABLE_MODULES': 'YES', + }, + + 'link_settings': { + 'libraries': [ + '<@(sqlite_static_libs)', + '<@(zlib_static_libs)', + '$(SDKROOT)/System/Library/Frameworks/Cocoa.framework', + '$(SDKROOT)/System/Library/Frameworks/CoreLocation.framework', + '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework', + '$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework', + '$(SDKROOT)/System/Library/Frameworks/SystemConfiguration.framework', + ], + 'xcode_settings': { + 'OTHER_LDFLAGS': [ '<@(zlib_ldflags)' ], + }, + }, + }, + { + 'target_name': 'osxsdk', + 'product_name': 'Mapbox', + 'type': 'shared_library', + 'mac_bundle': 1, + + 'dependencies': [ + 'platform-lib', + ], + + 'xcode_settings': { + 'CLANG_ENABLE_OBJC_ARC': 'YES', + 'CURRENT_PROJECT_VERSION': '0', + 'DEFINES_MODULE': 'YES', + 'DYLIB_INSTALL_NAME_BASE': '@rpath', + 'INFOPLIST_FILE': 'sdk/Info.plist', + 'LD_RUNPATH_SEARCH_PATHS': [ + '${inherited}', + '@executable_path/../Frameworks', + '@loader_path/Frameworks', + ], + 'PRODUCT_BUNDLE_IDENTIFIER': 'com.mapbox.MapboxGL', + 'OTHER_CPLUSPLUSFLAGS': [ + '<@(boost_cflags)', + '<@(variant_cflags)', + ], + 'OTHER_LDFLAGS': [ '-stdlib=libc++', '-lstdc++' ], + 'SDKROOT': 'macosx', + 'SKIP_INSTALL': 'YES', + 'SUPPORTED_PLATFORMS':'macosx', + 'VERSIONING_SYSTEM': 'apple-generic', + }, + + 'mac_framework_headers': [ + 'sdk/Mapbox.h', + '<!@(find ../{darwin,osx}/include -type f \! -name \'.*\')', + ], + + 'mac_bundle_resources': [ + '<!@(find src/resources -type f \! -name \'.*\')', + ], + + 'include_dirs': [ + 'include', + '../darwin/include', + '../../include', + ], + + 'sources': [ + 'sdk/Mapbox.m', + '../darwin/src/NSException+MGLAdditions.h', + '../darwin/src/NSString+MGLAdditions.h', + '../darwin/src/NSString+MGLAdditions.m', + '../darwin/src/MGLTypes.m', + '../darwin/src/MGLStyle.mm', + '../darwin/src/MGLGeometry_Private.h', + '../darwin/src/MGLGeometry.mm', + '../darwin/src/MGLShape.m', + '../darwin/src/MGLMultiPoint_Private.h', + '../darwin/src/MGLMultiPoint.mm', + '../darwin/src/MGLPointAnnotation.m', + '../darwin/src/MGLPolyline.mm', + '../darwin/src/MGLPolygon.mm', + '../darwin/src/MGLMapCamera.mm', + '../darwin/src/MGLOfflinePack.mm', + '../darwin/src/MGLOfflinePack_Private.h', + '../darwin/src/MGLOfflineStorage.mm', + '../darwin/src/MGLOfflineStorage_Private.h', + '../darwin/src/MGLOfflineRegion_Private.h', + '../darwin/src/MGLTilePyramidOfflineRegion.mm', + '../darwin/src/MGLAccountManager_Private.h', + '../darwin/src/MGLAccountManager.m', + '../darwin/src/NSBundle+MGLAdditions.h', + '../darwin/src/NSBundle+MGLAdditions.m', + '../darwin/src/NSProcessInfo+MGLAdditions.h', + '../darwin/src/NSProcessInfo+MGLAdditions.m', + 'src/MGLMapView_Private.h', + 'src/MGLMapView.mm', + 'src/MGLMapView+IBAdditions.m', + 'src/MGLOpenGLLayer.h', + 'src/MGLOpenGLLayer.mm', + 'src/MGLCompassCell.h', + 'src/MGLCompassCell.m', + 'src/MGLAttributionButton.h', + 'src/MGLAttributionButton.m', + 'src/MGLAnnotationImage.m', + ], + + 'configurations': { + 'Debug': { + 'xcode_settings': { + 'GCC_OPTIMIZATION_LEVEL': '0', + }, + }, + 'Release': { + 'xcode_settings': { + 'GCC_OPTIMIZATION_LEVEL': 's', + }, + }, + }, + + 'direct_dependent_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/Cocoa.framework', + '$(SDKROOT)/System/Library/Frameworks/CoreLocation.framework', + ], + }, + }, + { + 'target_name': 'osxtest', + 'product_name': 'osxtest', + 'type': 'loadable_module', + 'mac_xctest_bundle': 1, + + 'dependencies': [ + 'osxsdk', + ], + + 'xcode_settings': { + 'CLANG_ENABLE_MODULES': 'YES', + 'CLANG_ENABLE_OBJC_ARC': 'YES', + 'ENABLE_STRICT_OBJC_MSGSEND': 'YES', + 'GCC_DYNAMIC_NO_PIC': 'NO', + 'GCC_NO_COMMON_BLOCKS': 'YES', + 'INFOPLIST_FILE': 'test/Info.plist', + 'LD_RUNPATH_SEARCH_PATHS': [ + '${inherited}', + '@executable_path/../Frameworks', + '@loader_path/../Frameworks', + ], + 'PRODUCT_BUNDLE_IDENTIFIER': 'com.mapbox.osxtest', + 'SDKROOT': 'macosx', + 'SKIP_INSTALL': 'YES', + 'SUPPORTED_PLATFORMS':'macosx', + }, + + 'sources': [ + 'test/MGLGeometryTests.mm', + 'test/MGLOfflinePackTests.m', + 'test/MGLOfflineRegionTests.m', + 'test/MGLOfflineStorageTests.m', + 'test/MGLStyleTests.mm', + ], + + 'include_dirs': [ + 'include', + '../darwin/include', + '../../include', + ], + + 'configurations': { + 'Debug': { + 'xcode_settings': { + 'COPY_PHASE_STRIP': 'NO', + 'DEBUG_INFORMATION_FORMAT': 'dwarf', + 'ENABLE_TESTABILITY': 'YES', + 'GCC_OPTIMIZATION_LEVEL': '0', + 'GCC_PREPROCESSOR_DEFINITIONS': [ + 'DEBUG=1', + '${inherited}', + ], + 'ONLY_ACTIVE_ARCH': 'YES', + }, + }, + 'Release': { + 'xcode_settings': { + 'COPY_PHASE_STRIP': 'YES', + 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym', + 'ENABLE_NS_ASSERTIONS': 'NO', + }, + }, + }, + }, + { + 'target_name': 'osxapp', + 'product_name': 'Mapbox GL', + 'type': 'executable', + 'product_extension': 'app', + 'mac_bundle': 1, + 'mac_bundle_resources': [ + 'app/Credits.rtf', + 'app/Icon.icns', + 'app/MainMenu.xib', + 'app/MapDocument.xib', + ], + + 'dependencies': [ + 'osxsdk', + ], + + 'sources': [ + 'app/AppDelegate.h', + 'app/AppDelegate.m', + 'app/DroppedPinAnnotation.h', + 'app/DroppedPinAnnotation.m', + 'app/LocationCoordinate2DTransformer.h', + 'app/LocationCoordinate2DTransformer.m', + 'app/MapDocument.h', + 'app/MapDocument.m', + 'app/OfflinePackNameValueTransformer.h', + 'app/OfflinePackNameValueTransformer.m', + 'app/TimeIntervalTransformer.h', + 'app/TimeIntervalTransformer.m', + 'app/NSValue+Additions.h', + 'app/NSValue+Additions.m', + 'app/main.m', + ], + + 'xcode_settings': { + 'CLANG_ENABLE_OBJC_ARC': 'YES', + 'INFOPLIST_FILE': 'app/Info.plist', + 'LD_RUNPATH_SEARCH_PATHS': [ + '\${inherited}', + '@executable_path/../Frameworks', + ], + 'PRODUCT_BUNDLE_IDENTIFIER': 'com.mapbox.MapboxGL', + 'SDKROOT': 'macosx', + 'SUPPORTED_PLATFORMS': 'macosx', + }, + + 'configurations': { + 'Debug': { + 'xcode_settings': { + 'COPY_PHASE_STRIP': 'NO', + }, + }, + 'Release': { + 'xcode_settings': { + 'COPY_PHASE_STRIP': 'YES', + }, + }, + }, + + 'copies': [ + { + 'destination': '<(PRODUCT_DIR)/${FRAMEWORKS_FOLDER_PATH}', + 'files': [ + '<(PRODUCT_DIR)/Mapbox.framework', + ], + 'xcode_code_sign': 1, + } + ], + }, + ], +} diff --git a/platform/osx/scripts/configure.sh b/platform/osx/scripts/configure.sh index ece6bba102..e2fa095df9 100644 --- a/platform/osx/scripts/configure.sh +++ b/platform/osx/scripts/configure.sh @@ -2,10 +2,8 @@ BOOST_VERSION=1.59.0 BOOST_LIBPROGRAM_OPTIONS_VERSION=1.59.0 -LIBCURL_VERSION=system GLFW_VERSION=3.1.2 SQLITE_VERSION=3.9.1 -LIBUV_VERSION=1.7.5 ZLIB_VERSION=system NUNICODE_VERSION=1.6 GEOJSONVT_VERSION=4.1.0 diff --git a/platform/osx/scripts/defaults.mk b/platform/osx/scripts/defaults.mk deleted file mode 100644 index be290891d6..0000000000 --- a/platform/osx/scripts/defaults.mk +++ /dev/null @@ -1,5 +0,0 @@ -HEADLESS ?= cgl -PLATFORM ?= osx -ASSET ?= fs -HTTP ?= nsurl -LOOP ?= darwin diff --git a/platform/osx/scripts/install.sh b/platform/osx/scripts/install.sh deleted file mode 100755 index 0f9b5a2752..0000000000 --- a/platform/osx/scripts/install.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -set -e -set -o pipefail - -mapbox_time "checkout_mason" \ -git submodule update --init .mason diff --git a/platform/osx/scripts/osxsdk.xcscheme b/platform/osx/scripts/osxsdk.xcscheme deleted file mode 100644 index e8a7f2ff58..0000000000 --- a/platform/osx/scripts/osxsdk.xcscheme +++ /dev/null @@ -1,99 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<Scheme - LastUpgradeVersion = "0720" - version = "1.3"> - <BuildAction - parallelizeBuildables = "YES" - buildImplicitDependencies = "YES"> - <BuildActionEntries> - <BuildActionEntry - buildForTesting = "YES" - buildForRunning = "YES" - buildForProfiling = "YES" - buildForArchiving = "YES" - buildForAnalyzing = "YES"> - <BuildableReference - BuildableIdentifier = "primary" - BlueprintIdentifier = "8E4ECCDD911E8B357970AAED" - BuildableName = "Mapbox.framework" - BlueprintName = "osxsdk" - ReferencedContainer = "container:../build/osx-x86_64/gyp/osx.xcodeproj"> - </BuildableReference> - </BuildActionEntry> - </BuildActionEntries> - </BuildAction> - <TestAction - buildConfiguration = "Debug" - selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" - selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - shouldUseLaunchSchemeArgsEnv = "YES"> - <Testables> - <TestableReference - skipped = "NO"> - <BuildableReference - BuildableIdentifier = "primary" - BlueprintIdentifier = "968E0619FB16F6A55E27CDF3" - BuildableName = "osxtest.xctest" - BlueprintName = "osxtest" - ReferencedContainer = "container:../build/osx-x86_64/gyp/osx.xcodeproj"> - </BuildableReference> - </TestableReference> - </Testables> - <MacroExpansion> - <BuildableReference - BuildableIdentifier = "primary" - BlueprintIdentifier = "8E4ECCDD911E8B357970AAED" - BuildableName = "Mapbox.framework" - BlueprintName = "osxsdk" - ReferencedContainer = "container:../build/osx-x86_64/gyp/osx.xcodeproj"> - </BuildableReference> - </MacroExpansion> - <AdditionalOptions> - </AdditionalOptions> - </TestAction> - <LaunchAction - buildConfiguration = "Debug" - selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" - selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - launchStyle = "0" - useCustomWorkingDirectory = "NO" - ignoresPersistentStateOnLaunch = "NO" - debugDocumentVersioning = "YES" - debugServiceExtension = "internal" - allowLocationSimulation = "YES"> - <MacroExpansion> - <BuildableReference - BuildableIdentifier = "primary" - BlueprintIdentifier = "8E4ECCDD911E8B357970AAED" - BuildableName = "Mapbox.framework" - BlueprintName = "osxsdk" - ReferencedContainer = "container:../build/osx-x86_64/gyp/osx.xcodeproj"> - </BuildableReference> - </MacroExpansion> - <AdditionalOptions> - </AdditionalOptions> - </LaunchAction> - <ProfileAction - buildConfiguration = "Release" - shouldUseLaunchSchemeArgsEnv = "YES" - savedToolIdentifier = "" - useCustomWorkingDirectory = "NO" - debugDocumentVersioning = "YES"> - <MacroExpansion> - <BuildableReference - BuildableIdentifier = "primary" - BlueprintIdentifier = "8E4ECCDD911E8B357970AAED" - BuildableName = "Mapbox.framework" - BlueprintName = "osxsdk" - ReferencedContainer = "container:../build/osx-x86_64/gyp/osx.xcodeproj"> - </BuildableReference> - </MacroExpansion> - </ProfileAction> - <AnalyzeAction - buildConfiguration = "Debug"> - </AnalyzeAction> - <ArchiveAction - buildConfiguration = "Release" - revealArchiveInOrganizer = "YES"> - </ArchiveAction> -</Scheme> diff --git a/platform/osx/scripts/osxtest.xcscheme b/platform/osx/scripts/osxtest.xcscheme new file mode 100644 index 0000000000..dbc0577df8 --- /dev/null +++ b/platform/osx/scripts/osxtest.xcscheme @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Scheme + LastUpgradeVersion = "0720" + version = "1.3"> + <BuildAction + parallelizeBuildables = "YES" + buildImplicitDependencies = "YES"> + </BuildAction> + <TestAction + buildConfiguration = "Debug" + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + shouldUseLaunchSchemeArgsEnv = "YES"> + <Testables> + <TestableReference + skipped = "NO"> + <BuildableReference + BuildableIdentifier = "primary" + BlueprintIdentifier = "6EE19CDFBCE7BD04FE561812" + BuildableName = "osxtest.xctest" + BlueprintName = "osxtest" + ReferencedContainer = "container:../../build/osx-x86_64/platform/osx/platform.xcodeproj"> + </BuildableReference> + </TestableReference> + </Testables> + <AdditionalOptions> + </AdditionalOptions> + </TestAction> + <LaunchAction + buildConfiguration = "Debug" + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + launchStyle = "0" + useCustomWorkingDirectory = "NO" + ignoresPersistentStateOnLaunch = "NO" + debugDocumentVersioning = "YES" + debugServiceExtension = "internal" + allowLocationSimulation = "YES"> + <AdditionalOptions> + </AdditionalOptions> + </LaunchAction> + <ProfileAction + buildConfiguration = "Release" + shouldUseLaunchSchemeArgsEnv = "YES" + savedToolIdentifier = "" + useCustomWorkingDirectory = "NO" + debugDocumentVersioning = "YES"> + </ProfileAction> + <AnalyzeAction + buildConfiguration = "Debug"> + </AnalyzeAction> + <ArchiveAction + buildConfiguration = "Release" + revealArchiveInOrganizer = "YES"> + </ArchiveAction> +</Scheme> diff --git a/platform/osx/scripts/package.sh b/platform/osx/scripts/package.sh deleted file mode 100755 index f4b2d0c899..0000000000 --- a/platform/osx/scripts/package.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/env bash - -set -e -set -o pipefail -set -u - -NAME=Mapbox -OUTPUT=build/osx/pkg -OSX_SDK_VERSION=`xcrun --sdk macosx --show-sdk-version` - -if [[ ${#} -eq 0 ]]; then # e.g. "make xpackage" - BUILDTYPE="Release" - GCC_GENERATE_DEBUGGING_SYMBOLS="YES" -else # e.g. "make xpackage-strip" - BUILDTYPE="Release" - GCC_GENERATE_DEBUGGING_SYMBOLS="NO" -fi - -function step { >&2 echo -e "\033[1m\033[36m* $@\033[0m"; } -function finish { >&2 echo -en "\033[0m"; } -trap finish EXIT - -step "Creating build files..." -export MASON_PLATFORM=osx -export BUILDTYPE=${BUILDTYPE:-Release} -export HOST=osx -make Xcode/osx - -VERSION=${TRAVIS_JOB_NUMBER:-${BITRISE_BUILD_NUMBER:-0}} - -step "Building OS X framework (build ${VERSION})..." -xcodebuild -sdk macosx${OSX_SDK_VERSION} \ - ARCHS="x86_64" \ - ONLY_ACTIVE_ARCH=NO \ - GCC_GENERATE_DEBUGGING_SYMBOLS=${GCC_GENERATE_DEBUGGING_SYMBOLS} \ - CURRENT_PROJECT_VERSION=${VERSION} \ - -project ./build/osx-x86_64/gyp/osx.xcodeproj \ - -configuration ${BUILDTYPE} \ - -target osxsdk \ - -jobs ${JOBS} - -TARGET_BUILD_DIR=gyp/build/${BUILDTYPE} -INFOPLIST_PATH=Mapbox.framework/Versions/Current/Resources/Info.plist - -# Uncomment when we're ready to release an official version. -#VERSION=$( git tag | grep ^osx | sed 's/^osx-//' | sort -r | grep -v '\-rc.' | grep -v '\-pre.' | sed -n '1p' | sed 's/^v//' ) -#if [ "$VERSION" ]; then -# plutil \ -# -replace CFBundleShortVersionString -string ${VERSION} \ -# $TARGET_BUILD_DIR/$INFOPLIST_PATH -# plutil \ -# -replace CFBundleVersion -string ${VERSION} \ -# $TARGET_BUILD_DIR/$INFOPLIST_PATH -#fi - -echo $TARGET_BUILD_DIR/Mapbox.framework diff --git a/platform/osx/scripts/run.sh b/platform/osx/scripts/run.sh deleted file mode 100755 index 6d00d1b977..0000000000 --- a/platform/osx/scripts/run.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -set -e -set -o pipefail - -source ./platform/osx/scripts/setup.sh - -BUILDTYPE=${BUILDTYPE:-Release} - -################################################################################ -# Build -################################################################################ - -mapbox_time "compile_render_binary" \ -make render -j${JOBS} BUILDTYPE=${BUILDTYPE} - -mapbox_time "compile_offline_binary" \ -make offline -j${JOBS} BUILDTYPE=${BUILDTYPE} - -mapbox_time "compile_tests" \ -make xtest -j${JOBS} BUILDTYPE=${BUILDTYPE} diff --git a/platform/osx/scripts/setup.sh b/platform/osx/scripts/setup.sh deleted file mode 100755 index 502d61d44d..0000000000 --- a/platform/osx/scripts/setup.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash -# This script is sourced; do not set -e or -o pipefail here. - -# Ensure mason is on the PATH -export PATH="`pwd`/.mason:${PATH}" MASON_DIR="`pwd`/.mason" - -# Set the core file limit to unlimited so a core file is generated upon crash -ulimit -c unlimited -S diff --git a/platform/osx/scripts/test.sh b/platform/osx/scripts/test.sh deleted file mode 100755 index f72895d850..0000000000 --- a/platform/osx/scripts/test.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env bash - -set -e -set -o pipefail -set -u - -OSX_SDK_VERSION=`xcrun --sdk macosx --show-sdk-version` -OSX_PROJ_PATH=./build/osx-x86_64/gyp/osx.xcodeproj - -export BUILDTYPE=${BUILDTYPE:-Release} - -mkdir -p "${OSX_PROJ_PATH}/xcshareddata/xcschemes" -cp platform/osx/scripts/osxsdk.xcscheme "${OSX_PROJ_PATH}/xcshareddata/xcschemes/osxsdk.xcscheme" - -xcodebuild -verbose \ - -sdk macosx${OSX_SDK_VERSION} \ - -project "${OSX_PROJ_PATH}" \ - -scheme osxsdk \ - test diff --git a/platform/osx/sdk/framework-osx.gypi b/platform/osx/sdk/framework-osx.gypi deleted file mode 100644 index 259066f702..0000000000 --- a/platform/osx/sdk/framework-osx.gypi +++ /dev/null @@ -1,68 +0,0 @@ -{ - 'includes': [ - '../../../gyp/common.gypi', - ], - 'targets': [ - { - 'target_name': 'osxsdk', - 'product_name': 'Mapbox', - 'type': 'shared_library', - 'mac_bundle': 1, - - 'dependencies': [ - 'mbgl.gyp:core', - 'mbgl.gyp:platform-<(platform_lib)', - 'mbgl.gyp:http-<(http_lib)', - 'mbgl.gyp:asset-<(asset_lib)', - ], - - 'xcode_settings': { - 'CLANG_ENABLE_OBJC_ARC': 'YES', - 'CURRENT_PROJECT_VERSION': '0', - 'DEFINES_MODULE': 'YES', - 'DYLIB_INSTALL_NAME_BASE': '@rpath', - 'INFOPLIST_FILE': '../platform/osx/sdk/Info.plist', - 'LD_RUNPATH_SEARCH_PATHS': [ - '${inherited}', - '@executable_path/../Frameworks', - '@loader_path/Frameworks', - ], - 'PRODUCT_BUNDLE_IDENTIFIER': 'com.mapbox.MapboxGL', - 'OTHER_LDFLAGS': [ '-stdlib=libc++', '-lstdc++' ], - 'SDKROOT': 'macosx', - 'SKIP_INSTALL': 'YES', - 'SUPPORTED_PLATFORMS':'macosx', - 'VERSIONING_SYSTEM': 'apple-generic', - }, - - 'mac_framework_headers': [ - './Mapbox.h', - '<!@(find ../platform/{darwin,osx}/include -type f \! -name \'.*\')', - ], - - 'sources': [ - './Mapbox.m', - ], - - 'configurations': { - 'Debug': { - 'xcode_settings': { - 'GCC_OPTIMIZATION_LEVEL': '0', - }, - }, - 'Release': { - 'xcode_settings': { - 'GCC_OPTIMIZATION_LEVEL': 's', - }, - }, - }, - - 'direct_dependent_settings': { - 'libraries': [ - '$(SDKROOT)/System/Library/Frameworks/Cocoa.framework', - '$(SDKROOT)/System/Library/Frameworks/CoreLocation.framework', - ], - }, - }, - ] -} diff --git a/platform/osx/test/osxtest.gypi b/platform/osx/test/osxtest.gypi deleted file mode 100644 index 6165b6fa88..0000000000 --- a/platform/osx/test/osxtest.gypi +++ /dev/null @@ -1,84 +0,0 @@ -{ - 'includes': [ - '../../../gyp/common.gypi', - ], - 'targets': [ - { - 'target_name': 'osxtest', - 'product_name': 'osxtest', - 'type': 'loadable_module', - 'mac_xctest_bundle': 1, - - 'dependencies': [ - 'osxsdk', - ], - - 'variables': { - 'cflags_cc': [ - ], - 'ldflags': [ - '-stdlib=libc++', - '-lstdc++', - ], - }, - - 'xcode_settings': { - 'CLANG_ENABLE_MODULES': 'YES', - 'CLANG_ENABLE_OBJC_ARC': 'YES', - 'ENABLE_STRICT_OBJC_MSGSEND': 'YES', - 'GCC_DYNAMIC_NO_PIC': 'NO', - 'GCC_NO_COMMON_BLOCKS': 'YES', - 'INFOPLIST_FILE': '../platform/osx/test/Info.plist', - 'LD_RUNPATH_SEARCH_PATHS': [ - '${inherited}', - '@executable_path/../Frameworks', - '@loader_path/../Frameworks', - ], - 'PRODUCT_BUNDLE_IDENTIFIER': 'com.mapbox.osxtest', - 'OTHER_CPLUSPLUSFLAGS': [ '<@(cflags_cc)' ], - 'OTHER_LDFLAGS': [ '<@(ldflags)' ], - 'SDKROOT': 'macosx', - 'SKIP_INSTALL': 'YES', - 'SUPPORTED_PLATFORMS':'macosx', - }, - - 'sources': [ - './MGLGeometryTests.mm', - './MGLOfflinePackTests.m', - './MGLOfflineRegionTests.m', - './MGLOfflineStorageTests.m', - './MGLStyleTests.mm', - ], - - 'include_dirs': [ - '../../../platform/osx/include', - '../../../platform/darwin/include', - '../../../include', - '../../../src', - ], - - 'configurations': { - 'Debug': { - 'xcode_settings': { - 'COPY_PHASE_STRIP': 'NO', - 'DEBUG_INFORMATION_FORMAT': 'dwarf', - 'ENABLE_TESTABILITY': 'YES', - 'GCC_OPTIMIZATION_LEVEL': '0', - 'GCC_PREPROCESSOR_DEFINITIONS': [ - 'DEBUG=1', - '${inherited}', - ], - 'ONLY_ACTIVE_ARCH': 'YES', - }, - }, - 'Release': { - 'xcode_settings': { - 'COPY_PHASE_STRIP': 'YES', - 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym', - 'ENABLE_NS_ASSERTIONS': 'NO', - }, - }, - }, - }, - ] -} |