Using policeman (r1314) and a lot of questionable hacks to pack.rb, and some previously mentioned binject.c changes I've managed to package a script with Policeman that includes/uses the Raisins Windows no video exe. At least for me and my XP running in a VirtualBox VM. It would be helpful if a few Windows users try it out at http://www.mvmanila.com/public/SplitWXR-test.exe .4MB (no video) It's a package of raisins plus my script package by my version of Policeman.If you get the GUI, just press the quit button. The script is harmless and available in the same directory (SplitWXR.rb) if you want to look first. The source code for my version of pack.rb is at http://www.mvmanila.com/public/cecil-pack.rb There is a lot I don't like in that code. In so many ways I don't think its is production quality. I even put comments in the file.
Hi Cecil, On Sat, Mar 20, 2010 at 5:58 AM, Cecil Coupe <ccoupe@cableone.net> wrote: > Using policeman (r1314) and a lot of questionable hacks to pack.rb, and > some previously mentioned binject.c changes I've managed to package a > script with Policeman that includes/uses the Raisins Windows no video > exe. At least for me and my XP running in a VirtualBox VM. > > It would be helpful if a few Windows users try it out at > http://www.mvmanila.com/public/SplitWXR-test.exe I can confirm this works on Windows XP. Had a bit of trouble with my PATH and another version of Shoes trying to open the file, but once I'd got rid of that it worked fine; set-up it's own version of Shoes and launched. ----------------------- i5m.co.uk **GPG Key: 0xA18A602B
Thank you. On Mon, 2010-03-22 at 11:38 +0000, i5m wrote: > > I can confirm this works on Windows XP. Had a bit of trouble with my > PATH and another version of Shoes trying to open the file, but once > I'd got rid of that it worked fine; set-up it's own version of Shoes > and launched. > > > ----------------------- > i5m.co.uk > GPG Key: 0xA18A602B
If you could please fork shoes (if you haven't done so already) and push your changes there? It's a lot easier to pull things in that way, because then that commit is attributed to you. On Fri, Mar 19, 2010 at 10:58 PM, Cecil Coupe <ccoupe@cableone.net> wrote: > Using policeman (r1314) and a lot of questionable hacks to pack.rb, and > some previously mentioned binject.c changes I've managed to package a > script with Policeman that includes/uses the Raisins Windows no video > exe. At least for me and my XP running in a VirtualBox VM. > > It would be helpful if a few Windows users try it out at > http://www.mvmanila.com/public/SplitWXR-test.exe .4MB (no video) It's a > package of raisins plus my script package by my version of Policeman.If > you get the GUI, just press the quit button. The script is harmless and > available in the same directory (SplitWXR.rb) if you want to look first. > > The source code for my version of pack.rb is at > http://www.mvmanila.com/public/cecil-pack.rb > > There is a lot I don't like in that code. In so many ways I don't think > its is production quality. I even put comments in the file. > > -- ~devyn
On Fri, 2010-03-19 at 23:29 -0700, Devyn Cairns wrote: > If you could please fork shoes (if you haven't done so already) and > push your changes there? It's a lot easier to pull things in that way, > because then that commit is attributed to you. > Github and I are having some ssh issues before I can fork. I hate ssh 'issues' so it might be long time.
really? I haven't had any ssh issues... ever... odd. On Sat, Mar 20, 2010 at 5:52 PM, Cecil Coupe <ccoupe@cableone.net> wrote: > On Fri, 2010-03-19 at 23:29 -0700, Devyn Cairns wrote: > > If you could please fork shoes (if you haven't done so already) and > > push your changes there? It's a lot easier to pull things in that way, > > because then that commit is attributed to you. > > > > Github and I are having some ssh issues before I can fork. I hate ssh > 'issues' so it might be long time. > > > -- ~devyn
Just another Ubuntu config problem. My ssh dot file have gone from linux to Os X to Linux and maybe back again - messy. I've got much to learn about git and github though. I have successfully committed my changes to my fork and my fork appears to be linked properly to the main fork. I added a list_box to the pack.rb dialog to chose the version of shoes to package with. You can't package a script for policeman if there is no policeman to download. Fixed up some nasty constant scoping issues 1.8.7 vs 1.9.1 (I think, thanks ashbb) I also committed the changes to binject.c The packer.rb changes, I'm not thrilled about but I see them as necessary and less Ruby ugly than my previous attempts and what was there. Less ugly. There is still work required in the /static/stub files to remove the hackeynet. I can't do the Windows work or the Os X work and they will require changes and then changes to pack.rb if Policeman (or the website) supports multiple versions. On Sat, 2010-03-20 at 23:14 -0700, Devyn Cairns wrote: > really? I haven't had any ssh issues... ever... odd. > > On Sat, Mar 20, 2010 at 5:52 PM, Cecil Coupe <ccoupe@cableone.net> > wrote: > On Fri, 2010-03-19 at 23:29 -0700, Devyn Cairns wrote: > > If you could please fork shoes (if you haven't done so > already) and > > push your changes there? It's a lot easier to pull things in > that way, > > because then that commit is attributed to you. > > > > > Github and I are having some ssh issues before I can fork. I > hate ssh > 'issues' so it might be long time. > > > > > > -- > ~devyn
On Sun, Mar 21, 2010 at 9:11 PM, Cecil Coupe <ccoupe@cableone.net> wrote: > Just another Ubuntu config problem. My ssh dot file have gone from linux > to Os X to Linux and maybe back again - messy. I've got much to learn > about git and github though. > If I understand you correctly, just create new keys for each machine. That's what I've done. > > I have successfully committed my changes to my fork and my fork appears > to be linked properly to the main fork. I added a list_box to the > pack.rb dialog to chose the version of shoes to package with. You can't > package a script for policeman if there is no policeman to download. > Fixed up some nasty constant scoping issues 1.8.7 vs 1.9.1 (I think, > thanks ashbb) I also committed the changes to binject.c > > The packer.rb changes, I'm not thrilled about but I see them as > necessary and less Ruby ugly than my previous attempts and what was > there. Less ugly. There is still work required in the /static/stub files > to remove the hackeynet. > Ah. Somewhat related, is Ruby - or something similar - your primary language? Either way, any kind of work is appreciated. > > I can't do the Windows work or the Os X work and they will require > changes and then changes to pack.rb if Policeman (or the website) > supports multiple versions. > That's okay. ashbb seems to be managing Windows fairly well :) and OS X 10.6 stuff is just getting started, but it shouldn't be too difficult. At the moment, (although I may be wrong) the Linux version appears to be the most stable, so that's what we should work toward achieving for OS X and Windows. OS X and Linux share a lot of common ground, so there's not too much there. Mostly Windows, because it's so different from the others; but as I said, ashbb is doing a phenomenal job. > > > On Sat, 2010-03-20 at 23:14 -0700, Devyn Cairns wrote: > > really? I haven't had any ssh issues... ever... odd. > > > > On Sat, Mar 20, 2010 at 5:52 PM, Cecil Coupe <ccoupe@cableone.net> > > wrote: > > On Fri, 2010-03-19 at 23:29 -0700, Devyn Cairns wrote: > > > If you could please fork shoes (if you haven't done so > > already) and > > > push your changes there? It's a lot easier to pull things in > > that way, > > > because then that commit is attributed to you. > > > > > > > > > Github and I are having some ssh issues before I can fork. I > > hate ssh > > 'issues' so it might be long time. > > > > > > > > > > > > -- > > ~devyn > > > -- ~devyn
On Sun, 2010-03-21 at 22:54 -0700, Devyn Cairns wrote: > On Sun, Mar 21, 2010 at 9:11 PM, Cecil Coupe <ccoupe@cableone.net> > wrote: > Just another Ubuntu config problem. My ssh dot file have gone > from linux > to Os X to Linux and maybe back again - messy. I've got much > to learn > about git and github though. > > > If I understand you correctly, just create new keys for each machine. > That's what I've done. Yeah that was the chosen solution. And then I had put the new public key on all the other servers I ssh too. An annoyance. > > > I have successfully committed my changes to my fork and my > fork appears > to be linked properly to the main fork. I added a list_box to > the > pack.rb dialog to chose the version of shoes to package with. > You can't > package a script for policeman if there is no policeman to > download. > Fixed up some nasty constant scoping issues 1.8.7 vs 1.9.1 (I > think, > thanks ashbb) I also committed the changes to binject.c > > The packer.rb changes, I'm not thrilled about but I see them > as > necessary and less Ruby ugly than my previous attempts and > what was > there. Less ugly. There is still work required in > the /static/stub files > to remove the hackeynet. > > > Ah. Somewhat related, is Ruby - or something similar - your primary > language? Either way, any kind of work is appreciated. Devyn, I go way back to assembler languages back before the intel/datapoint 8008 was born. Cobol. Fortran. PDP-11, PDP-10, 8008, 6800, 6502, 8086/88, 68000/20/30. Pascal. C. Tiny bit of Lisp and Scheme. C++, Java. Tcl, Python and Ruby. Ive been cross platorm GUI for a long time. XVT anyone? Star Division before Sun bought them. WxWindows, Java and then I faded away, thinking that cross platform GUI will never happen. Then I found Shoe (cute) but packaging was always the big problem to solve and _why solved it. For a while, it a few minutes of web time, all was good. Each language and framework has it's idioms and each has it's own politically correct style. I try to stay within the community rules as I understand them. I'm a sensitive guy. T > > > I can't do the Windows work or the Os X work and they will > require > changes and then changes to pack.rb if Policeman (or the > website) > supports multiple versions. > > > That's okay. ashbb seems to be managing Windows fairly well :) and OS > X 10.6 stuff is just getting started, but it shouldn't be too > difficult. At the moment, (although I may be wrong) the Linux version > appears to be the most stable, so that's what we should work toward > achieving for OS X and Windows. OS X and Linux share a lot of common > ground, so there's not too much there. Mostly Windows, because it's so > different from the others; but as I said, ashbb is doing a phenomenal > job. I don't *know* that Linux is any more stable. Back when I was running Shoes and OS X, Linux had some issues that OS X and Windows didn't. Linux may be easier to fix first. Or maybe not.
On Mon, Mar 22, 2010 at 12:32 AM, Cecil Coupe <ccoupe@cableone.net> wrote: > On Sun, 2010-03-21 at 22:54 -0700, Devyn Cairns wrote: > > On Sun, Mar 21, 2010 at 9:11 PM, Cecil Coupe <ccoupe@cableone.net> > > wrote: > > Just another Ubuntu config problem. My ssh dot file have gone > > from linux > > to Os X to Linux and maybe back again - messy. I've got much > > to learn > > about git and github though. > > > > > > If I understand you correctly, just create new keys for each machine. > > That's what I've done. > > Yeah that was the chosen solution. And then I had put the new public key > on all the other servers I ssh too. An annoyance. > > > > > > I have successfully committed my changes to my fork and my > > fork appears > > to be linked properly to the main fork. I added a list_box to > > the > > pack.rb dialog to chose the version of shoes to package with. > > You can't > > package a script for policeman if there is no policeman to > > download. > > Fixed up some nasty constant scoping issues 1.8.7 vs 1.9.1 (I > > think, > > thanks ashbb) I also committed the changes to binject.c > > > > The packer.rb changes, I'm not thrilled about but I see them > > as > > necessary and less Ruby ugly than my previous attempts and > > what was > > there. Less ugly. There is still work required in > > the /static/stub files > > to remove the hackeynet. > > > > > > Ah. Somewhat related, is Ruby - or something similar - your primary > > language? Either way, any kind of work is appreciated. > Devyn, > > I go way back to assembler languages back before the intel/datapoint > 8008 was born. Cobol. Fortran. PDP-11, PDP-10, 8008, 6800, 6502, > 8086/88, 68000/20/30. Pascal. C. Tiny bit of Lisp and Scheme. C++, Java. > Tcl, Python and Ruby. Ive been cross platorm GUI for a long time. XVT > anyone? Star Division before Sun bought them. WxWindows, Java and then I > faded away, thinking that cross platform GUI will never happen. Then I > found Shoe (cute) but packaging was always the big problem to solve and > _why solved it. For a while, it a few minutes of web time, all was good. > Good to know. It may do you some good to really sit down and experiment with a good dynamic language, obviously, for Shoes, that would be Ruby, and do a bunch of uniquely-dynamic things, like complex metaprogramming etc. Then, you'll really understand *why* that particular style is politically correct in most cases. You don't have to, just a suggestion :D I'm quite different, on the other hand, I started very high level, and only recently am I starting to work my way down. I'm beginning to get more comfortable with C and variants. Granted, I'm also 13, so it was inevitable that I would start with a high level programming language. > > Each language and framework has it's idioms and each has it's own > politically correct style. I try to stay within the community rules as > I understand them. I'm a sensitive guy. T > That's usually a sensible thing to do... one of my friends claims to work with Ruby a lot, but he doesn't even fully understand classes, because all he writes are short little scripts that, most of the time, could just as easily be written in bash ._. > > > > > > I can't do the Windows work or the Os X work and they will > > require > > changes and then changes to pack.rb if Policeman (or the > > website) > > supports multiple versions. > > > > > > That's okay. ashbb seems to be managing Windows fairly well :) and OS > > X 10.6 stuff is just getting started, but it shouldn't be too > > difficult. At the moment, (although I may be wrong) the Linux version > > appears to be the most stable, so that's what we should work toward > > achieving for OS X and Windows. OS X and Linux share a lot of common > > ground, so there's not too much there. Mostly Windows, because it's so > > different from the others; but as I said, ashbb is doing a phenomenal > > job. > I don't *know* that Linux is any more stable. Back when I was running > Shoes and OS X, Linux had some issues that OS X and Windows didn't. > Linux may be easier to fix first. Or maybe not. > > > all I know is that when I was running Arch Linux & Shoes, compiled from source a few months ago, the only thing that had issues was the packager, otherwise, it ran perfectly... if I ever had a segfault, it would have been because I was doing something stupid. -- ~devyn
> > Good to know. It may do you some good to really sit down and > experiment with a good dynamic language, obviously, for Shoes, that > would be Ruby, and do a bunch of uniquely-dynamic things, like complex > metaprogramming etc. Then, you'll really understand why that > particular style is politically correct in most cases. You don't have > to, just a suggestion :D We're getting OT for the list. I don't program professionally anymore, but over the decades I've seen a lot of promising ideas and technologies. Some worked out well but most didn't survive. Ruby is an interesting language. Shoes is an interesting project to work on.
Yes it is. Now, back on topic :-) On Mon, Mar 22, 2010 at 6:49 PM, Cecil Coupe <ccoupe@cableone.net> wrote: > > > > > Good to know. It may do you some good to really sit down and > > experiment with a good dynamic language, obviously, for Shoes, that > > would be Ruby, and do a bunch of uniquely-dynamic things, like complex > > metaprogramming etc. Then, you'll really understand why that > > particular style is politically correct in most cases. You don't have > > to, just a suggestion :D > > We're getting OT for the list. I don't program professionally anymore, > but over the decades I've seen a lot of promising ideas and > technologies. Some worked out well but most didn't survive. Ruby is an > interesting language. Shoes is an interesting project to work on. > > > > -- ~devyn
Hi Cecil, Debyn and folks,
Thank you for the encouragement. :-)
But about `Binject::EXE.new`,
I have still the same status as this post (Jan 13 9:28pm):
http://groups.google.com/group/shoooes/browse_thread/thread/d2e03c8f660790c1?pli=1
I can't execute the following snippet with my latest Policeman (0.r1380) for
Windows.
http://www.rin-shun.com/shoes/index.html
require 'binject'
Shoes.app do
Binject::EXE.new(File.join(DIR, "static", "stubs", "blank.exe"))
para 'hello'
end
> I also committed the changes to binject.c
Oh Cecil, did you modify `binject.c` ?
If so, could you show the code?
I also tried your `pack.rb`:
http://www.mvmanila.com/public/cecil-pack.rb
But, umm.... have no luck so far.
ashbb
Ashbb, I've become git-enabled. My changes are visible as a fork to the master and I've rewritten some of that posted code that is failing for you. Yes, I did modify binject.c - three changes to replace rb_file_open() with the older (previously working) rb_fopen(). A pain in the ass to track down but the old code worked just fine - 3 args vs 2. Try the lastest commit to pack.rb. I'm not saying it's great code but it does attempt to address some of the issues you raised in the google groups thread. Regards, --Cecil On Mon, 2010-03-22 at 15:35 +0900, Satoshi Asakawa wrote: > Hi Cecil, Debyn and folks, > > Thank you for the encouragement. :-) > > But about `Binject::EXE.new`, > I have still the same status as this post (Jan 13 9:28pm): > http://groups.google.com/group/shoooes/browse_thread/thread/d2e03c8f660790c1?pli=1 > > I can't execute the following snippet with my latest Policeman > (0.r1380) for Windows. > http://www.rin-shun.com/shoes/index.html > > require 'binject' > Shoes.app do > Binject::EXE.new(File.join(DIR, "static", "stubs", "blank.exe")) > para 'hello' > end > > > I also committed the changes to binject.c > Oh Cecil, did you modify `binject.c` ? > If so, could you show the code? > > I also tried your `pack.rb`: > http://www.mvmanila.com/public/cecil-pack.rb > > But, umm.... have no luck so far. > > ashbb >
On Mon, Mar 22, 2010 at 12:11 AM, Cecil Coupe <ccoupe@cableone.net> wrote: > Ashbb, > > I've become git-enabled. Oh my god, it's become too powerful! =D > My changes are visible as a fork to the > master and I've rewritten some of that posted code that is failing for > you. > Yes, I did modify binject.c - three changes to replace rb_file_open() > with the older (previously working) rb_fopen(). A pain in the ass to > track down but the old code worked just fine - 3 args vs 2. > > Try the lastest commit to pack.rb. I'm not saying it's great code but > it does attempt to address some of the issues you raised in the google > groups thread. > > Regards, > --Cecil =D -- ~devyn
On Mon, 2010-03-22 at 00:24 -0700, Devyn Cairns wrote: > On Mon, Mar 22, 2010 at 12:11 AM, Cecil Coupe <ccoupe@cableone.net> > wrote: > Ashbb, > > I've become git-enabled. > > Oh my god, it's become too powerful! =D Damn freaking metaphors.
Hi Cecil, Thank you for uploading your shoes fork on github. I looked at your commit: http://github.com/ccoupe/shoes/commit/6560000e9cd4ca7355c3f38c41a8229dd9fb8f86 I modified binject.c as same as yours and tried to compile with MinGW on Windows XP. But, ... had no luck, couldn't compile. :( Is it possible to use rb_fopen() with Ruby 1.9.1? Umm... I must have misunderstood something, though... ashbb
ashbb, There is definitely something wrong. Looking in the system's 1.9.1 headers, there is no rb_fopen. in 1.8.7 there is. There is an rb_file_open in both with the proper arguments in both. So, why did it fail for me using 1.8.7 rb_file_open? Raisins' binject.c used rb_fopen so that's what I reverted to. Perhaps the 1.8.7 implementation of rb_file_open doesn't match the header? Until I figure it out, we should conditionally compile those three lines depending of the ruby version. --Cecil On Wed, 2010-03-24 at 00:31 +0900, Satoshi Asakawa wrote: > Hi Cecil, > > Thank you for uploading your shoes fork on github. > I looked at your commit: > http://github.com/ccoupe/shoes/commit/6560000e9cd4ca7355c3f38c41a8229dd9fb8f86 > > I modified binject.c as same as yours and tried to compile with MinGW > on Windows XP. > But, ... had no luck, couldn't compile. :( > > Is it possible to use rb_fopen() with Ruby 1.9.1? > > Umm... I must have misunderstood something, though... > > ashbb >
Hi Cecil,
Thank you for the great research. Now I understand my issue for Windows.
- I can complile Binject with Ruby 1.9.1 mingw32.
- But this snippet chrashes (runtime error)
require 'binject'
Shoes.app do
Binject::EXE.new 'blank.exe'
end
- Crash point is line 531 in binject.c
http://github.com/ashbb/shoes/blob/master/req/binject/ext/binject_c/binject.c#L531
BINJ_READ macro is just one line. I've not find a solution so far.
But I think I'll be able to find something... hopefully. ;-)
Cheers,
ashbb
There's lots of compiler messages with binject and ruby 1.9.1 which can be fixed by including the proper headers I believe. BTW, you can can cd into req/binject/ext/binject_c and run 'make' to recompile any mods to binject.c. When the error messages are just the 'fread return not used' then you can go make to top-level and do the longer rake and build. On Wed, 2010-03-24 at 22:50 +0900, Satoshi Asakawa wrote: > Hi Cecil, > > Thank you for the great research. Now I understand my issue for > Windows. > > - I can complile Binject with Ruby 1.9.1 mingw32. > - But this snippet chrashes (runtime error) > > require 'binject' > Shoes.app do > Binject::EXE.new 'blank.exe' > end > > - Crash point is line 531 in binject.c > > http://github.com/ashbb/shoes/blob/master/req/binject/ext/binject_c/binject.c#L531 > > BINJ_READ macro is just one line. I've not find a solution so far. > But I think I'll be able to find something... hopefully. ;-) > > Cheers, > ashbb
Definitely something wrong in binject.c/rb_file_open() and ruby 1,8.7 vs 1.9.1 I've add #ifdef's to use rb_fopen for 1.8.7 and rb_file_open for 1.9.1 at: http://github.com/ccoupe/shoes/commit/777094a2b0482754d1542d1931e3e294ba08d436 However, it fails on 1.9.1 for me. Might work you. It could be a patch_level issue with my Ruby 1.9.1 versus the lastest stable 1.9.1. Theres a lot of notes in the Ruby 1.9.1 Changelog about rb_file_open. On Tue, 2010-03-23 at 13:02 -0600, Cecil Coupe wrote: > ashbb, > > There is definitely something wrong. Looking in the system's 1.9.1 > headers, there is no rb_fopen. in 1.8.7 there is. There is an > rb_file_open in both with the proper arguments in both. > > So, why did it fail for me using 1.8.7 rb_file_open? Raisins' > binject.c used rb_fopen so that's what I reverted to. Perhaps the 1.8.7 > implementation of rb_file_open doesn't match the header? > > Until I figure it out, we should conditionally compile those three > lines depending of the ruby version. > > --Cecil
Apologies if this is too long but I need some opinions and it does matter to getting Shoes Policeman running in both 1.8.7 and 1.9.1 Actually the binject problem is much worse than I thought for 1.9.1. A lot of those extensions and gems in req/ spit out a lot of warning messages during compile on Ubuntu Ruby 1.9.1. Warnings that indicate the #defines and #includes are not right for 1.9.1. Even though it compiles and links, functions can be called that do not exist in the libraries. Seqfault Ick! For binject.c it would be nice to have the Ruby version passed in on the compile command line (-DRUBY_1_9) as is done for most of the compile tasks in the Rakefile. Which leads to the binject_c/extconf.rb which generates the makefile to be used to compile .c files in that directory I don't have a warm fuzzy feeling about all this mkmf stuff. A hacker would do something like the Rakefile does everywhere else: add the -DRUBY_1_9 to the CFLAGS based on the ruby being used and then fix all the code (binject.c) to include the proper .h files based on the RUBY_1_9 define. A possibly better idea would be to add RUBY_1_8 or RUBY_1_9 (one or the other) to the mkmk.rb CFLAGS, and then the maintainers of the binject_c/* could #ifdef their code appropriately. Or someone could figure out how to pass the Ruby-version from the Rakefile to the extconf.rb files Like I said, I'm not comfortable in this part of the build process. Your opinion is desired. Compiling Sqlite3 in 1.9.1 may need a similar fix to it's mkmf.rb --Cecil
Cecil and all, apologies, not had time to look at your email in detail, but here's a suggestion for releasing Policeman: Why don't we drop support for building exes, dmgs and run files and just make sure that Shy files are working? We could just remove the bits from the packaging UI that relate to building for OSX, Win and Linux, we don't have to remove all the code. Then, since it seems sorting packaging out is going to take some time, we could work on that for a 3.5 release? Thoughts? ----------------------- i5m.co.uk GPG Key: 0xA18A602B On Wed, Mar 24, 2010 at 3:46 AM, Cecil Coupe <ccoupe@cableone.net> wrote: > Apologies if this is too long but I need some opinions and it does > matter to getting Shoes Policeman running in both 1.8.7 and 1.9.1 > > >
On Wed, 2010-03-24 at 12:58 +0000, i5m wrote: > Cecil and all, > > > Why don't we drop support for building exes, dmgs and run files and > just make sure that Shy files are working? Do we know shy files aren't working? I don't use then myself and I don't see any shy issues reported at the git mothership. > > > We could just remove the bits from the packaging UI that relate to > building for OSX, Win and Linux, we don't have to remove all the code. Actually it would be easy to modify pack.rb to conditionally include/exclude the gui checkboxs when running in ruby 1.9.1 No need to hide full functionality for 1.8.7 users where things work fine. > > > Then, since it seems sorting packaging out is going to take some time, > we could work on that for a 3.5 release? > > Actually, someone will probably figure out the 1.9.1 issues before the snow leopard port arrives. I need to take a few days off to file my taxes.
Cecil, On Thu, Mar 25, 2010 at 12:51 AM, Cecil Coupe <ccoupe@cableone.net> wrote: > On Wed, 2010-03-24 at 12:58 +0000, i5m wrote: > > Do we know shy files aren't working? > I phrased that badly. I'm pretty sure shy files are working, but what I meant is that we should make sure creating them still works ok in Policeman. For instance, on OSX PPC the main packaging window won't open (I get a crash when I try to open it), but the simple packager that Mental implement does work ok. > > No need to hide full functionality for 1.8.7 users where things work > fine. Ok, but I think that Shoes will only build with 1.8.7 for Linux users. We've probably broken things on the Windows and OSX front and it will require 1.9. > > > > > > Actually, someone will probably figure out the 1.9.1 issues before the > snow leopard port arrives. I need to take a few days off to file my > taxes. > Well, we can live in hope.
Minor status report. Binject.c is just C source code that includes a maze of include files with Macros. Turns out ruby 1.9.1 changed the internal definition of a file struct and the access macros into the struct and the names of the macros. Added a layer or two of structs->*structs and changed some of the Macro sugar that hides it. With that kind of code changed you'd think binject.c would just fail to compile at all. It would have been better for us if it did. I know where the problem is. Solving won't be that hard except I've got RSI and can't use the keyboard to too long. On Wed, 2010-03-24 at 18:51 -0600, Cecil Coupe wrote: > On Wed, 2010-03-24 at 12:58 +0000, i5m wrote: > > Cecil and all, > > > > > > Why don't we drop support for building exes, dmgs and run files and > > just make sure that Shy files are working? > > Do we know shy files aren't working? I don't use then myself and I don't > see any shy issues reported at the git mothership. > > > > > > We could just remove the bits from the packaging UI that relate to > > building for OSX, Win and Linux, we don't have to remove all the code. > Actually it would be easy to modify pack.rb to conditionally > include/exclude the gui checkboxs when running in ruby 1.9.1 > > No need to hide full functionality for 1.8.7 users where things work > fine. > > > > > > Then, since it seems sorting packaging out is going to take some time, > > we could work on that for a 3.5 release? > > > > > Actually, someone will probably figure out the 1.9.1 issues before the > snow leopard port arrives. I need to take a few days off to file my > taxes. > >
Hi Cecil et al, Let me post a status report for building Policeman Windows. Now trying to build `binject`: - Marged Cecil's work and customized for my building environment, Windows MinGW. (sorry, not add ifdef so far) - Compile is ok now, I can make `binject.so` file from scratch. - It can run and create .exe file. - But the .exe file doesn't work well. - I guess the cause is `binject_exe_rewrite` function in binject.c Look at the commits: http://github.com/ashbb/shoes/commits/master Now in progress, but I feel I had fewer crashes. So, I think it's ok to release for the first Policeman. ;-) ashbb
ashbb, It's worse than you think with binject.c The code is written to assume a 'C' FILE structure ptr is returned from the old rb_fopen call which it stuffs away in the BINJ struct. In ruby 1.9.1, rb_file_open returns a VALUE (an RFILE) which has to be dereferenced to get an rb_io_t struct*. There's no FILE structure in that (ignore the stdio_file one). They switched to using file descriptors (an int) in 1.9.1 instead of a FILE *. so fread(),fwrite(), etc, will compile (grrr) but hang, segfault, or half way work randomly. It's not that hard to replace fread() with read() but tedious. I'm experimenting with just using a simple fopen() call instead of the rb_file_open calls. Sort of works but it also fails. This issue requires a serious rethink about what binject does, how it does it and the completely undocumented ruby 1.9.1 embedding API and how to test it. Tonight, I think it's too fragile to fix. Who ever does fix it will own it forever and I don't want to be that person. I don't want to own 'C' code. I might feel differently tomorrow if an elegant solution magically appears. --Cecil On Sat, 2010-03-27 at 17:26 +0900, Satoshi Asakawa wrote: > Hi Cecil et al, > > Let me post a status report for building Policeman Windows. > > Now trying to build `binject`: > - Marged Cecil's work and customized for my building environment, > Windows MinGW. (sorry, not add ifdef so far) > - Compile is ok now, I can make `binject.so` file from scratch. > - It can run and create .exe file. > - But the .exe file doesn't work well. > - I guess the cause is `binject_exe_rewrite` function in binject.c > > Look at the commits: http://github.com/ashbb/shoes/commits/master > > Now in progress, but I feel I had fewer crashes. So, I think it's ok > to release for the first Policeman. ;-) > > ashbb
Hi Cecil, Thank you so much for the detail explanation. You are doing awesome work! I didn't know what I was doing. :-P Now I understand we are faced with a tough problem. I have no experience to solve such a tough problem. It may be more than I can handle. Umm... hope some experts help us. I'll do my best, but step by step. ;-) ashbb
I managed to get binject and ruby 1.9.1 working for .exe in my latest commit and sorted out http://github.com/ccoupe/shoes/commit/7e0ac87ee760695e72a8f4f9bfb67618ff114114 It is not well tested. It hangs building dmg which is odd since my changes shouldn't have touched that code. There are plenty of troubling warnings from gcc when compiling with the 1.9.1 headers, so the task is far from complete. It would be handy if embedded ruby API experts out there take a look at the code. I'm worried about garbage collection and/or memleaks - although if your packaging a script that probably isn't a big deal. On Sun, 2010-03-28 at 22:51 +0900, Satoshi Asakawa wrote: > Hi Cecil, > > Thank you so much for the detail explanation. > You are doing awesome work! > > I didn't know what I was doing. :-P > Now I understand we are faced with a tough problem. > > I have no experience to solve such a tough problem. > It may be more than I can handle. > > Umm... hope some experts help us. > I'll do my best, but step by step. ;-) > > ashbb
I finally found some thinking about why building a dmg in 1.9.1 can hang. Not fail or seg fault. Just hang. Copying a few files from here than there should be fast. Perhaps the threading changes in 1.9.1 are the issue? lib/shoes/pack.rb does set up a thread (for the progress bar) where all the binject stuff happens and the binject.c code calls back into the shoes/ruby code block. Going from green threads to native threads could cause a hang (deadlock) Maybe one of you 1.9.1 thread savvy could take a look at that code and pronounce it thread worthy for 1.9.1. Actually, does the progress bar really work in 1.9.1 on a multi-core machine with long running threads? Remembering some of ashbb's code in his pack.rb, I think he might have been struggling with a progress bar for downloading, perhaps the same threading issue. Or not. I am not a threading expert. I don't want to be one.
Hi Cecil, Yes. I met the same thread issue when I was checking simple-rubygems.rb with my local Policeman for Windows. In that case, I couldn't improve (debug) Shoes C code, so changed a little bit Ruby code in setup.rb. This is the commit: http://github.com/ashbb/shoes/commit/bd749be8d5c553dd56600f46945c80f2786a5f7f Hope this helps, ashbb
... This is exactly what I was planning on doing for HacketyHack, so I vote yay on that proposition.
+1 On Wed, Mar 24, 2010 at 6:00 AM, Steve Klabnik <steve@steveklabnik.com>wrote: > ... This is exactly what I was planning on doing for HacketyHack, so I vote > yay on that proposition. -- ~devyn
ashbb, It could be a difference between 1,8,7 and 1.9.1, although it works for me in both. There is an (generated?) intern.h file which has the other definition but I haven't looked into how that is created. It's remotely possible the functions are different in Windows ruby than the other runtimes. The rb_file_open function is only called from binject.c, the prototype in intern.h, but NO source file defines it. Time to see how the ruby files are compiled. It's very confusing. On Wed, 2010-03-24 at 00:31 +0900, Satoshi Asakawa wrote: > Hi Cecil, > > Thank you for uploading your shoes fork on github. > I looked at your commit: > http://github.com/ccoupe/shoes/commit/6560000e9cd4ca7355c3f38c41a8229dd9fb8f86 > > I modified binject.c as same as yours and tried to compile with MinGW > on Windows XP. > But, ... had no luck, couldn't compile. :( > > Is it possible to use rb_fopen() with Ruby 1.9.1? > > Umm... I must have misunderstood something, though... > > ashbb >