librelist archives

« back to archive

shoeWax

shoeWax

From:
J. Kaiden
Date:
2011-12-04 @ 17:14
hey all,

  so, i've got the audio player i've been working more or less up and
running - give it a shot if you're up to it...
https://github.com/lljk/shoeWax  - (check out the screenshot there...)

  unfortunately, right now it might be a bit of a pain to get running...
 it's dependent on gstreamer, so you'll have to have that and the gem
installed - if you're running Windows you can check out sections III and IV
of this wiki: https://github.com/lljk/rubyWax/wiki/rubyWax-and-Windows -
for help getting those installed.

  as an additional inconvenience, you'll have to run the thing under my
shoes_gst build - it won't run under standard Shoes builds :(

  you can get shoes_gst here: https://github.com/lljk/shoes_gst/downloads .
 download the zip, extract it somewhere, enter the directory and run
'rake.'  the 'readme.txt' file has more detailed instructions...

  i would really like to be able to package this nicely, to avoid all the
above hassles...  i tried creating a standalone for Windows with the
packager in my shoes_gst build, but it doesn't work for one reason or
another.  any ideas about how to best package the thing?

  thanks to everyone on this list for all the help in getting this thing at
least this far!

  Shoes On...

  - j

Re: [shoes] shoeWax

From:
Steve Klabnik
Date:
2011-12-04 @ 19:36
You can build it the same way I build Hackety Hack:

https://github.com/hacketyhack/hacketyhack

I don't have documentation for it yet, but it relies on having an app.yaml file:

https://github.com/hacketyhack/hacketyhack/blob/master/app.yaml

Re: [shoes] shoeWax

From:
J. Kaiden
Date:
2011-12-06 @ 13:41
On Sun, Dec 4, 2011 at 8:36 PM, Steve Klabnik <steve@steveklabnik.com>wrote:

> You can build it the same way I build Hackety Hack:
>
> https://github.com/hacketyhack/hacketyhack
>
> I don't have documentation for it yet, but it relies on having an app.yaml
> file:
>
> https://github.com/hacketyhack/hacketyhack/blob/master/app.yaml



hey Steve,

  so, looking at this stuff - but i confess that i don't get it...  any
chance of a brief rundown on how it works?

  saw this too:
Building an installer

If you want to build Hackety Hack as a standalone app with the installer
for your platform, you need to have your own Shoes built. Then, get your
directories lined up…

$ ls
shoes hacketyhack

And rebuild shoes, while pointing the APP flag at your Hackety directory:

$ cd shoes
$ rake APP=../hacketyhack
$ rake APP=../hacketyhack installer

That’s it!

  and that seems like something that could work (maybe?)  - but what does
"get your directories lined up" mean?  sorry if it's obvious - i'm pretty
green at this!

  thanks,

  - j

Re: [shoes] shoeWax

From:
Steve Klabnik
Date:
2011-12-06 @ 14:10
I haven't delved deeply into how exactly all the things in app.yaml work yet.

On 'directories lining up': See the ls? See how the shoes directory
and the hackety hack directory are next to each other? Then you go
into the shoes directory, and instead of just typing 'rake' to build
Shoes, you pass an extra parameter, APP.

Re: [shoes] shoeWax

From:
J. Kaiden
Date:
2011-12-06 @ 14:43
thanks for helping - really appreciate it...

  so i've got an 'app.yaml' file in my shoewax root directory, and i've got
my shoes_gst build.

  the app.yaml looks like this:

name: shoeWax
version: 0.11.12
release: Material
icons:
  win32: platform/msw/App.ico
  osx:   platform/mac/App.icns
  gtk:   platform/nix/app.png
dmg:
  background: screenshot.jpg
run: shoewax.rb

  what i'm doing is this:  i copy the shoewax directory into the shoes_gst
root directory.  i `ls` from within the shoes_gst root, (not the right
place?) - obviously i get a list of everything, not just the shoes dir and
my shoewax dir - and the shoes dir and my shoewax dir are not exactly
'next' to each other, i've got the 'shoes.gemspec' file between them...
 does this matter?  am i doing this all wrong?

  when i cd to the shoes dir and run 'rake APP=./shoewax' ('./shoewax',
because '../shoewax' can't be found - making me think i'm doing this from
the wrong place - anyway...) the rake starts, but then fails with these
errors:

shoes/ruby.c:4383:73: error: too many decimal points in number
rake aborted!
Command failed with status (1): [gcc -I. -c -oshoes/ruby.o -Wall
-I/usr/inc...]
/home/jk/shoe_wax_shoes/Rakefile:177:in `cc'

  for the hell of it, i go ahead and run 'rake APP = ./shoeWax installer'
and that seems to run alright - giving me a .run file in the pkg directory.
 when i run that file, however - i get the error:

eval: 1: ./shoewax: not found

  see anything obviously stupid that i'm doing?  i wouldn't be surprised ;)

  thanks again for the help...

  - j

Re: [shoes] shoeWax

From:
Steve Klabnik
Date:
2011-12-06 @ 16:04
>i've got the 'shoes.gemspec' file between them...  does this
> matter?  am i doing this all wrong?

shoes.gemspec? Note that this is for red, not green shoes...

> making me think i'm doing this from
> the wrong place - anyway...)

Yep, that probably means you've got it wrong.


>   for the hell of it, i go ahead and run 'rake APP = ./shoeWax installer'
> and that seems to run alright - giving me a .run file in the pkg directory.
>  when i run that file, however - i get the error:

That just packages up what's in the dist diirectory, so if you didnt
successfully build, it won't build something good. :)


>   see anything obviously stupid that i'm doing?  i wouldn't be surprised ;)

No worries. This is something that's totally undocumented, so it's not
surprising you have problems...

Let's try this again.

1) Make a directory in your home folder. Call it 'shoes_build'

$ mkdir ~/shoes_build

2) Put your copy of shoes into the directory

$ cd ~/shoes_build
$ cp /some/path/to/my/shoes .

3) put your app, in a folder, into the directory

$ cp /some/path/to/my/app .

4) now, you should have just those two things. Your app folder should
have the app.yaml

$ ls
shoes app
$ ls app
$ stuff stuff app.yaml stuff

(or whatever your app is called.)

5) now, go into shoes, and run rake, with the right parameters:

$ cd shoes
$ rake APP=../app

See how '../app' is pointing at the directory with your app in it?
That should build.

6) build an installer

$ rake APP=../app installer

And you should be done.

Does this make more sense?

Re: [shoes] shoeWax

From:
J. Kaiden
Date:
2011-12-06 @ 23:07
hey Steve,

  thanks for getting back - this message was supposed to be sent just after
the first, but for whatever reason wasn't:

so, maybe i've seen something obviously stupid myself...

  i think i was confusing the shoes dir with the shoes/shoes dir - so i
tried doing this:

  in a new directory i placed my shoes_gst build, and the shoewax dir.
 `ls` now shows the two sitting nicely next to each other.  then from the
shoes_gst dir i ran 'rake APP=../shoewax' - and guess what...  now
'../shoewax' exists, go figure.

  unfortunately i still get the same errors - so there must be plenty more
stupidity that i'm not seeing...

  ...end original mess-age

  so yeah, i'm still doing something wrong - going to whack at it some
more, and i'll sure get back with more questions...

  definitely makes more sense - working on it, and happy to help with docs
once i get it figured out...

  (wicked) thanks again,

 - j

Re: [shoes] shoeWax

From:
Steve Klabnik
Date:
2011-12-07 @ 01:07
Interesting. Here's the line that dies:

https://github.com/shoes/shoes/blob/develop/shoes/ruby.c#L4383

SHOES_RELEASE_ID is defined in the Rakefile:
https://github.com/shoes/shoes/blob/develop/Rakefile#L127

RELEASE_ID is defined in the Rakefile:
https://github.com/shoes/shoes/blob/develop/Rakefile#L12

APP is defined in the Rakefile:
https://github.com/shoes/shoes/blob/develop/Rakefile#L10

So, as it seems, you have too many numbers in your version. I bet if
you don't use two periods, i.e., 11.12 instead of 0.11.12, that it'll
work.

Re: [shoes] shoeWax

From:
J. Kaiden
Date:
2011-12-07 @ 10:41
hey Steve,

  well, getting it there - changing the version number did get me through
the rake, thanks!

  so now i get the thing built just fine, and create the installer ok - but
when running the created .run file i get errors about already initialized
constants - TOPDIR, CONFIG, and MAKEFILE_CONFIG - from
 /tmp/selfgz9479/ruby/lib/i686-linux/rbconfig.rb

  any ideas what that's about?

  thanks again - sorry for the hassles....

  - j

Re: [shoes] shoeWax

From:
Steve Klabnik
Date:
2011-12-07 @ 12:36
>   so now i get the thing built just fine, and create the installer ok - but
> when running the created .run file i get errors about already initialized
> constants - TOPDIR, CONFIG, and MAKEFILE_CONFIG - from
>  /tmp/selfgz9479/ruby/lib/i686-linux/rbconfig.rb

Not sure, can you give me the exact errors?

Re: [shoes] shoeWax

From:
J. Kaiden
Date:
2011-12-08 @ 16:57
hey folks -

  (sorry if this is a repeat post - i believe the first time i sent this it
failed...)

  Steve,
    i'm sure i'm doing something weird/dumb/wrong - going to keep whacking
at it...  here are the exact errors i get:

  (in the ubuntu console window:)
/tmp/selfgz10446/ruby/lib/i686-linux/rbconfig.rb:9: warning: already
initialized constant TOPDIR

/tmp/selfgz10446/ruby/lib/i686-linux/rbconfig.rb:11: warning: already
initialized constant CONFIG

/tmp/selfgz10446/ruby/lib/i686-linux/rbconfig.rb:202: warning: already
initialized constant MAKEFILE_CONFIG

  (in the shoes console window:)
no such file or directory - shoewax.rb
/tmp/selfgz10446/lib/shoes.rb:446: in 'read'
/tmp/selfgz10446/lib/shoes.rb:446: in 'read_file'
/tmp/selfgz10446/lib/shoes.rb:434: in 'visit'

  this last bit gives me a good idea that i've done something stupid -
going to keep trying...


  Ashbb,

  cool that you got the gems to install...  i had originally attached a
copy of the `gst.so` that was created when i installed on Win2000 - but it
seems i can't send messages to the list with attachments (?)  -  anyway, i
didn't get anything called `gstreamer.so` - so hopefully this is what
you're looking for...
https://github.com/lljk/shoes_gst/blob/master/req/gstreamer/ext/gstreamer/gst.so

  one of the biggest problems i remember having when i was trying to do
shoeWax in green_shoes was that a lot of the methods i use for the layout
(like ::move, and more importantly ::rotate,) are not available in
green_shoes - or so it would seem(?)

  can i call gtk methods directly to handle the layout and rotation?


  thanks again to both of you for all the help,

  - j

Re: [shoes] shoeWax

From:
J. Kaiden
Date:
2011-12-08 @ 17:10
hey again,

  so something that i was thinking of as well was packing the whole thing
up as a gem...  is that something that seems at all reasonable to you guys?

  ashbb, you've obviously got some experience packing shoes into a gem - i
was looking at your gemspec, but i'm still just getting my head around the
whole thing...  any pointers you could give me?

  Steve, i noticed that after building red Shoes, i get a
/pkg/shoes-3.0.1.gem file.  i see that it's just a place holder for the
moment, but do you think it could somehow be made to work?

  thanks again,
  Shoes On -

  - j

Re: [shoes] shoeWax

From:
Steve Klabnik
Date:
2011-12-09 @ 13:15
>   ashbb, you've obviously got some experience packing shoes into a gem - i
> was looking at your gemspec, but i'm still just getting my head around the
> whole thing...  any pointers you could give me?

I'm not ash, but... http://timelessrepo.com/making-ruby-gems

>   Steve, i noticed that after building red Shoes, i get a
> /pkg/shoes-3.0.1.gem file.  i see that it's just a place holder for the
> moment, but do you think it could somehow be made to work?

I spent about two weeks working on this. It involves throwing out the
build process, using mkmf instead, including a monkey patch to handle
a bug with mkmf not knowing how to compile Objective-C files, and
re-doing the Shoes boot up process.

It _worked_, technically, but it would segfault upon startup. I didn't
figure it out past there.

Re: [shoes] shoeWax

From:
J. Kaiden
Date:
2011-12-09 @ 15:01
hey folks -

  Steve, thanks for the link -

 http://timelessrepo.com/making-ruby-gems


  awesome...  i had found a few 'tutorials' on making gems, but hadn't come
across yours, and it looks like a dang good one.  reading/working/grok-ing
now...


  ashbb,

 https://github.com/ashbb/shoeWax/tree/onGreenShoes

  cool!  i'll be checking in on it to see how it's coming along...


  thanks again to both of you for all the help,

  - j

Re: [shoes] shoeWax

From:
ashbb
Date:
2011-12-12 @ 14:56
Hi J and folks,

Look at this: http://vgoff.posterous.com/shoewax-on-green-shoes

Porting is not completed yet, but I can listen MP3 songs with shoeWax on
Green Shoes now. ;-)

Cheers,
ashbb

Re: [shoes] shoeWax

From:
J. Kaiden
Date:
2011-12-12 @ 20:30
nice one!

  i'll have to check it out!

  Shoes On...

  - j



On Mon, Dec 12, 2011 at 3:56 PM, ashbb <ashbbb@gmail.com> wrote:

> Hi J and folks,
>
> Look at this: http://vgoff.posterous.com/shoewax-on-green-shoes
>
> Porting is not completed yet, but I can listen MP3 songs with shoeWax on
> Green Shoes now. ;-)
>
> Cheers,
> ashbb
>

Re: [shoes] shoeWax

From:
J. Kaiden
Date:
2011-12-12 @ 20:48
ashbb,

  looks awesome!  let me know if you have any questions, and please forgive
any barbaric code!  i'll be looking over the changes involved in porting to
green shoes to try and get a better idea of how green shoes works...

  i had forgotten to add a copy of the gnu gpl v.3 license to the repo -
and just did.  i was trying to open up a pull request, but for some reason
couldn't quite get it figured out - would you mind adding a copy of the gnu
general public license version 3 http://www.gnu.org/copyleft/gpl.html to
your repo?

  thanks,

  keep Shoes'in

  - j



On Mon, Dec 12, 2011 at 9:30 PM, J. Kaiden <jakekaiden@gmail.com> wrote:

> nice one!
>
>   i'll have to check it out!
>
>   Shoes On...
>
>   - j
>
>
>
> On Mon, Dec 12, 2011 at 3:56 PM, ashbb <ashbbb@gmail.com> wrote:
>
>> Hi J and folks,
>>
>> Look at this: http://vgoff.posterous.com/shoewax-on-green-shoes
>>
>> Porting is not completed yet, but I can listen MP3 songs with shoeWax on
>> Green Shoes now. ;-)
>>
>> Cheers,
>> ashbb
>>
>
>

Re: [shoes] shoeWax

From:
J. Kaiden
Date:
2011-12-12 @ 23:44
hey ashbb,

  hmm, don't know what's up, but i get an error at startup( on ubuntu 10.04
lts)  -

jk@jk-laptop:~/ruby/ashbb-shoeWax-6b71b08$ ruby shoeWax_on_green_shoes.rb
/home/jk/.rvm/gems/ruby-1.9.3-p0/gems/green_shoes-1.0.331/lib/shoes/app.rb:670:in
`from_png': file not found (Cairo::FileNotFound)
from
/home/jk/.rvm/gems/ruby-1.9.3-p0/gems/green_shoes-1.0.331/lib/shoes/app.rb:670:in
`gradient'
from
/home/jk/.rvm/gems/ruby-1.9.3-p0/gems/green_shoes-1.0.331/lib/shoes/app.rb:701:in
`background'
from

