tis-vncrestricted 2.7.10.0-1

  • package : tis-vncrestricted
  • version : 2.7.10.0-1
  • architecture : all
  • locale :
  • description : TightVNC Viewer et server pour x86 et x64 avec mot de passe et rstriction IP
  • maintainer : TIS <technique@tranquil-it-systems.fr>
  • date : 2018-02-27 19:08:57
  • min_os_version :
  • max_os_version :

setup.py

# -*- coding: utf-8 -*-
from setuphelpers import *

uninstallkey = []

# password for full access VNC viewer
password = 'mainpass'

# list of IP of authorized VNC viewers
authorized_ips = ['192.168.149.14','192.168.149.16']

def install_msi_if_needed(msi,min_version=None,killbefore=[],properties={}):
    if not isfile(msi):
        error('msi file %s not found in package' % msi)
    key = get_msi_properties(msi)['ProductCode']
    # will try to add key in the caller's (setup.py) uninstallkey list
    import inspect
    caller_globals = inspect.stack()[1][0].f_globals
    WAPT = caller_globals.get('WAPT',None)
    force = WAPT and WAPT.options.force

    if not min_version:
        min_version = getproductprops(msi)['version']

    if need_install(key,min_version=min_version,force=force):
        props = ' '.join(["%s=%s" % (k,v) for (k,v) in properties.iteritems()])
        if killbefore:
            killalltasks(killbefore)
        run(r'msiexec /norestart /q /i "%s" %s' % (msi,props))
        if not installed_softwares(uninstallkey=key):
            error('MSI %s has been installed but the uninstall key %s can not be found' % (msi,key))
    else:
        print('MSI %s already installed. Skipping msiexec' % msi)
    if key:
        if 'uninstallkey' in caller_globals and not key in caller_globals['uninstallkey']:
            caller_globals['uninstallkey'].append(key)

def install():
    # be sure to remove old vnc and associated settings...
    old_vnc = installed_softwares('TightVNC')
    for soft in old_vnc:
        print('Uninstall %s' % soft['name'])
        run_notfatal(uninstall_cmd(soft['key']))

    if iswin64():
        msi = 'tightvnc-2.7.10-setup-64bit.msi'
    else:
        msi = 'tightvnc-2.7.10-setup-32bit.msi'
    options = dict(
        SET_USEVNCAUTHENTICATION=1,
        VALUE_OF_USEVNCAUTHENTICATION=1,
        SET_PASSWORD=1,
        VALUE_OF_PASSWORD=password,
        SET_IPACCESSCONTROL=1,
        VALUE_OF_IPACCESSCONTROL= '"%s"'%( ','.join('%s-%s:0'%(ip,ip) for ip in ensure_list(authorized_ips))))

    install_msi_if_needed(msi,properties=options)

    

Changelog

No changelog
    

manifest.sha256

WAPT/certificate.crt 79e5388683c0b6cb03f4f81e4e58e3a11463b2b6cf169dd9c453098027dcfaa4
WAPT/wapt.psproj 8a4b80d6ba6119d2d14fc11acf784328f56335822d37a3a1165519b66886c7f5
tightvnc-2.7.10-setup-64bit.msi 422f3ba6f49472a55d27aa3d788c199ef29417b2181c7e00a33cded98728e8e6
wapt.psproj 93644cc18ef33e7f11b5fbc5f2f4177ee7757939de0038a4d6ebc0720ecb5906
tightvnc-2.7.10-setup-32bit.msi 1b09204b1d22f20adca1c505e8f407938ad5382a095b8b0dd26cb1f626e9ee7c
setup.py 99c926410905eb1abaa0103f5fcfa524749a253ad767a37bfa20467394402fd5
WAPT/control 98f24784760cc8292a93f04e0b98242b36fc1859cc43b5726f6899ade59ad9fb