c++, sdl - how to make installer? .exe

Started by
9 comments, last by leagal4ever 11 years, 6 months ago
Hello i have make part of my game which i want show to other people. I would like to make installer to make game available on every computer with all files included. I am using c++, sdl, sdl_ttf and build game in visual studio 2010 with debug option.

Thanks fo help.
Advertisement
You'll want to give people the Release build of your program, not the Debug build. If you give them a debug build, they might need Visual Studio (or whatever compiler/setup you used) to even run the game. Always do release when releasing the program.

Here's a list of installation software. I can't recommend one, as I have no personal experience with one.
[size=2][ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]
Unless you have very special needs I suggest to not create installer package. Just create the proper directory structure, add all relevant .dll and data files and pack it into zip archive.

Personally I avoid installing anything that does not come from very well-known and reliable source - because more than often the uninstall feature is either poorly implemented or broken. Plus I do not see why simple games should need to save anything to registry, access files (except save files) outside it's installation directory and so on.
Lauris Kaplinski

First technology demo of my game Shinya is out: http://lauris.kaplinski.com/shinya
Khayyam 3D - a freeware poser and scene builder application: http://khayyam.kaplinski.com/
Install builders are very fast and easy. By the way, are you polish? (I noticed your surname).
So to use on another computer it only need to be build as release, insert used files and thats it?

I have error when building, any idea how to solve it? Error is only when release, debug is working fine.
errorpo.png

@Lauris Kaplinski - didnt know that, sure at start would be better and easier to make simple zip, however for future im interested in installer
@JustABeginner - no not polish
That error there says "Access violation reading location 0x00000000," and because NULL/nullptr is generally 0, I think it's a safe guess that you're trying to dereference a null pointer. Time to whip out the debugger (in release mode). If you hit "continue" it will (hopefully) take you to the location where the error occurred, and you can view the code (or if it's not your code, view the stack trace to see where in your code your invoking this behavior).
[size=2][ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]
Continue is just throwing same window with same message, break give me disassembly tab.
error1ii.png

So somewhere in my code is mistake to somehow use NULL pointer, why there is no problem with debug mode?

Continue is just throwing same window with same message, break give me disassembly tab.

Does it give you a call stack? (bottom left tab)


So somewhere in my code is mistake to somehow use NULL pointer, why there is no problem with debug mode?

That's the joy of C++ and undefined behavior. In C++, if you invoke undefined behavior (and there are a ton of ways of doing it), your program might continue to appear to work fine (even though there's a problem), but then when you change a setting (i.e. debug to release or release to debug) all hell breaks loose.

Pay particular attention when compiling to any warnings you might get, and strive for 0 warnings on compilation.
[size=2][ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]

So somewhere in my code is mistake to somehow use NULL pointer, why there is no problem with debug mode?

Debug builds often initialise variables to some sensible value; either to a zero value, or to some value that can easily be seen in a disassembly or stack trace.

- Jason Astle-Adams

error2ep.png
I dont have any warnings have also minimize notices, when click on any Call Stack line only Dissembly lines are changed i dont see my code.

error4l.png
When run from Release folder i get window as normal with error message =(

I have made copy of project folder take most out and i have build it in Release so must be problem in my code.

This topic is closed to new replies.

Advertisement