/home/jk/.rvm/gems/ruby-1.9.3-p0/gems/green_shoes-1.0.331/lib/shoes/basic.rb:194:in
`move2'
from

/home/jk/.rvm/gems/ruby-1.9.3-p0/gems/green_shoes-1.0.331/lib/shoes/helper_methods.rb:193:in
`block in repaint_all'
from

/home/jk/.rvm/gems/ruby-1.9.3-p0/gems/green_shoes-1.0.331/lib/shoes/helper_methods.rb:190:in
`each'
from

/home/jk/.rvm/gems/ruby-1.9.3-p0/gems/green_shoes-1.0.331/lib/shoes/helper_methods.rb:190:in
`repaint_all'
from

/home/jk/.rvm/gems/ruby-1.9.3-p0/gems/green_shoes-1.0.331/lib/shoes/helper_methods.rb:221:in
`call_back_procs'
from
/home/jk/.rvm/gems/ruby-1.9.3-p0/gems/green_shoes-1.0.331/lib/shoes/main.rb:101:in
`app'
from
/home/jk/.rvm/gems/ruby-1.9.3-p0/gems/green_shoes-1.0.331/lib/shoes/app.rb:795:in
`window'
from shoeWax_on_green_shoes.rb:164:in `show_info_win'
from shoeWax_on_green_shoes.rb:174:in `block in <main>'
from
/home/jk/.rvm/gems/ruby-1.9.3-p0/gems/green_shoes-1.0.331/lib/shoes/main.rb:81:in
`instance_eval'
from
/home/jk/.rvm/gems/ruby-1.9.3-p0/gems/green_shoes-1.0.331/lib/shoes/main.rb:81:in
`app'
from shoeWax_on_green_shoes.rb:42:in `<main>'


  i looked at .../app.rb line 670 - and it seems the problem is with a
