xgqfrms / dart

dart for flutter
https://dart.xgqfrms.xyz/
MIT License
1 stars 0 forks source link

dart2aot & can not run & SDK path space bug ??? #3

Open xgqfrms opened 5 years ago

xgqfrms commented 5 years ago

dart2aot & can not run

SDK path space bug ???

AOT

H:\Program Files\Dart-SDK\dart-sdk\bin

H:\Program Files\Dart-SDK\dart-sdk\bin\dart2aot main.dart main.dart.aot

# dart2aot main.dart main.dart.aot
$ dart2aot bin/main.dart bin/main.dart.aot

# Dart runtime (dartaotruntime):
$ dartaotruntime bin/main.dart.aot

$ time dartaotruntime bin/main.dart.aot

image

but dart is running OK, why?

Maybe it's VS Code terminal bug

image

xgqfrms commented 5 years ago

https://github.com/dart-lang/sdk/issues/37769

xgqfrms commented 5 years ago

bin

Control Panel\System and Security\System

image

image

xgqfrms commented 5 years ago

H:\Program Files\Dart-SDK\dart-sdk\bin

xgqfrms commented 5 years ago

手动安装 Dart SDK

使用工具自动安装 Dart SDK 失败时,还可以手动安装。

  1. 下载并解压,将 dart sdk 中的 bin 文件夹添加到系统环境变量即可。

手动添加 env

# windows & user env
PUB_HOSTED_URL
https://pub.flutter-io.cn

# windows & system env & DART_SDK
DART_SDK
# not work
H:\Program Files\Dart-SDK\dart-sdk
## OK
H:\Program Files\Dart-SDK\dart-sdk\bin

# windows & system env & JDK (Open JDK)
JAVA_HOME
H:\JDK-12

# windows & system env & PATH
H:\Program Files\Dart-SDK\dart-sdk\bin
%JAVA_HOME%\bin
$ dart app.dart
# Hello World!

# Here’s an example of running a Dart file on the command line:
$ dart --enable-asserts app.dart

https://www.dart-china.org/t/topic/480#heading--manual-install

xgqfrms commented 5 years ago

env bug

# windows & system env & DART_SDK
DART_SDK
# not work
H:\Program Files\Dart-SDK\dart-sdk
## OK
H:\Program Files\Dart-SDK\dart-sdk\bin

image

xgqfrms commented 5 years ago

After, set env it still not work, what's wrong with this?

image

image

xgqfrms commented 5 years ago

similarly bug

https://github.com/dart-lang/sdk/issues/37482