Code::Blocks Forums

User forums => Help => Topic started by: SavageOlive on March 29, 2009, 11:46:34 pm

Title: How to install CodeBlocks in university home-folder on Linux
Post by: SavageOlive on March 29, 2009, 11:46:34 pm
Hi,

I've been using CodeBlocks with my Ubuntu laptop for a while, though I would also like to use CodeBlocks when I sit on one of the uni's terminals (using Redhat Linux). I have no idea how to install CodeBlocks to my home-folder, since I cannot install it with a package manager for obvious reasons. Could someone walk me through the steps necessary to make CodeBlocks run from somewhere within my home-folder on the uni's machines?
Title: Re: How to install CodeBlocks in university home-folder on Linux
Post by: jarro_2783 on March 30, 2009, 04:59:29 am
I've actually done this at my uni. I checked out the svn on my own computer, configured and ran make dist to make a tarball. Then I just unpacked and installed. When you run configure, the main thing is to use --prefix to set somewhere in your local directory. I also had to install wxwidgets since they don't have that at my uni either.
I use a config script for mine:

Code
$1/configure --prefix=/home/jarrydb/local \
--with-contrib-plugins=codestat,envvars,hexeditor,regex \
--with-wx-config=/home/jarrydb/local/bin/wx-config
Title: Re: How to install CodeBlocks in university home-folder on Linux
Post by: SavageOlive on March 30, 2009, 02:13:32 pm
Thanks so much! I'm quite the beginner at Linux, so it would be really helpful if you could go into more detail? :)
Title: Re: How to install CodeBlocks in university home-folder on Linux
Post by: jarro_2783 on March 31, 2009, 12:10:46 am
checkout the source and make a tarball from it

Code
svn checkout svn://svn.berlios.de/codeblocks/trunk codeblocks
cd codeblocks
./bootstrap
./configure
make dist

you should now have a file called codeblocks-8.02svnVERSION.tar.gz
where VERSION will be the svn revision you checked out.
Copy this to a flash drive or cd.

At uni:
I had to unpack into /tmp because I didn't have enough disk quota to build it.
Code
tar -xf /path/to/tarball/codeblocks-8.02svnVERSION.tar.gz
cd codeblocks-8.02svnVERSION
./configue --prefix=/home/username/local
make
make install

This will put it in ~/local, the binary will be ~/local/bin/codeblocks. I put that in my path so that I can run all my locally installed stuff the same as everything else.
To do that, at the start of ~/.bashrc put:
export PATH=$PATH:/home/username/local/bin
where username is your actual uni username.