Title: Writing Installers
1Writing Installers
- And the women who love them.
- Installer Writing in 92 easy slides
2Overview
- What is installer writing?
- Windows installers
- Mac OS installers
- The workflow
- Opportunity for questions after each section.
3Why write installers?
- Set defaults, servers, bookmarks
- Disable/remove components and features
- Add components
- (plug-ins, readme, license)
4Example Netscape 4.78
- Custom Bookmarks
- MIT Site Certificate
- MIT Network Prefs (mail servers etc.)
5How To Write An Installer
- Capture existing installer
- Prune the detritus
- Customize
- Test
- Debug
- Repeat
6Questions?
- We will discuss Windows next
7Windows
8Executable Installers (.EXE)
- A self-extracting executable with file copy and
registry capabilities. - Wise InstallMaster is what we have used in the
past at MIT
9Wise InstallMaster
- Uses WiseScript scripting language
- Has built-in commands for
- Installing files
- Creating shortcuts
- Editing registry, etc.
10WiseScript Screenshot
11WinZip Self-Extractor
- WinZip Self-Extractor (SE)
- Used on Netscape 6 which was a SETUP.EXE with
external files - Used on TSM 5.1.5 which was MSI, but used
external files that needed to be delivered with
it (transforms, binaries)
12WinZip SE Screenshot
13WinZip SE Installing
14Windows Installer (MSI)
15What is Windows Installer?
- Windows Installer engine
- Installation database (.MSI file)
16Windows Installer Engine
- standard installation mechanism for Windows
- Windows installer service is the "execution
engine" for setup scripts that authoring tools
generate.
17Installation Database
- File with a .MSI suffix is database which
contains all the info about the installation - Binaries (these can be external as well)
- User interface (like dialogs)
- This is what Wise for Windows Installer generates
18MSI Features
- One feature Features!
- Can subdivide groups of files as features to be
installed separately - Example Language packs with alternate
dictionaries, text files etc. - Also contains standard features like shortcuts,
custom dialogs etc.
19WfWI Expert (Add/Remove)
20WfWI Setup (Shortcut Table)
21How an MSI Works
- When MSI is opened, Windows Installer checks to
see if its already installed - Each MSI has a unique 32-digit ID
- IDs are stored for installed programs
- If not installed, archives MSI in Windows
directory and runs it
22MSI Installer Wizard
23Advantages of MSI
- Windows Installer tracks installed components
automatically - Rollback for failed installs
- Auto-repair (no maintenance)
- No duplicate files or missing DLLs
24Component Tracking
- A component is a file or feature
- Component identifiers are global
- Identifiers are shared across products
- Identifiers are unique
25Component Tracking
- Sharing components between programs means
- Less wasted space
- Fewer opportunities for confusion
- No duplicate files
- (all for programs that use the same component)
26No More DLL Hell
- Well, less anyway.
- MSI can also do the right thing when a product is
uninstalled - Decrement components reference count
- (how many programs are using it)
- If count is 0, actually remove file
27Rollback
- File tracking also allows rollback (undo)
- In a failed or aborted installation
- Restores deleted files and registry settings
- Adds to overall robustness of installers with no
extra work
28Add/Remove Programs
- Modify features
- Repair
- Uninstall
29Add/Remove Programs
30Maintenance Dialog
31Modify (Features) Dialog
32Before Windows Installer
- Installers responsible for putting their info in
Add/Remove control panel. - Requires adding registry entries
- Only works if program does it correctly
- Creating errors in Registry can cause ARP to
function incorrectly
33WfWI Expert (Add/Remove)
34Add/Remove Programs
35Self-Repairing
- Besides manual repair in ARP, auto-repairs key
files - Checks for key files on application launch
- If files are missing, archived MSI is opened to
automatically repair the install
36Administrative features
- Transforms
- Advertisement
- CVS integration
37Transforms
- Can modify an MSI by creating a Transform
(non-destructive) - Saves only the differences from base MSI in .MST
file - Changes can be almost anything in MSI database
(dialogs, tables etc.)
38Transform Pros
- Allows for several versions of same MSI for
different labs - Simple means of customizing vendor MSI while
retaining upgradeability - Example Installing foreign language support and
removing useless features
39Transform Cons
- Can be confusing for users
- Two files that must be opened correctly
- Can be circumvented by users
- Just run the base MSI instead
- Creates support for multiple versions
40Advertisement
- Advertised features appear as normal, but arent
installed. - Feature is installed on-the-fly first time its
used - Example Spelling Checker
41Advertisement Pros
- Only requires space for the registry entries and
Start menu shortcuts - Easy way to make available a large number of
applications that most users may never use. - Works with Active Directory
42Advertisement Cons
- Takes time to install when user expects quick
response (1st time only) - If used with Active Directory, network connection
required
43CVS Integration
- CVS is the Concurrent Versions System
- Convert MSI to XML text format
- Check In / Out
44CVS Pros
- Allows for collaboration when binaries are not
shareable due to license - Collaboration can be done with standard
development infrastructure - Sourceforge.net becomes a possibility
45CVS Cons
- Adds overhead to development cycle
- Steepens learning curve for new writers
- Windows-based file versioning may be easier or
more useful
46Questions?
- We will discuss Mac OS next
47Mac OS 8 9
48Mac OS Classic Installs
- Disk images (.img)
- Mindvision VISE
49Mac OS Classic Disk Images
- Can deliver software on a mountable (or
self-mounting) disk image - Requires that software be drag-and-drop (i.e. no
install-time customization) - Confuses some users used to VISE
- More users understand now that OS X uses so many
disk images
50Mac OS Classic VISE
- Standard is Mindvision's VISE
- Used by Apple for many of their OS 8/9 installers
- VISE Installer can
- Install files and remove old ones
- Run custom scripts
51Mindvision VISE Pros
- Allows for detailed customization
- Users are used to the interface
- Can generate one installer for
- Mac OS 7.1 - 9.x
- Mac OS X
52Mac OS Classic Future
- Mac OS 9 is no longer being developed
- As long as it is supported, we have little reason
to deviate from standards - Since VISE is current method, we will likely use
it until OS 9 is de-supprted
53Mac OS X
54Mac OS X Install Options
- Many options to install software under OS X
- Device Images (.dmg)
- Packages (.pkg)
- Mindvision VISE
55Device Images (.dmg)
- Apple's primary method for basic software
distribution - double click mounts disk image on desktop
- drag and drop files from mount to applications or
other location - .dmg is not compatible w/ Mac Classic, so some
use .img
56DMG Tool
- Several free tools to make disk images
- DMG Tool is what weve used
- Front-end to apples command-line
- Create .dmgs from a folder or disk
57DMG Tool Screenshot
58Packages (.pkg)
- Apple's means of delivering more complex
installations - Similar to Windows Installer in that .pkg uses
OS-level engine to create script from database - Is free and fairly simple to use
- Not as much control as VISE, and not supported
under Classic
59Packages (howto)
- Good for installing one directory of files to an
unusual location - e.g. /System/Library/Preference Panes/
- PackageMaker comes with Dev Tools
- Often used in conjunction with .dmgs
60PackageMaker Screenshot
61Mindvision Filestorm Pro
- New product from Mindvision that creates
package-like installers - Allows for more flexibility than Apples package
maker - Allows you to create disk images easily
- Only for OS X
62Mindvision VISE
63Mindvision VISE
- Creates EXE-style program installers
- Create one installer for 9/X
- High degree of control
- Network installs
64Fetch 4.0.3 Main Install
65VISE Single 9/X Installer
- Can create one Carbon installer for both Classic
and X - Keeps things simple for your customers
- Allows you to ship one installer even if the
vendor uses two - Best solution while still supporting Classic
66Mindvision VISE Control
- VISE offers the greatest control over the install
process - Built-in actions
- Various install sets if you like
- Custom code
- Shell scripts (OS X only)
67VISE Built-in Actions
- VISE works by creating a list of actions
- Install file
- Make alias
- Edit text file
- Jump to another action
68Fetch 4.0.3 Actions
69Fetch 4.0.3 Exists Dialog
70VISE Packages (Install sets)
- You can create multiple sets of files
- Full
- Minimal
- Custom
- Uninstall
71VISE Custom Code
- Small piece of code written in C/C
- Compile as a shared library or CODE resource
(Metrowerks CodeWarrior) - Can do anything a Mac OS program is capable of.
- Eudora import wrote copy routine that checks for
available space (unlike VISE)
72VISE Shell Scripts
- For OS X only
- You can run any standard shell script as a custom
action in VISE 8 - Anything from the command line works
- TSM Nodename Wrote a shell script to import
server settings for upgrades from older version
of client
73Shell Script TSM Nodename
74VISE - Network Installs
- Small downloadable installer that contains
- User interface
- Configuration options
- Only downloads requested components
- Reduces the size of installers, but requires a
network connection
75Questions?
- We will discuss the Workflow next
- (last section - almost there!)
76Workflow
- Integrating the development process
77Overview
- The development cycle
- Working with the test process
- How many writers?
- Standards
78The Development Cycle
- After writing the first version of the installer
(Beta 1), there is a cycle - Publish installer to team or test group
- (Include changes made to program)
- Gather results
- Fix bugs and add functionality
- Lather, Rinse, Repeat
79The Development Cycle
- How long should the cycle be?
- Varies, but 1-2 weeks is average
- Depends on availability of testers
- Too much testing bores the testers
- Too little testing wastes your time
80The Development Cycle
- Establish a naming convention
- We use Beta X for partially-complete installers
- Be sure to set expectations for functionality
- Final Candidate X installers are nearly ready
- Usually just need a new readme (until bugs are
found)
81Working with the Test Process
- External testers avoid Tunnel-Vision
- For more information about testing and working
the cycle see Deb Bowsers presentation after
this one.
82One installer writer or many?
- How many installers do you write?
- How much time do you have?
- How important is consistency?
83How Many Installers?
- It takes our release efforts approximately 6-8
weeks to release - I work on the installer for most of that
- While waiting for test results I can work on
other installers, but no more than 3 efficiently.
84Assistant Writers (Pros)
- Less expensive in resources
- (only hired for job, or volunteers)
- More installers can be worked on during busy
periods
85Assistant Writers (Cons)
- Takes time to teach each person
- Less time is needed for returning helpers
- Maintaining a consistent user experience becomes
more difficult
86Is Consistency Important?
- Presenting a unified consistent interface reduces
Help Desk calls - Increases customer confidence If one installer
works well, similar ones will also - What we do is somewhat mysterious to some
customers, so confidence is important - Do customers have to learn each installer?
87Multiple Writers at MIT
- We have experimented with student helpers and
other volunteer writers - It takes the volunteer a significant amount of
time to learn the tools - For minor overloads, it isnt time-effective
- Difficult to maintain consistent end-user
experience
88Multiple Writers at MIT
- Many other teams have their own installer writers
- If we support more products, we will have to
expand to a larger model - When the time comes, standards are key to
maintaining consistency.
89Standards
- Many questions arise
- Should we move the users files?
- Should we offer to be intelligent?
- Where do we strike the balance between control
and freedom?
90Standards
- We have tried to be hands-off in our installer
writing - Only move files when necessary, and always keep
the user well informed in direct, non-threatening
dialogs. - For some environments, this is not appropriate
- Labs, specific business departments, etc.
91Standards
- Other issues arise how to deal with upgrades?
Support only our versions? - It is important to develop standards on these
issues early - Even with one writer, transitioning the job
should be seamless for the customers
92Slide 92 - Thats It I Promise!
- Questions?
- Atticus Gifford
- atticus_at_mit.edu