mirror of
https://github.com/xiaozhou233/JuiceAgent.git
synced 2026-12-05 21:15:56 +08:00
[Update] Remove bootstrap-api
This commit is contained in:
1 parent
fe495657d4
commit
30d379521a
3 files changed
-27
No files matched your search
@@ -1,7 +1,5 @@
|
||||
[Injection]
|
||||
BootstrapAPIPath = "D:/Development/JuiceLoader/build/libs/bootstrap-api.jar"
|
||||
JuiceLoaderJarPath = "D:/Development/JuiceLoader/build/libs/JuiceLoader.jar"
|
||||
JuiceLoaderLibPath = ""
|
||||
EntryJarPath = "D:/Development/JuiceLoader/build/libs/Entry.jar"
|
||||
EntryClass = "cn.xiaozhou233.juiceloader.entry.Entry"
|
||||
EntryMethod = "start"
|
||||
@@ -59,13 +59,6 @@ DWORD WINAPI ThreadProc(LPVOID lpParam) {
|
||||
}
|
||||
toml_free(toml_result);
|
||||
|
||||
log_trace("Checking bootstrap-api.jar");
|
||||
if (GetFileAttributesA(InjectionInfo.BootstrapAPIPath) == INVALID_FILE_ATTRIBUTES) {
|
||||
log_error("bootstrap-api.jar not found: %s", InjectionInfo.BootstrapAPIPath);
|
||||
// MessageBoxA(NULL, "bootstrap-api.jar not found", "Error", MB_OK);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Check JuiceLoader.jar
|
||||
|
||||
log_trace("Checking JuiceLoader.jar");
|
||||
@@ -113,9 +106,6 @@ DWORD WINAPI ThreadProc(LPVOID lpParam) {
|
||||
log_info("Enabled jvmti");
|
||||
|
||||
// Inject jars
|
||||
log_info("injecting bootstrap-api jar...");
|
||||
(*jvmti)->AddToSystemClassLoaderSearch(jvmti, InjectionInfo.BootstrapAPIPath);
|
||||
log_info("injected bootstrap-api jar");
|
||||
|
||||
log_info("injecting loader jar...");
|
||||
(*jvmti)->AddToSystemClassLoaderSearch(jvmti, InjectionInfo.JuiceLoaderJarPath);
|
||||
|
||||
@@ -21,21 +21,6 @@ void safe_copy(char *dest, const char *src, size_t dest_size) {
|
||||
bool ReadInjectionInfo(toml_result_t result, InjectParameters* params) {
|
||||
toml_datum_t InjectionTree = toml_seek(result.toptab, "Injection");
|
||||
|
||||
// ======= BootstrapAPIPath =======
|
||||
toml_datum_t BootstrapAPIPath = toml_seek(InjectionTree, "BootstrapAPIPath");
|
||||
char BootstrapAPIPathStr[INJECT_PATH_MAX];
|
||||
if (BootstrapAPIPath.type != TOML_STRING) {
|
||||
log_error("BootstrapAPIPath is not a string.");
|
||||
return false;
|
||||
}
|
||||
if (BootstrapAPIPath.u.s == NULL || strlen(BootstrapAPIPath.u.s) == 0) {
|
||||
sprintf(BootstrapAPIPathStr, "%s\\bootstrap-api.jar", params->ConfigDir);
|
||||
} else {
|
||||
sprintf(BootstrapAPIPathStr, "%s", BootstrapAPIPath.u.s);
|
||||
}
|
||||
safe_copy(InjectionInfo.BootstrapAPIPath, BootstrapAPIPathStr, INJECT_PATH_MAX);
|
||||
// ======= BootstrapAPIPath =======
|
||||
|
||||
// ======= JuiceLoaderJarPath =======
|
||||
toml_datum_t JuiceLoaderJarPath = toml_seek(InjectionTree, "JuiceLoaderJarPath");
|
||||
char JuiceLoaderJarPathStr[INJECT_PATH_MAX];
|
||||
|
||||
Reference in new issue
Block a user