summaryrefslogtreecommitdiff
path: root/platform/macos/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'platform/macos/scripts')
-rw-r--r--platform/macos/scripts/configure.sh21
-rwxr-xr-xplatform/macos/scripts/create_scheme.sh40
-rw-r--r--platform/macos/scripts/executable.xcscheme104
-rw-r--r--platform/macos/scripts/library.xcscheme (renamed from platform/macos/scripts/macostest.xcscheme)46
-rw-r--r--platform/macos/scripts/node.xcscheme98
-rwxr-xr-xplatform/macos/scripts/package.sh2
6 files changed, 278 insertions, 33 deletions
diff --git a/platform/macos/scripts/configure.sh b/platform/macos/scripts/configure.sh
deleted file mode 100644
index d408eef7e4..0000000000
--- a/platform/macos/scripts/configure.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/env bash
-
-UNIQUE_RESOURCE_VERSION=dev
-PROTOZERO_VERSION=1.3.0
-BOOST_VERSION=1.60.0
-BOOST_LIBPROGRAM_OPTIONS_VERSION=1.60.0
-GLFW_VERSION=3.1.2
-SQLITE_VERSION=3.9.1
-ZLIB_VERSION=system
-NUNICODE_VERSION=1.6
-GEOMETRY_VERSION=0.8.0
-GEOJSON_VERSION=0.1.4
-GEOJSONVT_VERSION=6.1.2
-SUPERCLUSTER_VERSION=0.2.0
-KDBUSH_VERSION=0.1.1
-VARIANT_VERSION=1.1.0
-RAPIDJSON_VERSION=1.0.2
-GTEST_VERSION=1.7.0
-PIXELMATCH_VERSION=0.9.0
-EARCUT_VERSION=0.11
-BENCHMARK_VERSION=1.0.0
diff --git a/platform/macos/scripts/create_scheme.sh b/platform/macos/scripts/create_scheme.sh
new file mode 100755
index 0000000000..71f0e0855b
--- /dev/null
+++ b/platform/macos/scripts/create_scheme.sh
@@ -0,0 +1,40 @@
+#!/usr/bin/env bash
+
+set -u
+
+CONTAINER=build/macos/mbgl.xcodeproj
+OUTPUT="${CONTAINER}/xcshareddata/xcschemes/${SCHEME_NAME}.xcscheme"
+
+# Required ENV vars:
+# - SCHEME_TYPE: type of the scheme
+# - SCHEME_NAME: name of the scheme
+
+# Optional ENV vars:
+# - NODE_ARGUMENT (defaults to "")
+# - BUILDABLE_NAME (defaults ot SCHEME_NAME)
+# - BLUEPRINT_NAME (defaults ot SCHEME_NAME)
+
+
+# Try to reuse the existing Blueprint ID if the scheme already exists.
+if [ -f "${OUTPUT}" ]; then
+ BLUEPRINT_ID=$(sed -n "s/[ \t]*BlueprintIdentifier *= *\"\([A-Z0-9]\{24\}\)\"/\\1/p" "${OUTPUT}" | head -1)
+fi
+
+NODE_ARGUMENT=${NODE_ARGUMENT:-}
+MAPBOX_ACCESS_TOKEN=${MAPBOX_ACCESS_TOKEN:-}
+BLUEPRINT_ID=${BLUEPRINT_ID:-$(hexdump -n 12 -v -e '/1 "%02X"' /dev/urandom)}
+BUILDABLE_NAME=${BUILDABLE_NAME:-${SCHEME_NAME}}
+BLUEPRINT_NAME=${BLUEPRINT_NAME:-${SCHEME_NAME}}
+
+mkdir -p "${CONTAINER}/xcshareddata/xcschemes"
+
+sed "\
+s#{{BLUEPRINT_ID}}#${BLUEPRINT_ID}#;\
+s#{{BLUEPRINT_NAME}}#${BLUEPRINT_NAME}#;\
+s#{{BUILDABLE_NAME}}#${BUILDABLE_NAME}#;\
+s#{{CONTAINER}}#${CONTAINER}#;\
+s#{{MAPBOX_ACCESS_TOKEN}}#${MAPBOX_ACCESS_TOKEN}#;\
+s#{{WORKING_DIRECTORY}}#$(pwd)#;\
+s#{{NODE_PATH}}#$(dirname `which node`)#;\
+s#{{NODE_ARGUMENT}}#${NODE_ARGUMENT}#" \
+ platform/macos/scripts/${SCHEME_TYPE}.xcscheme > "${OUTPUT}"
diff --git a/platform/macos/scripts/executable.xcscheme b/platform/macos/scripts/executable.xcscheme
new file mode 100644
index 0000000000..4353aad846
--- /dev/null
+++ b/platform/macos/scripts/executable.xcscheme
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "0730"
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "{{BLUEPRINT_ID}}"
+ BuildableName = "{{BUILDABLE_NAME}}"
+ BlueprintName = "{{BLUEPRINT_NAME}}"
+ ReferencedContainer = "container:{{CONTAINER}}">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES">
+ <Testables>
+ </Testables>
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "{{BLUEPRINT_ID}}"
+ BuildableName = "{{BUILDABLE_NAME}}"
+ BlueprintName = "{{BLUEPRINT_NAME}}"
+ ReferencedContainer = "container:{{CONTAINER}}">
+ </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">
+ <BuildableProductRunnable
+ runnableDebuggingMode = "0">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "{{BLUEPRINT_ID}}"
+ BuildableName = "{{BUILDABLE_NAME}}"
+ BlueprintName = "{{BLUEPRINT_NAME}}"
+ ReferencedContainer = "container:{{CONTAINER}}">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ <CommandLineArguments>
+ <CommandLineArgument
+ argument = "--gtest_filter="
+ isEnabled = "NO">
+ </CommandLineArgument>
+ </CommandLineArguments>
+ <EnvironmentVariables>
+ <EnvironmentVariable
+ key = "MAPBOX_ACCESS_TOKEN"
+ value = "{{MAPBOX_ACCESS_TOKEN}}"
+ isEnabled = "YES">
+ </EnvironmentVariable>
+ </EnvironmentVariables>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ buildConfiguration = "Release"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ debugDocumentVersioning = "YES">
+ <BuildableProductRunnable
+ runnableDebuggingMode = "0">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "{{BLUEPRINT_ID}}"
+ BuildableName = "{{BUILDABLE_NAME}}"
+ BlueprintName = "{{BLUEPRINT_NAME}}"
+ ReferencedContainer = "container:{{CONTAINER}}">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
diff --git a/platform/macos/scripts/macostest.xcscheme b/platform/macos/scripts/library.xcscheme
index ba6f6a6f4b..012bc900c2 100644
--- a/platform/macos/scripts/macostest.xcscheme
+++ b/platform/macos/scripts/library.xcscheme
@@ -1,10 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
- LastUpgradeVersion = "0720"
+ LastUpgradeVersion = "0730"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "{{BLUEPRINT_ID}}"
+ BuildableName = "{{BUILDABLE_NAME}}"
+ BlueprintName = "{{BLUEPRINT_NAME}}"
+ ReferencedContainer = "container:{{CONTAINER}}">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
@@ -12,16 +28,6 @@
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
- <TestableReference
- skipped = "NO">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "6EE19CDFBCE7BD04FE561812"
- BuildableName = "macostest.xctest"
- BlueprintName = "macostest"
- ReferencedContainer = "container:../../build/macos/platform/macos/platform.xcodeproj">
- </BuildableReference>
- </TestableReference>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
@@ -36,6 +42,15 @@
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "{{BLUEPRINT_ID}}"
+ BuildableName = "{{BUILDABLE_NAME}}"
+ BlueprintName = "{{BLUEPRINT_NAME}}"
+ ReferencedContainer = "container:{{CONTAINER}}">
+ </BuildableReference>
+ </MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
@@ -45,6 +60,15 @@
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "{{BLUEPRINT_ID}}"
+ BuildableName = "{{BUILDABLE_NAME}}"
+ BlueprintName = "{{BLUEPRINT_NAME}}"
+ ReferencedContainer = "container:{{CONTAINER}}">
+ </BuildableReference>
+ </MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
diff --git a/platform/macos/scripts/node.xcscheme b/platform/macos/scripts/node.xcscheme
new file mode 100644
index 0000000000..361ed58a37
--- /dev/null
+++ b/platform/macos/scripts/node.xcscheme
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "0730"
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "{{BLUEPRINT_ID}}"
+ BuildableName = "{{BUILDABLE_NAME}}"
+ BlueprintName = "{{BLUEPRINT_NAME}}"
+ ReferencedContainer = "container:{{CONTAINER}}">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES">
+ <Testables>
+ </Testables>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </TestAction>
+ <LaunchAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "YES"
+ customWorkingDirectory = "{{WORKING_DIRECTORY}}"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ debugServiceExtension = "internal"
+ allowLocationSimulation = "YES">
+ <PathRunnable
+ runnableDebuggingMode = "0"
+ FilePath = "{{NODE_PATH}}/node">
+ </PathRunnable>
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "{{BLUEPRINT_ID}}"
+ BuildableName = "{{BUILDABLE_NAME}}"
+ BlueprintName = "{{BLUEPRINT_NAME}}"
+ ReferencedContainer = "container:{{CONTAINER}}">
+ </BuildableReference>
+ </MacroExpansion>
+ <CommandLineArguments>
+ <CommandLineArgument
+ argument = "{{NODE_ARGUMENT}}"
+ isEnabled = "YES">
+ </CommandLineArgument>
+ </CommandLineArguments>
+ <EnvironmentVariables>
+ <EnvironmentVariable
+ key = "PATH"
+ value = "{{NODE_PATH}}:$PATH"
+ isEnabled = "YES">
+ </EnvironmentVariable>
+ </EnvironmentVariables>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ buildConfiguration = "Release"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ debugDocumentVersioning = "YES">
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "{{BLUEPRINT_ID}}"
+ BuildableName = "{{BUILDABLE_NAME}}"
+ BlueprintName = "{{BLUEPRINT_NAME}}"
+ ReferencedContainer = "container:{{CONTAINER}}">
+ </BuildableReference>
+ </MacroExpansion>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
diff --git a/platform/macos/scripts/package.sh b/platform/macos/scripts/package.sh
index c2a015b346..603ecd179c 100755
--- a/platform/macos/scripts/package.sh
+++ b/platform/macos/scripts/package.sh
@@ -7,7 +7,7 @@ set -u
NAME=Mapbox
OUTPUT=build/macos/pkg
DERIVED_DATA=build/macos
-PRODUCTS=${DERIVED_DATA}/Build/Products
+PRODUCTS=${DERIVED_DATA}
BUILDTYPE=${BUILDTYPE:-Release}
GCC_GENERATE_DEBUGGING_SYMBOLS=${SYMBOLS:-YES}