diff --git a/core/src/main/kotlin/net/corda/core/utilities/Emoji.kt b/core/src/main/kotlin/net/corda/core/utilities/Emoji.kt index c51aa1f46e..bc7fd86a14 100644 --- a/core/src/main/kotlin/net/corda/core/utilities/Emoji.kt +++ b/core/src/main/kotlin/net/corda/core/utilities/Emoji.kt @@ -7,8 +7,12 @@ import net.corda.core.codePointsString */ object Emoji { // Unfortunately only Apple has a terminal that can do colour emoji AND an emoji font installed by default. + // However the JediTerm java terminal emulator can also do emoji on OS X when using the JetBrains JRE. + // Check for that here. DemoBench sets TERM_PROGRAM appropriately. val hasEmojiTerminal by lazy { - System.getenv("CORDA_FORCE_EMOJI") != null || System.getenv("TERM_PROGRAM") in listOf("Apple_Terminal", "iTerm.app") + System.getenv("CORDA_FORCE_EMOJI") != null || + System.getenv("TERM_PROGRAM") in listOf("Apple_Terminal", "iTerm.app") || + (System.getenv("TERM_PROGRAM") == "JediTerm" && System.getProperty("java.vendor") == "JetBrains s.r.o") } @JvmStatic val CODE_SANTA_CLAUS: String = codePointsString(0x1F385) diff --git a/docs/source/demobench.rst b/docs/source/demobench.rst index 1fa649a913..b618085360 100644 --- a/docs/source/demobench.rst +++ b/docs/source/demobench.rst @@ -89,7 +89,6 @@ Developers wishing to run DemoBench *without* building a new installer each time .. - Unfortunately, DemoBench's ``$CLASSPATH`` may be too long for the Windows shell . In which case you can still run DemoBench as follows: .. parsed-literal:: @@ -98,7 +97,9 @@ Unfortunately, DemoBench's ``$CLASSPATH`` may be too long for the Windows shell .. -While DemoBench *can* be executed within an IDE, it would be up to the Developer to install all of its runtime dependencies beforehand into their correct locations relative to the value of the ``user.dir`` system property (i.e. the current working directory of the JVM): +While DemoBench *can* be executed within an IDE, it would be up to the Developer to install all of its runtime +dependencies beforehand into their correct locations relative to the value of the ``user.dir`` system property (i.e. the +current working directory of the JVM): .. parsed-literal:: @@ -112,3 +113,9 @@ While DemoBench *can* be executed within an IDE, it would be up to the Developer .. +Mac users should note that the best way to build a DemoBench DMG is with the `JetBrains JDK `_ +which has `binary downloads available from BinTray `_. +This JDK has some useful GUI fixes, most notably, when built with this JDK the DemoBench terminal will support emoji +and as such, the nicer coloured ANSI progress renderer. It also resolves some issues with hidpi rendering on +Windows. + diff --git a/node/src/main/java/net/corda/node/shell/FlowShellCommand.java b/node/src/main/java/net/corda/node/shell/FlowShellCommand.java index 3ca48441d8..de5638eab5 100644 --- a/node/src/main/java/net/corda/node/shell/FlowShellCommand.java +++ b/node/src/main/java/net/corda/node/shell/FlowShellCommand.java @@ -18,9 +18,6 @@ import static net.corda.node.shell.InteractiveShell.*; ) @Usage("Start a (work)flow on the node. This is how you can change the ledger.") public class FlowShellCommand extends InteractiveShellCommand { - // Note that the class name is deliberately lower case, because we want the command the user types to be - // lower case. CRaSH should ideally lowercase the command names for us, but it doesn't. - @Command public void start( @Usage("The class name of the flow to run, or an unambiguous substring") @Argument String name, diff --git a/tools/demobench/build.gradle b/tools/demobench/build.gradle index bafd057c87..18c12a3b62 100644 --- a/tools/demobench/build.gradle +++ b/tools/demobench/build.gradle @@ -62,12 +62,8 @@ dependencies { // FontAwesomeFX: icons in the form of a font. compile "de.jensd:fontawesomefx-fontawesome:4.7.0-5" - // These libraries don't exist in any Maven repository I can find. - // See: https://github.com/JetBrains/jediterm - // - // The terminal JAR here has also been tweaked: - // See: https://github.com/JetBrains/jediterm/issues/144 - compile ':jediterm-terminal-2.5' + // JediTerm: the terminal emulator used in IntelliJ. We have forked it and tweaked it, see https://github.com/corda/jediterm + compile ':terminal-331a005d6793e52cefc9e2cec6774e62d5a546b1' compile ':pty4j-0.7.2' testCompile project(':node') diff --git a/tools/demobench/libs/jediterm-terminal-2.5.jar b/tools/demobench/libs/terminal-331a005d6793e52cefc9e2cec6774e62d5a546b1.jar similarity index 55% rename from tools/demobench/libs/jediterm-terminal-2.5.jar rename to tools/demobench/libs/terminal-331a005d6793e52cefc9e2cec6774e62d5a546b1.jar index b211b2d08e..71bc563330 100644 Binary files a/tools/demobench/libs/jediterm-terminal-2.5.jar and b/tools/demobench/libs/terminal-331a005d6793e52cefc9e2cec6774e62d5a546b1.jar differ diff --git a/tools/demobench/src/main/kotlin/net/corda/demobench/pty/R3Pty.kt b/tools/demobench/src/main/kotlin/net/corda/demobench/pty/R3Pty.kt index 1269062d64..734aec73b4 100644 --- a/tools/demobench/src/main/kotlin/net/corda/demobench/pty/R3Pty.kt +++ b/tools/demobench/src/main/kotlin/net/corda/demobench/pty/R3Pty.kt @@ -49,9 +49,8 @@ class R3Pty(val name: X500Name, settings: SettingsProvider, dimension: Dimension val environment = envs.toMutableMap() if (!UIUtil.isWindows) { environment["TERM"] = "xterm" - - // This environment variable is specific to MacOSX. - environment.remove("TERM_PROGRAM") + // This, in combination with running on a Mac JetBrains JRE, enables emoji in Mac demobench. + environment["TERM_PROGRAM"] = "JediTerm" } val connector = createTtyConnector(args, environment, workingDir)