# Is there a way to build an app that does not depend on external resource files?

**URL:** <https://forum.xojo.com/t/is-there-a-way-to-build-an-app-that-does-not-depend-on-external-resource-files/69432>\
**Category:** General\
**Created:** [April 4, 2022, 7:04pm UTC](https://forum.xojo.com/t/is-there-a-way-to-build-an-app-that-does-not-depend-on-external-resource-files/69432 "2022-04-04T19:04:16Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ben\_D](https://forum.xojo.com/user_avatar/forum.xojo.com/ben_d/32/8281_2.png) [@Ben\_D](https://forum.xojo.com/u/Ben_D)\
**Post date:** [April 4, 2022, 7:04pm UTC](https://forum.xojo.com/t/is-there-a-way-to-build-an-app-that-does-not-depend-on-external-resource-files/69432/1 "2022-04-04T19:04:16Z")

</div>

When building with RealBasic, we used to obtain a .exe that included all the resources, pictures, sounds, scripts, etc all inside the .exe and no external file was required to run the app. With Xojo, I find like 25 different external .DLL, .PNG and .MP3 files that are required to launch the built app. Why is that and is there a way to build to just ONE single .exe file and nothing else?

---

<div class="post-metadata">

**Author:** ![Anthony\_G\_Cyphers](https://forum.xojo.com/user_avatar/forum.xojo.com/anthony_g_cyphers/32/16862_2.png) [@Anthony\_G\_Cyphers](https://forum.xojo.com/u/Anthony_G_Cyphers)\
**Post date:** [April 4, 2022, 7:23pm UTC](https://forum.xojo.com/t/is-there-a-way-to-build-an-app-that-does-not-depend-on-external-resource-files/69432/2 "2022-04-04T19:23:13Z")

</div>

The best thing to do is build an installer using something like [InnoSetup](https://jrsoftware.org/isinfo.php), but there are some apps out there that will attempt to compress everything down in to a single EXE that is extracted each time the application is run. In my experience, these aren’t very reliable and tend to trigger false positives on antivirus software.

---

<div class="post-metadata">

**Author:** ![Ben\_D](https://forum.xojo.com/user_avatar/forum.xojo.com/ben_d/32/8281_2.png) [@Ben\_D](https://forum.xojo.com/u/Ben_D)\
**Post date:** [April 4, 2022, 7:27pm UTC](https://forum.xojo.com/t/is-there-a-way-to-build-an-app-that-does-not-depend-on-external-resource-files/69432/3 "2022-04-04T19:27:12Z")

</div>

Interesting approach. Although it does not solve my problem, I’ll still try it tomorrow, it’s still better than zipping a ton of external files, thanks. I’m asking because I’m remotely pushing updates to my app and now it has become extremely complicated, compared to 2 days ago when I was still using RealBasic. With RB, it built to a single .exe and so when remotely updating the app, all I had to code is to send the .exe via a socket and write it to a file on the remote computer. Now it’s a bunch of folders full of DLL, pictures, sounds, etc… 😛

---

<div class="post-metadata">

**Author:** ![Anthony\_G\_Cyphers](https://forum.xojo.com/user_avatar/forum.xojo.com/anthony_g_cyphers/32/16862_2.png) [@Anthony\_G\_Cyphers](https://forum.xojo.com/u/Anthony_G_Cyphers)\
**Post date:** [April 4, 2022, 7:30pm UTC](https://forum.xojo.com/t/is-there-a-way-to-build-an-app-that-does-not-depend-on-external-resource-files/69432/4 "2022-04-04T19:30:59Z")

</div>

I build an installer that is pushed to the client. The updater runs the installer then exits the application.

---

<div class="post-metadata">

**Author:** ![Ivan\_Tellez](https://forum.xojo.com/letter_avatar_proxy/v4/letter/i/a9a28c/32.png) [@Ivan\_Tellez](https://forum.xojo.com/u/Ivan_Tellez)\
**Post date:** [April 4, 2022, 7:44pm UTC](https://forum.xojo.com/t/is-there-a-way-to-build-an-app-that-does-not-depend-on-external-resource-files/69432/5 "2022-04-04T19:44:09Z")

</div>

> [@Ben\_D](#):
>
> With RB, it built to a single .exe and so when remotely updating the app, all I had to code is to send the .exe via a socket and write it to a file on the remote computer.

It is the same. Just put that code in a loop that iterates throug the app folder, send each file and write it.

Improvement on that: Send a file with the signature of each of the files in the folder (MD5) and send only those that have changed.

NOTE: For the same Xojo version, usually ONLY the exe changes

---

<div class="post-metadata">

**Author:** ![Ben\_D](https://forum.xojo.com/user_avatar/forum.xojo.com/ben_d/32/8281_2.png) [@Ben\_D](https://forum.xojo.com/u/Ben_D)\
**Post date:** [April 4, 2022, 7:47pm UTC](https://forum.xojo.com/t/is-there-a-way-to-build-an-app-that-does-not-depend-on-external-resource-files/69432/6 "2022-04-04T19:47:14Z")

</div>

If silently or at the very least automating with the least clicks possible the installer is actually an option, then it would solve the entire process, indeed. That sounds like a nice compromise.

---

<div class="post-metadata">

**Author:** ![Andrew\_Lambert](https://forum.xojo.com/user_avatar/forum.xojo.com/andrew_lambert/32/215_2.png) [@Andrew\_Lambert](https://forum.xojo.com/u/Andrew_Lambert)\
**Post date:** [April 4, 2022, 7:50pm UTC](https://forum.xojo.com/t/is-there-a-way-to-build-an-app-that-does-not-depend-on-external-resource-files/69432/7 "2022-04-04T19:50:57Z")

</div>

Single file executables went away in 2008: [Real Software Forums • View topic - Win32 Application Builder Changes](https://web.archive.org/web/20200920081604/http://forums.realsoftware.com/viewtopic.php?f=1&t=22261)

---

<div class="post-metadata">

**Author:** ![Ben\_D](https://forum.xojo.com/user_avatar/forum.xojo.com/ben_d/32/8281_2.png) [@Ben\_D](https://forum.xojo.com/u/Ben_D)\
**Post date:** [April 4, 2022, 8:17pm UTC](https://forum.xojo.com/t/is-there-a-way-to-build-an-app-that-does-not-depend-on-external-resource-files/69432/8 "2022-04-04T20:17:16Z")

</div>

My previous IDE before Xojo2021r3.1 was older than 2008.

---

<div class="post-metadata">

**Author:** ![Thom\_McGrath](https://forum.xojo.com/user_avatar/forum.xojo.com/thom_mcgrath/32/192_2.png) [@Thom\_McGrath](https://forum.xojo.com/u/Thom_McGrath)\
**Post date:** [April 5, 2022, 4:20am UTC](https://forum.xojo.com/t/is-there-a-way-to-build-an-app-that-does-not-depend-on-external-resource-files/69432/9 "2022-04-05T04:20:56Z")

</div>

Definitely possible. InnoSetup can make it happen, even better with some custom logic. [Here’s my script](https://github.com/thommcgrath/Beacon/blob/1.6/Installers/Windows/Setup.iss). Use it as inspiration, don’t just copy it of course. In the `[Run]` section, the first line is to launch the app after install. But I have the `Check: not CmdLineParamExists('/NOLAUNCH')` flag on it too. The logic for that is under the `[Code]` section. This allows me a lot of flexibility from a single file. If the user downloads from the website and runs it, the installer behaves as normal with its user interface and all that. If my updater logic runs it, my updater will do so in one of two ways. If the user presses an “install now” button, my app quits and runs the installer with the switches `/SILENT /SP- /NOICONS /CLOSEAPPLICATIONS /RESTARTAPPLICATIONS` which tells the installer to just do the installation without asking. Since there is no `/NOLAUNCH` switch, the installer will immediately launch my app again when completed. However, if the user quits my app after an update has been downloaded in the background, I run the installer with `/VERYSILENT /SP- /NOICONS /CLOSEAPPLICATIONS /NOLAUNCH` which causes the update to run completely in the background and will not launch my app when finished. So the next time the user launches my app, it’s all up to date. Presto, silent automatic updates. The user can opt out of this, of course.

This may be a bit advanced for what you’re looking to do, but the point I’m trying to make is that a good installer can have a lot of flexibility.

---

<div class="post-metadata">

**Author:** ![Hans-Norbert\_Gratzal](https://forum.xojo.com/user_avatar/forum.xojo.com/hans-norbert_gratzal/32/2143_2.png) [@Hans-Norbert\_Gratzal](https://forum.xojo.com/u/Hans-Norbert_Gratzal)\
**Post date:** [April 5, 2022, 10:40am UTC](https://forum.xojo.com/t/is-there-a-way-to-build-an-app-that-does-not-depend-on-external-resource-files/69432/10 "2022-04-05T10:40:41Z")

</div>

[https://en.wikipedia.org/wiki/UPX](https://UPX)  
But external files are then still unpacked

---

<div class="post-metadata">

**Author:** ![Arnaud\_N](https://forum.xojo.com/user_avatar/forum.xojo.com/arnaud_n/32/21824_2.png) [@Arnaud\_N](https://forum.xojo.com/u/Arnaud_N)\
**Post date:** [April 5, 2022, 7:11pm UTC](https://forum.xojo.com/t/is-there-a-way-to-build-an-app-that-does-not-depend-on-external-resource-files/69432/11 "2022-04-05T19:11:50Z")

</div>

> [@Ivan\_Tellez](#):
>
> It is the same. Just put that code in a loop that iterates throug the app folder, send each file and write it.

This is a nice solution. Another one is to compress (e.g. zip) all files, send the single file and decompress it when updating.

---

<div class="post-metadata">

**Author:** ![Ben\_D](https://forum.xojo.com/user_avatar/forum.xojo.com/ben_d/32/8281_2.png) [@Ben\_D](https://forum.xojo.com/u/Ben_D)\
**Post date:** [April 12, 2022, 8:47pm UTC](https://forum.xojo.com/t/is-there-a-way-to-build-an-app-that-does-not-depend-on-external-resource-files/69432/12 "2022-04-12T20:47:16Z")

</div>

It’s actually closer to what I initially wanted and I’ll be moving forward with the ZIP solution. I still don’t understand why all-in-one .exe are not a thing in Xojo anymore. It’s just so awkward to have all those hundreds of files in multiple folders.

---

<div class="post-metadata">

**Author:** ![Thom\_McGrath](https://forum.xojo.com/user_avatar/forum.xojo.com/thom_mcgrath/32/192_2.png) [@Thom\_McGrath](https://forum.xojo.com/u/Thom_McGrath)\
**Post date:** [April 12, 2022, 8:48pm UTC](https://forum.xojo.com/t/is-there-a-way-to-build-an-app-that-does-not-depend-on-external-resource-files/69432/13 "2022-04-12T20:48:53Z")

</div>

The short answer is that Microsoft said so.

---

<div class="post-metadata">

**Author:** ![Ben\_D](https://forum.xojo.com/user_avatar/forum.xojo.com/ben_d/32/8281_2.png) [@Ben\_D](https://forum.xojo.com/u/Ben_D)\
**Post date:** [April 12, 2022, 9:50pm UTC](https://forum.xojo.com/t/is-there-a-way-to-build-an-app-that-does-not-depend-on-external-resource-files/69432/14 "2022-04-12T21:50:07Z")

</div>

After seeing the mess they shat (Windows 11) I pretty much stopped listening to anything Microsoft has to say and I stopped buying their products (for additional reasons).

---

<div class="post-metadata">

**Author:** ![Ivan\_Tellez](https://forum.xojo.com/letter_avatar_proxy/v4/letter/i/a9a28c/32.png) [@Ivan\_Tellez](https://forum.xojo.com/u/Ivan_Tellez)\
**Post date:** [April 12, 2022, 10:43pm UTC](https://forum.xojo.com/t/is-there-a-way-to-build-an-app-that-does-not-depend-on-external-resource-files/69432/15 "2022-04-12T22:43:47Z")

</div>

Microsoft did nothing. The way xojo was doing a “single exe” was just a hack, it was hiding the same DLLs inside the file, not making a real single exe. It was removed becaause it was slower, more unstable and other security problems.

---

<div class="post-metadata">

**Author:** ![Liam\_Sawrey](https://forum.xojo.com/user_avatar/forum.xojo.com/liam_sawrey/32/12255_2.png) [@Liam\_Sawrey](https://forum.xojo.com/u/Liam_Sawrey)\
**Post date:** [April 20, 2022, 9:39am UTC](https://forum.xojo.com/t/is-there-a-way-to-build-an-app-that-does-not-depend-on-external-resource-files/69432/16 "2022-04-20T09:39:25Z")

</div>

I have tested and used Enigma VirtualBox with Xojo Web apps and everything works correctly. It moves any file into a virtual drive. Can also include registry entries. Is free but paid version allows more features

[https://enigmaprotector.com/en/aboutvb.html](https://enigmaprotector.com/en/aboutvb.html)

> Application virtualization system for Windows. Enigma Virtual Box enables application files and registry to be consolidated in a single executable file, without loss of efficiency and without virtualized files having to be extracted to the HDD. Enigma Virtual Box is a free application that supports both x86 and x64 binaries.

Paid version below with extra features

[https://enigmaprotector.com/en/about.html](https://enigmaprotector.com/en/about.html)

---

<div class="post-metadata">

**Author:** ![Ben\_D](https://forum.xojo.com/user_avatar/forum.xojo.com/ben_d/32/8281_2.png) [@Ben\_D](https://forum.xojo.com/u/Ben_D)\
**Post date:** [April 22, 2022, 11:08am UTC](https://forum.xojo.com/t/is-there-a-way-to-build-an-app-that-does-not-depend-on-external-resource-files/69432/17 "2022-04-22T11:08:03Z")

</div>

I initially wanted to do Arnaud’s solution (send a ZIP and expand it on the clients) but I couldn’t find any free way of doing this in Xojo (natively or with plugins) so I ended up doing Ivan\_Tellez’s solution, which works beautifully, all things considered. And for some reason, Windows 10 doesn’t complain about it being a virus anymore (I think due to 64-bit compiling instead of 32-bit, not sure)

Thanks all for the suggestions.

---

<div class="post-metadata">

**Author:** ![Ulisses\_Cappato](https://forum.xojo.com/user_avatar/forum.xojo.com/ulisses_cappato/32/2603_2.png) [@Ulisses\_Cappato](https://forum.xojo.com/u/Ulisses_Cappato)\
**Post date:** [May 12, 2022, 2:39pm UTC](https://forum.xojo.com/t/is-there-a-way-to-build-an-app-that-does-not-depend-on-external-resource-files/69432/18 "2022-05-12T14:39:11Z")

</div>

Turbo Studio: [Virtualize Your Applications with Turbo Studio - Turbo.net](https://turbo.net/studio)
