tis-octave icon

Octave

Paquet d’installation silencieuse pour Octave

9.2.0-13

  • package: tis-octave
  • name: Octave
  • version: 9.2.0-13
  • categories: Development
  • maintainer: WAPT Team,Tranquil IT,Simon Fonteneau,Pierre Cosson,Jimmy PELÉ
  • licence: GPLv3
  • locale: all
  • target_os: windows
  • impacted_process: mkoctfile,octave-cli,octave-config,octave-gui,octave-svgconvert,pacman
  • architecture: x64
  • signature_date:
  • size: 743.87 Mo
  • installed_size: 2.05 Go
  • homepage : https://www.gnu.org/software/octave/

package           : tis-octave
version           : 9.2.0-13
architecture      : x64
section           : base
priority          : optional
name              : Octave
categories        : Development
maintainer        : WAPT Team,Tranquil IT,Simon Fonteneau,Pierre Cosson,Jimmy PELÉ
description       : GNU Octave is a free software of numerical computation comparable to MATLAB and Scilab. This is not a formal calculation software. The software is developed and maintained for the GNU project by John W. Eaton.
depends           : 
conflicts         : 
maturity          : PROD
locale            : all
target_os         : windows
min_wapt_version  : 2.0
sources           : https://www.gnu.org/software/octave/download#ms-windows
installed_size    : 2046398976
impacted_process  : mkoctfile,octave-cli,octave-config,octave-gui,octave-svgconvert,pacman
description_fr    : GNU Octave est un logiciel libre de calcul numérique comparable à MATLAB et à Scilab. Ce n'est pas un logiciel de calcul formel. Le logiciel est développé puis maintenu pour le projet GNU par John W. Eaton
description_pl    : GNU Octave to wolne oprogramowanie do obliczeń numerycznych porównywalne z MATLABem i Scilabem. Nie jest to oprogramowanie do obliczeń formalnych. Oprogramowanie jest rozwijane i utrzymywane dla projektu GNU przez Johna W. Eatona
description_de    : GNU Octave ist eine freie Software für numerische Berechnungen, vergleichbar mit MATLAB und Scilab. Es handelt sich nicht um eine formale Berechnungssoftware. Die Software wird für das GNU-Projekt von John W. Eaton entwickelt und gepflegt
description_es    : GNU Octave es un software libre de cálculo numérico comparable a MATLAB y Scilab. No es un software de cálculo formal. El software es desarrollado y mantenido para el proyecto GNU por John W. Eaton
description_pt    : GNU Octave é um software livre de computação numérica comparável ao MATLAB e Scilab. Este não é um software de cálculo formal. O software é desenvolvido e mantido para o projecto GNU por John W. Eaton
description_it    : GNU Octave è un software libero di calcolo numerico paragonabile a MATLAB e Scilab. Non si tratta di un software di calcolo formale. Il software è sviluppato e mantenuto per il progetto GNU da John W. Eaton
description_nl    : GNU Octave is een vrije software voor numerieke berekeningen, vergelijkbaar met MATLAB en Scilab. Het is geen formele berekeningssoftware. De software wordt ontwikkeld en onderhouden voor het GNU-project door John W. Eaton
description_ru    : GNU Octave - это свободная программа численных расчетов, сравнимая с MATLAB и Scilab. Это не программное обеспечение для формальных вычислений. Программа разработана и поддерживается для проекта GNU Джоном В. Итоном
audit_schedule    : 
editor            : 
keywords          : 
licence           : GPLv3
homepage          : https://www.gnu.org/software/octave/
package_uuid      : 2e30843c-6a9f-4ecb-80aa-d9ef60ea2b39
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : https://wiki.octave.org/Release_History
min_os_version    : 6.1
max_os_version    : 
icon_sha256sum    : 04ad4a54275011416e7b8e72607ad40a37c4b37ba1155ce36e3025fefb5b82ed
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature         : mr53V1veqcm63AUKkQUS02xAsmWOghL2A+WzS4lBQUcnHU4tFRsbpYGsW7z114mSyJcHz38ijkXhfzvSjbgZK1J1v8wrvTEKwARqoNJc5Z/OUdF/aFV+usV8NDgcAoDwt3sN+r6WcPE4iqMaI+Xje19fbrx1v0L9sZtfK3fFpHQvA/fDL1LwNGAsmFwkcNEik1qrPxWxTbjHeiy82cjDZsckY9jPbXoxuBck66q8udOH7zzgtuyaUV1raD5RNwQGmaOeI6dZ/u1delqevcHl14qjrERfsOkbDNh/xQ8Hf9yYQxC0vdzMTP76gBBfEwjDHSNrVisvgwrmpGOwbAHXQg==
signature_date    : 2024-06-18T15:03:20.832352
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes

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