variable `pat` in the `gradient` method...  any ideas?

  thanks,

  - j

Re: [shoes] shoeWax

From:
ashbb
Date:
2011-12-13 @ 12:12
Hi J,

Oh, sorry. I've added a few features and fixed some bugs to run shoeWax on
Green Shoes, but have not uploaded the latest gem to RubyGems.org yet.

I'll do it from now. Before that, use the latest Green Shoes on my github
repo. ;-)

ashbb

Re: [shoes] shoeWax

From:
ashbb
Date:
2011-12-13 @ 12:14
J,

Okay, I'll add the gnu gpl v3 license to my 'onGreenShoes' branch.

BTW, shoeWax on Green Shoes is not completed yet, but if you don't mind
could you merge the current 'onGreenShoes' branch to your shoeWax repo on
github?

If it's okay, I'll send you a pull request.

ashbb

Re: [shoes] shoeWax

From:
J. Kaiden
Date:
2011-12-13 @ 13:46
hi ashbb,

  i thought my problem might be an outdated pair of green shoes ;)  i'll
try it again with the latest repo version.

could you merge the current 'onGreenShoes' branch to your shoeWax repo on
> github?
> If it's okay, I'll send you a pull request.


  of course, happy to...  send a request and i'll merge it.

  rock on...

  - j

