Optimisations
This commit is contained in:
parent
cceea577e9
commit
54d099d893
|
@ -1,5 +1,5 @@
|
|||
package : fws-fabulatech-client
|
||||
version : 2.8.32-7
|
||||
package : fws-fabulatech-webcam-workstation
|
||||
version : 2.8.32-8
|
||||
architecture : all
|
||||
section : base
|
||||
priority : optional
|
||||
|
@ -7,7 +7,7 @@ maintainer : Florent Heuze
|
|||
description : Fabulatech client to access you webcam from an RDP session
|
||||
depends :
|
||||
conflicts :
|
||||
maturity : PROD
|
||||
maturity : PREPROD
|
||||
locale : all
|
||||
target_os : windows
|
||||
min_os_version :
|
||||
|
|
23
setup.py
23
setup.py
|
@ -4,7 +4,7 @@ from setuphelpers import *
|
|||
uninstallkey = []
|
||||
|
||||
def install():
|
||||
print("Installing Fabulatech-Workstation")
|
||||
print("Installing Fabulatech Webcam RDP Workstation")
|
||||
version = control['version'].split('-',1)[0]
|
||||
|
||||
if iswin64():
|
||||
|
@ -22,7 +22,7 @@ def install():
|
|||
def update_package():
|
||||
import re, os
|
||||
from waptpackage import PackageEntry
|
||||
print('Updating Fabulatech-Workstation')
|
||||
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()
|
||||
|
@ -30,18 +30,21 @@ def update_package():
|
|||
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)
|
||||
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 Version(latest_version) > Version(version):
|
||||
pe.version = latest_version + '-0'
|
||||
pe.maturity = 'PREPROD'
|
||||
pe.save_control_to_wapt(os.getcwd())
|
||||
|
||||
if __name__ == '__main__':
|
||||
update_package()
|
Loading…
Reference in New Issue