Skip to content

Commit

Permalink
Initial rewording and cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
tresf committed Feb 28, 2024
1 parent 2e9db20 commit a025e8c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 17 deletions.
33 changes: 20 additions & 13 deletions src/qz/build/JLink.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@
import java.io.FileInputStream;
import java.io.IOException;
import java.nio.file.*;
import java.util.HashMap;
import java.util.LinkedHashSet;
import java.util.Properties;
import java.util.*;

public class JLink {
private static final Logger log = LogManager.getLogger(JLink.class);
Expand Down Expand Up @@ -233,12 +231,16 @@ private JLink calculateDepList() throws IOException {
depList.add(item);
}
}
// the jdk.accessibility package is used if JAB is enabled; JDeps misses this, leading to a missing class runtime error. see #1234
if (targetPlatform == Platform.WINDOWS) depList.add("jdk.accessibility");
// "jar:" URLs create transient zipfs dependency, see https://stackoverflow.com/a/57846672/3196753
depList.add("jdk.zipfs");
// fix for https://github.com/qzind/tray/issues/894 solution from https://github.com/adoptium/adoptium-support/issues/397
depList.add("jdk.crypto.ec");
switch(targetPlatform) {
case WINDOWS:
// Java accessibility bridge dependency, see https://github.com/adoptium/adoptium-support/issues/1234
depList.add("jdk.accessibility");
default:
// "jar:" URLs create transient zipfs dependency, see https://stackoverflow.com/a/57846672/3196753
depList.add("jdk.zipfs");
// fix for https://github.com/qzind/tray/issues/894 solution from https://github.com/adoptium/adoptium-support/issues/397
depList.add("jdk.crypto.ec");
}
return this;
}

Expand Down Expand Up @@ -281,17 +283,22 @@ private JLink deployJre() throws IOException {
log.info("Successfully deployed a jre to {}", outPath);

// Remove all but java/javaw
String[] keepFiles;
List<String> keepFiles = new ArrayList<>();
//String[] keepFiles;
String keepExt;
switch(targetPlatform) {
case WINDOWS:
// Jabswitch is a tool for enabling and disabling accessibility support on windows
keepFiles = new String[]{ "java.exe", "javaw.exe", "jabswitch.exe"};
keepFiles.add("java.exe");
keepFiles.add("javaw.exe");
if(depList.contains("jdk.accessibility")) {
// Java accessibility bridge switching tool
keepFiles.add("jabswitch.exe");
}
// Windows stores ".dll" files in bin
keepExt = ".dll";
break;
default:
keepFiles = new String[]{ "java" };
keepFiles.add("java");
keepExt = null;
}

Expand Down
10 changes: 6 additions & 4 deletions src/qz/ui/DetailsDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,18 @@ private void initComponents(IconCache iconCache) {

requestTable = new RequestTable(iconCache);
reqScrollPane = new JScrollPane(requestTable);
requestTable.getAccessibleContext().setAccessibleName("Request Details");
requestTable.getAccessibleContext().setAccessibleDescription("This table provides details about this request.");
requestTable.getAccessibleContext().setAccessibleName(requestLabel.getText() + " Details");
requestTable.getAccessibleContext().setAccessibleDescription("Signing details about this request.");
requestLabel.setLabelFor(requestTable);

certLabel = new JLabel("Certificate");
certLabel.setAlignmentX(CENTER_ALIGNMENT);

certTable = new CertificateTable(iconCache);
certScrollPane = new JScrollPane(certTable);
certTable.getAccessibleContext().setAccessibleName("Certificate Details");
certTable.getAccessibleContext().setAccessibleDescription("This table provides details about the certificate used in this request.");
certTable.getAccessibleContext().setAccessibleName(certLabel.getText() + " Details");
certTable.getAccessibleContext().setAccessibleDescription("Certificate details about this request.");
certLabel.setLabelFor(certTable);

add(requestLabel);
add(reqScrollPane);
Expand Down

0 comments on commit a025e8c

Please sign in to comment.