[vwnc] External cairo libraries on OSX

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

[vwnc] External cairo libraries on OSX

Maarten Mostert-2
Hi,

I installed the GTK+2 libraries using fink on OSX. and they are
installed on sw/lib/GTK-2

As I try to run the Akamura Cairo demo I still run into the cannot find
library message which indicates it is looking for the file: libcairo.dylib

As I have this file in the GTK directory I copied all these in my VW and
image directories to see I f this would help.

In this case the error message is slightly changed.

It now indicates: External Object not found.  It still seems to be
dealing with the same libcairo.dylib file.

Any idears to get this working ?






_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] External cairo libraries on OSX

Travis Griggs-3

On Mar 21, 2009, at 3:25 AM, Maarten Mostert wrote:

> Hi,
>
> I installed the GTK+2 libraries using fink on OSX. and they are
> installed on sw/lib/GTK-2
>
> As I try to run the Akamura Cairo demo I still run into the cannot  
> find
> library message which indicates it is looking for the file:  
> libcairo.dylib
>
> As I have this file in the GTK directory I copied all these in my VW  
> and
> image directories to see I f this would help.
>
> In this case the error message is slightly changed.
>
> It now indicates: External Object not found.  It still seems to be
> dealing with the same libcairo.dylib file.
>
> Any idears to get this working ?


ymmv... but I quit using fink for anything. I found it was too often  
too out of date. Ryan Schmidt, who maintains the Cairo library for  
macports does a wonderful job of keeping it up date. I have basically  
found this to be true with all the *nix packages I use on OSX, so I  
just use macports for everything now. Good/responsive #irc channel for  
macports has helped everytime I've had a problem or question quite  
quickly and friendly.

--
Travis Griggs
Objologist
Light travels faster than sound. This is why some people appear bright  
until you hear them speak...




_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] External cairo libraries on OSX

Maarten Mostert-2
Hi Travis,

I first used Macports but as that didn't work, I tried fink.
As I am now back to Macports and wonder what you actualy installed.
Do you only use cairo and pango or do we need the complete gtk2 with all
the pyhton stuff ?
Could you send me a copy of your ports installed command.

Thanks in advance,

@+Maarten,


Travis Griggs a écrit :

>
>
> On Mar 21, 2009, at 3:25 AM, Maarten Mostert wrote:
>
>> Hi,
>>
>> I installed the GTK+2 libraries using fink on OSX. and they are
>> installed on sw/lib/GTK-2
>>
>> As I try to run the Akamura Cairo demo I still run into the cannot find
>> library message which indicates it is looking for the file:
>> libcairo.dylib
>>
>> As I have this file in the GTK directory I copied all these in my VW and
>> image directories to see I f this would help.
>>
>> In this case the error message is slightly changed.
>>
>> It now indicates: External Object not found.  It still seems to be
>> dealing with the same libcairo.dylib file.
>>
>> Any idears to get this working ?
>
>
> ymmv... but I quit using fink for anything. I found it was too often
> too out of date. Ryan Schmidt, who maintains the Cairo library for
> macports does a wonderful job of keeping it up date. I have basically
> found this to be true with all the *nix packages I use on OSX, so I
> just use macports for everything now. Good/responsive #irc channel for
> macports has helped everytime I've had a problem or question quite
> quickly and friendly.
>
> --
> Travis Griggs
> Objologist
> Light travels faster than sound. This is why some people appear bright
> until you hear them speak...
>
>
>
>
>
>


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] External cairo libraries on OSX

Karsten Kusche
Hi Maarten,

I just had a quick look at the libs folder and I only have pango and cairo installed. I've opened a new image, loaded cairo and pango and a cairo demo. I also got a 'Could not load library', but then i changed the library directories in the LibCairo class to #('opt/local/lib') and then everything worked nicely.

Kind Regards
Karsten



Maarten Mostert wrote:
Hi Travis,

I first used Macports but as that didn't work, I tried fink.
As I am now back to Macports and wonder what you actualy installed.
Do you only use cairo and pango or do we need the complete gtk2 with all 
the pyhton stuff ?
Could you send me a copy of your ports installed command.

Thanks in advance,

@+Maarten,


Travis Griggs a écrit :
  
On Mar 21, 2009, at 3:25 AM, Maarten Mostert wrote:

    
Hi,

I installed the GTK+2 libraries using fink on OSX. and they are
installed on sw/lib/GTK-2

As I try to run the Akamura Cairo demo I still run into the cannot find
library message which indicates it is looking for the file: 
libcairo.dylib

As I have this file in the GTK directory I copied all these in my VW and
image directories to see I f this would help.

In this case the error message is slightly changed.

It now indicates: External Object not found.  It still seems to be
dealing with the same libcairo.dylib file.

Any idears to get this working ?
      
ymmv... but I quit using fink for anything. I found it was too often 
too out of date. Ryan Schmidt, who maintains the Cairo library for 
macports does a wonderful job of keeping it up date. I have basically 
found this to be true with all the *nix packages I use on OSX, so I 
just use macports for everything now. Good/responsive #irc channel for 
macports has helped everytime I've had a problem or question quite 
quickly and friendly.

-- 
Travis Griggs
Objologist
Light travels faster than sound. This is why some people appear bright 
until you hear them speak...






    


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc


  

-- 
Karsten Kusche - Dipl.Inf. - [hidden email]
Tel: +49 3496 21 43 29
Georg Heeg eK - Köthen
Handelsregister: Amtsgericht Dortmund A 12812

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] External cairo libraries on OSX

Maarten Mostert-2
Hi Karsten,

Well I tried what you said with clean images but without the succes for
the time being.

I now removed all ports from MacPorts to reinstall only cairo and pango.

Unlike gtk2 they did so without listing any error.


the "port installed" command now states:

The following ports are currently installed:
  cairo @1.8.6_4+macosx (active)
  expat @2.0.1_0 (active)
  fontconfig @2.6.0_2+macosx (active)
  freetype @2.3.9_0+macosx (active)
  gettext @0.17_4 (active)
  glib2 @2.18.3_0+darwin_9 (active)
  gperf @3.0.4_0 (active)
  libiconv @1.12_2 (active)
  libpixman @0.14.0_0 (active)
  libpng @1.2.35_0 (active)
  ncurses @5.7_0 (active)
  ncursesw @5.7_0 (active)
  pango @1.24.0_0+macosx (active)
  perl5 @5.8.9_0 (active)
  perl5.8 @5.8.9_2 (active)
  pkgconfig @0.23_1 (active)
  Xft2 @2.1.13_1 (active)
  xorg-bigreqsproto @1.0.2_0 (active)
  xorg-inputproto @1.5.0_0 (active)
  xorg-kbproto @1.0.3_0 (active)
  xorg-libX11 @1.2_0 (active)
  xorg-libXau @1.0.4_0 (active)
  xorg-libXdmcp @1.0.2_0 (active)
  xorg-renderproto @0.9.3_0 (active)
  xorg-xcmiscproto @1.1.2_0 (active)
  xorg-xextproto @7.0.5_0 (active)
  xorg-xf86bigfontproto @1.1.2_0 (active)
  xorg-xproto @7.0.15_0 (active)
  xorg-xtrans @1.2.3_0 (active)
  xrender @0.9.4_5 (active)
  zlib @1.2.3_2 (active)

