From bd0c5f6b5a23cecc8936601aaed21cae653d276f Mon Sep 17 00:00:00 2001
From: Ludovic Poitou <ludovic.poitou@forgerock.com>
Date: Thu, 23 Jun 2011 12:43:27 +0000
Subject: [PATCH] Fix issue OPENDJ-207. setup in CLI mode seems to require GUI (or X server). Some formatting code was making calls to Font (javax.awt.font) which triggered calls to the Graphic subsystem.
---
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/Installer.java | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/Installer.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/Installer.java
index f5c74c8..1208c25 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/Installer.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/Installer.java
@@ -2164,9 +2164,11 @@
* Updates the contents of the provided map with the localized summary
* strings.
* @param hmSummary the Map to be updated.
+ * @param isCli a boolean to indicate if the install is using CLI or GUI
*/
protected void initSummaryMap(
- Map<InstallProgressStep, Message> hmSummary)
+ Map<InstallProgressStep, Message> hmSummary,
+ boolean isCli)
{
hmSummary.put(InstallProgressStep.NOT_STARTED,
getFormattedSummary(INFO_SUMMARY_INSTALL_NOT_STARTED.get()));
@@ -2204,7 +2206,11 @@
Installation installation = getInstallation();
String cmd = Utils.addWordBreaks(
getPath(installation.getControlPanelCommandFile()), 60, 5);
- cmd = UIFactory.applyFontToHtml(cmd, UIFactory.INSTRUCTIONS_MONOSPACE_FONT);
+ if (!isCli)
+ {
+ cmd = UIFactory.applyFontToHtml(cmd,
+ UIFactory.INSTRUCTIONS_MONOSPACE_FONT);
+ }
String formattedPath = Utils.addWordBreaks(
formatter.getFormattedText(
Message.raw(getPath(new File(getInstancePath())))).toString(),
--
Gitblit v1.10.0