Re: [shoes] shoeWax

From:
ashbb
Date:
2011-12-09 @ 12:42
Hi J,

>  ashbb, you've obviously got some experience packing shoes into a gem - i
was
> looking at your gemspec, but i'm still just getting my head around the
whole
> thing...  any pointers you could give me?
Ah,.... hahaha.
Sorry, I have not enough experience. Because the gemspec of Green Shoes was
written by Zak.

Oh, Zak! Are you still there in this Shoes ML?

ashbb

Re: [shoes] shoeWax

From:
ashbb
Date:
2011-12-09 @ 12:35
Hi J,

>
https://github.com/lljk/shoes_gst/blob/master/req/gstreamer/ext/gstreamer/gst.so
Thanks. But, unfortunately it's not what I expected...

> one of the biggest problems i remember having when i was trying to do
shoeWax
> in green_shoes was that a lot of the methods i use for the layout (like
::move,
> and more importantly ::rotate,) are not available in green_shoes - or so
it
> would seem(?)
Ah,... Green Shoes has them, too. But there are some differences between
Red Shoes and Green Shoes. ;-)

Look at this: https://github.com/ashbb/shoeWax/tree/onGreenShoes
It's not finished, just started. But anyway I've started porting. :)

ashbb

Re: [shoes] shoeWax

