Add a --no-http flag to start command
This flag builds a local FLX file and pushes that to the device instead of
using an HTTP server.
diff --git a/packages/flutter_tools/lib/src/build_configuration.dart b/packages/flutter_tools/lib/src/build_configuration.dart
index 0db0299e..5fc0356 100644
--- a/packages/flutter_tools/lib/src/build_configuration.dart
+++ b/packages/flutter_tools/lib/src/build_configuration.dart
@@ -2,29 +2,48 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+import 'dart:io';
+
+import 'package:logging/logging.dart';
import 'package:path/path.dart' as path;
+final Logger _logging = new Logger('sky_tools.build_configuration');
+
enum BuildType {
prebuilt,
release,
debug,
}
-enum BuildPlatform {
- android,
- iOS,
- iOSSimulator,
+enum HostPlatform {
mac,
linux,
}
+enum TargetPlatform {
+ android,
+ iOS,
+ iOSSimulator,
+ linux,
+}
+
+HostPlatform getCurrentHostPlatform() {
+ if (Platform.isMacOS)
+ return HostPlatform.mac;
+ if (Platform.isLinux)
+ return HostPlatform.linux;
+ _logging.warning('Unsupported host platform, defaulting to Linux');
+ return HostPlatform.linux;
+}
+
class BuildConfiguration {
- BuildConfiguration.prebuilt({ this.platform })
+ BuildConfiguration.prebuilt({ this.hostPlatform, this.targetPlatform })
: type = BuildType.prebuilt, buildDir = null;
BuildConfiguration.local({
this.type,
- this.platform,
+ this.hostPlatform,
+ this.targetPlatform,
String enginePath,
String buildPath
}) : buildDir = path.normalize(path.join(enginePath, buildPath)) {
@@ -32,6 +51,7 @@
}
final BuildType type;
- final BuildPlatform platform;
+ final HostPlatform hostPlatform;
+ final TargetPlatform targetPlatform;
final String buildDir;
}