shoes / shoes3

a tiny graphical app kit for ruby
http://walkabout.mvmanila.com
Other
179 stars 19 forks source link

Packaging with an icon causes invalid bit count #448

Closed adamgotterer closed 4 years ago

adamgotterer commented 4 years ago

When setting an installer icon and app .ico icon for windows I see the following in the console:

Error in <unknown> line 0 | 2019-08-22 15:38:31 -0400
invalid bit count -- 32
/Applications/Shoes.app/Contents/MacOS/lib/exerb/resource/group_icon.rb:63:in `pack'
/Applications/Shoes.app/Contents/MacOS/lib/exerb/resource/group_icon.rb:41:in `block in pack'
/Applications/Shoes.app/Contents/MacOS/lib/exerb/resource/group_icon.rb:41:in `collect'
/Applications/Shoes.app/Contents/MacOS/lib/exerb/resource/group_icon.rb:41:in `pack'
/Applications/Shoes.app/Contents/MacOS/lib/exerb/resource.rb:192:in `to_resource_entry'
/Applications/Shoes.app/Contents/MacOS/lib/exerb/resource.rb:114:in `block (5 levels) in pack'
/Applications/Shoes.app/Contents/MacOS/lib/exerb/resource.rb:113:in `each'
/Applications/Shoes.app/Contents/MacOS/lib/exerb/resource.rb:113:in `block (4 levels) in pack'
/Applications/Shoes.app/Contents/MacOS/lib/exerb/win32/resource_directory.rb:24:in `initialize'
/Applications/Shoes.app/Contents/MacOS/lib/exerb/resource.rb:112:in `new'
/Applications/Shoes.app/Contents/MacOS/lib/exerb/resource.rb:112:in `block (3 levels) in pack'
/Applications/Shoes.app/Contents/MacOS/lib/exerb/resource.rb:111:in `each'
/Applications/Shoes.app/Contents/MacOS/lib/exerb/resource.rb:111:in `block (2 levels) in pack'
/Applications/Shoes.app/Contents/MacOS/lib/exerb/win32/resource_directory.rb:24:in `initialize'
/Applications/Shoes.app/Contents/MacOS/lib/exerb/resource.rb:110:in `new'
/Applications/Shoes.app/Contents/MacOS/lib/exerb/resource.rb:110:in `block in pack'
/Applications/Shoes.app/Contents/MacOS/lib/exerb/resource.rb:109:in `each'
/Applications/Shoes.app/Contents/MacOS/lib/exerb/resource.rb:109:in `pack'
/Applications/Shoes.app/Contents/MacOS/lib/exerb/executable.rb:42:in `pack'
/Applications/Shoes.app/Contents/MacOS/lib/exerb/executable.rb:64:in `write'
/Applications/Shoes.app/Contents/MacOS/lib/shoes/winject.rb:33:in `save'
/Applications/Shoes.app/Contents/MacOS/lib/shoes/packshoes.rb:38:in `dnlif_exe'
/Applications/Shoes.app/Contents/MacOS/lib/shoes/app_package.rb:399:in `dnlif_exe'
/Applications/Shoes.app/Contents/MacOS/lib/shoes/app_package.rb:366:in `platform_dnlif'
/Applications/Shoes.app/Contents/MacOS/lib/shoes/app_package.rb:197:in `block (10 levels) in <top (required)>'
ccoupe commented 4 years ago

It appears you are running OSX and want a download if needed for Windows and you are using the advanced options. That is not a well tested area of Shoes. I only used it once and gave up because the install scripts you need to write are less than pleasant and Windows 10 will almost never run a dnlif. In fact, 'include shoes' may not work on Win 10 either. That is because Windows believes installing code from a resource is virus like behavior unless the code is signed. It is virus like. Code signing costs money every year, and if I had a license, it wouldn't apply to you.

Merge packaging (Maintain Shoes->Package) is the only working method for Windows and requires Windows to do it and some time to learn it. OSX is likely to require code signing in the future (perhaps already). Future versions of Shoes won't include the old code you're trying to run. It just can't work. For merge packagin, see the Wiki..

adamgotterer commented 4 years ago

Thanks for confirming that it doesn't work!

You are also correct that trying to bundle shoes with Win 10 doesn't work. It's not that it doesn't work on Windows itself, I actually couldn't get that far. Shoes was downloading some package to include in the installer/exe but after it downloads it doesn't move on to building the executable.

Packaging worked fine for my needs. Thanks again. I'll close this ticket.