Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
GetAppPath vs. DetermineExecutablePath
afb:
--- Quote from: afb on November 22, 2006, 10:14:03 am ---But I can test the --enable-binreloc version on Linux, and see if it relocates OK.
--- End quote ---
Tested on Ubuntu, interestingly the default installation did not work (it looked in /usr/local/share/codeblocks, while the file had been installed in /usr/share/codeblocks). However, if you copied all of it over from /usr to /opt/codeblocks - then it found the files in /opt/codeblocks/share/codeblocks just fine, so binreloc seems to be working fine on Linux.
afb:
--- Quote from: mandrav on November 22, 2006, 11:35:36 am ---All I know is that there was no need to discuss this issue (i.e. it was a non-issue, we had no complaints so far) up to now and suddenly I see a two pages long topic on the subject. I just want to know what triggered this.
--- End quote ---
Thomas did a refactoring of configmanager.cpp, that broke the wxMac support I added.
And it featured a reimplementation of the same code that was in app.cpp, so I asked...
afb:
Just for the record here is what I found the default locations to be:
Code::Blocks
* wxMSW:
@executable_path/share/CodeBlocks
@executable_path/share/CodeBlocks/plugins
* wxGTK:
$PREFIX/share/codeblocks
$PREFIX/share/codeblocks/plugins
* wxMac:
CodeBlocks.app/Contents/Resources/share/codeblocks
CodeBlocks.app/Contents/Resources/share/codeblocks/plugins
wxStandardPaths (GetDataDir and GetPluginsDir)
* wxMSW:
@executable_path
@executable_path
* wxGTK:
$PREFIX/share/codeblocks
$PREFIX/lib/codeblocks
* wxMac:
CodeBlocks.app/Contents/SharedSupport
CodeBlocks.app/Contents/PlugIns
Where "@executable_path" is the directory where the .exe is located.
thomas:
--- Quote ---So we are hardcoding /usr/local, /opt or whatever? Strange, I haven't noticed...
--- End quote ---
Yes, and yes.
But anyway, I am sick of endlessly justifying every 6 lines of code that I ever wrote. Do whatever you want, and if you think SELFPATH is so much of a better solution then for pity's sake use it...
afb:
Should we add a second function to just get the app prefix ?
The "/usr/local/bin/.." works fine, but looks a bit strange...
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version