tis-scratch

456.0.4-1
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.
2404 downloads
Download

  Description 

  • package : tis-scratch
  • version : 456.0.4-1
  • architecture : all
  • categories :
  • maintainer : Simon Fonteneau
  • 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.
  • 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 :
  • description_pt :
  • description_it :
  • description_nl :
  • description_ru :
  • editor :
  • licence :
  • signature_date : 2020-02-27T21:41:20.311334
  • 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","a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf"],["WAPT/wapt.psproj","602f837dd2593d9ce4b1fd8e26f485eae6f5fe53f38129fed2c09062247e9a22"],["Scratch-456.0.4.exe","2f9472e82e80b59bc24d5ab7c9b093d8f36ed89aaaa914ed798ea56e5b7ca91b"],["setup.py","1f64f65db681a705097a0955b5781a50cc5c8c1e401c29ce6aa3ca8caf4d9127"],["WAPT/control","6ed61ff7289c72d806859a5470cb49ec60fce3a75efbc185c7994fbecc124b5c"]]