Writing Installers - PowerPoint PPT Presentation

1 / 92
About This Presentation
Title:

Writing Installers

Description:

CVS integration. Transforms. Can modify an MSI by creating a Transform ... CVS Pros. Allows for collaboration when binaries are not shareable' due to license ... – PowerPoint PPT presentation

Number of Views:55
Avg rating:3.0/5.0
Slides: 93
Provided by: nerc1
Category:

less

Transcript and Presenter's Notes

Title: Writing Installers


1
Writing Installers
  • And the women who love them.
  • Installer Writing in 92 easy slides

2
Overview
  • What is installer writing?
  • Windows installers
  • Mac OS installers
  • The workflow
  • Opportunity for questions after each section.

3
Why write installers?
  • Set defaults, servers, bookmarks
  • Disable/remove components and features
  • Add components
  • (plug-ins, readme, license)

4
Example Netscape 4.78
  • Custom Bookmarks
  • MIT Site Certificate
  • MIT Network Prefs (mail servers etc.)

5
How To Write An Installer
  • Capture existing installer
  • Prune the detritus
  • Customize
  • Test
  • Debug
  • Repeat

6
Questions?
  • We will discuss Windows next

7
Windows
8
Executable Installers (.EXE)
  • A self-extracting executable with file copy and
    registry capabilities.
  • Wise InstallMaster is what we have used in the
    past at MIT

9
Wise InstallMaster
  • Uses WiseScript scripting language
  • Has built-in commands for
  • Installing files
  • Creating shortcuts
  • Editing registry, etc.

10
WiseScript Screenshot
11
WinZip 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)

12
WinZip SE Screenshot
13
WinZip SE Installing
14
Windows Installer (MSI)
15
What is Windows Installer?
  • Windows Installer engine
  • Installation database (.MSI file)

16
Windows Installer Engine
  • standard installation mechanism for Windows
  • Windows installer service is the "execution
    engine" for setup scripts that authoring tools
    generate.

17
Installation 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

18
MSI 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.

19
WfWI Expert (Add/Remove)
20
WfWI Setup (Shortcut Table)
21
How 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

22
MSI Installer Wizard
23
Advantages of MSI
  • Windows Installer tracks installed components
    automatically
  • Rollback for failed installs
  • Auto-repair (no maintenance)
  • No duplicate files or missing DLLs

24
Component Tracking
  • A component is a file or feature
  • Component identifiers are global
  • Identifiers are shared across products
  • Identifiers are unique

25
Component Tracking
  • Sharing components between programs means
  • Less wasted space
  • Fewer opportunities for confusion
  • No duplicate files
  • (all for programs that use the same component)

26
No 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

27
Rollback
  • 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

28
Add/Remove Programs
  • Modify features
  • Repair
  • Uninstall

29
Add/Remove Programs
30
Maintenance Dialog
31
Modify (Features) Dialog
32
Before 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

33
WfWI Expert (Add/Remove)
34
Add/Remove Programs
35
Self-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

36
Administrative features
  • Transforms
  • Advertisement
  • CVS integration

37
Transforms
  • 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.)

38
Transform 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

39
Transform 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

40
Advertisement
  • Advertised features appear as normal, but arent
    installed.
  • Feature is installed on-the-fly first time its
    used
  • Example Spelling Checker

41
Advertisement 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

42
Advertisement Cons
  • Takes time to install when user expects quick
    response (1st time only)
  • If used with Active Directory, network connection
    required

43
CVS Integration
  • CVS is the Concurrent Versions System
  • Convert MSI to XML text format
  • Check In / Out

44
CVS 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

45
CVS Cons
  • Adds overhead to development cycle
  • Steepens learning curve for new writers
  • Windows-based file versioning may be easier or
    more useful

46
Questions?
  • We will discuss Mac OS next

47
Mac OS 8 9
  • (Mac OS Classic)

48
Mac OS Classic Installs
  • Disk images (.img)
  • Mindvision VISE

49
Mac 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

50
Mac 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

51
Mindvision 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

52
Mac 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

53
Mac OS X
54
Mac OS X Install Options
  • Many options to install software under OS X
  • Device Images (.dmg)
  • Packages (.pkg)
  • Mindvision VISE

55
Device 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

56
DMG 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

57
DMG Tool Screenshot
58
Packages (.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

59
Packages (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

60
PackageMaker Screenshot
61
Mindvision 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

62
Mindvision VISE
63
Mindvision VISE
  • Creates EXE-style program installers
  • Create one installer for 9/X
  • High degree of control
  • Network installs

64
Fetch 4.0.3 Main Install
65
VISE 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

66
Mindvision 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)

67
VISE Built-in Actions
  • VISE works by creating a list of actions
  • Install file
  • Make alias
  • Edit text file
  • Jump to another action

68
Fetch 4.0.3 Actions
69
Fetch 4.0.3 Exists Dialog
70
VISE Packages (Install sets)
  • You can create multiple sets of files
  • Full
  • Minimal
  • Custom
  • Uninstall

71
VISE 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)

72
VISE 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

73
Shell Script TSM Nodename
74
VISE - 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

75
Questions?
  • We will discuss the Workflow next
  • (last section - almost there!)

76
Workflow
  • Integrating the development process

77
Overview
  • The development cycle
  • Working with the test process
  • How many writers?
  • Standards

78
The 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

79
The 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

80
The 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)

81
Working 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.

82
One installer writer or many?
  • How many installers do you write?
  • How much time do you have?
  • How important is consistency?

83
How 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.

84
Assistant Writers (Pros)
  • Less expensive in resources
  • (only hired for job, or volunteers)
  • More installers can be worked on during busy
    periods

85
Assistant Writers (Cons)
  • Takes time to teach each person
  • Less time is needed for returning helpers
  • Maintaining a consistent user experience becomes
    more difficult

86
Is 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?

87
Multiple 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

88
Multiple 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.

89
Standards
  • 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?

90
Standards
  • 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.

91
Standards
  • 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

92
Slide 92 - Thats It I Promise!
  • Questions?
  • Atticus Gifford
  • atticus_at_mit.edu
Write a Comment
User Comments (0)
About PowerShow.com