Skip to content

Commit 80107e9

Browse files
committed
Stream subprocess output in mwebd Windows build script
1 parent cb8face commit 80107e9

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

tool/build_standalone_mwebd_windows.dart

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Future<void> main() async {
2020
"https://www.github.com/ltcmweb/mwebd.git",
2121
"--branch",
2222
"v0.1.8",
23-
], runInShell: true);
23+
], runInShell: true, mode: ProcessStartMode.inheritStdio);
2424
await _waitForProcess(clone);
2525

2626
// change working dir and build mwebd.exe
@@ -33,29 +33,31 @@ Future<void> main() async {
3333
if (Platform.isWindows && isCI) {
3434
build = await Process.start(
3535
"go",
36-
["build", "-o", "../mwebd.exe", "github.com/ltcmweb/mwebd/cmd/mwebd"],
36+
["build", "-v", "-o", "../mwebd.exe", "github.com/ltcmweb/mwebd/cmd/mwebd"],
3737
environment: {"CGO_ENABLED": "1"},
3838
runInShell: true,
39+
mode: ProcessStartMode.inheritStdio,
3940
);
4041
} else if (Platform.isWindows) {
4142
build = await Process.start("wsl", [
4243
"bash",
4344
"-l",
4445
"-c",
4546
"GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc "
46-
"go build -o ../mwebd.exe github.com/ltcmweb/mwebd/cmd/mwebd",
47-
], runInShell: true);
47+
"go build -v -o ../mwebd.exe github.com/ltcmweb/mwebd/cmd/mwebd",
48+
], runInShell: true, mode: ProcessStartMode.inheritStdio);
4849
} else {
4950
build = await Process.start(
5051
"go",
51-
["build", "-o", "../mwebd.exe", "github.com/ltcmweb/mwebd/cmd/mwebd"],
52+
["build", "-v", "-o", "../mwebd.exe", "github.com/ltcmweb/mwebd/cmd/mwebd"],
5253
environment: {
5354
"GOOS": "windows",
5455
"GOARCH": "amd64",
5556
"CGO_ENABLED": "1",
5657
"CC": "x86_64-w64-mingw32-gcc",
5758
},
5859
runInShell: true,
60+
mode: ProcessStartMode.inheritStdio,
5961
);
6062
}
6163
await _waitForProcess(build);
@@ -79,13 +81,13 @@ Future<void> main() async {
7981
"${Platform.pathSeparator}mwebd.exe",
8082
"${winAssetsDir.path}"
8183
"${Platform.pathSeparator}mwebd.exe",
82-
])
84+
], mode: ProcessStartMode.inheritStdio)
8385
: await Process.start("cp", [
8486
"${Directory.current.parent.path}"
8587
"${Platform.pathSeparator}mwebd.exe",
8688
"${winAssetsDir.path}"
8789
"${Platform.pathSeparator}mwebd.exe",
88-
]);
90+
], mode: ProcessStartMode.inheritStdio);
8991
await _waitForProcess(copy);
9092

9193
// cleanup

0 commit comments

Comments
 (0)