Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Prefix finding code still broken
afb:
Switched the Mac code to use the new GetAppPath implemenation, but it still doesn't work...
Seems like it's picking the wrong level and missing a ".." ? Wonder why SELFPATH doesn't ?
afb:
(I would post the real output here, if forum wouldn't barf ?)
But it is looking in /usr/ local/ bin/ share/ codeblocks
Without the spaces of course, had to add those to post...
mandrav:
--- Quote ---Wonder why SELFPATH doesn't ?
--- End quote ---
Have you had a quick glance in src/prefix.cpp? Maybe it's missing a define for Mac or something?
afb:
BINRELOC is only for Linux, so I did my own implementation.
But I have must have missed what it was supposed to return.
i.e. currently I return the path to the application in GetAppPath,
but apparently it is expecting the prefix to be returned instead ? :o
--- 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("/..") ?
afb:
BTW; We will use a "share/codeblocks" dir on Win/Mac too, I think ?
(the nightly build for Windows seem to use share/CodeBlocks, but...)
Rather than the "standard" system path (from wxStandardPathsBase):
--- Code: --- // return the location of the applications global, i.e. not user-specific,
// data files
//
// prefix/share/appname under Unix, c:\Program Files\appname under Windows,
// appname.app/Contents/SharedSupport app bundle directory under Mac
virtual wxString GetDataDir() const = 0;
--- End code ---
Which doesn't even look to be all that correct for Windows and Mac OS X.
(SharedSupport is supposed to contain examples and templates and such)
so it will look in: CodeBlocks.app/Contents/Resources/share/codeblocks dir,
and if that doesn't exist it will look in $PREFIX/share/codeblocks like above.
Navigation
[0] Message Index
[#] Next page
Go to full version