-
-
Notifications
You must be signed in to change notification settings - Fork 851
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
怎么安装utools的插件? #105
Comments
@Hiddensu
{
"name": "rubick-ui-plugin-demo",
"pluginName": "插件demo",
"description": "rubick ui 插件demo",
"author": "muwoo",
"main": "index.html",
"logo": "https://www.img/demo.png",
"version": "0.0.1",
"preload":"preload.js",
"homePage": "https://gitee.com/rubick-center/rubick-ui-plugin-demo/raw/master/README.md",
"pluginType": "ui",
"features": [
{
"code": "index",
"explain": "测试插件",
"cmds":[
"demo",
"测试"
]
}
]
} 这样就把这个开源插件改成了你自己的,自己的插件如何安装到rubick,就可以直接根据 rubick 文档来了:https://rubickcenter.github.io/rubick/dev/#%E5%BC%80%E5%8F%91-ui-%E6%8F%92%E4%BB%B6 如果需要发布自己的插件到 rubick 公共插件库,可以参考这个文档:https://rubickcenter.github.io/rubick/dev/#%E5%8F%91%E5%B8%83%E6%8F%92%E4%BB%B6 |
@Hiddensu |
upx文件怎么处理呢? |
upx文件本质是对插件目录进行了封包 https://yuanliao.info/d/6534 我让ChatGPT编写了一个nodejs的小脚本,可以从upx恢复至插件目录。 const fs = require('fs');
const path = require('path');
const compressing = require('compressing');
const asar = require('asar');
// 检查命令行参数是否提供了要处理的文件路径
if (process.argv.length !== 3) {
console.error('请提供要处理的文件路径作为命令行参数!');
process.exit(1);
}
// 获取要处理的文件路径
const filePath = process.argv[2];
// 检查文件是否存在
if (!fs.existsSync(filePath)) {
console.error(`文件 '${filePath}' 不存在!`);
process.exit(1);
}
// 获取文件名和后缀名
const fileName = path.basename(filePath);
const fileExt = path.extname(fileName);
// 检查文件后缀是否为.upx
if (fileExt !== '.upx') {
console.error('文件必须具有.upx扩展名!');
process.exit(1);
}
// 解压.upx文件
async function upxExtract(upxPath) {
try {
const folderPath = upxPath.replace('.upx', '');
await compressing.gzip.uncompress(upxPath, folderPath + '.asar');
console.log('已解压.gz文件');
// 使用asar库解压.asar文件
await asar.extractAll(folderPath + '.asar', folderPath);
console.log('已解压.asar文件');
} catch (error) {
console.error('处理文件时出错:', error);
}
}
upxExtract(filePath); 注意,在用这个脚本获得了原有目录之后,你还需要:
|
这个简直无敌 |
怎么安装utools的插件?
The text was updated successfully, but these errors were encountered: