tis-vlc 3.0.2-3

  • package : tis-vlc
  • version : 3.0.2-3
  • description : VLC Media Player
  • maintainer : Tranquil IT
  • date : 2018-04-25 10:56:47

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

[["vlc-3.0.2-win64.exe", "a40f651bb2f5a9088637b7b43bb73c16b96192b7ceac2d21cef556ed94bfc84d"], ["WAPT/icon.png", "fb124bd9764f070fd0a2f8f05ab82fe666ee33ba830fc8a689f2dc113b7bcce4"], ["WAPT/certificate.crt", "13fb474c5c23c135a77aba592eb8821b9ecbcc463f5b7312312b87b20eac6779"], ["WAPT/wapt.psproj", "79adab7ad1d3821b05c9d018c5c1a8949b4400aa9ddb54bfb62d829484739d1a"], ["setup.py", "aa3ea4e5e594c8c2c4b9376f787bf1e218d4f737ceaa7db4abc9d54a1c4e09cc"], ["vlc-3.0.2-win32.exe", "30160a607e5ec2e4a2718ea2e37764647f6cfc9c7eb31f58f9f873521726695a"], ["vlcrc", "cfa606189d8a7b44ae4478490c2c664698a0e41a3df1ac2daf4c2809ff675d09"], ["WAPT/control", "b883e26f155ef6652aee827cc2b58866915775584eb42920aca0113e8d269b02"]]