New bash script to create an OGRE project template

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Post Reply
User avatar
iovsal
Kobold
Posts: 33
Joined: Sun Mar 30, 2003 3:20 pm
Location: Finland
Contact:

New bash script to create an OGRE project template

Post by iovsal »

This script provides an easy way to set up an essential OGRE project under Linux. It's based upon a template project directory. The script takes the name of your new project at command line then creates a dir which it extracts the project template in. Then it renames some files and replaces some string (e.g. class names) to match your project name.

To create your project run: ./makeOgreProjectTemplate.sh MyProject

Now you can follow the instructions that the script gives to you.

Download it at http://www.rarillos.it/jones/makeOgrePr ... te.tar.bz2

Cheers, _jones
Last edited by iovsal on Wed Jan 14, 2004 1:35 am, edited 1 time in total.
User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 2
Contact:

Post by Kencho »

hey, nice idea! I'll have to try this 8)
User avatar
iovsal
Kobold
Posts: 33
Joined: Sun Mar 30, 2003 3:20 pm
Location: Finland
Contact:

Post by iovsal »

I made a few modification: now it doesn't rely anymore on ExampleApplication.h and ExampleFrameListener.h, which is a better design choise.

I'd be glad if anyone who tries it let me know (even through this forum) what he thinks, and any modification suggestions are welcome of course :-)

_jones
User avatar
iovsal
Kobold
Posts: 33
Joined: Sun Mar 30, 2003 3:20 pm
Location: Finland
Contact:

Post by iovsal »

As some kind people on IRC made me notice, the script doesn't work with Ogre 0.12 Stable, but only with later CVS versions. I tried it only with them sorry.
Patches are welcome :-)
User avatar
bad_camel
Halfling
Posts: 74
Joined: Tue Dec 17, 2002 11:57 am
Location: Somerset, England
Contact:

Post by bad_camel »

I tried the scripts out, they work well here(CVS). Unfortunately, I don't have use for these scripts myself, but they seem very helpful to anyone new to setting up these types of projects. Great work!
User avatar
iovsal
Kobold
Posts: 33
Joined: Sun Mar 30, 2003 3:20 pm
Location: Finland
Contact:

Post by iovsal »

Thank you bad_camel, it's such a joy to hear words like those by a guru like you! :-)
User avatar
donmartio
Kobold
Posts: 26
Joined: Tue Sep 28, 2004 10:11 am

Post by donmartio »

Found this and would like to give it a try... but it's not there anymore.

Is there any newer version or something else.
I tried a different ways now for setting up an Ogre Project but i would prefer a simple and clean one (kdevelop for example generates a lot of crap),

Is there some simple autoconf/automake base which could be extended.
I tried to make my own stuff, but i think i always forget something (or don't know).

Greetings
DonMartio
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

this was a good idea :) I always get stuck with the autoconf/automake setup as well, it would be nice to make a template once for a simple project using ogre and then copy it and extend it every time
User avatar
Clay
OGRE Community Helper
OGRE Community Helper
Posts: 518
Joined: Wed Mar 17, 2004 4:14 am
Contact:

Post by Clay »

I've emailed him. If I can get him to send me a copy of it I'll perma host it, and put it on the wiki.
User avatar
Clay
OGRE Community Helper
OGRE Community Helper
Posts: 518
Joined: Wed Mar 17, 2004 4:14 am
Contact:

Post by Clay »

Here you go: http://www.idleengineer.net/files/makeO ... te.tar.bz2

That's a permanent link. I'll find a good home for it on the wiki.

Note that this is iovsal's. I am not responcible for whatever is in here, I'm just hosting it.
User avatar
donmartio
Kobold
Posts: 26
Joined: Tue Sep 28, 2004 10:11 am

Post by donmartio »

This is great...
Thanks...
Greetings
DonMartio
User avatar
iovsal
Kobold
Posts: 33
Joined: Sun Mar 30, 2003 3:20 pm
Location: Finland
Contact:

Post by iovsal »

I'm happy someone found it useful at last! I hope it works with the new versions of Ogre, since as you may notice, that thing is already one year old.
Have a nice time!
User avatar
donmartio
Kobold
Posts: 26
Joined: Tue Sep 28, 2004 10:11 am

Post by donmartio »

Hey iovsal,

i didn't work... but that was no problem.
I did some copy and paste stuff so it fits the new Ogre version and everything works fine now.
If you or somebody else is interested i can send it.

Thanks... this was exactly what i was looking for.
A small package which contains all the stuff that is needed and nothing more so me can understand what is happening.

Greetings
DonMartio
User avatar
Clay
OGRE Community Helper
OGRE Community Helper
Posts: 518
Joined: Wed Mar 17, 2004 4:14 am
Contact:

Post by Clay »