I changed: the LibCairo class definition to the following:

Smalltalk.CairoGraphics defineClass: #LibCairo
    superclass: #{External.ExternalInterface}
    indexedType: #none
    private: false
    instanceVariableNames: ''
    classInstanceVariableNames: ''
    imports: '
            CairoGraphics.LibCairoDictionary.*
            '
    category: 'ExternalInterface-New'
    attributes: #(
            #(#includeFiles #('cairo.h'))
            #(#includeDirectories #('/usr/include/cairo/'
'/opt/local/var/macports/software/cairo/1.8.6_4+macosx/opt/local/include/cairo/'))
            #(#libraryFiles #())
            #(#libraryDirectories #('/opt/local/lib/'))
            #(#beVirtual false)
            #(#optimizationLevel #full))

Notice that I don't have a /usr/include/cairo/'   directory on y machine
this is why I added the long macport directory to cairo.h.

All my different combinations remain without succes.

The cannot find libraries is easy to overcome but the cannot find
external object message remains.


Regards,

@+Maarten,


Karsten a écrit :

> Hi Maarten,
>
> I just had a quick look at the libs folder and I only have pango and
> cairo installed. I've opened a new image, loaded cairo and pango and a
> cairo demo. I also got a 'Could not load library', but then i changed
> the library directories in the LibCairo class to #('opt/local/lib')
> and then everything worked nicely.
>
> Kind Regards
> Karsten
>
>
>
> Maarten Mostert wrote:
>> Hi Travis,
>>
>> I first used Macports but as that didn't work, I tried fink.
>> As I am now back to Macports and wonder what you actualy installed.
>> Do you only use cairo and pango or do we need the complete gtk2 with all
>> the pyhton stuff ?
>> Could you send me a copy of your ports installed command.
>>
>> Thanks in advance,
>>
>> @+Maarten,
>>
>>
>> Travis Griggs a écrit :
>>  
>>> On Mar 21, 2009, at 3:25 AM, Maarten Mostert wrote:
>>>
>>>    
>>>> Hi,
>>>>
>>>> I installed the GTK+2 libraries using fink on OSX. and they are
>>>> installed on sw/lib/GTK-2
>>>>
>>>> As I try to run the Akamura Cairo demo I still run into the cannot
>>>> find
>>>> library message which indicates it is looking for the file:
>>>> libcairo.dylib
>>>>
>>>> As I have this file in the GTK directory I copied all these in my
>>>> VW and
>>>> image directories to see I f this would help.
>>>>
>>>> In this case the error message is slightly changed.
>>>>
>>>> It now indicates: External Object not found.  It still seems to be
>>>> dealing with the same libcairo.dylib file.
>>>>
>>>> Any idears to get this working ?
>>>>        
>>> ymmv... but I quit using fink for anything. I found it was too often
>>> too out of date. Ryan Schmidt, who maintains the Cairo library for
>>> macports does a wonderful job of keeping it up date. I have basically
>>> found this to be true with all the *nix packages I use on OSX, so I
>>> just use macports for everything now. Good/responsive #irc channel for
>>> macports has helped everytime I've had a problem or question quite
>>> quickly and friendly.
>>>
>>> --
>>> Travis Griggs
>>> Objologist
>>> Light travels faster than sound. This is why some people appear bright
>>> until you hear them speak...
>>>
>>>
>>>
>>>
>>>
>>>
>>>      
>>
>>
>> _______________________________________________
>> vwnc mailing list
>> [hidden email]
>> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>>
>>
>>    
>


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] External cairo libraries on OSX

Reinout Heeck
Maarten Mostert wrote:

> I changed: the LibCairo class definition to the following:
>
> Smalltalk.CairoGraphics defineClass: #LibCairo
>     superclass: #{External.ExternalInterface}
>     indexedType: #none
>     private: false
>     instanceVariableNames: ''
>     classInstanceVariableNames: ''
>     imports: '
>             CairoGraphics.LibCairoDictionary.*
>             '
>     category: 'ExternalInterface-New'
>     attributes: #(
>             #(#includeFiles #('cairo.h'))
>             #(#includeDirectories #('/usr/include/cairo/'
> '/opt/local/var/macports/software/cairo/1.8.6_4+macosx/opt/local/include/cairo/'))
>             #(#libraryFiles #())
>             #(#libraryDirectories #('/opt/local/lib/'))
>             #(#beVirtual false)
>             #(#optimizationLevel #full))
>
> Notice that I don't have a /usr/include/cairo/'   directory on y machine
> this is why I added the long macport directory to cairo.h.


Hi Maarten,


#includeFiles and #includeDirectories are only necessary if you want to
regenerate the external interface class from the header files -- at
runtime they may contain bogus values or be empty.

However #libraryFiles must be valid at runtime (and is missing in your
example!).
#libraryDirectories is optional, for those cases where your shared
libraries are not in a place the system always searches.


R
-

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] External cairo libraries on OSX

Travis Griggs-3

On Mar 23, 2009, at 6:58 AM, Reinout Heeck wrote:

> Maarten Mostert wrote:
>
>> I changed: the LibCairo class definition to the following:
>>
>> Smalltalk.CairoGraphics defineClass: #LibCairo
>>    superclass: #{External.ExternalInterface}
>>    indexedType: #none
>>    private: false
>>    instanceVariableNames: ''
>>    classInstanceVariableNames: ''
>>    imports: '
>>            CairoGraphics.LibCairoDictionary.*
>>            '
>>    category: 'ExternalInterface-New'
>>    attributes: #(
>>            #(#includeFiles #('cairo.h'))
>>            #(#includeDirectories #('/usr/include/cairo/'
>> '/opt/local/var/macports/software/cairo/1.8.6_4+macosx/opt/local/
>> include/cairo/'))
>>            #(#libraryFiles #())
>>            #(#libraryDirectories #('/opt/local/lib/'))
>>            #(#beVirtual false)
>>            #(#optimizationLevel #full))
>>
>> Notice that I don't have a /usr/include/cairo/'   directory on y  
>> machine
>> this is why I added the long macport directory to cairo.h.
>
>
> Hi Maarten,
>
>
> #includeFiles and #includeDirectories are only necessary if you want  
> to
> regenerate the external interface class from the header files -- at
> runtime they may contain bogus values or be empty.
>
> However #libraryFiles must be valid at runtime (and is missing in your
> example!).
> #libraryDirectories is optional, for those cases where your shared
> libraries are not in a place the system always searches.

An empty libraryFiles IS fine, there are other ways of defining the  
libraries to be used. Cairo uses the tag based methods exclusively.

--
Travis Griggs
Objologist
For every adage, there is an equal and contrary un-adage

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] External cairo libraries on OSX

Travis Griggs-3
In reply to this post by Maarten Mostert-2
On Mar 23, 2009, at 2:04 AM, Maarten Mostert wrote:

