From dc1ce7854fa8d73c7683eff94cf714e698a38a8e Mon Sep 17 00:00:00 2001 From: "kathyw@google.com" Date: Tue, 1 Sep 2009 22:18:26 +0000 Subject: Update packaging and getting started pages to feature new Extensions page buttons (rather than the command line). TBR=aa,rafaelw Review URL: http://codereview.chromium.org/181041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25094 0039d316-1c4b-4281-b951-d872f2087c98 --- .../extensions/docs/images/create-package.png | Bin 50659 -> 0 bytes .../extensions/docs/images/load_after-small.gif | Bin 0 -> 10457 bytes .../common/extensions/docs/images/load_after.gif | Bin 0 -> 17251 bytes .../extensions/docs/images/package-success.gif | Bin 0 -> 9570 bytes .../extensions/docs/images/package-success.png | Bin 45290 -> 0 bytes .../extensions/docs/images/update-success.gif | Bin 0 -> 6674 bytes .../common/extensions/docs/static/getstarted.html | 70 +++++++----- .../common/extensions/docs/static/packaging.html | 124 +++++++++++++-------- 8 files changed, 116 insertions(+), 78 deletions(-) delete mode 100755 chrome/common/extensions/docs/images/create-package.png create mode 100755 chrome/common/extensions/docs/images/load_after-small.gif create mode 100755 chrome/common/extensions/docs/images/load_after.gif create mode 100755 chrome/common/extensions/docs/images/package-success.gif delete mode 100755 chrome/common/extensions/docs/images/package-success.png create mode 100755 chrome/common/extensions/docs/images/update-success.gif (limited to 'chrome/common') diff --git a/chrome/common/extensions/docs/images/create-package.png b/chrome/common/extensions/docs/images/create-package.png deleted file mode 100755 index 2079a6f..0000000 Binary files a/chrome/common/extensions/docs/images/create-package.png and /dev/null differ diff --git a/chrome/common/extensions/docs/images/load_after-small.gif b/chrome/common/extensions/docs/images/load_after-small.gif new file mode 100755 index 0000000..b51ada5 Binary files /dev/null and b/chrome/common/extensions/docs/images/load_after-small.gif differ diff --git a/chrome/common/extensions/docs/images/load_after.gif b/chrome/common/extensions/docs/images/load_after.gif new file mode 100755 index 0000000..36508bd Binary files /dev/null and b/chrome/common/extensions/docs/images/load_after.gif differ diff --git a/chrome/common/extensions/docs/images/package-success.gif b/chrome/common/extensions/docs/images/package-success.gif new file mode 100755 index 0000000..175a049 Binary files /dev/null and b/chrome/common/extensions/docs/images/package-success.gif differ diff --git a/chrome/common/extensions/docs/images/package-success.png b/chrome/common/extensions/docs/images/package-success.png deleted file mode 100755 index 17f671e..0000000 Binary files a/chrome/common/extensions/docs/images/package-success.png and /dev/null differ diff --git a/chrome/common/extensions/docs/images/update-success.gif b/chrome/common/extensions/docs/images/update-success.gif new file mode 100755 index 0000000..66e3e8b Binary files /dev/null and b/chrome/common/extensions/docs/images/update-success.gif differ diff --git a/chrome/common/extensions/docs/static/getstarted.html b/chrome/common/extensions/docs/static/getstarted.html index e733c67..4db3b2e 100755 --- a/chrome/common/extensions/docs/static/getstarted.html +++ b/chrome/common/extensions/docs/static/getstarted.html @@ -61,39 +61,47 @@ at the bottom of the Google Chrome window. <span>Hello, World!</span> </div> -
  • Load the extension: +
  • Load the extension.
    1. - Change the shortcut that you use to start the browser - (or create a new one) - so that it has the - --load-extension flag. - For example, if your extension is at c:\myext, - your shortcut might look something like this: -
      chrome.exe --load-extension="c:\myext"
      + Bring up the Extensions page + by going to this URL: +
      + chrome://extensions +
    2. -
    3. Exit Google Chrome. - If you have a separate profile for testing, - you only need to exit the browser instances that use the testing profile.
    4. -
    5. Double-click the shortcut to start the browser.
    6. -
    -

    - Note: - To run already-packaged extensions - the browser must be started with the - --enable-extensions or --load-extension flag. - An exception: - themes run in the Dev channel version of Google Chrome, - no flags required. - For details on changing shortcut properties, see - Creating - and Using Profiles. + +

  • + Click the Load unpacked extension button. + A file dialog appears. +
  • + +
  • + In the file dialog, + navigate to your extension's directory + (c:\myext, for example) + and click the OK button. +
  • + + + +

    +If your extension is valid, +information about it +appears in the Installed extensions part +of the Extensions page, +as the following screenshot shows.

    - -

    -You should see the UI for your extension at the bottom left of the browser, looking something like this: + +

    + +

    +You should see the UI for your extension at the bottom left of the browser, +looking something like this:

    @@ -122,9 +130,11 @@ You should see the UI for your extension at the bottom left of the browser, look just like the buttons in the bookmark bar. After a while, a tooltip comes up, identifying the extension.

    -

    [PENDING: troubleshooting info should go here. +

    + [PENDING: troubleshooting info should go here. what are symptoms of common typos, including misnamed files? - what are the symptoms if you don't have the dev channel?]

    + what are the symptoms if you don't have the dev channel?] +

    Add code to the extension

    In this step, you'll make your extension do something besides just look good.

    @@ -159,7 +169,7 @@ it won't work!

    Now what?

    -

    +

    [PENDING: Summarize what we did, what it means, what else we would've done if this were a real extension (e.g. package it), diff --git a/chrome/common/extensions/docs/static/packaging.html b/chrome/common/extensions/docs/static/packaging.html index abbdbaa..5d539ab 100755 --- a/chrome/common/extensions/docs/static/packaging.html +++ b/chrome/common/extensions/docs/static/packaging.html @@ -22,19 +22,38 @@ for inclusion in the gallery.]

    To package an extension:

      -
    1. Close all your Google Chrome windows
    2. -
    3. Execute Google Chrome, using the --pack-extension option -to specify the path to the extension's folder: -
      chrome.exe --pack-extension=ext-folder-path
      -
    4. +
    5. + Bring up the Extensions page + by going to this URL: +
      + chrome://extensions +
      +
    6. + +
    7. + Click the Pack extension button. + A dialog appears. +
    8. + +
    9. + In the Extension root directory field, + specify the path to the extension's folder — + for example, c:\myext. + (Ignore the other field; + you don't specify a private key file + the first time you package a particular extension.) +
    10. + +
    11. + Click OK. + The packager creates two files: + a .crx file, + which is the actual extension that can be installed, + and a .pem file, + which contains the private key. +
    -

    The packager creates two files: -a .crx file, -which is the actual extension that can be installed, -and a .pem file, -which contains the private key. -

    Do not lose the private key! @@ -53,54 +72,63 @@ that tells you where to find the .crx and .pem files:

    - - - -

    Finding the path to Google Chrome

    - -

    -If chrome.exe isn't already in your path, -you need to specify the complete path to it. -Here's how: -

    - - +

    Updating a package

    To create an updated version of your extension:

      -
    1. Increase the version number in manifest.json.
    2. -
    3. Close all your Google Chrome windows.
    4. -
    5. Execute Google Chrome, using the --pack-extension -and --pack-extension-key options. -The value of the key option should be the path to -the already generated .pem file for this extension. - -
      chrome.exe --pack-extension=ext-folder-path --pack-extension-key=ext-key-path
      -
    6. +
    7. + Increase the version number in manifest.json. +
    8. + +
    9. + Bring up the Extensions page + by going to this URL: chrome://extensions +
    10. + +
    11. + In the Extension root directory field, + specify the path to the extension's folder — + for example, c:\myext. +
    12. + +
    13. + In the Private key file field, + specify the location of the + already generated .pem file for this extension — + for example, c:\myext.pem. +
    14. + +
    15. + Click OK. +

    If the updated extension is successfully packaged, you'll see a dialog like this:

    - + + +

    Packaging at the command line

    + +

    +Another way to package extensions +is by invoking chrome.exe at the command line. +Use the --pack-extension flag +to specify the location of the extension's folder. +Use --pack-extension-key +to specify the location of the extension's private key file. +For example: +

    -

    Tips and tricks

    +
    +chrome.exe --pack-extension=ext-folder-path --pack-extension-key=ext-key-path
    +

    -You can use the --no-message-box command-line flag -to suppress the dialog. -This is useful if -you're packing extensions in non-interactive scripts. +To suppress the dialog, +add --no-message-box to the command.

    -- cgit v1.1