mirror of
https://github.com/xiaozhou233/JuiceAgent.git
synced 2026-12-05 21:15:56 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
10ec330480 | ||
|
|
0ddcfcd7c8 | ||
|
|
87a91376c5 | ||
|
|
dbae5e5258 | ||
|
|
ff216aabee | ||
|
|
18a923373b | ||
|
|
6fe467bccf | ||
|
|
4bed99f417 |
No files matched your search
+1
-1
@@ -1 +1 @@
|
|||||||
Version 4.1.0
|
Version 4.1.1
|
||||||
@@ -15,9 +15,13 @@ class Config {
|
|||||||
public:
|
public:
|
||||||
explicit Config(const std::filesystem::path& runtime_dir = {})
|
explicit Config(const std::filesystem::path& runtime_dir = {})
|
||||||
{
|
{
|
||||||
_runtime_dir = runtime_dir.empty()
|
_runtime_dir = runtime_dir;
|
||||||
? std::filesystem::current_path()
|
|
||||||
: runtime_dir;
|
// No runtime directory specified: do not auto-read a config file
|
||||||
|
// from the current working directory.
|
||||||
|
if (runtime_dir.empty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const auto result = toml::try_parse(_runtime_dir / "config.toml");
|
const auto result = toml::try_parse(_runtime_dir / "config.toml");
|
||||||
|
|
||||||
|
|||||||
@@ -111,30 +111,6 @@ JNIEXPORT jbyteArray JNICALL Java_cn_xiaozhou233_juiceagent_api_JuiceAgent_getCl
|
|||||||
JNIEXPORT jbyteArray JNICALL Java_cn_xiaozhou233_juiceagent_api_JuiceAgent_getClassBytesByName
|
JNIEXPORT jbyteArray JNICALL Java_cn_xiaozhou233_juiceagent_api_JuiceAgent_getClassBytesByName
|
||||||
(JNIEnv *, jclass, jstring);
|
(JNIEnv *, jclass, jstring);
|
||||||
|
|
||||||
/*
|
|
||||||
* Class: cn_xiaozhou233_juiceagent_api_JuiceAgent
|
|
||||||
* Method: addRemapperWhiteList
|
|
||||||
* Signature: (Ljava/lang/String;)V
|
|
||||||
*/
|
|
||||||
JNIEXPORT void JNICALL Java_cn_xiaozhou233_juiceagent_api_JuiceAgent_addRemapperWhiteList
|
|
||||||
(JNIEnv *, jclass, jstring);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Class: cn_xiaozhou233_juiceagent_api_JuiceAgent
|
|
||||||
* Method: removeRemapperWhiteList
|
|
||||||
* Signature: (Ljava/lang/String;)V
|
|
||||||
*/
|
|
||||||
JNIEXPORT void JNICALL Java_cn_xiaozhou233_juiceagent_api_JuiceAgent_removeRemapperWhiteList
|
|
||||||
(JNIEnv *, jclass, jstring);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Class: cn_xiaozhou233_juiceagent_api_JuiceAgent
|
|
||||||
* Method: clearRemapperWhiteList
|
|
||||||
* Signature: ()V
|
|
||||||
*/
|
|
||||||
JNIEXPORT void JNICALL Java_cn_xiaozhou233_juiceagent_api_JuiceAgent_clearRemapperWhiteList
|
|
||||||
(JNIEnv *, jclass);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -69,6 +69,11 @@ namespace JuiceAgent {
|
|||||||
spdlog::error("[JuiceAgent] Agent not loaded! Please call preload() first!");
|
spdlog::error("[JuiceAgent] Agent not loaded! Please call preload() first!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if(initialized_) {
|
||||||
|
spdlog::warn("[JuiceAgent] Agent already initialized! Skipping...");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
initialized_ = true;
|
||||||
|
|
||||||
// Add Abilities
|
// Add Abilities
|
||||||
jvmtiCapabilities caps{};
|
jvmtiCapabilities caps{};
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ namespace JuiceAgent {
|
|||||||
JuiceAgent::Config::Config config;
|
JuiceAgent::Config::Config config;
|
||||||
|
|
||||||
bool loaded = false;
|
bool loaded = false;
|
||||||
|
bool initialized_ = false;
|
||||||
public:
|
public:
|
||||||
// Singleton
|
// Singleton
|
||||||
static Agent& getInstance();
|
static Agent& getInstance();
|
||||||
|
|||||||
Reference in new issue
Block a user