> Hi Travis,
>
> I first used Macports but as that didn't work, I tried fink.
> As I am now back to Macports and wonder what you actualy installed.
> Do you only use cairo and pango or do we need the complete gtk2 with  
> all the pyhton stuff ?
> Could you send me a copy of your ports installed command.


I have quite a few things installed via macports, more than just cairo  
and pango. I use it for git and subversion and ImageMagick, etc.

That all aside. Which external object is it refusing to find?

--
Travis Griggs
Objologist
I patented thinking... and I still can't find anyone infringing.

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] External cairo libraries on OSX

Maarten Mostert-2
Travis Griggs a écrit :
On Mar 23, 2009, at 2:04 AM, Maarten Mostert wrote:

  
Hi Travis,

I first used Macports but as that didn't work, I tried fink.
As I am now back to Macports and wonder what you actualy installed.
Do you only use cairo and pango or do we need the complete gtk2 with  
all the pyhton stuff ?
Could you send me a copy of your ports installed command.
    


I have quite a few things installed via macports, more than just cairo  
and pango. I use it for git and subversion and ImageMagick, etc.

That all aside. Which external object is it refusing to find?
  
Hi Travis,

It is calling for

ExternalMethod CairoGraphics.LibCairo>>cairo_quartz_surface_create_for_cg_context:with:with:

@+Maarten,

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] External cairo libraries on OSX

Travis Griggs-3

On Mar 23, 2009, at 10:33 AM, Maarten Mostert wrote:

> Travis Griggs a écrit :
>>
>> On Mar 23, 2009, at 2:04 AM, Maarten Mostert wrote:
>>
>>
>>> Hi Travis,
>>>
>>> I first used Macports but as that didn't work, I tried fink.
>>> As I am now back to Macports and wonder what you actualy installed.
>>> Do you only use cairo and pango or do we need the complete gtk2 with
>>> all the pyhton stuff ?
>>> Could you send me a copy of your ports installed command.
>>>
>>
>>
>> I have quite a few things installed via macports, more than just  
>> cairo
>> and pango. I use it for git and subversion and ImageMagick, etc.
>>
>> That all aside. Which external object is it refusing to find?
>>
> Hi Travis,
>
> It is calling for
>
> ExternalMethod  
> CairoGraphics
> .LibCairo>>cairo_quartz_surface_create_for_cg_context:with:with:
>
> @+Maarten,

If you do something like:

  LibCairo libraryVersion

or

ImageSurface format: CairoFormat argb32 extent: 10@10

does that too fail?

--
Travis Griggs
Objologist
My Other Machine runs OSX. But then... so does this one.



_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] External cairo libraries on OSX

Joachim Geidel
Hi Maarten,

there are different variants of cairo available in macports (quartz glitz
no_x11 macosx universal x11_xcb). Could it be that the variant which you
installed does not support the Quartz backend?

Joachim

Am 23.03.09 20:04 schrieb Travis Griggs:

>> Hi Travis,
>>
>> It is calling for
>>
>> ExternalMethod  
>> CairoGraphics
>> .LibCairo>>cairo_quartz_surface_create_for_cg_context:with:with:
>>
>> @+Maarten,
>
> If you do something like:
>
>   LibCairo libraryVersion
>
> or
>
> ImageSurface format: CairoFormat argb32 extent: 10@10
>
> does that too fail?


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] External cairo libraries on OSX

Maarten Mostert-2
In reply to this post by Travis Griggs-3
Travis Griggs a écrit :

>
>
> On Mar 23, 2009, at 10:33 AM, Maarten Mostert wrote:
>
>> Travis Griggs a écrit :
>>>
>>> On Mar 23, 2009, at 2:04 AM, Maarten Mostert wrote:
>>>
>>>
>>>> Hi Travis,
>>>>
>>>> I first used Macports but as that didn't work, I tried fink.
>>>> As I am now back to Macports and wonder what you actualy installed.
>>>> Do you only use cairo and pango or do we need the complete gtk2 with
>>>> all the pyhton stuff ?
>>>> Could you send me a copy of your ports installed command.
>>>>
>>>
>>>
>>> I have quite a few things installed via macports, more than just cairo
>>> and pango. I use it for git and subversion and ImageMagick, etc.
>>>
>>> That all aside. Which external object is it refusing to find?
>>>
>> Hi Travis,
>>
>> It is calling for
>>
>> ExternalMethod
>> CairoGraphics.LibCairo>>cairo_quartz_surface_create_for_cg_context:with:with:
>>
>>
>> @+Maarten,
>
> If you do something like:
>
>  LibCairo libraryVersion
>
> or
>
> ImageSurface format: CairoFormat argb32 extent: 10@10
>
> does that too fail?
>
Well in an image with CairoGraphics 82 both succeed (my libversion is
1.8.6).

When I upgrade to CairoGraphics 88 both fail.

 @+Maarten,

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] External cairo libraries on OSX

Travis Griggs-3

On Mar 23, 2009, at 2:49 PM, Maarten Mostert wrote:

> Travis Griggs a écrit :
>>
>>
>> On Mar 23, 2009, at 10:33 AM, Maarten Mostert wrote:
>>
>>> Travis Griggs a écrit :
>>>>
>>>> On Mar 23, 2009, at 2:04 AM, Maarten Mostert wrote:
>>>>
>>>>
>>>>> Hi Travis,
>>>>>
>>>>> I first used Macports but as that didn't work, I tried fink.
>>>>> As I am now back to Macports and wonder what you actualy  
>>>>> installed.
>>>>> Do you only use cairo and pango or do we need the complete gtk2  
>>>>> with
>>>>> all the pyhton stuff ?
>>>>> Could you send me a copy of your ports installed command.
>>>>>
>>>>
>>>>
>>>> I have quite a few things installed via macports, more than just  
>>>> cairo
>>>> and pango. I use it for git and subversion and ImageMagick, etc.
>>>>
>>>> That all aside. Which external object is it refusing to find?
>>>>
>>> Hi Travis,
>>>
>>> It is calling for
>>>
>>> ExternalMethod  
>>> CairoGraphics
>>> .LibCairo>>cairo_quartz_surface_create_for_cg_context:with:with:
>>>
>>> @+Maarten,
>>
>> If you do something like:
>>
>> LibCairo libraryVersion
>>
>> or
>>
>> ImageSurface format: CairoFormat argb32 extent: 10@10
>>
>> does that too fail?
>>
> Well in an image with CairoGraphics 82 both succeed (my libversion  
> is 1.8.6).
>
> When I upgrade to CairoGraphics 88 both fail.


This was the perfect detail to share. Thank you.

Comparing differences between the two we see that 82 has:

LibCairo class>>osxLibrary
        <library: #osx>
        ^'/opt/local/lib/libcairo.dylib'

and 88 has:

LibCairo class>>osxLibrary
        <library: #osx>
        ^'libcairo.dylib'