From:
J. Kaiden
Date:
2011-12-04 @ 23:32
thanks Steve -

  looking into it...

Shoes is wicked...

  - j

On Sun, Dec 4, 2011 at 8:36 PM, Steve Klabnik <steve@steveklabnik.com>wrote:

> You can build it the same way I build Hackety Hack:
>
> https://github.com/hacketyhack/hacketyhack
>
> I don't have documentation for it yet, but it relies on having an app.yaml
> file:
>
> https://github.com/hacketyhack/hacketyhack/blob/master/app.yaml
>

Re: [shoes] shoeWax

From:
Steve Klabnik
Date:
2011-12-04 @ 23:54
No problem. This is something I've literally been meaning to document
for like a year.

Re: [shoes] shoeWax

From:
ashbb
Date:
2011-12-05 @ 12:59
Hi J,

>  https://github.com/lljk/shoeWax  - (check out the screenshot there...)
Wow, cool!
I'd like to play ShoeWax on my Windows 7. But you mentioned that:

> you'll have to run the thing under my shoes_gst build - it won't run
> under standard Shoes builds :(
Umm,... why?
Could you show us the difference between standard Shoes and your shoes_gst
build?

ashbb

Re: [shoes] shoeWax

From:
J. Kaiden
Date:
2011-12-05 @ 14:32
hi ash -

  well, the only difference between my shoes_gst build and a 'normal'
policeman build is that i've included the gstreamer and glib2 gems...  i
couldn't get shoes to play nice with gems with native dependencies without
building my own - but there could well be another way to make this work
that i'm not aware of.

  here's a wiki about how i built shoes_gst, which will show the only
differences -
https://github.com/lljk/shoes-stuff/wiki/Shoes-and-Gems-with-Native-Dependencies

On Mon, Dec 5, 2011 at 1:59 PM, ashbb <ashbbb@gmail.com> wrote:

> Hi J,
>
>
> >  https://github.com/lljk/shoeWax  - (check out the screenshot there...)
> Wow, cool!
> I'd like to play ShoeWax on my Windows 7. But you mentioned that:
>
>
> > you'll have to run the thing under my shoes_gst build - it won't run
> > under standard Shoes builds :(
> Umm,... why?
> Could you show us the difference between standard Shoes and your shoes_gst
> build?
>
> ashbb
>

Re: [shoes] shoeWax

From:
ashbb
Date:
2011-12-05 @ 15:18
Hi J,

Thanks for the information.
Okay, I'll check it out. But sorry, I've a little free time in this week.
So, give me a few days... or a week.

ashbb

Re: [shoes] shoeWax

From:
J. Kaiden
Date:
2011-12-06 @ 02:56
thanks for giving it a look - no hurry...

  as i think i mentioned, i'm working on a green_shoes version too - i've
got a few questions that i'll get back to you with if that's alright!

  - j

Re: [shoes] shoeWax

From:
ashbb
Date:
2011-12-07 @ 11:57
Hi J,

I just tried out the following.

- download Kou's trial gems for glib2 and gstreamer
  http://pub.cozmixng.org/~kou/archives/glib2-1.0.3-x86-mingw32.gem
  http://pub.cozmixng.org/~kou/archives/gstreamer-1.0.3-x86-mingw32.gem

- in the same directory, run the below snippet with Shoes 3 for Windows

  Shoes.setup do
    gem 'glib2', '1.0.3'
    gem 'gstreamer', '1.0.3'
  end
  Shoes.app do
    para require 'glib2' # 1
    para require 'gst'   # 2
  end

The result is:
- installing two gems are good
- #1 shows 'true'
- but get an error at #2: "can't find ruby_vsnprintf from
msvcrt-ruby191.dll"

Umm,... unfortunately, as you mentioned,
you will have to rebuild Red Shoes to use gstreamer...

So, could you send me `gstreamer.so` you built on your Windows?

> as i think i mentioned, i'm working on a green_shoes version too -
> i've got a few questions that i'll get back to you with if that's alright!
Wow, cool! Feel free let me know anything.
I'm also going to try porting ShoeWax on Green Shoes. ;-)

ashbb