I've made some progress with my problem of packager segfaults in r1314 when compiled with Ruby 1.8.7. In binject.c there are three calls to rb_file_open that used to be rb_fopen. For me, they need to be rb_fopen. The generated intern.h as has this wrong as well. They are quite different functions. Should I file a bug report? Sadly the packager hangs (lib/shoes/pack.rb) later with an Uninitialized Constant Shoes::Pack::RELEASE_NAME. Simply replacing it with ::RELEASE_NAME didn't work so I've got more Ruby to learn.
> Sadly the packager hangs (lib/shoes/pack.rb) later with an Uninitialized > Constant Shoes::Pack::RELEASE_NAME. Simply replacing it > with ::RELEASE_NAME didn't work so I've got more Ruby to learn. > That was fixed in pack.rb by replacing RELEASE_NAME with Shoes::RELEASE_NAME. Works fine with ruby 1.8.7. The .exe, .dmg and .run are about the right size, for the default download shoes when the script runs. Running "shoes -p" in Ruby 1.9.1 fails with "Uninitalized Constant Shoes::Aoo::I_NET". Assuming I understand the 1.9.1 scoping rules and how shoes does page loading (evals) I don't see any easy *backwards* compatible solution other than to move those constants from pack.rb into the Shoes:: namespace. Your thoughts would be helpful.
Hi Cecil, I tried to revise pack.rb a little to package a Shoes app as .shy format file. It works with Policeman (includes Ruby 1.9.1) on my Windows XP laptop. It works to make only .shy file now. Not make .exe and .run and .dmg files, so far. So, I'm not sure this will help you, though... The commit on my github repo is: http://github.com/ashbb/shoes/commit/aadcefd9c72c79ff2432865d61b13c13c11139c3 Regards, ashbb
ashbb I've tried your pack.rb with 1.9.1 and it crashed (segfaulted) until I added the Shoes::RELEASE_NAME. I still get the Unitialized Constant Shoes::APP::I_NET I think the the Pack modules is being called from two different contexts. Shoes:: (from the splash screen) and Shoes::App. (from command line 'shoes -p' Perhaps those constants should should be moved from the pack.rb and put into the shoes.rb (Shoes:: context) since the are globals? On Thu, 2010-03-18 at 23:06 +0900, Satoshi Asakawa wrote: > Hi Cecil, > > I tried to revise pack.rb a little to package a Shoes app as .shy > format file. It works with Policeman (includes Ruby 1.9.1) on my > Windows XP laptop. > > It works to make only .shy file now. Not make .exe and .run and .dmg > files, so far. So, I'm not sure this will help you, though... > > The commit on my github repo is: > http://github.com/ashbb/shoes/commit/aadcefd9c72c79ff2432865d61b13c13c11139c3 > > Regards, > ashbb
> I've tried your pack.rb with 1.9.1 and it crashed (segfaulted) Oh, bad... :( > I think the Pack modules is being called from two different > contexts. I see. You may be right. > Shoes:: (from the splash screen) and Shoes::App. > (from command line 'shoes -p') Umm... but I did run 'shoes -p' from windows console (command line) and no error occured. Only .shy file making case, though... > Perhaps those constants should should be moved from > the pack.rb and put into the shoes.rb (Shoes:: context) > since the are globals? I agree this idea. There is a difference in Constants behavior between Ruby 1.9.1 and 1.8.6. ashbb
ashbb, I made a mistake - I was running the previous copy of pack.rb instead of yours. Yours runs fine. I'm uncomfortable setting Shoes:: constants from a Module but it works, in 1.9.1 and 1.8.7. I've changed my pack.rb to use the Shoes::constants like yours. Mine creates .dmgs, .exes and .runs so I'm pretty happy. I may debug your version of pack.rb to see what's wrong with creating the exe's, dmg's, and run's (a couple of console messages around line 44) Thanks On Fri, 2010-03-19 at 06:57 +0900, Satoshi Asakawa wrote: > > I've tried your pack.rb with 1.9.1 and it crashed (segfaulted) > Oh, bad... :( > > > I think the Pack modules is being called from two different > > contexts. > I see. You may be right. > > > Shoes:: (from the splash screen) and Shoes::App. > > (from command line 'shoes -p') > Umm... but I did run 'shoes -p' from windows console > (command line) and no error occured. > Only .shy file making case, though... > > > Perhaps those constants should should be moved from > > the pack.rb and put into the shoes.rb (Shoes:: context) > > since the are globals? > I agree this idea. There is a difference in Constants behavior > between Ruby 1.9.1 and 1.8.6. > > ashbb
Hi Cecil,
> Mine creates .dmgs, .exes and .runs so I'm pretty happy.
Wow, great!
Could you show us your code?
I'd like to merge your code into my pack.rb. ;-)
Cheers,
ashbb
I'd be happy to share once they are debugged. I can create the files and fudge a download but they won't work until some things are fixed. In static/stubs are references to the old hacketyhack.net in sh-stall and in cocoa-install (a binary) and I believe they are there in blank.exe. Currently pack.rb *requires* that policeman exists at heroku and their isn't one. Anybody know how to create a shoes release? Just package up a clean directory tree? Also there is nothing I've seen that passes the release/pkg info the the stubs. Shouldn't be too hard with the Linux, and that info could be passed in the .dmg plist for cocoa (and the cocoa-install modified) to grab it. I have no idea what is the Windows way is to get the release/pkg info into the packed .exe On Fri, 2010-03-19 at 22:13 +0900, Satoshi Asakawa wrote: > Hi Cecil, > > > Mine creates .dmgs, .exes and .runs so I'm pretty happy. > Wow, great! > Could you show us your code? > I'd like to merge your code into my pack.rb. ;-) > > Cheers, > ashbb
I'm going to try and add a db-based way to add/edit releases on the site. That way, we don't need to keep reuploading to Heroku. pack.rb shouldn't need any changes for it, though, it'll "just work". On Fri, Mar 19, 2010 at 5:56 PM, Cecil Coupe <ccoupe@cableone.net> wrote: > I'd be happy to share once they are debugged. I can create the files and > fudge a download but they won't work until some things are fixed. > In static/stubs are references to the old hacketyhack.net in sh-stall > and in cocoa-install (a binary) and I believe they are there in > blank.exe. > > Currently pack.rb *requires* that policeman exists at heroku and their > isn't one. Anybody know how to create a shoes release? Just package up a > clean directory tree? > > Also there is nothing I've seen that passes the release/pkg info the the > stubs. Shouldn't be too hard with the Linux, and that info could be > passed in the .dmg plist for cocoa (and the cocoa-install modified) to > grab it. I have no idea what is the Windows way is to get the > release/pkg info into the packed .exe > > > > On Fri, 2010-03-19 at 22:13 +0900, Satoshi Asakawa wrote: > > Hi Cecil, > > > > > Mine creates .dmgs, .exes and .runs so I'm pretty happy. > > Wow, great! > > Could you show us your code? > > I'd like to merge your code into my pack.rb. ;-) > > > > Cheers, > > ashbb > > > -- ~devyn
I'm somewhat confused by the array of versions of shoes that appear to be available at the moment... is there a working version I can use to package standalone apps for both windows and os x? I'm on an intel mac book pro, running leopard... If there aren't any pre-compiled binaries, I can compile from source myself if I have to, but I'm not used to compiled languages and I've never used C or objective C before so if the compile process isn't smooth, I'm not going to be able to fix anything. Having said that, if I need to do some debugging in ruby, I'm happy to have a crack at it... Thanks
Simon, On Fri, Mar 19, 2010 at 7:50 AM, Simon Hicks <shoes@simonhicks.org> wrote: > I'm somewhat confused by the array of versions of shoes that appear to > be available at the moment... is there a working version... For OSX 10.5 Intel the last available builds are still Shoes 2 (Raisins). Raisins can be downloaded from here: http://github.com/shoes/shoes/downloads <http://github.com/shoes/shoes/downloads>But in order to package, you will have to replace the pack.rb file with this one: http://github.com/shoes/shoes/blob/master/lib/shoes/pack.rb > I can use to > package standalone apps for both windows and os x? I'm on an intel mac > book pro, running leopard... > As to whether you can package standalone apps, well that depends. The packaging is not very robust at the moment. So even if it packages things up ok, it doesn't guarantee things will run ok everywhere. I've had best luck with shy files, but even then, I've recently built a shy file that does not work on all platforms. > > If there aren't any pre-compiled binaries, I can compile from source > myself if I have to, but I'm not used to compiled languages and I've > never used C or objective C before so if the compile process isn't > smooth, I'm not going to be able to fix anything. > If you want to use Shoes 3 (Policeman) you will have to build from source yourself. The good news: building on OSX 10.5 Intel should be straightforward, see this page on the wiki: http://wiki.github.com/shoes/shoes/buildingshoes
Thanks for taking the time for such a comprehensive and rapid reply! I'll have a go with policeman and see how it goes... Simon On 19 Mar 2010, at 15:31, i5m wrote: > Simon, > > On Fri, Mar 19, 2010 at 7:50 AM, Simon Hicks <shoes@simonhicks.org> > wrote: > I'm somewhat confused by the array of versions of shoes that appear to > be available at the moment... is there a working version... > > For OSX 10.5 Intel the last available builds are still Shoes 2 > (Raisins). Raisins can be downloaded from here: http://github.com/shoes/shoes/downloads > > But in order to package, you will have to replace the pack.rb file > with this one: > > http://github.com/shoes/shoes/blob/master/lib/shoes/pack.rb > > > I can use to > package standalone apps for both windows and os x? I'm on an intel mac > book pro, running leopard... > > As to whether you can package standalone apps, well that depends. > The packaging is not very robust at the moment. So even if it > packages things up ok, it doesn't guarantee things will run ok > everywhere. I've had best luck with shy files, but even then, I've > recently built a shy file that does not work on all platforms. > > If there aren't any pre-compiled binaries, I can compile from source > myself if I have to, but I'm not used to compiled languages and I've > never used C or objective C before so if the compile process isn't > smooth, I'm not going to be able to fix anything. > > If you want to use Shoes 3 (Policeman) you will have to build from > source yourself. The good news: building on OSX 10.5 Intel should be > straightforward, see this page on the wiki: http://wiki.github.com/shoes/shoes/buildingshoes > >
Let us know how it goes. I'm (occasionally) on 10.5, but PPC and that works ok-ish. So Intel should be better if anything. If you build it and get it running and have the time, please report how it compares to Raisins: https://spreadsheets.google.com/ccc?key=0AnxNqWJvTHOYdFBBY0ZyM3kwa3E4MVpVVDlvV3dfMGc&hl=en_GB ----------------------- i5m.co.uk GPG Key: 0xA18A602B On Fri, Mar 19, 2010 at 8:41 AM, Simon Hicks <shoes@simonhicks.org> wrote: > Thanks for taking the time for such a comprehensive and rapid reply! > > I'll have a go with policeman and see how it goes... > > Simon > > > On 19 Mar 2010, at 15:31, i5m wrote: > > Simon, > > On Fri, Mar 19, 2010 at 7:50 AM, Simon Hicks <shoes@simonhicks.org> wrote: > >> I'm somewhat confused by the array of versions of shoes that appear to >> be available at the moment... is there a working version... > > > For OSX 10.5 Intel the last available builds are still Shoes 2 (Raisins). R > aisins can be downloaded from here: > http://github.com/shoes/shoes/downloads > > <http://github.com/shoes/shoes/downloads>But in order to package, you will > have to replace the pack.rb file with this one: > > http://github.com/shoes/shoes/blob/master/lib/shoes/pack.rb > > > >> I can use to >> package standalone apps for both windows and os x? I'm on an intel mac >> book pro, running leopard... >> > > As to whether you can package standalone apps, well that depends. The > packaging is not very robust at the moment. So even if it packages things up > ok, it doesn't guarantee things will run ok everywhere. I've had best l uck > with shy files, but even then, I've recently built a shy file that does not > work on all platforms. > >> >> If there aren't any pre-compiled binaries, I can compile from source >> myself if I have to, but I'm not used to compiled languages and I've >> never used C or objective C before so if the compile process isn't >> smooth, I'm not going to be able to fix anything. >> > > If you want to use Shoes 3 (Policeman) you will have to build from source > yourself. The good news: building on OSX 10.5 Intel should be > straightforward, see this page on the wiki: > http://wiki.github.com/shoes/shoes/buildingshoes > > > >
Could you explicitly namespace the constant? e.g. Shoes::Pack::RELEASE_NAME = 'raisins' On Thu, Mar 18, 2010 at 5:16 PM, Cecil Coupe <ccoupe@cableone.net> wrote: > >> Sadly the packager hangs (lib/shoes/pack.rb) later with an Uninitialized >> Constant Shoes::Pack::RELEASE_NAME. Simply replacing it >> with ::RELEASE_NAME didn't work so I've got more Ruby to learn. >> > That was fixed in pack.rb by replacing RELEASE_NAME with > Shoes::RELEASE_NAME. Works fine with ruby 1.8.7. The .exe, .dmg and .run > are about the right size, for the default download shoes when the script > runs. > > Running "shoes -p" in Ruby 1.9.1 fails with "Uninitalized Constant > Shoes::Aoo::I_NET". Assuming I understand the 1.9.1 scoping rules and > how shoes does page loading (evals) I don't see any easy *backwards* > compatible solution other than to move those constants from pack.rb into > the Shoes:: namespace. > > Your thoughts would be helpful. > > > > > >