This shows you the differences between two versions of the page.
user:mgough:deployment [2011/05/19 00:47] – created mgough | user:mgough:deployment [2011/05/19 00:47] (current) – mgough | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ======Windows Software Deployment====== | ||
+ | =====Objectives===== | ||
+ | |||
+ | To explain how to deploy, create and installer, and patch software released to the public. | ||
+ | |||
+ | =====prerequisites===== | ||
+ | |||
+ | 1) Software to deploy | ||
+ | 2) Microsoft Windows Operating system | ||
+ | 3) Microsoft Visual Studio | ||
+ | 4) Web server for hosting the software | ||
+ | |||
+ | =====Background===== | ||
+ | |||
+ | If you are a programmer, you will eventually get to the point where you have a wonderful piece of software that you want to share with the world. | ||
+ | you can zip up all the files and post that on the web, but your software will not show up in the user's start menu, or have shortcuts automatically placed on the desktop, which is what people are used to and expect. | ||
+ | |||
+ | While installing the software, it is also of critical importance to perform a check for dependencies, | ||
+ | you write on your computer works, does not mean everyone else is working with the same environment. | ||
+ | |||
+ | In addition to deployment, there should also be an easy way to keep the released software up to date without having the user manually uninstalling the old version and reinstalling the new version. | ||
+ | |||
+ | Determining the need to patch software can be done in a few ways, from the user manually checking for updated versions, ex: help-> | ||
+ | for developers in that it takes the human element out of it, but there are many privacy concerns. | ||
+ | |||
+ | =====Procedure===== | ||
+ | |||
+ | Again, like any other project, planning and documenting your steps is key to success. | ||
+ | computer in an unorganized fashion it will make installation on remote machines all the more difficult. | ||
+ | |||
+ | Determine what you want installed, of course you want the application and it's dependencies installed, but you also may want to install a license text file, a readme html file etc.. | ||
+ | |||
+ | ====Step 1:==== | ||
+ | |||
+ | Fire up Microsoft Visual Studio and start a new project: File-> | ||
+ | |||
+ | Here you will be presented with a number of project types, including C++, C#, Visual Basic (blegh...) and possibly others depending on your development environment. | ||
+ | |||
+ | In the tree you will find an option called "Setup and Deployment" | ||
+ | |||
+ | From the choices offered, select the "Setup Project", | ||
+ | |||
+ | You will now be presented with the file system editor which consists of two windows, one is the file system on the target machine, and the other is the file system on your local machine. | ||
+ | |||
+ | ====Step 2:==== | ||
+ | |||
+ | Next, we want to set up our installer file properties. | ||
+ | many more - this is your place to take credit, so fill it all out! | ||
+ | |||
+ | Step 3: | ||
+ | |||
+ | Now we need to start building up the file architecture for installation on the remote machine. | ||
+ | |||
+ | Right click on your project name in the solution explorer and select view-> | ||
+ | |||
+ | Right click on the " | ||
+ | |||
+ | Repeat and add any dependant files required, such as images, readme files, and the like. | ||
+ | |||
+ | ** Your project will most likely require an icon, select it now as well by right clicking on the application folder and choosing add-> | ||
+ | |||
+ | ====Step 4:==== | ||
+ | |||
+ | We will now set up shortcuts to the application that will be installed in the start menu, or on the desktop. | ||
+ | |||
+ | Right click on the right window of the file systems. | ||
+ | |||
+ | Select the application folder and choose " | ||
+ | |||
+ | To supply an icon to the shortcut, select the new shortcut just created, in the properties window you can then select an icon - click " | ||
+ | |||
+ | If you would like to put a shortcut in the start menu, use the same procedure except choose the " | ||
+ | |||
+ | Easy eh? | ||
+ | |||
+ | ====Step 5:==== | ||
+ | |||
+ | If your project requires a dependency, such as DirectX if it is a 3d game, we must check to see if that dependency is met. | ||
+ | |||
+ | This is pretty simple too, again, it requires planning. | ||
+ | |||
+ | Select the Launch Conditions tab: | ||
+ | |||
+ | You will see the following displayed: | ||
+ | |||
+ | Requirements on Target Machine | ||
+ | Search Target Machine | ||
+ | | ||
+ | Property = DIRECTXVERSION | ||
+ | RegKey = Software\Microsoft\DirectX | ||
+ | Root = | ||
+ | Value = InstalledVersion | ||
+ | Launch Conditions | ||
+ | Check for DirectX 9.0 (assuming a MINIMUM version of DirectX 9 is needed) | ||
+ | Condition = DIRECTXVERSION = 9 | ||
+ | InstallUrl = (leave blank) | ||
+ | Message = Direct X Version 9.0 or later is required. | ||
+ | |||
+ | Your installer will now check for a minimum installation of Directx v9.0. If it is not found, the installer will exit displaying an error message of " | ||
+ | |||
+ | |||
+ | ====Step 6:==== | ||
+ | |||
+ | Let's build it! | ||
+ | |||
+ | This is by far the easiest step. | ||
+ | |||
+ | On the top menu select " | ||
+ | |||
+ | You will be presented with output simlar to this: | ||
+ | < | ||
+ | ------ Starting pre-build validation for project ' | ||
+ | ------ Pre-build validation for project ' | ||
+ | ------ Build started: Project: Setup4, Configuration: | ||
+ | Building file ' | ||
+ | ========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ========== | ||
+ | </ | ||
+ | You now have an installer that will have the ability to repair an installation, | ||
+ | |||
+ | Congrats!! | ||
+ | |||
+ | |||
+ | =====References===== | ||
+ | |||
+ | Technical documentation: | ||
+ | |||
+ | Free Visual Studio Express: http:// |