git clone https://github.com/dodying/softwareUpdateManagernpm install- 下载
https://github.com/dodying/software-for-softwareUpdateManager/archive/master.zip, 解压并移动 software 到 softwareUpdateManager 下 - 从这里下载 plugins.7z,并解压到 plugins 下
- 复制一份 config.default.js,按其中注释修改并存为 config.js
node index.js
- 以下软件,如果
通常版(installer)与便携版(portable)功能相同则一般以绿色版优先(如果安装版的包小许多,则可能以安装版优先),同时64位优先 - 大多软件都支持自动安装
- 带 💸 的为商业软件 (包括Freemium与Free Persion), 带
✈️ 的需番羽土墙, 带 ✋ 的需手动下载/安装, 带 📌 的表示安装目录固定 - 代理优先级(前提是设置了代理):
config.urlWithoutProxy > config.urlWithProxy > config.useProxy > software.useProxy - 模式优先级:
config.specialMode > config.mode = config.commercialSoftware - 安装方法并没有一一测试,如果自动安装失败,请尝试手动安装
- 如果你想安装同个软件到多个地方,请在
config.js中编辑profile,并使用node index --profile - 如果下载错误,请尝试挂代理下载
- 针对软件的特定化设置
- install_cli 变手动 所有安装手动
- version 去除 build
- func-full => walkLink
- software => https://stackoverflow.com/questions/10843572/how-to-create-javascript-constants-as-properties-of-objects-using-const-keyword https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze
function Parser(){
this.init.apply(this, arguments);
}
Parser.prototype = {
constructor: Parser,
get contentTxt() { // callback 才有用
var text = $('<div>').html(this.content).text().trim();
// 解决第二个段落和第一个锻炼合在一起的问题
text = text.replace(/([^\n]) /, '$1\n ');
return text;
},
init: function (info, doc, curPageUrl) {}
}- 依据特定方式直接安装指定版本的软件(当前为只能安装最新版本)
- 无需下载software文件夹直接安装
- 只有软件不存在时才安装(适用于不常更新/会自动更新的软件)
详见 Vivaldi
说明:主要简略 version/download/install 三个属性
function => version: function
string => version: { selector: string }
array => version: { selector: array[0], attr: array[1], match: array[2] }
any => array [].concat(any)
typeof array[0] === 'string' and array[0].match(/^https?:/i) => { plain: array[0], output: array[1] }
typeof array[0] === 'string' and not array[0].match(/^https?:/i) => { selector: array[0], attr: array[1], match: array[2], output: array[3] }
typeof array[0] === 'function' => { func: array[0], output: array[1] }
array => (array[0])(output, iPath, ...array[1,])
{search}
{software-special-installer}
{software-without-download}
{software-without-installer}