tis-adoptopenjdk8-jre

8.0.282.8-17
AdoptOpenJDK 8 JRE HotSpot
3355 downloads
Download
default icon

  Description 

  • package : tis-adoptopenjdk8-jre
  • version : 8.0.282.8-17
  • architecture : all
  • categories : System and network
  • maintainer : WAPT Team,Tranquil IT,Jimmy PELÉ
  • description : AdoptOpenJDK 8 JRE HotSpot
  • locale : all
  • target_os : windows
  • 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:26:14.982683
  • Homepage : https://adoptopenjdk.net/
  • Conflicts :

  Setup.py 

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

uninstallkey = []

# Defining variables
bin_name_string_x86 = 'OpenJDK8U-jre_x86-32_windows_hotspot_%s.msi'
bin_name_string_x64 = 'OpenJDK8U-jre_x64_windows_hotspot_%s.msi'
silent_inst_args = 'INSTALLLEVEL=3 ADDLOCAL=FeatureOracleJavaSoft'
url_dl_x86 = 'https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u282-b08/OpenJDK8U-jre_x86-32_windows_hotspot_8u282b08.msi'
url_dl_x64 = 'https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u282-b08/OpenJDK8U-jre_x64_windows_hotspot_8u282b08.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 8" 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.txt.
									
  manifest.sha256