1.1.0 • Published 8 months ago
@greetec/fsc-sdk v1.1.0
打包
修改版本号pnpm build
发布
pnpm publish
OnlyOffice
###
1、通过官方 build_tools(https://github.com/ONLYOFFICE/build_tools)编译,编译过程中会下载代码
2、修改 server\Common\sources\license.js,改为指定版本
exports.readLicense = function* () {
const c_LR = constants.LICENSE_RESULT;
var now = new Date();
var startDate = new Date(
Date.UTC(now.getUTCFullYear(), now.getUTCMonth(), 1)
); //first day of current month
return [
{
count: 1,
type: c_LR.Success,
light: false, //轻量版
packageType: constants.PACKAGE_TYPE_OS,
mode: constants.LICENSE_MODE.None,
branding: true, // 是否允许修改about
connections: constants.LICENSE_CONNECTIONS,
connectionsView: constants.LICENSE_CONNECTIONS,
customization: true, //是否允许应用配置项customization
advancedApi: true, //启用 postMessage
usersCount: 0,
usersViewCount: 0,
usersExpire: constants.LICENSE_EXPIRE_USERS_ONE_DAY,
hasLicense: true, //是否有license,为false对type有影响
plugins: false, //? 不清楚有啥影响,plugins开关?
buildDate: oBuildDate,
startDate: startDate,
endDate: null,
customerId: "",
alias: "",
},
null,
];
};
3、修改 server\Common\sources\constants.js,取消连接数限制
exports.LICENSE_CONNECTIONS = 100; //同时连接数
4、build_tools 文件夹下 version 指定编译版本号 5、build_tools\tools\linux\automate.py 中 update 改为 0,意为编译时不更新代码
build_tools_params = ["--branch", branch,
"--module", modules,
"--update", "0",
"--qt-dir", os.getcwd() + "/qt_build/Qt-5.9.9"] + params
6、修改完成后重新执行编译
./automate.py server
7、生产环境通过官方文档安装,安装完成后替换/var/www/onlyoffice/documentserver/server 下 DocService、FileConverter、Metrics 中文件。重启服务