Smart Application Launcher & Updater Tool: Developer's Guide
Smart Application Launcher & Updater Tool: Developer's Guide
Smart Application Launcher & Updater Tool: Developer's Guide
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
(*)
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!
(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.
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
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
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
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