Compiling project for release [SOLVED]
Compiling project for release [SOLVED]
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!
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.
Re: Compiling project for release
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.
Re: Compiling project for release
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.
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.
Re: Compiling project for release
I should add that irr supports many types of archives natively, including zip and tar.
Re: Compiling project for release
Thanks, I didn't know that. I'm new herehendu wrote:I should add that irr supports many types of archives natively, including zip and tar.
Re: Compiling project for release
Okay, that helps a lot, thanks so much!
Re: Compiling project for release [SOLVED]
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.
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.
Re: Compiling project for release [SOLVED]
You might be able to find a way to use Qt or Objcopy, with a bit of clever hacking.
Re: Compiling project for release [SOLVED]
Maybe this thread helps: http://irrlicht.sourceforge.net/forum/v ... hp?t=34291
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: Compiling project for release [SOLVED]
You can embed anything in the exe using the common bin2c utility, and the IMemoryFile helper functions.
Re: Compiling project for release [SOLVED]
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.
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.
Re: Compiling project for release [SOLVED]
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 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
Re: Compiling project for release [SOLVED]
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.
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.
Re: Compiling project for release [SOLVED]
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm