tis-7zip

24.9-46
7-Zip est un logiciel gratuit et open source d'archivage de fichiers avec un taux de compression élevé
43829 téléchargements
Télécharger
Voir le résultat de la construction Voir l'analyse de VirusTotal
tis-7zip icon
  • package : tis-7zip
  • name : 7-Zip
  • version : 24.9-46
  • categories : Utilities
  • maintainer : WAPT Team,Tranquil IT,Jimmy PELÉ
  • editor : Igor Pavlov
  • licence : opensource_free,cpe:/a:bsd:bsd_license,cpe:/a:gnu:lgpl_v3,wapt_public
  • locale : all
  • target_os : windows
  • impacted_process : 7z,7zFM,7zG
  • architecture : x64
  • signature_date : 2024-12-08 23:21
  • size : 1.63 Mo
  • installed_size : 5.77 Mo
  • homepage : https://www.7-zip.org/
package           : tis-7zip
version           : 24.9-46
architecture      : x64
section           : base
priority          : optional
name              : 7-Zip
categories        : Utilities
maintainer        : WAPT Team,Tranquil IT,Jimmy PELÉ
description       : 7-Zip is a free and open-source file archiver with a high compression ratio
depends           : 
conflicts         : 
maturity          : PROD
locale            : all
target_os         : windows
min_wapt_version  : 2.1
sources           : https://www.7-zip.org/download.html
installed_size    : 5774712
impacted_process  : 7z,7zFM,7zG
description_fr    : 7-Zip est un logiciel gratuit et open source d'archivage de fichiers avec un taux de compression élevé
description_pl    : 7-Zip to darmowy i open-source'owy archiwizator plików o wysokim stopniu kompresji
description_de    : 7-Zip ist ein Datenkompressionsprogramm mit einer hohen Kompressionsrate
description_es    : 7-Zip es un archivador de ficheros con una alta relación de compresión
description_pt    : O 7-Zip é um compactador de arquivos com alta taxa de compressão
description_it    : 7-Zip è un archiviatore di file gratuito e open-source con un elevato rapporto di compressione
description_nl    : 7-Zip is een gratis en open-source bestands-archiver met een hoge compressieverhouding
description_ru    : 7-Zip свободный файловый архиватор с высокой степенью сжатия данных
audit_schedule    : 
editor            : Igor Pavlov
keywords          : 7zip,7,zip,7-zip,file,archiver,high,compression,ratio
licence           : opensource_free,cpe:/a:bsd:bsd_license,cpe:/a:gnu:lgpl_v3,wapt_public
homepage          : https://www.7-zip.org/
package_uuid      : c5a316f5-fd2b-4c1c-bbc1-9d2f28c671d9
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : https://www.7-zip.org/history.txt
min_os_version    : 5.0
max_os_version    : 
icon_sha256sum    : eddc038d3625902b6ddeaabd13dd91529e8d457ffbd0c554f96d343ae243a67a
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2024-12-08T23:21:37.000000
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
signature         : InWrcMwAobuRdcz7o33OQb4GYhkyn20SsP13dFTHOmbwqG1xsyJtC3yS4W5HFDZMJR1tglIyPK88jtrjfF824vOA8nuyRIUd4dbaa+gKCSJnP+eXO0rnJWS/Jy9YjgFC6JRpg6sgKo12T7+VOpNbbSDqIdEbz88FjlOZ/gFe6vvmeTlNoYgaabE7s5zU2n/v/T7RZmseFKif4zaD3AaQvMIssVjBQ3200uxO6BknVHfRnJdhhqWbktcrmiPf8WykFLTs0aBJ9ZmOnfztmjkpcR1TjofcmBy+HN8kKFlT/aZ7fbuv8RVztKPIpLvRSMWnXatclNxysXDz2b8fsn/d2A==
# -*- coding: utf-8 -*-
from setuphelpers import *

ext_file_association = [
    ".7z",
    ".zip",
    ".rar",
    ".001",
    # ".cab",
    # ".iso",
    ".xz",
    ".txz",
    ".lzma",
    ".tar",
    ".cpio",
    ".bz2",
    ".bzip2",
    ".tbz2",
    ".tbz",
    ".gz",
    ".gzip",
    ".tgz",
    ".tpz",
    ".z",
    ".taz",
    ".lzh",
    ".lha",
    ".rpm",
    ".deb",
    ".arj",
    # ".vhd",
    # ".vhdx",
    ".wim",
    ".swm",
    # ".esd",
    # ".fat",
    # ".ntfs",
    ".dmg",
    ".hfs",
    ".xar",
    ".squashfs",
    ".apfs",
]
app_dir = makepath(programfiles, "7-Zip")


def install():
    # Uninstalling other versions of the software (including switching from MSI to EXE)
    for to_uninstall in installed_softwares(name="^7-Zip"):
        if Version(to_uninstall["version"]) != Version(control.get_software_version()) or force:
            print("Removing: %s (%s)" % (to_uninstall["name"], to_uninstall["version"]))
            try:
                killalltasks(ensure_list(control.impacted_process))
                run(uninstall_cmd(to_uninstall["key"]))
                wait_uninstallkey_absent(to_uninstall["key"])
            except Exception as e:
                print(e)
                print("Remove failed: %s (%s)\nContinuing..." % (to_uninstall["name"], to_uninstall["version"]))

    # Installing the software
    bin_name = glob.glob("7z*.exe")[0]
    install_exe_if_needed(
        bin_name,
        "/S",
        "7-Zip",
        min_version=control.version.split("-", 1)[0],
    )

    # File association for 7-Zip
    for ext in ext_file_association:
        register_ext(
            "7-zip",
            ext,
            '"%s" "%%1"' % (makepath(app_dir, "7zFM.exe")),
            icon="%s,1" % (makepath(app_dir, "7z.dll")),
        )

    # Adding 7z in path
    add_to_system_path(app_dir)


