tis-dropbox 35.4.20-4

  • package : tis-dropbox
  • version : 35.4.20-4
  • description : Dropbox (Dropbox, Inc.)
  • maintainer : Hubert TOUVET
  • date : 2017-10-11 11:03:44
  • signer : TRANQUIL IT SYSTEMS
  • signature_date : 20171011-110343
  • min_os_version :
  • min_wapt_version :

setup.py

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

uninstallkey = []

def install():
    # if you want to modify the keys depending on environment (win32/win64... params..)
    pe = PackageEntry().load_control_from_wapt ('.')
    dropbox_version = pe.version.split('-',1)[0]
    install_exe_if_needed("Dropbox %s Offline Installer.exe" % dropbox_version, '/S',key='Dropbox',min_version=dropbox_version,killbefore='dropbox.exe')

def update_package():
    import re,requests,urlparse,glob
    url = requests.head('https://www.dropbox.com/download?plat=win&type=full').headers['Location']
    filename = urlparse.unquote(url.rsplit('/',1)[1])

    if not isfile(filename):
        print('Downloading %s from %s'%(filename,url))
        wget(url,filename)

    # removes old exe
    if isfile(filename):
        exes = glob.glob('Dropbox*.exe')
        for fn in exes:
            if fn != filename:
                remove_file(fn)

    control = PackageEntry().load_control_from_wapt ('.')
    control.version = '%s-%s'%(re.findall('Dropbox (.*)\ Offline Installer.exe',filename)[0],int(control.version.split('-',1)[1])+1)
    control.save_control_to_wapt('.')

if __name__ == '__main__':
    update_package()
    

manifest

[["WAPT/icon.png", "b593b4085ec8371d03e30953a2a2478a640a47ea"], ["WAPT/certificate.crt", "0db563dc9077b268ca07ba834322d0fc5e21f8e5"], ["WAPT/wapt.psproj", "557e60050809687d56525e6ac46df9c0e02ccae6"], ["Dropbox 35.4.20 Offline Installer.exe", "9194def6d8f326bb67b1f2f538c1e6f152e3b067"], ["setup.py", "28ad7b737d59323ac02086c2e973cbf6a37c21b9"], ["WAPT/control", "a13f11a0ebd8d209633a2fcbecbcd927065045d5"]]