librelist archives

« back to archive

Packager: Firm enough to commit.

Packager: Firm enough to commit.

From:
Cecil Coupe
Date:
2010-09-02 @ 05:11
http://github.com/ccoupe/shoes/commit/8bade1ff517b1fbfc83b62924fc75818aafcd5b2
 but read the commit comments. It's better than the current policeman
and it needs some minor twiddling. I don't think it's ready to issue a
pull into the main branch but it's decent enough to push upstream.

Re: [shoes] Packager: Firm enough to commit.

From:
ashbb
Date:
2010-09-03 @ 13:26
Hi Cecil,

Sorry, I was late.
I read your last commit on your github repo today:
http://github.com/ccoupe/shoes

You changed default option for Windows. Because network install works on
Windows only. But I think it's better to implement like this:

- when you use Windows, default option for Windows is network install.
- when you use Linux or OSX, there is no network install option for Windows.

The code is here: http://github.com/ashbb/shoes

The diff between your pack.rb and my pack.rb is the following:

C:\ashbb\tmp>diff pack_cecil.rb pack_new.rb
315a316
>           items.shift unless ::RUBY_PLATFORM =~ /mswin|mingw/
325c326
<             @incWin.choose(Shoes::I_NET)
---
>             @incWin.choose items[0]
381a383
>           inc_win_text, inc_osx_text, inc_linux_text = @incWin.text,
@incOSX.text, @incLinux.text
401c403
<                 Shoes::Pack.exe(@path, @incWin.text, &blk)
---
>                 Shoes::Pack.exe(@path, inc_win_text, &blk)
406c408
<                 Shoes::Pack.dmg(@path, @incOSX.text, &blk)
---
>                 Shoes::Pack.dmg(@path, inc_osx_text, &blk)
411c413
<                 Shoes::Pack.linux(@path, @incLinux.text, &blk)
---
>                 Shoes::Pack.linux(@path, inc_linux_text, &blk)


Hope this helps,
ashbb

ps. The code indentation of pack.rb was dirty. It was unreadable.
    So, I also did clean up.

Re: [shoes] Packager: Firm enough to commit.

From:
Cecil Coupe
Date:
2010-09-04 @ 04:09
On Fri, 2010-09-03 at 22:26 +0900, ashbb wrote:
> Hi Cecil,
> 
> Sorry, I was late.
> I read your last commit on your github repo today:
> http://github.com/ccoupe/shoes
> 
> You changed default option for Windows. Because network install works
> on Windows only. But I think it's better to implement like this:
> 
> - when you use Windows, default option for Windows is network install.
> - when you use Linux or OSX, there is no network install option for
> Windows.
> 
> The code is here: http://github.com/ashbb/shoes
> 
I've modified my pack.rb to include your changes and I fixed the tabs.
I'm going to request another pull. It won't be worse than what we
have...

I am distressed to learn only Windows users can package net install for
Windows. We need to fix that so Linux and OSX users can package net
install for windows.

[delete snarky message about not being able to package 'include shoes'
for OSX. Net install on OSX? Who knows?]

Being able to package a script for net install from any platform to any
platform is something that makes Shoes very, very unique. We don't have
that in policeman. 
> 
> 
> Hope this helps,
> ashbb
> 
> ps. The code indentation of pack.rb was dirty. It was unreadable.
>     So, I also did clean up.
Turns out I only had the tiny vi installed (default for Ubuntu) and I
needed the vim packages in order to do a retab. I'm all better for that
lesson. 

Re: [shoes] Packager: Firm enough to commit.

From:
Steve Klabnik
Date:
2010-09-04 @ 04:19
> [delete snarky message about not being able to package 'include shoes'
> for OSX. Net install on OSX? Who knows?]

Sorry, I've been slacking off on this lately. Been doing some work on
Hackety stuff, this week was the last week for Summer of Code. I'll
try to test out your packager code on OSX tomorrow.

> Being able to package a script for net install from any platform to any
> platform is something that makes Shoes very, very unique. We don't have
> that in policeman.

