This thread https://forum.xojo.com/45255-xojo-2017-single-file-exe-64-bit-application-packers has discussion of using packer software to convert Xojo apps into single-file EXEs.
If you have feelings for or against single-file EXEs, please add your thoughts here:
- Windows makes it very difficult to have multi-file apps in a few specific cases: Screensavers which must live in the communal Windows folder, resulting in DLL hell. Another example: command-line tools which may need to live in a common folder. This problem is worse in 64 bit Xojo apps because of the rule that DLLs must reside in the same folder as the EXE. (see http://developer.xojo.com/64-bit-guidelines$windows )
- Creating a one-off demo for a client - they can run it once and throw it away, not worrying about installing and then uninstalling the app.
- Other single-use tools for which the download / install / run / uninstall process is cumbersome.
- Security: a single-file EXE can be code-signed. By contrast, a multi-file app with external DLLs presents a security risk: a malicious actor can swap out a DLL with one of their own.
- FileSize: packed apps may be compressed to save space.
- If a DLL is buggy, the OS can’t patch or shim it with a non-buggy one.
- Single-File EXEs created by application packers are sometimes mis-detected as malware by antivirus software
- Cost and Build complexity: one has to rely on a third-party system.
- Debugging: you can’t debug a packed app using the Xojo IDE (maybe? I’ve not ever tried)
Microsoft has it’s own single file : AppX, the format of UWP executable, used in the Windows Store. It is perfectly feasible to use the Desktop Converter and sign the AppX to side launch it.
For an app, I don’t really see the interest of a single exe, since it is expected to provide an installer which will place all required files where they are needed. And as you noted, DLLs may need updating.
For a command line tool, being able to come up with a single exe is obviously better.
Not an issue as you don’t debug the built app. You get a fresh build every time you debug, which you obviously wouldn’t be packing.
[quote=372889:@Michel Bujardet]Microsoft has it’s own single file : AppX, the format of UWP executable, used in the Windows Store. It is perfectly feasible to use the Desktop Converter and sign the AppX to side launch it.
Interesting, you are talking about this I think? https://docs.microsoft.com/en-us/windows/uwp/porting/desktop-to-uwp-run-desktop-app-converter I assume these AppX files will only run via the Windows Store?
You could try using Run Paused. Pack the app into a single exe then launch the resulting single file packed app. It should then connect back to the debugger in the IDE just like always.
Yes, that is what the desktop converter does. They can be run under all recent versions of Windows 10, if the AppX is signed.
Do you know if us mere mortals distribute signed AppX containers outside of the Windows Store? Or is this a Microsoft store-only thing?
If the AppX is signed, it does start under any recent Windows 10.