Update to version 68.0.0

master
Daniel Berteaud 5 years ago
parent 13b9ce1a7d
commit bbf9100a58
  1. 22
      WAPT/control
  2. 32
      WAPT/wapt.psproj
  3. 9
      extensions.rdf.j2
  4. 14
      reset_addons.bat.j2
  5. 55
      setup.py
  6. BIN
      sogo-connector-60.0.0.xpi
  7. BIN
      sogo-connector-68.0.0-demo.xpi
  8. BIN
      sogo-integrator-60.0.0-sogo-demo.xpi

@ -1,13 +1,15 @@
package : fws-thunderbird-sogo-addons package : fws-thunderbird-sogo-addons
version : 60.0.0-6 version : 68.0.0-23
architecture : all architecture : all
section : base section : base
priority : optional priority : optional
name :
categories :
maintainer : Daniel Berteaud <daniel@firewall-services.com> maintainer : Daniel Berteaud <daniel@firewall-services.com>
description : SOGo addons for Thunderbird description : SOGo addons for Thunderbird
depends : fws-thunderbird-config depends : fws-thunderbird(>=68),fws-thunderbird-config,fws-7zip
conflicts : conflicts :
maturity : PROD maturity : RC
locale : locale :
target_os : windows target_os : windows
min_os_version : min_os_version :
@ -20,13 +22,17 @@ description_fr : Plugins SOGo pour le client Mozilla Thunderbird
description_pl : description_pl :
description_de : description_de :
description_es : description_es :
audit_schedule : 2d audit_schedule : 4w
editor : Inverse editor : Inverse
keywords : caldav,carddav,sogo keywords : caldav,carddav,sogo
licence : licence :
homepage : https://sogo.nu homepage : https://sogo.nu
package_uuid : package_uuid : d93ba764-d8c8-4354-a493-1edbaf64c740
valid_from :
valid_until :
forced_install_on :
signer : Daniel Berteaud signer : Daniel Berteaud
signer_fingerprint: signer_fingerprint: 3c9415559e2dedbc4390e3faa2c28d3b67265baa5b35902d2764d9e41c3b3f0a
signature_date : signature : JIdRCzu3kUMflqCOqjhubHMsEaTHj8Re+rHuu1C4MZTH3gpLdjh3zqvDWjkP1euLUIlfo1I/eh3LiwaBxYAKmbe5v0JL+lL+39tobK9UMRwDzb2ElX7W6G87lnmvuJBqWCCVge+A4e248T4t/4nFz2iAwSGIpT+DDVoxQFOdZ0duqJqKvRtmg5J21rf1mL4Vyf0uQiH3PEcw1n/Nunf0+i1YOCQvQItDO6I+wQEOIh4BnZBmAcD2l5orIaHwZlHEGEuChAUaj6T91rdIKUWH6uX6JN9KDGc14XNfHIr0qqL7jt2wrQVn5rfRhH2Cmc/TcWjGnPyKdx8Ni+Stj04yQA==
signed_attributes : signature_date : 2019-12-12T18:39:31.100000
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_os_version,max_os_version,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,signer,signer_fingerprint,signature_date,signed_attributes

