Tranquil IT recrute Tranquil IT recrute

tis-geogebra

Version : 6.0.394.0-1

Download
  • package : tis-geogebra
  • editor :
  • version : 6.0.394.0-1
  • licence :
  • architecture : all
  • locale :
  • description : La calculatrice graphique pour les Fonctions, la Geometrie, l'Algebre, le Calcul Differentiel, les Statistiques et la 3D !
  • description_fr :
  • min_os_version :
  • max_os_version :
  • min_wapt_version :
  • installed_size :
  • impacted_process :
  • signature_date : 20180227-190033
  • maintainer : Tranquil it systems
  • Depends :

setup.py

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

uninstallkey = []

""" You can do a CTRL F9 in pyscripter to update the package """

def install():
    softname = 'GeoGebra'
    versionsoft = control['version'].split('-',1)[0]
    fileversion = versionsoft.replace('.','-')

    check_installed = installed_softwares(softname)
    if check_installed:
             for uninstall in check_installed:
                   if Version(uninstall['version']) < Version(versionsoft) :
                         print(u'remove old software')
                         killalltasks("javaw.exe")
                         cmd = WAPT.uninstall_cmd(uninstall['key'])
                         run(cmd)
                         time.sleep(5)

    install_msi_if_needed('GeoGebra-Windows-Installer-%s.msi' % fileversion,killbefore=['javaw.exe'], properties={'ALLUSERS':2})
    remove_desktop_shortcut('GeoGebra')

""" You can do a CTRL F9 in pyscripter to update the package """


def update_package():

    import urllib2
    import requests
    import ssl


    masterversion = '6.0'
    """I retrieve the current version from the official site >>>"""
    versionfile = wgets("https://download.geogebra.org/installers/%s/version.txt" % masterversion)
    realversion = versionfile.replace('-','.')
    print('Latest Version : ' + realversion)

    """I write the version in the control file >>>"""

    os.chdir(os.path.dirname(__file__))

    from waptpackage import PackageEntry
    pe = PackageEntry()
    pe.load_control_from_wapt(os.getcwd())

    pe.version = realversion + '-0'
    pe.save_control_to_wapt(os.getcwd())

    """
    I list all the msi file of the package and test the msi version
    if the version returned by the msi does not correspond to the previous one, I delete the file
    >>>
    """

    allmsi = glob.glob('*.msi')
    for msi in allmsi:
            vers = get_msi_properties(msi)['ProductVersion']
            if  vers != realversion :
                remove_file(msi)

    """I download the file if it does not exist >>>"""
    if not isfile('GeoGebra-Windows-Installer-%s.msi' % versionfile) :
        wget('https://download.geogebra.org/installers/%s/GeoGebra-Windows-Installer-%s.msi' % (masterversion,versionfile),os.getcwd())

    print('The update is complete, you can now test and then launch a build upload.')

if __name__ == '__main__':
    update_package()

			

Changelog

"""{% trans %}No changelog.{% endtrans %}"""
			

manifest.sha256

[["WAPT/icon.png", "171ca2395508a9d2085f592246d7aa3886d8793100e986d3df4aad0547226d86"], ["WAPT/certificate.crt", "79e5388683c0b6cb03f4f81e4e58e3a11463b2b6cf169dd9c453098027dcfaa4"], ["WAPT/wapt.psproj", "795d36d10109ca85357285f79090fac2be856e5830ea31fa913cc55cb825807b"], ["GeoGebra-Windows-Installer-6-0-394-0.msi", "804133fcc2d951595f75a918106b904f5bfb08efacab87d0dd8cb3c0f810c33d"], ["setup.py", "d5a80437ef99fa7afe3518a8e9b470be99cadffecc23d5df225243fdb1d3bf53"], ["WAPT/control", "9b79cb12b89381c495d830d5347334132ef3fa34708c3466657275fbc3f3521c"]]