how to user command line arguments to pack and unpack extension (.crx file)?

1,203 views
Skip to first unread message

RP

unread,
Sep 15, 2011, 3:00:32 PM9/15/11
to Chromium-extensions
I have developed an extension for the task that I am doing. Now I
would like to package this extension in to a crx file using the
command line argument --pack-extension. I was able to create the
<myExtension>.crx and <myExtension>.pem files. But I wanted to know
the unique id that is assigned to this extension. How can I know this
ID? Is the id generated based on the location where it is being
installed from as my test did revealed that?

Now after creating the .crx file I wanted to load the extension using
the command line argument --load-extension but every time when I tried
to do that I get an error message "Could not read extension from
'<Folder>\MyExtension.crx' Manifest file is missing or unreadable."
How can I load extension packaged in *.crx file in the google chrome
browser using command line arguments?

Thank you for your help,
RP

Boris Smus

unread,
Sep 17, 2011, 3:10:00 AM9/17/11
to RP, Chromium-extensions
Hi Ronit,

On Fri, Sep 16, 2011 at 12:30 AM, RP <ronitp...@gmail.com> wrote:
I have developed an extension for the task that I am doing. Now I
would like to package this extension in to a crx file using the
command line argument --pack-extension. I was able to create the
<myExtension>.crx and <myExtension>.pem files. But I wanted to know
the unique id that is assigned to this extension. How can I know this
ID? Is the id generated based on the location where it is being
installed from as my test did revealed that?

Here's a Stack Overflow post that describes how the extension ID is computed: http://stackoverflow.com/questions/1882981/google-chrome-alphanumeric-hashes-to-identify-extensions/2050916#2050916
 

Now after creating the .crx file I wanted to load the extension using
the command line argument --load-extension but every time when I tried
to do that I get an error message "Could not read extension from
'<Folder>\MyExtension.crx' Manifest file is missing or unreadable."
How can I load extension packaged in *.crx file in the google chrome
browser using command line arguments?

The --load-extension flag takes a directory, not a packed CRX file. Please see http://peter.sh/experiments/chromium-command-line-switches/ for a list of all flags and explanations.

Hope this helps,
- Boris

Reply all
Reply to author
Forward
0 new messages