tis-sweethome3d 5.5.2-1

  • package : tis-sweethome3d
  • version : 5.5.2-1
  • description : Sweet Home 3D est un logiciel libre d'aménagement d'intérieur qui vous aide à dessiner le plan de votre maison, y placer vos meubles et visiter le résultat en 3D.
  • maintainer : Simon Fonteneau
  • date : 2017-09-21 08:50:21
  • signer : TRANQUIL IT SYSTEMS
  • signature_date : 20170921-085015
  • min_os_version :
  • min_wapt_version :

setup.py

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

# registry key(s) where WAPT will find how to remove the application(s)
uninstallkey = []

def install():

    versionpaquet = control['version'].split('-',1)[0]

    def verssweet(key):
        return get_file_properties(makepath(key['install_location'],'SweetHome3D.exe'))['ProductVersion']

    install_exe_if_needed('SweetHome3D-%s-windows.exe' % versionpaquet ,silentflags='/sp /verysilent',key='Sweet Home 3D_is1',min_version=versionpaquet,get_version=verssweet)


def update_package():

    import requests,urlparse
    url = requests.head('https://sourceforge.net/projects/sweethome3d/files/latest/download?source=files',proxies={}).headers['Location']
    dstexe = requests.head(url,proxies={}).headers['Location'].replace('.jar','-windows.exe')
    filename = urlparse.unquote(dstexe.rsplit('/',1)[1])
    vers = filename.split('-')[1]
    print ("Latest Version : " + vers)

    exes = glob.glob('*.exe')
    for fn in exes:
        if fn != filename:
            remove_file(fn)

    if not isfile(filename):
        print('Downloading %s from %s'%(filename,dstexe))
        wget(dstexe,filename)
    else:
        print('Already up to date, skipped')

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

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

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


if __name__ == '__main__':
    update_package()


    

manifest

[["WAPT/icon.png", "2012f2384bf5cfeeb842a2076fe3b91e41b26fe8"], ["WAPT/certificate.crt", "0db563dc9077b268ca07ba834322d0fc5e21f8e5"], ["WAPT/wapt.psproj", "557e60050809687d56525e6ac46df9c0e02ccae6"], ["SweetHome3D-5.5.2-windows.exe", "8032375b04fe190ff6e3aee7cfd54e117001098d"], ["setup.py", "bf87a38356f30baed127862765523fb7e61b1a35"], ["WAPT/control", "b3f47fefa9133aae6a8d2a452fdbff5c6486e296"]]