Détails du package smp-geogebra_6.0.546.0-1_all.wapt
retour Revenir à la liste des packages

smp-geogebra

ATTENTION CE DÉPÔT n'est plus compatible 1.3 vous devez migrer en 1.5.1.21 !

Fichier control :

package           : smp-geogebra
version           : 6.0.546.0-1
architecture      : all
section           : base
priority          : optional
name              : 
categories        : 
maintainer        : Lesfourmisduweb
description       : La calculatrice graphique pour les Fonctions,  la Geometrie, l'Algebre, le Calcul Differentiel, les Statistiques et la 3D !
depends           : smp-java
conflicts         : 
maturity          : 
locale            : 
target_os         : windows
min_os_version    : 
max_os_version    : 
min_wapt_version  : 
sources           : 
installed_size    : 263180288
impacted_process  : GeoGebra.exe
description_fr    : 
description_pl    : 
description_de    : 
description_es    : 
audit_schedule    : 
editor            : 
keywords          : 
licence           : 
homepage          : 
package_uuid      : af1a7814-3933-4d54-8885-0ab4bcd16781
valid_from        : 
valid_until       : 
forced_install_on : 
signer            : wapt.lesfourmisduweb.org
signer_fingerprint: 8da83ebdac1a25e820b186510d049f47407b11835b0664fdc5bacd3595b1671d
signature         : M8zpLBU0JO+t0kp2tbTDuwRxxeDPBLh09AbF4ESgOTmMDgEAb4oPnKm1FKR+K0LnFTebjRtBB7nkVRSoVhhjXxuRlUYvEDZnHRClQQfXyiUPYgzKeYP1oI1vGmPxQ9XOyuv5THJL6NE3Ou+x7bK58mJxDJK8pLSh5+0AjFQtsLedChNsb4vbEcmBc5Y3BTzniOGw959B3aLjHmhFEU4zlYBZ3peGcP0WFe449HaO/R5Vy4I2koQs0agYlWX9g3nP527kPFpbHVKXgc2UQythyNPS+7FD47hdM6PO+1859hj5P8ebO9LT6e5nJy0FVJW3bgNKOuzBO0TDZfr5QxNIqQ==
signature_date    : 2019-06-29T13:40:54.809000
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_os_version,max_os_version,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,signer,signer_fingerprint,signature_date,signed_attributes






Fichier 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():

    diskfreespacebefore = get_disk_free_space(programfiles)

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

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

    WAPT.options.force = True


    for msi in glob.glob(makepath(programfiles32,'GeoGebra Classic','*.msi')):
        remove_file(msi)
    if not isdir(makepath(programfiles32,'GeoGebra Classic')):
        mkdirs(makepath(programfiles32,'GeoGebra Classic'))
    filecopyto('GeoGebra-Windows-Installer-%s.msi' % fileversion,makepath(programfiles32,'GeoGebra Classic','GeoGebra-Windows-Installer-%s.msi' % fileversion))
    install_msi_if_needed(makepath(programfiles32,'GeoGebra Classic','GeoGebra-Windows-Installer-%s.msi' % fileversion),killbefore=['javaw.exe'], properties={'ALLUSERS':2})
    remove_desktop_shortcut('GeoGebra')

    diskfreespaceafter = get_disk_free_space(programfiles)
    difffreespace = diskfreespacebefore - diskfreespaceafter
    print(ur"Espace disque necessaire pour l'installation : " + str(difffreespace))



""" 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()


def uninstall():
    for msi in glob.glob(makepath(programfiles32,'GeoGebra Classic','*.msi')):
        remove_file(msi)