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

smp-scribus

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      : x86
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    : 224301056
impacted_process  : Scribus.exe
description_fr    : 
description_pl    : 
description_de    : 
description_es    : 
audit_schedule    : 
editor            : 
keywords          : 
licence           : 
homepage          : 
package_uuid      : 900e61ea-79de-4331-b87d-553fe51e4ad7
signer            : wapt.lesfourmisduweb.org
signer_fingerprint: 8da83ebdac1a25e820b186510d049f47407b11835b0664fdc5bacd3595b1671d
signature         : Tt3XZCIS1FvsFiz4agFXh0OJ2yZu7EyZtjGNPwyTp79ODoGO3hDI93Zf45y8NpFef35gbbRSVwm6VsbS6bhV98TvnJTWYaRHSJ1a5rJgddnZnR9G9qg9DPGg85cyh5x67F3Vw1vdSp9siN75gom2cTmGWiyIdUnXaYLvvfXVocwK3aNsxi/xW001sz0HOxdwgqgx6XXRW9ZuxQS/UjydFKhim6rUvVcAfDduMJDQKRq4hAvKimFFO7hvTErcCJkBlA8UCgwfwYkEWeypyqWIZTcKgUfN4C0cj1KIZgv6lpMtrewgTMtnU8fXCaWJGjMBRYsY+TG4/E1npMc5iZh8TQ==
signature_date    : 2019-03-06T00:13:55.097000
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 platform
import time
from setuphelpers import *

uninstallkey=[]


def install():
    # if you want to modify the keys depending on environment (win32/win64... params..)
    global uninstallkey
    global uninstallstring

    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')
            cmd = WAPT.uninstall_cmd(uninstall['key'])
            run(cmd)
            time.sleep(120)

    install_exe_if_needed('scribus-%s-windows.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.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()