Compare commits

...

72 Commits

Author SHA1 Message Date
1a70ce90f9 Allow 32-bit msi only on 32-bit system (#621) 2023-02-10 17:34:31 +05:00
b7aa164ed8 Update hard-coded version to v7.3.3 2023-02-08 08:35:15 +00:00
ce60b83e65 Update win appcast generation (#619) 2023-02-08 13:27:22 +05:00
0de3c26200 Update hard-coded version to v7.3.1 2023-02-02 08:08:32 +00:00
f5539cf79f Fix build (ninja missing) 2023-02-02 09:56:09 +03:00
a0bdca62b5 Disable unused modules 2023-02-01 23:27:47 +03:00
6efb0cfccf Merge pull request #613 from ONLYOFFICE/release/v7.3.0
Merge release/v7.3.0 into hotfix/v7.3.0
2023-02-01 12:35:24 +05:00
19ac16ff62 Fix DesktopEditorsHelp installer build [2] (#612)
* Fix DesktopEditorsHelp installer build

* Small fix
2023-02-01 12:29:54 +05:00
468f1788b8 Add support no tls version socket.io 2023-01-31 22:58:47 +05:00
36b5e1b5d7 Fix DesktopEditorsHelp installer build (#610) 2023-01-31 20:27:03 +05:00
4b50455a22 Merge branch release/v7.3.0 into master 2023-01-31 07:56:10 +00:00
5250de602c Enable DesktopEditorsHelp installer build (#608) 2023-01-30 17:39:24 +05:00
ffb88cdf57 Remove depends to python3 2023-01-28 23:45:57 +05:00
151c691af2 changed source for desktop updates info (#607) 2023-01-24 14:03:38 +05:00
9f00f08c30 Fix bug 60569 2023-01-23 10:52:50 +03:00
3e2c03d3a3 Fix ios build 2023-01-22 19:21:28 +05:00
cd1c420fae Fix typo 2023-01-22 13:38:37 +05:00
c4d592be20 Small refactoring 2023-01-22 13:29:19 +05:00
808e470b27 Add support bundle_xcframeworks flag 2023-01-22 13:26:54 +05:00
597b8a67e2 Small fix desktop packages (#606)
* Fix generate_appcast command

* Fix html changes generation
2023-01-16 19:09:44 +03:00
f21689f8dd Changed node.js version to download. 2023-01-13 12:57:17 +03:00
9bd3f170e5 Merge pull request #600 from ONLYOFFICE/fix/bug58644
Fix bug 58644
2023-01-11 16:12:34 +03:00
34e9c614b8 Fix desktop macos build (#601) 2023-01-11 15:50:02 +03:00
960db59935 Update markdownlint action (#602) 2023-01-11 15:47:13 +03:00
d57efcf0fe Fix bug 58644 2023-01-10 14:32:19 +03:00
d8ac434e7e Fix desktop macos build (#596)
* Fix curl follow redirects

* Build sparkle updates for success dmg build
2022-12-29 19:08:28 +03:00
6907fadce3 Merge branch hotfix/v7.2.2 into release/v7.3.0 2022-12-27 14:42:26 +00:00
fc05ba6f4d Optimize linux build targets (#593)
* Small fix

* Optimize linux build targets

* Fix linux deploy targets

* Small fix

* Small fix
2022-12-27 00:00:55 +03:00
3c6d7edea0 Fix desktop macos build (#592)
* Fix uploads

* Fix sh args

* Fix macos build

* Small fix

* Small fix
2022-12-26 17:13:11 +03:00
908f2efd43 Fix typo (#591) 2022-12-25 23:33:19 +03:00
329ba4a62d Small fix (#589) 2022-12-23 22:48:44 +03:00
feac842b8a Refactoring package scripts (#587)
* Refactoring logs

* Refactoring packages

* Small fix
2022-12-23 20:08:53 +03:00
2916e4e625 Update hard-coded version to v7.3.0 2022-12-22 08:44:30 +00:00
d758cd1e7d Merge branch hotfix/v7.2.2 into master 2022-12-20 07:54:28 +00:00
b8bee2a9fe Fix package build (#585) 2022-12-19 13:56:18 +03:00
25b6af331e Update version file 2022-12-16 21:22:40 +03:00
65e9994963 [ios] Fix Info.plist for xcframework 2022-12-16 19:32:05 +03:00
cd8ced38f2 Build SocketRocket as xcframework 2022-12-16 19:31:35 +03:00
f6e35f7250 Add packages upload s3 endpoint url option (#584) 2022-12-15 15:04:55 +03:00
29299704aa Fix msi build (#583) 2022-12-12 18:22:48 +03:00
ba5a532da0 Temporary remove project from linux_arm64 build 2022-12-09 11:24:12 +03:00
ab838ae3ba Merge branch 'hotfix/v7.2.2' into release/v7.3.0 2022-12-08 20:41:56 +03:00
4dedb18137 Add new app for core 2022-12-07 14:48:26 +03:00
0c18cbc758 Fix android build 2022-12-06 22:27:48 +03:00
c012a8045f Disable precompiled headers for mobile arches 2022-12-06 19:48:51 +03:00
536b64a63d Fix package reports (#581) 2022-12-06 19:36:49 +03:00
6b6b91c083 Add socketio library checkout 2022-12-06 17:06:14 +03:00
d4cd2d83d4 Fix package build (#580) 2022-12-03 16:04:40 +03:00
606b73d92f Fixes from hotfix (#579) 2022-12-02 15:27:45 +03:00
75543fe126 Fix package build (#578) 2022-12-01 14:45:20 +03:00
41e5f53c45 Fix package upload (#577) 2022-12-01 01:18:26 +03:00
626efceaee Fix package upload (#576) 2022-11-30 21:00:15 +03:00
9d0596089d Update package upload (#575)
* Update package upload

* Small fix
2022-11-30 19:31:32 +03:00
9d17f14fbb Fix run developer docker 2022-11-29 11:30:05 +03:00
2c407117dd Fix previous commit 2022-11-23 14:02:27 +03:00
6667c03ff6 Merge pull request #571 from ONLYOFFICE/feature/pdffile
Feature/pdffile
2022-11-22 20:56:23 +03:00
91b75fcae5 Merge remote-tracking branch 'origin/release/v7.3.0' into feature/pdffile 2022-11-22 16:49:27 +03:00
048a54716f Merge pull request #570 from ONLYOFFICE/feature/refactoringX2T
Fix build
2022-11-22 14:43:04 +03:00
a12f5dba9f Fix build 2022-11-18 22:20:17 +03:00
1269d0234d Add ASCC_REG_PREFIX substitution (#554) 2022-11-08 10:20:55 +02:00
62a8e2f72a PdfFile instead of PdfReader and PdfWriter 2022-11-08 09:41:57 +03:00
998daaa8d0 Merge pull request #552 from ONLYOFFICE/release/v7.3.0
Release/v7.3.0
2022-11-05 12:58:07 +03:00
c1f7e8f471 Merge branch hotfix/v7.2.1 into master 2022-10-20 13:04:51 +00:00
fe098a7ee7 Add desktop help installer build / Fix bug 58536 (#541) 2022-10-18 18:33:27 +03:00
aced6c5119 Fix server document-templates files (#540) 2022-10-18 16:58:24 +03:00
94cd21189e Merge branch release/v7.2.0 into hotfix/v7.2.1 2022-10-12 12:26:08 +00:00
4e07941e7a Merge branch release/v7.2.0 into master 2022-10-12 12:26:02 +00:00
a2fcf85e3b Add move_dir method 2022-10-12 10:12:38 +03:00
e830cb9141 Add embed worker to deploy 2022-10-04 15:27:07 +03:00
9bf3985fb2 Fix notes_dst variable (#533) 2022-10-03 11:49:59 +03:00
59ad11b0f4 Update hard-coded version to v7.2.1 2022-09-29 13:14:56 +00:00
ca7d92703e Keep desktop local help for windows xp (#532) 2022-09-29 14:53:39 +03:00
31 changed files with 892 additions and 660 deletions

View File

@ -1,15 +1,18 @@
name: check
on: [push]
name: Markdown check
on:
workflow_dispatch:
push:
paths:
- '*.md'
- 'develop/*.md'
jobs:
markdownlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 12
uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: DavidAnson/markdownlint-cli2-action@v9
with:
node-version: 12
- name: Check *.md files by `markdownlint`
run: |
npm install -g markdownlint-cli
markdownlint *.md develop/*.md
globs: '*.md,develop/*.md'
separator: ','

View File

@ -37,16 +37,14 @@ addSubProject(network, $$CORE_ROOT_DIR/Common/Network/network.pro,\
kernel unicodeconverter)
addSubProject(graphics, $$CORE_ROOT_DIR/DesktopEditor/graphics/pro/graphics.pro,\
kernel unicodeconverter)
addSubProject(pdfwriter, $$CORE_ROOT_DIR/PdfWriter/PdfWriter.pro,\
addSubProject(pdffile, $$CORE_ROOT_DIR/PdfFile/PdfFile.pro,\
kernel unicodeconverter graphics)
addSubProject(djvufile, $$CORE_ROOT_DIR/DjVuFile/DjVuFile.pro,\
kernel unicodeconverter graphics pdfwriter)
kernel unicodeconverter graphics pdffile)
addSubProject(xpsfile, $$CORE_ROOT_DIR/XpsFile/XpsFile.pro,\
kernel unicodeconverter graphics pdfwriter)
kernel unicodeconverter graphics pdffile)
addSubProject(htmlrenderer, $$CORE_ROOT_DIR/HtmlRenderer/htmlrenderer.pro,\
kernel unicodeconverter graphics pdfwriter)
addSubProject(pdfreader, $$CORE_ROOT_DIR/PdfReader/PdfReader.pro,\
kernel unicodeconverter graphics pdfwriter htmlrenderer)
kernel unicodeconverter graphics)
addSubProject(docxrenderer, $$CORE_ROOT_DIR/DocxRenderer/DocxRenderer.pro,\
kernel unicodeconverter graphics)
addSubProject(htmlfile2, $$CORE_ROOT_DIR/HtmlFile2/HtmlFile2.pro,\
@ -58,22 +56,26 @@ addSubProject(fb2file, $$CORE_ROOT_DIR/Fb2File/Fb2File.pro,\
addSubProject(epubfile, $$CORE_ROOT_DIR/EpubFile/CEpubFile.pro,\
kernel unicodeconverter graphics htmlfile2)
!no_x2t {
addSubProject(docxformat, $$CORE_ROOT_DIR/Common/DocxFormat/DocxFormatLib/DocxFormatLib.pro)
addSubProject(pptxformat, $$CORE_ROOT_DIR/ASCOfficePPTXFile/PPTXLib/Linux/PPTXFormatLib/PPTXFormatLib.pro)
addSubProject(docxfile, $$CORE_ROOT_DIR/ASCOfficeDocxFile2/Linux/ASCOfficeDocxFile2Lib.pro)
addSubProject(txtxmlformat, $$CORE_ROOT_DIR/ASCOfficeTxtFile/TxtXmlFormatLib/Linux/TxtXmlFormatLib.pro)
addSubProject(rtfformat, $$CORE_ROOT_DIR/ASCOfficeRtfFile/RtfFormatLib/Linux/RtfFormatLib.pro)
addSubProject(pptformat, $$CORE_ROOT_DIR/ASCOfficePPTFile/PPTFormatLib/Linux/PPTFormatLib.pro)
addSubProject(docformat, $$CORE_ROOT_DIR/ASCOfficeDocFile/DocFormatLib/Linux/DocFormatLib.pro)
addSubProject(odffilereader,$$CORE_ROOT_DIR/ASCOfficeOdfFile/linux/OdfFileReaderLib.pro)
addSubProject(odffilewriter,$$CORE_ROOT_DIR/ASCOfficeOdfFileW/linux/OdfFileWriterLib.pro)
addSubProject(xlsformat, $$CORE_ROOT_DIR/ASCOfficeXlsFile2/source/linux/XlsFormatLib.pro)
addSubProject(xlsbformat, $$CORE_ROOT_DIR/Common/DocxFormat/DocxFormatLib/XlsbFormatLib.pro)
addSubProject(vbaformat, $$CORE_ROOT_DIR/ASCOfficeXlsFile2/source/linux/VbaFormatLib.pro)
addSubProject(cfcpp, $$CORE_ROOT_DIR/Common/cfcpp/cfcpp.pro)
addSubProject(x2t, $$CORE_ROOT_DIR/X2tConverter/build/Qt/X2tConverter.pro,\
docxformat pptxformat docxfile txtxmlformat rtfformat pptformat docformat odffilereader odffilewriter xlsformat xlsbformat fb2file epubfile docxrenderer)
addSubProject(docxformat, $$CORE_ROOT_DIR/OOXML/Projects/Linux/DocxFormatLib/DocxFormatLib.pro)
addSubProject(pptxformat, $$CORE_ROOT_DIR/OOXML/Projects/Linux/PPTXFormatLib/PPTXFormatLib.pro)
addSubProject(xlsbformat, $$CORE_ROOT_DIR/OOXML/Projects/Linux/XlsbFormatLib/XlsbFormatLib.pro)
addSubProject(docformat, $$CORE_ROOT_DIR/MsBinaryFile/Projects/DocFormatLib/Linux/DocFormatLib.pro)
addSubProject(pptformat, $$CORE_ROOT_DIR/MsBinaryFile/Projects/PPTFormatLib/Linux/PPTFormatLib.pro)
addSubProject(xlsformat, $$CORE_ROOT_DIR/MsBinaryFile/Projects/XlsFormatLib/Linux/XlsFormatLib.pro)
addSubProject(vbaformat, $$CORE_ROOT_DIR/MsBinaryFile/Projects/VbaFormatLib/Linux/VbaFormatLib.pro)
addSubProject(txtxmlformat, $$CORE_ROOT_DIR/TxtFile/Projects/Linux/TxtXmlFormatLib.pro)
addSubProject(rtfformat, $$CORE_ROOT_DIR/RtfFile/Projects/Linux/RtfFormatLib.pro)
addSubProject(odffile, $$CORE_ROOT_DIR/OdfFile/Projects/Linux/OdfFormatLib.pro)
addSubProject(cfcpp, $$CORE_ROOT_DIR/Common/cfcpp/cfcpp.pro)
addSubProject(bindocument, $$CORE_ROOT_DIR/OOXML/Projects/Linux/BinDocument/BinDocument.pro)
addSubProject(x2t, $$CORE_ROOT_DIR/X2tConverter/build/Qt/X2tConverter.pro,\
docxformat pptxformat xlsbformat docformat pptformat xlsformat vbaformat txtxmlformat rtfformat odffile cfcpp bindocument fb2file epubfile docxrenderer)
}
!no_use_common_binary {
addSubProject(allfontsgen, $$CORE_ROOT_DIR/DesktopEditor/AllFontsGen/AllFontsGen.pro,\
kernel unicodeconverter graphics)
@ -82,9 +84,13 @@ addSubProject(epubfile, $$CORE_ROOT_DIR/EpubFile/CEpubFile.pro,\
addSubProject(docbuilder, $$CORE_ROOT_DIR/DesktopEditor/doctrenderer/app_builder/docbuilder.pro,\
kernel unicodeconverter graphics doctrenderer)
}
!no_tests {
addSubProject(standardtester, $$CORE_ROOT_DIR/Test/Applications/StandardTester/standardtester.pro)
addSubProject(x2ttester, $$CORE_ROOT_DIR/Test/Applications/x2tTester/x2ttester.pro)
#TODO:
!linux_arm64:addSubProject(ooxml_crypt, $$CORE_ROOT_DIR/OfficeCryptReader/ooxml_crypt/ooxml_crypt.pro)
}
core_and_multimedia {
@ -97,7 +103,7 @@ desktop {
addSubProject(ooxmlsignature, $$CORE_ROOT_DIR/DesktopEditor/xmlsec/src/ooxmlsignature.pro,\
kernel unicodeconverter graphics)
addSubProject(documentscore, $$ROOT_DIR/desktop-sdk/ChromiumBasedEditors/lib/ascdocumentscore.pro,\
kernel unicodeconverter graphics hunspell ooxmlsignature htmlrenderer pdfwriter pdfreader djvufile xpsfile)
kernel unicodeconverter graphics hunspell ooxmlsignature htmlrenderer pdffile djvufile xpsfile)
addSubProject(documentscore_helper, $$ROOT_DIR/desktop-sdk/ChromiumBasedEditors/lib/ascdocumentscore_helper.pro,\
documentscore)
!core_mac {

View File

@ -5,6 +5,8 @@ RUN apt-get update -y && \
openjdk-11-jdk -y \
npm -y && \
npm install -g grunt-cli -y && \
ln -s /usr/bin/python3 /usr/bin/python && \
ln -s /usr/bin/pip3 /usr/bin/pip && \
git clone --depth 1 https://github.com/ONLYOFFICE/build_tools.git var/www/onlyoffice/documentserver/build_tools && \
sed -i '/documentserver-static-gzip.sh ${ONLYOFFICE_DATA_CONTAINER}/d' /app/ds/run-document-server.sh && \
rm -rf /var/lib/apt/lists/*

View File

@ -75,7 +75,7 @@ if config.check_option("module", "desktop"):
if "windows" == base.host_platform():
config.extend_option("config", "updmodule")
config.extend_option("qmake_addon", "LINK=https://download.onlyoffice.com/install/desktop/editors/windows/onlyoffice/appcast.xml")
config.extend_option("qmake_addon", "LINK=https://download.onlyoffice.com/install/desktop/editors/windows/onlyoffice/appcast.json")

View File

@ -31,7 +31,7 @@ common.sign = "sign" in args.targets
common.deploy = "deploy" in args.targets
common.version = args.version if (args.version is not None) else utils.get_env("PRODUCT_VERSION", "1.0.0")
common.build = args.build if (args.build is not None) else utils.get_env("BUILD_NUMBER", "1")
common.release_branch = utils.get_env("RELEASE_BRANCH", "experimental")
common.channel = utils.get_env("BUILD_CHANNEL", "other")
common.branding = args.branding
common.timestamp = utils.get_timestamp()
common.summary = []

View File

@ -175,6 +175,14 @@ def create_dir(path):
os.makedirs(path2)
return
def move_dir(src, dst):
if is_dir(dst):
delete_dir(dst)
if is_dir(src):
copy_dir(src, dst)
delete_dir(src)
return
def copy_dir(src, dst):
if is_dir(dst):
delete_dir(dst)
@ -206,6 +214,20 @@ def delete_dir(path):
def copy_lib(src, dst, name):
if (config.check_option("config", "bundle_dylibs")) and is_dir(src + "/" + name + ".framework"):
copy_dir(src + "/" + name + ".framework", dst + "/" + name + ".framework")
if (config.check_option("config", "bundle_xcframeworks")) and is_dir(src + "/simulator/" + name + ".framework"):
create_dir(dst + "/simulator")
copy_dir(src + "/simulator/" + name + ".framework", dst + "/simulator/" + name + ".framework")
cmd("xcodebuild", ["-create-xcframework",
"-framework", dst + "/" + name + ".framework",
"-framework", dst + "/simulator/" + name + ".framework",
"-output", dst + "/" + name + ".xcframework"])
delete_dir(dst + "/" + name + ".framework")
delete_dir(dst + "/simulator/" + name + ".framework")
delete_dir(dst + "/simulator")
return
lib_ext = ".so"
@ -611,6 +633,11 @@ def qt_config(platform):
if config.check_option("module", "mobile"):
config_param += " support_web_socket"
if ("ios" == platform):
config_param += " disable_precompiled_header"
if (0 == platform.find("android")):
config_param += " disable_precompiled_header"
if ("linux_arm64" == platform):
config_param += " linux_arm64"
@ -742,7 +769,7 @@ def generate_doctrenderer_config(path, root, product, vendor = ""):
file.close()
return
def generate_plist(path):
def generate_plist_framework_folder(file):
bundle_id_url = "com.onlyoffice."
if ("" != get_env("PUBLISHER_BUNDLE_ID")):
bundle_id_url = get_env("PUBLISHER_BUNDLE_ID")
@ -755,43 +782,52 @@ def generate_plist(path):
for n in bundle_version_natural:
bundle_version.append(n)
for file in glob.glob(path + "/*.framework"):
if not is_dir(file):
continue
name = os.path.basename(file)
name = name.replace(".framework", "")
name = os.path.basename(file)
name = name.replace(".framework", "")
content = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
content += "<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n"
content += "<plist version=\"1.0\">\n"
content += "<dict>\n"
content += "\t<key>CFBundleExecutable</key>\n"
content += ("\t<string>" + name + "</string>\n")
content += "\t<key>CFBundleGetInfoString</key>\n"
content += "\t<string>Created by " + bundle_creator + "</string>\n"
content += "\t<key>CFBundleIdentifier</key>\n"
content += "\t<string>" + bundle_id_url + correct_bundle_identifier(name) + "</string>\n"
content += "\t<key>CFBundlePackageType</key>\n"
content += "\t<string>FMWK</string>\n"
content += "\t<key>CFBundleShortVersionString</key>\n"
content += "\t<string>" + bundle_version[0] + "." + bundle_version[1] + "</string>\n"
content += "\t<key>CFBundleSignature</key>\n"
content += "\t<string>????</string>\n"
content += "\t<key>CFBundleVersion</key>\n"
content += "\t<string>" + bundle_version[0] + "." + bundle_version[1] + "." + bundle_version[2] + "</string>\n"
content += "\t<key>MinimumOSVersion</key>\n"
content += "\t<string>13.0</string>\n"
content += "</dict>\n"
content += "</plist>"
content = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
content += "<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n"
content += "<plist version=\"1.0\">\n"
content += "<dict>\n"
content += "\t<key>CFBundleExecutable</key>\n"
content += ("\t<string>" + name + "</string>\n")
content += "\t<key>CFBundleGetInfoString</key>\n"
content += "\t<string>Created by " + bundle_creator + "</string>\n"
content += "\t<key>CFBundleIdentifier</key>\n"
content += "\t<string>" + bundle_id_url + correct_bundle_identifier(name) + "</string>\n"
content += "\t<key>CFBundlePackageType</key>\n"
content += "\t<string>FMWK</string>\n"
content += "\t<key>CFBundleShortVersionString</key>\n"
content += "\t<string>" + bundle_version[0] + "." + bundle_version[1] + "</string>\n"
content += "\t<key>CFBundleSignature</key>\n"
content += "\t<string>????</string>\n"
content += "\t<key>CFBundleVersion</key>\n"
content += "\t<string>" + bundle_version[0] + "." + bundle_version[1] + "." + bundle_version[2] + "</string>\n"
content += "\t<key>MinimumOSVersion</key>\n"
content += "\t<string>13.0</string>\n"
content += "</dict>\n"
content += "</plist>"
fileDst = file + "/Info.plist"
if is_file(fileDst):
delete_file(fileDst)
fileDst = file + "/Info.plist"
if is_file(fileDst):
delete_file(fileDst)
fileInfo = codecs.open(fileDst, "w", "utf-8")
fileInfo.write(content)
fileInfo.close()
fileInfo = codecs.open(fileDst, "w", "utf-8")
fileInfo.write(content)
fileInfo.close()
return
def generate_plist(path):
src_folder = path
if ("/" != path[-1:]):
src_folder += "/"
src_folder += "*"
for file in glob.glob(src_folder):
if (is_dir(file)):
if file.endswith(".framework"):
generate_plist_framework_folder(file)
else:
generate_plist(file)
return
def correct_bundle_identifier(bundle_identifier):
@ -1015,14 +1051,13 @@ def mac_correct_rpath_x2t(dir):
mac_correct_rpath_library("EpubFile", ["UnicodeConverter", "kernel", "HtmlFile2", "graphics"])
mac_correct_rpath_library("Fb2File", ["UnicodeConverter", "kernel", "graphics"])
mac_correct_rpath_library("HtmlRenderer", ["UnicodeConverter", "kernel", "graphics"])
mac_correct_rpath_library("PdfWriter", ["UnicodeConverter", "kernel", "graphics", "kernel_network"])
mac_correct_rpath_library("DjVuFile", ["UnicodeConverter", "kernel", "graphics", "PdfWriter"])
mac_correct_rpath_library("PdfReader", ["UnicodeConverter", "kernel", "graphics", "PdfWriter", "HtmlRenderer"])
mac_correct_rpath_library("XpsFile", ["UnicodeConverter", "kernel", "graphics", "PdfWriter"])
mac_correct_rpath_library("PdfFile", ["UnicodeConverter", "kernel", "graphics", "kernel_network"])
mac_correct_rpath_library("DjVuFile", ["UnicodeConverter", "kernel", "graphics", "PdfFile"])
mac_correct_rpath_library("XpsFile", ["UnicodeConverter", "kernel", "graphics", "PdfFile"])
mac_correct_rpath_library("DocxRenderer", ["UnicodeConverter", "kernel", "graphics"])
cmd("chmod", ["-v", "+x", "./x2t"])
cmd("install_name_tool", ["-add_rpath", "@executable_path", "./x2t"], True)
mac_correct_rpath_binary("./x2t", ["icudata.58", "icuuc.58", "UnicodeConverter", "kernel", "kernel_network", "graphics", "PdfWriter", "HtmlRenderer", "PdfReader", "XpsFile", "DjVuFile", "HtmlFile2", "Fb2File", "EpubFile", "doctrenderer", "DocxRenderer"])
mac_correct_rpath_binary("./x2t", ["icudata.58", "icuuc.58", "UnicodeConverter", "kernel", "kernel_network", "graphics", "PdfFile", "HtmlRenderer", "XpsFile", "DjVuFile", "HtmlFile2", "Fb2File", "EpubFile", "doctrenderer", "DocxRenderer"])
if is_file("./allfontsgen"):
cmd("chmod", ["-v", "+x", "./allfontsgen"])
cmd("install_name_tool", ["-add_rpath", "@executable_path", "./allfontsgen"], True)
@ -1039,7 +1074,7 @@ def mac_correct_rpath_docbuilder(dir):
os.chdir(dir)
cmd("chmod", ["-v", "+x", "./docbuilder"])
cmd("install_name_tool", ["-add_rpath", "@executable_path", "./docbuilder"], True)
mac_correct_rpath_binary("./docbuilder", ["icudata.58", "icuuc.58", "UnicodeConverter", "kernel", "kernel_network", "graphics", "PdfWriter", "HtmlRenderer", "PdfReader", "XpsFile", "DjVuFile", "HtmlFile2", "Fb2File", "EpubFile", "doctrenderer", "DocxRenderer"])
mac_correct_rpath_binary("./docbuilder", ["icudata.58", "icuuc.58", "UnicodeConverter", "kernel", "kernel_network", "graphics", "PdfFile", "HtmlRenderer", "XpsFile", "DjVuFile", "HtmlFile2", "Fb2File", "EpubFile", "doctrenderer", "DocxRenderer"])
os.chdir(cur_dir)
return
@ -1049,9 +1084,9 @@ def mac_correct_rpath_desktop(dir):
os.chdir(dir)
mac_correct_rpath_library("hunspell", [])
mac_correct_rpath_library("ooxmlsignature", ["kernel"])
mac_correct_rpath_library("ascdocumentscore", ["UnicodeConverter", "kernel", "graphics", "kernel_network", "PdfWriter", "HtmlRenderer", "PdfReader", "XpsFile", "DjVuFile", "hunspell", "ooxmlsignature"])
mac_correct_rpath_library("ascdocumentscore", ["UnicodeConverter", "kernel", "graphics", "kernel_network", "PdfFile", "HtmlRenderer", "XpsFile", "DjVuFile", "hunspell", "ooxmlsignature"])
cmd("install_name_tool", ["-change", "@executable_path/../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework", "@rpath/Chromium Embedded Framework.framework/Chromium Embedded Framework", "libascdocumentscore.dylib"])
mac_correct_rpath_binary("./editors_helper.app/Contents/MacOS/editors_helper", ["ascdocumentscore", "UnicodeConverter", "kernel", "kernel_network", "graphics", "PdfWriter", "HtmlRenderer", "PdfReader", "XpsFile", "DjVuFile", "hunspell", "ooxmlsignature"])
mac_correct_rpath_binary("./editors_helper.app/Contents/MacOS/editors_helper", ["ascdocumentscore", "UnicodeConverter", "kernel", "kernel_network", "graphics", "PdfFile", "HtmlRenderer", "XpsFile", "DjVuFile", "hunspell", "ooxmlsignature"])
cmd("install_name_tool", ["-add_rpath", "@executable_path/../../../../Frameworks", "./editors_helper.app/Contents/MacOS/editors_helper"], True)
cmd("install_name_tool", ["-add_rpath", "@executable_path/../../../../Resources/converter", "./editors_helper.app/Contents/MacOS/editors_helper"], True)
cmd("chmod", ["-v", "+x", "./editors_helper.app/Contents/MacOS/editors_helper"])

View File

@ -5,7 +5,7 @@ import base
import os
import multiprocessing
def make_pro_file(makefiles_dir, pro_file):
def make_pro_file(makefiles_dir, pro_file, qmake_config_addon=""):
platforms = config.option("platform").split()
for platform in platforms:
if not platform in config.platforms:
@ -47,6 +47,8 @@ def make_pro_file(makefiles_dir, pro_file):
# qmake CONFIG+=...
config_param = base.qt_config(platform)
if ("" != qmake_config_addon):
config_param += (" " + qmake_config_addon)
# qmake ADDON
qmake_addon = []
@ -98,6 +100,9 @@ def make_pro_file(makefiles_dir, pro_file):
# make build.pro
def make():
make_pro_file("makefiles", "build.pro")
if config.check_option("platform", "ios") and config.check_option("config", "bundle_xcframeworks"):
make_pro_file("makefiles", "build.pro", "xcframework_platform_ios_simulator")
if config.check_option("module", "builder") and base.is_windows() and "onlyoffice" == config.branding():
# check replace
new_replace_path = base.correctPathForBuilder(os.getcwd() + "/../core/DesktopEditor/doctrenderer/docbuilder.com/src/docbuilder.h")

View File

@ -31,6 +31,7 @@ def write_version_files(output_dir):
# parse configuration
config.parse()
config.parse_defaults()
config.extend_option("jsminimize", "0")
branding = config.option("branding-name")

View File

@ -111,6 +111,10 @@ def parse():
if not "arm64-toolchain-bin" in options:
options["arm64-toolchain-bin"] = "/usr/bin"
if check_option("config", "bundle_xcframeworks"):
if not check_option("config", "bundle_dylibs"):
extend_option("config", "bundle_dylibs")
return
def check_compiler(platform):

View File

@ -43,9 +43,10 @@ def make():
hunspell.make(False)
harfbuzz.make()
glew.make()
hyphen.make()
hyphen.make()
if config.check_option("module", "mobile"):
curl.make()
if (config.check_option("platform", "android")):
curl.make()
websocket.make()
return

View File

@ -101,9 +101,15 @@ def make():
base.copy_files(directory_build + "/linux_arm64/*.a", directory_build)
if (-1 != config.option("platform").find("ios")) and not base.is_dir("../build/ios"):
old_cur2 = os.getcwd()
clang_correct()
os.chdir("../")
base.bash("./boost_ios")
os.chdir(old_cur2)
if (-1 != config.option("platform").find("ios")) and not base.is_dir("../build/ios_xcframework"):
boost_qt.make(os.getcwd(), ["filesystem", "system", "date_time", "regex"], "ios_xcframework/ios_simulator", "xcframework_platform_ios_simulator")
boost_qt.make(os.getcwd(), ["filesystem", "system", "date_time", "regex"], "ios_xcframework/ios")
if (-1 != config.option("platform").find("android")) and not base.is_dir("../build/android"):
boost_qt.make(os.getcwd(), ["filesystem", "system", "date_time", "regex"])

View File

@ -7,7 +7,7 @@ import base
import os
import build
def make(src_dir, modules, build_platform="android"):
def make(src_dir, modules, build_platform="android", qmake_addon=""):
old_cur = os.getcwd()
print("boost-headers...")
@ -43,7 +43,7 @@ def make(src_dir, modules, build_platform="android"):
pro_file_content.append("DESTDIR = $$BOOST_SOURCES/../build/" + build_platform + "/lib/$$CORE_BUILDS_PLATFORM_PREFIX")
base.save_as_script(module_dir + "/" + module + ".pro", pro_file_content)
os.chdir(module_dir)
build.make_pro_file("./", module + ".pro")
build.make_pro_file("./", module + ".pro", qmake_addon)
os.chdir(old_cur)
return

View File

@ -0,0 +1,44 @@
#!/usr/bin/env python
import sys
sys.path.append('../..')
import config
import base
import os
import subprocess
import glob
def correct_namespace(dir):
folder = dir
if ("/" != folder[-1:]):
folder += "/"
folder += "*"
for file in glob.glob(folder):
if base.is_file(file):
base.replaceInFile(file, "namespace sio", "namespace sio_no_tls")
base.replaceInFile(file, "asio::", "asio_no_tls::")
base.replaceInFile(file, "sio::", "sio_no_tls::")
base.replaceInFile(file, "asio_no_tls::", "asio::")
elif base.is_dir(file):
correct_namespace(file)
return
def make():
base_dir = base.get_script_dir() + "/../../core/Common/3dParty/socketio"
if not base.is_dir(base_dir + "/socket.io-client-cpp"):
base.cmd_in_dir(base_dir, "git", ["clone", "https://github.com/socketio/socket.io-client-cpp.git"])
base.cmd_in_dir(base_dir + "/socket.io-client-cpp", "git", ["submodule", "init"])
base.cmd_in_dir(base_dir + "/socket.io-client-cpp", "git", ["submodule", "update"])
# no tls realization (remove if socket.io fix this)
dst_dir = base_dir + "/socket.io-client-cpp/src_no_tls"
base.copy_dir(base_dir + "/socket.io-client-cpp/src", dst_dir)
correct_namespace(dst_dir)
base.replaceInFile(dst_dir + "/internal/sio_client_impl.h", "SIO_TLS", "SIO_TLS_NO")
base.replaceInFile(dst_dir + "/internal/sio_client_impl.cpp", "SIO_TLS", "SIO_TLS_NO")
base.replaceInFile(dst_dir + "/sio_socket.h", "SIO_SOCKET_H", "SIO_SOCKET_NO_TLS_H")
base.replaceInFile(dst_dir + "/sio_client.h", "SIO_CLIENT_H", "SIO_CLIENT_NO_TLS_H")
base.replaceInFile(dst_dir + "/sio_message.h", "__SIO_MESSAGE_H__", "__SIO_MESSAGE_NO_TLS_H__")
base.replaceInFile(dst_dir + "/internal/sio_packet.h", "SIO_PACKET_H", "SIO_PACKET_NO_TLS_H")
return

View File

@ -10,13 +10,17 @@ import config
current_dir = base.get_script_dir() + "/../../core/Common/3dParty/socketrocket"
def buildIOS():
# Build for iphone
base.cmd("xcodebuild", ["archive", "-project", current_dir + "/SocketRocket.xcodeproj", "-scheme", "SocketRocket", "-archivePath", current_dir + "/build/SocketRocket-devices.xcarchive", "-sdk", "iphoneos", "ENABLE_BITCODE=NO", "BUILD_LIBRARY_FOR_DISTRIBUTION=YES", "SKIP_INSTALL=NO"])
base.cmd("xcodebuild", ["-sdk", "iphoneos", "BITCODE_GENERATION_MODE = bitcode", "ENABLE_BITCODE = YES", "OTHER_CFLAGS = -fembed-bitcode", "-configuration", "Release"])
# Build for simulator
base.cmd("xcodebuild", ["archive", "-project", current_dir + "/SocketRocket.xcodeproj", "-scheme", "SocketRocket", "-archivePath", current_dir + "/build/SocketRocket-simulators.xcarchive", "-sdk", "iphonesimulator", "ENABLE_BITCODE=NO", "BUILD_LIBRARY_FOR_DISTRIBUTION=YES", "SKIP_INSTALL=NO"])
base.cmd("xcodebuild", ["-sdk", "iphonesimulator", "BITCODE_GENERATION_MODE = bitcode", "ENABLE_BITCODE = YES", "OTHER_CFLAGS = -fembed-bitcode", "-configuration", "Release"])
# Package xcframework
base.cmd("xcodebuild", ["-create-xcframework", "-library", current_dir + "/build/SocketRocket-devices.xcarchive/Products/usr/local/lib/libSocketRocket.a", "-library", current_dir + "/build/SocketRocket-simulators.xcarchive/Products/usr/local/lib/libSocketRocket.a", "-output", current_dir + "/build/SocketRocket.xcframework"])
# Remove arm64 for simulator for SDK 14
base.cmd("lipo", ["-remove", "arm64", "-output", "build/Release-iphonesimulator/libSocketRocket.a", "build/Release-iphonesimulator/libSocketRocket.a"])

View File

@ -70,12 +70,14 @@ def make():
if not base.is_dir("v8"):
base.cmd("./depot_tools/fetch", ["v8"], True)
base.copy_dir("./v8/third_party", "./v8/third_party_new")
if ("windows" == base.host_platform()):
os.chdir("v8")
base.cmd("git", ["config", "--system", "core.longpaths", "true"])
os.chdir("../")
base.cmd("./depot_tools/gclient", ["sync", "-r", "remotes/branch-heads/8.9"], True)
base.cmd("gclient", ["sync", "--force"], True)
base.copy_dir("./v8/third_party_new/ninja", "./v8/third_party/ninja")
if ("windows" == base.host_platform()):
base.replaceInFile("v8/build/config/win/BUILD.gn", ":static_crt", ":dynamic_crt")

View File

@ -6,11 +6,13 @@ import config
import base
import ixwebsocket
import socketrocket
import socket_io
config_file = base.get_script_dir() + "/../../core/Common/WebSocket/websocket.pri"
def make():
ixwebsocket.make()
socketrocket.make()
#ixwebsocket.make()
#socketrocket.make()
socket_io.make()
return

View File

@ -36,8 +36,7 @@ def make():
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "UnicodeConverter")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "kernel_network")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "graphics")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "PdfWriter")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "PdfReader")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "PdfFile")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "DjVuFile")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "XpsFile")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "HtmlFile2")
@ -45,6 +44,7 @@ def make():
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "Fb2File")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "EpubFile")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "DocxRenderer")
base.copy_file(git_dir + "/sdkjs/pdf/src/engine/cmap.bin", root_dir + "/cmap.bin")
if ("ios" == platform):
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "x2t")

View File

@ -33,13 +33,13 @@ def make():
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, archive_dir, "HtmlRenderer")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, archive_dir, "DjVuFile")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, archive_dir, "XpsFile")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, archive_dir, "PdfReader")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, archive_dir, "PdfWriter")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, archive_dir, "PdfFile")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, archive_dir, "HtmlFile2")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, archive_dir, "UnicodeConverter")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, archive_dir, "Fb2File")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, archive_dir, "EpubFile")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, archive_dir, "DocxRenderer")
base.copy_file(git_dir + "/sdkjs/pdf/src/engine/cmap.bin", archive_dir + "/cmap.bin")
base.copy_exe(core_build_dir + "/bin/" + platform_postfix, archive_dir, "x2t")
base.copy_dir(base_dir + "/js/" + branding + "/builder/sdkjs", archive_dir + "/sdkjs")
@ -57,6 +57,7 @@ def make():
base.copy_exe(core_build_dir + "/bin/" + platform_postfix, archive_dir, "allthemesgen")
base.copy_exe(core_build_dir + "/bin/" + platform_postfix, archive_dir, "standardtester")
base.copy_exe(core_build_dir + "/bin/" + platform_postfix, archive_dir, "x2ttester")
base.copy_exe(core_build_dir + "/bin/" + platform_postfix, archive_dir, "ooxml_crypt")
if base.is_file(archive_dir + ".7z"):

View File

@ -47,8 +47,7 @@ def make():
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "kernel_network")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "UnicodeConverter")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "graphics")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "PdfWriter")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "PdfReader")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "PdfFile")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "DjVuFile")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "XpsFile")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "HtmlFile2")
@ -56,6 +55,7 @@ def make():
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "Fb2File")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "EpubFile")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "DocxRenderer")
base.copy_file(git_dir + "/sdkjs/pdf/src/engine/cmap.bin", root_dir + "/cmap.bin")
if ("ios" == platform):
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "x2t")
@ -195,7 +195,7 @@ def make():
base_dir + "/js/" + branding + "/desktop/web-apps/apps/%s/main/resources/help" % i,
root_help_dir + "/editors/web-apps/apps/%s/main/resources/help" % i)
if ("1" != config.option("preinstalled-help")):
if ("1" != config.option("preinstalled-help") and not isWindowsXP):
# remove help from install until web-apps containes help
base.delete_dir(root_dir + "/editors/web-apps/apps/documenteditor/main/resources/help")
base.delete_dir(root_dir + "/editors/web-apps/apps/presentationeditor/main/resources/help")

View File

@ -42,8 +42,7 @@ def make():
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "kernel_network")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "UnicodeConverter")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "graphics")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "PdfWriter")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "PdfReader")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "PdfFile")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "DjVuFile")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "XpsFile")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "HtmlFile2")
@ -52,23 +51,13 @@ def make():
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "Fb2File")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "EpubFile")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "DocxRenderer")
base.copy_file(git_dir + "/sdkjs/pdf/src/engine/cmap.bin", root_dir + "/cmap.bin")
if (0 == platform.find("win") or 0 == platform.find("linux") or 0 == platform.find("mac")):
base.copy_exe(core_build_dir + "/bin/" + platform_postfix, root_dir, "x2t")
else:
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "x2t")
if ("ios" == platform) and config.check_option("config", "bundle_dylibs") and config.check_option("config", "simulator"):
exclude_arch(root_dir, ["kernel", "kernel_network", "UnicodeConverter", "graphics", "PdfWriter",
"PdfReader", "DjVuFile", "XpsFile", "HtmlFile2", "HtmlRenderer", "doctrenderer",
"Fb2File", "EpubFile", "x2t"])
if ("ios" == platform):
if (config.check_option("config", "bundle_dylibs")):
base.convert_ios_framework_to_xcframework_folder(root_dir,
["kernel", "kernel_network", "UnicodeConverter", "graphics", "PdfWriter", "PdfReader", "DjVuFile", "XpsFile",
"HtmlFile2", "HtmlRenderer", "doctrenderer", "Fb2File", "EpubFile", "DocxRenderer", "x2t"])
# icu
if (0 == platform.find("win")):
base.copy_file(core_dir + "/Common/3dParty/icu/" + platform + "/build/icudt58.dll", root_dir + "/icudt58.dll")

View File

@ -75,8 +75,7 @@ def make():
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, converter_dir, "kernel_network")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, converter_dir, "UnicodeConverter")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, converter_dir, "graphics")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, converter_dir, "PdfWriter")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, converter_dir, "PdfReader")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, converter_dir, "PdfFile")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, converter_dir, "DjVuFile")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, converter_dir, "XpsFile")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, converter_dir, "HtmlFile2")
@ -85,6 +84,7 @@ def make():
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, converter_dir, "Fb2File")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, converter_dir, "EpubFile")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, converter_dir, "DocxRenderer")
base.copy_file(git_dir + "/sdkjs/pdf/src/engine/cmap.bin", converter_dir + "/cmap.bin")
base.copy_exe(core_build_dir + "/bin/" + platform_postfix, converter_dir, "x2t")
if (native_platform == "linux_64"):
@ -115,6 +115,9 @@ def make():
js_dir = root_dir
base.copy_dir(base_dir + "/js/" + branding + "/builder/sdkjs", js_dir + "/sdkjs")
base.copy_dir(base_dir + "/js/" + branding + "/builder/web-apps", js_dir + "/web-apps")
# add embed worker code
base.cmd_in_dir(git_dir + "/sdkjs/common/embed", "python", ["make.py", js_dir + "/web-apps/apps/api/documents/api.js"])
# plugins
base.create_dir(js_dir + "/sdkjs-plugins")
@ -164,8 +167,8 @@ def make():
#document-templates
document_templates_files = server_dir + '/../document-templates'
document_templates = build_server_dir + '/../document-templates'
base.create_dir(document_templates)
base.copy_dir_content(document_templates_files, document_templates, "", ".git")
base.copy_dir(document_templates_files + '/new', document_templates + '/new')
base.copy_dir(document_templates_files + '/sample', document_templates + '/sample')
#license
license_file1 = server_dir + '/LICENSE.txt'

View File

@ -908,7 +908,7 @@ def install_nodejs():
downloads_list = {
'Windows': {
'Git': 'https://github.com/git-for-windows/git/releases/download/v2.29.0.windows.1/Git-2.29.0-64-bit.exe',
'Node.js': 'https://nodejs.org/download/release/v14.17.2/node-v14.17.2-x64.msi',
'Node.js': 'https://nodejs.org/download/release/v14.17.6/node-v14.17.6-x64.msi',
'Java': 'https://javadl.oracle.com/webapps/download/AutoDL?BundleId=242990_a4634525489241b9a9e1aa73d9e118e6',
'RabbitMQ': 'https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.8.9/rabbitmq-server-3.8.9.exe',
'Erlang': 'http://erlang.org/download/otp_win64_23.1.exe',

View File

@ -9,6 +9,10 @@ company_name_l = company_name.lower()
publisher_name = "Ascensio System SIA"
cert_name = "Ascensio System SIA"
s3_bucket = "repo-doc-onlyoffice-com"
s3_region = "eu-west-1"
s3_base_url = "https://s3.eu-west-1.amazonaws.com/repo-doc-onlyoffice-com"
if utils.is_windows():
desktop_product_name = "Desktop Editors"
desktop_product_name_s = desktop_product_name.replace(" ","")
@ -18,6 +22,8 @@ if utils.is_windows():
"en": "changes",
"ru": "changes_ru"
}
desktop_changes_url = "https://download.onlyoffice.com/install/desktop/editors/windows/onlyoffice/changes"
desktop_updates_url = "https://download.onlyoffice.com/install/desktop/editors/windows/onlyoffice/updates"
if utils.is_macos():
desktop_package_name = "ONLYOFFICE"
@ -25,10 +31,11 @@ if utils.is_macos():
desktop_branding_dir = "desktop-apps/macos"
desktop_updates_dir = "build/update"
desktop_changes_dir = "ONLYOFFICE/update/updates/ONLYOFFICE/changes"
desktop_update_changes_list = {
"en": "ReleaseNotes",
"ru": "ReleaseNotesRU"
}
sparkle_base_url = "https://download.onlyoffice.com/install/desktop/editors/mac"
builder_product_name = "Document Builder"
if utils.is_linux():
desktop_make_targets = ["deb", "rpm", "suse-rpm", "tar"]
builder_make_targets = ["deb", "rpm"] # tar
server_make_targets = ["deb", "rpm", "tar"]

View File

@ -15,19 +15,32 @@ def make():
utils.log("Unsupported host OS")
return
def aws_s3_upload(local, key, ptype=None):
if common.os_family == "windows":
rc = utils.cmd(
"aws", "s3", "cp", "--acl", "public-read", "--no-progress",
local, "s3://" + common.s3_bucket + "/" + key,
verbose=True
)
else:
rc = utils.sh("aws s3 cp --acl public-read --no-progress " \
+ local + " s3://" + common.s3_bucket + "/" + key, verbose=True)
if rc == 0 and ptype is not None:
utils.add_deploy_data("builder", ptype, local, key)
return rc
def aws_s3_upload(files, key, ptype=None):
if not files:
return False
ret = True
key = "builder/" + key
for file in files:
args = ["aws"]
if hasattr(branding, "s3_endpoint_url"):
args += ["--endpoint-url=" + branding.s3_endpoint_url]
args += [
"s3", "cp", "--no-progress", "--acl", "public-read",
file, "s3://" + branding.s3_bucket + "/" + key
]
if common.os_family == "windows":
upload = utils.cmd(*args, verbose=True)
else:
upload = utils.sh(" ".join(args), verbose=True)
ret &= upload
if upload and ptype is not None:
full_key = key
if full_key.endswith("/"): full_key += utils.get_basename(file)
utils.add_deploy_data(
"builder", ptype, file, full_key,
branding.s3_bucket, branding.s3_region
)
return ret
def make_windows():
global inno_file, zip_file, suffix, key_prefix
@ -39,29 +52,24 @@ def make_windows():
source_dir = "..\\build_tools\\out\\%s\\%s\\%s" % (prefix, company, product)
package_name = company + "_" + product
package_version = common.version + "." + common.build
suffixes = {
suffix = {
"windows_x64": "x64",
"windows_x86": "x86",
"windows_x64_xp": "x64_xp",
"windows_x86_xp": "x86_xp"
}
suffix = suffixes[common.platform]
}[common.platform]
zip_file = "%s_%s_%s.zip" % (package_name, package_version, suffix)
inno_file = "%s_%s_%s.exe" % (package_name, package_version, suffix)
key_prefix = "%s/%s/windows/builder/%s/%s" % (branding.company_name_l, \
common.release_branch, common.version, common.build)
if common.clean:
utils.log_h2("builder clean")
utils.delete_dir("build")
utils.log_h1("copy arifacts")
utils.log_h2("copy arifacts")
utils.create_dir("build\\app")
utils.copy_dir_content(source_dir, "build\\app\\")
# if "builder-zip" in common.targets:
make_zip()
# if "builder-inno" in common.targets:
make_inno()
utils.set_cwd(common.workspace_dir)
@ -69,21 +77,24 @@ def make_windows():
def make_zip():
utils.log_h2("builder zip build")
utils.log_h2(zip_file)
rc = utils.cmd("7z", "a", "-y", zip_file, ".\\app\\*",
chdir="build", creates="build\\" + zip_file, verbose=True)
utils.set_summary("builder zip build", rc == 0)
utils.log_h3(zip_file)
if rc == 0:
ret = utils.cmd("7z", "a", "-y", zip_file, ".\\app\\*",
chdir="build", creates="build\\" + zip_file, verbose=True)
utils.set_summary("builder zip build", ret)
if common.deploy and ret:
utils.log_h2("builder zip deploy")
zip_key = key_prefix + "/" + zip_file
rc = aws_s3_upload("build\\" + zip_file, zip_key, "Portable")
utils.set_summary("builder zip deploy", rc == 0)
ret = aws_s3_upload(
["build\\" + zip_file], "win/generic/%s/" % common.channel, "Portable"
)
utils.set_summary("builder zip deploy", ret)
return
def make_inno():
utils.log_h2("builder inno build")
utils.log_h2(inno_file)
utils.log_h3(inno_file)
args = [
"-Arch " + suffix,
"-Version " + common.version,
@ -94,61 +105,68 @@ def make_inno():
if common.sign:
args.append("-Sign")
args.append("-CertName '%s'" % branding.cert_name)
rc = utils.ps1(".\\make_inno.ps1", args,
creates="build\\" + inno_file, verbose=True)
utils.set_summary("builder inno build", rc == 0)
ret = utils.ps1(
".\\make_inno.ps1", args, creates="build\\" + inno_file, verbose=True
)
utils.set_summary("builder inno build", ret)
if rc == 0:
if common.deploy and ret:
utils.log_h2("builder inno deploy")
inno_key = key_prefix + "/" + inno_file
rc = aws_s3_upload("build\\" + inno_file, inno_key, "Installer")
utils.set_summary("builder inno deploy", rc == 0)
ret = aws_s3_upload(
["build\\" + inno_file], "win/inno/%s/" % common.channel, "Installer"
)
utils.set_summary("builder inno deploy", ret)
return
def make_linux():
utils.set_cwd("document-builder-package")
utils.log_h2("builder clean")
rc = utils.sh("make clean", verbose=True)
utils.set_summary("builder clean", rc == 0)
utils.log_h2("builder build")
args = []
make_args = branding.builder_make_targets
if common.platform == "linux_aarch64":
args += ["-e", "UNAME_M=aarch64"]
make_args += ["-e", "UNAME_M=aarch64"]
if not branding.onlyoffice:
args += ["-e", "BRANDING_DIR=../" + common.branding + "/document-builder-package"]
rc = utils.sh("make packages " + " ".join(args), verbose=True)
utils.set_summary("builder build", rc == 0)
make_args += ["-e", "BRANDING_DIR=../" + common.branding + "/document-builder-package"]
ret = utils.sh("make clean && make " + " ".join(make_args), verbose=True)
utils.set_summary("builder build", ret)
key_prefix = branding.company_name_l + "/" + common.release_branch
if common.platform == "linux_x86_64":
rpm_arch = "x86_64"
elif common.platform == "linux_aarch64":
rpm_arch = "aarch64"
if rc == 0:
# utils.log_h2("builder tar deploy")
# tar_file = utils.glob_file("tar/*.tar.gz")
# tar_key = key_prefix + "/linux/" + utils.get_basename(tar_file)
# rc = aws_s3_upload(tar_file, tar_key, "Portable")
# utils.set_summary("builder tar deploy", rc == 0)
rpm_arch = "x86_64"
if common.platform == "linux_aarch64": rpm_arch = "aarch64"
utils.log_h2("builder deb deploy")
deb_file = utils.glob_file("deb/*.deb")
deb_key = key_prefix + "/ubuntu/" + utils.get_basename(deb_file)
rc = aws_s3_upload(deb_file, deb_key, "Ubuntu")
utils.set_summary("builder deb deploy", rc == 0)
utils.log_h2("builder rpm deploy")
rpm_file = utils.glob_file("rpm/builddir/RPMS/" + rpm_arch + "/*.rpm")
rpm_key = key_prefix + "/centos/" + utils.get_basename(rpm_file)
rc = aws_s3_upload(rpm_file, rpm_key, "CentOS")
utils.set_summary("builder rpm deploy", rc == 0)
else:
utils.set_summary("builder tar deploy", False)
utils.set_summary("builder deb deploy", False)
utils.set_summary("builder rpm deploy", False)
if common.deploy:
utils.log_h2("builder deploy")
if ret:
if "tar" in branding.builder_make_targets:
utils.log_h2("builder tar deploy")
ret = aws_s3_upload(
utils.glob_path("tar/*.tar.gz"),
"linux/generic/%s/" % common.channel,
"Portable"
)
utils.set_summary("builder tar deploy", ret)
if "deb" in branding.builder_make_targets:
utils.log_h2("builder deb deploy")
ret = aws_s3_upload(
utils.glob_path("deb/*.deb"),
"linux/debian/%s/" % common.channel,
"Debian"
)
utils.set_summary("builder deb deploy", ret)
if "rpm" in branding.builder_make_targets:
utils.log_h2("builder rpm deploy")
ret = aws_s3_upload(
utils.glob_path("rpm/builddir/RPMS/" + rpm_arch + "/*.rpm"),
"linux/rhel/%s/" % common.channel,
"CentOS"
)
utils.set_summary("builder rpm deploy", ret)
else:
if "tar" in branding.builder_make_targets:
utils.set_summary("builder tar deploy", False)
if "deb" in branding.builder_make_targets:
utils.set_summary("builder deb deploy", False)
if "rpm" in branding.builder_make_targets:
utils.set_summary("builder rpm deploy", False)
utils.set_cwd(common.workspace_dir)
return

View File

@ -14,8 +14,6 @@ platforms = {
}
out_dir = "build_tools/out"
s3_bucket = "repo-doc-onlyoffice-com"
s3_region = "eu-west-1"
tsa_server = "http://timestamp.digicert.com"
vcredist_links = {
"2022": {

View File

@ -40,20 +40,20 @@ def make_core():
utils.log_h2("core deploy")
args = ["aws", "s3", "cp", "--acl", "public-read", "--no-progress",
core_7z, "s3://" + common.s3_bucket + "/" + dest_version + "core.7z"]
core_7z, "s3://" + branding.s3_bucket + "/" + dest_version + "core.7z"]
if common.os_family == "windows":
rc = utils.cmd(*args, verbose=True)
ret = utils.cmd(*args, verbose=True)
else:
rc = utils.sh(" ".join(args), verbose=True)
if rc == 0:
utils.add_deploy_data("core", "Archive", core_7z, dest_version + "core.7z")
ret = utils.sh(" ".join(args), verbose=True)
if ret:
utils.add_deploy_data("core", "Archive", core_7z, dest_version + "core.7z", branding.s3_bucket, branding.s3_region)
args = ["aws", "s3", "sync", "--delete",
"--acl", "public-read", "--no-progress",
"s3://" + common.s3_bucket + "/" + dest_version,
"s3://" + common.s3_bucket + "/" + dest_latest]
"s3://" + branding.s3_bucket + "/" + dest_version,
"s3://" + branding.s3_bucket + "/" + dest_latest]
if common.os_family == "windows":
rc = utils.cmd(*args, verbose=True)
ret &= utils.cmd(*args, verbose=True)
else:
rc = utils.sh(" ".join(args), verbose=True)
utils.set_summary("core deploy", rc == 0)
ret &= utils.sh(" ".join(args), verbose=True)
utils.set_summary("core deploy", ret)
return

View File

@ -18,27 +18,41 @@ def make():
utils.log("Unsupported host OS")
return
def aws_s3_upload(local, key, ptype=None):
if common.os_family == "windows":
rc = utils.cmd(
"aws", "s3", "cp", "--acl", "public-read", "--no-progress",
local, "s3://" + common.s3_bucket + "/" + key,
verbose=True
)
else:
rc = utils.sh("aws s3 cp --acl public-read --no-progress " \
+ local + " s3://" + common.s3_bucket + "/" + key, verbose=True)
if rc == 0 and ptype is not None:
utils.add_deploy_data("desktop", ptype, local, key)
return rc
def aws_s3_upload(files, key, ptype=None):
if not files:
return False
ret = True
key = "desktop/" + key
for file in files:
args = ["aws"]
if hasattr(branding, "s3_endpoint_url"):
args += ["--endpoint-url=" + branding.s3_endpoint_url]
args += [
"s3", "cp", "--no-progress", "--acl", "public-read",
file, "s3://" + branding.s3_bucket + "/" + key
]
if common.os_family == "windows":
upload = utils.cmd(*args, verbose=True)
else:
upload = utils.sh(" ".join(args), verbose=True)
ret &= upload
if upload and ptype is not None:
full_key = key
if full_key.endswith("/"): full_key += utils.get_basename(file)
utils.add_deploy_data(
"desktop", ptype, file, full_key,
branding.s3_bucket, branding.s3_region
)
return ret
#
# Windows
#
def make_windows():
global package_version, iscc_args, source_dir, arch_list, inno_arch_list, \
inno_file, inno_update_file, msi_file, zip_file, key_prefix
global package_version, iscc_args, source_dir, source_help_dir, \
inno_file, inno_help_file, inno_update_file, advinst_file, zip_file, \
arch_list, inno_arch_list
utils.set_cwd("desktop-apps\\win-linux\\package\\windows")
prefix = common.platforms[common.platform]["prefix"]
@ -47,6 +61,7 @@ def make_windows():
package_name = branding.desktop_package_name
package_version = common.version + "." + common.build
source_dir = "..\\..\\..\\..\\build_tools\\out\\%s\\%s\\%s" % (prefix, company, product)
source_help_dir = source_dir + "-help"
arch_list = {
"windows_x64": "x64",
"windows_x64_xp": "x64",
@ -63,10 +78,9 @@ def make_windows():
if common.platform.endswith("_xp"): suffix += "_xp"
zip_file = "%s_%s_%s.zip" % (package_name, package_version, suffix)
inno_file = "%s_%s_%s.exe" % (package_name, package_version, suffix)
inno_help_file = "%s_Help_%s_%s.exe" % (package_name, package_version, suffix)
inno_update_file = "update\\editors_update_%s.exe" % suffix
msi_file = "%s_%s_%s.msi" % (package_name, package_version, suffix)
key_prefix = "%s/%s/windows/desktop/%s/%s" % (branding.company_name_l, \
common.release_branch, common.version, common.build)
advinst_file = "%s_%s_%s.msi" % (package_name, package_version, suffix)
if common.clean:
utils.log_h2("desktop clean")
@ -89,37 +103,44 @@ def make_windows():
if not vcdl:
utils.set_summary("desktop inno build", False)
utils.set_summary("desktop inno help build", False)
utils.set_summary("desktop inno update build", False)
utils.set_summary("desktop advinst build", False)
utils.set_cwd(common.workspace_dir)
return
make_inno()
if branding.onlyoffice and common.platform in ["windows_x64", "windows_x86"]:
make_inno_help()
make_inno_update()
if common.platform == "windows_x64":
make_winsparkle_files()
make_update_files()
if common.platform in ["windows_x64", "windows_x86"]:
make_msi()
make_advinst()
utils.set_cwd(common.workspace_dir)
return
def make_zip():
utils.log_h2("desktop zip build")
rc = utils.cmd(
ret = utils.cmd(
"7z", "a", "-y", zip_file, source_dir + "\\*",
creates=zip_file,
verbose=True
creates=zip_file, verbose=True
)
utils.set_summary("desktop zip build", rc == 0)
utils.set_summary("desktop zip build", ret)
if rc == 0:
if common.deploy and ret:
utils.log_h2("desktop zip deploy")
zip_key = key_prefix + "/" + utils.get_basename(zip_file)
rc = aws_s3_upload(zip_file, zip_key, "Portable")
utils.set_summary("desktop zip deploy", rc == 0)
ret = aws_s3_upload(
[zip_file],
"win/generic/%s/" % common.channel,
"Portable"
)
utils.set_summary("desktop zip deploy", ret)
return
def download_vcredist(year):
@ -132,17 +153,17 @@ def download_vcredist(year):
utils.log_h2(vcredist_file)
utils.create_dir(utils.get_dirname(vcredist_file))
rc = utils.download_file(link, vcredist_file, md5, verbose=True)
utils.set_summary("vcredist " + year + " download", rc == 0)
return rc == 0
ret = utils.download_file(link, vcredist_file, md5, verbose=True)
utils.set_summary("vcredist " + year + " download", ret)
return ret
def make_inno():
global iscc_args
utils.log_h2("desktop inno build")
utils.log_h2(inno_file)
utils.log_h3(inno_file)
iscc_args = [
# "/Qp",
"/Qp",
"/DsAppVersion=" + package_version,
"/DDEPLOY_PATH=" + source_dir,
"/D_ARCH=" + inno_arch_list[common.platform]
@ -159,106 +180,138 @@ def make_inno():
iscc_args.append("/Sbyparam=signtool.exe sign /v /n $q" + \
branding.cert_name + "$q /t " + common.tsa_server + " $f")
args = ["iscc"] + iscc_args + ["common.iss"]
rc = utils.cmd(*args, creates=inno_file, verbose=True)
utils.set_summary("desktop inno build", rc == 0)
ret = utils.cmd(*args, creates=inno_file, verbose=True)
utils.set_summary("desktop inno build", ret)
if rc == 0:
if common.deploy and ret:
utils.log_h2("desktop inno deploy")
inno_key = key_prefix + "/" + utils.get_basename(inno_file)
rc = aws_s3_upload(inno_file, inno_key, "Installer")
utils.set_summary("desktop inno deploy", rc == 0)
ret = aws_s3_upload(
[inno_file],
"win/inno/%s/%s/" % (common.version, common.build),
"Installer"
)
utils.set_summary("desktop inno deploy", ret)
return
def make_inno_help():
utils.log_h2("desktop inno help build")
utils.log_h3(inno_help_file)
args = [
"iscc",
"/Qp",
"/DsAppVersion=" + package_version,
"/DDEPLOY_PATH=" + source_help_dir,
"/D_ARCH=" + inno_arch_list[common.platform]
]
if branding.onlyoffice:
args.append("/D_ONLYOFFICE=1")
else:
args.append("/DsBrandingFolder=" + \
utils.get_abspath(common.workspace_dir + "\\" + common.branding + "\\desktop-apps"))
if common.sign:
args.append("/DENABLE_SIGNING=1")
args.append("/Sbyparam=signtool.exe sign /v /n $q" + \
branding.cert_name + "$q /t " + common.tsa_server + " $f")
args.append("help.iss")
ret = utils.cmd(*args, creates=inno_help_file, verbose=True)
utils.set_summary("desktop inno help build", ret)
if common.deploy and ret:
utils.log_h2("desktop inno help deploy")
ret = aws_s3_upload(
[inno_help_file],
"win/inno/%s/%s/" % (common.version, common.build),
"Installer"
)
utils.set_summary("desktop inno help deploy", ret)
return
def make_inno_update():
utils.log_h2("desktop inno update build")
utils.log_h2(inno_update_file)
utils.log_h3(inno_update_file)
args = ["iscc"] + iscc_args + ["/DTARGET_NAME=" + inno_file, "update_common.iss"]
rc = utils.cmd(*args, creates=inno_update_file, verbose=True)
utils.set_summary("desktop inno update build", rc == 0)
ret = utils.cmd(*args, creates=inno_update_file, verbose=True)
utils.set_summary("desktop inno update build", ret)
if rc == 0:
if common.deploy and ret:
utils.log_h2("desktop inno update deploy")
inno_update_key = key_prefix + "/" + utils.get_basename(inno_update_file)
rc = aws_s3_upload(inno_update_file, inno_update_key, "WinSparkle")
utils.set_summary("desktop inno update deploy", rc == 0)
ret = aws_s3_upload(
[inno_update_file],
"win/inno/%s/%s/" % (common.version, common.build),
"WinSparkle"
)
utils.set_summary("desktop inno update deploy", ret)
return
def make_winsparkle_files():
utils.log_h2("desktop winsparkle files build")
def make_update_files():
utils.log_h2("desktop update files build")
if branding.onlyoffice:
awk_branding = "update/branding.awk"
changes_dir = "update\\changes\\" + common.version
else:
awk_branding = "../../../../" + common.branding + \
"/desktop-apps/win-linux/package/windows/update/branding.awk"
awk_args = [
"-v", "Version=" + common.version,
"-v", "Build=" + common.build,
"-v", "Branch=" + common.release_branch,
"-v", "Timestamp=" + common.timestamp,
"-i", awk_branding
changes_dir = "..\\..\\..\\..\\" + common.branding + "\\desktop-apps\\" + \
"win-linux\\package\\windows\\update\\changes\\" + common.version
for lang, base in branding.desktop_update_changes_list.items():
utils.log_h3("changes " + lang + " html")
utils.copy_file(changes_dir + "\\" + lang + ".html", "update\\" + base + ".html")
appcast_args = [
"-Version", package_version,
"-Timestamp", common.timestamp
]
if branding.onlyoffice:
appcast_args.append("-Multilang")
appcast_prod_args = [
"-UpdatesUrlPrefix", branding.desktop_updates_url,
"-ReleaseNotesUrlPrefix", branding.desktop_changes_url
]
appcast_test_base_url = "%s/win/inno/%s/%s" % (branding.s3_base_url, common.version, common.build)
appcast_test_args = [
"-UpdatesUrlPrefix", appcast_test_base_url,
"-ReleaseNotesUrlPrefix", appcast_test_base_url
]
appcast = "update/appcast.xml"
utils.log_h2(appcast)
args = ["env", "LANG=en_US.UTF-8", "awk"] + \
awk_args + ["-f", "update/appcast.xml.awk"]
appcast_result = utils.cmd_output(*args, verbose=True)
utils.write_file(appcast, appcast_result)
utils.log_h3("appcast prod json")
utils.ps1(
"update\\make_appcast.ps1",
appcast_args + appcast_prod_args,
creates="update\\appcast.json", verbose=True
)
utils.log_h3("appcast prod xml")
utils.ps1(
"update\\make_appcast_xml.ps1",
appcast_args + appcast_prod_args,
creates="update\\appcast.xml", verbose=True
)
utils.log_h3("appcast test json")
utils.ps1(
"update\\make_appcast.ps1",
appcast_args + appcast_test_args + ["-OutFile", "appcast-test.json"],
creates="update\\appcast-test.json", verbose=True
)
utils.log_h3("appcast test xml")
utils.ps1(
"update\\make_appcast_xml.ps1",
appcast_args + appcast_test_args + ["-OutFile", "appcast-test.xml"],
creates="update\\appcast-test.xml", verbose=True
)
appcast_prod = "update/appcast-prod.xml"
utils.log_h2(appcast_prod)
args = ["env", "LANG=en_US.UTF-8", "awk", "-v", "Prod=1"] + \
awk_args + ["-f", "update/appcast.xml.awk"]
appcast_result = utils.cmd_output(*args, verbose=True)
utils.write_file(appcast_prod, appcast_result)
if branding.onlyoffice:
changes_dir = "update/changes/" + common.version
else:
changes_dir = "../../../../" + common.branding + \
"/desktop-apps/win-linux/package/windows/update/changes/" + common.version
for lang, base in branding.desktop_update_changes_list.items():
changes = "update/%s.html" % base
if lang == "en": encoding = "en_US.UTF-8"
elif lang == "ru": encoding = "ru_RU.UTF-8"
utils.log_h2(changes)
changes_file = "%s/%s.html" % (changes_dir, lang)
args = ["env", "LANG=" + encoding, "awk"] + awk_args + \
["-f", "update/changes.html.awk", changes_file]
if utils.is_exist(changes_file):
changes_result = utils.cmd_output(*args, verbose=True)
print(changes_result)
utils.write_file(changes, changes_result)
else:
utils.log("! file not exist: " + changes_file)
utils.log_h2("desktop winsparkle files deploy")
rc = 0
appcast_key = key_prefix + "/" + utils.get_basename(appcast)
rc_appcast = aws_s3_upload(appcast, appcast_key, "WinSparkle")
rc += rc_appcast
appcast_prod_key = key_prefix + "/" + utils.get_basename(appcast_prod)
rc_appcast_prod = aws_s3_upload(appcast_prod, appcast_prod_key, "WinSparkle")
rc += rc_appcast_prod
for lang, base in branding.desktop_update_changes_list.items():
changes_file = "update/%s.html" % base
changes_key = key_prefix + "/" + utils.get_basename(changes_file)
if utils.is_exist(changes_file):
rc_changes = aws_s3_upload(changes_file, changes_key, "WinSparkle")
rc += rc_changes
utils.set_summary("desktop winsparkle files deploy", rc == 0)
if common.deploy:
utils.log_h2("desktop update files deploy")
ret = aws_s3_upload(
utils.glob_path("update/*.json") + utils.glob_path("update/*.xml") + \
utils.glob_path("update/*.html"),
"win/inno/%s/%s/" % (common.version, common.build),
"Update"
)
utils.set_summary("desktop update files deploy", ret)
return
def make_msi():
utils.log_h2("desktop msi build")
utils.log_h2(msi_file)
def make_advinst():
utils.log_h2("desktop advinst build")
utils.log_h3(advinst_file)
arch = arch_list[common.platform]
@ -289,18 +342,23 @@ def make_msi():
aic_content += [
"ResetSig"
]
if arch == "x86":
aic_content += [
"SetPackageType x86",
"SetAppdir -buildname DefaultBuild -path [ProgramFilesFolder][MANUFACTURER_INSTALL_FOLDER]\\[PRODUCT_INSTALL_FOLDER]",
'DelPrerequisite "Microsoft Visual C++ 2015-2022 Redistributable (x64)"',
'DelPrerequisite "Microsoft Visual C++ 2013 Redistributable (x64)"'
]
if arch == "x64":
aic_content += [
"SetPackageType x64 -buildname DefaultBuild",
"AddOsLc -buildname DefaultBuild -arch x64",
"DelOsLc -buildname DefaultBuild -arch x86",
'DelPrerequisite "Microsoft Visual C++ 2015-2022 Redistributable (x86)"',
'DelPrerequisite "Microsoft Visual C++ 2013 Redistributable (x86)"'
]
if arch == "x86":
aic_content += [
"SetPackageType x86 -buildname DefaultBuild",
"AddOsLc -arch x86 -buildname DefaultBuild",
"DelOsLc -arch x64 -buildname DefaultBuild",
"SetAppdir -path [ProgramFilesFolder][MANUFACTURER_INSTALL_FOLDER]\\[PRODUCT_INSTALL_FOLDER] -buildname DefaultBuild",
'DelPrerequisite "Microsoft Visual C++ 2015-2022 Redistributable (x64)"',
'DelPrerequisite "Microsoft Visual C++ 2013 Redistributable (x64)"'
]
if branding.onlyoffice:
aic_content += [
"DelFolder CUSTOM_PATH"
@ -325,27 +383,30 @@ def make_msi():
"SetCurrentFeature ExtendedFeature",
"NewSync CUSTOM_PATH " + source_dir + "\\..\\MediaViewer",
"UpdateFile CUSTOM_PATH\\ImageViewer.exe " + source_dir + "\\..\\MediaViewer\\ImageViewer.exe",
"UpdateFile CUSTOM_PATH\\VideoPlayer.exe " + source_dir + "\\..\\MediaViewer\\VideoPlayer.exe"
"UpdateFile CUSTOM_PATH\\VideoPlayer.exe " + source_dir + "\\..\\MediaViewer\\VideoPlayer.exe",
"SetProperty ASCC_REG_PREFIX=" + branding.ascc_reg_prefix
]
aic_content += [
"AddOsLc -buildname DefaultBuild -arch " + arch,
"SetCurrentFeature MainFeature",
"NewSync APPDIR " + source_dir,
"UpdateFile APPDIR\\DesktopEditors.exe " + source_dir + "\\DesktopEditors.exe",
"SetVersion " + package_version,
"SetPackageName " + msi_file + " -buildname DefaultBuild",
"SetPackageName " + advinst_file + " -buildname DefaultBuild",
"Rebuild -buildslist DefaultBuild"
]
utils.write_file("DesktopEditors.aic", "\r\n".join(aic_content), "utf-8-sig")
rc = utils.cmd("AdvancedInstaller.com", "/execute", \
ret = utils.cmd("AdvancedInstaller.com", "/execute", \
"DesktopEditors.aip", "DesktopEditors.aic", verbose=True)
utils.set_summary("desktop msi build", rc == 0)
utils.set_summary("desktop advinst build", ret)
if rc == 0:
utils.log_h2("desktop msi deploy")
msi_key = key_prefix + "/" + utils.get_basename(msi_file)
rc = aws_s3_upload(msi_file, msi_key, "Installer")
utils.set_summary("desktop msi deploy", rc == 0)
if common.deploy and ret:
utils.log_h2("desktop advinst deploy")
ret = aws_s3_upload(
[advinst_file],
"win/advinst/%s/" % common.channel,
"Installer"
)
utils.set_summary("desktop advinst deploy", ret)
return
#
@ -354,25 +415,21 @@ def make_msi():
def make_macos():
global package_name, build_dir, branding_dir, updates_dir, changes_dir, \
update_changes_list, suffix, lane, scheme, key_prefix
suffix, lane, scheme, app_version
package_name = branding.desktop_package_name
build_dir = branding.desktop_build_dir
branding_dir = branding.desktop_branding_dir
updates_dir = branding.desktop_updates_dir
changes_dir = branding.desktop_changes_dir
update_changes_list = branding.desktop_update_changes_list
suffixes = {
suffix = {
"darwin_x86_64": "x86_64",
"darwin_x86_64_v8": "v8",
"darwin_arm64": "arm"
}
suffix = suffixes[common.platform]
}[common.platform]
lane = "release_" + suffix
scheme = package_name + "-" + suffix
key_prefix = "%s/%s/macos/%s/%s/%s" % (branding.company_name_l, \
common.release_branch, suffix, common.version, common.build)
utils.set_cwd(build_dir)
utils.set_cwd(branding_dir)
if common.clean:
utils.log("\n=== Clean\n")
@ -387,15 +444,16 @@ def make_macos():
current_build = utils.sh_output(
'/usr/libexec/PlistBuddy -c "Print :CFBundleVersion" ' + plist_path,
verbose=True).rstrip()
app_version = current_version
appcast_url = branding.sparkle_base_url + "/" + suffix + "/" + branding.desktop_package_name.lower() + ".xml"
release_version = utils.sh_output(
'curl -s ' + appcast_url + ' 2> /dev/null' \
'curl -Ls ' + appcast_url + ' 2> /dev/null' \
+ ' | xmllint --xpath "/rss/channel/item[1]/enclosure/@*[name()=\'sparkle:shortVersionString\']" -' \
+ ' | cut -f2 -d\\\"',
verbose=True).rstrip()
release_build = utils.sh_output(
'curl -s ' + appcast_url + ' 2> /dev/null' \
'curl -Ls ' + appcast_url + ' 2> /dev/null' \
+ ' | xmllint --xpath "/rss/channel/item[1]/enclosure/@*[name()=\'sparkle:version\']" -' \
+ ' | cut -f2 -d\\\"',
verbose=True).rstrip()
@ -403,135 +461,115 @@ def make_macos():
utils.log("CURRENT=" + current_version + "(" + current_build + ")" \
+ "\nRELEASE=" + release_version + "(" + release_build + ")")
make_dmg()
if int(current_build) > int(release_build):
make_sparkle_updates()
else:
utils.log(release_build + " <= " + current_build)
dmg = make_dmg()
if dmg:
if int(current_build) > int(release_build):
make_sparkle_updates()
else:
utils.log(release_build + " <= " + current_build)
utils.set_cwd(common.workspace_dir)
return
def make_dmg():
utils.log_h2("desktop dmg build")
utils.log_h2(scheme)
utils.log_h2("build/" + package_name + ".app")
rc = utils.sh(
utils.log_h3(scheme)
utils.log_h3("build/" + package_name + ".app")
dmg = utils.sh(
"bundler exec fastlane " + lane + " skip_git_bump:true",
verbose=True
)
utils.set_summary("desktop dmg build", rc == 0)
utils.set_summary("desktop dmg build", dmg)
if rc == 0:
if common.deploy and dmg:
utils.log_h2("desktop dmg deploy")
dmg_file = utils.glob_file("build/*.dmg")
dmg_key = key_prefix + "/" + utils.get_basename(dmg_file)
rc = aws_s3_upload(dmg_file, dmg_key, "Disk Image")
utils.set_summary("desktop msi deploy", rc == 0)
return
ret = aws_s3_upload(
utils.glob_path("build/*.dmg"),
"mac/%s/%s/%s/" % (suffix, common.version, common.build),
"Disk Image"
)
utils.set_summary("desktop dmg deploy", ret)
utils.log_h2("desktop zip deploy")
ret = aws_s3_upload(
["build/%s-%s.zip" % (scheme, app_version)],
"mac/%s/%s/%s/" % (suffix, common.version, common.build),
"Archive"
)
utils.set_summary("desktop zip deploy", ret)
return dmg
def make_sparkle_updates():
utils.log_h2("desktop sparkle files build")
app_version = utils.sh_output("/usr/libexec/PlistBuddy \
-c 'Print :CFBundleShortVersionString' \
build/" + package_name + ".app/Contents/Info.plist", verbose=True)
zip_filename = scheme + '-' + app_version
macos_zip = "build/" + zip_filename + ".zip"
updates_storage_dir = "%s/%s/_updates" % (utils.get_env('ARCHIVES_DIR'), scheme)
utils.create_dir(updates_dir)
utils.copy_dir_content(updates_storage_dir, updates_dir, ".zip")
# utils.copy_dir_content(updates_storage_dir, updates_dir, ".html")
utils.copy_file(macos_zip, updates_dir)
if "en" in update_changes_list:
notes_src = "%s/%s/%s.html" % (changes_dir, app_version, update_changes_list["en"])
if utils.is_file(notes_src):
notes_dst = "%s/%s.html" % (updates_dir, zip_filename)
utils.copy_file(notes_src, notes_dst)
cur_date = utils.sh_output("env LC_ALL=en_US.UTF-8 date -u \"+%B %e, %Y\"", verbose=True)
utils.replace_in_file(notes_dst,
r"(<span class=\"releasedate\">).+(</span>)",
"\\1 - " + cur_date + "\\2")
else:
utils.write_file(notes_dst, '<html></html>\n')
if "ru" in update_changes_list:
notes_src = "%s/%s/%s.html" % (changes_dir, app_version, update_changes_list["ru"])
if utils.is_file(notes_src):
if update_changes_list["ru"] != "ReleaseNotes":
notes_dst = "%s/%s.ru.html" % (updates_dir, zip_filename)
else:
notes_dst = "%s/%s.html" % (updates_dir, zip_filename)
utils.copy_file(notes_src, notes_dst)
cur_date = utils.sh_output("env LC_ALL=ru_RU.UTF-8 date -u \"+%e %B %Y\"", verbose=True)
utils.replace_in_file(notes_dst,
r"(<span class=\"releasedate\">).+(</span>)",
"\\1 - " + cur_date + "\\2")
else:
utils.write_file(notes_dst, '<html></html>\n')
sparkle_download_url = "%s/%s/updates/" % (branding.sparkle_base_url, suffix)
sparkle_release_notes_url = "%s/%s/updates/changes/%s/" % (branding.sparkle_base_url, suffix, app_version)
utils.sh(common.workspace_dir \
+ "/desktop-apps/macos/Vendor/Sparkle/bin/generate_appcast " \
+ updates_dir \
+ " --download-url-prefix " + sparkle_download_url \
+ " --release-notes-url-prefix " + sparkle_release_notes_url)
utils.log_h3("edit sparkle appcast links")
appcast_url = branding.sparkle_base_url + "/" + suffix
appcast = "%s/%s.xml" % (updates_dir, package_name.lower())
for lang, base in update_changes_list.items():
if base == "ReleaseNotes":
utils.replace_in_file(appcast,
r'(<sparkle:releaseNotesLink>.+/).+(\.html</sparkle:releaseNotesLink>)',
"\\1" + base + "\\2")
else:
utils.replace_in_file(appcast,
r'(<sparkle:releaseNotesLink xml:lang="' + lang + r'">).+(\.html</sparkle:releaseNotesLink>)',
"\\1" + base + "\\2")
utils.log_h3("delete unnecessary files")
for file in os.listdir(updates_dir):
if (-1 == file.find(app_version)) and (file.endswith(".zip") or
file.endswith(".html")):
utils.delete_file(updates_dir + '/' + file)
utils.log_h3("generate checksums")
utils.sh(
"md5 *.zip *.delta > md5sums.txt && " \
+ "shasum -a 256 *.zip *.delta > sha256sums.txt",
chdir="build/update",
verbose=True
utils.copy_dir_content(updates_storage_dir, updates_dir, ".zip")
utils.copy_file(
changes_dir + "/" + app_version + "/ReleaseNotes.html",
updates_dir + "/" + zip_filename + ".html"
)
utils.copy_file(
changes_dir + "/" + app_version + "/ReleaseNotesRU.html",
updates_dir + "/" + zip_filename + ".ru.html"
)
utils.log_h2("desktop sparkle files deploy")
rc = 0
sparkle_base_url = "%s/%s/updates/" % (branding.sparkle_base_url, suffix)
ret = utils.sh(
common.workspace_dir \
+ "/desktop-apps/macos/Vendor/Sparkle/bin/generate_appcast " \
+ updates_dir \
+ " --download-url-prefix " + sparkle_base_url \
+ " --release-notes-url-prefix " + sparkle_base_url,
verbose=True
)
utils.set_summary("desktop sparkle files build", ret)
zip_key = key_prefix + "/" + utils.get_basename(macos_zip)
rc_zip = aws_s3_upload(macos_zip, zip_key, "Sparkle")
rc += rc_zip
# utils.log_h3("edit sparkle appcast links")
# appcast_url = branding.sparkle_base_url + "/" + suffix
# appcast = "%s/%s.xml" % (updates_dir, package_name.lower())
# for lang, base in update_changes_list.items():
# if base == "ReleaseNotes":
# utils.replace_in_file(appcast,
# r'(<sparkle:releaseNotesLink>.+/).+(\.html</sparkle:releaseNotesLink>)',
# "\\1" + base + "\\2")
# else:
# utils.replace_in_file(appcast,
# r'(<sparkle:releaseNotesLink xml:lang="' + lang + r'">).+(\.html</sparkle:releaseNotesLink>)',
# "\\1" + base + "\\2")
for path in utils.glob_files("build/update/*.delta") \
+ utils.glob_files("build/update/*.xml") \
+ utils.glob_files("build/update/*.html"):
sparkle_key = key_prefix + "/" + utils.get_basename(path)
rc_sparkle = aws_s3_upload(path, sparkle_key, "Sparkle")
rc += rc_sparkle
utils.log("")
utils.log_h3("generate checksums")
utils.sh(
"md5 *.zip *.delta > md5sums.txt",
chdir="build/update", verbose=True
)
utils.sh(
"shasum -a 256 *.zip *.delta > sha256sums.txt",
chdir="build/update", verbose=True
)
utils.set_summary("desktop sparkle files deploy", rc == 0)
if common.deploy:
utils.log_h2("desktop sparkle files deploy")
ret = aws_s3_upload(
utils.glob_path("build/update/*.delta") \
+ utils.glob_path("build/update/*.xml") \
+ utils.glob_path("build/update/*.html"),
"mac/%s/%s/%s/" % (suffix, common.version, common.build),
"Sparkle"
)
utils.set_summary("desktop sparkle files deploy", ret)
utils.log_h2("desktop checksums deploy")
rc = 0
for path in utils.glob_files("build/update/*.txt"):
checksums_key = key_prefix + "/" + utils.get_basename(path)
rc_checksums = aws_s3_upload(path, checksums_key, "Checksums")
rc += rc_checksums
utils.set_summary("desktop checksums deploy", rc == 0)
utils.log_h2("desktop checksums deploy")
ret = aws_s3_upload(
utils.glob_path("build/update/*.txt"),
"mac/%s/%s/%s/" % (suffix, common.version, common.build),
"Checksums"
)
utils.set_summary("desktop checksums deploy", ret)
return
#
@ -541,75 +579,96 @@ def make_sparkle_updates():
def make_linux():
utils.set_cwd("desktop-apps/win-linux/package/linux")
rc = utils.sh("make clean", verbose=True)
utils.set_summary("desktop clean", rc == 0)
args = []
utils.log_h2("desktop build")
make_args = branding.desktop_make_targets
if common.platform == "linux_aarch64":
args += ["-e", "UNAME_M=aarch64"]
make_args += ["-e", "UNAME_M=aarch64"]
if not branding.onlyoffice:
args += ["-e", "BRANDING_DIR=../../../../" + common.branding + "/desktop-apps/win-linux/package/linux"]
rc = utils.sh("make packages " + " ".join(args), verbose=True)
utils.set_summary("desktop build", rc == 0)
make_args += ["-e", "BRANDING_DIR=../../../../" + common.branding + "/desktop-apps/win-linux/package/linux"]
ret = utils.sh("make clean && make " + " ".join(make_args), verbose=True)
utils.set_summary("desktop build", ret)
key_prefix = branding.company_name_l + "/" + common.release_branch
if common.platform == "linux_x86_64":
rpm_arch = "x86_64"
elif common.platform == "linux_aarch64":
rpm_arch = "aarch64"
if rc == 0:
utils.log_h2("desktop tar deploy")
tar_file = utils.glob_file("tar/*.tar.gz")
tar_key = key_prefix + "/linux/" + utils.get_basename(tar_file)
rc = aws_s3_upload(tar_file, tar_key, "Portable")
utils.set_summary("desktop tar deploy", rc == 0)
rpm_arch = "x86_64"
if common.platform == "linux_aarch64": rpm_arch = "aarch64"
utils.log_h2("desktop deb deploy")
deb_file = utils.glob_file("deb/*.deb")
deb_key = key_prefix + "/ubuntu/" + utils.get_basename(deb_file)
rc = aws_s3_upload(deb_file, deb_key, "Ubuntu")
utils.set_summary("desktop deb deploy", rc == 0)
utils.log_h2("desktop rpm deploy")
rpm_file = utils.glob_file("rpm/builddir/RPMS/" + rpm_arch + "/*.rpm")
rpm_key = key_prefix + "/centos/" + utils.get_basename(rpm_file)
rc = aws_s3_upload(rpm_file, rpm_key, "CentOS")
utils.set_summary("desktop rpm deploy", rc == 0)
utils.log_h2("desktop apt-rpm deploy")
apt_rpm_file = utils.glob_file("apt-rpm/builddir/RPMS/" + rpm_arch + "/*.rpm")
apt_rpm_key = key_prefix + "/altlinux/" + utils.get_basename(apt_rpm_file)
rc = aws_s3_upload(apt_rpm_file, apt_rpm_key, "AltLinux")
utils.set_summary("desktop apt-rpm deploy", rc == 0)
utils.log_h2("desktop urpmi deploy")
urpmi_file = utils.glob_file("urpmi/builddir/RPMS/" + rpm_arch + "/*.rpm")
urpmi_key = key_prefix + "/rosa/" + utils.get_basename(urpmi_file)
rc = aws_s3_upload(urpmi_file, urpmi_key, "Rosa")
utils.set_summary("desktop urpmi deploy", rc == 0)
# utils.log_h2("desktop suse-rpm deploy")
# suse_rpm_file = utils.glob_file("suse-rpm/builddir/RPMS/" + rpm_arch + "/*.rpm")
# suse_rpm_key = key_prefix + "/suse/" + utils.get_basename(suse_rpm_file)
# rc = aws_s3_upload(suse_rpm_file, suse_rpm_key, "SUSE Linux")
# utils.set_summary("desktop suse-rpm deploy", rc == 0)
if not branding.onlyoffice:
utils.log_h2("desktop deb-astra deploy")
deb_astra_file = utils.glob_file("deb-astra/*.deb")
deb_astra_key = key_prefix + "/" + utils.get_basename(deb_astra_file)
rc = aws_s3_upload(deb_astra_file, deb_astra_key, "AstraLinux Signed")
utils.set_summary("desktop deb-astra deploy", rc == 0)
else:
utils.set_summary("desktop tar deploy", False)
utils.set_summary("desktop deb deploy", False)
utils.set_summary("desktop rpm deploy", False)
utils.set_summary("desktop apt-rpm deploy", False)
utils.set_summary("desktop urpmi deploy", False)
utils.set_summary("desktop suse-rpm deploy", False)
if not branding.onlyoffice:
utils.set_summary("desktop deb-astra deploy", False)
if common.deploy:
utils.log_h2("desktop deploy")
if ret:
utils.log_h2("desktop tar deploy")
if "tar" in branding.desktop_make_targets:
ret = aws_s3_upload(
utils.glob_path("tar/*.tar.gz") + utils.glob_path("tar/*.tar.xz"),
"linux/generic/%s/" % common.channel,
"Portable"
)
utils.set_summary("desktop tar deploy", ret)
if "deb" in branding.desktop_make_targets:
utils.log_h2("desktop deb deploy")
ret = aws_s3_upload(
utils.glob_path("deb/*.deb"),
"linux/debian/%s/" % common.channel,
"Debian"
)
utils.set_summary("desktop deb deploy", ret)
if "deb-astra" in branding.desktop_make_targets:
utils.log_h2("desktop deb-astra deploy")
ret = aws_s3_upload(
utils.glob_path("deb-astra/*.deb"),
"linux/astra/",
"Astra Linux Signed"
)
utils.set_summary("desktop deb-astra deploy", ret)
if "rpm" in branding.desktop_make_targets:
utils.log_h2("desktop rpm deploy")
ret = aws_s3_upload(
utils.glob_path("rpm/builddir/RPMS/" + rpm_arch + "/*.rpm") \
+ utils.glob_path("rpm/builddir/RPMS/noarch/*.rpm"),
"linux/rhel/%s/" % common.channel,
"CentOS"
)
utils.set_summary("desktop rpm deploy", ret)
if "suse-rpm" in branding.desktop_make_targets:
utils.log_h2("desktop suse-rpm deploy")
ret = aws_s3_upload(
utils.glob_path("suse-rpm/builddir/RPMS/" + rpm_arch + "/*.rpm") \
+ utils.glob_path("suse-rpm/builddir/RPMS/noarch/*.rpm"),
"linux/suse/%s/" % common.channel,
"SUSE Linux"
)
utils.set_summary("desktop suse-rpm deploy", ret)
if "apt-rpm" in branding.desktop_make_targets:
utils.log_h2("desktop apt-rpm deploy")
ret = aws_s3_upload(
utils.glob_path("apt-rpm/builddir/RPMS/" + rpm_arch + "/*.rpm") \
+ utils.glob_path("apt-rpm/builddir/RPMS/noarch/*.rpm"),
"linux/altlinux/%s/" % common.channel,
"ALT Linux"
)
utils.set_summary("desktop apt-rpm deploy", ret)
if "urpmi" in branding.desktop_make_targets:
utils.log_h2("desktop urpmi deploy")
ret = aws_s3_upload(
utils.glob_path("urpmi/builddir/RPMS/" + rpm_arch + "/*.rpm") \
+ utils.glob_path("urpmi/builddir/RPMS/noarch/*.rpm"),
"linux/rosa/%s/" % common.channel,
"ROSA"
)
utils.set_summary("desktop urpmi deploy", ret)
else:
if "tar" in branding.desktop_make_targets:
utils.set_summary("desktop tar deploy", False)
if "deb" in branding.desktop_make_targets:
utils.set_summary("desktop deb deploy", False)
if "deb-astra" in branding.desktop_make_targets:
utils.set_summary("desktop deb-astra deploy", False)
if "rpm" in branding.desktop_make_targets:
utils.set_summary("desktop rpm deploy", False)
if "suse-rpm" in branding.desktop_make_targets:
utils.set_summary("desktop suse-rpm deploy", False)
if "apt-rpm" in branding.desktop_make_targets:
utils.set_summary("desktop apt-rpm deploy", False)
if "urpmi" in branding.desktop_make_targets:
utils.set_summary("desktop urpmi deploy", False)
utils.set_cwd(common.workspace_dir)
return

View File

@ -12,13 +12,6 @@ def make():
make_mobile()
return
def aws_s3_upload(local, key, ptype=None):
rc = utils.sh("aws s3 cp --acl public-read --no-progress " \
+ local + " s3://" + common.s3_bucket + "/" + key, verbose=True)
if rc == 0 and ptype is not None:
utils.add_deploy_data("mobile", ptype, local, key)
return rc
def make_mobile():
utils.set_cwd("build_tools/out")
@ -26,17 +19,27 @@ def make_mobile():
utils.log_h2("mobile clean")
utils.sh("rm -rfv *.zip", verbose=True)
zip_file = "android-libs-" + common.version + "-" + common.build + ".zip"
zip_key = branding.company_name_l + "/" + common.release_branch + "/android/" + zip_file
zip_file = "build-" + common.version + "-" + common.build + ".zip"
s3_key = "mobile/android/%s/%s" % (common.channel, zip_file)
utils.log_h2("mobile build")
rc = utils.sh("zip -r " + zip_file + " ./android* ./js", verbose=True)
utils.set_summary("mobile build", rc == 0)
ret = utils.sh("zip -r " + zip_file + " ./android* ./js", verbose=True)
utils.set_summary("mobile build", ret)
utils.log_h2("mobile deploy")
if rc == 0:
rc = aws_s3_upload(zip_file, zip_key, "Android")
utils.set_summary("mobile deploy", rc == 0)
if common.deploy:
utils.log_h2("mobile deploy")
if ret:
ret = utils.sh(
"aws s3 cp --acl public-read --no-progress " \
+ zip_file + " s3://" + branding.s3_bucket + "/" + s3_key,
verbose=True
)
if ret:
utils.add_deploy_data(
"mobile", "Android", zip_file, s3_key,
branding.s3_bucket, branding.s3_region
)
utils.set_summary("mobile deploy", ret)
utils.set_cwd(common.workspace_dir)
return

View File

@ -14,19 +14,32 @@ def make(edition):
utils.log("Unsupported host OS")
return
def aws_s3_upload(local, key, edition, ptype=None):
if common.os_family == "windows":
rc = utils.cmd(
"aws", "s3", "cp", "--acl", "public-read", "--no-progress",
local, "s3://" + common.s3_bucket + "/" + key,
verbose=True
)
else:
rc = utils.sh("aws s3 cp --acl public-read --no-progress " \
+ local + " s3://" + common.s3_bucket + "/" + key, verbose=True)
if rc == 0 and ptype is not None:
utils.add_deploy_data("server_" + edition, ptype, local, key)
return rc
def aws_s3_upload(files, key, edition, ptype=None):
if not files:
return False
ret = True
key = "server/" + key
for file in files:
args = ["aws"]
if hasattr(branding, "s3_endpoint_url"):
args += ["--endpoint-url=" + branding.s3_endpoint_url]
args += [
"s3", "cp", "--no-progress", "--acl", "public-read",
file, "s3://" + branding.s3_bucket + "/" + key
]
if common.os_family == "windows":
upload = utils.cmd(*args, verbose=True)
else:
upload = utils.sh(" ".join(args), verbose=True)
ret &= upload
if upload and ptype is not None:
full_key = key
if full_key.endswith("/"): full_key += utils.get_basename(file)
utils.add_deploy_data(
"server_" + edition, ptype, file, full_key,
branding.s3_bucket, branding.s3_region
)
return ret
def make_windows(edition):
if edition == "enterprise":
@ -37,25 +50,23 @@ def make_windows(edition):
product_name = "DocumentServer"
utils.set_cwd("document-server-package")
utils.log_h2("server " + edition + " clean")
rc = utils.cmd("make", "clean", verbose=True)
utils.set_summary("server " + edition + " clean", rc == 0)
utils.log_h2("server " + edition + " build")
ret = utils.cmd("make", "clean", verbose=True)
args = ["-e", "PRODUCT_NAME=" + product_name]
if not branding.onlyoffice:
args += ["-e", "BRANDING_DIR=../" + common.branding + "/document-server-package"]
rc = utils.cmd("make", "packages", *args, verbose=True)
utils.set_summary("server " + edition + " build", rc == 0)
ret &= utils.cmd("make", "packages", *args, verbose=True)
utils.set_summary("server " + edition + " build", ret)
key_prefix = "%s/%s/windows/server/%s/%s" % (branding.company_name_l, \
common.release_branch, common.version, common.build)
if rc == 0:
if common.deploy and ret:
utils.log_h2("server " + edition + " inno deploy")
inno_file = utils.glob_file("exe/*.exe")
inno_key = key_prefix + "/" + utils.get_basename(inno_file)
rc = aws_s3_upload(inno_file, inno_key, edition, "Installer")
utils.set_summary("server " + edition + " inno deploy", rc == 0)
ret = aws_s3_upload(
utils.glob_path("exe/*.exe"),
"win/inno/%s/" % common.channel,
edition,
"Installer"
)
utils.set_summary("server " + edition + " inno deploy", ret)
utils.set_cwd(common.workspace_dir)
return
@ -69,54 +80,66 @@ def make_linux(edition):
product_name = "documentserver"
utils.set_cwd("document-server-package")
utils.log_h2("server " + edition + " clean")
rc = utils.sh("make clean", verbose=True)
utils.set_summary("server " + edition + " clean", rc == 0)
utils.log_h2("server " + edition + " build")
args = ["-e", "PRODUCT_NAME=" + product_name]
make_args = branding.server_make_targets + ["-e", "PRODUCT_NAME=" + product_name]
if common.platform == "linux_aarch64":
args += ["-e", "UNAME_M=aarch64"]
make_args += ["-e", "UNAME_M=aarch64"]
if not branding.onlyoffice:
args += ["-e", "BRANDING_DIR=../" + common.branding + "/document-server-package"]
rc = utils.sh("make packages " + " ".join(args), verbose=True)
utils.set_summary("server " + edition + " build", rc == 0)
make_args += ["-e", "BRANDING_DIR=../" + common.branding + "/document-server-package"]
ret = utils.sh("make clean && make " + " ".join(make_args), verbose=True)
utils.set_summary("server " + edition + " build", ret)
key_prefix = branding.company_name_l + "/" + common.release_branch
if common.platform == "linux_x86_64":
rpm_arch = "x86_64"
elif common.platform == "linux_aarch64":
rpm_arch = "aarch64"
if rc == 0:
utils.log_h2("server " + edition + " tar deploy")
tar_file = utils.glob_file("*.tar.gz")
tar_key = key_prefix + "/linux/" + utils.get_basename(tar_file)
rc = aws_s3_upload(tar_file, tar_key, edition, "Portable")
utils.set_summary("server " + edition + " tar deploy", rc == 0)
rpm_arch = "x86_64"
if common.platform == "linux_aarch64": rpm_arch = "aarch64"
utils.log_h2("server " + edition + " deb deploy")
deb_file = utils.glob_file("deb/*.deb")
deb_key = key_prefix + "/ubuntu/" + utils.get_basename(deb_file)
rc = aws_s3_upload(deb_file, deb_key, edition, "Ubuntu")
utils.set_summary("server " + edition + " deb deploy", rc == 0)
utils.log_h2("server " + edition + " rpm deploy")
rpm_file = utils.glob_file("rpm/builddir/RPMS/" + rpm_arch + "/*.rpm")
rpm_key = key_prefix + "/centos/" + utils.get_basename(rpm_file)
rc = aws_s3_upload(rpm_file, rpm_key, edition, "CentOS")
utils.set_summary("server " + edition + " rpm deploy", rc == 0)
utils.log_h2("server " + edition + " apt-rpm deploy")
alt_rpm_file = utils.glob_file("apt-rpm/builddir/RPMS/" + rpm_arch + "/*.rpm")
alt_rpm_key = key_prefix + "/altlinux/" + utils.get_basename(alt_rpm_file)
rc = aws_s3_upload(alt_rpm_file, alt_rpm_key, edition, "AltLinux")
utils.set_summary("server " + edition + " apt-rpm deploy", rc == 0)
else:
utils.set_summary("server " + edition + " tar deploy", False)
utils.set_summary("server " + edition + " deb deploy", False)
utils.set_summary("server " + edition + " rpm deploy", False)
utils.set_summary("server " + edition + " alt-rpm deploy", False)
if common.deploy:
utils.log_h2("server " + edition + " deploy")
if ret:
if "deb" in branding.server_make_targets:
utils.log_h2("server " + edition + " deb deploy")
ret = aws_s3_upload(
utils.glob_path("deb/*.deb"),
"linux/debian/%s/" % common.channel,
edition,
"Debian"
)
utils.set_summary("server " + edition + " deb deploy", ret)
if "rpm" in branding.server_make_targets:
utils.log_h2("server " + edition + " rpm deploy")
ret = aws_s3_upload(
utils.glob_path("rpm/builddir/RPMS/" + rpm_arch + "/*.rpm"),
"linux/rhel/%s/" % common.channel,
edition,
"CentOS"
)
utils.set_summary("server " + edition + " rpm deploy", ret)
if "apt-rpm" in branding.server_make_targets:
utils.log_h2("server " + edition + " apt-rpm deploy")
ret = aws_s3_upload(
utils.glob_path("apt-rpm/builddir/RPMS/" + rpm_arch + "/*.rpm"),
"linux/altlinux/%s/" % common.channel,
edition,
"ALT Linux"
)
utils.set_summary("server " + edition + " apt-rpm deploy", ret)
if "tar" in branding.server_make_targets:
utils.log_h2("server " + edition + " snap deploy")
ret = aws_s3_upload(
utils.glob_path("*.tar.gz"),
"linux/generic/%s/" % common.channel,
edition,
"Snap"
)
utils.set_summary("server " + edition + " snap deploy", ret)
else:
if "deb" in branding.server_make_targets:
utils.set_summary("server " + edition + " deb deploy", False)
if "rpm" in branding.server_make_targets:
utils.set_summary("server " + edition + " rpm deploy", False)
if "apt-rpm" in branding.server_make_targets:
utils.set_summary("server " + edition + " apt-rpm deploy", False)
if "tar" in branding.server_make_targets:
utils.set_summary("server " + edition + " snap deploy", False)
utils.set_cwd(common.workspace_dir)
return
return

View File

@ -63,8 +63,8 @@ def get_cwd():
def set_cwd(path, verbose=True):
if verbose:
log_h3("change working dir:")
log_h3(" path: " + path)
log("- change working dir:")
log(" path: " + path)
os.chdir(path)
return
@ -116,8 +116,8 @@ def get_md5(path):
def create_dir(path, verbose=True):
if verbose:
log_h3("create_dir:")
log_h3(" path:" + path)
log("- create_dir:")
log(" path: " + path)
if not is_exist(path):
os.makedirs(path)
else:
@ -128,21 +128,21 @@ def write_file(path, data, encoding='utf-8', verbose=True):
if is_file(path):
delete_file(path)
if verbose:
log_h3("write_file:")
log_h3(" path: " + path)
log_h3(" encoding: " + encoding)
log_h3(" data: |\n" + data)
log("- write_file:")
log(" path: " + path)
log(" encoding: " + encoding)
log(" data: |\n" + data)
with codecs.open(path, 'w', encoding) as file:
file.write(data)
return
def replace_in_file(path, pattern, text_replace, encoding='utf-8', verbose=True):
if verbose:
log_h3("replace_in_file:")
log_h3(" path: " + path)
log_h3(" pattern: " + pattern)
log_h3(" replace: " + text_replace)
log_h3(" encoding: " + encoding)
log("- replace_in_file:")
log(" path: " + path)
log(" pattern: " + pattern)
log(" replace: " + text_replace)
log(" encoding: " + encoding)
file_data = ""
with codecs.open(get_path(path), "r", encoding) as file:
file_data = file.read()
@ -154,9 +154,9 @@ def replace_in_file(path, pattern, text_replace, encoding='utf-8', verbose=True)
def copy_file(src, dst, verbose=True):
if verbose:
log_h3("copy_file:")
log_h3(" src: " + src)
log_h3(" dst: " + dst)
log("- copy_file:")
log(" src: " + src)
log(" dst: " + dst)
if is_file(dst):
delete_file(dst)
if not is_file(src):
@ -166,10 +166,10 @@ def copy_file(src, dst, verbose=True):
def copy_files(src, dst, override=True, verbose=True):
if verbose:
log_h3("copy_files:")
log_h3(" src: " + src)
log_h3(" dst: " + dst)
log_h3(" override: " + str(override))
log("- copy_files:")
log(" src: " + src)
log(" dst: " + dst)
log(" override: " + str(override))
for file in glob.glob(src):
file_name = os.path.basename(file)
if is_file(file):
@ -187,10 +187,10 @@ def copy_files(src, dst, override=True, verbose=True):
def copy_dir(src, dst, override=True, verbose=True):
if verbose:
log_h3("copy_dir:")
log_h3(" src: " + src)
log_h3(" dst: " + dst)
log_h3(" override: " + str(override))
log("- copy_dir:")
log(" src: " + src)
log(" dst: " + dst)
log(" override: " + str(override))
if is_dir(dst):
delete_dir(dst)
try:
@ -201,11 +201,11 @@ def copy_dir(src, dst, override=True, verbose=True):
def copy_dir_content(src, dst, filter_include = "", filter_exclude = "", verbose=True):
if verbose:
log_h3("copy_dir_content:")
log_h3(" src: " + src)
log_h3(" dst: " + dst)
log_h3(" include: " + filter_include)
log_h3(" exclude: " + filter_exclude)
log("- copy_dir_content:")
log(" src: " + src)
log(" dst: " + dst)
log(" include: " + filter_include)
log(" exclude: " + filter_exclude)
src_folder = src
if ("/" != src[-1:]):
src_folder += "/"
@ -224,8 +224,8 @@ def copy_dir_content(src, dst, filter_include = "", filter_exclude = "", verbose
def delete_file(path, verbose=True):
if verbose:
log_h3("delete_file:")
log_h3(" path: " + path)
log("- delete_file:")
log(" path: " + path)
if not is_file(path):
log_err("file not exist")
return
@ -233,8 +233,8 @@ def delete_file(path, verbose=True):
def delete_dir(path, verbose=True):
if verbose:
log_h3("delete_dir:")
log_h3(" path: " + path)
log("- delete_dir:")
log(" path: " + path)
if not is_dir(path):
log_err("dir not exist")
return
@ -243,8 +243,8 @@ def delete_dir(path, verbose=True):
def delete_files(src, verbose=True):
if verbose:
log_h3("delete_files:")
log_h3(" pattern: " + src)
log("- delete_files:")
log(" pattern: " + src)
for path in glob.glob(src):
if verbose:
log(path)
@ -258,14 +258,16 @@ def set_summary(target, status):
common.summary.append({target: status})
return
def add_deploy_data(product, ptype, src, dst):
def add_deploy_data(product, ptype, src, dst, bucket, region):
common.deploy_data.append({
"platform": common.platforms[common.platform]["title"],
"product": product,
"type": ptype,
# "local": get_path(src),
"size": get_file_size(get_path(src)),
"remote": dst
"bucket": bucket,
"region": region,
"key": dst
})
file = open(get_path(common.workspace_dir + "/deploy.json"), 'w')
file.write(json.dumps(common.deploy_data, sort_keys=True, indent=4))
@ -274,93 +276,107 @@ def add_deploy_data(product, ptype, src, dst):
def cmd(*args, **kwargs):
if kwargs.get("verbose"):
log_h3("cmd:")
log_h3(" command: " + " ".join(args))
log("- cmd:")
log(" command: " + " ".join(args))
if kwargs.get("chdir"):
log_h3(" chdir: " + kwargs["chdir"])
log(" chdir: " + kwargs["chdir"])
if kwargs.get("creates"):
log_h3(" creates: " + kwargs["creates"])
log(" creates: " + kwargs["creates"])
if kwargs.get("creates") and is_exist(kwargs["creates"]):
log_err("creates exist")
return 0
return False
if kwargs.get("chdir") and is_dir(kwargs["chdir"]):
oldcwd = get_cwd()
set_cwd(kwargs["chdir"])
ret = subprocess.call(
[i for i in args], stderr=subprocess.STDOUT, shell=True
)
) == 0
if kwargs.get("chdir") and oldcwd:
set_cwd(oldcwd)
return ret
def cmd_output(*args, **kwargs):
if kwargs.get("verbose"):
log_h3("cmd_output:")
log_h3(" command: " + " ".join(args))
log("- cmd_output:")
log(" command: " + " ".join(args))
return subprocess.check_output(
[i for i in args], stderr=subprocess.STDOUT, shell=True
).decode("utf-8")
def powershell(*args, **kwargs):
if kwargs.get("verbose"):
log_h3("powershell:")
log_h3(" command: " + " ".join(args))
log("- powershell:")
log(" command: " + " ".join(args))
if kwargs.get("chdir"):
log_h3(" chdir: " + kwargs["chdir"])
log(" chdir: " + kwargs["chdir"])
if kwargs.get("creates"):
log_h3(" creates: " + kwargs["creates"])
log(" creates: " + kwargs["creates"])
if kwargs.get("creates") and is_exist(kwargs["creates"]):
return 0
return False
args = ["powershell", "-Command"] + [i for i in args]
ret = subprocess.call(
args, stderr=subprocess.STDOUT, shell=True
)
) == 0
return ret
def ps1(file, args=[], **kwargs):
if kwargs.get("verbose"):
log_h2("powershell cmdlet: " + file + " " + " ".join(args))
if kwargs.get("creates") and is_exist(kwargs["creates"]):
return 0
return True
ret = subprocess.call(
["powershell", file] + args, stderr=subprocess.STDOUT, shell=True
)
) == 0
return ret
def download_file(url, path, md5, verbose=False):
if verbose:
log_h3("download_file:")
log_h3(" url: " + path)
log_h3(" path: " + url)
log_h3(" md5: " + md5)
log("- download_file:")
log(" url: " + path)
log(" path: " + url)
log(" md5: " + md5)
if is_file(path):
if get_md5(path) == md5:
log_err("file already exist (match checksum)")
return 0
return True
else:
log_err("wrong checksum (%s), delete" % md5)
os.remove(path)
ret = powershell("(New-Object System.Net.WebClient).DownloadFile('%s','%s')" % (url, path), verbose=True)
ret = powershell(
"(New-Object System.Net.WebClient).DownloadFile('%s','%s')" % (url, path),
verbose=True
)
md5_new = get_md5(path)
if md5 != md5_new:
log_err("checksum didn't match (%s != %s)" % (md5, md5_new))
return 1
return False
return ret
def sh(command, **kwargs):
if kwargs.get("verbose"):
log_h3("sh:")
log_h3(" command: " + command)
log("- sh:")
log(" command: " + command)
if kwargs.get("chdir"):
log_h3(" chdir: " + kwargs["chdir"])
log(" chdir: " + kwargs["chdir"])
if kwargs.get("creates"):
log_h3(" creates: " + kwargs["creates"])
return subprocess.call(command, stderr=subprocess.STDOUT, shell=True)
log(" creates: " + kwargs["creates"])
if kwargs.get("creates") and is_exist(kwargs["creates"]):
log_err("creates exist")
return False
if kwargs.get("chdir") and is_dir(kwargs["chdir"]):
oldcwd = get_cwd()
set_cwd(kwargs["chdir"])
ret = subprocess.call(
command, stderr=subprocess.STDOUT, shell=True
) == 0
if kwargs.get("chdir") and oldcwd:
set_cwd(oldcwd)
return ret
def sh_output(command, **kwargs):
if kwargs.get("verbose"):
log_h3("sh_output:")
log_h3(" command: " + command)
log("- sh_output:")
log(" command: " + command)
return subprocess.check_output(
command, stderr=subprocess.STDOUT, shell=True
).decode("utf-8")

View File

@ -1 +1 @@
7.2.0
7.3.3