tis-java8
Version : 8.191-2
- package : tis-java8
- editor :
- version : 8.191-2
- licence :
- architecture : all
- locale :
- description : Java JRE 32 et 64 bits, ferme IE, FF, TB avant install, Désactive mises à jour auto, Ne marche pas avec Windows XP
- description_fr :
- min_os_version : 6.0
- max_os_version :
- min_wapt_version :
- installed_size :
- impacted_process :
- signature_date : 20181018-103145
- maintainer : TIS <technique@tranquil-it-systems.fr>
setup.py
# -*- coding: utf-8 -*- from setuphelpers import * import platform uninstallkey = [] def install(): # if you want to modify the keys depending on environment (win32/win64... params..) if windows_version()<=Version('5.1'): print('plus compatible avec windows XP') prefix = control.package.split('-')[0] WAPT.install('%s-java8(=8.151-2)' % prefix) else: allmsi = glob.glob('*.msi') for msi in allmsi : java_version = get_msi_properties(msi)['ProductVersion'] print ('Installation de Java version : %s' % java_version) break print('Checking old java 8...') old_java8 = installed_softwares('{26A24AE4-039D-4CA4-87B4') for uninstall in old_java8: if Version(uninstall['version'].split('.',1)[0]) == Version(java_version.split('.',1)[0]) : if Version(uninstall['version']) < Version(java_version): killalltasks(['firefox.exe','chrome.exe','iexplore.exe','jushed.exe']) print('Removing %s'%uninstall['name']) cmd = uninstall_cmd(uninstall['key']) print run_notfatal(cmd) for msi in allmsi : if '(64-bit)' in get_msi_properties(msi)['ProductName'] : if iswin64(): install_msi_if_needed(msi,killbefore=['iexplore.exe','jushed.exe']) else: install_msi_if_needed(msi,killbefore=['iexplore.exe','jushed.exe']) print("desactivation des mises a jour automatiques") if iswin64(): key=reg_openkey_noredir(HKEY_LOCAL_MACHINE,r'SOFTWARE\Wow6432Node\JavaSoft\Java Update\Policy',sam=KEY_WRITE,create_if_missing=True) reg_setvalue(key,'EnableJavaUpdate',0,REG_DWORD) else: key=reg_openkey_noredir(HKEY_LOCAL_MACHINE,r'SOFTWARE\JavaSoft\Java Update\Policy',sam=KEY_WRITE,create_if_missing=True) reg_setvalue(key,'EnableJavaUpdate',0,REG_DWORD) def uninstall(): # if you want to modify the keys depending on environment (win32/win64... params..) if Version(platform.win32_ver()[1])<=Version('5.1'): # plus compatible avec windows XP prefix = control.package.split('-')[0] WAPT.remove('%s-java8-xp'%prefix) def sendmessagebox(msg,title,boxtype=4096): import win32ui titlebox = title.decode('utf-8','ignore').encode('cp1252','ignore') txt=msg.decode('utf-8','ignore').encode('cp1252','ignore') resultask = win32ui.MessageBox(txt, titlebox, boxtype) def update_sources(): proxy = {'http':'http://srvproxy:3128','https':'http://srvproxy:3128'} # proxy = {} import requests,BeautifulSoup page = requests.get('https://www.java.com/en/download/manual.jsp',proxies=proxy,headers={'User-Agent':'Mozilla/5.0 (Windows NT 6.1; Win64; x64)'}).text bs = BeautifulSoup.BeautifulSoup(page) url32 = bs.find(title = "Download Java software for Windows Offline")["href"] url64 = bs.find(title = "Download Java software for Windows (64-bit)")["href"] print('Download Java 32') wget(url32,'java32.exe',proxies=proxy) print('Download Java 64') wget(url64,'java64.exe',proxies=proxy) if not iswin64(): error('Update source only on x64') sendmessagebox("Sur les fenetres suivantes vous devez cliquer sur annuler pour annuler l'installation de JAVA",'Attention') allmsi = glob.glob('*.msi') for msi in allmsi : remove_file(msi) if isdir(makepath(user_appdata(),'..','LocalLow','Oracle')): remove_tree(makepath(user_appdata(),'..','LocalLow','Oracle')) allexe = glob.glob('*.exe') for exe in allexe : run(exe) remove_file(exe) currentpath = os.path.dirname(os.path.realpath(__file__)) allmsi = glob.glob(makepath(user_appdata(),'..','LocalLow','Oracle','Java','*','*.msi')) for msi in allmsi: filecopyto(msi,currentpath) allmsi = glob.glob('*.msi') for msi in allmsi: realversion = get_msi_properties(msi)['ProductName'].replace('Java ','').replace('Update ','').replace(' (64-bit)','').replace(' ','.') versionmajeur = realversion.split('.',1)[0] print versionmajeur os.chdir(os.path.dirname(__file__)) from waptpackage import PackageEntry pe = PackageEntry() pe.load_control_from_wapt(os.getcwd()) pe.version = realversion + '-0' pe.package = pe.package[:-1] + versionmajeur pe.save_control_to_wapt(os.getcwd()) if __name__ == '__main__': update_sources()
Changelog
"""{% trans %}No changelog.{% endtrans %}"""
manifest.sha256
[["WAPT/icon.png", "d31eb412a45b4188140002a309a8f7787b772c6649256f7783d2e051f3d2b761"], ["WAPT/certificate.crt", "13fb474c5c23c135a77aba592eb8821b9ecbcc463f5b7312312b87b20eac6779"], ["WAPT/wapt.psproj", "df3e2fa87fea9c7bdfcc22039b9ef7303f092898882d9f3f4233f5d92f90b3c7"], ["jre1.8.0_19164.msi", "1a5d746260a88f06b6cc5552036a513cc0d06835faba5c8a2692438b3a9f905e"], ["jre1.8.0_191.msi", "3a7e4c039595f92d4fbefcd6b70512e5d6f073c3eb14b8918dd165ccaf10fed6"], ["setup.py", "5ca490f4ddcdbb5cb24a9500338bfce9831bc432cedeb4a8cf26f6da15a0e90e"], ["WAPT/control", "e7ee9029cc5bc22b929221cae35c306153f28f8f4aa60546f53f7819cac7e808"]]