mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
jna and jna-utils dep. for updater
This commit is contained in:
@@ -129,16 +129,28 @@ public class Main {
|
||||
// always delete previous patch copy
|
||||
File patchCopy = new File(tempDir, patchFileName + "_copy");
|
||||
File log4jCopy = new File(tempDir, "log4j.jar." + platform + "_copy");
|
||||
if (!FileUtilRt.delete(patchCopy) || !FileUtilRt.delete(log4jCopy)) {
|
||||
File jnaUtilsCopy = new File(tempDir, "jna-utils.jar." + platform + "_copy");
|
||||
File jnaCopy = new File(tempDir, "jna.jar." + platform + "_copy");
|
||||
if (!FileUtilRt.delete(patchCopy) || !FileUtilRt.delete(log4jCopy) || !FileUtilRt.delete(jnaUtilsCopy) || !FileUtilRt.delete(jnaCopy)) {
|
||||
throw new IOException("Cannot delete temporary files in " + tempDir);
|
||||
}
|
||||
|
||||
File patch = new File(tempDir, patchFileName);
|
||||
if (!patch.exists()) return;
|
||||
|
||||
File log4j = new File(PathManager.getLibPath(), "log4j.jar");
|
||||
if (!log4j.exists()) throw new IOException("Log4J missing: " + log4j);
|
||||
if (!log4j.exists()) throw new IOException("Log4J is missing: " + log4j);
|
||||
|
||||
File jnaUtils = new File(PathManager.getLibPath(), "jna-utils.jar");
|
||||
if (!jnaUtils.exists()) throw new IOException("jna-utils.jar is missing: " + jnaUtils);
|
||||
|
||||
File jna = new File(PathManager.getLibPath(), "jna.jar");
|
||||
if (!jna.exists()) throw new IOException("jna is missing: " + jna);
|
||||
|
||||
copyFile(patch, patchCopy, true);
|
||||
copyFile(log4j, log4jCopy, false);
|
||||
copyFile(jna, jnaCopy, false);
|
||||
copyFile(jnaUtils, jnaUtilsCopy, false);
|
||||
|
||||
int status = 0;
|
||||
if (Restarter.isSupported()) {
|
||||
@@ -154,7 +166,7 @@ public class Main {
|
||||
System.getProperty("java.home") + "/bin/java",
|
||||
"-Xmx500m",
|
||||
"-classpath",
|
||||
patchCopy.getPath() + File.pathSeparator + log4jCopy.getPath(),
|
||||
patchCopy.getPath() + File.pathSeparator + log4jCopy.getPath() + File.pathSeparator + jnaCopy.getPath() + File.pathSeparator + jnaUtilsCopy.getPath(),
|
||||
"-Djava.io.tmpdir=" + tempDir,
|
||||
"-Didea.updater.log=" + PathManager.getLogPath(),
|
||||
"-Dswing.defaultlaf=" + UIManager.getSystemLookAndFeelClassName(),
|
||||
|
||||
Reference in New Issue
Block a user