Перенос Bridge обратно

This commit is contained in:
Gravit 2018-11-28 18:37:36 +07:00
parent c12d93b435
commit d33d40b9ce
No known key found for this signature in database
GPG key ID: 061981E1E85D3216
4 changed files with 12 additions and 14 deletions

View file

@ -216,14 +216,10 @@ public void start(String... args) throws Throwable {
CommonHelper.newThread("FX Task Worker", true, FunctionalBridge.worker); CommonHelper.newThread("FX Task Worker", true, FunctionalBridge.worker);
loadScript(Launcher.API_SCRIPT_FILE); loadScript(Launcher.API_SCRIPT_FILE);
loadScript(Launcher.CONFIG_SCRIPT_FILE); loadScript(Launcher.CONFIG_SCRIPT_FILE);
Thread.sleep(100);
loadScript(Launcher.INIT_SCRIPT_FILE); loadScript(Launcher.INIT_SCRIPT_FILE);
LogHelper.info("Invoking start() function"); LogHelper.info("Invoking start() function");
Invocable invoker = (Invocable) engine; Invocable invoker = (Invocable) engine;
if (Launcher.isUsingAvanguard()) {
AvanguardStarter.start(DirBridge.dir);
AvanguardStarter.load();
AvanguardStarter.main(false);
}
Launcher.modulesManager.postInitModules(); Launcher.modulesManager.postInitModules();
invoker.invokeFunction("start", (Object) args); invoker.invokeFunction("start", (Object) args);
} }

View file

@ -1,4 +1,4 @@
package ru.gravit.launcher; package ru.gravit.launcher.client;
import ru.gravit.launcher.LauncherAPI; import ru.gravit.launcher.LauncherAPI;
import ru.gravit.utils.helper.IOHelper; import ru.gravit.utils.helper.IOHelper;

View file

@ -1,8 +1,9 @@
package ru.gravit.launcher; package ru.gravit.launcher.client;
import javafx.concurrent.Task; import javafx.concurrent.Task;
import ru.gravit.launcher.HWID;
import ru.gravit.launcher.LauncherAPI; import ru.gravit.launcher.LauncherAPI;
import ru.gravit.launcher.client.ClientLauncher; import ru.gravit.launcher.RequestWorker;
import ru.gravit.launcher.hasher.FileNameMatcher; import ru.gravit.launcher.hasher.FileNameMatcher;
import ru.gravit.launcher.hasher.HashedDir; import ru.gravit.launcher.hasher.HashedDir;
import ru.gravit.launcher.hwid.OshiHWIDProvider; import ru.gravit.launcher.hwid.OshiHWIDProvider;
@ -49,11 +50,6 @@ public LegacyLauncherRequest.Result offlineLauncherRequest() throws IOException,
// Return last sign and profiles // Return last sign and profiles
return new LegacyLauncherRequest.Result(null, settings.lastDigest, settings.lastProfiles); return new LegacyLauncherRequest.Result(null, settings.lastDigest, settings.lastProfiles);
} }
@FunctionalInterface
public interface HashedDirRunnable {
SignedObjectHolder<HashedDir> run() throws Exception;
}
@LauncherAPI @LauncherAPI
public void makeJsonRequest(RequestInterface request, Runnable callback) public void makeJsonRequest(RequestInterface request, Runnable callback)
{ {
@ -73,4 +69,9 @@ public HWID getHWID()
{ {
return hwidProvider.getHWID(); return hwidProvider.getHWID();
} }
@FunctionalInterface
public interface HashedDirRunnable {
SignedObjectHolder<HashedDir> run() throws Exception;
}
} }

View file

@ -1,7 +1,8 @@
package ru.gravit.launcher; package ru.gravit.launcher.client;
import ru.gravit.launcher.Launcher; import ru.gravit.launcher.Launcher;
import ru.gravit.launcher.LauncherAPI; import ru.gravit.launcher.LauncherAPI;
import ru.gravit.launcher.client.DirBridge;
import ru.gravit.launcher.hasher.HashedDir; import ru.gravit.launcher.hasher.HashedDir;
import ru.gravit.launcher.profiles.ClientProfile; import ru.gravit.launcher.profiles.ClientProfile;
import ru.gravit.launcher.serialize.HInput; import ru.gravit.launcher.serialize.HInput;