Indeed, a basic Hello World script worked with OCRA. And by the way, it's loading ALL the Qt dlls like QtOpenGL4.dll, QtSql4.dll, ... that are not needed :s I guess and hope there is a way to remove them from the dependencies because a 10 lines Hello World is already 36MB!
Anyway, I tried to find what was messing up everything in my script... and quickly found! It seems to be one of the required dependencies.
I simply added all the "require" calls of my script to that Hello World, and the error occurred. With just *require 'zip/zipfilesystem'*, the error occurs... and I need the zip Here is a minimal script raising the error:
Ocra tries to load all modules that are registered using Kernel#autoload, since they are potential dependencies. For some reason, this fails with Qt. You can disable this using --no-autoload, for example:
ocra --no-autoload script.rb
That seems to work around your problem.
With regard to the size of the executable; Ocra includes all DLL's that are loaded in the Ruby process when the program is tested while creating the executable, so for some reason they are actually loaded by the qtbindings. I don't know if they are actually optional. You can use --no-autodll to prevent this behaviour, but you will need to specify the required DLL's explicitly using --dll. I recommend taking a look at the InnoSetup generator (--innosetup) which installs instead of unpacking.
> Ocra tries to load all modules that are registered using Kernel#autoload, > since they are potential dependencies. For some reason, this fails with Qt. > You can disable this using --no-autoload, for example:
> ocra --no-autoload script.rb
> That seems to work around your problem.
> With regard to the size of the executable; Ocra includes all DLL's that are > loaded in the Ruby process when the program is tested while creating the > executable, so for some reason they are actually loaded by the qtbindings. I > don't know if they are actually optional. You can use --no-autodll to > prevent this behaviour, but you will need to specify the required DLL's > explicitly using --dll. I recommend taking a look at the InnoSetup generator > (--innosetup) which installs instead of unpacking.