tis-flashplayer 30.0.0.134-1

  • package : tis-flashplayer
  • version : 30.0.0.134-1
  • description : Adobe Flash Player software for your Windows, to enjoy stunning audio/video playback, and exciting gameplay.
  • maintainer : TIS <technique@tranquil-it-systems.fr>
  • date : 2018-07-10 15:18:03

setup.py

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

# uninstall key retrieved from msi properties with 'ProductCode' key. See below
uninstallkey=[]

def windows_version():
    """see https://msdn.microsoft.com/en-us/library/windows/desktop/ms724832(v=vs.85).aspx"""
    try:
        return Version(platform.win32_ver()[1],3)
    except:
        return Version(platform.win32_ver()[1])

def install():

    for uninstall in installed_softwares('Adobe Flash Player'):
        if not 'MsiExec.exe' in uninstall['uninstall_string'] :
            if uninstall_key_exists(uninstall['key']):
                run_notfatal('"uninstall_flash_player.exe" -uninstall')


    print("Installing flash for firefox")
    major_version = control.version.split('.',1)[0]
    install_msi_if_needed('install_flash_player_%s_plugin.msi'%major_version,killbefore=['firefox.exe','chrome.exe'])

    print("Installing flash for internet explorer if < win10")
    if windows_version()<Version('6.2.0'):
        install_msi_if_needed('install_flash_player_%s_active_x.msi'%major_version,killbefore=['iexplore.exe'])

    print("Disable autoupdate")
    if iswin64():
        filecopyto("mms.cfg",makepath(os.environ['SYSTEMROOT'],"SysWOW64","Macromed","Flash"))
    else:
        filecopyto("mms.cfg",makepath(os.environ['SYSTEMROOT'],"System32","Macromed","Flash"))

    for task in ('Adobe Flash Player Updater',"Adobe Flash Player PPAPI Notifier"):
        if task_exists(task):
            delete_task(task)

    if service_installed('AdobeFlashPlayerUpdateSvc'):
        if service_is_running('AdobeFlashPlayerUpdateSvc'):
            service_stop('AdobeFlashPlayerUpdateSvc')
        run('sc delete AdobeFlashPlayerUpdateSvc')



def update_package():

    proxy = {'http':'http://srvproxy:3128','https':'http://srvproxy:3128'}

    """Update to current version from macromedia"""
    os.chdir(os.path.dirname(__file__))
    # find latest version
    import requests,BeautifulSoup
    page = requests.get('https://get.adobe.com/fr/flashplayer',proxies=proxy,headers={'User-Agent':'Mozilla/5.0 (Windows NT 6.1; Win64; x64)'}).text
    bs = BeautifulSoup.BeautifulSoup(page)
    latest_version = bs.find(id="autoSelectedVersion").find(id="AUTO_ID_columnleft_p_version").text.replace('Version','').strip()
    print('Latest version: %s' % latest_version)

    major_version = latest_version.split('.',1)[0]

    allmsi = glob.glob('*.msi')
    for msi in allmsi:
        vers = get_msi_properties(msi)['ProductVersion']
        if vers != latest_version :
            remove_file(msi)

    if not isfile('install_flash_player_%s_active_x.msi' % major_version ) :
        wget('https://download.macromedia.com/get/flashplayer/pdc/%s/install_flash_player_%s_active_x.msi' % (latest_version,major_version),os.getcwd(),proxies=proxy)
    if not isfile('install_flash_player_%s_plugin.msi' % major_version ) :
        wget('https://download.macromedia.com/get/flashplayer/pdc/%s/install_flash_player_%s_plugin.msi'  % (latest_version,major_version),os.getcwd(),proxies=proxy)

    #if not isfile('install_flash_player_%s_ppapi.msi' % major_version ) :
    #    wget('https://download.macromedia.com/get/flashplayer/pdc/%s/install_flash_player_%s_ppapi.msi'  % (latest_version,major_version),os.getcwd(),proxies=proxy)

    wget('https://fpdownload.macromedia.com/get/flashplayer/current/support/uninstall_flash_player.exe' ,os.getcwd(),proxies=proxy)

    # change version of package
    from waptpackage import PackageEntry
    pe = PackageEntry()
    pe.load_control_from_wapt(os.getcwd())
    pe.version = get_msi_properties('install_flash_player_%s_active_x.msi' % major_version)['ProductVersion']+'-0'
    pe.save_control_to_wapt(os.getcwd())

if __name__ == '__main__':
    update_package()
    

Changelog

No changelog
    

manifest.sha256

[["WAPT/icon.png", "8de118d7a6cc80877940d13927f1eded7a31bb8d4376cd8eb70b5a2e899d2aa3"], ["WAPT/certificate.crt", "79e5388683c0b6cb03f4f81e4e58e3a11463b2b6cf169dd9c453098027dcfaa4"], ["WAPT/wapt.psproj", "e306ae088b4ffc91364d6f53a3933bffa75f4bc4f8a3d6ff422209e90760feb0"], ["mms.cfg", "490a4a0df021a58b3656609542e367af5997a0a3c7fcb0c1ae00a8f5c41ae17a"], ["install_flash_player_30_active_x.msi", "e3c6117ad87b79d3d984ef5d5f7f91cfd3d5762273dceb526414abddb98a71b9"], ["install_flash_player_30_plugin.msi", "27ea3785ccdd012d48c5bfc29b701dbb421e4748ad59c875b7982b065bee4d4e"], ["setup.py", "ba189e718c27c0da53b62139b98d8335c29ee034b72e227d1c720043fa56bd02"], ["uninstall_flash_player.exe", "3df1e34dc05db221adfd07890efcd627c017600502a2f6f8c0e1da4fea80aec1"], ["WAPT/control", "0d12704d217fa8064a0eeb352c207459f6ef410a189f1ad654c8848ba9c8b9a1"]]