سؤال

I'm looking at our current method of creating installation packages and quite frankly it's a bit of a mess with a large scope for human error.

We currently use InstallShield, but to get the files ready for the package, there is a lot of copy and pasting at release time and we're never quite confident that all files/dependencies are included within the installer.

Does anybody know of any standard way of managing this process, both from a workflow and tool point of view?

i.e. should we be updating the installer after every commit into source control, is there a way to automate this?

هل كانت مفيدة؟

المحلول

to get the files ready for the package, there is a lot of copy and pasting at release time

When it comes to "copy/pasting" files, there is almost nothing you cannot encode into a script (you have to pick a scripting language, maybe the shell script language of your OS - let me guess, its MS Windows - maybe a more modern scripting language like Powershell or Python, whatever you prefer). And if you need to manipulate files during this process (for example, to increase a version number or change a GUID within a file), create some tools which do this for you.

Most modern installer frameworks (I guess Installshield, too), will allow you to automate the creation of a package. So all these steps can be included into the build process on your CI server, just as the standard compilation build you already have there implemented. How often you let the server run the automated packaging is up to you, it will surely depend on how long the process takes for your software, and how quick you need feedback if that part of the build breaks.

we're never quite confident that all files/dependencies are included within the installer

Somewhere, somewhen you will have to test the installation, and that includes running the programs after installation. You have to decide if you need to automate that part of the process, too, or if a manual test is sufficient (that will probably depend on your deployment frequency and the frequency your dependencies change). If you decide to automate the installation test, you could provide a "UI free testing mode" in your application. When this mode is activated, it just checks if all needed dependencies are fulfilled (and writes a logfile, or returns an error code if not). That will be something your CI server can check for.

However, the last step might need some effort, if you want to test the installation always in a clean production-like environment (and not in an development-like environment). Utilizing a virtual machine might be a possible approach here. You have to decide if its worth the effort for your situation.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى softwareengineering.stackexchange
scroll top