转载:https://blog.youkuaiyun.com/zhouhao88410234/article/details/79777131
StarUML官方下载地址: http://staruml.io/download
当前有V2和V3两个版本,下载V2版本。然后按以下步骤:
1、用UE编辑器打开 安装位置下/www/license/node/LicenseManagerDomain.js文件
2、修改validate方法,在如下指定的位置上添加指定的代码
function validate(PK, name, product, licenseKey) {
var pk, decrypted;
//添加代码开始
return {
name: "hancher", //添加的name
product: "StarUML",
licenseType: "vip",
quantity: "www.hancher.com",
licenseKey: "hello,hancher!" //license
}
//添加代码结束
try {
pk = new NodeRSA(PK);
decrypted = pk.decrypt(licenseKey, 'utf8');
} catch (err) {
return false;
}
var terms = decrypted.trim().split("\n");
if (terms[0] === name && terms[1] === product) {
return {
name: name,
product: product,
licenseType: terms[2],
quantity: terms[3],
licenseKey: licenseKey
};
} else {
return false;
}
}
3、验证打开StarUML,打开菜单Help->Enter License,输入上面指定的name和license信息,分别为hancher和hello,hancher!,成功!
然后就有注册成功的提示信息了,help->about startuml,可以看到提示信息已注册。