tis-adoptopenjdk11-jre

11.0.10.9-17
AdoptOpenJDK 11 JRE HotSpot
94 downloads
Download

  Description 

  • package : tis-adoptopenjdk11-jre
  • version : 11.0.10.9-17
  • architecture : all
  • categories : System and network
  • maintainer : WAPT Team,Tranquil IT,Jimmy PELÉ,Gaëtan SEGAT
  • description : AdoptOpenJDK 11 JRE HotSpot
  • locale : all
  • target_os : windows
  • min_os_version : 6.1
  • max_os_version :
  • min_wapt_version : 1.7
  • sources : https://github.com/AdoptOpenJDK/openjdk8-binaries/releases
  • installed_size :
  • impacted_process : java,javaw
  • description_fr :
  • description_pl :
  • description_de :
  • description_es :
  • description_pt :
  • description_it :
  • description_nl :
  • description_ru :
  • editor : AdoptOpenJDK
  • licence : GPLv2
  • signature_date : 2021-01-25T17:25:53.489558
  • Homepage : https://adoptopenjdk.net/
  • Conflicts :

  Setup.py 

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

uninstallkey = []

# Defining variables
bin_name_string_x86 = 'OpenJDK11U-jre_x64_windows_hotspot_%s.msi'
bin_name_string_x64 = 'OpenJDK11U-jre_x86-32_windows_hotspot_%s.msi'
silent_inst_args = 'INSTALLLEVEL=3' # ADDLOCAL=FeatureOracleJavaSoft => Avoid using on "non 8" version ?
url_dl_x86 = 'https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.10%2B9/OpenJDK11U-jre_x86-32_windows_hotspot_11.0.10_9.msi'
url_dl_x64 = 'https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.10%2B9/OpenJDK11U-jre_x64_windows_hotspot_11.0.10_9.msi'


def install():
    # Initializing variables
    package_version = control.version.split('-',1)[0]
    for bin_to_install in glob.glob('*.exe') or glob.glob('*.msi'):
        if bin_to_install.startswith(bin_name_string_x86.split('%s')[0]):
            bin_name_x86 = bin_to_install
        else:
            bin_name_x64 = bin_to_install
    package_version_major = package_version.split('.')[0]

    # Uninstalling others "AdoptOpenJDK 11" versions
    for uninstall_app in installed_softwares(name='AdoptOpenJDK'):
        if 'AdoptOpenJDK' in uninstall_app['publisher']:
            if uninstall_app['version'].split('.')[0] == package_version_major:
                if uninstall_app['version'] != package_version or uninstall_app['name'].startswith('AdoptOpenJDK JDK'):
                    print('Removing: %s'% uninstall_app['name'])
                    run(uninstall_cmd(uninstall_app['key']))

    # Installing the package
    print('Installing: %s' % bin_name_x86)
    install_msi_if_needed(bin_name_x86,
        properties=silent_inst_args,
        min_version=package_version)

    if iswin64():
        print('Installing: %s' % bin_name_x64)
        install_msi_if_needed(bin_name_x64,
            properties=silent_inst_args,
            min_version=package_version)


def update_package():
    # Initializing variables
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    latest_bin_x86 = url_dl_x86.split('/')[-1]
    latest_bin_x64 = url_dl_x64.split('/')[-1]

    # Downloading latest binaries
    if not isfile(latest_bin_x64):
        print('Downloading ' + latest_bin_x64)
        wget(url_dl_x64, latest_bin_x64, proxies=proxies)
    if not isfile(latest_bin_x86):
        print('Downloading ' + latest_bin_x86)
        wget(url_dl_x86, latest_bin_x86, proxies=proxies)

		# Renaming binaries
        version = get_version_from_binary(latest_bin_x86)

        old_latest_bin_x86 = latest_bin_x86
        old_latest_bin_x64 = latest_bin_x64
        latest_bin_x86 = bin_name_string_x86 % version
        latest_bin_x64 = bin_name_string_x64 % version
        os.rename(old_latest_bin_x86,latest_bin_x86)
        os.rename(old_latest_bin_x64,latest_bin_x64)

        # Changing version of the package
        control.version = '%s-%s' % (version, control.version.split('-')[-1])
        control.save_control_to_wapt()
        print("Changing package version to: %s in WAPT\\control" % control.version)

    # Deleting outdated binaries
    remove_outdated_binaries(version)




def get_proxies():
    if platform.python_version_tuple()[0] == '3':
        from urllib.request import getproxies
    else:
        from urllib import getproxies
    return getproxies()


def get_proxies_from_wapt_console():
    proxies = {}
    if platform.system() == 'Windows':
        waptconsole_ini_path = makepath(user_local_appdata(), 'waptconsole', 'waptconsole.ini')
    else:
        waptconsole_ini_path = makepath(user_home_directory(), '.config', 'waptconsole', 'waptconsole.ini')
    if isfile(waptconsole_ini_path):
        proxy_wapt = inifile_readstring(waptconsole_ini_path, 'global', 'http_proxy')
        if proxy_wapt:
            proxies = {'http': proxy_wapt, 'https': proxy_wapt}
    return proxies


def remove_outdated_binaries(version, list_extensions=['exe','msi','deb','rpm','dmg','pkg'], list_filename_contain=None):
    if type(list_extensions) != list:
        list_extensions = [list_extensions]
    if list_filename_contain:
        if type(list_filename_contain) != list:
            list_filename_contain = [list_filename_contain]
    list_extensions = ['.' + ext for ext in list_extensions if ext[0] != '.']
    for file_ext in list_extensions:
        for bin_in_dir in glob.glob('*%s' % file_ext):
            if not version in bin_in_dir:
                remove_file(bin_in_dir)
            if list_filename_contain:
                for filename_contain in list_filename_contain:
                    if not filename_contain in bin_in_dir:
                        remove_file(bin_in_dir)


def get_version_from_binary(filename):
    if filename.endswith('.msi'):
        return get_msi_properties(filename)['ProductVersion']
    else:
        return get_file_properties(filename)['ProductVersion']


										

  Changelog 


Changelog software url : https://adoptopenjdk.net/release_notes.html

No changelog
  manifest.sha256 
[["OpenJDK11U-jre_x64_windows_hotspot_11.0.10.9.msi","e76a1d24aac19a0a323bd360bdd140d4feaf10ccd68deca22e0ebe9f4d3ce58d"],["OpenJDK11U-jre_x86-32_windows_hotspot_11.0.10.9.msi","7965969a4cb913ecea276ef5e9e3bf7f145c23bd5bbdbddb9ec21384005c44fe"],["setup.py","e519401f3a0ce948adc6a1a21d9712e18c47dce276617bf2ede87c2a1c14b69f"],["WAPT/certificate.crt","a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf"],["WAPT/icon.png","841c3b8e2f19942f438049a68b7920c2a49eb3997fb991dc6b41f3a8f242d3a3"],["WAPT/control","4c159046bda15d9da9b49e4c0495c6dee0e9a14a828c29d26dade328c09c4e30"]]