[Qgis-developer] Re: Qgis app bundle script
William Kyngesburye
woklist at kyngchaos.com
Thu Jun 19 19:45:41 EDT 2008
Ah, right, until it's fixed in the source:
The paths all depend on where you have your source and where you
install Qgis, so I won't give explicit paths here. After installing,
open the qgis app package (right-click, Show Package Contents). Dig
into Contents/MacOS/share/qgis/python/qgis to find core.so and
gui.so. (I do this to easily get the path so I don't have to type it
in the Terminal)
In a Terminal, type
otool -L
(that's a space after the L) and drag gui.so to the Terminal window.
Press return.
Towards the top should be a line for libqgis_gui.0.11.dylib and a line
for libqgis_core.0.11.dylib. Type:
sudo install_name_tool -change [/path/to/libqgis_gui.dylib]
@executable_path/lib/libqgis_gui.dylib -change [/path/to/
libqgis_core.dylib] @executable_path/lib/libqgis_core.dylib [drag
gui.so to Terminal]
for the /path/to/libqgis_*.dylib above, copy and paste what you found
for the full path to each library in otool -L.
For example *this is just for mine* :
sudo install_name_tool -change /Users/Shared/src/qgis/svn/qgis_r8652/
build-leo/src/gui/libqgis_gui.0.11.dylib @executable_path/lib/
libqgis_gui.dylib -change /Users/Shared/src/qgis/svn/qgis_r8652/build-
leo/src/core/libqgis_core.0.11.dylib @executable_path/lib/
libqgis_core.dylib /Applications/qgis0.11.0.app/Contents/MacOS/share/
qgis/python/qgis/gui.so
Do the same for core.so. You can just up-arrow to get the previous
command and change gui.so to core.so at the very end of the command.
It doesn't matter that core.so doesn't have libqgis_gui.dylib in it,
it will ignore that.
Run otool -L on them again to verify the change.
On Jun 19, 2008, at 6:25 PM, John C. Tull wrote:
> So, the million-dollar question is how do you "fix" the core.so and
> gui.so files? Is there a command line, series of steps, or edit that
> you can share?
>
> Thanks,
> John
>
> On Jun 19, 2008, at 3:17 PM, William Kyngesburye wrote:
>
>> (back to the list to get others in on the discussion)
>>
>> Once I got the right geoprocessing plugin installed (not the
>> builtin pggeoprocessing), I could test this. Indeed, in an
>> unmodified build the Qgis Python console starts, but in the
>> geoprocessing plugin, no layers are available to choose, even when
>> there are layers in the layout.
>>
>> I then changed one thing: I "fixed" the library paths in core.so
>> and gui.so to use the @executable_path relative path (fixing the
>> source path as installed, and instead of the @loader_path that I
>> use in my builds). Then it worked, I successfully created a buffer.
>>
>> This is with both a Leopard build on Leopard, using the system
>> Python 2.5, and a Tiger build on Tiger, suing the python.org python
>> 2.5.
>>
>> But, what about the all-in-one Qgis build? It has @executable_path
>> in core.so and gui.so. I wonder if it's a Python version problem -
>> the all-in-one Qgis is built to use the Tiger system Python 2.3,
>> not the python.org Python 2.5. Though the Qgis python console
>> starts, maybe the plugins need a more recent Python?
>>
>> While the Python 2.5 in the Leopard system is a very usable build
>> of Python, Apple's Python 2.3 in Tiger is generally regarded as
>> unusable for anything serious. Maybe the all-in-one build whould
>> at least have one external requirement: Python 2.5?
>>
>> On Jun 18, 2008, at 10:17 PM, John C. Tull wrote:
>>
>>> Thanks again, William. I'll look forward to hearing your results
>>> and input.
>>>
>>> John
>>>
>>> On Jun 18, 2008, at 8:03 PM, William Kyngesburye wrote:
>>>
>>>> I've only tried one python plugin so far - manageR, back in May.
>>>> I'll take a look at others and try one in a 'raw' build and see
>>>> what I get.
>>>>
>>>> PS. Tim - are there plans to move Qgis python plugins out of
>>>> ~/.qgis (for OSX)? Maybe ~/Library/Application Support/Qgis? I
>>>> also have an old 'qgis.db' file in ~/.qgis from 2006, but I don't
>>>> know if it's used any more.
>>>>
>>>> On Jun 18, 2008, at 9:56 PM, John C. Tull wrote:
>>>>
>>>>> William,
>>>>>
>>>>> Just getting to today's email...
>>>>>
>>>>> The problem is not with getting Python bindings or the console
>>>>> working, instead it is with various plugins that attempt to
>>>>> query layers from the map canvas. When I install the
>>>>> geoprocessing plugin with your 0.10 build, I get a functional
>>>>> plugin that loads layers in the drop-down menu list. For my
>>>>> builds, this does not populate, so the python plugins are useless.
>>>>>
>>>>> It must have something to do with your linking repairs post-
>>>>> build. I would assume a script to run those changes that works
>>>>> for anyone using your frameworks to build qgis from source would
>>>>> end up with a binary that functions properly wrt python plugins.
>>>>>
>>>>> Thanks,
>>>>> John
>>>>
>>
>> -----
>> William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
>> http://www.kyngchaos.com/
>>
>> All generalizations are dangerous, even this one.
>>
>>
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/
"This is a question about the past, is it? ... How can I tell that the
past isn't a fiction designed to account for the discrepancy between
my immediate physical sensations and my state of mind?"
- The Ruler of the Universe
More information about the Qgis-developer
mailing list