Why did we/I make the change. The first has a hardcoded path to the  
macports location of the library. Upon further reflection, it was felt  
that this information did not belong in the library declaration, but  
instead set by the facilities of your operating system for searching  
for libraries. I came to this conclusion after discovering that to use  
other facilities provided via Macports (completely outside of  
Smalltalk), that I really needed to "setup" my system to include the  
Macports libraries as part of my system, and thus searched for. My  
OSX .profile has the following lines in it:

#!/bin/sh
export PATH=/opt/local/bin:${PATH}
export DYLD_FALLBACK_LIBRARY_PATH=/opt/local/lib:$
{DYLD_FALLBACK_LIBRARY_PATH}
export LIBRARY_PATH=/opt/local/lib:${LIBRARY_PATH}

You need the first if you want to run any of the binaries provided by  
Macports (subversion, git, etc). You need the second to search the  
Macports installed dylibs in addition to the standard ones provided by  
OSX. I think I recall someone telling me the third line is  
superfluous, and that I've just been too lazy to yet remove it.

That all said, you basically have three choices with 88.

1) Change the osxLibrary method to match the version 82 one.
2) Add a second method:
LibCairo class>>macportsOSXLibrary
        <library: #osx>
        ^''/opt/local/lib/libcairo.dylib'
If you go this route, and it doesn't work, I want to know about it.  
The intention was that it would.
3) Do as I've done (or a similar variant) with my .profile.

Ultimately, if I had some free time, I'd like to know how to embed the  
dylib in the .app structure as an embedded Framework. There's been  
some discussion related to this on the Cairo list of late.

--
Travis Griggs
Objologist
"It had better be a pretty good meeting, to be better than no meeting
at all" - Boyd K Packer



_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] External cairo libraries on OSX

Reinout Heeck-2
In reply to this post by Travis Griggs-3

> An empty libraryFiles IS fine, there are other ways of defining the  
> libraries to be used. Cairo uses the tag based methods exclusively.
>  

Oh boy, I had so forgotten about those...

Thanks for the clue by four :-)


R
-

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] External cairo libraries on OSX

Maarten Mostert-2
In reply to this post by Travis Griggs-3
Travis Griggs a écrit :

>
>
> On Mar 23, 2009, at 2:49 PM, Maarten Mostert wrote:
>
>> Travis Griggs a écrit :
>>>
>>>
>>> On Mar 23, 2009, at 10:33 AM, Maarten Mostert wrote:
>>>
>>>> Travis Griggs a écrit :
>>>>>
>>>>> On Mar 23, 2009, at 2:04 AM, Maarten Mostert wrote:
>>>>>
>>>>>
>>>>>> Hi Travis,
>>>>>>
>>>>>> I first used Macports but as that didn't work, I tried fink.
>>>>>> As I am now back to Macports and wonder what you actualy installed.
>>>>>> Do you only use cairo and pango or do we need the complete gtk2 with
>>>>>> all the pyhton stuff ?
>>>>>> Could you send me a copy of your ports installed command.
>>>>>>
>>>>>
>>>>>
>>>>> I have quite a few things installed via macports, more than just
>>>>> cairo
>>>>> and pango. I use it for git and subversion and ImageMagick, etc.
>>>>>
>>>>> That all aside. Which external object is it refusing to find?
>>>>>
>>>> Hi Travis,
>>>>
>>>> It is calling for
>>>>
>>>> ExternalMethod
>>>> CairoGraphics.LibCairo>>cairo_quartz_surface_create_for_cg_context:with:with:
>>>>
>>>>
>>>> @+Maarten,
>>>
>>> If you do something like:
>>>
>>> LibCairo libraryVersion
>>>
>>> or
>>>
>>> ImageSurface format: CairoFormat argb32 extent: 10@10
>>>
>>> does that too fail?
>>>
>> Well in an image with CairoGraphics 82 both succeed (my libversion is
>> 1.8.6).
>>
>> When I upgrade to CairoGraphics 88 both fail.
>
>
> This was the perfect detail to share. Thank you.
>
> Comparing differences between the two we see that 82 has:
>
> LibCairo class>>osxLibrary
>     <library: #osx>
>     ^'/opt/local/lib/libcairo.dylib'
>
> and 88 has:
>
> LibCairo class>>osxLibrary
>     <library: #osx>
>     ^'libcairo.dylib'
>
> Why did we/I make the change. The first has a hardcoded path to the
> macports location of the library. Upon further reflection, it was felt
> that this information did not belong in the library declaration, but
> instead set by the facilities of your operating system for searching
> for libraries. I came to this conclusion after discovering that to use
> other facilities provided via Macports (completely outside of
> Smalltalk), that I really needed to "setup" my system to include the
> Macports libraries as part of my system, and thus searched for. My OSX
> .profile has the following lines in it:
>
> #!/bin/sh
> export PATH=/opt/local/bin:${PATH}
> export
> DYLD_FALLBACK_LIBRARY_PATH=/opt/local/lib:${DYLD_FALLBACK_LIBRARY_PATH}
> export LIBRARY_PATH=/opt/local/lib:${LIBRARY_PATH}
>
> You need the first if you want to run any of the binaries provided by
> Macports (subversion, git, etc). You need the second to search the
> Macports installed dylibs in addition to the standard ones provided by
> OSX. I think I recall someone telling me the third line is
> superfluous, and that I've just been too lazy to yet remove it.
>
> That all said, you basically have three choices with 88.
>
> 1) Change the osxLibrary method to match the version 82 one.
> 2) Add a second method:
> LibCairo class>>macportsOSXLibrary
>     <library: #osx>
>     ^''/opt/local/lib/libcairo.dylib'
> If you go this route, and it doesn't work, I want to know about it.
> The intention was that it would.
> 3) Do as I've done (or a similar variant) with my .profile.
>
> Ultimately, if I had some free time, I'd like to know how to embed the
> dylib in the .app structure as an embedded Framework. There's been
> some discussion related to this on the Cairo list of late.
>
>
Hi Travis,

1) Making it similiar to version 82 works with Akamura.

2) Adding the extra method also works with Akamura.

3) Adding the path's doesn't work ?

I did reinstall the ports as quartz variants using:
    sudo port install cairo + quartz
    sudo port install pango + quartz

With port installed they now show of as:
 cairo @1.8.6_4+macosx+quartz (active)
 pango @1.24.0_0+macosx+quartz (active)

I haven't double checked if the quartz option is a real requirement, but
as I tried most of your hints before It might so.

The above however only works with Akamura for the moment,

In my Application  I get stuck with Could not load library on an
ExternalMethod unlinkedCall: with the argument 'nsImage' and library
name #linkeIn

I don't have a library which such a name ?

It does this on my ribbonbar but also on the file browser (probably
because I replaced the standard folder icons with cairo rendered assets).

Below is a typical stack dump:

Regards and many thanks allready.

@+Maarten,


