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 other 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.
Related
I am currently finishing a project that uses multiple programs, and I am trying to get ideas of how to package them all into one installer, probably through the publishing option in visual basic, but I am sure there are multiple ways this can be done.
First, the main program is done using windows forms. That program, on the server side, keeps track of information that is going on in the warehouse. Users are able to manipulate that info on the client side as needed from multiple points: receiving, work orders, and shipping.
The external program was done in Unity and uses the same information to show how the warehouse is staged, what work is being done, and gives a 3D view of where people and inventory are located in snap shots of time.
So what I am trying to do, is package the Unity project into the installer. It's okay that it's a stand alone program, since I can just open it via the system controls in the main windows form project.
What isn't okay, is that right now it takes two installs to get everything running. Given that I have to deal with individuals that can barely use Google chat, I need this process to be seamless.
I am personally a fan of WiX. I have used it for small, single application distributions and large composite applications that involve many parts. It is capable of producing MSI( MSU, MSM, etc.), EXE installers and has Visual Studio integration.
I'm making an XNA game and thought I'd look into making installers for it for when it's finished. It would be great to be able to distribute a single file that contains all the content and extracts all that to the install directory. Also I'd want to choose install directory and other options, and it would be nice to set the appearance of the installer to be in the style of my game.
Updates and patching are also something I'd want to set up. I have a website, so I'd like the game to check for updates from there.
I am familiar with ClickOnce, but I don't feel it is appropriate for the situation, and I've looked at Advanced Installer, Inno installer and wix.
I would love to make my own installer in c# winforms or similar, but I'm new to the area and don't know if this is possible or where to start. I trawled the net but could only find links to the third party stuff, so maybe makign my own is impossible? I wouldn't be bothered about not having start menu entries or registry values or whatever, just want to extract files somewhere then later check for updates before running.
Thanks for helping a newbie!
WiX is a good option for all the requirements you have listed above.
It would be great to be able to distribute a single file that contains all the content and extracts all that to the install directory
Standard WiX Setup project can get you going with this. There are default templates for basic installers
Also I'd want to choose install directory and other options
The default templates are all customisable, so you would be able to collect additional data easily, what you do with the data is up to you.
and it would be nice to set the appearance of the installer to be in the style of my game
WiX 3 onwards (I think) has a project type of 'Bootstrapper' which allows you to put your own UI infront of the installer, such as WPF or even XNA itself if you really wanted. You can specify and budle the requirements for the installer, eg .NET 4.0 if you are using a WPF front end.
I would love to make my own installer in c# winforms or similar
Also an option with WiX Bootstrapper.
Installers are more complicated than you might think, also, for updates and patches, keeping information around of versions of files and how to handle them gets complex fast. My advice would be spend time on your game and take advantage of the hard work of others who have thought long and hard about these problems.
I am trying to write a Setup for an application with Inno Setup, which is pretty neat by the way ;) , but now I am stuck with a problem regarding the graphiccard.
I am installing a 3D application and want to configure the program so that it uses a certain graphic card as default.
It sounded logical to me that somewhere in the registry must be a something to configure that.
I tried to change the default graphiccard manually und compare the changes in the registry but couldn't find any entrys relative to the changes
I know that programs like Adobe Photoshop are using the high performance graphiccards by default so there must be some kind of solution to my problem.
I am using inno script to write my setup but I can call external programs to do some tasks so I could write a C# program to execute this task.
This option is mostly relevant for Windows 7 and Windows 8 because I only saw it there.
Does anyone of you know how to change the default graphiccard of an application programmatically?
Your approach, sorry, sucks. This is not something you should do during setup. What if the card changes?
Check it during application start. Let the user choose if you do not find anything. Let him update. Not everyone has only one graphics card. People do update the graphics card. Why should I rerun setup just to get this done?
And it is quite easy to identify graphics cards, performance is another story. Which one is "high performance" in your eyes?
Launchers are most common in games. Think of League of Legends, Starcraft II, or almost any MMO out there. Before starting the actual game, you have a small launcher app that takes care of updates and patching.
I want to move this direction with a particular non-game application I am developing. The concept of the launcher makes perfect sense: it checks for updates, replaces the appropriate binaries/libraries, maybe runs an integrity check, and launches the application. However, how do launchers update themselves? This tends to be a rare event, but how is it done? Does the launcher literally just write over the very binary it is currently running from? Or is there some kind of swap step after the download? I need to be able to push out (rare) updates to the launcher (especially if I discover some bug in my launcher).
My particular project will be in C#, but I am interested in conceptually similar C++ and/or Java solutions as well for future reference.
I've never tried, but this is what I would guess (assuming you can't overwrite a file being executed. If you can, this is all simpler)
Updater A checks if its the newest version
If launcher isnt the newest version
Download the differences (to save bandwidth) to file B
Apply the delta to own code into file C
Launch file C.
Close
If file C exists (update happened recently)
Try to delete C (update was previous launch, delete temporary file)
If delete fails (We are C, means A is out of date)
Copy C over A (update launcher)
Note that you can keep going, dont have to restart even though we are C.
If game isnt newest version
Download the differences (to save bandwidth) to file B
Apply the delta to game into file D
delete game
Rename D -> game
Run game
André Caron has shown me that the swap trick is done better with transactional file IO.
Basically the launcher checks to see if there is a newer version of it self, and if so kicks off a task to get the new version and then executes it and then closes.
Given the updater app is small and loads up quick, you can have it detect, download, stick up a dialog to say there's a new version, and barely flicker as the old version closes and the new one runs up.
If you are in the .NET world, there is a deployment strategy called 'Click Once'. This was created to solve the problem you have described...
ClickOnce is a deployment technology that allows you to create self-updating Windows-based applications that can be installed and run with minimal user interaction. ClickOnce deployment overcomes three major issues inherent in deployment:
Source: Click Once
Before embarking on this strategy, I suggest researching its pros and cons because there are avid fans and detractors.
Briefly, you upload new versions to a web site (which the application is configured to know about). At start up time, the application checks the site and if there's an update offers the user a dialog. When the user elects to apply the update, the application is stopped and simultaneously a 'click once' component is activated to apply the changes. The component then restarts the executable and this all appears as a seamless operation to the end user...
We are developing a frame application which supports many vendor devices. Devices are installed as a plug-ins within the frame application. But the device plug-ins are not part of control panel-Add Remove programs or MSI installers.
We download the device plugins as a zip file which contains XML data and few DLLs.
What are the recommended solution available in .NET so that whenever there is latest update in the devices, our system can detect and automatically update it through internet.
ClickOnce seems to be black box. We need to inform the customer that there are updates for the list of devices.
One example could be Ubuntu Update manager.
What do you mean ClickOnce seems to be the block box?
ClickOnce can update by asking the user or in the background without the user even knowing about it.
But since you are talking about plug-ins I suggest you take a look at the Managed Extensibility framework, this might be exactly what you need.
Allowing you to support plug-ins easiliy AND deploy updates by using simple zip files with some XML and DLL's as you said.
I think AppLife Update does the job well. Sure, you have to pay for it, but you have to pay a lot less than writing something equivalent from scratch would have cost.
Could it be that you are looking for a package manager?
While well-established in the Python/Ruby/Linux/... eco-system, .NET is bit behind.
There is a short overview (recent) article on InfoQ on package management in .NET.
And Ayende appears to enjoy Nu. It is the first result when searching for .net package management