tis-seafile

7.0.9-1
Windows client for cloud file storage Seafile
9769 downloads
Download

  Description 

  • package : tis-seafile
  • version : 7.0.9-1
  • architecture : all
  • categories : Office,Media
  • maintainer : WAPT Team,Jimmy PELÉ,Hubert TOUVET,Amelie LE JEUNE
  • description : Windows client for cloud file storage Seafile
  • locale : all
  • target_os : windows
  • min_os_version : 6.1
  • max_os_version :
  • min_wapt_version : 1.5
  • sources : https://www.seafile.com/en/download/
  • installed_size : 216985600
  • impacted_process : seafile-applet,seaf-daemon
  • description_fr : Client Windows pour les système de partage de fichiers Seafile
  • description_pl :
  • description_de :
  • description_es :
  • description_pt :
  • description_it :
  • description_nl :
  • description_ru :
  • editor : Seafile Ltd
  • licence : GPL
  • signature_date : 2020-08-03T17:28:54.382732
  • Homepage : https://www.seafile.com/

  Setup.py 

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

uninstallkey = []

# Declaring specific app values (TO CHANGE)
bin_name_string = 'seafile-%s-en.msi'


def install():
    # Specific app values
    package_version = control.version.split('-')[0]

    # Getting the used storage on programfiles before installation (place it on the top)
    get_disk_free_space_before = get_disk_free_space(programfiles)

    # Installing the package
    install_msi_if_needed(bin_name_string % package_version
        ,min_version=package_version)

    uninstallkey.remove(get_msi_properties("seafile-%s-en.msi" % package_version)['ProductCode'])
    remove_desktop_shortcut('Seafile')

    # Return used storage of the program. (place it on the bottom)
    get_disk_free_space_after = get_disk_free_space(programfiles)
    free_space_after_diff = get_disk_free_space_before - get_disk_free_space_after
    print("Storage used: " + str(free_space_after_diff))


def uninstall():
    import time
    try:
        for seafile in installed_softwares('seafile'):
            run(uninstall_cmd(seafile['key']),timeout=20)
    except:
        killalltasks('seafile-applet.exe')
        time.sleep(30)
        if installed_softwares('seafile'):
            error('Error: Seafile is not uninstalled')


def session_setup():
    print('Session setup for %s' % control.asrequirement())
    print('Disabling: auto update check')
    registry_setstring(HKEY_CURRENT_USER,r'Software\Seafile\Seafile Client\WinSparkle','CheckForUpdates','0')


def update_package():
    print('Download/Update package content from upstream binary sources')
    import requests

    # Update transition from BeautifulSoup 3 to 4
    try:
        import bs4 as BeautifulSoup
    except:
        import BeautifulSoup

    # Getting proxy informations from WAPT settings
    proxy = {}
    if isfile(makepath(application_data(),'waptconsole','waptconsole.ini')):
        proxywapt = inifile_readstring(makepath(user_local_appdata(),'waptconsole','waptconsole.ini'),'global','http_proxy')
        if proxywapt :
            proxy = {'http':proxywapt,'https':proxywapt}		

    # Specific app values
    app_name = control.name
    url = control.sources

    # Getting latest version from official website
    page = requests.get(url).text
    bs = BeautifulSoup.BeautifulSoup(page)
    #bs = BeautifulSoup.BeautifulSoup(page,features="html.parser") # For bs4 only
    bs_raw_string = bs.find('a',{'class':'download-op'})
    version = bs_raw_string.text
    print(version)
    
    url_dl = bs_raw_string['href']
    latest_bin = bin_name_string % version

    print('Latest ' + app_name + ' version is: ' + version)
    print('Download url is: ' + url_dl)

    # Downloading latest binaries
    if not isfile(latest_bin):
        print('Downloading: ' + latest_bin)
        wget(url_dl,latest_bin,proxies=proxy)
            
		# Change version of the package
        from waptpackage import PackageEntry
        print('Writing ' + version + '-0 in WAPT\\control')
        pe = PackageEntry()
        pe.load_control_from_wapt(os.getcwd())

        pe.version = version + '-0'
        pe.save_control_to_wapt(os.getcwd())
        print('Update package done. You can now build-upload your package')
    else:
        print('This package is already up-to-date') 

    # Deleting outdated binaries
    for bin_in_dir in glob.glob('*.exe') or glob.glob('*.msi'):
        if bin_in_dir != latest_bin :
            print('Outdated binary: ' + bin_in_dir + ' Deleted')
            remove_file(bin_in_dir)


if __name__ == '__main__':
    update_package()


										

  Changelog 


No changelog
  manifest.sha256 
[["seafile-7.0.9-en.msi","3f837823c23403ad2d5aec29f81028aaf1e86055e2fa45a8b67fcf94f59ddade"],["setup.py","4a8c9cea8260b61033f17b74007c0833131c9aea92cc6f56a043ebe11364af58"],["WAPT/icon.png","2fa8a089ab65b8b5746bf57908d847606256cde5d7da32929a132f18fb7df741"],["WAPT/certificate.crt","a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf"],["WAPT/control","25f18328e7e746f07f5ed08ccd3cc858284f27b9e152ef450154b0dc62cc299b"]]