tis-vlc 3.0.3-2

  • package : tis-vlc
  • version : 3.0.3-2
  • description : VLC Media Player
  • maintainer : Tranquil IT
  • date : 2018-05-31 17:46:53

setup.py

from setuphelpers import *

uninstallkey = []
vlcrc = makepath(programfiles,'VideoLAN','VLC','vlcrc')

def install():

  diskfreespacebefore = get_disk_free_space(programfiles)

  print("installing VLC")
  versionpaquet = control['version'].split('-',1)[0]
  if iswin64():
            install_exe_if_needed('vlc-%s-win64.exe' % versionpaquet,silentflags='/S --no-qt-privacy-ask --no-qt-updates-notif',key='VLC media player',min_version=versionpaquet,killbefore=['vlc.exe'])
  else:
            install_exe_if_needed('vlc-%s-win32.exe' % versionpaquet,silentflags='/S --no-qt-privacy-ask --no-qt-updates-notif',key='VLC media player',min_version=versionpaquet,killbefore=['vlc.exe'])
  filecopyto("vlcrc",vlcrc)
  remove_desktop_shortcut('VLC media player')

  diskfreespaceafter = get_disk_free_space(programfiles)

  difffreespace = diskfreespacebefore - diskfreespaceafter
  print(ur"Espace disque necessaire pour l'installation : " + str(difffreespace))


def session_setup():
    print("Setting default preferences for VLC")
    user_vlcrc = makepath(user_appdata,'vlc','vlcrc')
    if not isfile(user_vlcrc):
        filecopyto(vlcrc,user_vlcrc)
    else:
        fichier = open(user_vlcrc,"r")
        data = fichier.read()
        fichier.close()

        if '#qt-notification=1' in data :
            data = data.replace('#qt-notification=1','qt-notification=0')

        if '#qt-updates-notif=1' in data :
            data = data.replace('#qt-updates-notif=1','qt-updates-notif=0')

        if 'qt-privacy-ask=1' in data :
            data = data.replace('qt-privacy-ask=1','qt-privacy-ask=0')

        fichier = open(user_vlcrc, "w")
        fichier.write(data)
        fichier.close()



def update_sources():
     htmlSource = wgets("http://www.videolan.org/vlc/download-windows.html").splitlines()

     for line in htmlSource :
         if 'downloadOS' in line :
             realversion = line[line.find("") + 12 :line.find("</span>")]
             filename32 = 'vlc-%s-win32.exe' % realversion
             filename64 = 'vlc-%s-win64.exe' % realversion

     exes = glob.glob('*.exe')
     for fn in exes:
        if fn != filename32 :
            if fn != filename64 :
                print 'remove' + fn
                remove_file(fn)

     if not isfile(filename32):
        print('Download' + filename32)
        wget('https://get.videolan.org/vlc/'+ realversion +'/win32/' + filename32, filename32)
     if not isfile(filename64):
        print('Download ' + filename64)
        wget('https://get.videolan.org/vlc/'+ realversion +'/win64/' + filename64, filename64)

     print ('Write ' + realversion + '-0 in WAPT\\control')
     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_sources()

    

Changelog

No changelog
    

manifest.sha256

[["WAPT/icon.png", "fb124bd9764f070fd0a2f8f05ab82fe666ee33ba830fc8a689f2dc113b7bcce4"], ["WAPT/certificate.crt", "13fb474c5c23c135a77aba592eb8821b9ecbcc463f5b7312312b87b20eac6779"], ["WAPT/wapt.psproj", "df3e2fa87fea9c7bdfcc22039b9ef7303f092898882d9f3f4233f5d92f90b3c7"], ["vlc-3.0.3-win64.exe", "59940804b6a89f0c83b576247dd90f2c5a22b8c7f040ebf82813c59968828035"], ["vlc-3.0.3-win32.exe", "65bf42b15a05b13197e4dd6cdf181e39f30d47feb2cb6cc929db21cd634cd36f"], ["setup.py", "aa3ea4e5e594c8c2c4b9376f787bf1e218d4f737ceaa7db4abc9d54a1c4e09cc"], ["vlcrc", "cfa606189d8a7b44ae4478490c2c664698a0e41a3df1ac2daf4c2809ff675d09"], ["WAPT/control", "72a3d0c6ed68abd877026edc4037b9196308b8e548785d80117114de957bb2ab"]]