tis-scilab

6.1.1-1
Scilab
3064 downloads
Download
View on luti logo
tis-scilab icon

  Description 

  • package : tis-scilab
  • version : 6.1.1-1
  • architecture : x86
  • categories :
  • maintainer : Simon Fonteneau
  • description : Scilab
  • locale :
  • target_os : windows
  • min_wapt_version : 1.5.1.20
  • sources :
  • installed_size : 638062592
  • impacted_process : WScilex.exe
  • description_fr :
  • description_pl :
  • description_de :
  • description_es :
  • description_pt :
  • description_it :
  • description_nl :
  • description_ru :
  • editor :
  • licence :
  • signature_date : 2021-12-20T12:37:17.300049

  Setup.py 

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

uninstallkey = []
bin_contains='scilab-'

def install():
    softversion = control['version'].split('-',1)[0]
    force = WAPT and WAPT.options.force

    keywapt = 'scilab-%s_is1' % softversion

    print('installing Scilab')

    for soft in installed_softwares('scilab'):
       if soft['key'] !=  keywapt :
           run(uninstall_cmd(soft['key']))

    install_exe_if_needed("scilab-%s.exe" % softversion,silentflags='/SILENT',key='scilab-%s_is1' % softversion,min_version=" ",killbefore="WScilex.exe",timeout=600)

    remove_desktop_shortcut('scilab-%s' % softversion)
    remove_desktop_shortcut('scilab-%s Desktop' % softversion)


def update_package():
    # Declaring local variables
    result = False
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    app_name = control.name
    url = 'https://www.scilab.org/latest/'
    if control.architecture == 'x64':
        arch = 'x64'
    else:
        arch = 'x86'
    sub_bin_name = bin_contains + '%s' + arch

    # Getting latest version from official sources
    print("URL used is: %s" % url)
    version= wgets(url).split('href="/download/scilab-')[1].split('" hreflang="en">')[0]
    download_url='https://www.scilab.org/download/6.1.1/scilab-%s.exe' % version
    latest_bin=download_url.rsplit('/')[-1]

    print("Latest %s version is: %s" % (app_name, version))
    print("Download URL is: %s" % download_url)
    
    # Downloading latest binaries
    if not isfile(latest_bin):
        print("Downloading: %s" % latest_bin)
        wget(download_url, latest_bin, proxies=proxies)

        # Checking version from file
        version_from_file = get_version_from_binary(latest_bin)
        #if not version_from_file.startswith(version) and version_from_file != '':
        if Version(version_from_file) != Version(version) and version_from_file != '':
            print("Changing version to the version number of the binary (from: %s to: %s)" % (version, version_from_file))
            os.rename(latest_bin, bin_contains + version_from_file + bin_ends)
            version = version_from_file
        else:
            print("Binary file version corresponds to online version")

    # Changing version of the package
    if Version(version) > Version(control.get_software_version()):
        print("Software version updated (from: %s to: %s)" % (control.get_software_version(), Version(version)))
        result = True
    else:
        print("Software version up-to-date (%s)" % Version(version))
    control.version = '%s-%s' % (Version(version), control.version.split('-', 1)[-1])
    #control.set_software_version(version)
    control.save_control_to_wapt()

    # Deleting outdated binaries
    remove_outdated_binaries(version)

    # Validating or not update-package-sources
    return result
										

  Changelog 



No changelog.txt.
									
  manifest.sha256