tis-7zip 16.4-8

  • package : tis-7zip
  • version : 16.4-8
  • architecture : all
  • locale : all
  • description : compression archivage 7-zip pour x86 et x64
  • maintainer : TIS, Amelie LE JEUNE
  • date : 2018-02-27 18:54:53
  • min_wapt_version :
  • min_os_version :
  • max_os_version :
  • impacted_process :

setup.py

#!/usr/bin/python
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------
#    This file is part of WAPT
#    Copyright (C) 2013  Tranquil IT Systems http://www.tranquil.it
#    WAPT aims to help Windows systems administrators to deploy
#    setup and update applications on users PC.
#
#    WAPT is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    WAPT is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with WAPT.  If not, see <http://www.gnu.org/licenses/>.
#
# -----------------------------------------------------------------------
from setuphelpers import *
import glob

uninstallkey=[]

product_version = '16.04'
setup_version = product_version.replace('.','')
setup_filename_x86 = '7z%s.msi' % setup_version
setup_filename_x64 = '7z%s-x64.msi' % setup_version

def install():
    broken_7zip = [ soft for soft in installed_softwares('7-zip') if Version(soft['version']) < Version(product_version) ]
    if broken_7zip:
        for uninstall in broken_7zip:
            cmd = WAPT.uninstall_cmd(uninstall['key'])
            print(u'uninstalling %s' % (uninstall['name'],))
            # on execute la commande de desinstallation
            run(cmd)


    print("Installing 7-Zip %s"%(control.version,))
    if iswin64():
        install_msi_if_needed(setup_filename_x64,killbefore=['7zFM.exe'])
    else:
        install_msi_if_needed(setup_filename_x86,killbefore=['7zFM.exe'])

    # association des extensions a 7ZIP
    for ext in ('.001','.7z','.arj','.bz2','.bzip2','.cab','.cpio','.deb','.dmg','.fat',
            '.gz','.gzip','.hfs','.iso','.lha','.lzh','.lzma','.ntfs','.rar','.rpm',
            '.squashfs','.swm','.tar','.taz','.tbz','.tbz2','.tgz','.tpz','.txz','.vhd',
            '.wim','.xar','.xz','.z','.zip', '.zipe'):
        register_ext('7-zip',ext,'"%s" "%%1"' % (makepath(programfiles,'7-zip','7zFM.exe'),),icon="%s,1" % (makepath(programfiles,'7-zip','7z.dll')))

def update_package(control):
    if not isfile(setup_filename_x86):
        wget('http://www.7-zip.org/a/%s' % setup_filename_x86,setup_filename_x86)
    if not isfile(setup_filename_x64):
        wget('http://www.7-zip.org/a/%s' % setup_filename_x64,setup_filename_x64)
    for fn in glob.glob('7z*.msi'):
        if not fn in (setup_filename_x86,setup_filename_x64):
            remove_file(fn)
    update_control(control)

def update_control(control):
    packaging = control.version.rsplit('-',1)
    if packaging:
        packaging = packaging[1]
    else:
        packaging = '0'
    control.version = product_version+'-'+packaging

if __name__ == '__main__':
    control = PackageEntry()
    control.load_control_from_wapt('.')
    update_package(control)
    control.save_control_to_wapt('.')




    

Changelog

No changelog
    

manifest.sha256

WAPT/icon.png 3d79e3fb44d25506296abfd674a789945a165e3484cf1e12bbd05ff389b6bdb8
WAPT/certificate.crt 79e5388683c0b6cb03f4f81e4e58e3a11463b2b6cf169dd9c453098027dcfaa4
WAPT/wapt.psproj b26c073b8539e7d5e8ecc2b663bc5ecc30210ea639e056a319fe5f4658e6a20d
7z1604-x64.msi b3885b2f090f1e9b5cf2b9f802b07fe88e472d70d60732db9f830209ac296067
7z1604.msi d9b62c0ed0eb48d2df86d8b83394048414a2a4e1d64a50adb9abcff643471d20
setup.py 50b77e2da25b92297e92af8b861cab663541c14f30ce945f307ed26e467bcaa6
WAPT/control 7339c25b7de21d3d6d3143b9a6087da6220333804baead2c422f98f0d7660830

Forum feed

