Sie sind auf Seite 1von 14

2008

Smart Application Launcher & Updater Tool


Developer's Guide
SmartLauncher is a non intrusive application launcher & updater tool. It can update the desired application or the entire local application repository from a remote application repository that is basically on the same LAN network. It is designed to work without having to integrate it during the development process. SmartLauncher provides extensibility to developers in order to implement new repository location types (i.e.: FTP locations)

Serge Bollaerts Do [MORE], do IT better 6/28/2008

Table of Contents
Part I Forewords ................................................................................................................................... 3 Introduction......................................................................................................................................... 3 Goals of this document ....................................................................................................................... 4 Remarks ............................................................................................................................................... 4 Part II Conceptual Analysis ................................................................................................................... 5 Starting SmartLauncher ....................................................................................................................... 5 Supported applications ....................................................................................................................... 5 Update an application ......................................................................................................................... 5 Local and remote repositories ............................................................................................................ 6 Part III Functional Analysis.................................................................................................................... 7 Application start process ..................................................................................................................... 7 From the Start menu ....................................................................................................................... 7 From the launchpad ........................................................................................................................ 7 From MRU shortcuts ....................................................................................................................... 8 Manual update of the application repository ................................................................................. 9 Part IV Technical Analysis ................................................................................................................... 11 Framework architecture .................................................................................................................... 11 Application settings ........................................................................................................................... 11 Deployment Strategy......................................................................................................................... 12 Part V Annexes ................................................................................................................................... 13 My wish list ........................................................................................................................................ 13 Release 1.5 Release notes .................................................................. Error! Bookmark not defined.

Document History
Date Description 01/06/2008 Updated Application Settings Added From MRU shortcuts 28/06/2008 Updated Application Settings Added section Deployment strategy 06/07/2008 Updated Application Settings 25/07/2008 Technical details about the synchronization process

Part I Forewords
Introduction
When you need to ensure the users have the latest version of your programs, several alternatives can be proposed: Manually update the application on each workstation: with ten computers and more, or with the portable of the sales employees, it can quickly become a hell Force the application updates from a deployment server: you need an infrastructure that SMEs usually cannot afford Implement an automatic update in your applications

The latest alternative is the most effective with infrastructures requiring limited needs: Applications can be deployed using xcopy technique A connectivity to the LAN is required

Microsoft proposes the ClickOnce technology, which is just extra for .net developers. One reality of my job is that porting all the application portfolio into .net will take a long time: freezing the applications is not realistic, so they need to be updated and deployed in their native technologies. These old languages (VB 6, Delphi ) do not offer the possibility to update automatically, or propose tools that are not appropriate (i.e.: the Delphi updater module opens remote files in read/write mode, preventing thus many employees from updating an application at the same time). I created a tool that was able to update one specific application or all the applications in one repository at a time. This tool also includes a Launchpad from where users could directly start their applications, instead of having to go to the start menu. The next figure illustrates how your application could be started when using SmartLauncher: a) From the Launchpad integrated into SmartLauncher 1. The entire repository can updated at startup of SmartLauncher b) From the shortcut in the start menu 1. Before executing the desired application, SmartLauncher searches for a new version and install it if found. c) From an unsupported method :(*) 1. A shortcut pointing directly to the application instead of SmartLauncher 2. Executing directly the application without using any shortcut
(*)

The method (c) should be avoided

Goals of this document


This document should help you to understand what SmartLauncher is and how it works. I grouped the information into three main sections: Conceptual analysis Functional analysis Technical analysis

Remarks
English is not my mother tongue: if big grammatical mistakes prevent readers from understanding the content of this document, please feel free to tell me how to improve it!

Part II Conceptual Analysis


Starting SmartLauncher
SmartLauncher can be started in 2 modes: Interactive mode: all the applications1 are updated before the launchpad is displayed o SmartLauncher is started with no arguments Integrated mode: SmartLauncher process in placed before the target application is started o SmartLauncher is started with the name/path of the target application(A)

