Skip to content

Install4j configuration #95

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions client/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -213,5 +213,6 @@
<classpathentry kind="lib" path="lib/libphonenumber-8.12.50.jar"/>
<classpathentry kind="lib" path="lib/commons-pool2-2.3.jar"/>
<classpathentry kind="lib" path="lib/xml-apis-1.4.01.jar"/>
<classpathentry kind="lib" path="lib/java-semver-0.10.2.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Binary file added client/lib/java-semver-0.10.2.jar
Binary file not shown.
21 changes: 13 additions & 8 deletions client/src/com/mirth/connect/client/ui/FirstLoginDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@

package com.mirth.connect.client.ui;

import static com.mirth.connect.client.core.BrandingConstants.CENTRAL_USER_REGISTRATION;
import static com.mirth.connect.client.core.BrandingConstants.MANDATORY_USER_REGISTRATION;

import java.awt.Desktop;
import java.awt.Dimension;
import java.awt.Point;
Expand Down Expand Up @@ -47,10 +50,14 @@ public FirstLoginDialog(User currentUser) {
finishButton.setEnabled(false);

userEditPanel.setUser(this, currentUser);
userEditPanel.setRequiredFields(false, true);
if (currentUser.getId() == 1) {
registerCheckBox.setVisible(false);
}

final boolean isRegistrationMandatory = CENTRAL_USER_REGISTRATION && MANDATORY_USER_REGISTRATION && currentUser.getId() == 1;
registerCheckBox.setSelected(isRegistrationMandatory);
registerCheckBox.setEnabled(!isRegistrationMandatory);
registerCheckBox.setVisible(CENTRAL_USER_REGISTRATION);
registerCheckBoxActionPerformed(null);
userConsentCheckBox.setVisible(CENTRAL_USER_REGISTRATION);
contentTextPane.setVisible(CENTRAL_USER_REGISTRATION);

jLabel2.setForeground(UIConstants.HEADER_TITLE_TEXT_COLOR);
setModal(true);
Expand Down Expand Up @@ -151,7 +158,6 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
jScrollPane1.setViewportView(jTextPane1);

registerCheckBox.setBackground(new java.awt.Color(255, 255, 255));
registerCheckBox.setSelected(true);
registerCheckBox.setText(String.format("Register user with %s", BrandingConstants.COMPANY_NAME));
registerCheckBox.setToolTipText(String.format("<html>Register your user information with %s to help us<br>improve the product and provide better service.</html>", BrandingConstants.COMPANY_NAME));
registerCheckBox.addActionListener(new java.awt.event.ActionListener() {
Expand All @@ -161,7 +167,6 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
});

userConsentCheckBox.setBackground(new java.awt.Color(255, 255, 255));
userConsentCheckBox.setSelected(true);
userConsentCheckBox.setText(String.format("I consent to receive email updates and marketing messages from %s.", BrandingConstants.COMPANY_NAME));
userConsentCheckBox.setToolTipText("<html></html>");

Expand Down Expand Up @@ -273,7 +278,7 @@ private void finishButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-
return;
}

if (registerCheckBox.isSelected()) {
if (registerCheckBox.isSelected() && CENTRAL_USER_REGISTRATION) {
parent.registerUser(user);
}

Expand Down Expand Up @@ -316,7 +321,7 @@ private void registerCheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//
userConsentCheckBox.setSelected(false);
userConsentCheckBox.setEnabled(false);
}
userEditPanel.setRequiredFields(false, true);
userEditPanel.setRequiredFields(allRequired, true);
}//GEN-LAST:event_registerCheckBoxActionPerformed

