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);
});
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"
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!
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 have a bunch of content files for my iPhone app that I generate via shell script. It takes way too long to be a part of the Xcode build process, so I run it periodically.
I don't want to have to continually add these files to my Xcode project in order to get them included my app resources folder. Is there a way to get Xcode to copy the contents of a folder into the app resources at build time? (It'd be a bonus if I could specify other locations, such as the approot documents folder.)
I tried adding a new 'Copy Files Build Phase' to my target, but that didn't seem to work. This seems like a common problem, but I couldn't find anything about it here.
-- Edit (What I did)
Per Jasarien and cdespinosa's suggestions, I did the following in a build script. I decided not to copy to the destination, because that would only work when using the simulator, I don't think that'll work when deploying to a device.
cp -rf "$PROJECT_DIR/mystuff" "$CONFIGURATION_BUILD_DIR/$CONTENTS_FOLDER_PATH/"
-- Edit 2
This doesn't appear to get files onto my iPhone. Any ideas?
You can setup a Run Script build phase in your app's target. Write the script so that it copies the resources into the app bundle.
This is the path i use for output:
${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}
Just copy your files in that directory, it's the bundle (simulator or device).
You can also take a look at my answer here : how to set up a Xcode build rule with a variable output file list?
I want to include the Application Loader process in a software installation, to ensure that users get our software installed on their Blackberry by the time our installer software finishes.
I know this is possible, because Aerize Card Loader (http://aerize.com/blackberry/software/loader/) does this. When you install their software, if your Blackberry is connected the Application Loader will come up and force the .COD file to install to the device.
I can't make it work. Looking at RIM's own documentation, I need to:
Place the ALX and COD files into a subfolder here: C:\Program Files\Common Files\Research In Motion\Shared\Applications\
Add a path to the ALX file in HKCU\Software\Research In Motion\Blackberry\Loader\Packages
Index the application, by executing this at the command line: loader.exe /index
Start the force load, by doing this: loader.exe /defaultUSB /forceload
When I execute that last command, the Application Loader comes up and says that all applications are up to date and nothing needs to be done.
If I execute loader.exe by double-clicking on it (or typing in the command with no parameters), I get the regular Application Loader wizard. It shows my program as listed, but un-checked. If I check it and click next, it will install to the Blackberry. (This is the part that I want to avoid, and that Aerize Card Loader's install process avoids.)
What am I missing? It appears that the Aerize installer is doing something different but I haven't been able to ascertain what.
You can do it easily with the following command:
C:\RIM\JDE_4.7.0\bin\JavaLoader.exe -u load <.cod file>
With this command you don't need an alx at all, just the cod file. Look at JavaLoader usage help to see full options.
JavaLoader.exe can upload one code file. What about two or more cod files?