Compiling project for release [SOLVED]

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Exuro
Posts: 10
Joined: Sat Nov 22, 2014 5:31 pm

Compiling project for release [SOLVED]

Post by Exuro »

Apologies if this is a silly question, but I can't find the answer anywhere. I've googled it in about as many ways as I can think of, and have searched the forums, but I can't find the answer to this question. (It's possible that's because it really is obvious, but I thought I'd ask)

So essentially my question is, when you have an Irrlicht project finished and ready for distribution, is there a correct procedure for compiling a release build? I'm using Visual Studio 2012 on Windows. I'm aware that I can compile a release build instead of debug, but that doesn't seem quite right. I had hoped there might be some way to compile it more professionally that didn't leave the assets as exposed files. Also, if that is the correct way of doing it, how would I compile the project for use on Mac and Linux?

Thanks so much in advance!
Last edited by Exuro on Wed Dec 03, 2014 6:21 pm, edited 1 time in total.
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Compiling project for release

Post by hendu »

Compiler options have nothing to do with how your data is organized. If you want files to be in a single data file, you need to code for that.
ralian
Posts: 28
Joined: Tue Nov 11, 2014 1:00 am

Re: Compiling project for release

Post by ralian »

I see three questions here, not one.
To make your program look professional, you could find a library that handles tar archives and use that for resource management - other than that it's just clever programming (serializing different data into effectively organized files) and resource management (not putting redundant textures and such to keep file size down.
To compile for mac and linux, the easiest thing you can do is compile it on mac and linux. If you don't have access to mac, that's tough, but you can always compile for linux in a vm. There are other pieces of software available for cross-compilation, but there are many hoops to jump through and the easiest thing is just to compile it on the system you are distributing it for.
Thirdly, all you are really doing by doing a release build is optimizing your program for exactly that - release. Usually this means not producing debugging symbols and forcing the compiler to optimize the program for speed, at the cost of compilation time.
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Compiling project for release

Post by hendu »

I should add that irr supports many types of archives natively, including zip and tar.
ralian
Posts: 28
Joined: Tue Nov 11, 2014 1:00 am

Re: Compiling project for release

Post by ralian »

hendu wrote:I should add that irr supports many types of archives natively, including zip and tar.
Thanks, I didn't know that. I'm new here :roll:
Exuro
Posts: 10
Joined: Sat Nov 22, 2014 5:31 pm

Re: Compiling project for release

Post by Exuro »

Okay, that helps a lot, thanks so much!
Asimov
Posts: 246
Joined: Thu Dec 04, 2014 7:41 pm
Contact:

Re: Compiling project for release [SOLVED]

Post by Asimov »

I wish there was a way to load meshes from resources. I once worked out a way to load my sprites from resources in another engine and it is neater than having lots of separate files.

Yes if it is a massive massive game you wouldn't want to put them all in the exe, but if you are making a small game with say 4 or five models it would be nice to have a function to incorperate them into the exe.
ralian
Posts: 28
Joined: Tue Nov 11, 2014 1:00 am

Re: Compiling project for release [SOLVED]

Post by ralian »

You might be able to find a way to use Qt or Objcopy, with a bit of clever hacking.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Compiling project for release [SOLVED]

Post by CuteAlien »

IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Compiling project for release [SOLVED]

Post by hendu »

You can embed anything in the exe using the common bin2c utility, and the IMemoryFile helper functions.
Asimov
Posts: 246
Joined: Thu Dec 04, 2014 7:41 pm
Contact:

Re: Compiling project for release [SOLVED]

Post by Asimov »

Hi Hendu,

I had a look at that bin2c utility and I didn't have a clue how it works heh heh. Not that far with my game yet anyway LOL.
thanhle
Posts: 325
Joined: Wed Jun 12, 2013 8:09 am

Re: Compiling project for release [SOLVED]

Post by thanhle »

Sorry to hijack this thread.
Asimov You can use pk2 or zip or other zip format.
I thought there are also some opensource zip code around. Try 7zip etc.

Goodluck
thanh
Asimov
Posts: 246
Joined: Thu Dec 04, 2014 7:41 pm
Contact:

Re: Compiling project for release [SOLVED]

Post by Asimov »

Hi thanhle,

Thanks, but how does using pk2 or zip format put all my assets into the exe. Perhaps I am looking at this wrong.
When I used a 2D chilli engine I was able to put all my 2D images into a resource file which compiled with the exe. I would like to do the same thing with meshes, and 2D images in irrlicht.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Compiling project for release [SOLVED]

Post by CuteAlien »

Yeah, that's what my link above is all about. zip would allow you to deliver it as a single file - which is also useful sometimes.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply