tis-winscp 5.11.2-2

  • package : tis-winscp
  • version : 5.11.2-2
  • description : Client SCP sous Windows
  • maintainer : blog.lesfourmisduweb.org
  • date : 2017-10-10 20:19:43
  • signer : TRANQUIL IT SYSTEMS
  • signature_date : 20171010-201938
  • min_os_version :
  • min_wapt_version :

setup.py

#!/usr/bin/python
# -*- 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():

    versionpaquet = control['version'].split('-',1)[0]
    install_exe_if_needed('WinSCP-%s-Setup.exe' % versionpaquet ,silentflags='/VERYSILENT /NORES64RT /LOADINF=winscp.ini',key='winscp3_is1',min_version=versionpaquet,killbefore=['Winscp.exe'])
    remove_desktop_shortcut('WinSCP')


def uninstall():
    run('"%s" /VERYSILENT /NORESTART' % makepath(install_location('winscp3_is1'),'unins000.exe'))







def update_package():
    import requests
    htmlSource = wgets("https://winscp.net/eng/download.php").splitlines()
    for line in htmlSource :
        if '<h3>WinSCP' in line :
            realversion = line[line.find("<h3>WinSCP") + 11 :line.find("</h3>")]
            filename = 'WinSCP-' + realversion + '-Setup.exe'
            link = 'https://winscp.net/download/'+ filename
            htmlSource2 = wgets(link).splitlines()
            for line2 in htmlSource2 :
                if 'https://winscp.net/download/files/' in line2 :
                    reallink = line2[line2.find("href=") + 6 :line2.find("'>[Direct download]")]
                    wget(reallink, filename)
                    break
            break

    if not isfile(filename):
        wget(reallink, filename)

    exes = glob.glob('*.exe')
    for fn in exes:
        if fn != filename:
            remove_file(fn)

    from waptpackage import PackageEntry
    pe = PackageEntry()
    pe.load_control_from_wapt(os.getcwd())
    pe.version = realversion+'-0'
    pe.save_control_to_wapt(os.getcwd())

    print('The update is complete, you can now test and then launch a build upload.')

if __name__ == '__main__':
    update_package()
    

manifest

[["WAPT/icon.png", "282b02f86a388d05e051670ebe870ab8277de9f1"], ["WAPT/certificate.crt", "0db563dc9077b268ca07ba834322d0fc5e21f8e5"], ["WAPT/wapt.psproj", "557e60050809687d56525e6ac46df9c0e02ccae6"], ["winscp.ini", "5a8b703501ce9d0375e6f3fbf1f60c182133a1da"], ["WinSCP-5.11.2-Setup.exe", "448bd40e73a8aef7e78a99ab3567c19609136768"], ["setup.py", "cdd03ee64ec1422ffd9dd6158620bc46c57a2668"], ["WAPT/control", "553cd37e421cfe90973fe4148e18dd07f536accb"]]