blob: f80b7b25efb9a17fd2efcf3a004bea5e874caf3b [file] [log] [blame]
// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart = 2.9
import 'dart:io';
import 'package:path/path.dart' as p;
const appName = 'webdev';
/// The path to the root directory of the SDK.
final String _sdkDir = (() {
// The Dart executable is in "/path/to/sdk/bin/dart", so two levels up is
// "/path/to/sdk".
var aboveExecutable = p.dirname(p.dirname(Platform.resolvedExecutable));
assert(FileSystemEntity.isFileSync(p.join(aboveExecutable, 'version')));
return aboveExecutable;
})();
final String dartPath = p.join(_sdkDir, 'bin', 'dart');
final String pubSnapshot =
p.join(_sdkDir, 'bin', 'snapshots', 'pub.dart.snapshot');
final String pubPath =
p.join(_sdkDir, 'bin', Platform.isWindows ? 'pub.bat' : 'pub');