50 lines
1.8 KiB
Python
50 lines
1.8 KiB
Python
# -*- coding: utf-8 -*-
|
|
from setuphelpers import *
|
|
|
|
uninstallkey = []
|
|
|
|
def install():
|
|
print("Installing Fabulatech Webcam RDP Workstation")
|
|
version = control['version'].split('-',1)[0]
|
|
|
|
if iswin64():
|
|
msi='webcam-for-remote-desktop-workstation-64bit.msi'
|
|
else:
|
|
msi='webcam-for-remote-desktop-workstation-32bit.msi'
|
|
|
|
install_msi_if_needed(
|
|
msi,
|
|
min_version=version,
|
|
remove_old_version=True,
|
|
killbefore=['ftwebcamwkssvc.exe','ftnlsv.exe']
|
|
)
|
|
|
|
def update_package():
|
|
import re, os
|
|
from waptpackage import PackageEntry
|
|
print('Updating Fabulatech Webcam RDP Workstation')
|
|
page = wgets('https://www.fabulatech.com/webcam-for-remote-desktop-download.html')
|
|
latest_version = re.search('Download Webcam for Remote Desktop (\d+(.\d+)*) for Windows', page).group(1)
|
|
pe = PackageEntry()
|
|
control = pe.load_control_from_wapt(os.getcwd())
|
|
version = control['version'].split('-',1)[0]
|
|
|
|
if Version(latest_version) > Version(version):
|
|
print('Found new version %s, updating ...' % (latest_version))
|
|
for arch in ['32', '64']:
|
|
print('Remove old binary %sbit' % (arch))
|
|
for old in glob.glob(r'webcam-for-remote-desktop-workstation-%sbit.msi' % arch):
|
|
remove_file(old)
|
|
filename ='webcam-for-remote-desktop-workstation-%sbit.msi' % (arch)
|
|
url = 'https://www.fabulatech.com/%s' % filename
|
|
print('Downloading version %s from %s' % (latest_version, url))
|
|
wget(url, filename)
|
|
pe.version = latest_version + '-0'
|
|
pe.maturity = 'PREPROD'
|
|
pe.save_control_to_wapt(os.getcwd())
|
|
else:
|
|
print('No update found, version %s is aleready the latest' % (latest_version))
|
|
|
|
|
|
if __name__ == '__main__':
|
|
update_package() |