tis-ccleaner 5.35.0.6210-1

  • package : tis-ccleaner
  • version : 5.35.0.6210-1
  • description : utilitaire de choix pour nettoyer, réparer et optimiser rapidement Windows
  • maintainer : Simon Fonteneau
  • date : 2017-10-11 11:03:22
  • signer : TRANQUIL IT SYSTEMS
  • signature_date : 20171011-110322
  • min_os_version :
  • min_wapt_version :

setup.py

# -*- 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 *

uninstallkey = []

def install():
    print('installing tis-ccleaner')
    exes = glob.glob('*.exe')

    def vers_ccleaner(ukey):
        if iswin64():
            return get_file_properties(makepath(install_location(ukey['key']),"CCleaner64.exe"))['ProductVersion'].replace(', ','.')
        else:
            return get_file_properties(makepath(install_location(ukey['key']),"CCleaner.exe"))['ProductVersion'].replace(', ','.')

    install_exe_if_needed(exes[0] ,silentflags="/S",key="CCleaner",min_version=control['version'].split('-',1)[0],get_version=vers_ccleaner)

    print("Override settings")
    filecopyto("ccleaner.ini", makepath(install_location("CCleaner"),"ccleaner.ini"))
    #https://singularlabs.com/software/ccenhancer/download-ccenhancer/
    filecopyto("winapp2.ini", makepath(install_location("CCleaner"),"winapp2.ini"))

def session_setup():
    registry_set(HKEY_CURRENT_USER,'software\\Piriform\\CCleaner', 'Monitoring','0')
    registry_set(HKEY_CURRENT_USER,'software\\Piriform\\CCleaner', 'SystemMonitoring','0')
    registry_set(HKEY_CURRENT_USER,'software\\Piriform\\CCleaner', 'UpdateCheck','0')
    registry_set(HKEY_CURRENT_USER,'software\\Piriform\\CCleaner', 'RunICS','0')
    registry_set(HKEY_CURRENT_USER,'software\\Piriform\\CCleaner', 'CheckTrialOffer','0')

def update_package():

    import requests,BeautifulSoup
    page = requests.get('http://www.piriform.com/ccleaner/download/standard',headers={'User-Agent':'Mozilla/5.0 (Windows NT 6.1; Win64; x64)'}).text
    bs = BeautifulSoup.BeautifulSoup(page)
    download = bs.find(id="BigDownload").a["href"]
    filename = download.rsplit('/',1)[1]

    # on ne telecharge que si on ne l'a pas deja
    if not isfile(filename):
        wget(download, filename)
    else:
        print(u'Le setup %s est déjà présent dans le paquet.' % filename)

    # on enleve les vieux exes
    for fn in glob.glob('*.exe'):
        if fn != filename :
            print('Suppression du vieux exe %s'%fn)
            remove_file(fn)

    vers = get_file_properties(filename)['ProductVersion']
    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_package()


    

manifest

[["winapp2.ini", "27cddc00a3a4214c53cb5aae049d5fe128b9c2f9"], ["WAPT/icon.png", "49e0b20d56f7b4e0e62296d270bdcd109d8137b2"], ["WAPT/certificate.crt", "0db563dc9077b268ca07ba834322d0fc5e21f8e5"], ["WAPT/wapt.psproj", "557e60050809687d56525e6ac46df9c0e02ccae6"], ["ccleaner.ini", "601165c0d18f92b369b8ab27961ceb266d5e344f"], ["ccsetup535.exe", "f94e391eaf75fc564a32262872369c2d8f7edbcd"], ["setup.py", "e7c48d2e975d43da6f59602409682b3892e288f9"], ["WAPT/control", "2dccc104f91a7fb0466d1be600d5403ed79b960b"], ["WAPT/changelog.txt", "307be3bc3709f540ade26d8642a089836af65a32"]]