Google Desktop
 Google Desktop Plug-In Installer Developer Guide

For Users
  Download Plug-ins
  Desktop Search Forum

For Developers
  Plug-in Development
  Download SDK
  Developer Guide
    Index API
    Query API
    Display API
      Script API
      Communication API
      Plug-in Design Guidelines
      Plug-in Tutorials
        Using Wizard
        Using Helper Framework
        Using ActiveX
    Action API
    Event API
    Plug-in Installer
  Submit Software
  Developer Forum
  Desktop Blog

Contents

Getting Started

As described elsewhere in this Developer Guide, you can create Google Desktop (GD) Sidebar plug-ins using the Display API. This document describes how to use the GD Plug-in Installer to simplify the plug-in development process. The Plug-in Installer generates an Microsoft Installer (MSI) package for GD Display plug-ins. This tool is also used to create install packages for plug-ins developed using scripting languages.

For non-script-based plug-ins, you do not have to use the Plug-in Installer. However, if you do, it will handle writing the code needed to register your plug-in with Google Desktop as well as the code needed for installation/removal (i.e. copy/remove files, register Windows components, etc.).

You will have already downloaded the Google Desktop Developer SDK in order to write your plug-in. To use the Plug-in Installer, you must also download the WiX (Windows Installer XML) toolkit from http://wix.sourceforge.net. The Plug-in Installer uses WiX to generate an MSI installer package, which will contain all the code necessary to register your plug-in with Google Desktop.


The Plug-In Configuration File

You define your plug-in's installer by writing an XML configuration file with a .gdp extension. This file consists of a <Plugin> element, its properties, and a non-zero number of <File> sub-elements. For example:


<Plugin 
  Name="My Plug-in"
  Script="true"
  UsesNotifier="true"
  Description="Enter Description Here"
  RequiredGoogleDesktopVersion="3.2005.1111.923"
    
  Icon="C:\myicon.ico"
  CLSID="YOURCLSID-A479-4197-9898-9083A6b00A86"
  AboutUrl="http://mycompany.com"
  Contact="name@mycompany.com"
  UpdateUrl="http://mycompany.com/update"

  Type='Display'
  Version="1.0.0.0"
  Publisher="My Company"
>

  <File Src="plugin.js" Main="true" />
  <File Src="images\img.jpg" />
  <File Src="1033\string.js" />

</Plugin>              

The top-level <Plugin> element's properties specify your plug-in's properties. The following table lists and explains all the available properties.

Property Description Required
Name Your plug-in's name, used anywhere your plug-in is listed, such as in Sidebar Add/Remove panels, Windows Add/Remove Programs, or the GD Preferences page. Yes
Description Short description of what your plug-in does. Yes
RequiredGoogleDesktopVersion In order to be installed the plug-in will require at least this version of Google Desktop. This attribute is necessary for cases when certain features used by the plug-in are not available in older Google Desktop installations; in such situations the Plug-in Installer warns the user and aborts the plug-in installation. The Google Desktop version is available in the registry unde HKLM\Software\Google\Google Desktop\installed_version. Yes
CLSID Your plug-in's unique CLSID in string format. This can be generated using external tools such as uuidgen.exe. Yes
Type List of comma separated values specifying your plug-in's registration type(s). Allowed values are 'Display' (for Sidebar plug-in registration), 'Event' (for Event API registration), and 'Query' (for Query API registration). Yes
Version Your plug-in's version. Yes
Publisher A string specifying the plug-in's creator Yes
Icon The .ico icon used by your plug-in in the Windows Add/Remove Panel. If not specified, the Google Desktop icon will be used. No
Script If this is a script plug-in, set this property to true. The default value is false. No
UsesNotifier Set to true if the Sidebar plug-in uses notifications. The default value is false. No
AllowModifyIndex Set to true to allow modification of the index (e.g. removing items from the index). Used in conjunction with the Query API. The default value is false. No
AboutUrl URL for a page describing your plug-in in detail. No
UpdateUrl URL for a page where users can download future updates to this plug-in. No
Contact Email address for a plug-in support contact. No

Use the <File> elements to list your plug-in's required files. At least one file must be specified. The following table lists and explains all the available <File> properties.

Property Description Required
Src Specifies the file's source path relative to the .gdp configuration file. Yes
Main Specifies your plug-in's main file/module that will be registered as its entry point. This file should implement the required interfaces to interact with Google Desktop. One and only one of the <Plugin> element's <File> elements must have this attribute. If no elements have this attribute, you'll see an error message when you process the XML file. No

Back to top

Running the Plug-In Installer

The Plug-in Installer is a simple command line executable, found in the tools subdirectory of the Google Desktop SDK. The following usage example shows its available command line options:

C:\Google\SDK>GoogleDesktopPluginInstaller.exe -?
Google Desktop Plug-In Installer
Copyright (C) Google 2005. All rights reserved.

usage:  GoogleDesktopPluginInstaller.exe [options] gdpConfigFile

-wxs      generate a .wxs file
-msi      generate a .msi file (default)
-?        this help information

This tool requires the WiX compiler (http://wix.sourceforge.net)
For more information see http://desktop.google.com/plugins            

You can create your plug-in's .msi executable file in either of two ways:

  • The simplest is to have the WiX toolset executables in your PATH and run GoogleDesktopPluginInstaller.exe on your .gdp XML configuration file with the default -msi option. This generates a .msi file with the same name as your configuration file.

  • Or, you can run GoogleDesktopPluginInstaller.exe on your .gdp XML configuration file with the -wxs option. This generates a .wxs Windows Installer XML Source file.

    You then use this file as input to the WiX compiler, candle.exe;
    C:\Google\SDK>candle.exe foo.wxs

    This generates the file foo.wixobj, which you run the WiX linker, light.exe on to generate the .msi executable;
    C:\Google\SDK>light.exe foo.wixobj

    Why do all this instead of the simple method? Because this way you have the opportunity to update the .wxs file with additional information for more complex plug-ins before creating your executable. For example, you can add registry entries and custom install actions specific to your application.

Once you have your .msi executable, just run it to install your plug-in and register the plug-in with Google Desktop. Your plug-in now appears in the Add/Remove Programs Panel, from which it can be uninstalled.