tis-ccleaner 5.23.5808-0

  • package : tis-ccleaner
  • version : 5.23.5808-0
  • description : utilitaire de choix pour nettoyer, réparer et optimiser rapidement Windows
  • maintainer : Administrator, Amelie LE JEUNE
  • date : 2016-11-04 09:45:18
  • signer : Tranquil IT Systems
  • signature_date :
  • 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 = ["CCleaner"]

def install():
    print('installing tis-ccleaner')
    exes = glob.glob('*.exe')
    run('%s /S' % exes[0])
    print("Override settings")
    shutil.copyfile("ccleaner.ini", makepath(programfiles,"CCleaner","ccleaner.ini"))
    #https://singularlabs.com/software/ccenhancer/download-ccenhancer/
    shutil.copyfile("winapp2.ini", makepath(programfiles,"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 re
    """updates the package with the latest ccleaner version"""

    # find latest exe from ccleaner home page
    re_versions = re.compile('ccsetup.*_slim.exe')
    index = wgets('https://www.piriform.com/ccleaner/builds')
    filenames = re_versions.findall(index)
    # on ne telecharge que si on ne l'a pas deja
    if not isfile(filenames[0]):
        wget('http://download.piriform.com/%s'%filenames[0].replace('_slim',''), filenames[0], proxies={'http':None})
    else:
        print(u'Le setup %s est déjà présent dans le paquet.' % filenames[0])

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

    # version exacte depuis page index / changelog vers fichier control
    notes = wgets('https://www.piriform.com/ccleaner/download')
    try:
        from BeautifulSoup import BeautifulSoup
        bs = BeautifulSoup(notes)
        changelog = bs.find(id="releasenotesContent")
        version = changelog.find('strong').text.strip()[1:]
        logs = BeautifulSoup(changelog.prettify().replace('<br />\n','')).text
        print(u'Les modifications apportées par cette version sont:\n%s'%logs)
        open('WAPT\\changelog.txt','w').write(logs)
        control = PackageEntry()
        control.load_control_from_wapt('.')
        old_build = control.version.split('-')[1]
        control.version = "%s-%s" %(version,old_build)
        control.save_control_to_wapt('.')
    except Exception as e:
        print(ur'Installer beautifulsoup pour mettre à jour le fichier control automatiquement. c:\python27\scripts\pip install beautifulsoup\n%s' % e)

if __name__ == '__main__':
    update_package()


def uninstall():
    remove_tree(makepath (programfiles,'CCleaner'))
    

manifest

[
 [
  "ccleaner.ini", 
  "601165c0d18f92b369b8ab27961ceb266d5e344f"
 ], 
 [
  "ccsetup523_slim.exe", 
  "7d1409d15cf79b53bfa2466a9b3e8765d83948be"
 ], 
 [
  "setup.py", 
  "085693c48d456e120fd367a672d2044d59a8efba"
 ], 
 [
  "WAPT\\changelog.txt", 
  "307be3bc3709f540ade26d8642a089836af65a32"
 ], 
 [
  "WAPT\\control", 
  "d3b74ec4b03c0eaa96ee43274ae62d9f42033f73"
 ], 
 [
  "WAPT\\icon.png", 
  "49e0b20d56f7b4e0e62296d270bdcd109d8137b2"
 ], 
 [
  "WAPT\\wapt.psproj", 
  "6b9849249cf5dd6f1eb94db1c9f40b329f428760"
 ], 
 [
  "winapp2.ini", 
  "27cddc00a3a4214c53cb5aae049d5fe128b9c2f9"
 ]
]