109 params -> false,
110 // valueOf(null) is false,
111 // and we actually do want null in some cases
112 (s, p) -> (s == null
113 || "null".equalsIgnoreCase(s)) ? true : Boolean.valueOf(s));
114
115 public WindowsAppImageBuilder(Map<String, Object> config, Path imageOutDir)
116 throws IOException {
117 super(config,
118 imageOutDir.resolve(APP_NAME.fetchFrom(config) + "/runtime"));
119
120 Objects.requireNonNull(imageOutDir);
121
122 this.params = config;
123
124 this.root = imageOutDir.resolve(APP_NAME.fetchFrom(params));
125 this.appDir = root.resolve("app");
126 this.appModsDir = appDir.resolve("mods");
127 this.runtimeDir = root.resolve("runtime");
128 this.mdir = runtimeDir.resolve("lib");
129 this.binDir = root.resolve("bin");
130 Files.createDirectories(appDir);
131 Files.createDirectories(runtimeDir);
132 }
133
134 public WindowsAppImageBuilder(String jreName, Path imageOutDir)
135 throws IOException {
136 super(null, imageOutDir.resolve(jreName));
137
138 Objects.requireNonNull(imageOutDir);
139
140 this.params = null;
141 this.root = imageOutDir.resolve(jreName);
142 this.appDir = null;
143 this.appModsDir = null;
144 this.runtimeDir = root;
145 this.mdir = runtimeDir.resolve("lib");
146 this.binDir = null;
147 Files.createDirectories(runtimeDir);
148 }
149
|
109 params -> false,
110 // valueOf(null) is false,
111 // and we actually do want null in some cases
112 (s, p) -> (s == null
113 || "null".equalsIgnoreCase(s)) ? true : Boolean.valueOf(s));
114
115 public WindowsAppImageBuilder(Map<String, Object> config, Path imageOutDir)
116 throws IOException {
117 super(config,
118 imageOutDir.resolve(APP_NAME.fetchFrom(config) + "/runtime"));
119
120 Objects.requireNonNull(imageOutDir);
121
122 this.params = config;
123
124 this.root = imageOutDir.resolve(APP_NAME.fetchFrom(params));
125 this.appDir = root.resolve("app");
126 this.appModsDir = appDir.resolve("mods");
127 this.runtimeDir = root.resolve("runtime");
128 this.mdir = runtimeDir.resolve("lib");
129 this.binDir = root;
130 Files.createDirectories(appDir);
131 Files.createDirectories(runtimeDir);
132 }
133
134 public WindowsAppImageBuilder(String jreName, Path imageOutDir)
135 throws IOException {
136 super(null, imageOutDir.resolve(jreName));
137
138 Objects.requireNonNull(imageOutDir);
139
140 this.params = null;
141 this.root = imageOutDir.resolve(jreName);
142 this.appDir = null;
143 this.appModsDir = null;
144 this.runtimeDir = root;
145 this.mdir = runtimeDir.resolve("lib");
146 this.binDir = null;
147 Files.createDirectories(runtimeDir);
148 }
149
|