tis-mremoteng 1.75.7012-1

  • package : tis-mremoteng
  • version : 1.75.7012-1
  • description : Administration machines distantes avec VNC, RDP, Putty SSH... (RC2)
  • maintainer : TIS <technique@tranquil-it-systems.fr>
  • date : 2018-02-27 19:02:34

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():
    version_soft = control.version.split('-',1)[0]
    install_msi_if_needed(r'mRemoteNG-Installer-%s.msi' % version_soft,killbefore='mRemoteNG.exe')

def update_package():
    import BeautifulSoup,requests,re
    from waptpackage import PackageEntry
    verify=True
    pe = PackageEntry()
    pe.load_control_from_wapt(os.getcwd())
    current_version = pe['version'].split('-',1)[0]

    mremote_base_url = "https://github.com/mRemoteNG/mRemoteNG/releases/latest"
    software_name = "mRemoteNG"

    page = requests.get(mremote_base_url,headers={'User-Agent':'Mozilla/5.0 (Windows NT 6.1; Win64; x64)'},verify=verify).text
    bs = BeautifulSoup.BeautifulSoup(page)

    bs_raw_string = str(bs.find('a',{'class':'css-truncate'}).text)
    software_version = re.findall('v(.*)',str(bs_raw_string))[0]

    print "Current %s WAPT package version is : %s" % (software_name,current_version)
    print "Latest %s version available is : %s" % (software_name,software_version)

    if Version(current_version) < Version(software_version):
        print("%s package is not up-to-date, updating" % software_name)
        print("Cleanup current MSI files")

        filename = bs.find('a',href=re.compile(".msi")).find("strong").text
        dest_filename = "mRemoteNG-Installer-%s.msi" % software_version

        for exe in glob.glob('*.msi'):
            if exe != dest_filename:
                remove_file(exe)

        print("Downloading latest version")
        download_url = 'https://github.com/mRemoteNG/mRemoteNG/releases/download/v%s/%s' % (software_version,filename)
        wget(download_url,dest_filename)

        pe.version = software_version + '-0'
        pe.save_control_to_wapt(os.getcwd())
    else:
        print("No update needed, package already up to date")

if __name__ == "__main__":
    update_package()

    

Changelog

No changelog
    

manifest.sha256

[["WAPT/icon.png", "f80d0f15c5bda3dc73f1ba1b0ea9445d0bdf4bd38ce524e17841f60a662d6017"], ["WAPT/certificate.crt", "79e5388683c0b6cb03f4f81e4e58e3a11463b2b6cf169dd9c453098027dcfaa4"], ["WAPT/wapt.psproj", "c5a1697bf6e134989a9870764995725626a8f5055b640e541b569d1a927363fc"], ["mRemoteNG-Installer-1.75.7012.msi", "86363f511785ce56acdb4440fa990de5c992fe40c55dcf0fc43fad03476c5011"], ["setup.py", "0f379ae4a299d0f54c9930d2685d579c34f1d6fbd0ea9aee8407ad37a2ba1d48"], ["WAPT/control", "e655ce7ffae6d7a62bce88f29a8bad29329d143f0c88afb3c7cf1d6892c2b044"]]