Changing the gtk2 theme for a self-built OSX nightly
Hi,
I followed the advice from http://wiki.inkscape.org/wiki/index.php/CompilingMacOsX and compiled the latest revision for OS X (downloaded yesterday).
As far as I can tell it's working well. It's just that my self-built version uses a somewhat strange gtk theme where only the sliders are looking Aqua-like. The latest available prepackaged nightly build for OSX uses a theme that is much nicer and I would like to change the theme for my self-built version to look like the prepackaged build. Is there some way to do that?
Here is a screenshot of the prepackaged built (both run with latest XQuartz):
http://img529.imageshack.us/img529/7527/inkscapeprepackagednighfm6.png Pre-Packaged Nightly
and here is one of my self-built version:
http://img209.imageshack.us/img209/7348/inkscapeselfbuilthq4.png Self-Built Nightly
They look similar but the theme of my self-built version lacks the finesse of the other theme and looks kinda clumsy...
I suspect it's a build setting somewhere I couldn't find. So if anyone knows something, please speak up...
Thanks for listening.
André
nevermind, figured it out... a lot of .so files were missing from the /Contents/Resources/lib/gtk-2.0/2.10.0/engines directory, like for example libclearlooks.so. In fact only libpixmap.so was inside the engines dir of my self-built version. So I just copied them over from the pre-packaged nightly and now it's looking alike.
Now I only need to figure out how to get rid of the libxml2 python error and I should have a fully working recent OS X build.
Well as a workaround I installed libxml2 and libxslt with MacPorts, then downloaded and setup.py installed lxml 2.1.3 for my Python 2.6 version (which is in /Library/Frameworks/Python.framework) Here's roughly the steps I undertook...
sudo port install libxml2 @2.7.1_0 sudo port install libxslt @1.1.24_0 curl -o ~/lxml-2.1.3.tgz http://codespeak.net/lxml/lxml-2.1.3.tgz cd tar -xf lxml-2.1.3.tgz cd lxml-2.1.3 sudo python setup.py install --with-xslt-config=/opt/local/bin/xslt-config --with-xlm2-config=/opt/local/bin/xml2-config
then I manually copied the "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/lxml-2.1.3-py2.6-macosx-10.3-i386.egg/lxml" directory into the Inkscape.app bundle generated by <inkscape_sourcedir>/packaging/macosx/osx-app.sh, placing it into the following location: "Inkscape.app/Contents/Resources/python/site-packages/i386/2.6"
Of course this hardcoded path is not distribution-friendly. There are ways of working around that:
1. Either change the "Inkscape.app/Contents/Resources/bin/inkscape" shell script on line 28 from
export PYTHONPATH="$TOP/python/site-packages/$ARCH/$PYTHON_VERS"
to
export PYTHONPATH="$TOP/python/site-packages
while putting the pre-compiled lxml dir into "Inkscape.app/Contents/Resources/python/site-packages/"
or
2. put the pre-compiled lxml dir into "Inkscape.app/Contents/Resources/extensions/" where inkex.py will find it directly.
I hope this helps anyone attempting to install from source on OSX...
André
On 2008-November-28 , at 17:37 , AndreBerg wrote:
I followed the advice from http://wiki.inkscape.org/wiki/index.php/CompilingMacOsX and compiled the latest revision for OS X (downloaded yesterday).
As far as I can tell it's working well. It's just that my self-built version uses a somewhat strange gtk theme where only the sliders are looking Aqua-like. The latest available prepackaged nightly build for OSX uses a theme that is much nicer and I would like to change the theme for my self-built version to look like the prepackaged build. Is there some way to do that?
Here is a screenshot of the prepackaged built (both run with latest XQuartz):
http://img529.imageshack.us/img529/7527/inkscapeprepackagednighfm6.png Pre-Packaged Nightly
and here is one of my self-built version:
http://img209.imageshack.us/img209/7348/inkscapeselfbuilthq4.png Self-Built Nightly
They look similar but the theme of my self-built version lacks the finesse of the other theme and looks kinda clumsy...
It seems Inkscape dependencies are not up to date on this page then. The new theme needs the clearlooks engine so you should install it via macports. Once installed it will be copied to the correct directory in the app bundle by the build script and everything should work. If you could correct the wiki page that would be even better.
then I manually copied the "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ site-packages/lxml-2.1.3-py2.6-macosx-10.3-i386.egg/lxml" directory into the Inkscape.app bundle generated by <inkscape_sourcedir>/packaging/macosx/osx-app.sh, placing it into the following location: "Inkscape.app/Contents/Resources/python/site-packages/i386/2.6"
For python, you are indeed required to compile the two libraries/ packages Inkscape uses separately. Then there is an option to the build script which tells it where to look for these packages so that it can include them in the bundle. There are also precompiled python packages on Modevia, but probably not for Python 2.6.
Of course this hardcoded path is not distribution-friendly. There are ways of working around that:
- Either change the "Inkscape.app/Contents/Resources/bin/inkscape"
shell script on line 28 from
export PYTHONPATH="$TOP/python/site-packages/$ARCH/$PYTHON_VERS"
That hardcoded, non-standard PYTHONPATH is meant to ease the distribution of Inkscape. For releases we ship a universal, multi- architecture, multi-system (well, at least it is meant to be multi- system) version of Inkscape so we need the python librairies to match all those possibilites. So we ship everything, for PPC and intel, for different versions, in several directories within this strange path. If you think of a better solution to this problem, it would be welcome.
to
export PYTHONPATH="$TOP/python/site-packages
while putting the pre-compiled lxml dir into "Inkscape.app/Contents/Resources/python/site-packages/"
or
- put the pre-compiled lxml dir into
"Inkscape.app/Contents/Resources/extensions/" where inkex.py will find it directly.
I hope this helps anyone attempting to install from source on OSX...
If that can be done for release versions also, it would be nice. If it is for personal/development versions only, then I am not sure I like it. Because ultimately, dev builds are a way to test things for the release and if they function in a different way, it defeats their purpose.
I hope you'll find the solution to all your problems. If you can post your new builds on Modevia, it will help other people that are not willing to enter the whole process of building things but still want to test the new features. Ask around on this list to be given access.
Bye,
JiHO --- http://jo.irisson.free.fr/
jiho wrote:
If you could correct the wiki page that would be even better.
Yeah I just ran sudo port install gtk2-clearlooks and all the other dependant libs I found in the pre-packaged nightly. I will try to build again later on and see if they get copied to the engines subdir of the .app bundle automatically. I will also try to update the wiki later this weekend.
jiho wrote:
For python, you are indeed required to compile the two libraries/ packages Inkscape uses separately. Then there is an option to the build script which tells it where to look for these packages so that it can include them in the bundle. There are also precompiled python packages on Modevia, but probably not for Python 2.6.
Ah I see. I did not know about Modevia thanks for mentioning it. Are you talking about the --with-python option? or a --with-PACKAGE option?
jiho wrote:
That hardcoded, non-standard PYTHONPATH is meant to ease the distribution of Inkscape. For releases we ship a universal, multi- architecture, multi-system (well, at least it is meant to be multi- system) version of Inkscape so we need the python librairies to match all those possibilites. So we ship everything, for PPC and intel, for different versions, in several directories within this strange path. If you think of a better solution to this problem, it would be welcome.
Nope at the moment I can't think of a better way. You ultimately need a dir to put all the dependant stuff in if you want to ship it Python batteries-included style.
jiho wrote:
If that can be done for release versions also, it would be nice. If it is for personal/development versions only, then I am not sure I like it. Because ultimately, dev builds are a way to test things for the release and if they function in a different way, it defeats their purpose.
The second method should always work as I understand that every in-program effect is launched trough inkex.py and that file is inside the extensions dir. So if it requires "from lxml import etree" and has a lxml directory with a etree.py file it can import it directly (w/o searching PYTHONPATH) as requested. Of course if a Python interpreter is not included with inkscape the user still needs to habe the correct version of Python installed which must equal the Python version that was used to precompile the module.
jiho wrote:
I hope you'll find the solution to all your problems. If you can post your new builds on Modevia, it will help other people that are not willing to enter the whole process of building things but still want to test the new features. Ask around on this list to be given access.
At the moment my build is not very useful outside my own computer. It is not Universal Binary and features only support for Python 2.6 and the average Leopard user has 2.5.1 But if I manage to get a Universal Binary working I will try to post it.
Thanks for tuning in...
André
participants (2)
-
AndreBerg
-
jiho