@ -1,5 +1,5 @@
[PyScripter] [PyScripter]
Version=3.3.2.0 Version=3.6.1.0
[Project] [Project]
ClassName=TProjectRootNode ClassName=TProjectRootNode
@ -23,11 +23,11 @@ FileName=C:\Program Files (x86)\wapt\setuphelpers.py
[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node2] [Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node2]
ClassName=TProjectFileNode ClassName=TProjectFileNode
FileName=C:\Program Files (x86)\wapt\wapt-get.ini FileName=C:\Program Files (x86)\wapt\wapt-get.py
[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3] [Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3]
ClassName=TProjectFileNode ClassName=TProjectFileNode
FileName=C:\Program Files (x86)\wapt\wapt-get.py FileName=C:\Program Files (x86)\wapt\wapt-get.ini
[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node4] [Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node4]
ClassName=TProjectFileNode ClassName=TProjectFileNode
@ -46,10 +46,14 @@ FileName=$[Project-Path]control
[Project\ChildNodes\Node0\ChildNodes\Node3] [Project\ChildNodes\Node0\ChildNodes\Node3]
ClassName=TProjectFileNode ClassName=TProjectFileNode
FileName=C:\waptdev\wapt-thunderbird-sogo-addons\reset_addons.bat.j2
[Project\ChildNodes\Node0\ChildNodes\Node4]
ClassName=TProjectFileNode
FileName=$[Project-Path]..\setup.py FileName=$[Project-Path]..\setup.py
[Project\ChildNodes\Node0\ChildNodes] [Project\ChildNodes\Node0\ChildNodes]
Count=4 Count=5
[Project\ChildNodes\Node1] [Project\ChildNodes\Node1]
ClassName=TProjectRunConfiguationsNode ClassName=TProjectRunConfiguationsNode
@ -74,8 +78,6 @@ Description=Run script using an external Python Interpreter
ApplicationName=$[PythonExe-Short] ApplicationName=$[PythonExe-Short]
Parameters=$[ActiveScript-Short] Parameters=$[ActiveScript-Short]
WorkingDirectory=$[ActiveScript-Dir] WorkingDirectory=$[ActiveScript-Dir]
ShortCut=0
MessagesFormat=$[FileName] $[LineNumber]
[Project\ChildNodes\Node1\ChildNodes\Node1] [Project\ChildNodes\Node1\ChildNodes\Node1]
ClassName=TProjectRunConfiguationNode ClassName=TProjectRunConfiguationNode
@ -97,8 +99,6 @@ Description=Run script using an external Python Interpreter
ApplicationName=$[PythonExe-Short] ApplicationName=$[PythonExe-Short]
Parameters=$[ActiveScript-Short] Parameters=$[ActiveScript-Short]
WorkingDirectory=$[ActiveScript-Dir] WorkingDirectory=$[ActiveScript-Dir]
ShortCut=0
MessagesFormat=$[FileName] $[LineNumber]
[Project\ChildNodes\Node1\ChildNodes\Node2] [Project\ChildNodes\Node1\ChildNodes\Node2]
ClassName=TProjectRunConfiguationNode ClassName=TProjectRunConfiguationNode
@ -120,8 +120,6 @@ Description=Run script using an external Python Interpreter
ApplicationName=$[PythonExe-Short] ApplicationName=$[PythonExe-Short]
Parameters=$[ActiveScript-Short] Parameters=$[ActiveScript-Short]
WorkingDirectory=$[ActiveScript-Dir] WorkingDirectory=$[ActiveScript-Dir]
ShortCut=0
MessagesFormat=$[FileName] $[LineNumber]
[Project\ChildNodes\Node1\ChildNodes\Node3] [Project\ChildNodes\Node1\ChildNodes\Node3]
ClassName=TProjectRunConfiguationNode ClassName=TProjectRunConfiguationNode
@ -143,8 +141,6 @@ Description=Run script using an external Python Interpreter
ApplicationName=$[PythonExe-Short] ApplicationName=$[PythonExe-Short]
Parameters=$[ActiveScript-Short] Parameters=$[ActiveScript-Short]
WorkingDirectory=$[ActiveScript-Dir] WorkingDirectory=$[ActiveScript-Dir]
ShortCut=0
MessagesFormat=$[FileName] $[LineNumber]
[Project\ChildNodes\Node1\ChildNodes\Node4] [Project\ChildNodes\Node1\ChildNodes\Node4]
ClassName=TProjectRunConfiguationNode ClassName=TProjectRunConfiguationNode
@ -166,8 +162,6 @@ Description=Run script using an external Python Interpreter
ApplicationName=$[PythonExe-Short] ApplicationName=$[PythonExe-Short]
Parameters=$[ActiveScript-Short] Parameters=$[ActiveScript-Short]
WorkingDirectory=$[ActiveScript-Dir] WorkingDirectory=$[ActiveScript-Dir]
ShortCut=0
MessagesFormat=$[FileName] $[LineNumber]
[Project\ChildNodes\Node1\ChildNodes\Node5] [Project\ChildNodes\Node1\ChildNodes\Node5]
ClassName=TProjectRunConfiguationNode ClassName=TProjectRunConfiguationNode
@ -189,8 +183,6 @@ Description=Run script using an external Python Interpreter
ApplicationName=$[PythonExe-Short] ApplicationName=$[PythonExe-Short]
Parameters=$[ActiveScript-Short] Parameters=$[ActiveScript-Short]
WorkingDirectory=$[ActiveScript-Dir] WorkingDirectory=$[ActiveScript-Dir]
ShortCut=0
MessagesFormat=$[FileName] $[LineNumber]
[Project\ChildNodes\Node1\ChildNodes\Node6] [Project\ChildNodes\Node1\ChildNodes\Node6]
ClassName=TProjectRunConfiguationNode ClassName=TProjectRunConfiguationNode
@ -212,8 +204,6 @@ Description=Run script using an external Python Interpreter
ApplicationName=$[PythonExe-Short] ApplicationName=$[PythonExe-Short]
Parameters=$[ActiveScript-Short] Parameters=$[ActiveScript-Short]
WorkingDirectory=$[ActiveScript-Dir] WorkingDirectory=$[ActiveScript-Dir]
ShortCut=0
MessagesFormat=$[FileName] $[LineNumber]
[Project\ChildNodes\Node1\ChildNodes\Node7] [Project\ChildNodes\Node1\ChildNodes\Node7]
ClassName=TProjectRunConfiguationNode ClassName=TProjectRunConfiguationNode
@ -235,8 +225,6 @@ Description=Run script using an external Python Interpreter
ApplicationName=$[PythonExe-Short] ApplicationName=$[PythonExe-Short]
Parameters=$[ActiveScript-Short] Parameters=$[ActiveScript-Short]
WorkingDirectory=$[Project-Path].. WorkingDirectory=$[Project-Path]..
ShortCut=0
MessagesFormat=$[FileName] $[LineNumber]
[Project\ChildNodes\Node1\ChildNodes\Node8] [Project\ChildNodes\Node1\ChildNodes\Node8]
ClassName=TProjectRunConfiguationNode ClassName=TProjectRunConfiguationNode
@ -258,8 +246,6 @@ Description=Run script using an external Python Interpreter
ApplicationName=$[PythonExe-Short] ApplicationName=$[PythonExe-Short]
Parameters=$[ActiveScript-Short] Parameters=$[ActiveScript-Short]
WorkingDirectory=$[ActiveScript-Dir] WorkingDirectory=$[ActiveScript-Dir]
ShortCut=0
MessagesFormat=$[FileName] $[LineNumber]
[Project\ChildNodes\Node1\ChildNodes\Node9] [Project\ChildNodes\Node1\ChildNodes\Node9]
ClassName=TProjectRunConfiguationNode ClassName=TProjectRunConfiguationNode
@ -281,8 +267,6 @@ Description=Run script using an external Python Interpreter
ApplicationName=$[PythonExe-Short] ApplicationName=$[PythonExe-Short]
Parameters=$[ActiveScript-Short] Parameters=$[ActiveScript-Short]
WorkingDirectory=$[ActiveScript-Dir] WorkingDirectory=$[ActiveScript-Dir]
ShortCut=0
MessagesFormat=$[FileName] $[LineNumber]
[Project\ChildNodes\Node1\ChildNodes] [Project\ChildNodes\Node1\ChildNodes]
Count=10 Count=10

