[ANY] Angelok support

This commit is contained in:
LoomeL 2019-08-17 14:24:17 +06:00
parent 0b682171a2
commit 95bc0ef53d
3 changed files with 13 additions and 13 deletions

View file

@ -26,14 +26,3 @@ var config = {
settingsMagic: 0xC0DE5, // Магия вне хогвартса
};
DirBridge.dir = DirBridge.getLauncherDir(config.dir);
DirBridge.dirStore = DirBridge.getStoreDir(config.dir);
DirBridge.dirProjectStore = DirBridge.getProjectStoreDir(config.dir);
if (!IOHelper.isDir(DirBridge.dir)) {
java.nio.file.Files.createDirectory(DirBridge.dir);
}
DirBridge.defaultUpdatesDir = DirBridge.dir.resolve("updates");
if (!IOHelper.isDir(DirBridge.defaultUpdatesDir)) {
java.nio.file.Files.createDirectory(DirBridge.defaultUpdatesDir);
}

View file

@ -90,3 +90,14 @@ function startTask(task) {
function openURL(url) {
app.getHostServices().showDocument(url.toURI());
}
DirBridge.dir = DirBridge.getLauncherDir(config.dir);
DirBridge.dirStore = DirBridge.getStoreDir(config.dir);
DirBridge.dirProjectStore = DirBridge.getProjectStoreDir(config.dir);
if (!IOHelper.isDir(DirBridge.dir)) {
java.nio.file.Files.createDirectory(DirBridge.dir);
}
DirBridge.defaultUpdatesDir = DirBridge.dir.resolve("updates");
if (!IOHelper.isDir(DirBridge.defaultUpdatesDir)) {
java.nio.file.Files.createDirectory(DirBridge.defaultUpdatesDir);
}

View file

@ -171,8 +171,8 @@ public void run(String[] args) throws ScriptException, NoSuchMethodException, IO
@Override
public void preLoad() throws IOException, ScriptException {
if (!isPreLoaded) {
loadScript(Launcher.API_SCRIPT_FILE);
loadScript(Launcher.CONFIG_SCRIPT_FILE);
loadScript(Launcher.API_SCRIPT_FILE);
isPreLoaded = true;
}
}