1.9.1 binject (long) comparison
- From:
- Cecil Coupe
- Date:
- 2010-04-15 @ 05:58
Satoshi, and other followers of the packaging thread:
I decided to be a tiny bit more rigorous on testing the
binject/packaging code. This might be a long message. Casual readers can
skip to the next message.
I copied the Shoes sample/simple-form.rb to a new directory and then set
soft links to the same file with various names to indicate which version
and combo was being packaged by whom and what. The files are at
http://www.mvmanila.com/public/packtest/ should you need them. I only
tested with creating .exe's. Comments inside the directory listing:
> ccoupe@twb:~/Projects/test$ ls -l
> total 8168
> -rw-r--r-- 1 ccoupe ccoupe 81920 2010-04-14 22:06 test1157.exe
> lrwxrwxrwx 1 ccoupe ccoupe 7 2010-04-14 22:03 test1157.rb -> test.rb
This is raisins (a slightly later version) and ruby 1.8.7 packaging the
test.rb script for
a 'download shoes if needed'. Call it the base case if you like. That exe
won't work
well because it needs the old hacketyhack.org site to download from. I
can't create an exe
that includes shoes since the site no longer exists.
> -rw-r--r-- 1 ccoupe ccoupe 81920 2010-04-14 21:56 test1.8.7.exe
> -rw-r--r-- 1 ccoupe ccoupe 4046848 2010-04-14 21:59 test1.8.7-nv-raisins.exe
> lrwxrwxrwx 1 ccoupe ccoupe 7 2010-04-14 21:30
test1.8.7-nv-raisins.rb -> test.rb
> lrwxrwxrwx 1 ccoupe ccoupe 7 2010-04-14 21:27 test1.8.7.rb -> test.rb
That is Policeman (my branch) packaging the same script with ruby 1.8.7,
both as a
download later and as an 'include shoes, no video, raisins' (the latest
available for including)
The barest exe won't work because it's still tied to hackeyhack.org for
downloading. The 4MB exe
should work (a different script, packaged the same way was reported to
work after some developer level
undo's in their Path and version settings). Note the file sizes.
> -rw-r--r-- 1 ccoupe ccoupe 81920 2010-04-14 21:32 test1.9.1.exe
> -rw-r--r-- 1 ccoupe ccoupe 4046848 2010-04-14 21:46 test1.9.1-nv-raisins.exe
> lrwxrwxrwx 1 ccoupe ccoupe 7 2010-04-14 21:30
test1.9.1-nv-raisins.rb -> test.rb
> lrwxrwxrwx 1 ccoupe ccoupe 7 2010-04-14 21:27 test1.9.1.rb -> test.rb
Now we have Policeman (my branch) with ruby 1.9.1, packaging the same
script (download later vs.
include shoes non-video, but using the raisins download (latest). Looks
the same size to me and
either of the nv.raisins.exe should work because they both include 1.8.7
.so/.dll/.dyld.
How could they not use the only binaries available. I downloaded the
test1.9.1-nv-raisins.exe
in a XP SP2 virtual machine. It works.
> -rw-r--r-- 1 ccoupe ccoupe 840 2010-04-14 21:23 test.rb
That's the script linked to with different names. samples/simple-form.rb.
On my website, its copied
instead of soft linked.
Not all was good with 1.9.1 though. The first time I tried to package the
nv-raisins code got a segfault and a ruby and
a C thread dump on the download. (the file was still created) The second
time I tried, no errors were reported.
That's a threading problem for sure and likely a scoping difference.
Satoshi, does your packaging produce the same file sizes?
Apologies for the long post,
--Cecil
Re: [shoes] 1.9.1 binject (long) comparison
- From:
- James Harrison
- Date:
- 2010-04-20 @ 16:32
>>
>
> This is raisins (a slightly later version) and ruby 1.8.7 packaging the
test.rb script for
> a 'download shoes if needed'. Call it the base case if you like. That
exe won't work
> well because it needs the old hacketyhack.org site to download from. I
can't create an exe
> that includes shoes since the site no longer exists.
Edit your hosts file to have hacketyhack.org point to localhost, then just
set up the path that it's expecting correctly. Not a long term solution,
but it'll work just fine right now.
Re: [shoes] 1.9.1 binject (long) comparison
- From:
- Devyn Cairns
- Date:
- 2010-04-20 @ 16:34
isn't there a 'stub.c' file that includes all of this stuff?
On Tue, Apr 20, 2010 at 9:32 AM, James Harrison <oscartheduck@gmail.com>wrote:
> >>
> >
> > This is raisins (a slightly later version) and ruby 1.8.7 packaging the
> test.rb script for
> > a 'download shoes if needed'. Call it the base case if you like. That
> exe won't work
> > well because it needs the old hacketyhack.org site to download from. I
> can't create an exe
> > that includes shoes since the site no longer exists.
>
>
> Edit your hosts file to have hacketyhack.org point to localhost, then just
> set up the path that it's expecting correctly. Not a long term solution, but
> it'll work just fine right now.
>
>
--
~devyn
Re: [shoes] 1.9.1 binject (long) comparison
- From:
- i5m
- Date:
- 2010-05-12 @ 13:44
(Catching up with some Shoes emails)
On Tue, Apr 20, 2010 at 5:34 PM, Devyn Cairns <devyn.cairns@gmail.com>wrote:
> isn't there a 'stub.c' file that includes all of this stuff?
>
>
> On Tue, Apr 20, 2010 at 9:32 AM, James Harrison <oscartheduck@gmail.com>wrote:
>
>> >>
>> >
>> > This is raisins (a slightly later version) and ruby 1.8.7 packaging the
>> test.rb script for
>> > a 'download shoes if needed'. Call it the base case if you like. That
>> exe won't work
>> > well because it needs the old hacketyhack.org site to download from. I
>> can't create an exe
>> > that includes shoes since the site no longer exists.
>>
>
Yes. We should fix this!
OSX
http://github.com/shoes/shoes/blob/master/platform/mac/stub.m#L71
http://github.com/shoes/shoes/blob/master/platform/mac/stub.m#L149-L151
Windows
http://github.com/shoes/shoes/blob/master/platform/msw/stub.c#L133
http://github.com/shoes/shoes/blob/master/platform/msw/stub.c#L146
http://github.com/shoes/shoes/blob/master/platform/msw/stub.c#L192
Might be more references still in there.
-----------------------
i5m.co.uk
GPG Key: 0xA18A602B
Re: [shoes] 1.9.1 binject (long) comparison
- From:
- Satoshi Asakawa
- Date:
- 2010-04-15 @ 15:41
Hi Cecil,
Thank you so much for the detail information.
Now, I found a solution!
Look at this commit:
http://github.com/ashbb/shoes/commit/cf6162016548cf0c2d12471575516fa30b651c1a
I noticed that binject_exe_file_size() returned wrong value (very big
number: 1271257329). So, I replaced it with another way,
AnotherGetFileSize(), to get correct file size.
Then it works fine.
> Satoshi, does your packaging produce the same file sizes?
Yes! My latest build produces the same file sizes! :)
I know the `test.exe` file made by the latest build can't be launched well.
I think `test.exe` is created correctly. But Shoes can't extract `test.rb`
file correctly. The extracted `test.rb` file looks like not unpacked.
Need more steps, but took a big step. :)
Cheers,
ashbb
ps. Sorry, poor English. I have very little time today. :-P