def uninstall():
    # Deleting 7z from path
    remove_from_system_path(app_dir)

    # Removing any remaining files
    if isdir(app_dir):
        killalltasks(ensure_list(control.impacted_process))
        # killalltasks("explorer") # can help
        remove_tree(app_dir)
# -*- coding: utf-8 -*-
from setuphelpers import *
import requests

r""" PS C:\waptdev\wapt-packages\7zip> wapt-get list-registry zip --json
{
 "output":[],
 "config_filename":"C:\\Program Files (x86)\\wapt\\wapt-get.ini",
 "result":[
  {
   "key":"7-Zip",
   "name":"7-Zip 22.01 (x64)",
   "version":"22.01",
   "install_date":"",
   "install_location":"C:\\Program Files\\7-Zip\\",
   "uninstall_string":"\"C:\\Program Files\\7-Zip\\Uninstall.exe\"",
   "publisher":"Igor Pavlov",
   "system_component":0,
   "win64":true
  },
  {
   "key":"{23170F69-40C1-2702-2201-000001000000}",
   "name":"7-Zip 22.01 (x64 edition)",
   "version":"22.01.00.0",
   "install_date":"2023-06-20 00:00:00",
   "install_location":"",
   "uninstall_string":"MsiExec.exe /I{23170F69-40C1-2702-2201-000001000000}",
   "publisher":"Igor Pavlov",
   "system_component":0,
   "win64":true
  },
  {
   "key":"{23170F69-40C1-2702-2300-000001000000}",
   "name":"7-Zip 23.00 (x64 edition)",
   "version":"23.00.00.0",
   "install_date":"2023-05-17 00:00:00",
   "install_location":"",
   "uninstall_string":"MsiExec.exe /I{23170F69-40C1-2702-2300-000001000000}",
   "publisher":"Igor Pavlov",
   "system_component":0,
   "win64":true
  }
 ]
} """


def update_package():
    # Declaring local variables
    package_updated = False
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    url = "https://www.7-zip.org/download.html"
    download_dict = {
        "windows-x64": "https://www.7-zip.org/a/7znodotversion-x64.exe",
        "windows-arm64": "https://www.7-zip.org/a/7znodotversion-arm64.exe",
        "windows-x86": "https://www.7-zip.org/a/7znodotversion.exe",
        "linux-x64": "https://www.7-zip.org/a/7znodotversion-linux-x64.tar.xz",
        "linux-arm64": "https://www.7-zip.org/a/7znodotversion-linux-arm64.tar.xz",
        "darwin-all": "https://www.7-zip.org/a/7znodotversion-mac.tar.xz",
    }

    # Getting latest version from official sources
    print("URL used is: %s" % url)
    for bs_search in bs_find_all(url, "b", proxies=proxies):
        if "Download 7-Zip " in bs_search.text and not "beta" in bs_search.text:
            version = bs_search.text.split("Zip ")[-1].split(" (")[0]
            nodotversion = version.replace(".", "")
            download_url = download_dict[control.target_os + "-" + ensure_list(control.architecture)[0]].replace("nodotversion", nodotversion)
            latest_bin = download_url.split("/")[-1]
            if requests.head(download_url, proxies=proxies, allow_redirects=True).status_code == 200:
                break

    # Downloading latest binaries
    print("Latest %s version is: %s" % (control.name, version))
    print("Download URL is: %s" % download_url)
    if not isfile(latest_bin):
        print("Downloading: %s" % latest_bin)
        wget(download_url, latest_bin, proxies=proxies)
    else:
        print("Binary is present: %s" % latest_bin)

    # Checking version from file
    version_from_file = get_version_from_binary(latest_bin)
    if Version(version_from_file, 4) != Version(version, 4) 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, latest_bin.replace(version, version_from_file))
        version = version_from_file
    else:
        print("Binary file version corresponds to online version")

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

    # Deleting outdated binaries
    remove_outdated_binaries(latest_bin)

    # Validating or not update-package-sources
    return package_updated
bdd1a33de78618d16ee4ce148b849932c05d0015491c34887846d431d29f308e : 7z2409-x64.exe
38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
33ce061c37bebc0b34e8f588a1895ba0481f623ec713eac408a8fc52270996f4 : WAPT/changelog.txt
09d6a492a0d42b375f411165f771e46829f3cc99f9afc6cfb6f751cc0c5f10a4 : WAPT/control
eddc038d3625902b6ddeaabd13dd91529e8d457ffbd0c554f96d343ae243a67a : WAPT/icon.png
47f988d3df31a2e8e706175abe9aa4aa8676db2235c96de8f94c420ca5332a94 : luti.json
dc19494b10ca1c642d0b2b7cd3c80b0a36227f7689bda6755c22824da16c02eb : setup.py
d2c02826b56271babf41b36478a48d95a670b30af33db5986f797b8feca8080f : update_package.py
22.1-45
===
ignore beta version
switch to exe install
making sure version exists in update_package
.cab files should not be opened with 7z by default

21.07-40   
===
Add 7z to path
translating control

21.07-38
===
Now fixing mismatching software architectures
Reordered ext_file_association (to match with the software displaying) and no longer assiociate vhd* ext
min_wapt_version  : 2.0

21.07-36
===
Switching update_package() to update_package.py