Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions installation_and_upgrade/ibex_install_utils/tasks/system_tasks.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import glob
import os
import shutil
import subprocess
import tempfile
import time
from pathlib import Path
Expand Down Expand Up @@ -46,6 +45,7 @@

EPICS_CRTL_PATH = os.path.join(EPICS_PATH, "crtl")

JAVA_INSTALL_BASE_PATH = os.path.join(APPS_BASE_DIR, "JDK")

DESKTOP_TRAINING_FOLDER_PATH = os.path.join(
os.environ["userprofile"], "desktop", "Mantid+IBEX training"
Expand Down Expand Up @@ -88,15 +88,20 @@ def check_java_installation(self) -> None:
"""
Checks Java installation
"""
installer, _ = Java().find_latest()
installer, version = Java().find_latest()

if os.path.exists(installer):
print(f"running installer at {installer}")
subprocess.call(
f"msiexec /i {installer} "

admin_commands = AdminCommandBuilder()
admin_commands.add_command(
f'msiexec /i "{installer}"',
"ADDLOCAL=FeatureMain,FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome "
'INSTALLDIR="c:\\Program Files\\Eclipse Adoptium\\" /quiet'
f'INSTALLDIR="{os.path.join(JAVA_INSTALL_BASE_PATH, version)}" /quiet',
expected_return_val=None,
)
admin_commands.run_all()

self.prompt.prompt_and_raise_if_not_yes(
"Make sure java installed correctly.\r\n"
"After following the installer, ensure you close and then re-open"
Expand Down
Loading