WAPT Packages / Paquets WAPT • Re: Error line 3512 in install_wapt
Bonsoir Renaud,
renaud.counhaye a écrit :
15 octobre 2018, 11:28
Depuis la mise à jour vers WAPT 1.6 j'ai le paquet 7zip qui a tendance a fail a l'installation avec cette sortie :

CODE :

uninstalling 7-Zip 9.20 (x64 edition)Traceback (most recent call last):  File "c:\wapt\common.py", line 3512, in install_wapt    exitstatus = setup.install()  File "c:\windows\temp\wapt6e8_dt\setup.py", line 42, in install
D'après le message d'erreur ci-dessus, le problème se pose lors de la désinstallation des versions obsolètes 7zip 9.20. Cette version ne se met pas à jour correctement, il est nécessaire de la désinstaller au préalable, sinon vous allez avoir des restes. Il faut plutôt trouver pourquoi il ne se désinstalle pas bien (il faudrait probablement un kill_before ou équivalent si le logiciel était lancé lors de la désinstallation).

Cordialement,

Denis

Statistiques: Posté par dcardon — 15 octobre 2018, 20:28


WAPT Packages / Paquets WAPT • Error line 3512 in install_wapt
Bonjour à tous,

Depuis la mise à jour vers WAPT 1.6 j'ai le paquet 7zip qui a tendance a fail a l'installation avec cette sortie :

uninstalling 7-Zip 9.20 (x64 edition)
Traceback (most recent call last):
File "c:\wapt\common.py", line 3512, in install_wapt
exitstatus = setup.install()
File "c:\windows\temp\wapt6e8_dt\setup.py", line 42, in install

le code du paquet pyhton de wapt.lesfourmisduweb.org :

CODE :

def install():    global uninstallkey    from common import Wapt    broken_7zip = [ soft for soft in installed_softwares('7-zip') if Version(soft['version']) < Version('16.0') ]    if broken_7zip:        for uninstall in broken_7zip:            cmd = WAPT.uninstall_cmd(uninstall['key'])            print(u'uninstalling %s' % (uninstall['name'],))            # on execute la commande de desinstallation            run(cmd)    allmsi = glob.glob('*-x64.msi')    for msi in allmsi:        if iswin64():            install_msi_if_needed(msi,killbefore=['7zFM.exe'])        else:            install_msi_if_needed(msi.replace('-x64.msi','.msi'),killbefore=['7zFM.exe'])    for ext in ('.001','.7z','.arj','.bz2','.bzip2','.cab','.cpio','.deb','.dmg','.fat',            '.gz','.gzip','.hfs','.iso','.lha','.lzh','.lzma','.ntfs','.rar','.rpm',            '.squashfs','.swm','.tar','.taz','.tbz','.tbz2','.tgz','.tpz','.txz','.vhd',            '.wim','.xar','.xz','.z','.zip', '.zipe'):        register_ext('7-zip',ext,'"%s" "%%1"' % (makepath(programfiles,'7-zip','7zFM.exe'),),icon="%s,1" % (makepath(programfiles,'7-zip','7z.dll')))""" You can do a CTRL F9 in pyscripter to update the package """
Dans le doute je vais juste pas garder ça et remplacer avec simplement :

CODE :

if iswin64():        install_msi_if_needed('7z1805-x64.msi',killbefore=['7zFM.exe'])    else:        install_msi_if_needed('7z1805.msi',killbefore=['7zFM.exe'])    for ext in ('.001','.7z','.arj','.bz2','.bzip2','.cab','.cpio','.deb','.dmg','.fat',            '.gz','.gzip','.hfs','.iso','.lha','.lzh','.lzma','.ntfs','.rar','.rpm',            '.squashfs','.swm','.tar','.taz','.tbz','.tbz2','.tgz','.tpz','.txz','.vhd',            '.wim','.xar','.xz','.z','.zip', '.zipe'):        register_ext('7-zip',ext,'"%s" "%%1"' % (makepath(programfiles,'7-zip','7zFM.exe'),),icon="%s,1" % (makepath(programfiles,'7-zip','7z.dll')))
Mais peut être qu'un oeil expert trouveras le bug :)

Cordialement,
Renaud

Statistiques: Posté par renaud.counhaye — 15 octobre 2018, 11:28