anaisbetts / squirrel-flutter

Build installers for your Flutter applications with Squirrel
BSD 3-Clause "New" or "Revised" License
57 stars 13 forks source link

Flutter Release build directory not found #10

Open V3ntus opened 9 months ago

V3ntus commented 9 months ago
Unhandled exception:
PathNotFoundException: Cannot copy file to 'c:\users\user\flutterProject\build\windows\runner\Release\squirrel.exe', path = 'c:\users\user\appdata\local\pub\cache\git\squirrel-flutter-1612e8f1bd8eb2c9df317da0e181e0564afcff7a\vendor\squirrel.exe' (OS Error: The system cannot find the path specified.
, errno = 3)
#0      _checkForErrorResponse (dart:io/common.dart:55:9)
#1      _File.copy.<anonymous closure> (dart:io/file_impl.dart:356:7)
<asynchronous suspension>
#2      main (file:///C:/Users/user/AppData/Local/Pub/Cache/git/squirrel-flutter-1612e8f1bd8eb2c9df317da0e181e0564afcff7a/bin/installer_windows.dart:220:5)
<asynchronous suspension>

Seems like Flutter SDK changed where Windows builds go. \build\windows\x64\runner\Release <- note the "x64"

Looks like the change should be here: https://github.com/anaisbetts/squirrel-flutter/blob/17cd6dc7980399b30dc152110f0cb2eccea278d0/bin/installer_windows.dart#L214-L215

aMarkSide commented 8 months ago

Ran into this myself, if anyone else is and is looking for a workaround, you can update installer_windows.dart locally to change the "path.join" line from V3ntus's comment above to be "path.join('build', 'windows', 'x64', 'runner', 'Release'))!;"