diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2015-12-03 13:28:20 -0800 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2015-12-13 17:26:53 -0800 |
commit | bab3935431ddec4d2762d2c010eac7530fd26856 (patch) | |
tree | dfb005e8702c7f6e3a56810d20b6efbd25e303f6 | |
parent | ea57be5598826a14991e2ac17a826186c2d9ce0b (diff) | |
download | qtlocation-mapboxgl-bab3935431ddec4d2762d2c010eac7530fd26856.tar.gz |
[osx] Fixed standalone launch of osxapp (and run-xosx)
Mapbox.framework needs to be embedded in the application bundle.
-rw-r--r-- | docs/BUILD_OSX.md | 4 | ||||
-rw-r--r-- | gyp/platform-osx.gypi | 15 | ||||
-rw-r--r-- | platform/osx/app/mapboxgl-app.gypi | 20 | ||||
-rw-r--r-- | platform/osx/sdk/framework-osx.gypi | 3 |
4 files changed, 21 insertions, 21 deletions
diff --git a/docs/BUILD_OSX.md b/docs/BUILD_OSX.md index a2e936d59b..0d3c685f41 100644 --- a/docs/BUILD_OSX.md +++ b/docs/BUILD_OSX.md @@ -8,7 +8,9 @@ This project provides an OS X SDK analogous to the Mapbox iOS SDK. Mapbox does n ### Install -1. Copy `gyp/build/Release/Mapbox.framework` into your project. It should happen automatically, but ensure that `Mapbox.framework` is listed in the *Linked Frameworks and Libraries* section of the General tab for your application target. +1. Copy `gyp/build/Release/Mapbox.framework` into your project. + +1. In the project editor, select your application target, go to the General tab, and add `Mapbox.framework` to the *Embedded Binaries* section. 1. Mapbox vector tiles require a Mapbox account and API access token. In the project editor, select the application target. In the Info tab, set `MGLMapboxAccessToken` to your access token. You can obtain one from the [Mapbox account page](https://www.mapbox.com/studio/account/tokens/). diff --git a/gyp/platform-osx.gypi b/gyp/platform-osx.gypi index 812c505787..281a8a5738 100644 --- a/gyp/platform-osx.gypi +++ b/gyp/platform-osx.gypi @@ -23,42 +23,27 @@ '../platform/darwin/NSException+MGLAdditions.h', '../platform/darwin/NSString+MGLAdditions.h', '../platform/darwin/NSString+MGLAdditions.m', - '../include/mbgl/darwin/MGLTypes.h', '../platform/darwin/MGLTypes.m', - '../include/mbgl/darwin/MGLStyle.h', '../platform/darwin/MGLStyle.mm', - '../include/mbgl/darwin/MGLGeometry.h', '../platform/darwin/MGLGeometry_Private.h', '../platform/darwin/MGLGeometry.mm', - '../include/mbgl/darwin/MGLAnnotation.h', - '../include/mbgl/darwin/MGLShape.h', '../platform/darwin/MGLShape.m', - '../include/mbgl/darwin/MGLMultiPoint.h', '../platform/darwin/MGLMultiPoint_Private.h', '../platform/darwin/MGLMultiPoint.mm', - '../include/mbgl/darwin/MGLOverlay.h', - '../include/mbgl/darwin/MGLPointAnnotation.h', '../platform/darwin/MGLPointAnnotation.m', - '../include/mbgl/darwin/MGLPolyline.h', '../platform/darwin/MGLPolyline.mm', - '../include/mbgl/darwin/MGLPolygon.h', '../platform/darwin/MGLPolygon.mm', - '../include/mbgl/osx/MGLAccountManager.h', '../platform/osx/src/MGLAccountManager_Private.h', '../platform/osx/src/MGLAccountManager.m', - '../include/mbgl/osx/MGLMapView.h', '../platform/osx/src/MGLMapView_Private.h', '../platform/osx/src/MGLMapView.mm', - '../include/mbgl/osx/MGLMapView+IBAdditions.h', '../platform/osx/src/MGLMapView+IBAdditions.m', - '../include/mbgl/osx/MGLMapViewDelegate.h', '../platform/osx/src/MGLOpenGLLayer.h', '../platform/osx/src/MGLOpenGLLayer.mm', '../platform/osx/src/MGLCompassCell.h', '../platform/osx/src/MGLCompassCell.m', '../platform/osx/src/MGLAttributionButton.h', '../platform/osx/src/MGLAttributionButton.m', - '../include/mbgl/osx/MGLAnnotationImage.h', '../platform/osx/src/MGLAnnotationImage.m', '../platform/osx/src/NSBundle+MGLAdditions.h', '../platform/osx/src/NSBundle+MGLAdditions.m', diff --git a/platform/osx/app/mapboxgl-app.gypi b/platform/osx/app/mapboxgl-app.gypi index 99a5f3d099..24f356c5d6 100644 --- a/platform/osx/app/mapboxgl-app.gypi +++ b/platform/osx/app/mapboxgl-app.gypi @@ -34,12 +34,26 @@ ], 'xcode_settings': { - 'SDKROOT': 'macosx', - 'SUPPORTED_PLATFORMS':'macosx', - 'INFOPLIST_FILE': '../platform/osx/app/Info.plist', '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', }, + + 'copies': [ + { + 'destination': '<(PRODUCT_DIR)/$(FRAMEWORKS_FOLDER_PATH)', + 'files': [ + '<(PRODUCT_DIR)/Mapbox.framework', + ], + 'xcode_code_sign': 1, + } + ], }, ] } diff --git a/platform/osx/sdk/framework-osx.gypi b/platform/osx/sdk/framework-osx.gypi index d38c695071..ef5ac5efd4 100644 --- a/platform/osx/sdk/framework-osx.gypi +++ b/platform/osx/sdk/framework-osx.gypi @@ -25,7 +25,7 @@ 'INFOPLIST_FILE': '../platform/osx/sdk/Info.plist', 'LD_RUNPATH_SEARCH_PATHS': [ '$(inherited)', - '@executable_path/Frameworks', + '@executable_path/../Frameworks', '@loader_path/Frameworks', ], 'PRODUCT_BUNDLE_IDENTIFIER': 'com.mapbox.MapboxGL', @@ -42,7 +42,6 @@ ], 'sources': [ - './Mapbox.h', './Mapbox.m', ], |