2022-09-24 13:42:15 +00:00
|
|
|
From 3c58d272005a300ad8fe575457d5ce25710833e9 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Beeant <huangxb0512@gmail.com>
|
|
|
|
Date: Sat, 24 Sep 2022 21:38:51 +0800
|
|
|
|
Subject: [PATCH] build: license
|
|
|
|
|
|
|
|
---
|
|
|
|
Common/sources/constants.js | 2 +-
|
|
|
|
Common/sources/license.js | 16 ++++++++--------
|
|
|
|
DocService/sources/server.js | 2 +-
|
|
|
|
FileConverter/sources/convertermaster.js | 1 -
|
|
|
|
Makefile | 2 +-
|
|
|
|
5 files changed, 11 insertions(+), 12 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/Common/sources/constants.js b/Common/sources/constants.js
|
|
|
|
index 65d4c6f..39a7e56 100644
|
|
|
|
--- a/Common/sources/constants.js
|
|
|
|
+++ b/Common/sources/constants.js
|
|
|
|
@@ -83,7 +83,7 @@ exports.LICENSE_RESULT = {
|
|
|
|
UsersViewCountOS: 15
|
2020-12-27 20:02:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
-exports.LICENSE_CONNECTIONS = 20;
|
|
|
|
+exports.LICENSE_CONNECTIONS = 9999;
|
|
|
|
exports.LICENSE_EXPIRE_USERS_ONE_DAY = 24 * 60 * 60; // day in seconds
|
|
|
|
|
|
|
|
exports.AVS_OFFICESTUDIO_FILE_UNKNOWN = 0x0000;
|
2022-09-24 13:42:15 +00:00
|
|
|
diff --git a/Common/sources/license.js b/Common/sources/license.js
|
|
|
|
index fbd5ec8..203dcb0 100644
|
|
|
|
--- a/Common/sources/license.js
|
|
|
|
+++ b/Common/sources/license.js
|
|
|
|
@@ -45,22 +45,22 @@ exports.readLicense = function*() {
|
2020-12-27 20:02:07 +00:00
|
|
|
count: 1,
|
|
|
|
type: c_LR.Success,
|
|
|
|
light: false,
|
|
|
|
- packageType: constants.PACKAGE_TYPE_OS,
|
|
|
|
+ packageType: constants.PACKAGE_TYPE_I,
|
|
|
|
mode: constants.LICENSE_MODE.None,
|
2022-03-24 10:14:48 +00:00
|
|
|
- branding: false,
|
|
|
|
+ branding: true,
|
2020-12-27 20:02:07 +00:00
|
|
|
connections: constants.LICENSE_CONNECTIONS,
|
2022-09-24 13:42:15 +00:00
|
|
|
connectionsView: constants.LICENSE_CONNECTIONS,
|
2020-10-18 12:36:58 +00:00
|
|
|
- customization: false,
|
2022-03-24 10:14:48 +00:00
|
|
|
- usersCount: 0,
|
2020-12-27 20:02:07 +00:00
|
|
|
+ customization: true,
|
2022-03-24 10:14:48 +00:00
|
|
|
+ usersCount: constants.LICENSE_CONNECTIONS,
|
2022-09-24 13:42:15 +00:00
|
|
|
usersViewCount: 0,
|
2022-03-24 10:14:48 +00:00
|
|
|
usersExpire: constants.LICENSE_EXPIRE_USERS_ONE_DAY,
|
2020-04-17 21:03:53 +00:00
|
|
|
- hasLicense: false,
|
2020-04-19 11:07:33 +00:00
|
|
|
- plugins: false,
|
2020-12-27 20:02:07 +00:00
|
|
|
+ hasLicense: true,
|
|
|
|
+ plugins: true,
|
|
|
|
buildDate: oBuildDate,
|
2022-03-24 10:14:48 +00:00
|
|
|
startDate: startDate,
|
2022-05-17 13:22:05 +00:00
|
|
|
- endDate: null,
|
2022-09-24 13:42:15 +00:00
|
|
|
+ endDate: new Date("2099-01-01T23:59:59.000Z"),
|
|
|
|
customerId: ""
|
2022-03-24 10:14:48 +00:00
|
|
|
}, null];
|
2020-04-17 21:03:53 +00:00
|
|
|
};
|
2021-07-02 08:07:53 +00:00
|
|
|
|
2020-12-27 20:02:07 +00:00
|
|
|
-exports.packageType = constants.PACKAGE_TYPE_OS;
|
2020-04-17 21:03:53 +00:00
|
|
|
+exports.packageType = constants.PACKAGE_TYPE_I;
|
2022-09-24 13:42:15 +00:00
|
|
|
diff --git a/DocService/sources/server.js b/DocService/sources/server.js
|
|
|
|
index cf3ba90..d256724 100644
|
|
|
|
--- a/DocService/sources/server.js
|
|
|
|
+++ b/DocService/sources/server.js
|
|
|
|
@@ -110,7 +110,7 @@ if (!(cfgTokenEnableBrowser && cfgTokenEnableRequestInbox && cfgTokenEnableReque
|
|
|
|
|
|
|
|
if (!tenantManager.isMultitenantMode()) {
|
|
|
|
updateLicense();
|
|
|
|
- fs.watchFile(cfgLicenseFile, updateLicense);
|
|
|
|
+
|
|
|
|
setInterval(updateLicense, 86400000);
|
|
|
|
}
|
2020-10-18 12:36:58 +00:00
|
|
|
|
2022-09-24 13:42:15 +00:00
|
|
|
diff --git a/FileConverter/sources/convertermaster.js b/FileConverter/sources/convertermaster.js
|
|
|
|
index 2a0b366..96468f9 100644
|
|
|
|
--- a/FileConverter/sources/convertermaster.js
|
|
|
|
+++ b/FileConverter/sources/convertermaster.js
|
|
|
|
@@ -93,7 +93,6 @@ if (cluster.isMaster) {
|
2020-10-18 12:36:58 +00:00
|
|
|
updateLicense();
|
|
|
|
|
2022-09-24 13:42:15 +00:00
|
|
|
if (!tenantManager.isMultitenantMode()) {
|
|
|
|
- fs.watchFile(cfgLicenseFile, updateLicense);
|
|
|
|
setInterval(updateLicense, 86400000);
|
|
|
|
}
|
2020-10-18 12:36:58 +00:00
|
|
|
} else {
|
2022-09-24 13:42:15 +00:00
|
|
|
diff --git a/Makefile b/Makefile
|
|
|
|
index e8e1308..a4b0a51 100644
|
|
|
|
--- a/Makefile
|
|
|
|
+++ b/Makefile
|
|
|
|
@@ -87,7 +87,7 @@ DEBUG = $(BRANDING_DIR)/debug.js
|
|
|
|
.PHONY: all clean install uninstall build-date
|
|
|
|
|
|
|
|
.NOTPARALLEL:
|
|
|
|
-all: $(SPELLCHECKER_DICTIONARIES) $(TOOLS) $(SCHEMA) $(CORE_FONTS) $(DOCUMENT_TEMPLATES) $(LICENSE) $(WELCOME) $(INFO) build-date
|
|
|
|
+all: $(SPELLCHECKER_DICTIONARIES) $(TOOLS) $(SCHEMA) $(CORE_FONTS) $(DOCUMENT_TEMPLATES) $(WELCOME) $(INFO) build-date
|
|
|
|
|
|
|
|
build-date: $(GRUNT_FILES)
|
|
|
|
sed "s|\(const buildVersion = \).*|\1'${PRODUCT_VERSION}';|" -i $(COMMON_DEFINES_JS)
|
|
|
|
--
|
|
|
|
2.31.1.windows.1
|
|
|
|
|