tis-obs-studio 20.0.1-1

  • package : tis-obs-studio
  • version : 20.0.1-1
  • description : OBS Studio Live streaming video audio (obsproject.com)
  • maintainer : Hubert TOUVET
  • date : 2018-02-27 19:04:19
  • Depends :

setup.py

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

uninstallkey = []

def install():
    pe = PackageEntry().load_control_from_wapt ('.')
    software_version = pe.version.split('-',1)[0]
    print('installing OBS Studio %s' % software_version)
    install_exe_if_needed('OBS-Studio-%s-Full-Installer.exe' % software_version,"/S","OBS Studio",min_version=software_version)

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

    obs_base_url = "https://github.com/jp9000/obs-studio/releases/latest"
    software_name = "OBS-Studio"

    page = requests.get(obs_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('h1',{'class':'release-title'}).find('a').text)
    software_version = re.findall('OBS Studio (.*)',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,current_version)

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

        filename = "OBS-Studio-%s-Full-Installer.exe" % software_version

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

        print("Downloading latest version")
        download_url = 'https://github.com/jp9000/obs-studio/releases/download/%s/OBS-Studio-%s-Full-Installer.exe' % (software_version,software_version)
        wget(download_url,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", "b2ee02eee131e8595e5c1070c99201333d718a3f09999e96398cf2840d1b5bb0"], ["WAPT/certificate.crt", "79e5388683c0b6cb03f4f81e4e58e3a11463b2b6cf169dd9c453098027dcfaa4"], ["WAPT/wapt.psproj", "795d36d10109ca85357285f79090fac2be856e5830ea31fa913cc55cb825807b"], ["OBS-Studio-20.0.1-Full-Installer.exe", "ab5beefc576248d2fd51750bdf53811fd3af1d69396f6d5159decd1860d241ad"], ["setup.py", "7c4a7161da67be2bc26a1bcf4c3fd1187e93c019a6408fa01996dfc5b456b851"], ["WAPT/control", "558afa70527b124c3972db2027da855a598439f4f6ca4d1a24f0a5d70d9307af"]]