From 87f766a94d1a6a61d828092cb808b379b7e969b8 Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Wed, 9 Dec 2015 11:55:52 -0800 Subject: [PATCH] Require the user to specify the DART_SDK_PATH manually in Xcode --- sky/build/PackagerInvoke | 9 ++------- .../FlutterApplication.xcodeproj/project.pbxproj | 4 +++- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/sky/build/PackagerInvoke b/sky/build/PackagerInvoke index fecbc4ee3eb..d37237b6a40 100755 --- a/sky/build/PackagerInvoke +++ b/sky/build/PackagerInvoke @@ -28,13 +28,8 @@ PackageProject() { exit -1 fi - # Check if pub exists - RunCommand which pub - if [[ $? -ne 0 ]]; then - EchoError "Could not find 'pub'." - EchoError "Did you install the Dart SDK?" - exit -1 - fi + # The 'flutter' command assumes the 'dart' binary is in $PATH + RunCommand export PATH=${PATH}:${DART_SDK_PATH}/bin AssertExists $1 local project_path=$1 diff --git a/sky/build/sdk_xcode_harness/FlutterApplication.xcodeproj/project.pbxproj b/sky/build/sdk_xcode_harness/FlutterApplication.xcodeproj/project.pbxproj index 0eee2eb54fb..55d0d78b28d 100644 --- a/sky/build/sdk_xcode_harness/FlutterApplication.xcodeproj/project.pbxproj +++ b/sky/build/sdk_xcode_harness/FlutterApplication.xcodeproj/project.pbxproj @@ -334,7 +334,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "set -e\npushd ${FLUTTER_APPLICATION_PATH}\npub get\npopd\n"; + shellScript = "set -e\npushd ${FLUTTER_APPLICATION_PATH}\n${DART_SDK_PATH}/bin/pub get\npopd\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -476,6 +476,7 @@ 9E07CF8F1BE7F4D200BCD8DE /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + DART_SDK_PATH = dart/sdk/path; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; @@ -495,6 +496,7 @@ 9E07CF901BE7F4D200BCD8DE /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + DART_SDK_PATH = dart/sdk/path; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1;