Re: [shoes] For the brave.
- From:
- Cecil Coupe
- Date:
- 2012-02-06 @ 03:43
I did get a shoes.exe built and there is an installer and I refreshed
the file at my website, it's a little larger because there where missing
dlls
However *it does NOT work*. Oh, the install part works. The Shoes part
doesn't. No error message or dialogs, just silence. Interesting to me
is Wine also does absolutely nothing either and it's a vocal whiner.
Remember, Wine complained about the distributed Shoes.exe. I need to get
that far (font whines. missing Wine api's and locked up splash screen).
That suggests the problem is in the startup code or quite likely the
Ruby I built isn't quite correct. I suspect this will take some time to
sort out and it will turn out to be something obvious and wizards will
laugh at my skillz.
--Cecil
On Sun, 2012-02-05 at 18:19 +0900, ashbb wrote:
> Hi Cecil,
>
> > I've cross compiled a Windows Shoes .exe on my Linux system
> Wow, awesome!!
>
> Immediately I downloaded shoes-0.r1527.exe and installed into my
> Windowns 7. The install was finished well.
>
> Then I go to C:\Program Files\Common Files\Shoes\0.r1527,
> but umm,.. I can't find shoes.exe.
>
> How to run the Shoes?
>
> ashbb
Re: [shoes] For the brave.
- From:
- ashbb
- Date:
- 2012-02-06 @ 10:56
Hi Cecil,
> I did get a shoes.exe built and there is an installer and I refreshed
> the file at my website
Thanks!
I downloaded your refreshed shoes-0.r1527.exe and installed again into my
Windows 7.
> However *it does NOT work*.
Yeah, I confirmed. But don't worry, read the following. ;-)
> That suggests the problem is in the startup code or quite likely the
> Ruby I built isn't quite correct.
Try to replace your C:\Program Files\Common
Files\Shoes\0.r1527\lib\shoes.rb with the following snippet.
# shoes.rb
class Shoes
def self.run path
[nil]
end
def self.args!
Shoes.app do
para 'Hello world!'
end
end
end
After the above replacing, and then double-clicked shoes.exe.
Yay! I got a 'Hello world!' message on a Shoes window!! :-D
ashbb
Re: [shoes] For the brave.
- From:
- Steve Klabnik
- Date:
- 2012-02-06 @ 12:13
It's like Christmas! How interesting. I can't wait to try this...
Re: [shoes] For the brave.
- From:
- Cecil Coupe
- Date:
- 2012-02-06 @ 22:45
On Mon, 2012-02-06 at 19:56 +0900, ashbb wrote:
> > That suggests the problem is in the startup code or quite likely
> the
> > Ruby I built isn't quite correct.
> Try to replace your C:\Program Files\Common Files\Shoes\0.r1527\lib
> \shoes.rb with the following snippet.
>
> # shoes.rb
> class Shoes
> def self.run path
> [nil]
> end
> def self.args!
> Shoes.app do
> para 'Hello world!'
> end
> end
> end
>
Now I have to clues to ponder. Thank you ashbb! In fact that snippet
also worked in Wine. Is this a 1.9.2 vs .1 thing? or some error in the
Windows/ruby startup?
--Cecil
Re: [shoes] For the brave.
- From:
- ashbb
- Date:
- 2012-02-07 @ 12:05
Hi Cecil,
> Is this a 1.9.2 vs .1 thing?
I think so. Because,...
After I commented out and edited several lines in lib/shoes.rb, Policeman
opening window (splash window) was launched correctly and I could click the
'Open an App.' link and select samples/good-clock.rb file. It worked
perfectly!! :-D
The following is the diff I edited. Try it out.
I think that 'open-uri' seems like a problem.
C:\Program Files\Common Files\Shoes\0.r1527\lib>diff shoes.rb shoes_new.rb
9c9
< require 'open-uri'
---
> #require 'open-uri'
13c13
< require 'shoes/cache'
---
> #require 'shoes/cache'
15c15
< require 'shoes/image'
---
> #require 'shoes/image'
17c17
< require 'shoes/shybuilder'
---
> #require 'shoes/shybuilder'
143c143
< require 'shoes/search'
---
> #require 'shoes/search'
360c360
< uri = URI(path)
---
> #uri = URI(path)
370c370,371
< case uri.path when "/"
---
> #case uri.path when "/"
> case path when "/"
399c400,401
< when URI::HTTP
---
> #when URI::HTTP
> when :dummy_for_debug
ashbb
Re: [shoes] For the brave.
- From:
- Cecil Coupe
- Date:
- 2012-02-08 @ 02:36
On Tue, 2012-02-07 at 21:05 +0900, ashbb wrote:
> Hi Cecil,
>
> > Is this a 1.9.2 vs .1 thing?
> I think so. Because,...
Actually the problem is that I don't have the latest Shoes code base
The exception being thrown on require open-uri is 'uninitialized
constant Encoding::UTF_7' and there seems to be fixes for that in later
versions of shoes.
I'll try to build a more up to date exe.
FWIW if you need to find these kinds of low level problems on
Windows/Shoes without a console, use this for dist/lib/shoes.rb
# shoes.rb
$glbstr = "None"
begin
require 'open-uri'
rescue Exception => e
$glbstr = e.message
end
class Shoes
def self.run path
[nil]
end
def self.args!
Shoes.app do
para "#{RUBY_PLATFORM}\n"
para "#{$glbstr}\n"
button "Quit" do
exit
end
end
end
end
Re: [shoes] For the brave.
- From:
- Cecil Coupe
- Date:
- 2012-02-08 @ 06:26
I built a newer version of Shoes.exe, 0.r1741. IT FAILS on XP and Wine.
The good news? Both throw up a failure dialogue. In a sick way, it is
progress since I've managed to duplicate ashbb's complaint that
Shoes/1.9.2/Windows doesn't work. That means the cross compile is
successful (in a sick way). My effort is no longer proof of concept.
Cross compiling does work and Wine is a useful test bed because Wine
reports an access to location 0x0 and lots of thread dump info just
like Linux does when Shoes hits a machine level exception by using a
null pointer.
I'll have to recompile ruby and shoes and not strip the debugging info
and hope winedbg reports better info about the offending caller. If it
is a threading issue, then gdb or winegdb can effect the timing (as in
it won't fail reliably). That too would be good to know, if it happens.
I've committed my cross compile rake files to my shoes project at
https://github.com/ccoupe/shoes/commits/master Very rough and highly
dependent of your environment because that's how cross compiling has to
be (see make/xmingw/env.rb) I have not issued a pull request because
I'm not sure how those files would integrate into the shoes mainline.
If there are other Linux folk who would like to help debug Shoes/Windows I'll
be more than happy to help set up your cross build environment.
--Cecil
Re: [shoes] For the brave.
- From:
- Cecil Coupe
- Date:
- 2012-02-05 @ 19:19
Yes, I noticed the missing shoes.exe after I sent the email.
Somehow it didn't get built. Perhaps later today I'll get it.
--Cecil
On Sun, 2012-02-05 at 18:19 +0900, ashbb wrote:
> Hi Cecil,
>
> > I've cross compiled a Windows Shoes .exe on my Linux system
> Wow, awesome!!
>
> Immediately I downloaded shoes-0.r1527.exe and installed into my
> Windowns 7. The install was finished well.
>
> Then I go to C:\Program Files\Common Files\Shoes\0.r1527,
> but umm,.. I can't find shoes.exe.
>
> How to run the Shoes?
>
> ashbb