I never knew you could do this at all. That's awesome. Why did it go
away in policeman? (I know next to nothing about the packager except
that it's a giant pita)

Re: [shoes] Packager: Firm enough to commit.

From:
Cecil Coupe
Date:
2010-09-04 @ 05:09
On Sat, 2010-09-04 at 00:19 -0400, Steve Klabnik wrote:
> > [delete snarky message about not being able to package 'include shoes'
> > for OSX. Net install on OSX? Who knows?]
> 
> Sorry, I've been slacking off on this lately. Been doing some work on
> Hackety stuff, this week was the last week for Summer of Code. I'll
> try to test out your packager code on OSX tomorrow.
> 
> > Being able to package a script for net install from any platform to any
> > platform is something that makes Shoes very, very unique. We don't have
> > that in policeman.
> 
> I never knew you could do this at all. That's awesome. Why did it go
> away in policeman? (I know next to nothing about the packager except
> that it's a giant pita)

It went away because not every one knew what it could do (it's hidden in
the manual, if it's even in the manual or wiki at all). Back in the
_why/Raisin days, I could package a script of mine into a short 80KB+/-
exe/dmg/run (all of then)  that when the user doubled clicked on it,
would download shoes needed for them (if not already installed on the
users system) and run my tiny script in it. It was a freaking awesome
feature of Shoes that makes it truly unique.

Windows/Shoes changed in policeman, ashbb can fill in the reasons (mingw
and the relentless grind of incompatibility versions that is Windows).
It stopped working in OSX because nobody bothered to deal with the
relentless incompatibility of OSX versions. And to be fair, my
relentless inability to communicate the unique value of packager hasn't
worked. Tonight I think we have Linux sorted out, but that's low impact
for 90% of the potential audience. 

In a terminal '$ shoes -p' will reveal the secret packager. 

Re: [shoes] Packager: Firm enough to commit.

From:
ashbb
Date:
2010-09-04 @ 07:39
Hi Cecil, Steve and folks,

Why not replace Shoes opening packager to the new packager?

I think it's okay to reveal the secret packager, even if it's not perfect.

ashbb

Re: [shoes] Packager: Firm enough to commit.

From:
Cecil Coupe
Date:
2010-09-05 @ 02:51
I agree. The opening screen 'Package a Script' option should lead to the
same screen as '$ shoes -p' just as 'Open the manual' leads to the same
screen as '$ shoes -m'

It's not something I will attempt anytime soon - I've hand my fill of
packager disappointments for a while. 



On Sat, 2010-09-04 at 16:39 +0900, ashbb wrote:
> Hi Cecil, Steve and folks,
> 
> Why not replace Shoes opening packager to the new packager?
> 
> I think it's okay to reveal the secret packager, even if it's not
> perfect.
> 
> ashbb

Re: [shoes] Packager: Firm enough to commit.

From:
ashbb
Date:
2010-09-05 @ 04:11
Okay, I replaced `Shoes.package_app` to `Shoes.make_pack` on my github repo.
:)
http://github.com/ashbb/shoes/commit/018c53da43223a64274333ff868a5950161a768e

ashbb

Re: [shoes] Packager: Firm enough to commit.

From:
Cecil Coupe
Date:
2010-09-06 @ 05:35
Your modification worked for me. 
--Cecil

On Sun, 2010-09-05 at 13:11 +0900, ashbb wrote:
> Okay, I replaced `Shoes.package_app` to `Shoes.make_pack` on my github
> repo. :)
> http://github.com/ashbb/shoes/commit/018c53da43223a64274333ff868a5950161a768e
> 
> ashbb

Re: [shoes] Packager: Firm enough to commit.

From:
ashbb
Date:
2010-09-06 @ 13:30
Hi Cecil,

Wow, glad to hear that. Thank you for taking the time to confirm. :)

ashbb

Re: [shoes] Packager: Firm enough to commit.

From:
ashbb
Date:
2010-09-03 @ 13:30
Oops, forgot to write a big deal. xx-P

