tis-scratch 456.0.4-1

  • package : tis-scratch
  • version : 456.0.4-1
  • architecture : all
  • locale :
  • description : Scratch est un logiciel libre conçu pour initier les élèves dès l'âge de 8 ans à des concepts fondamentaux en mathématiques et en informatique.
  • maintainer : Simon Fonteneau
  • date : 2018-02-27 19:07:56
  • min_wapt_version :
  • min_os_version :
  • max_os_version :
  • impacted_process :
  • 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():

    versionpaquet = control['version'].split('-',1)[0]
    softname = 'Scratch'
    check_installed = installed_softwares(softname)
    if check_installed:
             for uninstall in check_installed:
                    key=uninstall['key']
                    if installed_softwares(uninstallkey=key):
                       print(u'remove old software')
                       killalltasks("Scratch 2.exe")
                       killalltasks("Scratch.exe")
                       cmd = WAPT.uninstall_cmd(uninstall['key'])
                       run_notfatal(cmd)
                       time.sleep(5)

    if isdir(makepath(programfiles32,'Scratch 2')):
        remove_tree(makepath(programfiles32,'Scratch 2'))

    if isdir(makepath(programfiles64,'Scratch 2')):
        remove_tree(makepath(programfiles64,'Scratch 2'))

    print('installing scratch2offlineeditor')
    install_exe_if_needed('Scratch-%s.exe' % versionpaquet,silentflags='-silent -eulaAccepted -programMenu',key='edu.media.mit.Scratch2Editor',min_version=versionpaquet,killbefore=['Scratch.exe','Scratch 2.exe'])


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






def update_package():


    htmlSource= wgets("https://scratch.mit.edu/scratchr2/static/sa/version.xml").splitlines()
    for line in htmlSource :
            if 'versionNumber' in line:
                vers = line.replace('    <versionNumber>','').replace('</versionNumber>','')
                print('Lastest Version : ' + vers)

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


    exes = glob.glob('*.exe')
    for fn in exes:
            if fn != 'Scratch-%s.exe' % vers :
                remove_file(fn)

    if not isfile('Scratch-%s.exe' % vers):
        wget('https://scratch.mit.edu/scratchr2/static/sa/Scratch-%s.exe' %(vers) ,'Scratch-%s.exe' % vers)

if __name__ == '__main__':
    update_package()
    

Changelog

No changelog
    

manifest.sha256

WAPT/icon.png 711db5daf29831319996ca936c42315d2e01fd6bf4e568e312fa0f1f1b0921fd
WAPT/certificate.crt 79e5388683c0b6cb03f4f81e4e58e3a11463b2b6cf169dd9c453098027dcfaa4
WAPT/wapt.psproj 602f837dd2593d9ce4b1fd8e26f485eae6f5fe53f38129fed2c09062247e9a22
Scratch-456.0.4.exe 2f9472e82e80b59bc24d5ab7c9b093d8f36ed89aaaa914ed798ea56e5b7ca91b
setup.py 1f64f65db681a705097a0955b5781a50cc5c8c1e401c29ce6aa3ca8caf4d9127
WAPT/control eaadefe00b7b7b0bdcb784f20aee89253c8740a09a4d0b26cac6d39d728dd508