Where can I find full prerequisites list for releasing flutter windows desktop app? - flutter

I'm absolute newb to flutter, with objective to focus more on windows-desktop apps. It seems that flutter running on windows-desktop require way more DLLs than mentioned on https://docs.flutter.dev/development/platform-integration/windows/building page. I have created and build absolute minimum Flutter application on my dev machine (Win10 22H2). All went fine, starts and runs as expected.
I have then put mentioned DLL in the folder, along the runner app (testapp.exe) and copied over to test machine running Windows Server 2019 Version 1809 as VMWare image. Both Debug and Release versions of Flutter app (testapp.exe) fails. Debug version fails with MessageBox shown "Code execution cannot proceed because MSVCP140D.dll was not found" which I assume is a debug version of msvcp140.dll (this was present in the testapp.exe location while running).
Trying to run Release version produce no error message at all, application is visible in TaskManager for brief second and exits. Running ProcMon against test application shows it seeks numerous other DLLs which were not mentioned in the flutter docs (see attached pic for reference)
Question - is there some more comprehensive list of Flutter windows-build requirements ?

Related

code-server on a Chromebook doesn't show any target devices and I cannot debug my Flutter project

I installed code-server on a Pixelbook Go (x86 Intel i3 with 8GB RAM, 64 GB SSD). I installed it as a user, not a root, not sure if that's a problem or not. The code-server service is enabled and starts when I start the Developer Linux VM (penguin). As far as I know I'm upgraded to the latest Crostini (104.0.5112.83) and the VM is a Bullseye Debian, I installed it not so long ago.
Outside of the VM I started the Chrome browser and I can view the GUI portion of the code-server by visiting http://localhost:8080 (as per .config/code-server/config.yaml). I installed the Flutter and the Dart extensions in the GUI. I also opened the root folder of my Flutter project (which is a regular project (https://github.com/TrackMyIndoorWorkout/TrackMyIndoorWorkout): no embedded or multi-module things in it).
I connected my phone (OnePlus Nord, Android 12), it displayed the bottom sheet related to the connection and I allowed Transfer. The Crostini detected this connection and popped up a notification about it. I could use that notification bubble to shuttle to the connected USB devices settings and enabled the Nord device.
Here is where things started to differ from starting the "regular" VS Code (installed into the penguin VM from a package) itself: VS Code shows a device selection in the footer section, which lists target devices such as the Pixelbook Go and also the Nord (AC2003) - see screenshot later. However the GUI of the code-server doesn't have selector for the devices. When I start to initiate a debug session it displays an error message:
Unable to launch Flutter project in a Dart-only workspace. Please open a folder close to your Flutter project root or increase the value of the "dart.projectSearchDepth" setting.
Here is how it should look like in the "regular" VS Code:
I opened the root folder of the Flutter project just as I did when I use the "regular" VS Code, so this project search depth doesn't make any sense to me, the dart files are there including the main.dart in the lib folder. And the VS Code kinda works, except that the build hangs due to possibly low resources, hence I'm trying to get code-server working so I can migrate at least the VS Code GUI portion out of the anemic VM. I suspect that the main problem might not be the Flutter / Dart settings, but first I have to figure out whey the GUI doesn't show a device selector. Then I can lament on this error message if still persists.
How to proceed?

Flutter Integration testing failing when moving between tests

Currently in my project I am adding multiple integration tests separated in different files. When trying to run all tests running using flutter test integration test, it gives me this error when moving between tests
Error waiting for a debug connection: The log reader stopped unexpectedly, or never started.
TestDeviceException(Unable to start the app on the device.)
This error never occurs when running it on an iOS or Android emulator, but as this is a desktop application, I need to get the tests building on Linux which is where the error is occurring.
maybe this can help you:
sdk version . choose win 11 sdk(10.0.22000.0) in visual studio installer
windows 11 need choose win 11 sdk(10.0.22000.0)
https://github.com/flutter/flutter/issues/93635#issuecomment-969053206
I haven't been able to get my desktop integration tests to work with a single command but if I write each test out as its own command, it works:
flutter test integration_test/features/fast_booking/fast_booking_test.dart --dart-define=FLAVOR=staging --dart-define=FLUTTER_TEST=true;flutter test integration_test/features/appointments/book_appointment_test.dart --dart-define=FLAVOR=staging --dart-define=FLUTTER_TEST=true
It's not the prettiest solution and I'm hoping the Flutter team releases an official solution.
Related Issues
Most of these are Windows specific but they don't solve the problem on MacOS.
https://github.com/flutter/flutter/issues/72985
https://github.com/flutter/flutter/issues/111076
https://github.com/flutter/flutter/issues/93635
https://github.com/flutter/flutter/issues/98890
https://github.com/flutter/flutter/issues/79723

