[wpkg-users] Firefox extensions

Marco Gaiarin gaio at sv.lnf.it
Wed Sep 25 12:41:38 CEST 2013


Mandi! Matej Kovacic
  In chel di` si favelave...

> Can anyoune help me?

I simply unpack extensions on firefox dir, preserving UUID/folder name.

Some extensions have some culprit, eg ABP pretend to activeate it on
first run/upgrade and this confuse users... for examples:

<package
        id="firefox-adblockplus"
        name="Adblock Plus for Mozilla Firefox"
        revision="2.2.3:1.2"
        reboot="false"
        priority="50">
        <depends package-id="firefox"/>

        <check type="logical" condition="and">
                <check type="logical" condition="or">
                        <check type="file" condition="exists" path='%ProgramFiles%\Mozilla Firefox\extensions\{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}\install.rdf' />
                        <check type="file" condition="exists" path='%ProgramFiles(x86)%\Mozilla Firefox\extensions\{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}\install.rdf' />
                </check>
                <check type="logical" condition="or">
                        <check type="file" condition="datemodifyequalto" path="%ProgramFiles%\Mozilla Firefox\extensions\{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}\defaults\prefs.js" value="@%WPKGROOT%\packages\firefox-adblockplus.js" />
                        <check type="file" condition="datemodifyequalto" path="%ProgramFiles(x86)%\Mozilla Firefox\extensions\{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}\defaults\prefs.js" value="@%WPKGROOT%\packages\firefox-adblockplus.js" />
                </check>
        </check>

        <download url="https://addons.mozilla.org/firefox/downloads/file/192004/adblock_plus-2.2.3-tb+an+sm+fx.xpi" target="WPKG\adblock_plus-2.2.3.xpi" />

        <install architecture='x86' cmd='%COMSPEC% /c if not exist "%ProgramFiles%\Mozilla Firefox\extensions\{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}" md "%ProgramFiles%\Mozilla Firefox\extensions\{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}"' />
        <install architecture='x64' cmd='%COMSPEC% /c if not exist "%ProgramFiles(x86)%\Mozilla Firefox\extensions\{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}" md "%ProgramFiles(x86)%\Mozilla Firefox\extensions\{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}"' />
        <install include="upgrade" />

        <!-- Vecchio stile di configurazione, elimino il file per mia sicurezza.-->
        <upgrade architecture='x86' cmd='%COMSPEC% /c if exist "%ProgramFiles%\Mozilla Firefox\extensions\{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}\defaults\preferences\adblockplus.js" del /q /f "%ProgramFiles%\Mozilla Firefox\extensions\{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}\defaults\preferences\adblockplus.js"' />
        <upgrade architecture='x64' cmd='%COMSPEC% /c if exist "%ProgramFiles(x86)%\Mozilla Firefox\extensions\{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}\defaults\preferences\adblockplus.js" del /q /f "%ProgramFiles(x86)%\Mozilla Firefox\extensions\{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}\defaults\preferences\adblockplus.js"' />
        <upgrade architecture='x86' cmd='%WPKGROOT%\tools\unzip -oqq "%SOFTWARE%\WPKG\adblock_plus-2.2.3.xpi" -d "%ProgramFiles%\Mozilla Firefox\extensions\{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}"'/>
        <upgrade architecture='x64' cmd='%WPKGROOT%\tools\unzip -oqq "%SOFTWARE%\WPKG\adblock_plus-2.2.3.xpi" -d "%ProgramFiles(x86)%\Mozilla Firefox\extensions\{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}"'/>
        <upgrade architecture='x86' cmd='%COMSPEC% /c copy /y "%WPKGROOT%\packages\firefox-adblockplus.js" "%ProgramFiles%\Mozilla Firefox\extensions\{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}\defaults\prefs.js"' />
        <upgrade architecture='x64' cmd='%COMSPEC% /c copy /y "%WPKGROOT%\packages\firefox-adblockplus.js" "%ProgramFiles(x86)%\Mozilla Firefox\extensions\{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}\defaults\prefs.js"' />
        <downgrade include="upgrade" />
        
        <remove architecture='x86' cmd='%COMSPEC% /c rd /q /s "%ProgramFiles%\Mozilla Firefox\extensions\{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}"' />
        <remove architecture='x64' cmd='%COMSPEC% /c rd /q /s "%ProgramFiles(x86)%\Mozilla Firefox\extensions\{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}"' />
</package>

-- 
dott. Marco Gaiarin				        GNUPG Key ID: 240A3D66
  Associazione ``La Nostra Famiglia''                    http://www.sv.lnf.it/
  Polo FVG   -   Via della Bontà, 7 - 33078   -   San Vito al Tagliamento (PN)
  marco.gaiarin(at)lanostrafamiglia.it   t +39-0434-842711   f +39-0434-842797

		Dona il 5 PER MILLE a LA NOSTRA FAMIGLIA!
	   http://www.lanostrafamiglia.it/chi_siamo/5xmille.php
	(cf 00307430132, categoria ONLUS oppure RICERCA SANITARIA)



More information about the wpkg-users mailing list