Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: Game_Ender on January 21, 2006, 07:32:39 am

Title: Auto Code::Blocks Checkout and Install Script
Post by: Game_Ender on January 21, 2006, 07:32:39 am
I found myself doing updates of codeblocks so much I made this script.  It will check the revision of your CB source directory vs head and then do one of three things before the classic "make; make install", a fresh install (removes old codeblocks svn directory), a clean (just runs "make clean"), or a distclean (rune "make clean" the configure).  You can edit the source and install directories of Codeblocks at the topI will post this on the wiki soon.

I have tried to inline the sctip, but GeSHi appears to be broken for the moment.  So I have attached the script.

Comments are wanted.

EDIT- :oops: I Forgot to update the copyright notice, for the record Scott Bilias has nothing to do with this script, but he did make a wonderful singleton template.  I should not post things so late in the night ;).  I have uploaded a version with a proper copyright notice.

[attachment deleted by admin]
Title: Re: Auto Code::Blocks Checkout and Install Script
Post by: takeshimiya on January 21, 2006, 11:31:55 am
I have tried to inline the sctip, but GeSHi appears to be broken for the moment.
Yes, GeSHi (or SMF) seems to broke Apache when using bash scripts.

How can I do an outsource build so I don't have to "make install" ?
Title: Re: Auto Code::Blocks Checkout and Install Script
Post by: Game_Ender on January 21, 2006, 04:19:19 pm
The script should run "make install" at the end of, not matter what option is chosen.  I don't understand what you are asking.
Title: Re: Auto Code::Blocks Checkout and Install Script
Post by: takeshimiya on January 21, 2006, 05:01:26 pm
I'm newbie to linux, that's why I ask how can I not make install Code::Blocks (thus modifying the script to do so).

Just like in the windows build, that the build is outsourced to /devel, and not installed. Or it is not possible?
Title: Re: Auto Code::Blocks Checkout and Install Script
Post by: Game_Ender on January 21, 2006, 05:18:12 pm
That's a good question, I am not sure it is possible to "install in place" with the autotools, but you can adjust the prefix agrument in CONFIG_ARGS at the top of the script.  The tells configure to generate makefiles that places all the codeblocks files in a specific directory (under which it make /bin, /lib, and /share).  You can have this be where ever you chose.  It is important to note that I think the CB unix project "installs in place".

I am still pretty new to the shell scripting myself, it took me about an hour to figure out how to get grep and sed to pull the revision number out of the svn info output.
Title: Re: Auto Code::Blocks Checkout and Install Script
Post by: 280Z28 on January 21, 2006, 06:27:54 pm
./configure --prefix=/home/sam/devel/codeblocks/devel

should work (if the build system is like any other gnu make system)

prefix tells make install where to put the install.
Title: Re: Auto Code::Blocks Checkout and Install Script
Post by: Game_Ender on January 21, 2006, 07:54:02 pm
So in this case you would just change CB_INSTALL_DIR to /home/sam/devel/codeblocks/devel at the top of the script and you will be set.
Title: Re: Auto Code::Blocks Checkout and Install Script
Post by: takeshimiya on January 21, 2006, 10:50:05 pm
Thanks, I'll try it.  :)