(A)

The target application must be located in one of the subfolders of the location of SmartLauncher. The folder containing SmartLauncher is considered as the root of the local repository.

Supported applications
In SmartLauncher terminology, an application is a file whose extension is displayed in the Launchpad. By default, only .exe files are considered as supported by SmartLauncher: this is managed through the application setting IncludeExt. This version of SmartLauncher is limited to applications that could be deployed by using xcopy commands. This means that: One application folder should contains all necessary components, or applications should rely on system components deployed in the Global Assembly Cache Installation of applications requiring additional steps to the xcopy wont work: o Installing a service with the installutil.exe tool o Installing an ActiveX component with the regsvr32.exe tool o Post-install configuration o

Update an application
In interactive mode, the entire repository is updated before the user can start an application. In integrated mode, only the target application is updated if needed. The following figure illustrates how applications are updated.

In this document, I will use the term repository to designate all applications located in the same directory and that can be updated with this tool.

Local and remote repositories


In SmartLauncher the repository is the root folder containing all applications that could be updated and/or launched by the tool: The files in the root folder are not updated: these files are system files (that is, SmartLauncher and its documentation) Subfolders use to represent an application or a group of applications. The repository tree is reproduced in the start menu. The name of the shortcuts is the product name (Refer to FileInfoVersion and AssemblyInfo in the MSDN documentation) or the executable name if no product name found.

Synchronizing repositories consists of: Determining files to be copied locally (new file, new version) or to be deleted locally (file does not exist anymore). Create or remove shortcuts in the start menu When the process is finished, empty directories are removed

Part III Functional Analysis


Application start process
From the Start menu SmartLauncher is executed in integrated mode, that is, it will check for available updates for the target file only. When the user double-clicks on the shortcut, SmartLauncher is started with the target file to be executed SmartLauncher starts the update process in integrated mode (updates only the requested files) The Synchronize Engine checks for the following actions to be carried out o New files to be copied o Existing files to be updated o Old files to be deleted Before synchronizing files, a backup is done: after a successful update, the backup is delete, otherwise it is restored The target file is started

From the launchpad When SmartLauncher is started in interactive mode, the application repository is entirely updated before the launchpad is shown. In that screen, only supported applications are displayed.

When the user double-clicks on an application, it is directly started. From MRU shortcuts SmartLauncher memorizes the last 10 applications that have been started by the user. For each of these applications, a shortcut is created under the File menu and on the toolbar. This is particularly interesting when the repository contains a lot of programs while each user uses to work with only few of them.

From the system tray icon If the application is put into the system tray, users can also start most recent applications through the contextual menu:

And finally, the contextual menu on the system tray icon includes the complete repository tree:

Manual update of the application repository In interactive mode, the user can(*) ask for a manual update of the repository.

(*)

This feature can be disabled by changing the values of these application settings:

BasicMode = False Display only the launchpad UserExperience = False Prevent user from switching from basic to advanced mode

Part IV Technical Analysis


Framework architecture
The following figure illustrates the main objects of the framework:

There are 3 engines: RepositoryEngine: scans the content of the local or remote repository SyncEngine: compares the content of the local and remote repository, and synchronize them ShellEngine: Updates shortcuts in the Start menu

The items that are manipulated by theses engines are: RepositoryItem: represent a file SyncItem: represent a local and/or a remote file to be synchronized ShellShortcut: represents a shortcut in the Start menu

Application settings
Setting IncludeExt ShellHome WindowState ToolbarVisible StatusbarVisible InformationVisible ViewMode Scope Application Application User User User User User Description Files types to display in the Launchpad Name of the root folder in the start menu Main forms window state Show the toolbar? Show the status bar? Show the information (sidebar)? View mode of the list

RepositoryHome ExcludeExt HideWhenMinimized ConfirmExit GroupApplications MruList AutomaticBackup UpdateOnStart UpdateOnLaunch ShowOptions BasicMode UserExperience Icon LogEnabled LogSize LogRotation SendBugReport SmtpHost SmtpPort SmtpFrom SmtpTo AllowShortcuts HelpFile

