tis-qgis-x64 2.18.19-8

  • package : tis-qgis-x64
  • version : 2.18.19-8
  • description : QGIS - SIG Libre et Open Source - x64
  • maintainer : TIS
  • date : 2018-04-26 09:33:35

setup.py

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

uninstallkey = []

short_version = "2.19"
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))

    for items in glob.glob(makepath(programfiles32,'QGIS*')):
        run_notfatal('"%s" /S ' %  makepath(programfiles32,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,win64app=True)

    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_64.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_64' % versionsoft)
    killalltasks(exename)
    remove_qgis()






    

Changelog

No changelog
    

manifest.sha256

[["WAPT/icon.png", "e18db709c36dd19c4815b7832587119de232543c42c32133926d5d36eebbf00a"], ["WAPT/certificate.crt", "79e5388683c0b6cb03f4f81e4e58e3a11463b2b6cf169dd9c453098027dcfaa4"], ["WAPT/wapt.psproj", "324f014e8690c45eb9cc515b7b8bf77b5ca20a7e2e283f7d1964197786696fae"], ["QGIS-OSGeo4W-2.18.19-1-Setup-x86_64.exe", "c024520930ad8d2f610da2358104e151ec5c8dcce8cde737b5dd828107568ec3"], ["info.txt", "b8247ee0fbc1bbf7e5adc98017f53562ed9534545eec0d5fa9a23ff4a9804db3"], ["setup.py", "1af881b188e35b16455480647a4a046a81a5e49b0f5342fda3d5d11e2e622a77"], ["WAPT/control", "158f84ac18d1d8fa838548c10bc8dbf3939423c32ed37d7100e377cc52bf8f91"]]