Skip to content

Commit

Permalink
Merge branch release/v5.2.4 to master
Browse files Browse the repository at this point in the history
  • Loading branch information
maxkadushkin committed Dec 21, 2018
2 parents 39d20e6 + 0f37b16 commit ee1d496
Show file tree
Hide file tree
Showing 493 changed files with 19,934 additions and 4,108 deletions.
155 changes: 148 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,25 +1,40 @@
PWD := $(shell pwd)
CURL := curl -L -o

COPY_FILE = cp -f
COPY_DIR = cp -f -R
INSTALL_FILE = $(COPY_FILE) -av
INSTALL_DIR = $(COPY_DIR)
INSTALL_PROGRAM = install -m 755 -p

PRODUCT_VERSION ?= 0.0.0
BUILD_NUMBER ?= 0

QT_PATH ?= /opt/qt5
QT_PLUGINS ?= $(QT_PATH)/plugins

END2END_ENCRYPT ?= false

ifeq ($(OS),Windows_NT)
PLATFORM := win
EXEC_EXT := .exe
SHELL_EXT := .bat
SHARED_EXT := .dll
LIB_EXT := .lib
MAKE := nmake
DEST_DIR ?= ONLYOFFICE/DesktopEditors
QT_LIBS ?= $(QT_PATH)/bin
else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
PLATFORM := linux
SHARED_EXT := .so*
SHARED_SUFFIX := lib
SHARED_PREFIX := lib
SHELL_EXT := .sh
LIB_EXT := .a
MAKE := make -j $(shell grep -c ^processor /proc/cpuinfo)
MAKE := make
DEST_DIR ?= /opt/onlyoffice/desktopeditors
QT_LIBS ?= $(QT_PATH)/lib
endif
endif

Expand All @@ -31,11 +46,38 @@ ifneq ($(filter %86,$(UNAME_M)),)
ARCHITECTURE := 32
endif

TARGET := $(PLATFORM)_$(ARCHITECTURE)
include win-linux/package/windows/Makefile.mk

BINDIR := ../core/build/bin/$(TARGET)
QT_ICU ?= $(QT_LIBS)

ASCDOCUMENTEDITOR := $(BINDIR)/docbuilder$(EXEC_EXT)
DEST_CONV_DIR = $(DEST_DIR)/converter
DEST_EDITOR_DIR = $(DEST_DIR)/editors
DEST_PLUGINS_DIR = $(DEST_EDITOR_DIR)/sdkjs-plugins

TARGET := $(PLATFORM)_$(ARCHITECTURE)

CORE_DIR := ../core/build
CORE_BIN_DIR := $(CORE_DIR)/bin/$(TARGET)
CORE_LIB_DIR := $(CORE_DIR)/lib/$(TARGET)

DICT_DIR := ../dictionaries
WEBAPPS_DIR := ../web-apps-pro/deploy
UI_PLUGINS_DIR := ../desktop-sdk/ChromiumBasedEditors/plugins
SDKJS_PLUGINS_DIR := ../sdkjs-plugins

DE_PLUGINS += $(SDKJS_PLUGINS_DIR)/cl?part
DE_PLUGINS += $(SDKJS_PLUGINS_DIR)/c?de
DE_PLUGINS += $(SDKJS_PLUGINS_DIR)/m?cros
DE_PLUGINS += $(SDKJS_PLUGINS_DIR)/oc?
DE_PLUGINS += $(SDKJS_PLUGINS_DIR)/ph?toeditor
DE_PLUGINS += $(SDKJS_PLUGINS_DIR)/s?mboltable
DE_PLUGINS += $(SDKJS_PLUGINS_DIR)/s?nonim
DE_PLUGINS += $(SDKJS_PLUGINS_DIR)/tr?nslate
DE_PLUGINS += $(SDKJS_PLUGINS_DIR)/y?utube
DE_PLUGINS += $(SDKJS_PLUGINS_DIR)/pluginBase.js
DE_PLUGINS += $(SDKJS_PLUGINS_DIR)/plugins.css

ASCDOCUMENTEDITOR := win-linux/ASCDocumentEditor.build/DesktopEditors$(EXEC_EXT)

TARGETS += $(ASCDOCUMENTEDITOR)

Expand Down Expand Up @@ -65,13 +107,112 @@ $(foreach proj, $(QT_PROJ), $(eval $(call build_proj_tmpl, $(proj))))


