add package compatible

This commit is contained in:
arm64v8a
2022-09-27 15:02:31 +08:00
parent e44279742c
commit 0b783d9130
9 changed files with 49 additions and 27 deletions

View File

@@ -109,13 +109,11 @@ namespace NekoRay::sys {
void CoreProcess::Start() {
show_stderr = false;
auto v2ray_asset_dir = dataStore->v2ray_asset_dir;
if (v2ray_asset_dir.isEmpty() || QDir(v2ray_asset_dir).exists()) {
v2ray_asset_dir = QApplication::applicationDirPath();
auto v2ray_asset_dir = FindCoreAsset("geoip.dat");
if (!v2ray_asset_dir.isEmpty()) {
v2ray_asset_dir = QFileInfo(v2ray_asset_dir).absolutePath();
env = QStringList{"V2RAY_LOCATION_ASSET=" + v2ray_asset_dir};
}
env = QStringList{
"V2RAY_LOCATION_ASSET=" + v2ray_asset_dir
};
ExternalProcess::Start();
write((dataStore->core_token + "\n").toUtf8());
}