Opened 11 years ago

Closed 8 years ago

#2661 closed enhancement (fixed)

OSX framework app support dir needs version

Reported by: kyngchaos Owned by: hobu
Priority: normal Milestone:
Component: default Version: svn-trunk
Severity: normal Keywords:
Cc:

Description

With the approach of v1.6 and considering that drivers are now verified to match the library version, the OSX framework Application Support GDAL dir should have subdirs for versions. This will keep driver plugins separate for different GDAL versions. This is especially helpful when software linking GDAL doesn't update its GDAL version in a timely manner.

The suggested structure is:

Library
    Application Support
        GDAL
            major.minor

This matches the major.minor version structure of the framework package.

The attached patches take care of this in gdaldrivermanager.cpp and ogrdriverregistrar.cpp, and are for v1.6. I got the num2str/str define idea from http://en.wikibooks.org/wiki/C_Programming/Preprocessor. I didn't check (don't really know where to check) if GDAL has such a mechanism already.

I marked the version/milestone as 1.6 but it should be backported to 1.5 as well.

Attachments (2)

gdaldrivermanager.cpp.patch (1.6 KB) - added by kyngchaos 11 years ago.
ogrsfdriverregistrar.cpp.patch (706 bytes) - added by kyngchaos 11 years ago.

Download all attachments as: .zip

Change History (13)

Changed 11 years ago by kyngchaos

Attachment: gdaldrivermanager.cpp.patch added

Changed 11 years ago by kyngchaos

comment:1 Changed 10 years ago by hobu

Milestone: 1.6.11.7.0
Owner: changed from warmerdam to hobu

I'll take this one for 1.7. Anything that is OSX Framework related that doesn't effect anything other than framework building stuff should be assigned to me, as I'm probably the only person who can test.

comment:2 Changed 9 years ago by kyngchaos

Um, didn't make it to 1.7.0. How about 1.7.1?

comment:3 Changed 9 years ago by hobu

Milestone: 1.7.01.7.1

I suck. Added an adapted version of the patch in r18695 and r18696. Please test.

comment:4 Changed 9 years ago by kyngchaos

By 'adapted', do you mean joining the version and plugins folder name? It looks to me like the path will be

/Library/Application Support/GDAL/1.7PlugIns

instead of

/Library/Application Support/GDAL/1.7/PlugIns

I'd rather have the latter, with the extra subfolder, as it's what I've been using myself. And it's more clear and matches the framework's version subfolder layout better. And leaves the possibility of other addon support data in other subfolders of the version.

comment:5 Changed 9 years ago by kyngchaos

Howard, can you get the "/PlugIns?" thing into the 1.7.1 release?

comment:6 Changed 9 years ago by kyngchaos

P.S., that CPLFormFilename() you used in gdaldrivermanager.cpp needs a third parameter for a null extension:

                                  CPLFormFilename( GetHome(),
    #ifdef MACOSX_FRAMEWORK 
                                     "/Library/Application Support/GDAL/"
                                     num2str(GDAL_VERSION_MAJOR) "."  
                                     num2str(GDAL_VERSION_MINOR) "/PlugIns",
                                     NULL) );
    #else

comment:7 Changed 9 years ago by hobu

won't make 1.7.1, as this won't have enough impact to hold up the release. Fixed again in r18770 and backported to 1.7 branch in r18771. Please test.

comment:8 Changed 9 years ago by kyngchaos

Well, the missing NULL parameter is a blocker - compilation will fail.

comment:9 Changed 9 years ago by hobu

only for those (few) doing #ifdef MACOSX_FRAMEWORK, right? I have no idea how I got this to compile on my machine, btw. I must have been working in the wrong branch. sorry.

comment:10 in reply to:  9 Changed 9 years ago by kyngchaos

Few? Maybe. Maybe not. The popularity of a platform configuration shouldn't affect the seriousness of the bug if GDAL doesn't compile at all for that configuration.

comment:11 Changed 8 years ago by Even Rouault

Milestone: 1.8.1
Resolution: fixed
Status: newclosed

Looks like it is fixed now. Closing

Note: See TracTickets for help on using tickets.