Détails du package smp-scribus_1.4.8-1_x64.wapt
retour Revenir à la liste des packages



ATTENTION CE DÉPÔT n'est plus compatible 1.3 vous devez migrer en 1.5.1.21 !

Fichier control :

package           : smp-scribus
version           : 1.4.8-1
architecture      : x64
section           : base
priority          : optional
maintainer        : Simon Fonteneau
description       : Logiciel de PAO libre
depends           : smp-ghostscript
conflicts         : 
maturity          : 
locale            : 
target_os         : windows
min_os_version    : 
max_os_version    : 
min_wapt_version  : 1.5.1.20
sources           : 
installed_size    : 227024896
impacted_process  : Scribus.exe
description_fr    : 
description_pl    : 
description_de    : 
description_es    : 
audit_schedule    : 
editor            : 
keywords          : 
licence           : 
homepage          : 
package_uuid      : 56544b6f-916c-42be-b574-522f525a78be
signer            : wapt.lesfourmisduweb.org
signer_fingerprint: 8da83ebdac1a25e820b186510d049f47407b11835b0664fdc5bacd3595b1671d
signature         : dypu7LEnDHPmQ4QXjgxwrGZ0g0Csuon3jlOw9fUF+2vH9+re030P7dqM8gZE5hLe15qIC9tJh5wP9xOi3XLflN/AcipzfknrVlkpc4ilZXJgCvTUZ4bu99/TU9JV8f9uSzEzF0B1Gxn834Szn9kJV9zSnOkIGTwL/Qjw0hYkDiTbHgZHGGE3EJA86qTiMxEWhoaDiAAJ2VXrRg86Ny4mCvd6WUjpIVZakdn2p/Z1/9d2nhWD0fMsI2XZ8Yu59YIaAYNE7KI9c7n+bXMiq4D4K4iH2KxqcPKX9umIIRQ8ijbzn9l2MduLkbI6Om32XQ3Mwur0bT0/k7OuZKaIQsgV4g==
signature_date    : 2019-03-06T00:11:00.767000
signed_attributes : package,version,architecture,section,priority,maintainer,description,depends,conflicts,maturity,locale,target_os,min_os_version,max_os_version,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,audit_schedule,editor,keywords,licence,homepage,package_uuid,signer,signer_fingerprint,signature_date,signed_attributes






Fichier 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 time
from setuphelpers import *

uninstallkey=[]


def install():

    diskfreespacebefore = get_disk_free_space(programfiles)

    versionsoft = control['version'].split('-',1)[0]

    for uninstall in installed_softwares('Scribus'):
        if  Version(uninstall['version']) < Version(versionsoft):
            print(u'remove old software')
            killalltasks('Scribus.exe')
            run(uninstall_cmd(uninstall['key']))
            time.sleep(120)

    for uninstall in installed_softwares('Scribus'):
        if 'Program Files (x86)' in uninstall :
            killalltasks('Scribus.exe')
            run(uninstall_cmd(uninstall['key']))
            time.sleep(120)

    install_exe_if_needed('scribus-%s-windows-x64.exe' % versionsoft,silentflags='/S',key='Scribus %s' % versionsoft,min_version=versionsoft,killbefore=['Scribus.exe'])


    remove_desktop_shortcut('Scribus %s' % versionsoft)

    diskfreespaceafter = get_disk_free_space(programfiles)
    difffreespace = diskfreespacebefore - diskfreespaceafter
    print(ur"Disk space required for installation : " + str(difffreespace))

def update_package():

    for i in wgets('https://www.scribus.net/downloads/stable-branch/').splitlines():
        if "Current stable release: Scribus" in i:
            lastversion = i.split(' Scribus ')[1].split('<')[0]

    binaryfile = 'scribus-%s-windows-x64.exe' % lastversion
    urlfile = 'https://netcologne.dl.sourceforge.net/project/scribus/scribus/%s/%s' % (lastversion,binaryfile)

    for exe in glob.glob('*.exe'):
        if exe != binaryfile:
            remove_file(exe)

    if not isfile(binaryfile):
        wget(urlfile,binaryfile)

    write_version_in_control_file(lastversion + '-0')





def write_version_in_control_file(lastversion=""):
    os.chdir(os.path.dirname(__file__))
    from waptpackage import PackageEntry
    pe = PackageEntry()
    pe.load_control_from_wapt(os.getcwd())

    pe.version = lastversion
    pe.save_control_to_wapt(os.getcwd())


if __name__ == '__main__':
    update_package()