Import java8 from TIS, adapt it and update to 8u211
This commit is contained in:
parent
b83130fe4f
commit
5d3ed81dd2
|
@ -0,0 +1,32 @@
|
|||
package : fws-java8
|
||||
version : 8.221-4
|
||||
architecture : all
|
||||
section : base
|
||||
priority : optional
|
||||
maintainer : Daniel Berteaud <daniel@firewall-services.com>
|
||||
description : Oracle JRE
|
||||
depends :
|
||||
conflicts :
|
||||
maturity : PROD
|
||||
locale : all
|
||||
target_os : windows
|
||||
min_os_version : 6.0
|
||||
max_os_version :
|
||||
min_wapt_version : 1.5
|
||||
sources :
|
||||
installed_size :
|
||||
impacted_process :
|
||||
description_fr :
|
||||
description_pl :
|
||||
description_de :
|
||||
description_es :
|
||||
audit_schedule : 2w
|
||||
editor : Oracle
|
||||
keywords :
|
||||
licence :
|
||||
homepage : https://www.java.com
|
||||
package_uuid :
|
||||
signer : Daniel Berteaud
|
||||
signer_fingerprint:
|
||||
signature_date :
|
||||
signed_attributes :
|
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
|
@ -0,0 +1,295 @@
|
|||
[PyScripter]
|
||||
Version=3.3.2.0
|
||||
|
||||
[Project]
|
||||
ClassName=TProjectRootNode
|
||||
StoreRelativePaths=TRUE
|
||||
ShowFileExtensions=FALSE
|
||||
|
||||
[Project\ChildNodes\Node0]
|
||||
ClassName=TProjectFilesNode
|
||||
|
||||
[Project\ChildNodes\Node0\ChildNodes\Node0]
|
||||
ClassName=TProjectFolderNode
|
||||
Name=wapt
|
||||
|
||||
[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node0]
|
||||
ClassName=TProjectFileNode
|
||||
FileName=C:\Program Files (x86)\wapt\common.py
|
||||
|
||||
[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node1]
|
||||
ClassName=TProjectFileNode
|
||||
FileName=C:\Program Files (x86)\wapt\setuphelpers.py
|
||||
|
||||
[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node2]
|
||||
ClassName=TProjectFileNode
|
||||
FileName=C:\Program Files (x86)\wapt\wapt-get.ini
|
||||
|
||||
[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3]
|
||||
ClassName=TProjectFileNode
|
||||
FileName=C:\Program Files (x86)\wapt\wapt-get.py
|
||||
|
||||
[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node4]
|
||||
ClassName=TProjectFileNode
|
||||
FileName=C:\Program Files (x86)\wapt\waptpackage.py
|
||||
|
||||
[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes]
|
||||
Count=5
|
||||
|
||||
[Project\ChildNodes\Node0\ChildNodes\Node1]
|
||||
ClassName=TProjectFileNode
|
||||
FileName=$[Project-Path]changelog.txt
|
||||
|
||||
[Project\ChildNodes\Node0\ChildNodes\Node2]
|
||||
ClassName=TProjectFileNode
|
||||
FileName=$[Project-Path]control
|
||||
|
||||
[Project\ChildNodes\Node0\ChildNodes\Node3]
|
||||
ClassName=TProjectFileNode
|
||||
FileName=$[Project-Path]..\setup.py
|
||||
|
||||
[Project\ChildNodes\Node0\ChildNodes]
|
||||
Count=4
|
||||
|
||||
[Project\ChildNodes\Node1]
|
||||
ClassName=TProjectRunConfiguationsNode
|
||||
|
||||
[Project\ChildNodes\Node1\ChildNodes\Node0]
|
||||
ClassName=TProjectRunConfiguationNode
|
||||
Name=install
|
||||
|
||||
[Project\ChildNodes\Node1\ChildNodes\Node0\RunConfig]
|
||||
ScriptName=C:\Program Files (x86)\wapt\wapt-get.py
|
||||
EngineType=peRemote
|
||||
ReinitializeBeforeRun=TRUE
|
||||
Parameters=install "$[Project-Path].."
|
||||
WorkingDir=$[Project-Path]..
|
||||
WriteOutputToFile=FALSE
|
||||
OutputFileName=$[ActiveScript-NoExt].log
|
||||
AppendToFile=FALSE
|
||||
|
||||
[Project\ChildNodes\Node1\ChildNodes\Node0\RunConfig\ExternalRun]
|
||||
Caption=External Run
|
||||
Description=Run script using an external Python Interpreter
|
||||
ApplicationName=$[PythonExe-Short]
|
||||
Parameters=$[ActiveScript-Short]
|
||||
WorkingDirectory=$[ActiveScript-Dir]
|
||||
ShortCut=0
|
||||
MessagesFormat=$[FileName] $[LineNumber]
|
||||
|
||||
[Project\ChildNodes\Node1\ChildNodes\Node1]
|
||||
ClassName=TProjectRunConfiguationNode
|
||||
Name=remove
|
||||
|
||||
[Project\ChildNodes\Node1\ChildNodes\Node1\RunConfig]
|
||||
ScriptName=C:\Program Files (x86)\wapt\wapt-get.py
|
||||
EngineType=peRemote
|
||||
ReinitializeBeforeRun=TRUE
|
||||
Parameters=remove "$[Project-Path].."
|
||||
WorkingDir=$[Project-Path]..
|
||||
WriteOutputToFile=FALSE
|
||||
OutputFileName=$[ActiveScript-NoExt].log
|
||||
AppendToFile=FALSE
|
||||
|
||||
[Project\ChildNodes\Node1\ChildNodes\Node1\RunConfig\ExternalRun]
|
||||
Caption=External Run
|
||||
Description=Run script using an external Python Interpreter
|
||||
ApplicationName=$[PythonExe-Short]
|
||||
Parameters=$[ActiveScript-Short]
|
||||
WorkingDirectory=$[ActiveScript-Dir]
|
||||
ShortCut=0
|
||||
MessagesFormat=$[FileName] $[LineNumber]
|
||||
|
||||
[Project\ChildNodes\Node1\ChildNodes\Node2]
|
||||
ClassName=TProjectRunConfiguationNode
|
||||
Name=session-setup
|
||||
|
||||
[Project\ChildNodes\Node1\ChildNodes\Node2\RunConfig]
|
||||
ScriptName=C:\Program Files (x86)\wapt\wapt-get.py
|
||||
EngineType=peRemote
|
||||
ReinitializeBeforeRun=TRUE
|
||||
Parameters=session-setup "$[Project-Path].."
|
||||
WorkingDir=$[Project-Path]..
|
||||
WriteOutputToFile=FALSE
|
||||
OutputFileName=$[ActiveScript-NoExt].log
|
||||
AppendToFile=FALSE
|
||||
|
||||
[Project\ChildNodes\Node1\ChildNodes\Node2\RunConfig\ExternalRun]
|
||||
Caption=External Run
|
||||
Description=Run script using an external Python Interpreter
|
||||
ApplicationName=$[PythonExe-Short]
|
||||
Parameters=$[ActiveScript-Short]
|
||||
WorkingDirectory=$[ActiveScript-Dir]
|
||||
ShortCut=0
|
||||
MessagesFormat=$[FileName] $[LineNumber]
|
||||
|
||||
[Project\ChildNodes\Node1\ChildNodes\Node3]
|
||||
ClassName=TProjectRunConfiguationNode
|
||||
Name=update
|
||||
|
||||
[Project\ChildNodes\Node1\ChildNodes\Node3\RunConfig]
|
||||
ScriptName=C:\Program Files (x86)\wapt\wapt-get.py
|
||||
EngineType=peRemote
|
||||
ReinitializeBeforeRun=TRUE
|
||||
Parameters=update
|
||||
WorkingDir=$[Project-Path]..
|
||||
WriteOutputToFile=FALSE
|
||||
OutputFileName=$[ActiveScript-NoExt].log
|
||||
AppendToFile=FALSE
|
||||
|
||||
[Project\ChildNodes\Node1\ChildNodes\Node3\RunConfig\ExternalRun]
|
||||
Caption=External Run
|
||||
Description=Run script using an external Python Interpreter
|
||||
ApplicationName=$[PythonExe-Short]
|
||||
Parameters=$[ActiveScript-Short]
|
||||
WorkingDirectory=$[ActiveScript-Dir]
|
||||
ShortCut=0
|
||||
MessagesFormat=$[FileName] $[LineNumber]
|
||||
|
||||
[Project\ChildNodes\Node1\ChildNodes\Node4]
|
||||
ClassName=TProjectRunConfiguationNode
|
||||
Name=upgrade
|
||||
|
||||
[Project\ChildNodes\Node1\ChildNodes\Node4\RunConfig]
|
||||
ScriptName=C:\Program Files (x86)\wapt\wapt-get.py
|
||||
EngineType=peRemote
|
||||
ReinitializeBeforeRun=TRUE
|
||||
Parameters=-f upgrade
|
||||
WorkingDir=$[ActiveScript-Dir]
|
||||
WriteOutputToFile=FALSE
|
||||
OutputFileName=$[ActiveScript-NoExt].log
|
||||
AppendToFile=FALSE
|
||||
|
||||
[Project\ChildNodes\Node1\ChildNodes\Node4\RunConfig\ExternalRun]
|
||||
Caption=External Run
|
||||
Description=Run script using an external Python Interpreter
|
||||
ApplicationName=$[PythonExe-Short]
|
||||
Parameters=$[ActiveScript-Short]
|
||||
WorkingDirectory=$[ActiveScript-Dir]
|
||||
ShortCut=0
|
||||
MessagesFormat=$[FileName] $[LineNumber]
|
||||
|
||||
[Project\ChildNodes\Node1\ChildNodes\Node5]
|
||||
ClassName=TProjectRunConfiguationNode
|
||||
Name=-i build-upload
|
||||
|
||||
[Project\ChildNodes\Node1\ChildNodes\Node5\RunConfig]
|
||||
ScriptName=C:\Program Files (x86)\wapt\wapt-get.py
|
||||
EngineType=peRemote
|
||||
ReinitializeBeforeRun=TRUE
|
||||
Parameters=-i build-upload "$[Project-Path].."
|
||||
WorkingDir=$[Project-Path]..
|
||||
WriteOutputToFile=FALSE
|
||||
OutputFileName=$[ActiveScript-NoExt].log
|
||||
AppendToFile=FALSE
|
||||
|
||||
[Project\ChildNodes\Node1\ChildNodes\Node5\RunConfig\ExternalRun]
|
||||
Caption=External Run
|
||||
Description=Run script using an external Python Interpreter
|
||||
ApplicationName=$[PythonExe-Short]
|
||||
Parameters=$[ActiveScript-Short]
|
||||
WorkingDirectory=$[ActiveScript-Dir]
|
||||
ShortCut=0
|
||||
MessagesFormat=$[FileName] $[LineNumber]
|
||||
|
||||
[Project\ChildNodes\Node1\ChildNodes\Node6]
|
||||
ClassName=TProjectRunConfiguationNode
|
||||
Name=svn update
|
||||
|
||||
[Project\ChildNodes\Node1\ChildNodes\Node6\RunConfig]
|
||||
ScriptName=C:\Program Files (x86)\wapt\wapt-get.py
|
||||
EngineType=peRemote
|
||||
ReinitializeBeforeRun=TRUE
|
||||
Parameters=sources "$[Project-Path].."
|
||||
WorkingDir=$[Project-Path]..
|
||||
WriteOutputToFile=FALSE
|
||||
OutputFileName=$[ActiveScript-NoExt].log
|
||||
AppendToFile=FALSE
|
||||
|
||||
[Project\ChildNodes\Node1\ChildNodes\Node6\RunConfig\ExternalRun]
|
||||
Caption=External Run
|
||||
Description=Run script using an external Python Interpreter
|
||||
ApplicationName=$[PythonExe-Short]
|
||||
Parameters=$[ActiveScript-Short]
|
||||
WorkingDirectory=$[ActiveScript-Dir]
|
||||
ShortCut=0
|
||||
MessagesFormat=$[FileName] $[LineNumber]
|
||||
|
||||
[Project\ChildNodes\Node1\ChildNodes\Node7]
|
||||
ClassName=TProjectRunConfiguationNode
|
||||
Name=uninstall
|
||||
|
||||
[Project\ChildNodes\Node1\ChildNodes\Node7\RunConfig]
|
||||
ScriptName=C:\Program Files (x86)\wapt\wapt-get.py
|
||||
EngineType=peRemote
|
||||
ReinitializeBeforeRun=TRUE
|
||||
Parameters=uninstall "$[Project-Path].."
|
||||
WorkingDir=$[Project-Path]..
|
||||
WriteOutputToFile=FALSE
|
||||
OutputFileName=$[ActiveScript-NoExt].log
|
||||
AppendToFile=FALSE
|
||||
|
||||
[Project\ChildNodes\Node1\ChildNodes\Node7\RunConfig\ExternalRun]
|
||||
Caption=External Run
|
||||
Description=Run script using an external Python Interpreter
|
||||
ApplicationName=$[PythonExe-Short]
|
||||
Parameters=$[ActiveScript-Short]
|
||||
WorkingDirectory=$[Project-Path]..
|
||||
ShortCut=0
|
||||
MessagesFormat=$[FileName] $[LineNumber]
|
||||
|
||||
[Project\ChildNodes\Node1\ChildNodes\Node8]
|
||||
ClassName=TProjectRunConfiguationNode
|
||||
Name=update-package-sources
|
||||
|
||||
[Project\ChildNodes\Node1\ChildNodes\Node8\RunConfig]
|
||||
ScriptName=C:\Program Files (x86)\wapt\wapt-get.py
|
||||
EngineType=peRemote
|
||||
ReinitializeBeforeRun=TRUE
|
||||
Parameters=update-package-sources "$[Project-Path].."
|
||||
WorkingDir=$[Project-Path]..
|
||||
WriteOutputToFile=FALSE
|
||||
OutputFileName=$[ActiveScript-NoExt].log
|
||||
AppendToFile=FALSE
|
||||
|
||||
[Project\ChildNodes\Node1\ChildNodes\Node8\RunConfig\ExternalRun]
|
||||
Caption=External Run
|
||||
Description=Run script using an external Python Interpreter
|
||||
ApplicationName=$[PythonExe-Short]
|
||||
Parameters=$[ActiveScript-Short]
|
||||
WorkingDirectory=$[ActiveScript-Dir]
|
||||
ShortCut=0
|
||||
MessagesFormat=$[FileName] $[LineNumber]
|
||||
|
||||
[Project\ChildNodes\Node1\ChildNodes\Node9]
|
||||
ClassName=TProjectRunConfiguationNode
|
||||
Name=audit
|
||||
|
||||
[Project\ChildNodes\Node1\ChildNodes\Node9\RunConfig]
|
||||
ScriptName=C:\Program Files (x86)\wapt\wapt-get.py
|
||||
EngineType=peRemote
|
||||
ReinitializeBeforeRun=TRUE
|
||||
Parameters=audit -f "$[Project-Path].."
|
||||
WorkingDir=$[Project-Path]..
|
||||
WriteOutputToFile=FALSE
|
||||
OutputFileName=$[ActiveScript-NoExt].log
|
||||
AppendToFile=FALSE
|
||||
|
||||
[Project\ChildNodes\Node1\ChildNodes\Node9\RunConfig\ExternalRun]
|
||||
Caption=External Run
|
||||
Description=Run script using an external Python Interpreter
|
||||
ApplicationName=$[PythonExe-Short]
|
||||
Parameters=$[ActiveScript-Short]
|
||||
WorkingDirectory=$[ActiveScript-Dir]
|
||||
ShortCut=0
|
||||
MessagesFormat=$[FileName] $[LineNumber]
|
||||
|
||||
[Project\ChildNodes\Node1\ChildNodes]
|
||||
Count=10
|
||||
|
||||
[Project\ChildNodes]
|
||||
Count=2
|
||||
|
||||
[Project\ExtraPythonPath]
|
||||
Count=0
|
||||
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,99 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from setuphelpers import *
|
||||
|
||||
uninstallkey = []
|
||||
|
||||
|
||||
def install():
|
||||
|
||||
version = control['version'].split('-',1)[0]
|
||||
major_version = version.split('.',1)[0]
|
||||
minor_version = version.split('.',1)[1]
|
||||
|
||||
|
||||
print('Checking old java 8 versions...')
|
||||
old_java8 = installed_softwares('{26A24AE4-039D-4CA4-87B4')
|
||||
for uninstall in old_java8:
|
||||
if Version(uninstall['version'].split('.',1)[0]) == Version(major_version) :
|
||||
if Version(uninstall['version']) < Version(version):
|
||||
killalltasks(['firefox.exe','chrome.exe','iexplore.exe','jushed.exe'])
|
||||
print('Uninstalling previous version %s' % uninstall['version'])
|
||||
cmd = uninstall_cmd(uninstall['key'])
|
||||
run_notfatal(cmd)
|
||||
|
||||
print ('Installing Oracle JRE version : %s' % version)
|
||||
install_msi_if_needed('jre1.%s.0_%s.msi' % (major_version,minor_version),killbefore=['firefox.exe','chrome.exe','iexplore.exe','jushed.exe'])
|
||||
if iswin64():
|
||||
install_msi_if_needed('jre1.%s.0_%s64.msi' % (major_version,minor_version),killbefore=['firefox.exe','chrome.exe','iexplore.exe','jushed.exe'])
|
||||
|
||||
print("Disabling auto updates")
|
||||
if iswin64():
|
||||
reg_path = r'SOFTWARE\Wow6432Node\JavaSoft\Java Update\Policy'
|
||||
else:
|
||||
reg_path = r'SOFTWARE\JavaSoft\Java Update\Policy'
|
||||
|
||||
key = reg_openkey_noredir(HKEY_LOCAL_MACHINE, reg_path, sam=KEY_WRITE, create_if_missing=True)
|
||||
reg_setvalue(key,'EnableJavaUpdate', 0, REG_DWORD)
|
||||
|
||||
|
||||
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_package():
|
||||
|
||||
import requests,BeautifulSoup,re
|
||||
from waptpackage import PackageEntry
|
||||
|
||||
page = requests.get('https://www.java.com/en/download/manual.jsp',headers={'User-Agent':'Mozilla/5.0 (Windows NT 6.1; Win64; x64)'}).text
|
||||
bs = BeautifulSoup.BeautifulSoup(page)
|
||||
new_minor = re.search('Recommended Version 8 Update (\d+)',page).group(1)
|
||||
pe = PackageEntry()
|
||||
control = pe.load_control_from_wapt(os.getcwd())
|
||||
current_version = control['version'].split('-',1)[0]
|
||||
|
||||
if Version('8.' + new_minor) > Version(current_version):
|
||||
print('New version available %s' % new_minor)
|
||||
url32 = bs.find(title = "Download Java software for Windows Offline")["href"]
|
||||
url64 = bs.find(title = "Download Java software for Windows (64-bit)")["href"]
|
||||
|
||||
|
||||
print('Downloading Oracle JRE for 32 bit systems')
|
||||
wget(url32,'java32.exe')
|
||||
|
||||
print('Downloading Oracle JRE for 64 bit systems')
|
||||
wget(url64,'java64.exe')
|
||||
|
||||
if not iswin64():
|
||||
error('Update source only on x64 machine')
|
||||
|
||||
sendmessagebox("Please cancel Oracle JRE installations that will start next",'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)
|
||||
|
||||
current_path = os.path.dirname(os.path.realpath(__file__))
|
||||
allmsi = glob.glob(makepath(user_appdata(), '..', 'LocalLow', 'Oracle', 'Java', '*', '*.msi'))
|
||||
for msi in allmsi:
|
||||
filecopyto(msi, current_path)
|
||||
|
||||
pe.version = '8.' + new_minor + '-0'
|
||||
pe.maturity = 'PREPROD'
|
||||
pe.save_control_to_wapt(os.getcwd())
|
||||
else:
|
||||
print('No update available')
|
||||
|
||||
if __name__ == '__main__':
|
||||
update_package()
|
Loading…
Reference in New Issue