tis-7zip 18.5.0.0-4

  • package : tis-7zip
  • version : 18.5.0.0-4
  • architecture : all
  • locale :
  • description : package for 7-Zip (Igor Pavlov)
  • maintainer : TIS
  • date : 2018-05-03 10:27:29
  • 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/>.
#
# -----------------------------------------------------------------------

import platform
import time
from setuphelpers import *

uninstallkey=[]

""" You can do a CTRL F9 in pyscripter to update the package """

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 """









def update_sources():

    import urllib2
    import requests

    """I download the file >>>"""

    sock = urllib2.urlopen("http://www.7-zip.org/download.html",timeout=10)
    htmlSource = sock.readlines()
    sock.close()
    for line in htmlSource :
        if  'x64.msi'  in line :
            start = line.find('href=')
            end = line.find('">D')
            x64 = line[start + 6:end]
            x86 = x64.replace("-x64.msi",".msi")
            break

    allmsi = glob.glob('*.msi')
    for msi in allmsi:
        remove_file(msi)

    wget('http://www.7-zip.org/%s' % x64, x64.rsplit('/')[-1])
    wget('http://www.7-zip.org/%s' % x86, x86.rsplit('/')[-1])



    """I retrieve the current version from the msi """

    allmsi = glob.glob('*.msi')
    for msi in allmsi:
        vers = get_msi_properties(msi)['ProductVersion']
        break

    """I write the version in the control file >>>"""

    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())


if __name__ == '__main__':
    update_sources()





    

Changelog

No changelog
    

manifest.sha256

WAPT/icon.png 9d386eca12e88b657e111f73c746efa43aa1f469e7accbc866b9cc688f1deeca
WAPT/certificate.crt 13fb474c5c23c135a77aba592eb8821b9ecbcc463f5b7312312b87b20eac6779
WAPT/wapt.psproj 79adab7ad1d3821b05c9d018c5c1a8949b4400aa9ddb54bfb62d829484739d1a
7z1805-x64.msi 898c1ca0015183fe2ba7d55cacf0a1dea35e873bf3f8090f362a6288c6ef08d7
setup.py af636528ffde098cde12a9e3ef9b121fd3bcf27b334e6194333c079c6dbec546
7z1805.msi c554238bee18a03d736525e06d9258c9ecf7f64ead7c6b0d1eb04db2c0de30d0
WAPT/control 88b43bea65f92812923a64a885b202ea45c5d17c771661b94736cb0514f5b8fd

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