tis-qgis-x86 2.18.15-3

  • package : tis-qgis-x86
  • version : 2.18.15-3
  • description : QGIS - SIG Libre et Open Source - x86
  • maintainer : TIS
  • date : 2017-12-20 17:00:53
  • signer : TRANQUIL IT SYSTEMS
  • signature_date : 20171220-164214
  • min_os_version :
  • min_wapt_version :

setup.py

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

uninstallkey = []

short_version = "2.18"
targetdir = makepath(programfiles,'QGIS %s' % short_version)
exename = 'qgis-bin.exe'
uninstall = ('Uninstall-QGIS.exe /S')


def get_qgis_version():
    qgis_reg_version = registry_readstring(HKEY_LOCAL_MACHINE,"SOFTWARE\\QGIS %s" % short_version,"VersionNumber")
    return qgis_reg_version

def remove_qgis():
    print('Uninstalling every previous version of QGIS')
    for items in glob.glob(makepath(programfiles,'QGIS*')):
        run_notfatal('"%s" /S ' %  makepath(programfiles,items,'Uninstall-QGIS.exe'))
        run_notfatal('"%s" /S ' %  makepath(programfiles,items,'uninstall.exe'))
        #remove_tree(makepath(programfiles,items))

    registry_deletekey(HKEY_LOCAL_MACHINE,'SOFTWARE','QGIS %s' % short_version)
    unregister_uninstall('QGIS %s' % short_version)

    for icons in glob.glob(makepath(common_desktop,"QGIS*")):
        remove_tree(icons)

    for items_startmenu in glob.glob(makepath(start_menu(1),"Programs","QGIS*")):
        if isdir(makepath(start_menu(1),"Programs",items_startmenu)):
            remove_tree(makepath(start_menu(1),"Programs",items_startmenu))


def install():
    versionsoft = control['version'].split('-')[0]
    current_qgis_version = get_qgis_version()
    print("Installed version : %s" % current_qgis_version)
    print("Package version : %s" % versionsoft)
    if Version(versionsoft) != Version(current_qgis_version):
        print("QGIS %s needs to be updated" % current_qgis_version)
        remove_qgis()
        killalltasks(exename)
        time.sleep(20)
        print('installing tis-qgis-osgeo4w-%s' % versionsoft)
        run('"QGIS-OSGeo4W-%s-1-Setup-x86.exe" /S' % versionsoft)
        print('Installation finished, waiting for shortcuts to populate')
        time.sleep(20)
    else:
        print("QGIS %s already up-to-date, skipping install" % current_qgis_version)


def uninstall():
    versionsoft = control['version'].split('-')[0]
    print('uninstalling tis-qgis-osgeo4w-%s-1-setup-x86' % versionsoft)
    killalltasks(exename)
    remove_qgis()






    

manifest

Couldn't retrieve manifest.