huiyadanli/RevokeMsgPatcher · error · Exception
在路径{appPath}下,未找到app_launcher文件夹
Error message
在路径{appPath}下,未找到app_launcher文件夹 What it means
CreateLauncherFile(appPath) writes liteloader.h.js into <appPath>/app_launcher/. It throws a plain Exception if that subfolder is missing, because the expected QQNT application folder layout is either wrong or has changed.
Source
Thrown at RevokeMsgPatcher/Forms/FormLiteLoaderQQNT.cs:349
return Path.Combine(versionsPath, latestVersion, "resources", "app");
}
}
}
return Path.Combine(installPath, "resources", "app");
}
/// <summary>
/// 创建 app/app_launcher/liteloader.h.js 文件,写入 require(String.raw*) 其中 * 为 LiteLoaderQQNT 的路径
/// </summary>
/// <param name="appPath"></param>
/// <exception cref="Exception"></exception>
private void CreateLauncherFile(string appPath)
{
string launcherDir = Path.Combine(appPath, "app_launcher");
if (!Directory.Exists(launcherDir))
{
throw new Exception($"在路径{appPath}下,未找到app_launcher文件夹");
}
string launcherFilePath = Path.Combine(launcherDir, "liteloader.h.js");
// if (File.Exists(launcherFilePath))
// {
// Debug.WriteLine("已经创建过liteloader.h.js文件");
// return;
// }
string liteLoaderPath = Path.Combine(Application.StartupPath, "LiteLoaderQQNT");
string content = $"require(String.raw`{liteLoaderPath}`);";
File.WriteAllText(launcherFilePath, content, Encoding.UTF8);
}
/// <summary>
/// 修改 app/package.json 文件,将 main 后面的路径改为 ./app_launcher/liteloader.h.js
/// </summary>View on GitHub (pinned to 89cbbb3f0c)
Solutions
- Confirm the QQNT install path has versions\<ver>\resources\app\app_launcher.
- Reinstall a supported QQNT version to repair the app folder layout.
- Re-check that the chosen path is the QQNT root (the one containing QQ.exe).
Defensive patterns
Strategy: validation
Validate before calling
string launcherDir = Path.Combine(appPath, "app_launcher");
if (!Directory.Exists(launcherDir))
{
MessageBox.Show($"{appPath} 下未找到 app_launcher 文件夹,请确认 QQNT 版本/路径。");
return;
}
CreateLauncherFile(appPath); Prevention
- Confirm versions\<ver>\resources\app\app_launcher exists before installing.
- Use a supported QQNT version whose app folder layout matches expectations.
- Always select the QQNT root (containing QQ.exe) as the install path.
When it happens
Trigger: The appPath returned by GetAppPath exists but contains no app_launcher directory. Occurs with an unexpected/older QQNT build, a restructured app folder, or appPath mis-resolution (e.g. versions folder present but empty, falling through to <install>/resources/app).
Common situations: New QQNT version restructured its app folder; a non-standard install layout was selected; the versions subfolder was emptied.
Related errors
- 在路径{appPath}下,未找到package.json文件
- 在路径{appPath}下,未找到package.json.h.bak备份文件,请确认是否通过本软件安装过 LiteLo
- 下载失败
- 源目录不存在: {sourceDirName}
- No valid version directories found in: {searchDirectory}
AI-assisted analysis of huiyadanli/RevokeMsgPatcher@89cbbb3f0c (2026-08-13).
Data as JSON: /api/errors/8adda85715f8c555.
Report an issue: GitHub.