Skip to content

Commit

Permalink
Merge pull request #40 from lyw182/main
Browse files Browse the repository at this point in the history
Change BootWay03_linux-SemiAuto to be available
  • Loading branch information
MliKiowa authored Oct 5, 2024
2 parents 5a7dd57 + c2f4b30 commit b92f210
Showing 1 changed file with 22 additions and 5 deletions.
27 changes: 22 additions & 5 deletions docs/zh-CN/guide/boot/shell/BootWay03-Linux-SemiAuto.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,44 @@
2. 然后执行:
```javascript
echo 'const fs = require("fs");
const CurrentPath = path.dirname(__filename)
const path = require("path");
const hasNapcatParam = process.argv.includes('--no-sandbox');
const hasNapcatParam = process.argv.includes("--no-sandbox");
if (hasNapcatParam) {
(async () => {
await import("file://" + path.join(CurrentPath, './napcat/napcat.mjs'));
await import("file://" + path.join(CurrentPath, "./napcat/napcat.mjs"));
})();
} else {
require('./application/app_launcher/index.js');
require("./application/app_launcher/index.js");
setTimeout(() => {
global.launcher.installPathPkgJson.main = "./application/app_launcher/index.js";
}, 0);
}' > /opt/QQ/resources/app/loadNapCat.js
```
如果你使用 LiteloaderQQNT ,那么执行:
```javascript
echo 'const fs = require("fs");
const path = require("path");
const CurrentPath = path.dirname(__filename)
const hasNapcatParam = process.argv.includes("--no-sandbox");
if (hasNapcatParam) {
(async () => {
await import("file://" + path.join(CurrentPath, "./napcat/napcat.mjs"));
})();
} else {
require(String.raw`/opt/LiteLoaderQQNT`); 引号中写入你的liteloaderqqnt路径
}' > /opt/QQ/resources/app/loadNapCat.js
```
3. 安装napcat shell 到 /opt/QQ/resources/app/napcat 确保 /opt/QQ/resources/app/napcat/napcat.js存在

4. 修改/opt/QQ/resources/app/package.json的main属性从`./application/app_launcher/index.js` 改为`./LoadNapCat.js`
4. 修改/opt/QQ/resources/app/package.json的main属性从`./application/app_launcher/index.js` 改为`./loadNapCat.js`
这步也可以使用下面替代
```
chmod +777 /opt/QQ
sed -i 's/"main": ".\/application\/app_launcher\/index.js"/"main": ".\/loadNapCat.js"/' /opt/QQ/resources/app/package.json
```

5. 启动xvfb-run -a qq --no-sandbox
5. 启动
```
xvfb-run -a qq --no-sandbox
```

0 comments on commit b92f210

Please sign in to comment.