How to publish a desktop application to another computer?

I wrote the first desktop application in Flutter, how can I get the things I need to run this application on another computer?
I found the Release folder (build\windows\runner\Release) with the following contents:
Content
But when I try to run the app, I only see a black screen.
Download Visual Studio 2019 or later it is required.
Download here
https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&channel=Release&source=VSLandingPage&cid=2110&workload=dotnet-cpluscplus
— If there are multiple build tool versions available, install the latest
Windows 10 SDK (10.0.17763.0)
then run one of following command in your project diroctory
flutter build windows
Then go to the release folder you should see the .exe file

releasing desktop application that created by using flutter

today I tried desktop app development using flutter, but once I use 'flutter build windows' command in terminal it says:
"Warning: Only debug is currently implemented for Windows. This is effectively a debug build."
"See https://github.com/flutter/flutter/issues/38477 for details and updates."
I wonder to know if I can build and release desktop applications or its still not supported.
It is still not supported.
The tool is explicitly telling you that you can't make a non-debug Windows build, and it links to the bug in the Flutter repository for release build support, which is still open; you're not going to be able to find a more authoritative answer than that.
Also, if you are building for Windows then you presumably got your runner from the flutter-desktop-embedding project, which says:
The code here is not stable, nor intended for production use.

Running directx SDK samples on a Windows Mobile 6.1 device

I tried to run the directx samples from ..\Windows Mobile 6 SDK\Samples\PocketPC\CPP\win32\directx\d3dm\tutorials on a Samsung Omnia and on the emulator and it doesn't work because of a deployment error.
I am using Microsoft Visual Studio 2008 and have installed Windows Mobile SDK Standard and Professional refresh.
The device is correctly plugged in and set up for active sync (I know this because other samples work, also a creating Win32 smart device application and running it works).
When I try to run a directx sample application it compiles without errors but the message:
" There were deployment errors, Continue? Yes/No" appears
If I manually copy the application from the debug folder to the device and run it from there, it works.
The same deployment error message appears if I try it on an emulator. Other applications are deploying successfully.
Is there any way to make the deployment work? Maybe there is an obscure option I need to set...
What I do is:
Connect the Mobile device to the PC,
Open Visual Studio 2008,
Open a directx sample project,
Click Run (in Debug or Release mode).
The problem with the deployment is that the file msvcr80.dll could not be found.
It was specified at the deployment options as an additional file "Project->Properties->Configuration Properties->Deployment" then "General->Additional files"
with the paths msvcr80.dll|$(BINDIR)\$(INSTRUCTIONSET)\|%CSIDL_WINDOWS%|0;
Removing it makes the deployment successful. I have only tested this on a Windows Mobile 6.1 device and with the D3DM reference driver on an WM6.1/WM6 emulator.
What I haven't figured out is where does $(BINDIR)\$(INSTRUCTIONSET) point to.
Also I don't know why msvcr80.dll is in the addition files if it is not actually needed.
Is there actually a msvcr80.dll compiled for Windows Mobile platform on an ARM cpu?
I was able to resolve this issue after doing some low-level Sysinternals Debugging. It was trying to deploy NETCFv35.Messages.EN.cab to the device and in my case it was deleted for some reason. Re-installing .NET CF fixed the issue for me. Wish VS 2008 said what file was missing instead of a generic message. Hope this helps you too.