Application Application User User User User User User User Application User Application Application Application Application Application Application Application Application Application Application Application Application

ShowAbout Application LowConnectivityAsyncUpdate Application

SelfUpdateSilent SelfUpdateEnabled CreateSmartLauncherIcon

Application Application Application

LowConnectivityAsyncUpdate Application

ShowMRU

Application

Path to the remote repository File types to exclude from the synchronization Move the application in the system tray Ask the user to confirm when he wants to quit Show application groups List of the most recent applications launched Backup local repository before sync? Yes, No, Ask Launch the repository synchronization on startup When starting an application from the launchpad, update it before if needed Show the Options menu item Define if the tool is displayed in basic mode or advanced mode Specify if users can change the view mode (basic or advanced) Icon to be displayed: it is case-sensitive Specify if the logging feature is activated Size of each log file in Kb Number of log files Specify if the bug report must be sent Host name of the SMTP server Port of the SMTP server Email address of the sender Email address of the receiver Let the user create managed shortcuts Help filename: if present (and file has been found), menu entry Help\Help is visible Show the AboutDialog box When UpdateOnStart, low connectivity issues are detected: in case of low connectivity, the automatic update may be skipped if this value is set to True Determine if SmartLauncher should update itself silently or prompt the user to confirm the update Determine if SmartLauncher should check for a new version of itself Determine if SmartLauncher will create an Icon in the start menu Determine if SmartLauncher should update the repository at startup asynchronously in case of low network connectivity is identified Display most recent files on the toolbar and File menu

Deployment Strategy
As you might have noticed, SmartLauncher is a tool that will be useful in enterprises, where an IT team has to challenge with applications deployment. The deployment strategy behind the use of SmartLauncher is quite easy: Applications are grouped into folders (repositories) Each repository is copied locally through SmartLauncher

There is one copy of SmartLauncher per Repository (i.e.: DEV, TEST and PROD repositories)

Assuming the preceding scenario, you might want to have the full control on how to use SmartLauncher by defining the configuration and preventing users from changing it. In this case, you will: Set the configuration settings Set the title and icon of SmartLauncher (in case you have to cope with multiple instances because of multiple repositories) Set ShowOptions=False, so that users cannot change the settings Optionnally, prevent users from choosing the user experience o Set BasicMode to True or False o Set UserExperience to False

Part V Annexes
My wish list
This section provides all ideas I had or that were suggested to me: they might be included in one of the next releases: Easy way to specify an external icon that is not embedded into SmartLauncher. In general, try to create a kind of add-in (or extensibility library) in order to limit impacts (and reconfiguration) when downloading and installing a new version of SmartLauncher Synchronize from an FTP location. By extension, be able to synchronize from any type of location o Use a factory design pattern on RepositoryEngine object, or find out a way to develop a RepositoryEngineProvider o Externalise the engine interface contract into a separate library, so that new engine types can be developed externally (How to and reference in the config file?) As part of the extensibility feature, be able to override the about box (?) o The real question is What should be embedded in the source code (thus requiring compilation after having downloaded the latest source code), and what should be externalized? I should say all code that is not part of the core system should be externalized Implement Other favorites: shortcuts to external windows applications (i.e.: Word) or Web application (i.e.: intranet portal) Support for other languages: at least French and Dutch Only English for technical information (log, bug report) Prompt before replacing some user data files. During the Synchronization process, some files might not be updated. The quickest way should consist in defining a AskExt config setting: it represents files extensions that are synchronize if the user answered yes to the question

Would you like to replace this file? Another way should be to include wild cards (as the first alternative), but also complete file paths. Pre-install and post-install processes: without starting a huge development, are there small issues that could be addressed with a limited version of this concept? o Maybe a hidden system directory containing executables that are responsible for detecting what they must do: each binary could be started into an alphabetic order

Das könnte Ihnen auch gefallen