shoes / shoes3

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

Help with error when running packaged .exe #427

Closed JDsnyke closed 5 years ago

JDsnyke commented 5 years ago

The Shoes app log shows the following when running the packaged exe file (from a .shy)

Could someone let me know why? The .shy seems to work fine...

Using Shoes 3.3.7

Any help is appreciated. Thanks!

Error in <unknown> line 0 | 2019-01-01 12:20:59 +0000
No such file or directory @ rb_sysopen - username
C:/Program Files (x86)/Shoes/lib/shoes.rb:376:in `read'
C:/Program Files (x86)/Shoes/lib/shoes.rb:376:in `read_file'
C:/Program Files (x86)/Shoes/lib/shoes.rb:352:in `visit'
eval:1:in `<main>'
ccoupe commented 5 years ago

Without the code you're running I can only guess. You are opening a file named 'username' and I'll bet it's not where you think it is - a common problem when dealing with Windows. Put a `debug "#{Dir.getwd}" at the start to find out where the app is really running.

JDsnyke commented 5 years ago

Running that gives me,

Debug in <unknown> line 0 | 2019-01-02 10:22:00 +1100
C:/Users/username/AppData/Local/Temp/shoes-UAT-for-OT.10400

My main code can be found here - https://github.com/JDsnyke/UAT-for-OT/blob/master/app.rb

I apologize for the horrible code, I am quite new to this lol.

ccoupe commented 5 years ago

As expected, the shy is expanded into the temporary dir - do you have "./assets/version/current.ver in there ? When does the error occur - at the start or after some button press or ..

JDsnyke commented 5 years ago

At the very start of running the exe. Yep, all files have been expanded to the temp folder too. The shy works fine as well though... It's just the exe file...

ccoupe commented 5 years ago

Instead of "./assets/.." try "assests/.." - take off the './'. See what happens.

JDsnyke commented 5 years ago

Nope. Still the same error log when running the repackaged exe.

JDsnyke commented 5 years ago

I feel like this might have to do with using version 3.3.7. Could I downgrade shoes to version 3.3.6?

ccoupe commented 5 years ago

The packaging step uses a Shoes 3.3.6 download to build the exe so you are using 3,.3.6, depending on how you packaged AND where you are test. It's easy to uninstall Shoes and then install an older one. I don't think it's shoes 3.3.7. Packaging hasn't changed for years because it doesn't play nice on windows 10 and can't be fixed.

Isolate where the problem is happening put a debug log entry before and after and move them to narrow the range of code. If this is advanced secondary packaging - then you have a much more to debug.

JDsnyke commented 5 years ago

Thanks @ccoupe. I'll keep looking and hoping for the best. 😃