Détails du package smp-wpsoffice-free_10.2.0.7587-4_all.wapt
retour Revenir à la liste des packages

smp-wpsoffice-free

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

Fichier control :

package           : smp-wpsoffice-free
version           : 10.2.0.7587-4
architecture      : all
section           : base
priority          : optional
maintainer        : Simon Fonteneau
description       : WPS Office: Free Office Suite compatible with Microsoft Office documents
depends           : 
conflicts         : 
maturity          : 
locale            : 
target_os         : windows
min_os_version    : 
max_os_version    : 
min_wapt_version  : 
sources           : 
installed_size    : 458051584
impacted_process  : wps.exe,et.exe,wpp.exe
description_fr    : WPS Office : Suite bureautique gratuite compatible avec les documents Microsoft Office
description_pl    : 
description_de    : 
description_es    : 
audit_schedule    : 
editor            : 
keywords          : 
licence           : 
homepage          : 
package_uuid      : 1b2d849c-8699-494b-807b-77a78fcc241c
signer            : wapt.lesfourmisduweb.org
signer_fingerprint: 8da83ebdac1a25e820b186510d049f47407b11835b0664fdc5bacd3595b1671d
signature         : EicD+lm0HiElSAu9SkMSYuKFUqkZsWFqptqrl8pfxClNOcmnt+YHf9VIyBrNynhZvwZl3DjqXVo7y6cdG68T5TCnhNAj/MV1/HWv6hWAWJOBddjob4Oy4DwtXsyvqvnY57oo1pfvBC88I3vOm3DOfKAxhscBxGakzaeND7kyiSG2w/cBmqFDCD1t3So+2IHQrMf7JzldHtrVOxbUjyv2QAA60YdfufL9IwdIylAfKIxe0+hSYhhzvGgjoxZSrSOE9Zt+JX3tk0EFKjgOdAu9+mqcjWhroWkBg2HYIUGk2d4wT/5P3zbJNXn4OOra7lGrk4xv/LZvwzrMaG62/WQ9OQ==
signature_date    : 20181222-104032
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 :

# -*- coding: utf-8 -*-
from setuphelpers import *
import time

uninstallkey = []

def install():
    versionsoft = control['version'].split('-',1)[0]
    basefolder=makepath(programfiles32,'Kingsoft','WPS Office',versionsoft,'office6')

    for exe in control.impacted_process.split(','):
        killalltasks(exe)

    for wps in installed_softwares('WPS Office'):
        if Version(wps['version']) < Version(versionsoft):
            run(uninstall_cmd(wps['key']))
            count = 0
            while installed_softwares('WPS Office'):
                time.sleep(2)
                count = count + 1
                if count > 120 :
                    error('Timeout Uninstall wps')



    if isfile(ur"WPSOffice_%s_Free\$_11_\$EXEFILE" % (versionsoft)):
        os.rename(ur"WPSOffice_%s_Free\$_11_\$EXEFILE" % (versionsoft),ur"WPSOffice_%s_Free\$_11_\WPSOffice_%s_Free.exe" % (versionsoft,versionsoft))

    diskfreespacebefore = get_disk_free_space(programfiles)
    #http://kingsoftoffice.desk.com/customer/portal/questions/16317621-installing-wps-office-unattended-silent-without-free-speedcheck-etc
    print('installing wpsoffice-free')
    open(ur"WPSOffice_%s_Free\$_11_\oem.ini" % (versionsoft), 'w').write(oemini)
    install_exe_if_needed(ur"WPSOffice_%s_Free\$_11_\WPSOffice_%s_Free.exe" % (versionsoft,versionsoft),silentflags=' ',key='Kingsoft Office',min_version=versionsoft)

    remove_programs_menu_shortcut('WPS Writer','WPS Office')
    remove_programs_menu_shortcut('WPS Spreadsheets','WPS Office')
    remove_programs_menu_shortcut('WPS Presentation','WPS Office')

    create_programs_menu_shortcut('WPS Writer',target=makepath(basefolder,'wps.exe'),folder='WPS Office')
    create_programs_menu_shortcut('WPS Spreadsheets',target=makepath(basefolder,'et.exe'),folder='WPS Office')
    create_programs_menu_shortcut('WPS Presentation',target=makepath(basefolder,'wpp.exe'),folder='WPS Office')

    remove_desktop_shortcut('WPS Writer')
    remove_desktop_shortcut('WPS Spreadsheets')
    remove_desktop_shortcut('WPS Presentation')

    run_notfatal('schtasks /Delete /tn "WpsUpdateTask_Administrateur" /f')

    remove_programs_menu_shortcut(u'Rechercher les mises à jour de WPS Office',folder=makepath('WPS Office','Outils de WPS Office'))
    remove_programs_menu_shortcut(u'Désinstaller WPS Office',folder=makepath('WPS Office','Outils de WPS Office'))

    diskfreespaceafter = get_disk_free_space(programfiles)
    difffreespace = diskfreespacebefore - diskfreespaceafter
    print(ur"Espace disque necessaire pour l'installation : " + str(difffreespace))

def uninstall():
    remove_programs_menu_shortcut('WPS Writer','WPS Office')
    remove_programs_menu_shortcut('WPS Spreadsheets','WPS Office')
    remove_programs_menu_shortcut('WPS Presentation','WPS Office')

    remove_desktop_shortcut('WPS Writer')
    remove_desktop_shortcut('WPS Spreadsheets')
    remove_desktop_shortcut('WPS Presentation')

oemini=ur"""[Setup]
;PipeNumber=100.103
Silent=1
LaunchWPS=0
LaunchCenter=0
CreateDesktopShortcut=0
ThanksInstallPage=false
INSTALLPATH=%s""" % makepath(programfiles32,'Kingsoft','WPS Office')

def session_setup():
   registry_setstring(HKEY_CURRENT_USER, r"Software\Kingsoft\Office\6.0\Common\updateinfo",'UpdateMode','manual', type=REG_SZ)