How do I find the installed path of an application from windbg?
Consider, I got a dump . I need to know the installed path of that application from the dump using windbg.
Entering lmvm myApp will display a lot of stuff relevant to your app, the one you want is Image Path e.g.:
lmvm myApp
outputs
....
Image path: C:\AppPath\myApp.exe
....
Run lmvm EXENAME. For instance, if the app is called MyApp.exe, run 'lmvm myapp'.
One of the items that will be printed is the module's path.
Related
The legacy app i'm working on is downloading classes on windows to the users AppData:
${installer:sys.userHome}/AppData/Local/TheOrg/${installer:productName}/Lib
'productName' is a installer variable that is configurable as a step in the installer
This is given as an argument to the main class by the installer and at that point
${installer:sys.userHome} and ${installer:productName} resolves correctly
However when I use the same location (${installer:sys.userHome}/AppData/Local/TheOrg/${installer:productName}/Lib) as a Class Path as value of an 'Scan Directory" entry something seems off. If I hard code this to
C:/Users/MyUser/AppData/Local/TheOrg/MyApp/Lib everything works fine.
What is the difference between 'Directory' and 'Scan Directory', and are there any reasons why the Classpath isn't picked up correcly when I'm using variables?
You cannot use installer variables in the class path entries of a launcher. You can see that in the variable selector which does not offer installer variables.
The technical reason is that the class path is constructed by the native launcher which does not have access to installer variables because they are read and instantiated by the Java part of the installer.
On Windows, you can use the environment variable ${LOCALAPPDATA} in class path entries to refer to the local app data directory.
Btw, use ${installer:sys.localAppdataDir} instead of ${installer:sys.userHome}/AppData/Local, the location of that directory might not be in the user home directory.
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 want to distribute a Flutter desktop app outside of App Store. The app includes some extra binaries using the assets key in pubspec.yaml. The binaries end up in this directory inside the app:
flutter_sample.app/Contents/Frameworks/App.framework/Versions/A/Resources/flutter_assets/bin
So that's what I use with Process.run(...) and it works locally. However, if I try to notarize the app in Xcode and export it then app will crash immediately when trying to run an included binary. I opened Console and found the following entry in launchd.log corresponding to the time the app crashed:
2022-01-07 08:28:04.875197 (gui/501/application.com.example.flutterSample.1772919.1772925) : removing job: caller = runningboardd
2022-01-07 08:28:04.875204 (gui/501 [100020]) : removing service: application.com.example.flutterSample.1772919.1772925
2022-01-07 08:28:04.875309 (gui/501/application.com.example.flutterSample.1772919.1772925) : internal event: PETRIFIED, code = 0
2022-01-07 08:28:04.875311 (gui/501/application.com.example.flutterSample.1772919.1772925) : job state = removed
I wasn't able to find any other information about the error. If I enclose the code using Process.run in a try-catch block it doesn't change anything, the entire application crashes anyway. The same happens if I use a zone or onError handler as described on the handling errors page in Flutter docs.
Extra details:
I've disabled com.apple.security.app-sandbox in the *.entitlements files, with it running the processes didn't work even locally
I've enabled hardened runtime in Xcode, it was required to notarize the app.
the app also crashes if instead or exporting from Xcode I plainly archive the build directory (with tar) and send it via internet (or set com.apple.quarantine with xattr). It won't crash if I just pack and unpack it without marking it as quarantined. That makes sense but I expected that notarizing the app would fix it.
So, what can I do to prevent these crashes, or at least get more details when they happen so I can investigate further?
As it turns out, it was an issue with paths. If I go to my project directory and then enter the debug build directory:
$ cd build/macos/Build/Products/Debug
then from this point I can access two identical asset directories:
$ ls -lh App.framework/Versions/A/Resources/flutter_assets
(output omitted)
$ ls -lh flutter_sample.app/Contents/Frameworks/App.framework/Versions/A/Resources/flutter_assets
(the same output, omitted)
As it turns out, I was actually trying to call the binary in the first asset directory (even though I posted the second one in the question). And apparently the other one is correct when the app is packaged for distribution. After changing this the binaries work in the exported, notarized app.
Try to firstly copy your binary from assets folder to somewhere else. Let's say copy to /tmp/myfile. Then ensure you have executable permission to it (chmod +x /tmp/myfile using shell; should have sth similar using code). Then execute that binary.
This is a common practice, at least for platforms like Android. Because in android, an asset does not have a "normal" path so you have to copy it out, IIRC.
If this method works, it is great; even if not, now you can manually call /tmp/myfile in a shell to see what is happening.
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 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?