Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--icon src\app.ico results in opcode error, without the setting build goes fine. #12

Open
reneweteling opened this issue Feb 13, 2024 · 5 comments

Comments

@reneweteling
Copy link

when setting an icon the exe gets an icon only i get an opcode error, without the icon it works just fine.

When building a app like so on windows 11

bundle exec ocran `
  --windows `
  --add-all-core `
  --no-lzma `
  --icon src\app.ico `
  --output icon-true.exe `
  src\window.rb

The app has the nice icon, only when starting you get this error

image

When building without the icon it all works fine, except for the icon obviously.

bundle exec ocran `
  --windows `
  --add-all-core `
  --no-lzma `
  --output icon-false.exe `
  src\window.rb

No icon, all is fine

image

Environment

MBP m2 max
UTM (https://mac.getutm.app/) running Windows 11 for Apple silicon
ruby: Ruby+Devkit 3.0.6-1 (x64) (https://rubyinstaller.org/downloads/)

window.rb

just a small file to see how glimmer would work with ocran.

require 'glimmer-dsl-libui'

include Glimmer


window('hello world', 300, 200, true) {
  on_closing do
    puts 'Bye Bye'
  end
}.show
@Largo
Copy link
Owner

Largo commented Feb 14, 2024

Thanks for the report. I'm looking into it. Icons used to work, so I'm checking if it works with our unreleased version.
Good to see glimmer lib-ui working. It's the fastest starting GUI Framework for Ruby on Windows, due to it not loading as many files as other libs (GTK3 for instance).

@Largo
Copy link
Owner

Largo commented Feb 14, 2024

I tested with the current ocran version on rubygems 1.3.15 and the master version and couldn't get the same error.
Can you upload the file with the error and the icon that you are using?
I'll also be releasing a new version on rubygems in a bit.

@reneweteling
Copy link
Author

Archive.zip

Nice you can upload zips, thats new (at least to me) thanks @Largo for the support!!

@Largo
Copy link
Owner

Largo commented Feb 14, 2024

Sorry, I meant the generated .exe file with the opcode error. I want to check if it also shows the same error on a non virtualized windows installation.

@reneweteling
Copy link
Author

Archive.zip

Hi Largo,

The zip contains, all source files exact.exe (works) exact_icon.exe does not work, and the build.ps1 contains the commands used to generate the both items.

.
├── bin
│   └── build.ps1
├── exact.exe
├── exact_icon.exe
└── src
    ├── app.ico
    └── window.rb

Thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants