I’ve now built several apps and it appears to depend on the size of the project. For instance App Wrapper 4 goes from 90 MB (2021r2.1) to 108 MB (2024r3.1). Which is only ~ 20% larger.
I’d still like to know of a way to make the application sizes similar or even better, smaller than before.
Yes, using “AppWrapper”. Beatrix W. pointed me to ImageOptim to reduce picture file sizes, which is very helpful if a large amount of pictures is included in the project.
Even the compiled application can be dragged onto ImageOptim to reduce its file size.
Most of the weight gets added to the main executable file, as for the additional libraries, it depends if Xojo loads them when needed or loads them at launch time. A bit surprised to see 'em considering I’m not using 'em.
Hmmm. It does seem to me the this dynamic linking business only really works if you’re using the library version that the OS version on that machine came with. Otherwise you have to supply your own and it sits there taking up disk space, along with all the others.
I don’t think there’s a need to drop support for more reliable/stable operating systems. The problem is that large unused libraries aren’t being stripped.
Keep in mind that there may be internal framework requirements. For instance, the web framework uses the gzip plugin to compress and decompress http streams.
I’ve not changed that or anything else, I simply built my apps with the new version of Xojo and noticed a file size increase.
I suspect what is happening is that Xojo isn’t stripping at a method, property or constant level, only object level.
As the app class references folderitem, folderitem gets included and anything the folderitem references is also included, including the zip extends. Doesn’t matter if you use folderitem, zip functions or access the app class or not.
There’s enough feature requests for Xojo to do a better job at code stripping, but getting their attention on the matter is a different challenge.
I was hoping to find a trick or two I could to make the application size smaller myself, but I don’t think I can.
lol… Yes you can, but have you tried it? Does your application even launch?
Compressing images is useful, but with Xojo made apps, most of the weight is either the compiled application or the Xojo framework (which has also grown in size).
I even wrote an app (that has since been deprecated) to compress ICNS files to save on disk space.
I do understand. My point was that your code isn’t the only thing that creates those dependencies. For instance, just using a String in your project, means that libicu is required, but even if you don’t physically use a String in your code, the Xojo framework always does.
The big one for me is HTMLviewer under Windows. It’s a very useful control I’d like to use more often, but man, that extra 100MB is hard to stomach. There must be a better way.
The answer to HTMLViewer bloat on Windows is here (using the WebView2 system, which is Windows’ new (ish) Edge browser replacement for the old IE11 engine)… https://tracker.xojo.com/xojoinc/xojo/-/issues/59961
WebView2 is present on Windows 11, may or not be present on Windows 10, it’s almost always absent in prior versions.
For windows, when Xojo adds the option to compile apps to include WebView2, the Xojo startup routine should look for the presence of it, if not found request the user to download and install one from: https://developer.microsoft.com/microsoft-edge/webview2/ and quit until finding one.
Logically being able to build a version with an embedded Chrome Engine (CEF) is a must to avoid use cases when WebView2 is broken for unknown reasons on the user machine.