I have built a desktop application with flutter. Now wanna share its .exe to another person.
I have browsed for it and got some answers but according to this, I couldn't found.exe file.
First I run
flutter build windows
to release .exe file.
I went through the path but it created some strange file
build\windows\x64\Debug\
and found these 3 folder:
The actual .exe is under build\windows\runner\Release. Good luck!
Related
Running my application on another Windows machine results in a blank window. I works fine on the development machine.
I have included all the dll-files + data folder + 3 extra dll files mentioned on the Flutter website.
I have also ran "dependencies" on the resulting .exe file and can't see any missing dll's.
Compiling the "mydemo" application works fine, so I assume there are some other external files my application needs.
I have tried looking through the output of "flutter run -v" to find any clues of extra files needed, but can't see anything useful.
What is the preferred way to tackle a problem like this? How can I find out what files/resources are missing to distribute my app? Is there a way to use the "debug" version on the other machine instead and bring out the debug console window? I would guess that would show me errors when the app tries to load the missing resources.
Check if any package you depend on has some additional file requirements: for example, I'm using sqflite_common_ffi in some of my projects, which needs an additional DLL file to run. I don't know what you're referring to 'dependencies' ran on the EXE, though.
In any case, when I can't get any good output or error from a project, I do this: open up Windows prompt, go to the directory where you have put all the required files, and run
your_exe_file >> logFile.txt 2>&1
which will output the standard output and the standard error to the file. The log file name and extension don't really matter, it will be a simple text file.
For example, if I dont put the additional DLL for sqflite_common_ffi in the same folder of the compiled EXE, the output of the command above will specifically mention the name of the DLL that is missing.
if you got your project through a repository to run on another windows machine, use the command "flutter pub get"
how do I run the executable files from Flutter desktop that also store in that app itself, let say if I made a batch file that echo hello worlds. the idea is I don't want the executable file in the app itself. the only thing that I can think of is assets. I want to run the file with Process. start or run. I tried the "workingDirectory" to assets dir but it doesn't work. Any other solution or maybe I do it the wrong way.
Process.run('C:/Users/<Ur User>/AndroidStudioProjects/web_view_test/build/windows/runner/Debug/installerX64/install.exe', [' start ']).then((ProcessResult results) {
print(results.stdout);
});
I want to bundle a native console program for macos written in Rust, into a Flutter app.
The Flutter app needs to call this program from Dart with something like this:
Process.runSync("./myconsoleapp", ["argument1", "argument2"]);
The Flutter app can't seem to find myconsoleapp.
Is there a way to embed myconsoleapp into the Flutter app, and make it executable? I tried manually adding and it didn't work.
Steve
Flutter for windows simply bundle project.exe along with a bunch of other files into a directory in (build\windows\runner\debug\). No one can stops you from adding your files to that directory.
In your dart code, simply start a new process from the newly added file:
var exePath =
p.join(p.dirname(Platform.resolvedExecutable), 'myFile.exe');
var result = await Process.run(exePath);
It can't find your executable because there is no relationship between ./--which is the current directory in the environment your app was launched from--and your application's location. If you want to access something bundled in your application you should be using NSBundle's pathForResource:ofType: to get the path to it (either via a method channel, or FFI).
Is there a way to embed myconsoleapp into the Flutter app,
You would add it as a bundled resource via Xcode. (There's nothing Flutter-specific about this step.)
and make it executable?
Presumably the product of your Rust build process is already executable.
I'm using a PC and I've created a build for Mac standalone.
I shared the file with my test user by zipping and emailing the build, but when he tries to run the application he sees this error:
The application "SomeApp.app" can't be opened.
After some searching, I learned that I need to do chmod to open the file. Can anyone tell me how to do that on a Mac?
The zip format doesn't have easy support for Unix-like file permissions, so your transfer process is stripping any permission flags that OSX uses to recognize files within that zip that are supposed to be executable. This can also happen with other file transfer solutions, so it's something to watch out for.
The best solution would be to create an archive which does keep those permissions, such as a tar archive.
Failing that, you can have a Mac user open a terminal and set the permission flag manually:
chmod a+x SomeApp.app/Contents/MacOS/*
(Replace SomeApp.app with whatever your .app folder is named)
I had the same issue, I left an answer here, at the bottom: https://forum.unity.com/threads/mac-build-breaking-when-uploaded-to-storage.1093330/
The problem was not with the .zip, but rather with the build itself. Ran fine on my Mac, did NOT run fine once I uploaded it and downloaded it again (or if anyone else downloaded it).
Edited 12/8/2021, as per EmiOB's suggestion, to add the text of my answer (same as in the link):
This worked for me on 2020.3.16f1:
In the Unity Editor: Build Settings, check the box that lets you make an XCode project (requires having XCode installed, I believe I have Xcode 11)
Open the XCode project
Build
That solved my problem :)
I created an app with Appcelerator's Titanium Mobile on my home machine. The path was /Users/[myusername]/Projects/ProjectName.
I checked my code into Mercurial.
The next day, at my office computer, I cloned the Mercurial repo, and then added the existing app. I tried to run it in the simulator and received the error:
could not find the file app.js.
I looked at the log and noticed that the path it was looking for was the path on my home computer, not the path on my office computer.
What can I do to make my app run on two different computers? I imagine that if I created a new app and then copied my code into it, it would probably work on the office machine. But if I checked my code in, and got latest at home it would probably be broken there.
Open tiapp.xml
Remove the line. f01a795a-46e7-4627-8558-465e5998c99d
Do a full rebuild
Bring guid tag back (just to make sure you still have it on tiapp.xml)
Do a full rebuild again.
Here's the source:
http://www.limechalk.com/blog/fix-runtime-error-when-running-appcelerator-app-on-android-emulator/
Can you re-create a new project? copy your files tiapp.xml as well as folder Resources to your new project and build again.
This issue mainly caused by JavaScript minification,either you have syntax error in one or more js files or which is hard to predict may you have some other files in you project that are not js files and cause this failure to build and then this common error .
my two cents open up you project files and look carefully for any file or files that are not supposed to be in it.