< prev index next >
src/jdk.jpackage/share/classes/jdk/jpackage/internal/ApplicationLayout.java
Print this page
@@ -31,11 +31,11 @@
/**
* Application directory layout.
*/
final class ApplicationLayout implements PathGroup.Facade<ApplicationLayout> {
enum PathRole {
- RUNTIME, APP, LAUNCHERS_DIR, DESKTOP
+ RUNTIME, APP, LAUNCHERS, DESKTOP, APP_MODS, DLLS
}
ApplicationLayout(Map<Object, Path> paths) {
data = new PathGroup(paths);
}
@@ -56,11 +56,18 @@
/**
* Path to launchers directory.
*/
Path launchersDirectory() {
- return pathGroup().getPath(PathRole.LAUNCHERS_DIR);
+ return pathGroup().getPath(PathRole.LAUNCHERS);
+ }
+
+ /**
+ * Path to directory with dynamic libraries.
+ */
+ Path dllDirectory() {
+ return pathGroup().getPath(PathRole.DLLS);
}
/**
* Path to application data directory.
*/
@@ -74,28 +81,37 @@
Path runtimeDirectory() {
return pathGroup().getPath(PathRole.RUNTIME);
}
/**
+ * Path to application mods directory.
+ */
+ Path appModsDirectory() {
+ return pathGroup().getPath(PathRole.APP_MODS);
+ }
+
+ /**
* Path to directory with application's desktop integration files.
*/
Path destktopIntegrationDirectory() {
return pathGroup().getPath(PathRole.DESKTOP);
}
- static ApplicationLayout unixApp() {
+ static ApplicationLayout linuxApp() {
return new ApplicationLayout(Map.of(
- PathRole.LAUNCHERS_DIR, Path.of("bin"),
- PathRole.APP, Path.of("app"),
- PathRole.RUNTIME, Path.of("runtime"),
- PathRole.DESKTOP, Path.of("bin")
+ PathRole.LAUNCHERS, Path.of("bin"),
+ PathRole.APP, Path.of("lib/app"),
+ PathRole.RUNTIME, Path.of("lib/runtime"),
+ PathRole.DESKTOP, Path.of("lib"),
+ PathRole.DLLS, Path.of("lib"),
+ PathRole.APP_MODS, Path.of("lib/app/mods")
));
}
static ApplicationLayout windowsApp() {
return new ApplicationLayout(Map.of(
- PathRole.LAUNCHERS_DIR, Path.of(""),
+ PathRole.LAUNCHERS, Path.of(""),
PathRole.APP, Path.of("app"),
PathRole.RUNTIME, Path.of("runtime"),
PathRole.DESKTOP, Path.of("")
));
}
@@ -103,11 +119,11 @@
static ApplicationLayout platformApp() {
if (Platform.getPlatform() == Platform.WINDOWS) {
return windowsApp();
}
- return unixApp();
+ return linuxApp();
}
static ApplicationLayout javaRuntime() {
return new ApplicationLayout(Map.of(PathRole.RUNTIME, Path.of("")));
}
< prev index next >