Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Prefix finding code still broken

<< < (2/2)

Pecan:

--- Quote ---and if that doesn't exist it will look in $PREFIX/share/codeblocks like above.

--- End quote ---

Thank you for that.

When developing I'd like to keep my mac file structure as close to linux structure as possible. Jumping around in the forest of mac hidden files wastes a lot of time.

afb:
Actually it will first ask for the Resources directory of the bundle, and it if isn't a bundle that will return something useless like "codeblocks" (without the path) and then it will revert to plan B which is calling GetAppPath that in returns uses the Mach-O binary path. The idea is to return the directory that corresponds to the program that is being run...

For the preferences wxMac will "only" look in ~/Library/Application\ Support/CodeBlocks, though. wxGTK will instead use the $HOME/.codeblocks directory on Mac OS X too I think.

afb:

--- Quote from: afb on November 07, 2006, 01:33:09 pm ---
--- Code: ---    #ifdef APP_PREFIX
        wxString data = wxT(APP_PREFIX); // under linux, get the preprocessor value
    #else
        wxString data = GetAppPath();
    #endif

--- End code ---

Will fix it when I move to the "share/codeblocks" subdirectory.
Just wondered if there was a bug with the other code path too ?

i.e. shouldn't the above instead be: GetAppPath() + _T("/..") ?

--- End quote ---

Changed it to use app path + "..", which should be something like:
/usr/local/bin/../share/codeblocks, which should be working ?

Also fixed a bug on Mac OS X, I mistakenly assumed that just because
you pass the length by pointer it would actually return something useful.

Navigation

[0] Message Index

[*] Previous page

Go to full version