Skip to content
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

Add bundled Java runtime #770

Merged
merged 136 commits into from
Oct 5, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
136 commits
Select commit Hold shift + click to select a range
34d6873
jlink branch, rebased (#4)
tresf Apr 3, 2021
6ac5116
Initial jlink support for aarch64 cross, multiple jdk providers
tresf Apr 3, 2021
cee6378
Fix jspawnhelper
tresf Apr 8, 2021
1fe8fd9
Try to fix jspawnhelper from payload directory.
tresf Apr 8, 2021
3bd4175
Move isWindows() check
tresf Apr 8, 2021
766c78c
Fix incorrect JRE lib path in payload
tresf Apr 8, 2021
e6124ce
Simplify code
tresf Apr 8, 2021
2e347e5
Fix jdeps with newer JDKs
tresf Apr 8, 2021
d3b8592
Fix java permissions on Linux installs
tresf Apr 8, 2021
aade408
Add Travis-CI arm64 target for Linux
tresf Apr 9, 2021
652c803
First attempt to fix arm64
tresf Apr 9, 2021
5573ff2
Second attempt to fix arm64
tresf Apr 9, 2021
9f33923
Third attempt to fix arm64
tresf Apr 9, 2021
b0747dc
Cleanup Root dir, moved to .app/Contents
Vzor- Apr 9, 2021
1cdf1a9
Handle installer upgrade
tresf Apr 9, 2021
fd5fdc1
Various pkg fixes
tresf Apr 9, 2021
48c1f4a
Root properties fix
Vzor- Apr 10, 2021
9dbc7e0
Partial path fix
Vzor- Apr 12, 2021
561e6ac
Honey Bunches O' Paths
tresf Apr 12, 2021
9095f99
Further path goodness
Vzor- Apr 12, 2021
796c573
Simplify quick-clean
tresf Apr 12, 2021
f9feaff
More path simplification
tresf Apr 12, 2021
40cfb25
Attempt to fix Travis
tresf Apr 13, 2021
419fd67
Attempt to fix Travis (again)
tresf Apr 13, 2021
b40dd01
Add Mac ARM64 builds to matrix
tresf Apr 13, 2021
b98eb91
Add jre skip, fix missing bin/java
tresf Apr 15, 2021
c028b7c
Typo
tresf Apr 15, 2021
e64f01f
Merge branch 'master' into jlink
tresf Jun 16, 2021
404f2e5
Fixes after rebase
tresf Jun 16, 2021
ae7a77c
Cleanup unused imports
tresf Jun 16, 2021
0856d75
Revert unnecessary change
tresf Jun 16, 2021
32c2c59
Refactor various shell commands to JNA/native (#782)
tresf Jun 16, 2021
4c42d42
Added Sandboxing and DMG build support
Vzor- Jun 26, 2021
1827f38
Merge branch 'jlink' of https://github.com/qzind/tray into jlink
Vzor- Jun 26, 2021
119483c
dmg background
tresf Jun 26, 2021
e2b0f5a
copy-bundle task added to remove redundant code
Vzor- Jun 28, 2021
89c4c79
Make app in payload by default, fix redundancy complaints.
tresf Jun 28, 2021
e5dce0e
cleanup tasks and remove redundancy
Vzor- Jul 1, 2021
65bd0c3
fixed jar name
Vzor- Jul 1, 2021
e5b39e1
removed community tag
Vzor- Jul 1, 2021
6f4af53
Fixed jar again
Vzor- Jul 1, 2021
59ab038
deploy app rollback
Vzor- Jul 1, 2021
421d07f
Handle bundle migration to new 2.2 format
tresf Jul 1, 2021
2cc013a
Minor cleanup
tresf Jul 1, 2021
c714dac
Always delete the JDK on install
tresf Jul 1, 2021
7e72f9a
Fix comment
tresf Jul 1, 2021
eca14d1
Add sandbox detection
tresf Jul 1, 2021
2d38847
Fix sandbox detection; fix qz-tray.properties move.
tresf Jul 1, 2021
ef745a0
Try to fix DMG on M1
tresf Jul 1, 2021
58df407
Fix jdeps crash with java 11.0.11+
tresf Jul 1, 2021
408b598
Added signing to dmg
Vzor- Jul 6, 2021
ecb1daf
Allow sandboxed version to start.
tresf Jul 6, 2021
f2e8dff
Consistent arg values
tresf Jul 6, 2021
b1d111f
fix jfx
Vzor- Jul 6, 2021
42cde54
ad-hoc 1/2
Vzor- Jul 8, 2021
f805c67
Fix reload on Jlink (#842)
Jul 22, 2021
22c905d
Fix Windows jar path parsing, revert empty Paths
tresf Jul 23, 2021
66738f1
install/uninstall script fixes
Vzor- Jul 26, 2021
c15c419
externalize libs
Vzor- Aug 11, 2021
a600b99
Merge branch 'master' into jlink
tresf Aug 12, 2021
a17463a
Finish rebase
tresf Aug 12, 2021
580d2ef
Minor fixes
tresf Aug 12, 2021
896b7d8
Simplify ad-hoc logic
tresf Aug 12, 2021
08bb755
Make verify-signature reusable
tresf Aug 12, 2021
5007bbb
Minor comments and refactoring
tresf Aug 12, 2021
c1a53bc
Add usb4java externalize-libs mappings
tresf Aug 12, 2021
2349439
Revamp and make reusable how we handle host and target architectures.…
tresf Aug 13, 2021
0e0ed8a
Various ant fixes
tresf Aug 14, 2021
2bf8bbb
Jfx fix
Vzor- Aug 18, 2021
fc06e11
externalize libs
Vzor- Aug 18, 2021
4431e00
Add log wrapper.
tresf Aug 18, 2021
0781d47
Refactor whoami, java task stderr to property
tresf Aug 18, 2021
b6f0e54
Deleted reduandant jssc library
Vzor- Aug 19, 2021
0763389
Copy libs from libs-temp
Vzor- Aug 20, 2021
79feccc
dist-fx rolled into copy-libs
Vzor- Aug 23, 2021
2b58a3d
Bump version
tresf Aug 24, 2021
578fc6d
Workarounds for missing JNA
tresf Aug 24, 2021
82602d7
Consolidate SystemUtilities OS and Architecture detection
tresf Aug 24, 2021
2cb42db
Merge branch 'master' into jlink
tresf Aug 24, 2021
27b05e8
Fix native lib copies for Linux, Windows
tresf Aug 24, 2021
d7d8c05
Fix missing library info
tresf Aug 25, 2021
e502a6f
Cleanup old javafx versions
tresf Aug 25, 2021
d111c37
Fix hid4java version information
tresf Aug 25, 2021
a203f3e
Fix switch/case fallthrough when downloading ARM64 Java
tresf Aug 25, 2021
0b80a78
Remove references to removed library
tresf Aug 25, 2021
43ea732
Add usb4java (native) version information
tresf Aug 25, 2021
886a727
Add jssc (native) version information
tresf Aug 25, 2021
2811c76
Jfx output dir fix
Vzor- Aug 25, 2021
8800d74
Sign windows dlls
Vzor- Aug 25, 2021
15cac7b
Fix Frameworks path on MacOS
tresf Aug 26, 2021
1d76afd
Fix setFocus() fallback for MacOS
tresf Aug 26, 2021
e4a826b
Use productbuild to created branded installers.
tresf Aug 26, 2021
936bb9c
Create out/resources if it doesn't exist
tresf Aug 26, 2021
88fa55e
Fix xml formatting
tresf Aug 26, 2021
3ab6127
Copy libs from libs-temp
Vzor- Aug 26, 2021
a8d1e6e
Fixes JFX bundle detection
Vzor- Aug 26, 2021
d01bde9
Safe paths during install
Vzor- Aug 26, 2021
32c185b
Fix bundleid in pkg
tresf Aug 27, 2021
aa7c875
Fix typo
tresf Aug 27, 2021
51a2b14
Don't delete sandbox certs if running from IDE
tresf Aug 27, 2021
45d058b
Use relative paths to fix productbuild component bundling.
tresf Aug 27, 2021
d192dd7
Guard linux detection
tresf Aug 27, 2021
10ccf5d
Better isUbuntu guard
tresf Aug 27, 2021
863c2c7
Make jfx security check more filesystem friendly
Vzor- Aug 27, 2021
93fb74a
Make jfx security check output full path
Vzor- Aug 27, 2021
820b5fd
remove the try catch from bind
Vzor- Aug 27, 2021
32b08df
Fix installer text unreadable on high-contrast themes
tresf Aug 27, 2021
74e9a5a
Fix uninstaller text unreadable on high-contrast themes
tresf Aug 27, 2021
7e42641
Add placeholder text to pkg backgrounds
tresf Aug 30, 2021
e5c209e
Fix jre bundling on Windows
tresf Aug 31, 2021
83f1d1e
deployJre::keepExt: Sanitize null
tresf Aug 31, 2021
f517dfe
Move jre to runtime/ for backwards compatibility
Vzor- Aug 31, 2021
d09edc7
Sign all bins
Vzor- Aug 31, 2021
7273e1e
Sanitize Windows paths when JNA is unavailable
tresf Aug 31, 2021
5f5a832
Added java vendor to security info
Vzor- Aug 31, 2021
f40bb1e
Remove legal directory, fix lingering Java.runtime directory
tresf Sep 1, 2021
44af40f
Various JLink fixes
tresf Sep 1, 2021
2c17743
Cleanup jsign output; replace existing signatures
tresf Sep 1, 2021
af79deb
Remove hard-coded jsign path; Remove unused taskdef
tresf Sep 1, 2021
90d0805
Updated installer images
Vzor- Sep 3, 2021
7b10b09
With the tiff
Vzor- Sep 3, 2021
e90983e
DMG label backgrounds
RebeccaDeField Sep 3, 2021
e1a0043
Nudge label positions
RebeccaDeField Sep 3, 2021
1b0f96d
label position fine tuning
RebeccaDeField Sep 3, 2021
e136cd6
Update pkg background, fix tiff copy
tresf Sep 3, 2021
dd12287
label position fix
RebeccaDeField Sep 3, 2021
3ed1d9e
Remove unbranded pkg from out.
tresf Sep 3, 2021
d0b9470
Add new EXE design
RebeccaDeField Sep 3, 2021
4314872
Fix welcome.bmp
tresf Sep 3, 2021
1e085af
Add blank pkg background fallback for company branded builds.
tresf Sep 3, 2021
4e946d5
Add `jna.library.path` to fix hid4java
lite1979 Sep 7, 2021
a3cf427
Raw fixed
Vzor- Sep 7, 2021
210b327
Merge branch 'master' into jlink
tresf Sep 30, 2021
85a1919
Attempt to fix GitHub actions
tresf Oct 5, 2021
71ee071
Attempt to fix GitHub actions (again)
tresf Oct 5, 2021
f1ddab3
Retrieve hostnames over 15 characters
tresf Oct 5, 2021
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: 0 additions & 1 deletion ant/apple/installer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@
-->

<!-- payload/Contents/ -->
<mkdir dir="${build.dir}/scripts/payload/Resources"/>
<copy todir="${build.dir}/scripts/payload/Contents">
<fileset dir="${dist.dir}"/>
</copy>
Expand Down
2 changes: 1 addition & 1 deletion src/qz/common/SecurityInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public static SortedMap<String,String> getLibVersions() {
Method method = VersionInfo.getMethod("getVersion");
Object version = method.invoke(null);
libVersions.put("javafx", (String)version);
if (fxPath.contains(SystemUtilities.detectJarPath()) || fxPath.contains("/tray/")) {
if (fxPath.contains(SystemUtilities.getJarPath()) || fxPath.contains("/tray/")) {
libVersions.put("javafx (location)", "Bundled/" + Constants.ABOUT_TITLE);
} else {
libVersions.put("javafx (location)", "System/" + Constants.JAVA_VENDOR);
Expand Down
1 change: 1 addition & 0 deletions src/qz/installer/MacInstaller.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ public Installer removeLegacyStartup() {
return this;
}

//fixme: overlaps systemUtilities.getAppPath
public static String getAppPath() {
// Return the Mac ".app" location
String target = SystemUtilities.getJarPath();
Expand Down
2 changes: 1 addition & 1 deletion src/qz/installer/certificate/CertificateManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ public static File getWritableLocation(String ... subDirs) throws IOException {

if (subDirs.length == 0) {
// Assume root directory is next to jar (e.g. qz-tray.properties)
Path appPath = SystemUtilities.detectAppPath();
Path appPath = Paths.get(SystemUtilities.getJarPath()).getParent();
// Handle null path, such as running from IDE
if(appPath != null) {
locs.add(appPath);
Expand Down
1 change: 1 addition & 0 deletions src/qz/installer/shortcut/WindowsShortcutCreator.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ private void createShortcut(String folderPath) {

/**
* Calculates .exe path from .jar
* fixme: overlaps SystemUtilities.getAppPath
*/
private static String getAppPath() {
return SystemUtilities.getJarPath().replaceAll(".jar$", ".exe");
Expand Down
2 changes: 1 addition & 1 deletion src/qz/printer/action/WebApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public static synchronized void initialize() throws IOException {
if (Constants.JAVA_VERSION.greaterThanOrEqualTo(Version.valueOf("11.0.0"))) {
// JavaFX native libs
if (SystemUtilities.isJar()) {
SystemUtilities.appendProperty("java.library.path", new File(SystemUtilities.detectJarPath()).getParent() + "/libs/");
SystemUtilities.appendProperty("java.library.path", new File(SystemUtilities.getJarPath()).getParent() + "/libs/");
} else if (hasConflictingLib()) {
// IDE helper for "no suitable pipeline found" errors
System.err.println("\n=== WARNING ===\nWrong javafx platform detected. Delete lib/javafx/<platform> to correct this.\n");
Expand Down
24 changes: 8 additions & 16 deletions src/qz/utils/SystemUtilities.java
Original file line number Diff line number Diff line change
Expand Up @@ -156,30 +156,22 @@ public static Version getJavaVersion(String version) {

/**
* Determines the currently running Jar's absolute path on the local filesystem
* todo: make this return a sane directory for running via ide
*
* @return A String value representing the absolute path to the currently running
* jar
*/
public static String detectJarPath() {
public static String getJarPath() {
if (jarPath != null) {
tresf marked this conversation as resolved.
Show resolved Hide resolved
return jarPath;
}
try {
String jarPath = new File(SystemUtilities.class.getProtectionDomain().getCodeSource().getLocation().getPath()).getCanonicalPath();
String path = new File(SystemUtilities.class.getProtectionDomain().getCodeSource().getLocation().getPath()).getCanonicalPath();
// Fix characters that get URL encoded when calling getPath()
return URLDecoder.decode(jarPath, "UTF-8");
jarPath = URLDecoder.decode(path, "UTF-8");
} catch(IOException ex) {
log.error("Unable to determine Jar path", ex);
}
return null;
}

/**
* Returns the jar which we will create a shortcut for
*
* @return The path to the jar path which has been set
*/
public static String getJarPath() {
if (jarPath == null) {
jarPath = detectJarPath();
}
return jarPath;
}

Expand All @@ -189,7 +181,7 @@ public static String getJarPath() {
* @return
*/
public static Path detectAppPath() {
String jarPath = detectJarPath();
String jarPath = getJarPath();
if (jarPath != null) {
File jar = new File(jarPath);
if (jar.getPath().endsWith(".jar") && jar.exists()) {
Expand Down