@ -1,18 +1,13 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!DOCTYPE RDF> <!DOCTYPE RDF>
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:isi="http://inverse.ca/sogo-integrator/" xmlns:isi="http://inverse.ca/sogo-connector/"
xmlns:em="http://www.mozilla.org/2004/em-rdf#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"
xmlns:NC="http://home.netscape.com/NC-rdf#"> xmlns:NC="http://home.netscape.com/NC-rdf#">
<Seq about="http://inverse.ca/sogo-integrator/extensions" <Seq about="http://inverse.ca/sogo-connector/extensions"
isi:updateURL="https://{{ sogo_server }}/plugins/updates.php?plugin=%ITEM_ID%&amp;version=%ITEM_VERSION%&amp;platform=%PLATFORM%"> isi:updateURL="https://{{ sogo_server }}/plugins/updates.php?plugin=%ITEM_ID%&amp;version=%ITEM_VERSION%&amp;platform=%PLATFORM%">
<li> <li>
<Description <Description
em:id="sogo-integrator@inverse.ca"
em:name="SOGo Integrator"/>
</li>
<li>
<Description
em:id="sogo-connector@inverse.ca" em:id="sogo-connector@inverse.ca"
em:name="SOGo Connector"/> em:name="SOGo Connector"/>
</li> </li>