%.build/Makefile: %.pro
mkdir -p $(dir $@) && cd $(dir $@) && PRODUCT_VERSION=$(PRODUCT_VERSION) BUILD_NUMBER=$(BUILD_NUMBER) qmake -r $<
mkdir -p $(dir $@) && cd $(dir $@) && PRODUCT_VERSION=$(PRODUCT_VERSION) BUILD_NUMBER=$(BUILD_NUMBER) qmake -r $< DEFINES+=_QTVER_DOWNGRADE

clean:
rm -rf $(TARGETS)
for i in $(PROS); do \
if [ -d $$i -a -f $$i/Makefile ]; then \
cd $$i && $(MAKE) distclean; \
fi \
done
done

install: $(TARGETS)
mkdir -p $(DEST_DIR)

$(INSTALL_PROGRAM) $(TARGETS) $(DEST_DIR)
$(INSTALL_FILE) $(CORE_LIB_DIR)/HtmlFileInternal$(EXEC_EXT) $(DEST_DIR)
$(INSTALL_FILE) $(CORE_LIB_DIR)/$(SHARED_PREFIX)ascdocumentscore$(SHARED_EXT) $(DEST_DIR)
$(INSTALL_FILE) $(CORE_LIB_DIR)/$(SHARED_PREFIX)ooxmlsignature$(SHARED_EXT) $(DEST_DIR)
$(INSTALL_FILE) $(CORE_LIB_DIR)/$(SHARED_PREFIX)hunspell$(SHARED_EXT) $(DEST_DIR)
$(INSTALL_FILE) ./LICENSE.txt $(DEST_DIR)
$(INSTALL_FILE) common/package/license/3dparty/3DPARTYLICENSE $(DEST_DIR)

$(INSTALL_FILE) $(QT_LIBS)/$(SHARED_PREFIX)Qt5Core$(SHARED_EXT) $(DEST_DIR)
$(INSTALL_FILE) $(QT_LIBS)/$(SHARED_PREFIX)Qt5Gui$(SHARED_EXT) $(DEST_DIR)
$(INSTALL_FILE) $(QT_LIBS)/$(SHARED_PREFIX)Qt5Multimedia$(SHARED_EXT) $(DEST_DIR)
$(INSTALL_FILE) $(QT_LIBS)/$(SHARED_PREFIX)Qt5MultimediaWidgets$(SHARED_EXT) $(DEST_DIR)
$(INSTALL_FILE) $(QT_LIBS)/$(SHARED_PREFIX)Qt5Network$(SHARED_EXT) $(DEST_DIR)
$(INSTALL_FILE) $(QT_LIBS)/$(SHARED_PREFIX)Qt5OpenGL$(SHARED_EXT) $(DEST_DIR)
$(INSTALL_FILE) $(QT_LIBS)/$(SHARED_PREFIX)Qt5PrintSupport$(SHARED_EXT) $(DEST_DIR)
$(INSTALL_FILE) $(QT_LIBS)/$(SHARED_PREFIX)Qt5Svg$(SHARED_EXT) $(DEST_DIR)
$(INSTALL_FILE) $(QT_LIBS)/$(SHARED_PREFIX)Qt5Widgets$(SHARED_EXT) $(DEST_DIR)

ifeq ($(PLATFORM),linux)
$(INSTALL_FILE) $(QT_LIBS)/$(SHARED_PREFIX)Qt5DBus$(SHARED_EXT) $(DEST_DIR)
$(INSTALL_FILE) $(QT_LIBS)/$(SHARED_PREFIX)Qt5X11Extras$(SHARED_EXT) $(DEST_DIR)
$(INSTALL_FILE) $(QT_LIBS)/$(SHARED_PREFIX)Qt5XcbQpa$(SHARED_EXT) $(DEST_DIR)

$(INSTALL_FILE) $(QT_ICU)/$(SHARED_PREFIX)icuuc$(SHARED_EXT) $(DEST_DIR)
$(INSTALL_FILE) $(QT_ICU)/$(SHARED_PREFIX)icudata$(SHARED_EXT) $(DEST_DIR)
$(INSTALL_FILE) $(QT_ICU)/$(SHARED_PREFIX)icui18n$(SHARED_EXT) $(DEST_DIR)
endif

$(INSTALL_DIR) $(QT_PLUGINS)/bearer $(DEST_DIR)
$(INSTALL_DIR) $(QT_PLUGINS)/imageformats $(DEST_DIR)
$(INSTALL_DIR) $(QT_PLUGINS)/mediaservice $(DEST_DIR)
$(INSTALL_DIR) $(QT_PLUGINS)/platforms $(DEST_DIR)
$(INSTALL_DIR) $(QT_PLUGINS)/playlistformats $(DEST_DIR)
$(INSTALL_DIR) $(QT_PLUGINS)/printsupport $(DEST_DIR)

ifeq ($(PLATFORM),win)
rm -f $(DEST_DIR)/**/*.pdb
endif

mkdir -p $(DEST_DIR)/dictionaries
$(INSTALL_DIR) $(DICT_DIR)/* $(DEST_DIR)/dictionaries
$(INSTALL_DIR) common/package/fonts $(DEST_DIR)

$(INSTALL_FILE) ../core/Common/3dParty/cef/$(TARGET)/build/* $(DEST_DIR)
$(INSTALL_FILE) common/loginpage/deploy/index.html $(DEST_DIR)

mkdir -p $(DEST_EDITOR_DIR)
$(INSTALL_FILE) $(WEBAPPS_DIR)/* $(DEST_EDITOR_DIR)
$(INSTALL_FILE) common/loginpage/addon/externalcloud.json $(DEST_EDITOR_DIR)

mkdir -p $(DEST_PLUGINS_DIR)

$(INSTALL_FILE) $(DE_PLUGINS) $(DEST_PLUGINS_DIR)

mv $(DEST_PLUGINS_DIR)/clipart $(DEST_PLUGINS_DIR)/{F5BACB61-64C5-4711-AC8A-D01EC3B2B6F1}
mv $(DEST_PLUGINS_DIR)/code $(DEST_PLUGINS_DIR)/{BE5CBF95-C0AD-4842-B157-AC40FEDD9841}
mv $(DEST_PLUGINS_DIR)/macros $(DEST_PLUGINS_DIR)/{E6978D28-0441-4BD7-8346-82FAD68BCA3B}
mv $(DEST_PLUGINS_DIR)/ocr $(DEST_PLUGINS_DIR)/{440EBF13-9B19-4BD8-8621-05200E58140B}
mv $(DEST_PLUGINS_DIR)/photoeditor $(DEST_PLUGINS_DIR)/{DA2BB87B-9F03-4160-8411-3AB4A5C71C39}
mv $(DEST_PLUGINS_DIR)/symboltable $(DEST_PLUGINS_DIR)/{03C18A8D-8E01-444A-86EB-EDDFA7773157}
mv $(DEST_PLUGINS_DIR)/synonim $(DEST_PLUGINS_DIR)/{BE5CBF95-C0AD-4842-B157-AC40FEDD9840}
mv $(DEST_PLUGINS_DIR)/translate $(DEST_PLUGINS_DIR)/{7327FC95-16DA-41D9-9AF2-0E7F449F687D}
mv $(DEST_PLUGINS_DIR)/youtube $(DEST_PLUGINS_DIR)/{38E022EA-AD92-45FC-B22B-49DF39746DB4}

$(INSTALL_DIR) \
$(UI_PLUGINS_DIR)/{8D67F3C5-7736-4BAE-A0F2-8C7127DC4BB8} \
$(DEST_PLUGINS_DIR)

ifeq ($(END2END_ENCRYPT),true)
$(INSTALL_DIR) \
$(UI_PLUGINS_DIR)/encrypt/ui/common/{14A8FC87-8E26-4216-B34E-F27F053B2EC4} \
$(DEST_PLUGINS_DIR)

$(INSTALL_DIR) \
$(UI_PLUGINS_DIR)/encrypt/ui/engine/blockchain/{B17BDC61-59FC-41A7-A471-CD2C415A665E} \
$(DEST_PLUGINS_DIR)
endif

$(INSTALL_DIR) common/converter $(DEST_DIR)
$(INSTALL_FILE) $(CORE_LIB_DIR)/$(SHARED_PREFIX)graphics$(SHARED_EXT) $(DEST_CONV_DIR)
$(INSTALL_FILE) $(CORE_LIB_DIR)/$(SHARED_PREFIX)kernel$(SHARED_EXT) $(DEST_CONV_DIR)
$(INSTALL_FILE) $(CORE_LIB_DIR)/$(SHARED_PREFIX)DjVuFile$(SHARED_EXT) $(DEST_CONV_DIR)
$(INSTALL_FILE) $(CORE_LIB_DIR)/$(SHARED_PREFIX)doctrenderer$(SHARED_EXT) $(DEST_CONV_DIR)
$(INSTALL_FILE) $(CORE_LIB_DIR)/$(SHARED_PREFIX)HtmlFile$(SHARED_EXT) $(DEST_CONV_DIR)
$(INSTALL_FILE) $(CORE_LIB_DIR)/$(SHARED_PREFIX)HtmlRenderer$(SHARED_EXT) $(DEST_CONV_DIR)
$(INSTALL_FILE) $(CORE_LIB_DIR)/$(SHARED_PREFIX)PdfReader$(SHARED_EXT) $(DEST_CONV_DIR)
$(INSTALL_FILE) $(CORE_LIB_DIR)/$(SHARED_PREFIX)PdfWriter$(SHARED_EXT) $(DEST_CONV_DIR)
$(INSTALL_FILE) $(CORE_LIB_DIR)/$(SHARED_PREFIX)XpsFile$(SHARED_EXT) $(DEST_CONV_DIR)
$(INSTALL_FILE) $(CORE_LIB_DIR)/$(SHARED_PREFIX)UnicodeConverter$(SHARED_EXT) $(DEST_CONV_DIR)

$(INSTALL_FILE) ../core/Common/3dParty/icu/$(TARGET)/build/$(SHARED_PREFIX)*$(SHARED_EXT) $(DEST_CONV_DIR)

$(INSTALL_FILE) $(CORE_BIN_DIR)/x2t$(EXEC_EXT) $(DEST_CONV_DIR)

uninstall:
rm -fr $(DEST_DIR)
Binary file added common/converter/empty/cs-CZ/new.docx
Binary file not shown.
Binary file added common/converter/empty/cs-CZ/new.pptx
Binary file not shown.
Binary file added common/converter/empty/cs-CZ/new.xlsx
Binary file not shown.
Binary file added common/converter/empty/de-DE/new.docx
Binary file not shown.
Binary file added common/converter/empty/de-DE/new.pptx
Binary file not shown.
Binary file added common/converter/empty/de-DE/new.xlsx
Binary file not shown.
Binary file added common/converter/empty/es-ES/new.docx
Binary file not shown.
Binary file added common/converter/empty/es-ES/new.pptx
Binary file not shown.
Binary file added common/converter/empty/es-ES/new.xlsx
Binary file not shown.
Binary file added common/converter/empty/fr-FR/new.docx
Binary file not shown.
Binary file added common/converter/empty/fr-FR/new.pptx
Binary file not shown.
Binary file added common/converter/empty/fr-FR/new.xlsx
Binary file not shown.
Binary file added common/converter/empty/in_new.docx
Binary file not shown.
Binary file added common/converter/empty/in_new.pptx
Binary file not shown.
Binary file added common/converter/empty/in_new.xlsx
Binary file not shown.
Binary file added common/converter/empty/it-IT/new.docx
Binary file not shown.
Binary file added common/converter/empty/it-IT/new.pptx
Binary file not shown.
Binary file added common/converter/empty/it-IT/new.xlsx
Binary file not shown.
Binary file added common/converter/empty/mm_new.docx
Binary file not shown.
Binary file added common/converter/empty/mm_new.pptx
Binary file not shown.
Binary file added common/converter/empty/mm_new.xlsx
Binary file not shown.
Binary file added common/converter/empty/pt-BR/new.docx
Binary file not shown.
Binary file added common/converter/empty/pt-BR/new.pptx
Binary file not shown.
Binary file added common/converter/empty/pt-BR/new.xlsx
Binary file not shown.
Binary file added common/converter/empty/ru-RU/new.docx
Binary file not shown.
Binary file added common/converter/empty/ru-RU/new.pptx
Binary file not shown.
Binary file added common/converter/empty/ru-RU/new.xlsx
Binary file not shown.
34 changes: 34 additions & 0 deletions common/loginpage/addon/externalcloud.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[
{
"id": "asc",
"name" : "ONLYOFFICE",
"check" : {
"url":"/api/2.0/capabilities.json"
},
"editorPage" : "/products/files/doceditor.aspx",
"cryptoSupport" : "true"
},
{
"id": "ownc",
"name" : "ownCloud",
"check" : {
"url": "status.php"
},
"editorPage" : "/apps/onlyoffice/",
"installLink" : "https://marketplace.owncloud.com/apps/onlyoffice",
"cryptoSupport" : "true"
},
{
"id": "nextc",
"name" : "Nextcloud",
"editorPage" : "/apps/onlyoffice/",
"installLink" : "https://apps.nextloud.com/apps/onlyoffice",
"check": {
"url": "status.php",
"headers": {
"OCS-APIREQUEST":"true"
}
},
"cryptoSupport" : "true"
}
]
19 changes: 14 additions & 5 deletions common/loginpage/build/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ module.exports = function(grunt) {

grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-uglify-es');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-htmlmin');
grunt.loadNpmTasks('grunt-text-replace');
grunt.loadNpmTasks('grunt-inline');

function doRegisterInitializeAppTask(name, appName, configFile) {
return grunt.registerTask('init-build-' + name, 'Initialize build ' + appName, function(){
Expand Down Expand Up @@ -94,11 +95,11 @@ module.exports = function(grunt) {
separate_target: {
options: {
mangle: {
sort: true
// sort: true
}
},
files: {
'../src/dlglogin.min.js' : ['../src/dlglogin.js']
'../src/dlglogin.min.js' : ['../src/dlglogin.js','../src/dialogconnect.js']
}
},
my_target: {
Expand All @@ -121,6 +122,13 @@ module.exports = function(grunt) {
}
},

inline: {
dist: {
src: '../deploy/index.html',
dest: '../deploy/index.html'
}
},

clean: {
options: {
force: true
Expand All @@ -142,7 +150,7 @@ module.exports = function(grunt) {
return '<style type="text/css">' + css + '</style>';
}
},{
from: /(\<script\s[^\>]+replace[^\>]+"([\w\.]+\.js)\"\>\<\/script\>)/g,
from: /(\<script\s[^\>]+replace[^\>]+"([\w\S\.]+\.js)\"\>\<\/script\>)/g,
to: function(matchedWord, index, fullText, regexMatches) {
if (!grunt.file.exists('../deploy/' + regexMatches[1])) {
grunt.log.error().writeln('file does not exists: ' + regexMatches[1]);
Expand All @@ -162,6 +170,7 @@ module.exports = function(grunt) {

doRegisterInitializeAppTask('startpage', 'Desktop start page', 'startpage.json');

grunt.registerTask('deploy-desktop-startpage', ['desktop-app-extra', 'copy', 'less', 'uglify:separate_target', 'concat', 'clean', 'uglify', 'htmlmin', 'compile-html']);
grunt.registerTask('deploy-desktop-startpage', ['desktop-app-extra', 'copy', 'less', 'uglify:separate_target',
'concat', 'clean', 'inline', 'uglify', 'htmlmin', 'compile-html']);
grunt.registerTask('default', ['init-build-startpage','deploy-desktop-startpage']);
};
5 changes: 3 additions & 2 deletions common/loginpage/build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
"private": true,
"dependencies": {
"lodash": "^4.0.0",
"grunt": "0.4.5",
"grunt": "1.0.2",
"grunt-text-replace": "0.4.0",
"grunt-contrib-less": "^1.1.0",
"grunt-contrib-clean": "^0.6.0",
"grunt-contrib-copy": "^0.8.0",
"grunt-contrib-uglify": "^0.11.0",
"grunt-contrib-concat": "^0.5.1",
"grunt-contrib-htmlmin": "^0.6.0"
"grunt-contrib-htmlmin": "^0.6.0",
"grunt-inline": "0.3.4"
}
}
6 changes: 6 additions & 0 deletions common/loginpage/build/startpage.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
"src": ["*.js"],
"dest": "../deploy/"
},
{
"src": "../vendor/bootstrap-select/dist/js/bootstrap-select.min.js",
"dest": "../deploy/bs-select.min.js"
},
{
"expand": true,
"cwd": "../src/",
Expand Down Expand Up @@ -60,6 +64,8 @@
,"../src/panelconnect.js"
,"../src/panelabout.js"
,"../src/panelwelcome.js"
,"../src/panelsettings.js"
,"../src/panelexternal.js"
,"../src/dlglogin.min.js"
,"../src/panels.js"
],
Expand Down
80 changes: 3 additions & 77 deletions common/loginpage/deploy/index.html

Large diffs are not rendered by default.

Binary file added common/loginpage/res/img/connect1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/loginpage/res/img/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/loginpage/res/img/connect2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/loginpage/res/img/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/loginpage/res/img/connect3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/loginpage/res/img/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions common/loginpage/res/img/logo_nextcloud.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit ee1d496

Please sign in to comment.