diff --git a/Dockerfile b/Dockerfile index 39a8f4338..cb39896d3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -83,6 +83,7 @@ RUN groupadd engine \ WORKDIR /opt/engine COPY --chown=engine:engine --from=builder \ --exclude=cli-lib \ + --exclude=client-lib \ --exclude=mirth-cli-launcher.jar \ --exclude=mccommand \ --exclude=manager-lib \ @@ -117,6 +118,7 @@ RUN addgroup -S engine \ WORKDIR /opt/engine COPY --chown=engine:engine --from=builder \ --exclude=cli-lib \ + --exclude=client-lib \ --exclude=mirth-cli-launcher.jar \ --exclude=mccommand \ --exclude=manager-lib \ diff --git a/build.gradle b/build.gradle index d35520992..193be1bb5 100644 --- a/build.gradle +++ b/build.gradle @@ -308,8 +308,8 @@ tasks.register('build') { tasks.register('dist') { group = 'build' - description = 'Builds everything and creates the distribution extension zips in server/dist.' - dependsOn ':server:createExtensionZips' + description = 'Builds everything and creates the distribution extension and Swing Administrator zips in server/dist.' + dependsOn ':server:createExtensionZips', ':server:swingadminZip' } tasks.register('test') { diff --git a/server/build.gradle b/server/build.gradle index 71fda0558..9e3677648 100644 --- a/server/build.gradle +++ b/server/build.gradle @@ -877,6 +877,16 @@ def extensionZipTasks = zippedExtensions.collect { name -> } } +// The Swing Administrator is not part of Docker images or installers; admins +// unzip this into the OIE home to add it. +tasks.register('swingadminZip', Zip) { + description = 'Zips client-lib for admins to unzip into the OIE home to enable the Swing Administrator.' + archiveFileName = "swingadmin-${version}.zip" + destinationDirectory = file('dist') + from('setup') { include 'client-lib/**' } + dependsOn createSetup +} + tasks.register('createExtensionZips') { group = 'build' description = 'Creates the per-extension distribution zips in server/dist/extensions.' diff --git a/server/public_html/index.html b/server/public_html/index.html index 0a7e1d693..770b94794 100644 --- a/server/public_html/index.html +++ b/server/public_html/index.html @@ -106,14 +106,27 @@

Service Available

The backend service is running.

-

- Please point your preferred Administrator Launcher to:
- -

-

- Don't have an Administrator Launcher yet? Learn about - available launcher options. +

+

+ Please point your preferred Administrator Launcher to:
+ +

+

+ Don't have an Administrator Launcher yet? Learn about + available launcher options. +

+
+ +

You can also explore the Client API at the link below.

@@ -126,8 +139,24 @@

Service Available

diff --git a/server/src/main/java/com/mirth/connect/server/servlets/WebStartServlet.java b/server/src/main/java/com/mirth/connect/server/servlets/WebStartServlet.java index 8bb847055..dbdec948c 100644 --- a/server/src/main/java/com/mirth/connect/server/servlets/WebStartServlet.java +++ b/server/src/main/java/com/mirth/connect/server/servlets/WebStartServlet.java @@ -83,6 +83,10 @@ public void doGet(HttpServletRequest request, HttpServletResponse response) thro if ((request.getRequestURI().equals(contextPathProp + "/webstart.jnlp") || request.getRequestURI().equals(contextPathProp + "/webstart")) && isWebstartRequestValid(request)) { jnlpDocument = getAdministratorJnlp(request); + if (jnlpDocument == null) { + response.sendError(HttpServletResponse.SC_NOT_FOUND); + return; + } response.setHeader("Content-Disposition", "attachment; filename = \"webstart.jnlp\""); } else { response.setContentType(""); @@ -119,6 +123,11 @@ private boolean isWebstartRequestValid(HttpServletRequest request) { } protected Document getAdministratorJnlp(HttpServletRequest request) throws Exception { + // The Swing Administrator is optional; client-lib is only present when installed + if (!new File(getClientLibPath(), "mirth-client.jar").isFile()) { + return null; + } + InputStream clientJnlpIs = null; Document document; try { diff --git a/tools/install4j/oie-installer-config.install4j b/tools/install4j/oie-installer-config.install4j index d38a5ab84..76fe10e86 100644 --- a/tools/install4j/oie-installer-config.install4j +++ b/tools/install4j/oie-installer-config.install4j @@ -20,6 +20,7 @@ +