You removed line 381 `inc_text = @inc.text` :

http://github.com/ccoupe/shoes/commit/8bade1ff517b1fbfc83b62924fc75818aafcd5b2#L0R381

Yes, you are right. You can use `@incWin.text` directly within the
Thread.start block on Linux. But oddly, this code doesn't work on Windows.
I'm not sure why and this is the problem of Shoes or Ruby.

So, please accept my change for Windows. ;-)

ashbb

Re: [shoes] Packager: Firm enough to commit.

From:
ashbb
Date:
2010-09-03 @ 14:19
Cecil,

I tried to package the following hello.rb with my latest build (
http://github.com/ashbb/shoes) on VirtualBox Ubuntu on Windows 7.

# hello.rb
Shoes.app width: 300, height: 300 do
  para 'Hello World'
end

I could make `hello.run`. But when executed that, I got the following error.

Error in MD5 checksums: d41d8cd98f00b204e9800998ecf8427e is different from
bfbdc28441068493db261da79b823816

I broke your pack.rb? Umm,...

ashbb

Re: [shoes] Packager: Firm enough to commit.

From:
Cecil Coupe
Date:
2010-09-04 @ 00:52
I packaged your test and got the same errors (after of a lot of garble
on the terminals.

I think sh-install is the offender. I'll debug it.

FYI, There are some switches you can us on runs
./hello.run --help 

in particular --keep can be helpful.

On Fri, 2010-09-03 at 23:19 +0900, ashbb wrote:
> Cecil,
> 
> I tried to package the following hello.rb with my latest build
> (http://github.com/ashbb/shoes) on VirtualBox Ubuntu on Windows 7.
> 
> # hello.rb
> Shoes.app width: 300, height: 300 do
>   para 'Hello World'
> end
> 
> I could make `hello.run`. But when executed that, I got the following
> error.
> 
> Error in MD5 checksums: d41d8cd98f00b204e9800998ecf8427e is different
> from bfbdc28441068493db261da79b823816
> 
> I broke your pack.rb? Umm,...
> 
> ashbb

Re: [shoes] Packager: Firm enough to commit.

From:
Cecil Coupe
Date:
2010-09-04 @ 01:47
On Fri, 2010-09-03 at 18:52 -0600, Cecil Coupe wrote:
> I packaged your test and got the same errors (after of a lot of garble
> on the terminals.
> 
> I think sh-install is the offender. I'll debug it.
> 
Turns out to be an easy fix, except I made another error so it
took me two commits to get it right. Sorry.
1.
http://github.com/ccoupe/shoes/commit/6056d3dbd9b9a97c171797dcbb09e3aeb7086e54

2. Fix the error I created. Sorry about that!
http://github.com/ccoupe/shoes/commit/b1133b59ee24c821b0ea0d4ee958c01683b447fe

It dies when shoes starts up because it can't find the 32bit libs but
that's expected on a 64bit system and well after sh-install did the
right thing. 

Re: [shoes] Packager: Firm enough to commit.

From:
ashbb
Date:
2010-09-04 @ 04:07
Hi Cecil,

I confirmed your new sh-install both on Windows and Linux (VirtualBox
Ubuntu).
It works perfect!

Great work. Thanks,
ashbb

Re: [shoes] Packager: Firm enough to commit.

From:
Cecil Coupe
Date:
2010-09-04 @ 01:38
On Fri, 2010-09-03 at 22:30 +0900, ashbb wrote:
> Oops, forgot to write a big deal. xx-P
> 
> You removed line 381 `inc_text = @inc.text` :
> 
http://github.com/ccoupe/shoes/commit/8bade1ff517b1fbfc83b62924fc75818aafcd5b2#L0R381
> 
> Yes, you are right. You can use `@incWin.text` directly within the
> Thread.start block on Linux. But oddly, this code doesn't work on
> Windows. I'm not sure why and this is the problem of Shoes or Ruby.
> 
> So, please accept my change for Windows. ;-)

What ever works! ;-) I wonder if its a thread scoping thing about local
vars and instance vars?