[wpkg-users] Thunderbird auto install extensions

k2 kirill.k2 at gmail.com
Sun Jun 17 00:27:05 CEST 2012


Hello!

As John Danks write, the XPI file should be extracted to folder named
as UIDof extracted plugin and you should tune next settings of
Thunderbird:

extensions.installDistroAddons    true
extensions.enabledScopes    13
extensions.autoDisableScopes    2

This settings allow users to have not only global, but own extensions.
Please, read https://developer.mozilla.org/en/Installing_extensions and for
details

Here is my approach: I use semi-automated scripts to extract naked XPI to
deployment folder and then deploy all bulk of default extensions AND the
CFG file for thunderbird. The deployment folder have structure:

*thunderbird-deployment**/thunderbird.cfg* - for extensions paramaters
*thunderbird-deployment**/defaults/pref/autoconf.js* - for enable
thunderbird.cfg
*thunderbird-deployment**/extensions/* - place for unpacked plugins

So, here is my script and examples of deployment folder with config files
for Thunderbird: http://xpi2deploy.googlecode.com/files/xpi2deploy.tgz

I run it like that (warning! -c option cleans destination folder!):
# xpi2folders -c -g -i "*downloads/plugins*" -o "*
thunderbird-deployment/extensions/*"

And here is my WPKG xml for extensions and config deployment:

<?xml version="1.0" encoding="UTF-8"?>
>
> <packages:packages
>         xmlns:packages="http://www.wpkg.org/packages" xmlns:wpkg="
> http://www.wpkg.org/wpkg" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance"
>         xsi:schemaLocation="http://www.wpkg.org/packages../../xsd/packages.xsd" >
>
>     <package id="thunderbird-deployment"
>             name="Mozilla Thunderbird Deployment"
>             revision="%PKG_VERSION%"
>             reboot="false"
>             execute="once"
>             priority="8">
>
>     <depends package-id="thunderbird" />
>
>         <variable name="PKG_VERSION"       value="20120213-02" />
>         <variable name="PKG_NAME"            value="Mozilla Thunderbird
> Deployment" />
>         <variable name="PKG_SOURCE"
> value="%SOFTWARE%\network\thunderbird-deployment"/>
>         <variable name="PKG_DESTINATION" value="%ProgramFiles%\Mozilla
> Thunderbird"        architecture="x86"/>
>         <variable name="PKG_DESTINATION"
> value="%ProgramFiles(x86)%\Mozilla Thunderbird" architecture="x64"/>
>
>         <install include="remove" />
>         <install cmd='%ComSpec% /c xcopy "%PKG_SOURCE%\thunderbird.cfg"
> "%PKG_DESTINATION%\" /S /V /I /R /Y >"%TMP%\%PKG_NAME%.log"' />
>         <install cmd='%ComSpec% /c xcopy "%PKG_SOURCE%\defaults"
> "%PKG_DESTINATION%\defaults" /S /V /I /R /Y >>"%TMP%\%PKG_NAME%.log"'
> />
>
>         <upgrade include="install" />
>
>         <remove cmd='%ComSpec% /c if exist
> "%PKG_DESTINATION%\thunderbird.cfg" del /q
> "%PKG_DESTINATION%\thunderbird.cfg"' />
>         <remove cmd='%ComSpec% /c if exist "%PKG_DESTINATION%\defaults"
> rmdir /s /q "%PKG_DESTINATION%\defaults"' />
>     </package>
>

>
    <package id="thunderbird-extensions"
>             name="Mozilla Thunderbird Extensions"
>             revision="%PKG_VERSION%"
>             reboot="false"
>             priority="9">
>
>     <depends package-id="thunderbird" />
>
>         <variable name="PKG_VERSION"       value="20120211-06" />
>         <variable name="PKG_NAME"            value="Mozilla Thunderbird
> Extensions" />
>         <variable name="PKG_SOURCE"
> value="%SOFTWARE%\network\thunderbird-deployment\extensions"/>
>         <variable name="PKG_DESTINATION" value="%ProgramFiles%\Mozilla
> Thunderbird\extensions"        architecture="x86"/>
>         <variable name="PKG_DESTINATION"
> value="%ProgramFiles(x86)%\Mozilla Thunderbird\extensions"
> architecture="x64"/>
>         <variable name="PKG_VERFILE"
> value="%PKG_DESTINATION%\%PKG_VERSION%.ver" />
>
>         <check type="file" condition="exists" path="%PKG_VERFILE%" />
>
>         <install include="remove" />
>         <install cmd='%ComSpec% /c xcopy "%PKG_SOURCE%"
> "%PKG_DESTINATION%" /S /V /I /R /Y >"%TMP%\%PKG_NAME%.log"' />
>
>         <upgrade include="install" />
>
>         <remove cmd='%ComSpec% /c if exist "%PKG_DESTINATION%\" rmdir /s
> /q "%PKG_DESTINATION%\"' />
>     </package>
>

>
</packages:packages>
>


-- 
Best regards,
Kirill Kozlovskiy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/wpkg-users/attachments/20120617/0bb4cead/attachment-0002.html>


More information about the wpkg-users mailing list