Yeah just email it to me (link at the bottom of the message), and I'll update the zip.
User avatar
Clay
OGRE Community Helper
OGRE Community Helper
Posts: 518
Joined: Wed Mar 17, 2004 4:14 am
Contact:

Post by Clay »

Ok, here we go:

Permanent link that I'll keep current with Ogre:
http://www.idleengineer.net/files/make_ogre.tar.bz2

Permanent link for Ogre 1.0.0:
http://www.idleengineer.net/files/make_ ... .0.tar.bz2

These point to the same file right now. Again, just hosting, these arn't mine.
Kojotex
Gnoblar
Posts: 11
Joined: Fri Jul 23, 2004 4:05 pm
Location: Germany, near Munich

Post by Kojotex »

Hmm, it doesnt work for me, i'm getting errors:

Code: Select all

sh makeOgreProjectTemplate.sh test
Creating directory...
Extracting archive..
Renaming files...
mv: cannot stat `include/APPNAME.h': No such file or directory
mv: cannot stat `include/APPNAMEFrameListener.h': No such file or directory
mv: cannot stat `include/APPNAMEApplication.h': No such file or directory
mv: cannot stat `src/APPNAME.cpp': No such file or directory
mv: cannot stat `src/APPNAMEFrameListener.cpp': No such file or directory
mv: cannot stat `src/APPNAMEApplication.cpp': No such file or directory
Performing string substitutions...
sed: can't read configure.ac: No such file or directory
makeOgreProjectTemplate.sh: line 40: include/Makefile.am.tmp: No such file or directory
makeOgreProjectTemplate.sh: line 41: include/test.h.tmp: No such file or directory
makeOgreProjectTemplate.sh: line 42: include/testFrameListener.h.tmp: No such file or directory
makeOgreProjectTemplate.sh: line 43: include/testApplication.h.tmp: No such file or directory
makeOgreProjectTemplate.sh: line 46: src/Makefile.am.tmp: No such file or directory
makeOgreProjectTemplate.sh: line 47: src/test.cpp.tmp: No such file or directory
makeOgreProjectTemplate.sh: line 48: src/testFrameListener.cpp.tmp: No such file or directory
makeOgreProjectTemplate.sh: line 49: src/testApplication.cpp.tmp: No such file or directory
+---------------------------------------------------------------------+
| 1. cd to test
| 2. run ./bootstrap.sh
| 3. run ./configure && make && make install
| 4. cd to bin/
| 5. run ./test
| 6. Edit your sources
| 7. Modify src/Makefile.am and include/Makefile.am to mirror changes
| 8. repeat steps from 1 to 5
|---------------------------------------------------------------------+
User avatar
donmartio
Kobold
Posts: 26
Joined: Tue Sep 28, 2004 10:11 am

Post by donmartio »

This is strange...
I tested it twice this morning because of some bz2 errors which occured when Clay tested it.

Is the archive extracted to the created project folder?

May it is something with the userrights?

Greetings
DonMartio
Kojotex
Gnoblar
Posts: 11
Joined: Fri Jul 23, 2004 4:05 pm
Location: Germany, near Munich

Post by Kojotex »

hmm, i dont think its because of the rights:

Code: Select all

debian:/home/sid# mkdir test1
debian:/home/sid# cp make_ogre1.0.0.tar.bz2 test1/
debian:/home/sid# cd test1/
debian:/home/sid/test1# ls
make_ogre1.0.0.tar.bz2
debian:/home/sid/test1# tar xvjf make_ogre1.0.0.tar.bz2
README
makeOgreProjectTemplate.sh
debian:/home/sid/test1# ls
make_ogre1.0.0.tar.bz2  makeOgreProjectTemplate.sh  README
debian:/home/sid/test1# ./makeOgreProjectTemplate.sh test
//here comes the same error as above
debian:/home/sid/test1#
edit: i did it as root, so there cant be any right problems...
User avatar
donmartio
Kobold
Posts: 26
Joined: Tue Sep 28, 2004 10:11 am

Post by donmartio »

The bz2 File with the Projecttemplate is missing as far as i can see.
Ok... it is missing in the bz2 file... don't know why.
Check it when i'm at home.
May i missed it when i packaged it.
Sorry...
User avatar
Clay
OGRE Community Helper
OGRE Community Helper
Posts: 518
Joined: Wed Mar 17, 2004 4:14 am
Contact:

Post by Clay »

No, this one is my problem. I extracted everything to make sure it was all there, then when I went to re-tar it I missed one of the files.... How embarassing. =)

It's fixed now.
Kojotex
Gnoblar
Posts: 11
Joined: Fri Jul 23, 2004 4:05 pm
Location: Germany, near Munich

Post by Kojotex »

hehe

Now it works very good, thanks!
Post Reply