Skip to content

Commit ba89a10

Browse files
committed
Append .exe to executable filenames on Windows
1 parent 1901428 commit ba89a10

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tool/build.dart

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,16 @@ Future<int> main() async {
2727
final path = t['path']!;
2828
stdout.writeln('\nCompiling $name from $path...');
2929

30+
// On Windows the executable should end with .exe. Use Platform to
31+
// determine the correct output filename.
32+
final exeSuffix = Platform.isWindows ? '.exe' : '';
33+
final outputPath = 'out/$name$exeSuffix';
34+
3035
final result = await Process.run('dart', [
3136
'compile',
3237
'exe',
3338
'-o',
34-
'out/$name',
39+
outputPath,
3540
path,
3641
], runInShell: true);
3742

0 commit comments

Comments
 (0)