Détails du package smp-freeplane_1.7.5-1_all_all.wapt
retour Revenir à la liste des packages

smp-freeplane

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

Fichier control :

package           : smp-freeplane
version           : 1.7.5-1
architecture      : all
section           : base
priority          : optional
maintainer        : Simon Fonteneau
description       : Freeplane is a free and open source software application that supports thinking, sharing information and getting things done at work, in school and at home
depends           : smp-java
conflicts         : 
maturity          : 
locale            : all
target_os         : windows
min_os_version    : 
max_os_version    : 
min_wapt_version  : 
sources           : 
installed_size    : 91475968
impacted_process  : freeplane.exe
description_fr    : Freeplane est un logiciel open source qui vous permet d'organiser, visualiser et partager des informations rapidement.
description_pl    : 
description_de    : 
description_es    : 
audit_schedule    : 
editor            : 
keywords          : 
licence           : 
homepage          : 
package_uuid      : 0fff1c0d-7136-4d27-9676-281966320bd2
signer            : wapt.lesfourmisduweb.org
signer_fingerprint: 8da83ebdac1a25e820b186510d049f47407b11835b0664fdc5bacd3595b1671d
signature         : uhoWslxV8WUQmIW+n8+H0JRTkP2QRy/5oTXpeypBcSddQB+IVP65EiyBVl1vd97cDfgYiFpdFZs35LOi/vSUFkSHJK+dSWMZOq7NNeWw77BU+S/yNe5TnLrwT0VGwenv2RnMmP9SLfHZWCiGbW7bbmmv5rzSwAbSi2ZTUAv+7wl8te1PSiseuxMCqCmcJdREd4LQckv1tvFt5QtxyrZErbGpeqfvevQUPvEZO3xlPG0zHavdR4xbqdohO07nq9hencChQouEtRIt/jHdsEJfl5SsNxscgPkA1fq0/qDGoMJndvLAn2MdikFVDbI7ZRxQFP+ucsAsJi3nM1yjVGUa8w==
signature_date    : 20190204-205811
signed_attributes : package,version,architecture,section,priority,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,signer,signer_fingerprint,signature_date,signed_attributes






Fichier setup.py :

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

uninstallkey = []


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

def install():

    diskfreespacebefore = get_disk_free_space(programfiles)

    print('installing smp-freeplane')
    versionpaquet = control['version'].split('-',1)[0]
    install_exe_if_needed("Freeplane-Setup-%s.exe" % versionpaquet ,'/VERYSILENT','{D3941722-C4DD-4509-88C4-0E87F675A859}_is1',versionpaquet)
    remove_desktop_shortcut('FreePlane')

    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 requests
    """I retrieve the current version from the official site >>>"""
    htmlsource=wgets("https://www.freeplane.org/wiki/index.php/Main_Page")
    for line in htmlsource.splitlines() :
        if ' version ' in line :
            realversion = line[line.find(" version ") + 9 :line.find(')')]
            break

    """I download the file if it does not exist >>>"""
    if not isfile("Freeplane-Setup-%s.exe" % realversion):
        url = requests.head('https://downloads.sourceforge.net/project/freeplane/freeplane%20stable/Freeplane-Setup-' + realversion + '.exe' ,proxies={}).headers['Location']
        wget(url, "Freeplane-Setup-%s.exe" % realversion)

    """
    I list all the exe file of the package and test a filename
    if name returned does not correspond to the previous one, I delete the file
    >>>
    """

    allexe = glob.glob('*.exe')
    for exe in allexe:
        if exe != "Freeplane-Setup-%s.exe" % realversion :
            remove_file(exe)

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

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



if __name__ == '__main__':
    update_package()