On Dec 11, 2012, at 4:10 AM, Radim Blazek wrote:

> On Mon, Dec 10, 2012 at 11:12 PM, Larry Shaffer <lar...@dakotacarto.com> 
> wrote:
>> The GRASS-6.4.app, which is a bundled Mac app [0, Qt example] from
>> Kyngchaos.com. But the same holds for the bundled QGIS.app: the Mac
>> operating system, by default, does not pass in the full shell
>> environment, as per a user's terminal profile, to a double-clicked
>> bundled app. It only passes in a very basic env that does NOT even
>> include /usr/local, PATH, DYLD_LIBRARY_PATH, etc. There are tricks to
>> get around this, but my idea is to allow the user to set the env
>> inside of the QGIS preferences (much better).
>> 
>> The custom env setup in QGIS for Mac could offer a button to load in
>> common env setups, like for Kyngchaos.com frameworks, etc.

This is something I asked for as a general preference feature for QGIS:

http://hub.qgis.org/issues/3097

>> The Mac GRASS-6.4.app gets around these issues by first running a
>> shell script to set up the env before launching the embedded binary
>> [1]. So, when the user double-clicks GRASS-6.4.app everything is
>> configured on launch. 

> It is not necessary to set DYLD_LIBRARY_PATH before QGIS is started to
> run GRASS modules because GRASS modules are executed as new processes
> and it is enough to set DYLD_LIBRARY_PATH when the process is started.
> I am not sure however where the GRASS libs are located. I see the
> libraries in
> 
>  GRASS-6.4.pkg/Contents/GRASS-6.4.app/Contents/MacOS/lib
> 
> but the grass.sh [0] is setting DYLD_LIBRARY_PATH to
> 
>  $HOME/Library/GRASS/Modules/lib:/Library/GRASS/6.4/Modules/lib
> 
> Where is pointing the cmake GRASS_PREFIX? To the
> GRASS-6.4.app/Contents/MacOS? Can we get the path to GRASS libs as
> ${GRASS_PREFIX}/lib?
> 
The Mac grass.sh startup only customizes the startup for OS X.  The standard 
${GRASS_PREFIX}/lib (and everything else) is set in init.sh, same as other 
platforms.

> However, to get the QGIS GRASS plugin fully working (display and edit
> GRASS maps, manage region), it is necessary to set the environment
> before QGIS is started as you suggested.

Or at QGIS startup from some configuration preference.

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"Those people who most want to rule people are, ipso-facto, those least suited 
to do it."

- A rule of the universe, from the HitchHiker's Guide to the Galaxy


_______________________________________________
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to