Cause of Dump: Unhandled exception: Could not load library
Image Identification: 'Image created lundi 10 novembre 2008  23:00:19'
Smalltalk Version: 'VisualWorks® NonCommercial, 7.6 of March 3, 2008'
Object Memory versionId: #[63 52 63 192 76 0 0 0 63 41 63 192]
Class creating this dump: RuntimeFullDumper
Command Line:
/Users/maartenmostert/vw7.6nc/bin/macx/visual.app/Contents/MacOS/visual
-psn_0_69649
------------------------------------------------------------
Active Process
Process named: 'Unnamed Process'
Process priority: 51
Process identity hash: 7839
Context Stack:
[1]     ExternalLibrary>>primLoadLibrary:
[2]     ExternalLibrary>>load
[3]     PlatformExternalLibraryHolder(ExternalLibraryHolder)>>load
[4]     PlatformExternalLibraryHolder>>load
[5]    
PlatformExternalLibraryHolder(ExternalLibraryHolder)>>mapAddressForName:
[6]     ExternalMethod class>>mapAddressFor:library:
[7]     optimized [] in [] in ExternalMethod class>>mapAddressFor:
[8]     BlockClosure>>on:do:
[9]     optimized [] in ExternalMethod class>>mapAddressFor:
[10]     [] in LinkedOrderedCollection>>detect:ifNone:
[11]     LinkedOrderedCollection(OrderedCollection)>>do:
[12]     LinkedOrderedCollection>>ownDo:
[13]     LinkedOrderedCollection>>performDo:block:path:
[14]     LinkedOrderedCollection>>do:
[15]     LinkedOrderedCollection>>detect:ifNone:
[16]     ExternalMethod class>>mapAddressFor:
[17]     ExternalMethod class>>virtualHandleForClass:external:
[18]     ExternalMethod>>unlinkedCall:arguments:
[19]     optimized [] in CairoGraphics.ImageSurface>>initPngStream:
[20]    
CairoGraphics.ImageSurface(CairoGraphics.ManagedHandle)>>handleValue:
[21]     CairoGraphics.ImageSurface>>initPngStream:
[22]     CairoGraphics.ImageSurface class>>pngByteStream:
[23]     CairoGraphics.ImageSurface class>>pngBytes:
[24]     optimized [] in MyAssets class>>goforward16x16      <---- this
is the name of my png asset.
[25]     BlockClosure>>becomeCached
[26]     BlockClosure>>once
[27]     MyAssets class>>goforward16x16
[28]     MainProject>>principalTabsLabels
[29]     MainProject>>principalTabs
[30]     MainProject>>initialize
[31]     MainProject class(ApplicationModel class)>>new
[32]     MainProject class>>open
[33]     RuntimePackager.RuntimeManager class>>startupApplication
[34]     RuntimeApplicationStartupSystem>>main
[35]     optimized [] in UserApplication>>setUp
[36]     BlockClosure>>on:do:
[37]     optimized [] in Process class>>forBlock:priority:

------------------------------------------------------------
Unhandled Exception:
    class: UnhandledException
    creator: UnhandledException
    errorString: Unhandled exception: Could not load library
    parameter: a LibraryNotLoadedError









_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] External cairo libraries on OSX

Travis Griggs-3

On Mar 25, 2009, at 1:53 AM, Maarten Mostert wrote:

>>
> Hi Travis,
>
> 1) Making it similiar to version 82 works with Akamura.
>
> 2) Adding the extra method also works with Akamura.
>
> 3) Adding the path's doesn't work ?
>
> I did reinstall the ports as quartz variants using:    sudo port  
> install cairo + quartz
>   sudo port install pango + quartz
>
> With port installed they now show of as:
> cairo @1.8.6_4+macosx+quartz (active)
> pango @1.24.0_0+macosx+quartz (active)
>
> I haven't double checked if the quartz option is a real requirement,  
> but as I tried most of your hints before It might so.
>
> The above however only works with Akamura for the moment,
>
> In my Application  I get stuck with Could not load library on an  
> ExternalMethod unlinkedCall: with the argument 'nsImage' and library  
> name #linkeIn
>
> I don't have a library which such a name ?
>
> It does this on my ribbonbar but also on the file browser (probably  
> because I replaced the standard folder icons with cairo rendered  
> assets).
>
> Below is a typical stack dump:
>
> Regards and many thanks allready.


Is it truly #linkeIn and not #linkedIn? If that's the case, that's the  
problem. My 88 has #linkedIn. The other thing that happened for a  
while, on older VW versions, is that the ObjCRuntime class had to  
sometimes be recompiled after loading. Just hand accept the various  
class side <C: > methods.

--
Travis Griggs
Objologist
For every adage, there is an equal and contrary un-adage

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] External cairo libraries on OSX

Maarten Mostert-2
Travis Griggs a écrit :
> Is it truly #linkeIn and not #linkedIn? If that's the case, that's the
> problem. My 88 has #linkedIn. The other thing that happened for a
> while, on older VW versions, is that the ObjCRuntime class had to
> sometimes be recompiled after loading. Just hand accept the various
> class side <C: > methods.
>
Yes Travis  it was #linkedIn,

Actually I got somethings working:

Enclosed is an update for the standard treeVew with folder icons
rendered with cairo. If you load cairo 88 + HigherGlyphics and then this
package in a clean image, the standard file browser will look somewhat
better. If you do so in 7.6nc and save your image and restart it you
will see trouble.
As I recently signed up to the dev-list, I also tried it in some
pre-release 7.7nc.  Here you can save and restart the image. With some
workarounds  I managed to run my application in 7.7nc. However with
extraActivity on it stays up for about 10 seconds then the VM breaks (In
7.6 it breaks immediately).

Regards,

@+Maarten,




<?xml version="1.0"?>

<st-source>
<time-stamp>From VisualWorks® NonCommercial, Pre-Release 7.7 (mar09.3) of March 20, 2009 on March 25, 2009 at 3:09:53 pm</time-stamp>
<!-- Package ATreeViewUpdate* -->


<component-created>
<name>ATreeViewUpdate</name> <type>package</type>
</component-created>

<class>
<name>MyAssets</name>
<environment>Smalltalk</environment>
<super>Core.Assets</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category></category>
<attributes>
<package>ATreeViewUpdate</package>
</attributes>
</class>

<comment>
<class-id>MyAssets</class-id>
<body>This are the StakePoint Assets </body>
</comment>

<methods>
<class-id>MyAssets class</class-id> <category>compatability</category>

<body package="ATreeViewUpdate" selector="visualFor:">visualFor: aByteSymbol ^self perform: aByteSymbol</body>
</methods>

<methods>
<class-id>MyAssets class</class-id> <category>tool bar</category>