@ -0,0 +1,14 @@
for /f %%a in ('dir /b "%APPDATA%\Thunderbird\Profiles\*.default"') do SET TBPROFILE=%APPDATA%\Thunderbird\Profiles\%%a
IF NOT EXIST "%TBPROFILE%" GOTO :EOF
IF EXIST "%TBPROFILE%\extensions.json" (
IF NOT EXIST "%TBPROFILE%\extensions.{{ tb_major_version }}.json" (
rename "%TBPROFILE%\extensions.json" extensions.{{ tb_major_version }}.json
)
)
IF EXIST "%TBPROFILE%\addonStartup.json.lz4" (
IF NOT EXIST "%TBPROFILE%\addonStartup.{{ tb_major_version }}.json.lz4" (
rename "%TBPROFILE%\addonStartup.json.lz4" addonStartup.{{ tb_major_version }}.json.lz4
)
)

@ -9,6 +9,7 @@ variables = {
'sogo_server': 'mail.server.local' 'sogo_server': 'mail.server.local'
} }
def install():
# Read local variables file if available # Read local variables file if available
if isfile(makepath(programfiles32,'wapt','private','symetric.txt')) and isfile(makepath(programfiles32,'wapt','private','variables.txt')): if isfile(makepath(programfiles32,'wapt','private','symetric.txt')) and isfile(makepath(programfiles32,'wapt','private','variables.txt')):
print('Reading local encrypted variables file') print('Reading local encrypted variables file')
@ -17,49 +18,63 @@ if isfile(makepath(programfiles32,'wapt','private','symetric.txt')) and isfile(m
f = Fernet(open(makepath(programfiles32,'wapt','private','symetric.txt'),'r').read()) f = Fernet(open(makepath(programfiles32,'wapt','private','symetric.txt'),'r').read())
variables.update(yaml.safe_load(f.decrypt(open(makepath(programfiles32,'wapt','private','variables.txt'),'r').read()))) variables.update(yaml.safe_load(f.decrypt(open(makepath(programfiles32,'wapt','private','variables.txt'),'r').read())))
def install():
connector_version = control['version'].split('-',1)[0] connector_version = control['version'].split('-',1)[0]
integrator_version = connector_version major_version = control['version'].split('.',1)[0]
extension_dir = makepath(programfiles,'Mozilla Thunderbird','distribution','extensions')
for extension in ['connector', 'integrator']: for extension in ['connector', 'integrator']:
if isdir(makepath(programfiles,'Mozilla Thunderbird','distribution','extensions','sogo-%s@inverse.ca' % extension)): if isdir(makepath(extension_dir, 'sogo-%s@inverse.ca' % extension)):
remove_tree(makepath(programfiles,'Mozilla Thunderbird','distribution','extensions','sogo-%s@inverse.ca' % extension)) remove_tree(makepath(extension_dir, 'sogo-%s@inverse.ca' % extension))
mkdirs(makepath(programfiles,'Mozilla Thunderbird','distribution','extensions','sogo-%s@inverse.ca' % extension)) if isfile(makepath(extension_dir, 'sogo-%s@inverse.ca.xpi' % extension)):
remove_file(makepath(extension_dir, 'sogo-%s@inverse.ca.xpi' % extension))
mkdirs(makepath(extension_dir, 'sogo-connector@inverse.ca'))
# connector can be extracted as is # The extension must be customized, so first extract it
unzip('sogo-connector-%s.xpi' % connector_version, makepath(programfiles,'Mozilla Thunderbird','distribution','extensions','sogo-connector@inverse.ca')) print('Extraction demo extension')
unzip('sogo-connector-%s-demo.xpi' % connector_version, makepath(extension_dir,'sogo-connector@inverse.ca'))
# Integrator must be customized, so first extract it
unzip('sogo-integrator-%s-sogo-demo.xpi' % integrator_version, makepath(programfiles,'Mozilla Thunderbird','distribution','extensions','sogo-integrator@inverse.ca'))
# And replace the extensions.rdf content # And replace the extensions.rdf content
print('Customizing extension')
jinja2 = Environment( jinja2 = Environment(
loader=FileSystemLoader(os.path.dirname(os.path.abspath(__file__))), loader=FileSystemLoader(os.path.dirname(os.path.abspath(__file__))),
trim_blocks=True trim_blocks=True
) )
open(makepath(programfiles,'Mozilla Thunderbird','distribution','extensions','sogo-integrator@inverse.ca','chrome','content','extensions.rdf'),'w').write( open(makepath(extension_dir,'sogo-connector@inverse.ca','chrome','content','sogo-connector','global','extensions.rdf'),'w').write(
jinja2.get_template('extensions.rdf.j2').render( jinja2.get_template('extensions.rdf.j2').render(
sogo_server = variables['sogo_server'] sogo_server = variables['sogo_server']
) )
) )
# Also remove custom settings # Also remove custom settings
os.unlink(makepath(programfiles,'Mozilla Thunderbird','distribution','extensions','sogo-integrator@inverse.ca','defaults','preferences','site.js')) os.unlink(makepath(extension_dir,'sogo-connector@inverse.ca','defaults','preferences','site.js'))
# Now create an XPI
print('Creating XPI')
run(r'"%s" a -tzip "%s" "%s"' %(makepath(programfiles, '7-Zip', '7z.exe'), makepath(extension_dir, 'sogo-connector@inverse.ca.xpi'), makepath(extension_dir, 'sogo-connector@inverse.ca', '*')))
# Note : we could remove the extension directory, but we keep it for easier auditing
# Script to reset extensions.json and addonStartup.json.lz4, those files need to be removed
# for sogo-connector to be correctly loaded. At least for the 60.x -> 68.x upgrade
print('Deploy reset_addons.bat script')
open(makepath(programfiles,'Mozilla Thunderbird','reset_addons.bat'),'w').write(
jinja2.get_template('reset_addons.bat.j2').render(
tb_major_version = major_version
)
)
def uninstall(): def uninstall():
print('Removing SOGo extensions for Thunderbird') print('Removing SOGo connector for Thunderbird')
for extension in ['connector','integrator']: remove_tree(makepath(programfiles,'Mozilla Thunderbird','distribution','extensions','sogo-connector@inverse.ca' % extension))
remove_tree(makepath(programfiles,'Mozilla Thunderbird','distribution','extensions','sogo-%s@inverse.ca' % extension))
def session_setup():
print('Reset Thunderbird addons settings on major upgrades')
run(makepath(programfiles,'Mozilla Thunderbird','reset_addons.bat'))
def audit(): def audit():
connector_version = control['version'].split('-',1)[0] connector_version = control['version'].split('-',1)[0]
integrator_version = connector_version
try: try:
run('type "%s" | find /I "em:version=" | find "%s"' % (makepath(programfiles,'Mozilla Thunderbird','distribution','extensions','sogo-connector@inverse.ca','install.rdf'), connector_version)) run('type "%s" | find /I "em:version=" | find "%s"' % (makepath(programfiles,'Mozilla Thunderbird','distribution','extensions','sogo-connector@inverse.ca','install.rdf'), connector_version))
except: except:
print('SOGO connector version check failed') print('SOGO connector version check failed')
return "ERROR" return "ERROR"
try:
run('type "%s" | find /I "em:version=" | find "%s"' % (makepath(programfiles,'Mozilla Thunderbird','distribution','extensions','sogo-integrator@inverse.ca','install.rdf'), integrator_version))
except:
print('SOGO integrator version check failed')
return "ERROR"
return "OK" return "OK"

BIN
sogo-connector-60.0.0.xpi (Stored with Git LFS)

Binary file not shown.

BIN
sogo-connector-68.0.0-demo.xpi (Stored with Git LFS)

Binary file not shown.

BIN
sogo-integrator-60.0.0-sogo-demo.xpi (Stored with Git LFS)

Binary file not shown.
Loading…
Cancel
Save