r"""
Usable WAPT package functions: install(), uninstall(), session_setup(), audit(), update_package()

UninstallKey                           Software                                                              Version             Uninstallstring
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Octave-5.1.0.0                         Octave 5.1.0.0                                                        5.1.0.0             C:\Octave\Octave-5.1.0.0\uninstall.exe

"""
# Declaring global variables - Warnings: 1) WAPT context is only available in package functions; 2) Global variables are not persistent between calls
bin_contains = "octave"
app_name = "Octave"
app_uninstallkey = "Octave"
app_dir = makepath(programfiles, app_name)
app_path = makepath(app_dir, "octave.vbs")


def install():
    # Declaring local variables
    package_version = control.get_software_version()
    bin_name = glob.glob("*%s*.zip" % bin_contains)[0]

    # Removing non-portable versions
    for to_uninstall in installed_softwares("Octave-"):
        print("Removing: %s (%s)" % (to_uninstall["name"], to_uninstall["version"]))
        killalltasks(control.impacted_process.split(","))
        run(uninstall_cmd(to_uninstall["key"]))
        wait_uninstallkey_absent(to_uninstall["key"])
        time.sleep(10)
    # Getting installed software version
    if installed_softwares(uninstallkey=app_uninstallkey):
        installed_version = installed_softwares(uninstallkey=app_uninstallkey)[0]["version"]
    else:
        installed_version = None

    # Installing software
    print("Installing: %s" % app_name)
    if installed_version is None or Version(installed_version) < Version(package_version) or force:
        killalltasks(control.get_impacted_process_list())
        if isdir(app_dir):
            remove_tree(app_dir)
        mkdirs(app_dir)
        print("Extracting: %s to: %s" % (bin_name, app_dir))
        unzip(bin_name, ".")
        temp_dir = bin_name.rsplit(".", 1)[0]
        for file_to_move in glob.glob("%s/*" % temp_dir):
            shutil.move(file_to_move, app_dir)
        remove_tree(temp_dir)

        # Creating shortcuts
        # "C:\Program Files\Octave\mingw64\share\octave\6.4.0\imagelib\octave-logo.ico"
        icon_path = makepath(app_dir, "mingw64", "share", "octave", package_version, "imagelib", "octave-logo.ico")
        create_desktop_shortcut(app_name, app_path, icon=icon_path)
        create_programs_menu_shortcut(app_name, app_path, icon=icon_path)

        # Adding software to "list-registry"
        print("Registering: %s to Windows Registry" % app_name)
        register_windows_uninstall(control, win64app=iswin64())
        register_uninstall(app_name, win64app=iswin64(), icon=icon_path)
    else:
        print("%s is already installed. Skipping" % app_name)


def uninstall():
    # Uninstalling software
    killalltasks(control.get_impacted_process_list())
    if isdir(app_dir):
        remove_tree(app_dir)
    unregister_uninstall(app_name, win64app=iswin64())

    # Removing shortcuts
    remove_desktop_shortcut(app_name)
    remove_programs_menu_shortcut(app_name)


def audit():
    # Declaring local variables
    package_version = control.version.split("-", 1)[0]
    app_name = control.name

    # Getting installed software version
    if installed_softwares(uninstallkey=app_uninstallkey):
        installed_version = installed_softwares(uninstallkey=app_uninstallkey)[0]["version"]
    else:
        installed_version = None

    # Auditing software
    print("Auditing: %s" % control.package)
    if installed_version is None:
        print("%s is not installed" % app_name)
        return "ERROR"
    elif Version(installed_version) != Version(package_version):
        print("%s is installed in version (%s) instead of (%s)" % (app_name, installed_version, package_version))
        return "WARNING"
    else:
        print("%s is installed in correct version (%s)" % (app_name, installed_version))
        return "OK"

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


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.gnu.org/software/octave/download#ms-windows"
    if control.architecture == "x64":
        arch = "w64"
    else:
        arch = "w32"

    bin_ends = ".zip"
    bin_contains = "octave"

    # Getting latest version from official sources
    print("URL used is: %s" % url)
    for bs_search in bs_find_all(url, "a", proxies=proxies, timeout=10):
        if bin_contains in bs_search["href"] and arch in bs_search["href"] and bin_ends in bs_search["href"]:
            version = bs_search["href"].split("-")[-2]
            latest_bin = bs_search["href"].split("/")[-1]
            download_url = bs_search["href"]
            break

    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, connect_timeout=100, 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

f4e5ac5b0bb96a234fb7fda538fe9458519c17b43d3629874bafdb1a035a747c : setup.py
5846a8ebdc675697d86bbade3b64faac9f1b21310a8f791cc61d19d4f2596e5b : update_package.py
04ad4a54275011416e7b8e72607ad40a37c4b37ba1155ce36e3025fefb5b82ed : WAPT/icon.png
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
e588545b2f929373bb50774c6289db35a21801411dcc7ee385ad8cc085389cdd : luti.json
8507e0c8c5480a3a1f7d66cba8e6d84f8614fb149eed4983f5c3bb4b438382e4 : octave-9.2.0-w64.zip
59c960f8dc1544810e161dbe7b82a7fd202d148c40749ec51e168df36dd2af0c : WAPT/control