<body package="ATreeViewUpdate" selector="folderXP16x16">folderXP16x16 "WARNING: This code was automatically generated during asset import. Regeneration will destroy any manual edits." &lt;file: 'MyAssets/FolderXP16x16.png'&gt; &lt;md5sum: #[229 39 117 202 211 46 193 180 80 144 240 211 5 167 7 5]&gt; ^[CairoGraphics.ImageSurface pngBytes: (ByteArray fromPackedString: '"UANQ04JF (@@@@MRT!DT @@@A@@@@@PB@X@@@@_&lt;?=!@@@BF$%DPUQ86)6R7T,TTQ"G_?MQ.1)K$Y''X!6@Y9DUT&amp;=5(Q$RD65X$FTUBU5HW9S?PW=A5U4I4DWW#A)EPP'' Q_ZE%"3'',&amp;.4.4=+":$X5G3J+&gt;3V'']6Y25CFQN/A2! OO&lt;?;N&amp;Y_C/2&gt;^Z.N_;2K7G?@&amp;^[C:9[],@R]:J,_VD0#K.)V)?A[\FCK0:+9(BX93:&lt;BA"\]P""W 4ET4)I9UO]4[3+N2UCO6[%P;;AT,;5Z!*(9G(N2?VLE\( V91F_,NSL7[,Z6Q7&amp;^L;4B.9,&lt;@LU$PMLE;H#5H=/\9\CF]AK5+V&gt;Q^]NJKY-=C?4&gt;%HZ#&gt;,EE P,7''&amp;^6KQ;!8HVY_A*L89EN::"+=S4X?ZP]NG''][K\DUPS''K["RZWG";O:H_N(H5J&amp;DB8M R&lt;@I@%IIEY%)X?3TCT\PRC2A/*=3RVB-P$:F*)]- R%7$DB0X_AT''H"!E2%47CR76P''()_OMWT,BW/.J&gt;ZHHUU50AN&amp;3]B!RBD)AN6 _^#:I4B53*?,F4T]P -4LKEYCI0K&amp;B1. ?#IP74ZB*T9@EN0TU K)_QKA20,M1L6.&gt;@./;4E);6D0/&gt;24D6 ?]N\M,)_(?*HC#42:LEWIN0^A0[-PP+4LQ+0I6/^_3!U&amp;.&gt;7.4,#DB-"B/IM(R2I7(HQ;CZ _]#&amp;B7CUH0?EU&lt;M&lt;D+*S/M)Q38S[TA_, CQ1E&lt;L)*^B7A(*Q6+M&lt;?06"65(J-=Q.+N?:C?\=Z''P@@@@AIQT9D+$I   @a')] once</body>

<body package="ATreeViewUpdate" selector="openFile16x16">openFile16x16 "WARNING: This code was automatically generated during asset import. Regeneration will destroy any manual edits." &lt;file: 'MyAssets/OpenFile16x16.png'&gt; &lt;md5sum: #[229 39 117 202 211 46 193 180 80 144 240 211 5 167 7 5]&gt; ^[CairoGraphics.ImageSurface pngBytes: (ByteArray fromPackedString: '"UANQ04JF (@@@@MRT!DT @@@A@@@@@PB@X@@@@_&lt;?=!@@@BI$%DPUQ86(7QST0SPQ F8G]?.''Z+(LQ ST@!DZ-\ROA X"Q242,AH98&lt;\MNXZD34+&amp;]IOA@9JI8&lt;6J"I^.@"T]H&amp;XF-E"JF-)[CU-#P-?\%R6YY6]&lt;_Y1R*4"3+IY"ZS^Y?=9!,F]VL&lt;LL[Z^[D=H\\/!KOA Y2RZ6UX_B*+9S_GB''GO89/_M;:=]X)%NZ6\.@"F*P\^&gt;DX;/D.^LT?@65-TYI5)!UM,D0R12YD9*_CO;+T_''E!4]B;492Y!BX28+513#3?/KV]J57D@%X$A''A-5GI+N]U_AM;E VQ9Z-HH)/&amp;@M]@0_.Y38&amp;I"D''_3P -A_O1QH3=''3.I*\Q:!-432#!3PJ9J4A&gt;6''AU,5V]V6EZE=_ GR].XE&lt;=#4.:R0$M&amp;&amp;^4\H*)#"KB(2@,U%[.?).P=_V8U9P&lt;CP_PJ*%"FI3AZWXI-:I&lt;$;@C@0QQE9.[['':;)!32G,_Q4&lt;MP2$;,EYH8[L4U?H&amp;"W"+J?4G*HUQ^@R(ZW+I]U)''C)GYI3 &gt;*JL"CTJ++DIU"=#C[XC#VJ1&lt;"U$@&amp;[,4''J]_$PHEQO2/8A)RP^H#4IQ),2KB;:VMZ)F%C3O;KZ&gt; QW,@!*^MXAB]''3LAM]0I,CXZ-(OX&amp;!G3&gt;5C+UTLSCTPOGPY!NB0/+&amp;8A4V8Z)G?&amp;QD"&gt;6]?!A&amp;@;P$INK@T3LM[*L VD_YC&lt; Q5!R:C&gt;QX29&amp;.*GMNM)BN&lt;J5AC3NW=AU.F?@-.Q7\K?AO9''?@RZ3QP L4I&lt;Y0@@@@AIQT9D+$I   @a')] once</body>
</methods>

<methods>
<class-id>MyAssets class</class-id> <category>copying</category>

