29 lines
1.2 KiB
Python
29 lines
1.2 KiB
Python
# -*- coding: utf-8 -*-
|
|
from setuphelpers import *
|
|
|
|
uninstallkey = []
|
|
variables = {
|
|
# 'ddaddin_license': '[2][FWS #-1][2019-04-17 12:41:43][-1][21][123456789]'
|
|
}
|
|
|
|
# Read local variables file if available
|
|
if isfile(makepath(programfiles32,'wapt','private','symetric.txt')) and isfile(makepath(programfiles32,'wapt','private','variables.txt')):
|
|
print('Reading local encrypted variables file')
|
|
from cryptography.fernet import Fernet
|
|
import yaml
|
|
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())))
|
|
|
|
def install():
|
|
version = control['version'].split('-',1)[0]
|
|
print('Installing Outlook DDAddin plugin %s' % version)
|
|
if not 'ddaddin_license' in variables:
|
|
error('DDAddin license not set in variables, can\'t install')
|
|
|
|
props = {
|
|
'DDADDIN_LICENSE': '"' + variables['ddaddin_license'] + '"'
|
|
}
|
|
install_msi_if_needed('ddaddin32.msi',min_version=version,properties=props)
|
|
# On x64, install both versions
|
|
if iswin64():
|
|
install_msi_if_needed('ddaddin64.msi',min_version=version,properties=props) |