Just wanting to suggest this type of "run.sh" :
#!/bin/sh
APP_DIR=`pwd`
export LD_LIBRARY_PATH=$APP_DIR:$LD_LIBRARY_PATH
$APP_DIR/codeblocks.exe $@
instead of :
#!/bin/sh
APP_DIR=/home/funto/installations/codeblocks-1.0-RC1-1/src/output
export LD_LIBRARY_PATH=$APP_DIR:$LD_LIBRARY_PATH
$APP_DIR/codeblocks.exe $@
This permits to move the folder containing C::B...
Yes I know I shouldn't have created a topic on the forum for something like this :p
I've looked into ebuild installing C::B in Gentoo Linux http://forums.codeblocks.org/index.php/topic,810.0.html.
Here's what I've found:
# Code::Blocks has a funny install procedure that puts all of its
# executables and libraries inside a single directory structure. This may be
# useful for installation on Windows, but does not follow FHS standards on
# linux. The following patch modifies the code to read the plugins and data
# from the proper paths.
# Code::Blocks has an odd makefile. This patch also makes it accept the user's
# CXXFLAGS
epatch ${FILESDIR}/${P}.patch
And one more peace of code:
# And now the screwy Code::Blocks installation. It is built around a windows
# install model where all executables, data, and libraries are under a
# program's directory. We need to run the install script which will
# "install" to ${S}/src/ouput and then manually move everything to ${D} in
# the proper FHS paths
cd ${S}/src
. update
# install the icon
cd ${S}/src/src/resources/icons
insinto /usr/share/pixmaps
newins app_64.xpm codeblocks.xpm
# fixup permissions and move files from src/output to their proper places in
# ${D}
cd ${S}/src/output
# rename the main executable to something less windows-ish
newbin codeblocks.exe codeblocks
dobin console_runner.exe
dolib.so libcodeblocks.so
# tips.txt belongs in share
insinto /usr/share/${PN}
doins tips.txt
cd share/CodeBlocks
# now setup /usr/share/codeblocks and move the data files there
doins -r *.zip images/ templates/ lexers/
# move the plugin libraries out of this "share"
insopts -m0755
insinto /usr/lib/${PN}
doins -r plugins/
insopts -m0644
# and the docs
cd ${S}/src
dodoc AUTHORS BUGS COMPILERS ChangeLog README TODO
# and lastly, the desktop entry
make_desktop_entry codeblocks "Code::Blocks IDE" "codeblocks.xpm" \
"Development"
And as I see it install C::B just like any other app under Linux copying all resources into default system directories - there's no need for any running script (but unfortunately will allow only one C::B version to be installed at once). Maybe some UNIX-like installer should be added ?