<body package="ATreeViewUpdate" selector="copy">copy "WARNING: This code was automatically generated during asset import. Regeneration will destroy any manual edits." &lt;file: 'MyAssets/copy.png'&gt; &lt;md5sum: #[229 39 117 202 211 46 193 180 80 144 240 211 5 167 7 5]&gt; ^[CairoGraphics.ImageSurface pngBytes: (ByteArray fromPackedString: '"UANQ04JF (@@@@MRT!DT @@@B@@@@@ B@X@@@A3^''+4@@@EZ4%DPUQ86,VWCT1SU1SG376/_B" !VSH56ZM&amp;3NH89G0O\T2\T;HVB]$!A%M6^XV@0S\9(13"6U[9*X$%H 1:%2Y.F"\D6KFRFSPS''Q3S-N*BF0&amp;V4THCH"RE((B[W_/^:?-^74E0[''-IB?7_]77?97?N_\6Q_@?A7+X"Q]+2**\@L*4$.*D?1S TE&amp;NH#W&gt;&amp;_*H&lt;L\X!B"87MF);Q&amp;:V14]EZWLK-OV?*,@)3P[UX%1,[* (B@9(&amp;  @FO#87B3-&lt;&gt;&lt;OCYN\[/''],N^?SUE1&lt;?7C#=R LHU4_JRU0-6KU&amp;$JD^4CE!1",J3J_Y&lt;1FZC^0:@LG$(C@8MC-?(:"3J67: 8YD@;G$3"&lt;''NVJ&amp;K#E#@@NJEJT:XAZ@)=-:H]PQ@9 =3@ O@X[]C16=]CP^&gt;OOI@M:XE*O-0 3(#J[D*IBQDK!J''R_ZBZ&lt;QA]G]7P5Q4CHCC@T:''@0XFA(Z;.&lt;4/O5=\ZY U@KG&lt;=XIW*)#XVCW-9&gt;&lt;V@S9[[7G!6GOKCADQD^CDDI B[JN#XK9%5-X\O%#!204I0M8-K3C+%D(];&amp;*F-Y$V"@#*C$!8ST[$/.:&lt;4P9OK%K0DI0[?W7=9/L?''R?Z/O.8XT*@X1*5N"L5)V+^?O%,%?/J4B7*]R4B0P95WC_BX,UB/!1NE,P6L +W[%3W_/U5''],M9KI\WU"(R81''UCI?_=9^V"(.F)DXAMF,.O,9O#)L/0( ^C\\S.#-:SE=_;Z)ZE/M]2XVXO&gt;;&gt;Z*&lt;7I_*90XE^]$:GP@YD],OG%D$\@R1=;*0D&gt;G2DK0:@-&amp;^XDD0$MU" R/FJ1W.D#SU[J-Z$[F*7J^X&lt;LO.[@$$D- /\HR&lt;;=(/ZA+&gt;?K4CYO]GHR04UNQDQ?,5 : GK)6,MB9[G,=H,$_R6+,2=C!A,ZJT_0@^?[!2BFJ0+0_.?MDELSGQ[D&lt;L?-T?/ONC;P&amp;"-=;KR5@T/;7CFA8QJW\5$=@E4[&amp;(&gt;6&amp; @.Z0@MNE[\PJM2=_ N#HAWC"VF5&amp;Z^T7A,$2+B3MU[:6)T0?M3!D$K7@Z!;D9PBR&gt;PG%E2CI^K+PM=Z[C&amp;,?3RP+PSQK&gt;?8&amp;]U121*8; 4LJU\9ZTSM9GDC.&gt;1S^)E";QP.[%HU,W G\&gt;XPE5=0. [!::XK9&lt;97%BX ,0[V*@#VS%EXV''?2, #04WV6GO%2/MU&amp;+OU&amp;;@H@[JQ&amp;7P8*D$Q&lt;/# &gt;D2&gt;F\AKC[&lt;CD&amp;JTWS:^ME&gt;V=)Z-FY6,&gt;LK1Y,X+0ICV6?PNB$AYIR434@@--E%!L1R.XA\H$;1/E1''1-="KMS,PLJ;]DFX7!$-E0HLFEGXC!7DVKBYOA4[I1 N]HB\]\&gt;LHV8\0JOD&gt;8R^H.;]4I\^:[0#UJ=BHK2@8/5G.![V"BI^P("X1Y2WP&gt;B*V;[&gt;XN\,&gt;ID%FP?2X,;6Q''_G#5T \T5HO8JE:\NZ-S+5!_*RO\KZ6*16$C_6 +IBT,11NM^8#I^7I&lt;W-?/H''AM/ZS1]&amp;9U_T.Q]Z-D*$DKP+H!%Y@3Z=L6P.R(].F^^Y\&amp;=P7LPC/.,1BT@IG88UZM[''[M^;U5#"=TE$PY.PN=O4XF&lt;;YL3D/\IPNK\&amp;R?*U:;IU/&amp;DZC4K&amp;\)471A,@&lt;8,&lt;6$A2M: 4Q;VK5''FLA8HF_,S[[$;AF6FU,!&lt;K-LGAI*U&gt;IP@K("O=&gt;&amp;L"9_FJ[ 7J^95''JGEX(WV9&amp;YHRT''D#_&amp;DYN9L1Z\EHBE]'')8LBXR&gt;UP?I"X0HX#["C0P &lt;UE1+/H]3U:=+9(S"O*SI43+\+HUAGJ68#LBHBEY'',C-Z#??6E1;QK-;J;:T967\+O[^YA8Y@H''F.+5U6_$[2,''9PE?/\E-385[!%/*0LZ/?!&amp;ROB@:^):#&gt;Y@_916O&gt;)&gt;H$? YQ$3N7RCLW3@@@@@AIQT9D+$I   @a')] once</body>
</methods>

<methods>
<class-id>MyAssets class</class-id> <category>instance creation</category>

<body package="ATreeViewUpdate" selector="new">new "Answer a newly created and initialized instance." ^super new initialize</body>
</methods>


<methods>
<class-id>MyAssets</class-id> <category>initialize-release</category>

<body package="ATreeViewUpdate" selector="initialize">initialize "Initialize a newly created instance. This method must answer the receiver." " *** Replace this comment with the appropriate initialization code *** " ^self</body>
</methods>


<methods>
<class-id>UI.TreeView class</class-id> <category>resources</category>

<body package="ATreeViewUpdate" selector="closedChildrenImage">closedChildrenImage "Tools.UIMaskEditor new openOnClass: self andSelector: #closedChildrenImage" &lt;resource: #image&gt; ^CachedImage on: (Image extent: 9@9 depth: 5 bitsPerPixel: 8 palette: (Graphics.MappedPalette withColors: (#(#(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(6231 5910 5396)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(6167 5878 5332)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(6263 5974 5460)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(0 0 4111)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(7934 7934 7837)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(7163 7034 6745)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(7741 7709 7548)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(7709 7709 7580)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(7516 7484 7291)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(3854 4882 5814)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(6199 5910 5364)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(7869 7869 7741)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(5653 6231 6777)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(7355 7227 7002)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(7901 7901 7837)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(7934 7901 7805)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(6938 6777 6456)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(6745 6552 6167)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(7323 7227 6970)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(7066 6938 6649)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(7934 7934 7869)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(6874 6713 6360)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(6360 6103 5589)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(6649 6424 6006)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(7773 7773 7644)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(8094 8094 8030)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(7291 7195 6970)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(7612 7612 7420)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(8126 8126 8062)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(8094 8094 8062)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(6745 6552 6135)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(7034 6874 6552)) ) collect: [:each | (each at: 1) value perform: (each at: 2) withArguments: (each at: 3)])) usingBits: #[12 9 9 9 9 9 9 9 12 0 0 0 9 28 28 28 28 28 28 28 9 0 0 0 9 29 28 28 3 29 25 15 9 0 0 0 9 20 20 4 3 14 6 13 9 0 0 0 9 11 3 3 3 3 3 5 9 0 0 0 9 24 7 27 3 8 26 31 9 0 0 0 9 18 19 16 3 21 17 23 9 0 0 0 9 30 22 0 10 10 1 2 9 0 0 0 12 9 9 9 9 9 9 9 12 0 0 0])</body>

<body package="ATreeViewUpdate" selector="openedChildrenImage">openedChildrenImage "Tools.UIMaskEditor new openOnClass: self andSelector: #openedChildrenImage" &lt;resource: #image&gt; ^CachedImage on: (Image extent: 9@9 depth: 6 bitsPerPixel: 8 palette: (Graphics.MappedPalette withColors: (#(#(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(7580 7548 7387)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(6231 5910 5396)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(6167 5878 5332)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(0 0 4111)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(6263 5974 5460)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(7934 7934 7837)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(7163 7034 6745)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(7741 7709 7548)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(7709 7709 7580)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(7516 7484 7291)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(3854 4882 5814)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(6199 5910 5364)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(7869 7869 7741)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(5653 6231 6777)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(7355 7227 7002)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(7901 7901 7837)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(7934 7901 7805)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(6938 6777 6456)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(6745 6552 6167)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(7323 7227 6970)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(7066 6938 6649)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(7934 7934 7869)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(6874 6713 6360)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(6649 6424 6006)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(6360 6103 5589)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(7773 7773 7644)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(8094 8094 8030)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(7291 7195 6970)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(7612 7612 7420)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(6906 6745 6392)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(8126 8126 8062)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(8094 8094 8062)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(6745 6552 6135)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(7034 6874 6552)) ) collect: [:each | (each at: 1) value perform: (each at: 2) withArguments: (each at: 3)])) usingBits: #[13 10 10 10 10 10 10 10 13 0 0 0 10 30 30 30 30 30 30 30 10 0 0 0 10 31 30 30 30 31 26 16 10 0 0 0 10 21 21 5 5 15 7 14 10 0 0 0 10 12 3 3 3 3 3 6 10 0 0 0 10 25 8 28 0 9 27 33 10 0 0 0 10 19 20 17 29 22 18 23 10 0 0 0 10 32 24 1 11 11 2 4 10 0 0 0 13 10 10 10 10 10 10 10 13 0 0 0])</body>
</methods>

