Jump to content

  • Log In with Google      Sign In   
  • Create Account


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


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
10 replies to this topic

#1 leagal4ever   Members   -  Reputation: 481

Like
0Likes
Like

Posted 03 October 2012 - 11:11 AM

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.

Sponsor:

#2 Cornstalks   Crossbones+   -  Reputation: 6974

Like
1Likes
Like

Posted 03 October 2012 - 11:15 AM

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.
[ 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 ]

#3 Lauris Kaplinski   Members   -  Reputation: 841

Like
1Likes
Like

Posted 03 October 2012 - 01:54 PM

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/

#4 JustABeginner   Members   -  Reputation: 123

Like
0Likes
Like

Posted 03 October 2012 - 02:18 PM

Install builders are very fast and easy. By the way, are you polish? (I noticed your surname).

Edited by JustABeginner, 03 October 2012 - 02:21 PM.


#5 leagal4ever   Members   -  Reputation: 481

Like
0Likes
Like

Posted 04 October 2012 - 03:14 PM

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.
Posted Image

@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

#6 Cornstalks   Crossbones+   -  Reputation: 6974

Like
1Likes
Like

Posted 04 October 2012 - 04:29 PM

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).
[ 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 ]

#7 leagal4ever   Members   -  Reputation: 481

Like
0Likes
Like

Posted 04 October 2012 - 04:53 PM

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

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

#8 Cornstalks   Crossbones+   -  Reputation: 6974

Like
0Likes
Like

Posted 04 October 2012 - 05:31 PM

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.
[ 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 ]

#9 jbadams   Senior Staff   -  Reputation: 17932

Like
0Likes
Like

Posted 05 October 2012 - 04:28 AM

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.

#10 leagal4ever   Members   -  Reputation: 481

Like
0Likes
Like

Posted 05 October 2012 - 03:10 PM

Posted Image
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.

Posted Image
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.

Edited by leagal4ever, 05 October 2012 - 03:13 PM.


#11 leagal4ever   Members   -  Reputation: 481

Like
0Likes
Like

Posted 05 October 2012 - 05:15 PM

Oh souch silly error as told:

Just create the proper directory structure, add all relevant .dll and data files and pack it into zip archive.


I had no idea proper foler is Release folder there were no images i just copy SDL files.

SDL_Surface* tmp;
tmp = IMG_Load©;
SDL_DisplayFormatAlpha(tmp);// problem

Problem is there was no image loaded.

if (tmp != NULL)
SDL_DisplayFormatAlpha(tmp);
Now i avoid problem just in case something is not loaded


Thans for all help :)

Edited by leagal4ever, 05 October 2012 - 05:16 PM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS