-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added preliminary support for bundling jre in mac app
bundleJVM: true is the property in the jdeploy object of package.json to make this happen. Addd integration test for this.
- Loading branch information
Steve Hannah
committed
Jul 21, 2024
1 parent
4641545
commit 710e2f0
Showing
26 changed files
with
1,050 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
shared/src/main/java/ca/weblite/jdeploy/app/JVMSpecification.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package ca.weblite.jdeploy.app; | ||
|
||
public class JVMSpecification { | ||
public int javaVersion; | ||
public boolean jdk; | ||
public boolean javafx; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
shared/src/main/java/ca/weblite/jdeploy/jvmdownloader/JVMDownloader.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package ca.weblite.jdeploy.jvmdownloader; | ||
|
||
import java.io.IOException; | ||
|
||
public interface JVMDownloader { | ||
/** | ||
* Download a JVM | ||
* @param basePath The base path to download the JVM to. It will be downloaded into a subdirectory of this path | ||
* based on the platform, architecture, and bundle type. | ||
* @param version The Java version | ||
* @param bundleType The bundle type. Either "jdk" or "jre" | ||
* @param javafx Whether to include JavaFX | ||
* @param overridePlatform The platform to download for. If null, the current platform will be used. | ||
* @param overrideArch The architecture to download for. If null, the current architecture will be used. | ||
* @param overrideBitness The bitness to download for. If null, the current bitness will be used. | ||
* @throws IOException | ||
*/ | ||
void downloadJVM( | ||
String basePath, | ||
String version, | ||
String bundleType, | ||
boolean javafx, | ||
String overridePlatform, | ||
String overrideArch, | ||
String overrideBitness | ||
) throws IOException; | ||
} |
22 changes: 22 additions & 0 deletions
22
shared/src/main/java/ca/weblite/jdeploy/jvmdownloader/JVMEmbedder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package ca.weblite.jdeploy.jvmdownloader; | ||
|
||
import java.io.IOException; | ||
|
||
public class JVMEmbedder { | ||
|
||
private JVMFinder finder; | ||
|
||
/** | ||
* Embed a JVM into a directory | ||
* @param sourcePath The source path of the JVM to install. May be either a .zip or a .tar.gz file. | ||
* @param targetPath The target path where the JVM will be installed. E.g. path/to/jre. The JVM should be extracted to this directory. | ||
* Not as a subdirectory, but as the targetPath itself. | ||
* @throws IOException | ||
*/ | ||
public void embedJVM( | ||
String sourcePath, | ||
String targetPath | ||
) throws IOException { | ||
|
||
} | ||
} |
Oops, something went wrong.