public boolean getResult() {
Expand Down
20 changes: 19 additions & 1 deletion client/src/com/mirth/connect/client/ui/Frame.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@

package com.mirth.connect.client.ui;

import static com.mirth.connect.client.core.BrandingConstants.CENTRAL_USER_REGISTRATION;
import static com.mirth.connect.client.core.BrandingConstants.CHECK_FOR_NOTIFICATIONS;
import static com.mirth.connect.client.core.BrandingConstants.SEND_USAGE_STATISTICS;

import java.awt.AWTEvent;
import java.awt.BorderLayout;
import java.awt.Color;
Expand Down Expand Up @@ -1250,7 +1254,9 @@ private void createOtherPane() {
otherPane.setTitle("Other");
otherPane.setName(TaskConstants.OTHER_KEY);
otherPane.setFocusable(false);
addTask(TaskConstants.OTHER_NOTIFICATIONS, UIConstants.VIEW_NOTIFICATIONS, String.format("View notifications from %s.", BrandingConstants.PRODUCT_NAME), "", new ImageIcon(com.mirth.connect.client.ui.Frame.class.getResource("images/flag_orange.png")), otherPane, null);
if (CHECK_FOR_NOTIFICATIONS) {
addTask(TaskConstants.OTHER_NOTIFICATIONS, UIConstants.VIEW_NOTIFICATIONS, String.format("View notifications from %s.", BrandingConstants.PRODUCT_NAME), "", new ImageIcon(com.mirth.connect.client.ui.Frame.class.getResource("images/flag_orange.png")), otherPane, null);
}
addTask(TaskConstants.OTHER_VIEW_USER_API, "View User API", String.format("View documentation for the %s User API.", BrandingConstants.PRODUCT_NAME), "", new ImageIcon(com.mirth.connect.client.ui.Frame.class.getResource("images/page_white_text.png")), otherPane, null);
addTask(TaskConstants.OTHER_VIEW_CLIENT_API, "View Client API", String.format("View documentation for the %s Client API.", BrandingConstants.PRODUCT_NAME), "", new ImageIcon(com.mirth.connect.client.ui.Frame.class.getResource("images/page_white_text.png")), otherPane, null);
addTask(TaskConstants.OTHER_HELP, "Help", String.format("View help for %s.", BrandingConstants.PRODUCT_NAME), "", new ImageIcon(com.mirth.connect.client.ui.Frame.class.getResource("images/help.png")), otherPane, null);
Expand All @@ -1268,6 +1274,10 @@ public JXTaskPane getOtherPane() {
}

public void updateNotificationTaskName(int notifications) {
if (!CHECK_FOR_NOTIFICATIONS) {
return;
}

String taskName = UIConstants.VIEW_NOTIFICATIONS;
if (notifications > 0) {
taskName += " (" + notifications + ")";
Expand Down Expand Up @@ -1949,6 +1959,10 @@ public User getCurrentUser(Component parentComponent, boolean alertOnFailure) {
}

public void registerUser(final User user) {
if (!CENTRAL_USER_REGISTRATION) {
return;
}

final String workingId = startWorking("Registering user...");

SwingWorker<Void, Void> worker = new SwingWorker<Void, Void>() {
Expand All @@ -1972,6 +1986,10 @@ public void done() {
}

public void sendUsageStatistics() {
if (!SEND_USAGE_STATISTICS) {
return;
}

UpdateSettings updateSettings = null;
try {
updateSettings = mirthClient.getUpdateSettings();
Expand Down
5 changes: 4 additions & 1 deletion client/src/com/mirth/connect/client/ui/LoginPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

package com.mirth.connect.client.ui;

import static com.mirth.connect.client.core.BrandingConstants.CHECK_FOR_NOTIFICATIONS;

import java.awt.Color;
import java.awt.Cursor;
import java.util.Collections;
Expand Down Expand Up @@ -609,7 +611,8 @@ private boolean handleSuccess(LoginStatus loginStatus) throws ClientException {

// Check for new notifications from update server if enabled
String checkForNotifications = userPreferences.getProperty("checkForNotifications");
if (checkForNotifications == null || BooleanUtils.toBoolean(checkForNotifications)) {
if (CHECK_FOR_NOTIFICATIONS
&& (checkForNotifications == null || BooleanUtils.toBoolean(checkForNotifications))) {
Set<Integer> archivedNotifications = new HashSet<Integer>();
String archivedNotificationString = userPreferences.getProperty("archivedNotifications");
if (archivedNotificationString != null) {
Expand Down
14 changes: 10 additions & 4 deletions client/src/com/mirth/connect/client/ui/SettingsPanelServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

package com.mirth.connect.client.ui;

import static com.mirth.connect.client.core.BrandingConstants.SEND_USAGE_STATISTICS;

import java.awt.Color;
import java.awt.Cursor;
import java.awt.Font;
Expand Down Expand Up @@ -81,8 +83,12 @@ public SettingsPanelServer(String tabName) {
addTask(TaskConstants.SETTINGS_SERVER_RESTORE, "Restore Config", "Restore your server configuration from a server configuration XML file. This will remove and restore your channels, alerts, code templates, server properties, global scripts, and plugin properties.", "", new ImageIcon(com.mirth.connect.client.ui.Frame.class.getResource("images/report_go.png")));
addTask(TaskConstants.SETTINGS_CLEAR_ALL_STATS, "Clear All Statistics", "Reset the current and lifetime statistics for all channels.", "", new ImageIcon(com.mirth.connect.client.ui.Frame.class.getResource("images/chart_bar_delete.png")));

provideUsageStatsMoreInfoLabel.setToolTipText(BrandingConstants.PRIVACY_TOOLTIP);
provideUsageStatsMoreInfoLabel.setCursor(new Cursor(Cursor.HAND_CURSOR));
if (!SEND_USAGE_STATISTICS) {
provideUsageStatsLabel.setVisible(false);
provideUsageStatsYesRadio.setVisible(false);
provideUsageStatsNoRadio.setVisible((false));
provideUsageStatsMoreInfoLabel.setVisible(false);
}
queueBufferSizeField.setDocument(new MirthFieldConstraints(8, false, false, true));
smtpTimeoutField.setDocument(new MirthFieldConstraints(0, false, false, false));
administratorAutoLogoutIntervalField.setDocument(new MirthFieldConstraints(2, false, false, true));
Expand Down Expand Up @@ -728,8 +734,8 @@ public void actionPerformed(ActionEvent evt) {
provideUsageStatsButtonGroup.add(provideUsageStatsNoRadio);

provideUsageStatsMoreInfoLabel = new JLabel("<html><font color=blue><u>More Info</u></font></html>");
provideUsageStatsMoreInfoLabel.setEnabled(false);
provideUsageStatsMoreInfoLabel.setVisible(false);
provideUsageStatsMoreInfoLabel.setToolTipText(BrandingConstants.PRIVACY_TOOLTIP);
provideUsageStatsMoreInfoLabel.setCursor(new Cursor(Cursor.HAND_CURSOR));
provideUsageStatsMoreInfoLabel.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent evt) {
provideUsageStatsMoreInfoLabelMouseClicked(evt);
Expand Down
9 changes: 5 additions & 4 deletions server/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
<classpathentry kind="src" path="conf"/>
<classpathentry kind="src" path="dbconf"/>
<classpathentry kind="src" path="build"/>
<classpathentry kind="lib" path="lib/java-semver-0.10.2.jar"/>
<classpathentry kind="lib" path="lib/extensions/dimse/jai_imageio.jar"/>
<classpathentry kind="lib" path="lib/extensions/doc/flying-saucer-core-9.0.1.jar"/>
<classpathentry kind="lib" path="lib/extensions/doc/flying-saucer-pdf-9.0.1.jar"/>
<classpathentry kind="lib" path="lib/extensions/file/jcifs-ng-2.1.10.jar"/>
<classpathentry kind="lib" path="lib/extensions/file/jcifs-ng-2.1.10.jar"/>
<classpathentry kind="lib" path="lib/extensions/doc/itext-2.1.7.jar"/>
<classpathentry kind="lib" path="lib/extensions/doc/itext-rtf-2.1.7.jar"/>
<classpathentry kind="lib" path="lib/commons/commons-beanutils-1.9.4.jar"/>
Expand Down Expand Up @@ -190,9 +191,9 @@
<classpathentry kind="lib" path="/Donkey/lib/guava/j2objc-annotations-1.3.jar"/>
<classpathentry kind="lib" path="/Donkey/lib/guava/jsr305-3.0.2.jar"/>
<classpathentry kind="lib" path="/Donkey/lib/guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar"/>
<classpathentry kind="lib" path="lib/bcpkix-jdk18on-1.78.1.jar"/>
<classpathentry kind="lib" path="lib/bcprov-jdk18on-1.78.1.jar"/>
<classpathentry kind="lib" path="lib/bcutil-jdk18on-1.78.1.jar"/>
<classpathentry kind="lib" path="lib/bcpkix-jdk18on-1.78.1.jar"/>
<classpathentry kind="lib" path="lib/bcprov-jdk18on-1.78.1.jar"/>
<classpathentry kind="lib" path="lib/bcutil-jdk18on-1.78.1.jar"/>
<classpathentry kind="lib" path="lib/commons/commons-vfs2-2.9.0.jar">
<attributes>
<attribute name="javadoc_location" value="http://commons.apache.org/proper/commons-vfs/apidocs"/>
Expand Down
1 change: 1 addition & 0 deletions server/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1274,6 +1274,7 @@
<copy todir="${test_classes}">
<fileset dir="${test}">
<include name="**/*.xml" />
<include name="**/*.json" />
</fileset>
</copy>

Expand Down
Binary file added server/lib/java-semver-0.10.2.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,12 @@ public class BrandingConstants {
public static final String CLIENT_CONNECTION_HEADER = "openintegrationengine-client";

public static final String SERVER_CERTIFICATE_CN = "oie-engine";

public static final String CONNECT_SERVER_URL = "https://connect.openintegrationengine.org";
public static final String NOTIFICATIONS_URL = "https://api.github.com/repos/openintegrationengine/engine/releases";

public static final boolean CENTRAL_USER_REGISTRATION = false;
public static final boolean MANDATORY_USER_REGISTRATION = false;
public static final boolean CHECK_FOR_NOTIFICATIONS = true;
public static final boolean SEND_USAGE_STATISTICS = false;
}
Loading