• entries
    743
  • comments
    1924
  • views
    580396

Installers and stuff

Sign in to follow this  

124 views

Had to come home from work sick today, so I've spent the day more productively than usual [smile].

First up, I've updated my SAT code to precalculate all the unique normals for the Shapes::Polygon class to speed up (in theory, no profiling done) the SAT tests by reducing the number of projections.

This all went horribly wrong until I realised I was storing the normalised vectors of the unique edges and had forgotten to (-Y,X) them to create the actual edge normals. It was a weird one to track down because quite a lot of the shapes in the test level have at least one side at a right angle to each edge, so it was only one edge of the few shapes that didn't that were colliding wrong.

Next up, since Pod is writing its config files to the user's AppData folder, I thought I better find out how to write installer/uninstallers in order to be polite.

I remember HopeDagger mentioning NSIS ages ago when he was distributing Membrane Massacre so decided to have a look. Very impressive indeed. Took about two hours from downloading it to being able to create an installer that optionally creates Start Menu and Desktop shortcuts as well as cleaning up properly when the uninstaller is run.

One bit of weirdness though - I created an icon for the game using IcoFX that contains 48x48, 32x32 and 16x16 versions. The smaller icons were shrunk inside IcoFX from the largest and look really good since IcoFX does such a good job of shrinking images.

In Windows explorer, if the view is set to small icon, the 16x16 from the icon file is used and looks hunky dorey. But in the Start Menu, and also in the Add/Remove Programs list, it is not used and it looks as though Windows is doing a run-time shrink of one of the bigger icons as the small icon here looks really patchy.

I can't find anything about this on the internet and it isn't a big problem, but if anyone knows anything about this, please let me know.

[EDIT] Never mind - seems it was somehow not updating the icon when I saved it for some reason. When I deleted and recreated the icon, it started magically working. [/EDIT]

The next thing I want to think about is how a level is going to end in Pod, so that I can basically start putting the overall structure together. Once that is sorted, I can put in a placeholder start menu system and basically have the whole overall game structure put together.

At that point I can start just dropping in new features to the game as I come up with them.
Sign in to follow this  


6 Comments


Recommended Comments

Getting Started With Game Explorer may be an interesting read on MSDN. [smile]

I've always much preferred Inno Setup to NSIS, but that's mainly due to the majority of NSIS-based installers I've used messing up my start menu - so cheers for making the creation of start menu shortcuts optional!

I can't say I've encountered the same problem as you have with IcoFX, though. Windows Explorer uses 24×24 icons in a few places, maybe that's what's causing the issue?

Share this comment


Link to comment
Quote:
Original post by benryves
Getting Started With Game Explorer may be an interesting read on MSDN. [smile]

I've always much preferred Inno Setup to NSIS, but that's mainly due to the majority of NSIS-based installers I've used messing up my start menu - so cheers for making the creation of start menu shortcuts optional!

I can't say I've encountered the same problem as you have with IcoFX, though. Windows Explorer uses 24×24 icons in a few places, maybe that's what's causing the issue?


Thanks for the link, I'll have a look. [EDIT - Had a look. Urg. Seems like a lot of hassle just to get a game in that daft games folder thingy. Think I'll put on my QA hat for a moment and say "Not necessary for this project". There. Done.]

I just solved the icon issue actually. Was a bit weird and don't know what happened but I deleted the icon, then recovered it from the bin, then rebuilt my project and recreated the installer. All okay now. Odd.

I'm curious to know what issues you've had with NSIS messing up your start menu? All it is doing is writing shortcuts into the magic start menu folder. What are the problems you've had in the past?

Share this comment


Link to comment
Quote:
Original post by EasilyConfused
Thanks for the link, I'll have a look. [EDIT - Had a look. Urg. Seems like a lot of hassle just to get a game in that daft games folder thingy. Think I'll put on my QA hat for a moment and say "Not necessary for this project". There. Done.]
Yes, I agree that they could have made it a bit easier. I just thought I'd mention it for completeness!
Quote:
I'm curious to know what issues you've had with NSIS messing up your start menu? All it is doing is writing shortcuts into the magic start menu folder. What are the problems you've had in the past?
Let's say I had a Games directory in All Users\...\Start Menu\Programs\Games with a custom icon and an NSIS installer prompted me where I wanted to create the shortcuts. If I clicked on the "Games" folder it presented, rather than creating shortcuts in there it would create a new directory Ben\...\Start Menu\Programs\Games and store the shortcuts there. Maybe it's just a mild case of OCD but that sort of thing annoys me (especially as the new directory prevents the start menu from showing the correct icon for the Games submenu); of course, one can move the shortcuts manually but that prevents the uninstaller from cleaning up after itself properly. [wink]

Share this comment


Link to comment
Quote:
Original post by benryves
Quote:
Original post by EasilyConfused
Thanks for the link, I'll have a look. [EDIT - Had a look. Urg. Seems like a lot of hassle just to get a game in that daft games folder thingy. Think I'll put on my QA hat for a moment and say "Not necessary for this project". There. Done.]
Yes, I agree that they could have made it a bit easier. I just thought I'd mention it for completeness!
Quote:
I'm curious to know what issues you've had with NSIS messing up your start menu? All it is doing is writing shortcuts into the magic start menu folder. What are the problems you've had in the past?
Let's say I had a Games directory in All Users\...\Start Menu\Programs\Games with a custom icon and an NSIS installer prompted me where I wanted to create the shortcuts. If I clicked on the "Games" folder it presented, rather than creating shortcuts in there it would create a new directory Ben\...\Start Menu\Programs\Games and store the shortcuts there. Maybe it's just a mild case of OCD but that sort of thing annoys me (especially as the new directory prevents the start menu from showing the correct icon for the Games submenu); of course, one can move the shortcuts manually but that prevents the uninstaller from cleaning up after itself properly. [wink]


Hmm. I see what you mean.

Quote:
From NSIS Documentation
$SMPROGRAMS

The start menu programs folder (use this whenever you want $STARTMENU\Programs). The context of this constant (All Users or Current user) depends on the SetShellVarContext setting. The default is the current user.


It looks like all of the directory constants that could either be All Users or Current User ($APPDATA, $DESKTOP etc) are controlled by this SetShellVarContext setting.

I guess there must be some way of having the installer give the option of installing for all users or just the current user, like a lot of pro installers seem to nowadays. I'll have a look into that.

Cheers for the heads up.

Share this comment


Link to comment
Quote:
Original post by Evil Steve
Quote:
Original post by EasilyConfused
Had to come home from work sick today
Sure, had to [wink]


Well, I did have quite a lot of programming to do [smile].

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now