2020-04-19 11:07:33 +00:00
|
|
|
From 77edf2dd0cc894aefca49927c292defbccf7365b Mon Sep 17 00:00:00 2001
|
|
|
|
From: Alexander Hofbauer <alex@derhofbauer.at>
|
|
|
|
Date: Sun, 19 Apr 2020 12:52:29 +0200
|
|
|
|
Subject: [PATCH] Enable rebuild with fake license
|
|
|
|
|
|
|
|
---
|
|
|
|
Common/sources/commondefines.js | 5 ++--
|
|
|
|
Common/sources/license.js | 52 ++++++++-------------------------
|
|
|
|
Makefile | 6 ++--
|
|
|
|
3 files changed, 18 insertions(+), 45 deletions(-)
|
|
|
|
|
2020-04-17 21:03:53 +00:00
|
|
|
diff --git a/Common/sources/commondefines.js b/Common/sources/commondefines.js
|
2020-04-19 11:07:33 +00:00
|
|
|
index 4518ac8..ff00ffe 100644
|
2020-04-17 21:03:53 +00:00
|
|
|
--- a/Common/sources/commondefines.js
|
|
|
|
+++ b/Common/sources/commondefines.js
|
2020-04-19 11:07:33 +00:00
|
|
|
@@ -970,8 +970,9 @@ const c_oAscQueueType = {
|
2020-04-17 21:03:53 +00:00
|
|
|
activemq: 'activemq'
|
|
|
|
};
|
|
|
|
|
|
|
|
-const buildVersion = '4.1.2';
|
|
|
|
-const buildNumber = 37;
|
|
|
|
+const buildVersion = '5.5.1';
|
|
|
|
+const buildNumber = 76;
|
2020-04-19 11:07:33 +00:00
|
|
|
+exports.buildDate = '2020-03-36T14:02:15.000Z';
|
2020-04-17 21:03:53 +00:00
|
|
|
|
|
|
|
exports.TaskQueueData = TaskQueueData;
|
|
|
|
exports.CMailMergeSendData = CMailMergeSendData;
|
|
|
|
diff --git a/Common/sources/license.js b/Common/sources/license.js
|
2020-04-19 11:07:33 +00:00
|
|
|
index 290d85d..5a1ab21 100644
|
2020-04-17 21:03:53 +00:00
|
|
|
--- a/Common/sources/license.js
|
|
|
|
+++ b/Common/sources/license.js
|
2020-04-19 11:07:33 +00:00
|
|
|
@@ -32,53 +32,25 @@
|
2020-04-17 21:03:53 +00:00
|
|
|
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
-const config = require('config');
|
|
|
|
-const configL = config.get('license');
|
|
|
|
const constants = require('./constants');
|
|
|
|
-const logger = require('./logger');
|
|
|
|
-const editorDataStorage = require('./../../DocService/sources/' + config.get('services.CoAuthoring.server.editorDataStorage'));
|
|
|
|
-
|
2020-04-19 11:07:33 +00:00
|
|
|
-const buildDate = '6/29/2016';
|
|
|
|
-const oBuildDate = new Date(buildDate);
|
2020-04-17 21:03:53 +00:00
|
|
|
-const oPackageType = configL.get('packageType');
|
|
|
|
-
|
|
|
|
-const cfgRedisPrefix = config.get('services.CoAuthoring.redis.prefix');
|
|
|
|
-const redisKeyLicense = cfgRedisPrefix + constants.REDIS_KEY_LICENSE;
|
|
|
|
-
|
|
|
|
-let editorData = new editorDataStorage();
|
2020-04-19 11:07:33 +00:00
|
|
|
+const commonDefines = require('./commondefines');
|
2020-04-17 21:03:53 +00:00
|
|
|
|
|
|
|
exports.readLicense = function*() {
|
|
|
|
- const c_LR = constants.LICENSE_RESULT;
|
|
|
|
- const res = {
|
|
|
|
+ return {
|
|
|
|
count: 1,
|
|
|
|
- type: c_LR.Error,
|
|
|
|
+ type: constants.LICENSE_RESULT.Success,
|
|
|
|
light: false,
|
|
|
|
- packageType: oPackageType,
|
|
|
|
+ packageType: constants.PACKAGE_TYPE_I,
|
|
|
|
mode: constants.LICENSE_MODE.None,
|
|
|
|
branding: false,
|
|
|
|
- connections: constants.LICENSE_CONNECTIONS,
|
|
|
|
+ connections: 9999,
|
|
|
|
customization: false,
|
|
|
|
- usersCount: 0,
|
|
|
|
- usersExpire: constants.LICENSE_EXPIRE_USERS_ONE_DAY,
|
|
|
|
- hasLicense: false,
|
2020-04-19 11:07:33 +00:00
|
|
|
- plugins: false,
|
|
|
|
- buildDate: oBuildDate,
|
|
|
|
- endDate: null
|
2020-04-17 21:03:53 +00:00
|
|
|
+ usersCount: 9999,
|
|
|
|
+ usersExpire: 99999,
|
|
|
|
+ hasLicense: true,
|
2020-04-19 11:07:33 +00:00
|
|
|
+ plugins: true,
|
|
|
|
+ buildDate: commonDefines.buildDate,
|
2020-04-17 21:03:53 +00:00
|
|
|
+ endDate: "2099-01-01T23:59:59.000Z"
|
|
|
|
};
|
|
|
|
-
|
|
|
|
- if (yield* _getFileState()) {
|
|
|
|
- res.type = c_LR.ExpiredTrial;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (res.type === c_LR.Expired || res.type === c_LR.ExpiredTrial) {
|
|
|
|
- res.count = 1;
|
|
|
|
- logger.error('License: License Expired!!!');
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- return res;
|
|
|
|
};
|
|
|
|
-exports.packageType = oPackageType;
|
|
|
|
-
|
|
|
|
-function* _getFileState() {
|
|
|
|
- return yield editorData.getLicense(redisKeyLicense);
|
|
|
|
-}
|
|
|
|
+exports.packageType = constants.PACKAGE_TYPE_I;
|
|
|
|
diff --git a/Makefile b/Makefile
|
|
|
|
index 40bf93e..7109dbd 100644
|
|
|
|
--- a/Makefile
|
|
|
|
+++ b/Makefile
|
|
|
|
@@ -1,4 +1,4 @@
|
|
|
|
-GRUNT = grunt
|
|
|
|
+GRUNT = ./node_modules/.bin/grunt
|
|
|
|
GRUNT_FLAGS = --no-color -v
|
|
|
|
|
|
|
|
GRUNT_FILES = Gruntfile.js.out
|
|
|
|
@@ -46,7 +46,7 @@ endif
|
|
|
|
|
|
|
|
TARGET := $(PLATFORM)_$(ARCHITECTURE)
|
|
|
|
|
|
|
|
-OUTPUT = ../build_tools/out/$(TARGET)/onlyoffice/documentserver/server
|
|
|
|
+OUTPUT = build/out/$(TARGET)/onlyoffice/documentserver/server
|
|
|
|
|
|
|
|
SPELLCHECKER_DICTIONARIES := $(OUTPUT)/SpellChecker/dictionaries
|
|
|
|
SPELLCHECKER_DICTIONARY_FILES += ../dictionaries/*_*
|
|
|
|
@@ -83,7 +83,7 @@ DEBUG = $(BRANDING_DIR)/debug.js
|
|
|
|
.PHONY: all clean install uninstall build-date
|
|
|
|
|
|
|
|
.NOTPARALLEL:
|
|
|
|
-all: $(SPELLCHECKER_DICTIONARIES) $(TOOLS) $(SCHEMA) $(CORE_FONTS) $(LICENSE) $(WELCOME) $(INFO) build-date
|
|
|
|
+all: build-date
|
|
|
|
|
|
|
|
build-date: $(GRUNT_FILES)
|
|
|
|
sed "s|\(const buildVersion = \).*|\1'${PRODUCT_VERSION}';|" -i $(COMMON_DEFINES_JS)
|
2020-04-19 11:07:33 +00:00
|
|
|
--
|
|
|
|
2.26.1
|
|
|
|
|