tis-adoptopenjdk8-jre

8.0.292.10-21
AdoptOpenJDK 8 JRE
3355 downloads
Download
View on luti logo
tis-adoptopenjdk8-jre icon

  Description 

  • package : tis-adoptopenjdk8-jre
  • version : 8.0.292.10-21
  • architecture : all
  • categories : System and network
  • maintainer : WAPT Team,Tranquil IT,Jimmy PELÉ
  • description : AdoptOpenJDK 8 JRE
  • locale : all
  • target_os : windows
  • min_wapt_version : 1.8
  • 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 : 2022-01-11T11:00:24.625777
  • Homepage : https://adoptopenjdk.net/
  • Conflicts :

  Setup.py 

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

r"""
Usable WAPT package functions: install(), uninstall(), session_setup(), audit(), update_package()

UninstallKey                           Software                                                              Version             Uninstallstring
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
{681B891F-F9FB-4DA9-8C02-A082E7ECA68A} AdoptOpenJDK JRE avec Hotspot 8u282-b08 (x64)                         8.0.282.8           MsiExec.exe /I{681B891F-F9FB-4DA9-8C02-A082E7ECA68A}
{DC542E59-1F64-473C-AB64-B602CE7CB64B} AdoptOpenJDK JRE avec Hotspot 8u282-b08 (x86)                         8.0.282.8           MsiExec.exe /I{DC542E59-1F64-473C-AB64-B602CE7CB64B}
{BBB90736-850D-443E-B245-9F24A27C81BA} AdoptOpenJDK JRE avec Eclipse OpenJ9 8u292-b10 (x64)                  8.0.292.10          MsiExec.exe /I{BBB90736-850D-443E-B245-9F24A27C81BA}
{6B9E88E9-3008-4683-9847-8CA851AB2C06} AdoptOpenJDK JRE avec Eclipse OpenJ9 8u292-b10 (x86)                  8.0.292.10          MsiExec.exe /I{6B9E88E9-3008-4683-9847-8CA851AB2C06}

Installation procedure: https://adoptopenjdk.net/installation.html

"""
# Declaring global variables - Warnings: 1) WAPT context is only available in package functions; 2) Global variables are not persistent between calls
bin_name_string_x86 = "OpenJDK8U-jre_x86-32_windows_openj9_%s.msi"
bin_name_string_x64 = "OpenJDK8U-jre_x64_windows_openj9_%s.msi"
silent_inst_args = "INSTALLLEVEL=3 ADDLOCAL=FeatureOracleJavaSoft"
url_dl_x86 = "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u292-b10_openj9-0.26.0/OpenJDK8U-jre_x86-32_windows_openj9_8u292b10_openj9-0.26.0.msi"
url_dl_x64 = "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u292-b10_openj9-0.26.0/OpenJDK8U-jre_x64_windows_openj9_8u292b10_openj9-0.26.0.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