larsch/ocra

Failed to UpdateResource 87

Closed this issue · 1 comments

I'm getting this error when compiling the exe.
It is something related the icon, since if i remove the --icon parameter, the error will disappear.

I really need to change the icon, i tried with third party programs, but the executable got broke after icon replacement with Resource Hacker.

Here's the output:

G:\WinRuby\InstallSupport>ocra oemi-installer.rb --console --add-all-core --no-dep-run --gemfile Gemfile --gem-full --output "OEMI-I.exe" --icon src\system-update.ico
...
...
...
=== Building OEMI-I.exe
failed to UpdateResource 87
=== Adding user-supplied source files
=== Adding ruby executable ruby.exe
=== Adding detected DLL C:/Ruby23-x64/bin/libffi-6.dll
=== Adding external manifest C:/Ruby23-x64/DevKit/bin/install-info.exe.manifest
=== Adding external manifest C:/Ruby23-x64/DevKit/bin/install.exe.manifest
=== Adding external manifest C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/megar-``0.0.4/lib/js_ref_impl/js.manifest
=== Adding library files
=== Compressing 34176341 bytes

LZMA 4.65 : Igor Pavlov : Public domain : 2009-02-03
=== Finished building OEMI-I.exe (5692942 bytes)

So everything went fine, but failed to UpdateResource 87 won't let me change my icon.
The .ico file i provide, contains all the supported resolutions.

I choosed to reboot my system, and i noticed there were some Windows updates pending.
So I did update Windows, rebooted the PC, and then i was able to add icons again.

It would be good to specify on the README that your system must be fully updated before compiling an exe, it would save a lot of times to people who get in the same error as i did.