0

I want to make a simple, minimalist custom cross-platform installer for a specific Qt application. The installer looks like this:

Simple Installer UI

But in one use-case, the data to store there is > 5GB long. I have tried the following:

  1. Using Qt Installer Framework

    • Does not allow offline updates.
    • It is not possible (or it is very hard) to make a custom Qt Quick Controls 2 UI like the shown above
  2. Compiling Qt statically and embed the resource with rcc

    • Success on compiling Qt statically
    • Using CONFIG += resources_big in .pro file to allow two-pass of rcc tool to compile the big resources
    • Does works for files with < 2GB, but not for larger ones. I use this for files with < 2GB
    • If > 2GB, the linker (ld) fails with ...relocation truncated to fit...
    • I added the flag -mcmodel=medium as suggested here. It does not works, nor does -mcmodel=large nor -Wl,--image-base -Wl,0x100000000 nor -Wl,--image-base -Wl,0x180000000
  3. Compiling Qt statically and append data to the end of the executable (this seems to be the best approach for > 2GB files)

    • Append my > 5GB zip-compressed test file
    • Append 8 bytes with the size in bytes
    • Works on Linux
    • Works on Windows with no so large files (shows This app cannot run on your PC)

I want some advices about how to make the third approach work, as it seems to be the best one for > 2GB files. But new and fresh ideas are welcome too.

An alternative cross-platform installer framework that correct the missing features of Qt's one is also welcome.

I do not want to involve the winapi if possible. But a short and easy-to-implement solution will be accepted too.

BTW, I currently have a PC with 4GB of RAM. But this have not been a problem.

lateus
  • 371
  • 4
  • 15
  • See [this question](https://stackoverflow.com/q/6976693/1983398), I don't think it's possible to make any executable >2GB. – ssbssa Oct 14 '19 at 10:46
  • I already saw it. But with installer frameworks you can create an executable with more of 2 GB. In fact, I saw a working FIFA installer with > 20 GB. Also, with WinRAR you can do that too (a self-extracting file). – lateus Oct 15 '19 at 19:37
  • I tried to create a WinRAR self-extracting file larger than 4GB, but I failed. I even got this error message from WinRAR: `Too large SFX archive. Windows cannot run the executable file exceeding 4 GB.` – ssbssa Oct 16 '19 at 16:31
  • Hmmm... I have created self-extracting files before, and one of them more than 2 GB (an installer for a GTA game), but its size was > 2GB (2.6 I think). I have never tried one with more than 4 GB. I will give a try. Also I will make some tests with the Qt Installer Framework to see if it has some limits. Thanks for the tip. – lateus Oct 18 '19 at 19:38
  • Yes, >2GB works for the self-extractor, but not >4GB. And you really have a >20GB FIFA installer executable? – ssbssa Oct 18 '19 at 20:39
  • Ups sorry for the delay. Yes a also checked that > 2GB works for the self-extractor but no >4GB. The Qt installer frameworks also fails with > 4GB, which is a problem because the installer right now is 3.6 GB (Qt 5.13.2). – lateus Nov 01 '19 at 18:17
  • And yes. I used a FIFA installer with more that 20 GB. I do not have it anymore. It installed FIFA and lots of mods/updates. That was back in 2014 I think, and I remember that it tooks a lot of time to load (more than 15 minutes). BTW, sorry my english (it's not my mother lang). – lateus Nov 01 '19 at 18:20

0 Answers0