开发者

How to make a custom installer for games, etc?

Can anyone tell me how to create a custom installer to 'install' games. I say custom meaning I don't want the user to have the option where the game is installed. I want it to be a straight forward process, maybe with just one loading bar.

The program I'm developing is a 'center' for game playing, which includes a community and other features, such as a timer that records how long a game is played for. I just thought that installing each game in one place, with a simple installer would make the program easier to use. It also will allow me to do o开发者_JAVA百科ther features as the games will all be installed in one place. No need for the user to specify where the game is installed.

Would this be possible?


I'm presuming your game is developed in C#, rather than requiring the installer be written in C#?

If that's the case, there are plenty of options available to you for installer packages. Probably the most customisable option, whilst still being free, is Nullsoft Install System. The installers are built around some basic scripting activities, and can be as simple or complex as you desire - the installation, and the wiki have plenty of example scripts that you can explore and experiment with.


OT: Install Location
Personally, I'd consider it bad practice to disallow the user from selecting their own install location and, in fact, it gets me pretty frustrated when anything but system-file installations (e.g. drivers) stop me from choosing a directory. Many users will choose to locate certain types of installation and data on a non-default device (e.g. virtually all of my games are housed on a separate drive to my main Windows installation). If you need to remember the installation location so badly, create a registry key for it.


Another system you can use is called Inno Setup - http://www.jrsoftware.org/isinfo.php


If the games already exist your best option would be to call the MSI installers in administrative mode (see documentation for MSIExec). Then you could actually

  • Set a predetermined location for the games
  • Remove any UI and replace that with your custom installer UI

Obviously that would only work if the installs are really MSI modules (with some more work also for installers that have MSIs packed into EXE setups). That is true for most, but likely not all games.

Please note that this would be a sizable task and to be honest I cannot see any value in doing what you are planning. But thats up to you.

As start you would have to read into the MSI documentation. I'd recommend WIX (Windows Installer XML) for the beginning.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