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 » Tue Jan 13, 2004 6:37 pm

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.
0 x

User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 1
Contact:

Post by Kencho » Wed Jan 14, 2004 12:11 am

hey, nice idea! I'll have to try this 8)
0 x

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

Post by iovsal » Fri Jan 16, 2004 12:12 am

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
0 x

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

Post by iovsal » Mon Jan 19, 2004 10:36 pm

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 :-)
0 x

User avatar
bad_camel
Halfling
Posts: 74
Joined: Tue Dec 17, 2002 11:57 am
Location: Somerset, England
Contact:

Post by bad_camel » Tue Jan 20, 2004 2:09 pm

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!
0 x

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

Post by iovsal » Tue Jan 20, 2004 3:40 pm

Thank you bad_camel, it's such a joy to hear words like those by a guru like you! :-)
0 x

User avatar
donmartio
Kobold
Posts: 26
Joined: Tue Sep 28, 2004 10:11 am

Post by donmartio » Sat Mar 05, 2005 11:45 pm

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
0 x

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

Post by :wumpus: » Sun Mar 06, 2005 12:36 am

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
0 x

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

Post by Clay » Sun Mar 06, 2005 1:22 am

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.
0 x

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

Post by Clay » Sun Mar 06, 2005 1:58 am

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.
0 x

User avatar
donmartio
Kobold
Posts: 26
Joined: Tue Sep 28, 2004 10:11 am

Post by donmartio » Sun Mar 06, 2005 9:24 am

This is great...
Thanks...
Greetings
DonMartio
0 x

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

Post by iovsal » Sun Mar 06, 2005 12:29 pm

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!
0 x

User avatar
donmartio
Kobold
Posts: 26
Joined: Tue Sep 28, 2004 10:11 am

Post by donmartio » Sun Mar 06, 2005 8:55 pm

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
0 x

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

Post by Clay » Sun Mar 06, 2005 9:33 pm

Yeah just email it to me (link at the bottom of the message), and I'll update the zip.
0 x

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

Post by Clay » Mon Mar 07, 2005 9:36 am

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.
0 x

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

Post by Kojotex » Mon Mar 07, 2005 2:17 pm

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
|---------------------------------------------------------------------+
0 x

User avatar
donmartio
Kobold
Posts: 26
Joined: Tue Sep 28, 2004 10:11 am

Post by donmartio » Mon Mar 07, 2005 2:50 pm

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
0 x

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

Post by Kojotex » Mon Mar 07, 2005 3:13 pm

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...
0 x

User avatar
donmartio
Kobold
Posts: 26
Joined: Tue Sep 28, 2004 10:11 am

Post by donmartio » Mon Mar 07, 2005 3:53 pm

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...
0 x

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

Post by Clay » Mon Mar 07, 2005 6:15 pm

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.
0 x

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

Post by Kojotex » Mon Mar 07, 2005 7:54 pm

hehe

Now it works very good, thanks!
0 x

Post Reply