├── .gitattributes ├── README.md ├── addon.xml └── main.py /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # JRE-Kodi-Android 2 | JRE Addon for Kodi (Android) 3 | 4 | This requires a modified version of libbluray 1.3.2. 5 | For both ARM64 (aarch64) and ARM (32bits). 6 | -------------------------------------------------------------------------------- /addon.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | install JRE for Bluray Menu Playback 10 | This script will install JRE for Bluray and Bluray UHD Menu playback 11 | android 12 | GNU GENERAL PUBLIC LICENSE Version 2 13 | 14 | 15 | -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3.4 2 | import os, xbmc, xbmcvfs, xbmcaddon, xbmc, xbmcgui 3 | from zipfile import ZipFile 4 | 5 | jreZipSrc = os.path.join(xbmcaddon.Addon().getAddonInfo('path'), 'resources/lib/j2re-image.zip') 6 | jreZipInstall = xbmcvfs.translatePath("special://xbmcbin/../../../cache/lib/j2re-image.zip") 7 | libbluray = xbmcvfs.translatePath("special://xbmcbin/../../../cache/lib/j2re-image/libbluray.jar") 8 | java_home = xbmcvfs.translatePath("special://xbmcbin/../../../cache/lib/j2re-image/") 9 | jreInstall = xbmcvfs.translatePath("special://xbmcbin/../../../cache/lib/") 10 | 11 | profileDir = xbmcvfs.translatePath("special://home/userdata/decoderfilter.xml") 12 | keymapsDir = xbmcvfs.translatePath("special://home/userdata/keymaps/keyboard.xml") 13 | keyboardProfile = os.path.join(xbmcaddon.Addon().getAddonInfo('path'), 'resources/keyboard.xml') 14 | decoderProfile = os.path.join(xbmcaddon.Addon().getAddonInfo('path'), 'resources/decoderfilter.xml') 15 | 16 | if xbmcvfs.exists(libbluray): 17 | print("Java Runtime is already installed.") 18 | else: 19 | if xbmcvfs.exists(jreZipSrc): 20 | xbmcvfs.copy(jreZipSrc, jreZipInstall) 21 | zip = ZipFile(jreZipInstall) 22 | zip.extractall(jreInstall) 23 | zip.close() 24 | 25 | askKeymap = xbmcgui.Dialog().yesno("Install the KEYBOARD profile?", "Installing the keyboard profile makes easier to control Bluray menus using remotes with fewer keys", yeslabel="Yes, overwrite my current KEYBOARD profile", nolabel="No, do not alter my KEYBOARD profile") 26 | if askKeymap: 27 | xbmcvfs.copy(keyboardProfile, keymapsDir) 28 | 29 | askDecoder = xbmcgui.Dialog().yesno("Install the DECODER profile?", "Installing the decoder profile fixes Bluray menus with background video", yeslabel="Yes, overwrite my DECODER profile", nolabel="No, do not alter my DECODER profile") 30 | if askDecoder: 31 | xbmcvfs.copy(decoderProfile, profileDir) 32 | 33 | else: 34 | print("Could not find j2re-image.zip") 35 | 36 | 37 | for path, subdirs, files in os.walk(java_home): 38 | for name in files: 39 | print(os.path.join(path, name)) 40 | --------------------------------------------------------------------------------