<methods>
<class-id>UI.TreeView class</class-id> <category>accessing</category>

<body package="ATreeViewUpdate" selector="comment">comment "execute the following to reinitilaize the icons FolderImages:=nil   "</body>

<body package="ATreeViewUpdate" selector="closedFolder">closedFolder "^ListIconLibrary visualFor: #folder" ^MyAssets folderXP16x16</body>

<body package="ATreeViewUpdate" selector="initializeMyCustomIcons">initializeMyCustomIcons "execute the following to reinitilaize the icons FolderImages:=nil   " FolderImages := nil</body>

<body package="ATreeViewUpdate" selector="openedFolder">openedFolder " ^ListIconLibrary visualFor: #folderOpen" ^MyAssets openFile16x16  "MyAssets  folderXP16x16"     </body>
</methods>


<methods>
<class-id>UI.TreeView</class-id> <category>initialize-release</category>

<body package="ATreeViewUpdate" selector="useImagesOK:">useImagesOK: arrayOfSymbols "Initialize the visuals for using the image methods in arrayOfSymbol" "Unlike our superclass we do not access the elements of sequence via #at:, we prefer #wrapperAt:" arrayOfSymbols size = 1 ifTrue: [^self useImage: arrayOfSymbols first]. self visualBlock: [:view :index | (view sequence wrapperAt: index) wrappedWithLabel: self displayStringSelector andIcons: arrayOfSymbols attributes: self textStyle for: self]. self selectedVisualBlock: [:view :index | | wrapper | wrapper := (view sequence wrapperAt: index) wrappedWithLabel: self displayStringSelector andIcons: arrayOfSymbols attributes: self textStyle for: self. wrapper component selected setValue: true. wrapper]</body>

<body package="ATreeViewUpdate" selector="useImages:">useImages: arrayOfSymbols "Initialize the visuals for using the image methods in arrayOfSymbol" "Unlike our superclass we do not access the elements of sequence via #at:, we prefer #wrapperAt:" arrayOfSymbols size = 1 ifTrue: [^self useImage: arrayOfSymbols first]. self visualBlock: [:view :index | (view sequence wrapperAt: index) wrappedWithLabel: self displayStringSelector andIcons: (Array with: (arrayOfSymbols at:1)) "Modified this from arrayOfSymbols  only" attributes: self textStyle for: self]. self selectedVisualBlock: [:view :index | | wrapper | wrapper := (view sequence wrapperAt: index) wrappedWithLabel: self displayStringSelector andIcons: (Array with: (arrayOfSymbols at:2))   "Modified this from arrayOfSymbols  only" attributes: self textStyle for: self. wrapper component selected setValue: true. wrapper]</body>
</methods>


<methods>
<class-id>UI.TreeViewIndentedLabelAndIcon class</class-id> <category>resources</category>

<body package="ATreeViewUpdate" selector="linePatternImage">linePatternImage "Tools.UIMaskEditor new openOnClass: self andSelector: #linePatternImage" &lt;resource: #image&gt; ^CachedImage on: (Image extent: 8@8 depth: 1 bitsPerPixel: 1 palette: (Graphics.MappedPalette withColors: (#(#(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(8191 8191 8191)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(5460 5460 5460)) ) collect: [:each | (each at: 1) value perform: (each at: 2) withArguments: (each at: 3)])) usingBits: #[85 0 0 0 170 0 0 0 85 0 0 0 170 0 0 0 85 0 0 0 170 0 0 0 85 0 0 0 170 0 0 0])</body>
</methods>



</st-source>

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] External cairo libraries on OSX

Travis Griggs-3
In reply to this post by Travis Griggs-3

On Mar 23, 2009, at 10:14 PM, Travis Griggs wrote:

>
>
> This was the perfect detail to share. Thank you.
>
> Comparing differences between the two we see that 82 has:
>
> LibCairo class>>osxLibrary
> <library: #osx>
> ^'/opt/local/lib/libcairo.dylib'
>
> and 88 has:
>
> LibCairo class>>osxLibrary
> <library: #osx>
> ^'libcairo.dylib'
>
> Why did we/I make the change. The first has a hardcoded path to the
> macports location of the library. Upon further reflection, it was felt
> that this information did not belong in the library declaration, but
> instead set by the facilities of your operating system for searching
> for libraries. I came to this conclusion after discovering that to use
> other facilities provided via Macports (completely outside of
> Smalltalk), that I really needed to "setup" my system to include the
> Macports libraries as part of my system, and thus searched for. My
> OSX .profile has the following lines in it:
>
> #!/bin/sh
> export PATH=/opt/local/bin:${PATH}
> export DYLD_FALLBACK_LIBRARY_PATH=/opt/local/lib:$
> {DYLD_FALLBACK_LIBRARY_PATH}
> export LIBRARY_PATH=/opt/local/lib:${LIBRARY_PATH}
>
> You need the first if you want to run any of the binaries provided by
> Macports (subversion, git, etc). You need the second to search the
> Macports installed dylibs in addition to the standard ones provided by
> OSX. I think I recall someone telling me the third line is
> superfluous, and that I've just been too lazy to yet remove it.
>
> That all said, you basically have three choices with 88.
>
> 1) Change the osxLibrary method to match the version 82 one.
> 2) Add a second method:
> LibCairo class>>macportsOSXLibrary
> <library: #osx>
> ^''/opt/local/lib/libcairo.dylib'
> If you go this route, and it doesn't work, I want to know about it.
> The intention was that it would.
> 3) Do as I've done (or a similar variant) with my .profile.
>
> Ultimately, if I had some free time, I'd like to know how to embed the
> dylib in the .app structure as an embedded Framework. There's been
> some discussion related to this on the Cairo list of late.

Addendum. Sigh. Grumble. On 04Mar2009, the maintainer of Macports  
Cairo made the quartz backend optional (rather than default). I  
consider this disappointing, after we worked hard to get the osx  
backend up to "standard" status, and I'm lobbying him to put it back  
to default. In the meantime, here's the message:

http://lists.macosforge.org/pipermail/macports-users/2009-March/014166.html

--
Travis Griggs
Objologist
"Dying men never wish they'd spent more time at the office"


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc