mirror of
https://github.com/ONLYOFFICE/build_tools.git
synced 2026-02-10 20:45:38 +08:00
Merge branch 'release/v7.4.0' into develop
This commit is contained in:
176
build.pro
176
build.pro
@ -9,122 +9,122 @@ include($$PWD/common.pri)
|
||||
CONFIG += ordered
|
||||
|
||||
core_windows {
|
||||
desktop:CONFIG += core_and_multimedia
|
||||
desktop:CONFIG += core_and_multimedia
|
||||
}
|
||||
core_linux {
|
||||
desktop:CONFIG += core_and_multimedia
|
||||
desktop:CONFIG += core_and_multimedia
|
||||
}
|
||||
core_mac {
|
||||
CONFIG += no_desktop_apps
|
||||
CONFIG += no_desktop_apps
|
||||
}
|
||||
core_ios {
|
||||
CONFIG += no_use_common_binary
|
||||
CONFIG += no_desktop_apps
|
||||
CONFIG += no_tests
|
||||
CONFIG += no_use_common_binary
|
||||
CONFIG += no_desktop_apps
|
||||
CONFIG += no_tests
|
||||
}
|
||||
core_android {
|
||||
CONFIG += no_use_common_binary
|
||||
CONFIG += no_desktop_apps
|
||||
CONFIG += no_tests
|
||||
CONFIG += no_use_common_binary
|
||||
CONFIG += no_desktop_apps
|
||||
CONFIG += no_tests
|
||||
}
|
||||
|
||||
addSubProject(cryptopp, $$CORE_ROOT_DIR/Common/3dParty/cryptopp/project/cryptopp.pro)
|
||||
addSubProject(unicodeconverter, $$CORE_ROOT_DIR/UnicodeConverter/UnicodeConverter.pro,\
|
||||
cryptopp)
|
||||
addSubProject(kernel, $$CORE_ROOT_DIR/Common/kernel.pro,\
|
||||
unicodeconverter)
|
||||
addSubProject(network, $$CORE_ROOT_DIR/Common/Network/network.pro,\
|
||||
kernel unicodeconverter)
|
||||
addSubProject(graphics, $$CORE_ROOT_DIR/DesktopEditor/graphics/pro/graphics.pro,\
|
||||
kernel unicodeconverter)
|
||||
addSubProject(pdffile, $$CORE_ROOT_DIR/PdfFile/PdfFile.pro,\
|
||||
kernel unicodeconverter graphics)
|
||||
addSubProject(djvufile, $$CORE_ROOT_DIR/DjVuFile/DjVuFile.pro,\
|
||||
kernel unicodeconverter graphics pdffile)
|
||||
addSubProject(xpsfile, $$CORE_ROOT_DIR/XpsFile/XpsFile.pro,\
|
||||
kernel unicodeconverter graphics pdffile)
|
||||
addSubProject(htmlrenderer, $$CORE_ROOT_DIR/HtmlRenderer/htmlrenderer.pro,\
|
||||
kernel unicodeconverter graphics)
|
||||
addSubProject(docxrenderer, $$CORE_ROOT_DIR/DocxRenderer/DocxRenderer.pro,\
|
||||
kernel unicodeconverter graphics)
|
||||
addSubProject(htmlfile2, $$CORE_ROOT_DIR/HtmlFile2/HtmlFile2.pro,\
|
||||
kernel unicodeconverter graphics network)
|
||||
addSubProject(doctrenderer, $$CORE_ROOT_DIR/DesktopEditor/doctrenderer/doctrenderer.pro,\
|
||||
kernel unicodeconverter graphics)
|
||||
addSubProject(fb2file, $$CORE_ROOT_DIR/Fb2File/Fb2File.pro,\
|
||||
kernel unicodeconverter graphics)
|
||||
addSubProject(epubfile, $$CORE_ROOT_DIR/EpubFile/CEpubFile.pro,\
|
||||
kernel unicodeconverter graphics htmlfile2)
|
||||
addSubProject(cryptopp, $$CORE_ROOT_DIR/Common/3dParty/cryptopp/project/cryptopp.pro)
|
||||
addSubProject(cfcpp, $$CORE_ROOT_DIR/Common/cfcpp/cfcpp.pro)
|
||||
addSubProject(unicodeconverter, $$CORE_ROOT_DIR/UnicodeConverter/UnicodeConverter.pro,\
|
||||
cryptopp)
|
||||
addSubProject(kernel, $$CORE_ROOT_DIR/Common/kernel.pro,\
|
||||
unicodeconverter)
|
||||
addSubProject(network, $$CORE_ROOT_DIR/Common/Network/network.pro,\
|
||||
kernel unicodeconverter)
|
||||
addSubProject(graphics, $$CORE_ROOT_DIR/DesktopEditor/graphics/pro/graphics.pro,\
|
||||
kernel unicodeconverter)
|
||||
addSubProject(pdffile, $$CORE_ROOT_DIR/PdfFile/PdfFile.pro,\
|
||||
kernel unicodeconverter graphics)
|
||||
addSubProject(djvufile, $$CORE_ROOT_DIR/DjVuFile/DjVuFile.pro,\
|
||||
kernel unicodeconverter graphics pdffile)
|
||||
addSubProject(xpsfile, $$CORE_ROOT_DIR/XpsFile/XpsFile.pro,\
|
||||
kernel unicodeconverter graphics pdffile)
|
||||
addSubProject(htmlrenderer, $$CORE_ROOT_DIR/HtmlRenderer/htmlrenderer.pro,\
|
||||
kernel unicodeconverter graphics)
|
||||
addSubProject(docxrenderer, $$CORE_ROOT_DIR/DocxRenderer/DocxRenderer.pro,\
|
||||
kernel unicodeconverter graphics)
|
||||
addSubProject(htmlfile2, $$CORE_ROOT_DIR/HtmlFile2/HtmlFile2.pro,\
|
||||
kernel unicodeconverter graphics network)
|
||||
addSubProject(doctrenderer, $$CORE_ROOT_DIR/DesktopEditor/doctrenderer/doctrenderer.pro,\
|
||||
kernel unicodeconverter graphics)
|
||||
addSubProject(fb2file, $$CORE_ROOT_DIR/Fb2File/Fb2File.pro,\
|
||||
kernel unicodeconverter graphics)
|
||||
addSubProject(epubfile, $$CORE_ROOT_DIR/EpubFile/CEpubFile.pro,\
|
||||
kernel unicodeconverter graphics htmlfile2)
|
||||
!no_x2t {
|
||||
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(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(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(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(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)
|
||||
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)
|
||||
addSubProject(allthemesgen, $$CORE_ROOT_DIR/DesktopEditor/allthemesgen/allthemesgen.pro,\
|
||||
kernel unicodeconverter graphics)
|
||||
addSubProject(docbuilder, $$CORE_ROOT_DIR/DesktopEditor/doctrenderer/app_builder/docbuilder.pro,\
|
||||
kernel unicodeconverter graphics doctrenderer)
|
||||
addSubProject(pluginsmanager, $$CORE_ROOT_DIR/DesktopEditor/pluginsmanager/pluginsmanager.pro,\
|
||||
kernel)
|
||||
addSubProject(allfontsgen, $$CORE_ROOT_DIR/DesktopEditor/AllFontsGen/AllFontsGen.pro,\
|
||||
kernel unicodeconverter graphics)
|
||||
addSubProject(allthemesgen, $$CORE_ROOT_DIR/DesktopEditor/allthemesgen/allthemesgen.pro,\
|
||||
kernel unicodeconverter graphics)
|
||||
addSubProject(docbuilder, $$CORE_ROOT_DIR/DesktopEditor/doctrenderer/app_builder/docbuilder.pro,\
|
||||
kernel unicodeconverter graphics doctrenderer)
|
||||
addSubProject(pluginsmanager, $$CORE_ROOT_DIR/DesktopEditor/pluginsmanager/pluginsmanager.pro,\
|
||||
kernel)
|
||||
}
|
||||
|
||||
!no_tests {
|
||||
addSubProject(standardtester, $$CORE_ROOT_DIR/Test/Applications/StandardTester/standardtester.pro)
|
||||
addSubProject(x2ttester, $$CORE_ROOT_DIR/Test/Applications/x2tTester/x2ttester.pro)
|
||||
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)
|
||||
#TODO:
|
||||
!linux_arm64:addSubProject(ooxml_crypt, $$CORE_ROOT_DIR/OfficeCryptReader/ooxml_crypt/ooxml_crypt.pro)
|
||||
}
|
||||
|
||||
core_and_multimedia {
|
||||
addSubProject(videoplayer, $$ROOT_DIR/desktop-sdk/ChromiumBasedEditors/videoplayerlib/videoplayerlib.pro,\
|
||||
kernel unicodeconverter graphics)
|
||||
addSubProject(videoplayer, $$ROOT_DIR/desktop-sdk/ChromiumBasedEditors/videoplayerlib/videoplayerlib.pro,\
|
||||
kernel unicodeconverter graphics)
|
||||
}
|
||||
desktop {
|
||||
message(desktop)
|
||||
addSubProject(hunspell, $$CORE_ROOT_DIR/Common/3dParty/hunspell/qt/hunspell.pro)
|
||||
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 pdffile djvufile xpsfile)
|
||||
addSubProject(documentscore_helper, $$ROOT_DIR/desktop-sdk/ChromiumBasedEditors/lib/ascdocumentscore_helper.pro,\
|
||||
documentscore)
|
||||
!core_mac {
|
||||
addSubProject(qtdocumentscore, $$ROOT_DIR/desktop-sdk/ChromiumBasedEditors/lib/qt_wrapper/qtascdocumentscore.pro,\
|
||||
documentscore)
|
||||
}
|
||||
message(desktop)
|
||||
addSubProject(hunspell, $$CORE_ROOT_DIR/Common/3dParty/hunspell/qt/hunspell.pro)
|
||||
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 pdffile djvufile xpsfile)
|
||||
addSubProject(documentscore_helper, $$ROOT_DIR/desktop-sdk/ChromiumBasedEditors/lib/ascdocumentscore_helper.pro,\
|
||||
documentscore)
|
||||
!core_mac {
|
||||
addSubProject(qtdocumentscore, $$ROOT_DIR/desktop-sdk/ChromiumBasedEditors/lib/qt_wrapper/qtascdocumentscore.pro,\
|
||||
documentscore)
|
||||
}
|
||||
|
||||
!no_desktop_apps {
|
||||
core_windows:addSubProject(projicons, $$ROOT_DIR/desktop-apps/win-linux/extras/projicons/ProjIcons.pro,\
|
||||
documentscore videoplayer)
|
||||
core_windows:!build_xp:addSubProject(updatedaemon, $$ROOT_DIR/desktop-apps/win-linux/extras/update-daemon/UpdateDaemon.pro)
|
||||
addSubProject(desktopapp, $$ROOT_DIR/desktop-apps/win-linux/ASCDocumentEditor.pro,\
|
||||
documentscore videoplayer)
|
||||
}
|
||||
!no_desktop_apps {
|
||||
core_windows:addSubProject(projicons, $$ROOT_DIR/desktop-apps/win-linux/extras/projicons/ProjIcons.pro,\
|
||||
documentscore videoplayer)
|
||||
core_windows:!build_xp:addSubProject(updatedaemon, $$ROOT_DIR/desktop-apps/win-linux/extras/update-daemon/UpdateDaemon.pro)
|
||||
addSubProject(desktopapp, $$ROOT_DIR/desktop-apps/win-linux/ASCDocumentEditor.pro,\
|
||||
documentscore videoplayer)
|
||||
}
|
||||
}
|
||||
|
||||
mobile {
|
||||
message(mobile)
|
||||
!desktop {
|
||||
addSubProject(hunspell, $$CORE_ROOT_DIR/Common/3dParty/hunspell/qt/hunspell.pro)
|
||||
}
|
||||
message(mobile)
|
||||
!desktop {
|
||||
addSubProject(hunspell, $$CORE_ROOT_DIR/Common/3dParty/hunspell/qt/hunspell.pro)
|
||||
}
|
||||
}
|
||||
|
||||
2
make.py
2
make.py
@ -78,8 +78,6 @@ if config.check_option("module", "desktop"):
|
||||
base.set_env("DESKTOP_URL_UPDATES_MAIN_CHANNEL", "https://download.onlyoffice.com/install/desktop/editors/windows/onlyoffice/appcast.json")
|
||||
base.set_env("DESKTOP_URL_UPDATES_DEV_CHANNEL", "https://download.onlyoffice.com/install/desktop/editors/windows/onlyoffice/appcastdev.json")
|
||||
|
||||
|
||||
|
||||
if ("windows" == base.host_platform()):
|
||||
base.set_env("VIDEO_PLAYER_VLC_DIR", base_dir + "/../desktop-sdk/ChromiumBasedEditors/videoplayerlib/vlc")
|
||||
|
||||
|
||||
@ -25,6 +25,7 @@ args = parser.parse_args()
|
||||
common.workspace_dir = utils.get_abspath(utils.get_script_dir(__file__) + "/..")
|
||||
common.os_family = utils.host_platform()
|
||||
common.platform = args.platform
|
||||
common.prefix = common.platformPrefixes[common.platform] if common.platform in common.platformPrefixes else ""
|
||||
common.targets = args.targets
|
||||
common.clean = "clean" in args.targets
|
||||
common.sign = "sign" in args.targets
|
||||
@ -39,6 +40,7 @@ common.deploy_data = []
|
||||
utils.log("workspace_dir: " + common.workspace_dir)
|
||||
utils.log("os_family: " + common.os_family)
|
||||
utils.log("platform: " + str(common.platform))
|
||||
utils.log("prefix: " + str(common.prefix))
|
||||
utils.log("targets: " + str(common.targets))
|
||||
utils.log("clean: " + str(common.clean))
|
||||
utils.log("sign: " + str(common.sign))
|
||||
|
||||
@ -12,6 +12,7 @@ import config
|
||||
import codecs
|
||||
import re
|
||||
import stat
|
||||
import json
|
||||
|
||||
# common functions --------------------------------------
|
||||
def get_script_dir(file=""):
|
||||
@ -480,6 +481,7 @@ def get_repositories():
|
||||
result["web-apps"] = [False, False]
|
||||
result.update(get_web_apps_addons())
|
||||
result["dictionaries"] = [False, False]
|
||||
result["core-fonts"] = [False, False]
|
||||
|
||||
if config.check_option("module", "builder"):
|
||||
result["document-templates"] = [False, False]
|
||||
@ -494,9 +496,6 @@ def get_repositories():
|
||||
result.update(get_server_addons())
|
||||
result["document-server-integration"] = [False, False]
|
||||
result["document-templates"] = [False, False]
|
||||
|
||||
if (config.check_option("module", "server") or config.check_option("platform", "ios")):
|
||||
result["core-fonts"] = [False, False]
|
||||
|
||||
get_branding_repositories(result)
|
||||
return result
|
||||
@ -1161,10 +1160,13 @@ def copy_sdkjs_plugin(src_dir, dst_dir, name, is_name_as_guid=False, is_desktop_
|
||||
if is_dir(dst_dir_path):
|
||||
delete_dir(dst_dir_path)
|
||||
create_dir(dst_dir_path)
|
||||
copy_dir_content(src_dir_path, dst_dir + "/" + guid, "", ".git")
|
||||
copy_dir_content(src_dir_path, dst_dir_path, "", ".git")
|
||||
if is_desktop_local:
|
||||
for file in glob.glob(dst_dir + "/" + guid + "/*.html"):
|
||||
for file in glob.glob(dst_dir_path + "/*.html"):
|
||||
replaceInFile(file, "https://onlyoffice.github.io/sdkjs-plugins/", "../")
|
||||
dst_deploy_dir = dst_dir_path + "/deploy"
|
||||
if is_dir(dst_deploy_dir):
|
||||
delete_dir(dst_deploy_dir)
|
||||
return
|
||||
|
||||
def copy_sdkjs_plugins(dst_dir, is_name_as_guid=False, is_desktop_local=False):
|
||||
@ -1205,6 +1207,14 @@ def support_old_versions_plugins(out_dir):
|
||||
delete_file(out_dir + "/plugins-ui.js")
|
||||
return
|
||||
|
||||
def generate_sdkjs_plugin_list(dst):
|
||||
plugins_list = config.option("sdkjs-plugin").rsplit(", ") \
|
||||
+ config.option("sdkjs-plugin-server").rsplit(", ")
|
||||
with open(get_path(dst), 'w') as file:
|
||||
dump = json.dumps(sorted(plugins_list), indent=4)
|
||||
file.write(re.sub(r"^(\s{4})", '\t', dump, 0, re.MULTILINE))
|
||||
return
|
||||
|
||||
def get_xcode_major_version():
|
||||
version = run_command("xcodebuild -version")['stdout']
|
||||
return int(version.split('.')[0][6:])
|
||||
|
||||
@ -107,6 +107,11 @@ def parse():
|
||||
if not "arm64-toolchain-bin" in options:
|
||||
options["arm64-toolchain-bin"] = "/usr/bin"
|
||||
|
||||
if check_option("platform", "ios"):
|
||||
if not check_option("config", "no_bundle_xcframeworks"):
|
||||
if not check_option("config", "bundle_xcframeworks"):
|
||||
extend_option("config", "bundle_xcframeworks")
|
||||
|
||||
if check_option("config", "bundle_xcframeworks"):
|
||||
if not check_option("config", "bundle_dylibs"):
|
||||
extend_option("config", "bundle_dylibs")
|
||||
@ -228,13 +233,10 @@ def is_v8_60():
|
||||
if ("linux" == base.host_platform()) and (5004 > base.get_gcc_version()) and not check_option("platform", "android"):
|
||||
return True
|
||||
|
||||
if check_option("platform", "android"):
|
||||
return True
|
||||
|
||||
if ("windows" == base.host_platform()) and ("2015" == option("vs-version")):
|
||||
return True
|
||||
|
||||
if check_option("config", "use_v8"):
|
||||
return True
|
||||
#if check_option("config", "use_v8"):
|
||||
# return True
|
||||
|
||||
return False
|
||||
|
||||
@ -28,6 +28,9 @@ def make():
|
||||
elif (config.check_option("config", "cef_version_107")):
|
||||
url += "5304/"
|
||||
archive_name = "./cef_binary_107.7z"
|
||||
elif ("mac_64" == platform) and (config.check_option("config", "use_v8")):
|
||||
url += "5060/"
|
||||
archive_name = "./cef_binary_103.7z"
|
||||
else:
|
||||
url += "5414/"
|
||||
|
||||
@ -45,6 +48,8 @@ def make():
|
||||
build_dir_name = "build"
|
||||
if (0 == platform.find("linux")) and (config.check_option("config", "cef_version_107")):
|
||||
build_dir_name = "build_107"
|
||||
if ("mac_64" == platform) and (config.check_option("config", "use_v8")):
|
||||
build_dir_name = "build_103"
|
||||
|
||||
if (data_url != old_data_url):
|
||||
if base.is_file(archive_name):
|
||||
@ -70,7 +75,7 @@ def make():
|
||||
|
||||
# deploy
|
||||
if (0 == platform.find("mac")):
|
||||
base.cmd("mv", ["Chromium Embedded Framework.framework", "build/Chromium Embedded Framework.framework"])
|
||||
base.cmd("mv", ["Chromium Embedded Framework.framework", build_dir_name + "/Chromium Embedded Framework.framework"])
|
||||
base.delete_dir("./Chromium Embedded Framework.framework")
|
||||
else:
|
||||
base.copy_files("cef_binary/Release/*", build_dir_name + "/")
|
||||
|
||||
@ -99,7 +99,10 @@ def make():
|
||||
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)
|
||||
v8_branch_version = "remotes/branch-heads/8.9"
|
||||
if ("mac" == base.host_platform()):
|
||||
v8_branch_version = "remotes/branch-heads/9.9"
|
||||
base.cmd("./depot_tools/gclient", ["sync", "-r", v8_branch_version], True)
|
||||
base.cmd("gclient", ["sync", "--force"], True)
|
||||
base.copy_dir("./v8/third_party_new/ninja", "./v8/third_party/ninja")
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ def deploy_marketplace_plugin(git_dir, root_dir):
|
||||
|
||||
# plugin manager with local paths
|
||||
sys_plugins_dir = root_dir + "/editors/sdkjs-plugins"
|
||||
base.clone_marketplace_plugin(sys_plugins_dir, True, True, False, "K0R0L")
|
||||
base.clone_marketplace_plugin(sys_plugins_dir, True, True, False)
|
||||
|
||||
# store with local paths
|
||||
manager_dir = sys_plugins_dir + "/{AA2EA9B6-9EC2-415F-9762-634EE8D9A95E}"
|
||||
@ -126,6 +126,8 @@ def make():
|
||||
build_dir_name = "build"
|
||||
if (0 == platform.find("linux")) and (config.check_option("config", "cef_version_107")):
|
||||
build_dir_name = "build_107"
|
||||
elif (0 == platform.find("mac")) and (config.check_option("config", "use_v8")):
|
||||
build_dir_name = "build_103"
|
||||
|
||||
if not isWindowsXP:
|
||||
base.copy_files(core_dir + "/Common/3dParty/cef/" + platform + "/" + build_dir_name + "/*", root_dir)
|
||||
@ -218,19 +220,6 @@ def make():
|
||||
base.copy_dir(base_dir + "/js/" + branding + "/desktop/web-apps", root_dir + "/editors/web-apps")
|
||||
base.copy_dir(git_dir + "/desktop-sdk/ChromiumBasedEditors/resources/local", root_dir + "/editors/sdkjs/common/Images/local")
|
||||
|
||||
# desktopeditors-help
|
||||
root_help_dir = root_dir + "-help"
|
||||
if (base.is_dir(root_help_dir)):
|
||||
base.delete_dir(root_help_dir)
|
||||
for i in ["common", "documenteditor", "presentationeditor", "spreadsheeteditor"]:
|
||||
base.copy_dir(
|
||||
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") and not isWindowsXP):
|
||||
# remove help from install until web-apps containes help
|
||||
base.delete_dir(root_dir + "/editors/web-apps/apps/%s/main/resources/help" % i)
|
||||
|
||||
base.create_dir(root_dir + "/editors/sdkjs-plugins")
|
||||
base.copy_sdkjs_plugins(root_dir + "/editors/sdkjs-plugins", True, True)
|
||||
# remove some default plugins
|
||||
|
||||
@ -86,6 +86,16 @@ def make():
|
||||
if (0 == platform.find("mac")):
|
||||
base.mac_correct_rpath_x2t(root_dir)
|
||||
|
||||
base.create_dir(root_dir + "/fonts")
|
||||
base.copy_file(git_dir + "/core-fonts/ASC.ttf", root_dir + "/fonts/ASC.ttf")
|
||||
base.copy_dir(git_dir + "/core-fonts/asana", root_dir + "/fonts/asana")
|
||||
base.copy_dir(git_dir + "/core-fonts/caladea", root_dir + "/fonts/caladea")
|
||||
base.copy_dir(git_dir + "/core-fonts/crosextra", root_dir + "/fonts/crosextra")
|
||||
base.copy_dir(git_dir + "/core-fonts/openoffice", root_dir + "/fonts/openoffice")
|
||||
if (0 == platform.find("android")):
|
||||
base.copy_dir(git_dir + "/core-fonts/dejavu", root_dir + "/fonts/dejavu")
|
||||
base.copy_dir(git_dir + "/core-fonts/liberation", root_dir + "/fonts/liberation")
|
||||
|
||||
for native_platform in platforms:
|
||||
if native_platform == "android":
|
||||
# make full version
|
||||
@ -95,6 +105,8 @@ def make():
|
||||
base.create_dir(root_dir)
|
||||
# js
|
||||
base.copy_dir(base_dir + "/js/" + branding + "/mobile/sdkjs", root_dir + "/sdkjs")
|
||||
# fonts
|
||||
base.copy_dir(base_dir + "/js/" + branding + "/mobile/fonts", root_dir + "/fonts")
|
||||
# app
|
||||
base.generate_doctrenderer_config(root_dir + "/DoctRenderer.config", "./", "builder")
|
||||
libs_dir = root_dir + "/lib"
|
||||
|
||||
@ -121,8 +121,11 @@ def make():
|
||||
|
||||
# plugins
|
||||
base.create_dir(js_dir + "/sdkjs-plugins")
|
||||
base.copy_sdkjs_plugins(js_dir + "/sdkjs-plugins", False, True)
|
||||
base.copy_sdkjs_plugins_server(js_dir + "/sdkjs-plugins", False, True)
|
||||
if ("1" == config.option("preinstalled-plugins")):
|
||||
base.copy_sdkjs_plugins(js_dir + "/sdkjs-plugins", False, True)
|
||||
base.copy_sdkjs_plugins_server(js_dir + "/sdkjs-plugins", False, True)
|
||||
else:
|
||||
base.generate_sdkjs_plugin_list(js_dir + "/sdkjs-plugins/plugin-list-default.json")
|
||||
base.create_dir(js_dir + "/sdkjs-plugins/v1")
|
||||
base.download("https://onlyoffice.github.io/sdkjs-plugins/v1/plugins.js", js_dir + "/sdkjs-plugins/v1/plugins.js")
|
||||
base.download("https://onlyoffice.github.io/sdkjs-plugins/v1/plugins-ui.js", js_dir + "/sdkjs-plugins/v1/plugins-ui.js")
|
||||
@ -136,7 +139,8 @@ def make():
|
||||
base.create_dir(tools_dir)
|
||||
base.copy_exe(core_build_dir + "/bin/" + platform_postfix, tools_dir, "allfontsgen")
|
||||
base.copy_exe(core_build_dir + "/bin/" + platform_postfix, tools_dir, "allthemesgen")
|
||||
base.copy_exe(core_build_dir + "/bin/" + platform_postfix, tools_dir, "pluginsmanager")
|
||||
if ("1" != config.option("preinstalled-plugins")):
|
||||
base.copy_exe(core_build_dir + "/bin/" + platform_postfix, tools_dir, "pluginsmanager")
|
||||
|
||||
branding_dir = server_dir + "/branding"
|
||||
if("" != config.option("branding") and "onlyoffice" != config.option("branding")):
|
||||
|
||||
@ -67,7 +67,7 @@ def make():
|
||||
base.create_dir(git_dir + "/sdkjs-plugins")
|
||||
|
||||
base.support_old_versions_plugins(git_dir + "/sdkjs-plugins")
|
||||
base.clone_marketplace_plugin(git_dir + "/sdkjs-plugins")
|
||||
base.clone_marketplace_plugin(git_dir + "/sdkjs-plugins", False, False, False)
|
||||
|
||||
if not base.is_dir(git_dir + "/fonts"):
|
||||
base.create_dir(git_dir + "/fonts")
|
||||
|
||||
@ -18,6 +18,7 @@ if utils.is_windows():
|
||||
desktop_product_name_s = desktop_product_name.replace(" ","")
|
||||
desktop_package_name = company_name + "-" + desktop_product_name_s
|
||||
desktop_vcredist_list = ["2022"]
|
||||
desktop_changes_dir = "desktop-apps/win-linux/package/windows/update/changes"
|
||||
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"
|
||||
|
||||
|
||||
@ -21,11 +21,16 @@ def aws_s3_upload(files, key, ptype=None):
|
||||
ret = True
|
||||
key = "builder/" + key
|
||||
for file in files:
|
||||
if not utils.is_file(file):
|
||||
utils.log_err("file not exist: " + file)
|
||||
ret &= False
|
||||
continue
|
||||
args = ["aws"]
|
||||
if hasattr(branding, "s3_endpoint_url"):
|
||||
args += ["--endpoint-url=" + branding.s3_endpoint_url]
|
||||
args += [
|
||||
"s3", "cp", "--no-progress", "--acl", "public-read",
|
||||
"--metadata", "md5=" + utils.get_md5(file),
|
||||
file, "s3://" + branding.s3_bucket + "/" + key
|
||||
]
|
||||
if common.os_family == "windows":
|
||||
@ -43,7 +48,7 @@ def make_windows():
|
||||
global inno_file, zip_file, suffix, key_prefix
|
||||
utils.set_cwd("document-builder-package")
|
||||
|
||||
prefix = common.platforms[common.platform]["prefix"]
|
||||
prefix = common.platformPrefixes[common.platform]
|
||||
company = branding.company_name
|
||||
product = branding.builder_product_name.replace(" ","")
|
||||
source_dir = "..\\build_tools\\out\\%s\\%s\\%s" % (prefix, company, product)
|
||||
|
||||
@ -1,16 +1,30 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
platforms = {
|
||||
"windows_x64": { "title": "Windows x64", "prefix": "win_64" },
|
||||
"windows_x64_xp": { "title": "Windows x64 XP", "prefix": "win_64_xp" },
|
||||
"windows_x86": { "title": "Windows x86", "prefix": "win_32" },
|
||||
"windows_x86_xp": { "title": "Windows x86 XP", "prefix": "win_32_xp" },
|
||||
"darwin_x86_64": { "title": "macOS x86_64", "prefix": "mac_64" },
|
||||
"darwin_x86_64_v8": { "title": "macOS x86_64 V8", "prefix": "mac_64" },
|
||||
"darwin_arm64": { "title": "macOS arm64", "prefix": "mac_arm64" },
|
||||
"linux_x86_64": { "title": "Linux x86_64", "prefix": "linux_64" },
|
||||
"linux_aarch64": { "title": "Linux aarch64", "prefix": "linux_arm64" },
|
||||
"android": { "title": "Android" }
|
||||
platformTitles = {
|
||||
"windows_x64": "Windows x64",
|
||||
"windows_x86": "Windows x86",
|
||||
"windows_x64_xp": "Windows x64 XP",
|
||||
"windows_x86_xp": "Windows x86 XP",
|
||||
"darwin_x86_64": "macOS x86_64",
|
||||
"darwin_arm64": "macOS arm64",
|
||||
"darwin_x86_64_v8": "macOS x86_64 V8",
|
||||
"linux_x86_64": "Linux x86_64",
|
||||
"linux_aarch64": "Linux aarch64",
|
||||
"linux_x86_64_cef": "Linux x86_64 cef107",
|
||||
"android": "Android",
|
||||
}
|
||||
|
||||
platformPrefixes = {
|
||||
"windows_x64": "win_64",
|
||||
"windows_x86": "win_32",
|
||||
"windows_x64_xp": "win_64_xp",
|
||||
"windows_x86_xp": "win_32_xp",
|
||||
"darwin_x86_64": "mac_64",
|
||||
"darwin_arm64": "mac_arm64",
|
||||
"darwin_x86_64_v8": "mac_64",
|
||||
"linux_x86_64": "linux_64",
|
||||
"linux_aarch64": "linux_arm64",
|
||||
"linux_x86_64_cef": "linux_64",
|
||||
}
|
||||
|
||||
out_dir = "build_tools/out"
|
||||
|
||||
@ -14,7 +14,7 @@ def make():
|
||||
return
|
||||
|
||||
def make_core():
|
||||
prefix = common.platforms[common.platform]["prefix"]
|
||||
prefix = common.platformPrefixes[common.platform]
|
||||
company = branding.company_name.lower()
|
||||
repos = {
|
||||
"windows_x64": { "repo": "windows", "arch": "x64", "version": common.version + "." + common.build },
|
||||
@ -34,12 +34,13 @@ def make_core():
|
||||
utils.set_summary("core deploy", False)
|
||||
return
|
||||
if not utils.is_file(core_7z):
|
||||
utils.log_err("core.7z does not exist")
|
||||
utils.log_err("file not exist: " + core_7z)
|
||||
utils.set_summary("core deploy", False)
|
||||
return
|
||||
|
||||
utils.log_h2("core deploy")
|
||||
args = ["aws", "s3", "cp", "--acl", "public-read", "--no-progress",
|
||||
"--metadata", "md5=" + utils.get_md5(core_7z),
|
||||
core_7z, "s3://" + branding.s3_bucket + "/" + dest_version + "core.7z"]
|
||||
if common.os_family == "windows":
|
||||
ret = utils.cmd(*args, verbose=True)
|
||||
@ -63,7 +64,14 @@ def deploy_closure_maps(license):
|
||||
utils.log_h1("CLOSURE MAPS")
|
||||
utils.set_cwd(utils.get_path("sdkjs/build/maps"))
|
||||
|
||||
branch = utils.get_env("BRANCH_NAME")
|
||||
maps = utils.glob_path("*.js.map")
|
||||
|
||||
if branch is None:
|
||||
utils.log_err("BRANCH_NAME variable is undefined")
|
||||
utils.set_summary("closure maps " + license + " deploy", False)
|
||||
return
|
||||
|
||||
if not maps:
|
||||
utils.log_err("files do not exist")
|
||||
utils.set_summary("closure maps " + license + " deploy", False)
|
||||
@ -77,8 +85,8 @@ def deploy_closure_maps(license):
|
||||
if hasattr(branding, "s3_endpoint_url"):
|
||||
args += ["--endpoint-url=" + branding.s3_endpoint_url]
|
||||
args += [
|
||||
"s3", "cp", "--no-progress", file,
|
||||
"s3://" + branding.s3_bucket + "/" + dest + "/"
|
||||
"s3", "cp", "--no-progress", "--metadata", "md5=" + utils.get_md5(file),
|
||||
file, "s3://" + branding.s3_bucket + "/" + dest + "/"
|
||||
]
|
||||
if common.os_family == "windows":
|
||||
upload = utils.cmd(*args, verbose=True)
|
||||
|
||||
@ -5,6 +5,7 @@ import os
|
||||
import package_utils as utils
|
||||
import package_common as common
|
||||
import package_branding as branding
|
||||
import config
|
||||
|
||||
def make():
|
||||
utils.log_h1("DESKTOP")
|
||||
@ -24,11 +25,16 @@ def aws_s3_upload(files, key, ptype=None):
|
||||
ret = True
|
||||
key = "desktop/" + key
|
||||
for file in files:
|
||||
if not utils.is_file(file):
|
||||
utils.log_err("file not exist: " + file)
|
||||
ret &= False
|
||||
continue
|
||||
args = ["aws"]
|
||||
if hasattr(branding, "s3_endpoint_url"):
|
||||
args += ["--endpoint-url=" + branding.s3_endpoint_url]
|
||||
args += [
|
||||
"s3", "cp", "--no-progress", "--acl", "public-read",
|
||||
"--metadata", "md5=" + utils.get_md5(file),
|
||||
file, "s3://" + branding.s3_bucket + "/" + key
|
||||
]
|
||||
if common.os_family == "windows":
|
||||
@ -47,35 +53,24 @@ def aws_s3_upload(files, key, ptype=None):
|
||||
#
|
||||
|
||||
def make_windows():
|
||||
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
|
||||
global package_version, arch_list, source_dir, desktop_dir, viewer_dir, \
|
||||
inno_file, inno_help_file, inno_sa_file, inno_update_file, advinst_file, zip_file
|
||||
utils.set_cwd("desktop-apps\\win-linux\\package\\windows")
|
||||
|
||||
prefix = common.platforms[common.platform]["prefix"]
|
||||
company = branding.company_name
|
||||
product = branding.desktop_product_name.replace(" ","")
|
||||
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",
|
||||
"windows_x86": "x86",
|
||||
"windows_x86_xp": "x86"
|
||||
}
|
||||
inno_arch_list = {
|
||||
"windows_x64": "64",
|
||||
"windows_x86": "32",
|
||||
"windows_x64_xp": "64",
|
||||
"windows_x86_xp": "32"
|
||||
}
|
||||
suffix = arch_list[common.platform]
|
||||
if common.platform.endswith("_xp"): suffix += "-xp"
|
||||
zip_file = "build\\%s-%s-%s.zip" % (package_name, package_version, suffix)
|
||||
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_sa_file = "%s-Standalone-%s-%s.exe" % (package_name, package_version, suffix)
|
||||
inno_update_file = "update\\editors_update_%s.exe" % suffix.replace("-","_")
|
||||
advinst_file = "%s-%s-%s.msi" % (package_name, package_version, suffix)
|
||||
|
||||
@ -94,10 +89,14 @@ def make_windows():
|
||||
utils.delete_files("update\\*.html")
|
||||
|
||||
utils.log_h2("copy arifacts")
|
||||
utils.create_dir("build\\desktop")
|
||||
utils.create_dir("build\\help")
|
||||
utils.copy_dir_content(source_dir, "build\\desktop\\")
|
||||
utils.copy_dir_content(source_help_dir, "build\\help\\")
|
||||
source_dir = "%s\\build_tools\\out\\%s\\%s" \
|
||||
% (common.workspace_dir, common.prefix, branding.company_name)
|
||||
utils.create_dir("build")
|
||||
desktop_dir = "build\\" + branding.desktop_product_name_s
|
||||
utils.copy_dir(source_dir + "\\" + branding.desktop_product_name_s, desktop_dir)
|
||||
if not branding.onlyoffice:
|
||||
viewer_dir = "build\\" + branding.viewer_product_name_s
|
||||
utils.copy_dir(source_dir + "\\" + branding.viewer_product_name_s, viewer_dir)
|
||||
|
||||
make_zip()
|
||||
|
||||
@ -107,7 +106,7 @@ 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 standalone build", False)
|
||||
utils.set_summary("desktop inno update build", False)
|
||||
utils.set_summary("desktop advinst build", False)
|
||||
utils.set_cwd(common.workspace_dir)
|
||||
@ -115,9 +114,6 @@ def make_windows():
|
||||
|
||||
make_inno()
|
||||
|
||||
if branding.onlyoffice and common.platform in ["windows_x64", "windows_x86"]:
|
||||
make_inno_help()
|
||||
|
||||
if common.platform == "windows_x64":
|
||||
make_update_files()
|
||||
|
||||
@ -130,14 +126,13 @@ def make_windows():
|
||||
def make_zip():
|
||||
utils.log_h2("desktop zip build")
|
||||
|
||||
args = ["-OutFile", zip_file]
|
||||
args = ["-DesktopPath", desktop_dir, "-OutFile", zip_file]
|
||||
if common.sign:
|
||||
args += [
|
||||
"-Sign",
|
||||
"-CertName", branding.cert_name
|
||||
]
|
||||
args += ["-Sign", "-CertName", branding.cert_name]
|
||||
if branding.onlyoffice and not common.platform.endswith("_xp"):
|
||||
args += ["-ExcludeHelp"]
|
||||
ret = utils.ps1(
|
||||
"make_zip.ps1", args, creates=zip_file, verbose=True
|
||||
"make_zip.ps1", args, creates=zip_file, verbose=True
|
||||
)
|
||||
utils.set_summary("desktop zip build", ret)
|
||||
|
||||
@ -162,22 +157,28 @@ def download_vcredist(year):
|
||||
return ret
|
||||
|
||||
def make_inno():
|
||||
global iscc_args
|
||||
utils.log_h2("desktop inno build")
|
||||
utils.log_h3(inno_file)
|
||||
|
||||
inno_arch_list = {
|
||||
"windows_x64": "64",
|
||||
"windows_x86": "32",
|
||||
"windows_x64_xp": "64",
|
||||
"windows_x86_xp": "32"
|
||||
}
|
||||
iscc_args = [
|
||||
"/Qp",
|
||||
"/DVERSION=" + package_version,
|
||||
"/DsAppVersion=" + package_version,
|
||||
"/DDEPLOY_PATH=" + source_dir,
|
||||
"/D_ARCH=" + inno_arch_list[common.platform]
|
||||
"/DDEPLOY_PATH=" + desktop_dir,
|
||||
"/DARCH=" + arch_list[common.platform],
|
||||
"/D_ARCH=" + inno_arch_list[common.platform],
|
||||
]
|
||||
if branding.onlyoffice:
|
||||
iscc_args.append("/D_ONLYOFFICE=1")
|
||||
else:
|
||||
iscc_args.append("/DsBrandingFolder=" + \
|
||||
utils.get_abspath(common.workspace_dir + "\\" + common.branding + "\\desktop-apps"))
|
||||
if common.platform in ["windows_x64_xp", "windows_x86_xp"]:
|
||||
if common.platform.endswith("_xp"):
|
||||
iscc_args.append("/D_WIN_XP=1")
|
||||
if common.sign:
|
||||
iscc_args.append("/DENABLE_SIGNING=1")
|
||||
@ -187,115 +188,62 @@ def make_inno():
|
||||
ret = utils.cmd(*args, creates=inno_file, verbose=True)
|
||||
utils.set_summary("desktop inno build", ret)
|
||||
|
||||
if common.deploy and ret:
|
||||
if branding.onlyoffice and not common.platform.endswith("_xp"):
|
||||
args = ["iscc"] + iscc_args + ["help.iss"]
|
||||
ret = utils.cmd(*args, creates=inno_help_file, verbose=True)
|
||||
utils.set_summary("desktop inno help build", ret)
|
||||
|
||||
args = ["iscc"] + iscc_args + ["/DEMBED_HELP", "/DsPackageEdition=Standalone", "common.iss"]
|
||||
ret = utils.cmd(*args, creates=inno_sa_file, verbose=True)
|
||||
utils.set_summary("desktop inno standalone build", ret)
|
||||
|
||||
if not (hasattr(branding, 'desktop_updates_skip_iss_wrapper') and branding.desktop_updates_skip_iss_wrapper):
|
||||
args = ["iscc"] + iscc_args + ["/DTARGET_NAME=" + inno_file, "update_common.iss"]
|
||||
ret = utils.cmd(*args, creates=inno_update_file, verbose=True)
|
||||
utils.set_summary("desktop inno update build", ret)
|
||||
|
||||
if common.deploy:
|
||||
utils.log_h2("desktop inno deploy")
|
||||
ret = aws_s3_upload(
|
||||
[inno_file],
|
||||
"win/inno/%s/%s/" % (common.version, common.build),
|
||||
"Installer"
|
||||
)
|
||||
ret = aws_s3_upload([inno_file], "win/inno/","Installer")
|
||||
utils.set_summary("desktop inno deploy", ret)
|
||||
|
||||
if branding.onlyoffice and not common.platform.endswith("_xp"):
|
||||
utils.log_h2("desktop inno help deploy")
|
||||
ret = aws_s3_upload([inno_help_file], "win/inno/","Installer")
|
||||
utils.set_summary("desktop inno help deploy", ret)
|
||||
|
||||
utils.log_h2("desktop inno standalone deploy")
|
||||
ret = aws_s3_upload([inno_sa_file], "win/inno/","Installer")
|
||||
utils.set_summary("desktop inno standalone deploy", ret)
|
||||
|
||||
utils.log_h2("desktop inno update deploy")
|
||||
ret = aws_s3_upload(
|
||||
if utils.is_file(inno_update_file):
|
||||
ret = aws_s3_upload(
|
||||
[inno_update_file],
|
||||
"win/inno/%s/%s/" % (common.version, common.build),
|
||||
"Update"
|
||||
)
|
||||
elif utils.is_file(inno_file):
|
||||
ret = aws_s3_upload(
|
||||
[inno_file],
|
||||
"win/inno/%s/%s/%s" % (common.version, common.build, utils.get_basename(inno_update_file)),
|
||||
"Installer"
|
||||
)
|
||||
"Update"
|
||||
)
|
||||
else:
|
||||
ret = False
|
||||
utils.set_summary("desktop inno update 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 /a /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_update_files():
|
||||
utils.log_h2("desktop update files build")
|
||||
|
||||
changes_dir = "update\\changes\\" + common.version
|
||||
if not branding.onlyoffice:
|
||||
changes_dir = "..\\..\\..\\..\\" + common.branding + "\\desktop-apps\\" + \
|
||||
"win-linux\\package\\windows\\update\\changes\\" + common.version
|
||||
utils.copy_dir_content(changes_dir, "update")
|
||||
|
||||
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/desktop/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
|
||||
]
|
||||
|
||||
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
|
||||
)
|
||||
changes_dir = common.workspace_dir + "\\" + utils.get_path(branding.desktop_changes_dir) + "\\" + common.version
|
||||
|
||||
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),
|
||||
utils.glob_path(changes_dir + "\\*.html"),
|
||||
"win/update/%s/%s/" % (common.version, common.build),
|
||||
"Update"
|
||||
)
|
||||
utils.set_summary("desktop update files deploy", ret)
|
||||
@ -303,7 +251,6 @@ def make_update_files():
|
||||
|
||||
def make_advinst():
|
||||
utils.log_h2("desktop advinst build")
|
||||
utils.log_h3(advinst_file)
|
||||
|
||||
arch = arch_list[common.platform]
|
||||
|
||||
@ -352,6 +299,8 @@ def make_advinst():
|
||||
'DelPrerequisite "Microsoft Visual C++ 2013 Redistributable (x64)"'
|
||||
]
|
||||
if branding.onlyoffice:
|
||||
for path in utils.glob_path(desktop_dir + "\\editors\\web-apps\\apps\\*\\main\\resources\\help"):
|
||||
utils.delete_dir(path)
|
||||
aic_content += [
|
||||
"DelFolder CUSTOM_PATH"
|
||||
]
|
||||
@ -373,16 +322,17 @@ def make_advinst():
|
||||
"DelLanguage 3082 -buildname DefaultBuild",
|
||||
"DelLanguage 1033 -buildname DefaultBuild",
|
||||
"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",
|
||||
"NewSync CUSTOM_PATH " + viewer_dir,
|
||||
"UpdateFile CUSTOM_PATH\\ImageViewer.exe " + viewer_dir + "\\ImageViewer.exe",
|
||||
"UpdateFile CUSTOM_PATH\\VideoPlayer.exe " + viewer_dir + "\\VideoPlayer.exe",
|
||||
"SetProperty ProductName=\"" + branding.desktop_product_name_full + "\"",
|
||||
"SetProperty ASCC_REG_PREFIX=" + branding.ascc_reg_prefix
|
||||
]
|
||||
aic_content += [
|
||||
"SetCurrentFeature MainFeature",
|
||||
"NewSync APPDIR " + source_dir,
|
||||
"UpdateFile APPDIR\\DesktopEditors.exe " + source_dir + "\\DesktopEditors.exe",
|
||||
"UpdateFile APPDIR\\updatesvc.exe " + source_dir + "\\updatesvc.exe",
|
||||
"NewSync APPDIR " + desktop_dir,
|
||||
"UpdateFile APPDIR\\DesktopEditors.exe " + desktop_dir + "\\DesktopEditors.exe",
|
||||
"UpdateFile APPDIR\\updatesvc.exe " + desktop_dir + "\\updatesvc.exe",
|
||||
"SetVersion " + package_version,
|
||||
"SetPackageName " + advinst_file + " -buildname DefaultBuild",
|
||||
"Rebuild -buildslist DefaultBuild"
|
||||
@ -425,6 +375,13 @@ def make_macos():
|
||||
utils.delete_dir(utils.get_env("HOME") + "/Library/Developer/Xcode/Archives")
|
||||
utils.delete_dir(utils.get_env("HOME") + "/Library/Caches/Sparkle_generate_appcast")
|
||||
|
||||
source_dir = "%s/build_tools/out/%s/%s" \
|
||||
% (common.workspace_dir, common.prefix, branding.company_name)
|
||||
if branding.onlyoffice:
|
||||
for path in utils.glob_path(source_dir \
|
||||
+ "/desktopeditors/editors/web-apps/apps/*/main/resources/help"):
|
||||
utils.delete_dir(path)
|
||||
|
||||
appcast_url = branding.sparkle_base_url + "/" + suffix + "/" + branding.desktop_package_name.lower() + ".xml"
|
||||
release_bundle_version_string = utils.sh_output(
|
||||
'curl -Ls ' + appcast_url + ' 2> /dev/null' \
|
||||
@ -578,7 +535,7 @@ def make_linux():
|
||||
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"),
|
||||
utils.glob_path("tar/*.tar*"),
|
||||
"linux/generic/", "Portable"
|
||||
)
|
||||
utils.set_summary("desktop tar deploy", ret)
|
||||
|
||||
@ -28,9 +28,13 @@ def make_mobile():
|
||||
|
||||
if common.deploy:
|
||||
utils.log_h2("mobile deploy")
|
||||
if ret:
|
||||
if not utils.is_file(zip_file):
|
||||
utils.log_err("file not exist: " + zip_file)
|
||||
ret = False
|
||||
elif ret:
|
||||
ret = utils.sh(
|
||||
"aws s3 cp --acl public-read --no-progress " \
|
||||
+ "--metadata md5=" + utils.get_md5(zip_file) + " " \
|
||||
+ zip_file + " s3://" + branding.s3_bucket + "/" + s3_key,
|
||||
verbose=True
|
||||
)
|
||||
|
||||
@ -20,11 +20,16 @@ def aws_s3_upload(files, key, edition, ptype=None):
|
||||
ret = True
|
||||
key = "server/" + key
|
||||
for file in files:
|
||||
if not utils.is_file(file):
|
||||
utils.log_err("file not exist: " + file)
|
||||
ret &= False
|
||||
continue
|
||||
args = ["aws"]
|
||||
if hasattr(branding, "s3_endpoint_url"):
|
||||
args += ["--endpoint-url=" + branding.s3_endpoint_url]
|
||||
args += [
|
||||
"s3", "cp", "--no-progress", "--acl", "public-read",
|
||||
"--metadata", "md5=" + utils.get_md5(file),
|
||||
file, "s3://" + branding.s3_bucket + "/" + key
|
||||
]
|
||||
if common.os_family == "windows":
|
||||
|
||||
@ -219,7 +219,7 @@ def copy_dir_content(src, dst, filter_include = "", filter_exclude = "", verbose
|
||||
if is_file(file):
|
||||
copy_file(file, dst, verbose=False)
|
||||
elif is_dir(file):
|
||||
copy_dir(file, dst + "/" + basename)
|
||||
copy_dir(file, dst + "/" + basename, verbose=False)
|
||||
return
|
||||
|
||||
def delete_file(path, verbose=True):
|
||||
@ -260,7 +260,7 @@ def set_summary(target, status):
|
||||
|
||||
def add_deploy_data(product, ptype, src, dst):
|
||||
common.deploy_data.append({
|
||||
"platform": common.platforms[common.platform]["title"],
|
||||
"platform": common.platformTitles[common.platform],
|
||||
"product": product,
|
||||
"type": ptype,
|
||||
# "local": get_path(src),
|
||||
@ -319,7 +319,7 @@ def powershell(*args, **kwargs):
|
||||
|
||||
def ps1(file, args=[], **kwargs):
|
||||
if kwargs.get("verbose"):
|
||||
log_h2("powershell cmdlet: " + file + " " + " ".join(args))
|
||||
log("- ps1: " + file + " " + " ".join(args))
|
||||
if kwargs.get("creates") and is_exist(kwargs["creates"]):
|
||||
return True
|
||||
ret = subprocess.call(
|
||||
|
||||
@ -125,9 +125,20 @@ def getFormatByFile(file_path):
|
||||
def convertFile(directory_x2t, file_input, file_output, convert_params):
|
||||
cur_path = os.getcwd()
|
||||
|
||||
# fonts directory -----------------------------------
|
||||
directory_fonts = directory_x2t + "/sdkjs/common"
|
||||
if not base.is_file(directory_fonts + "/AllFonts.js"):
|
||||
directory_fonts_local = ""
|
||||
if "windows" == base.host_platform():
|
||||
directory_fonts_local = os.getenv("LOCALAPPDATA") + "/ONLYOFFICE/docbuilder"
|
||||
else:
|
||||
directory_fonts_local = os.path.expanduser('~') + "/.local/share/ONLYOFFICE/docbuilder"
|
||||
|
||||
if not base.is_file(directory_fonts + "/AllFonts.js") and not base.is_file(directory_fonts_local + "/AllFonts.js"):
|
||||
base.cmd_in_dir(directory_x2t, "docbuilder", [], True)
|
||||
|
||||
if base.is_file(directory_fonts_local + "/AllFonts.js"):
|
||||
directory_fonts = directory_fonts_local
|
||||
# ---------------------------------------------------
|
||||
|
||||
temp_dir = os.getcwd().replace("\\", "/") + "/temp"
|
||||
if base.is_dir(temp_dir):
|
||||
|
||||
@ -36,10 +36,21 @@ if base.is_dir(temp_dir):
|
||||
base.delete_dir(temp_dir)
|
||||
base.create_dir(temp_dir)
|
||||
|
||||
# fonts directory -----------------------------------
|
||||
directory_fonts = directory_x2t + "/sdkjs/common"
|
||||
if not base.is_file(directory_fonts + "/AllFonts.js"):
|
||||
directory_fonts_local = ""
|
||||
if "windows" == base.host_platform():
|
||||
directory_fonts_local = os.getenv("LOCALAPPDATA") + "/ONLYOFFICE/docbuilder"
|
||||
else:
|
||||
directory_fonts_local = os.path.expanduser('~') + "/.local/share/ONLYOFFICE/docbuilder"
|
||||
|
||||
if not base.is_file(directory_fonts + "/AllFonts.js") and not base.is_file(directory_fonts_local + "/AllFonts.js"):
|
||||
base.cmd_in_dir(directory_x2t, "docbuilder", [], True)
|
||||
|
||||
if base.is_file(directory_fonts_local + "/AllFonts.js"):
|
||||
directory_fonts = directory_fonts_local
|
||||
# ---------------------------------------------------
|
||||
|
||||
json_params = "{'spreadsheetLayout':{'fitToWidth':1,'fitToHeight':1},"
|
||||
json_params += "'documentLayout':{'drawPlaceHolders':true,'drawFormHighlight':true,'isPrint':true}}"
|
||||
json_params = json_params.replace("'", """)
|
||||
@ -61,7 +72,7 @@ for input_file in input_files:
|
||||
xml_convert += u"<m_oThumbnail>"
|
||||
xml_convert += u"<first>false</first>"
|
||||
if ((0 != th_width) and (0 != th_height)):
|
||||
xml_convert += u"<aspect>0</aspect>"
|
||||
xml_convert += u"<aspect>16</aspect>"
|
||||
xml_convert += (u"<width>" + str(th_width) + u"</width>")
|
||||
xml_convert += (u"<height>" + str(th_height) + u"</height>")
|
||||
xml_convert += u"</m_oThumbnail>"
|
||||
|
||||
@ -20,7 +20,7 @@ def get_branch_name(directory):
|
||||
def install_qt():
|
||||
# qt
|
||||
if not base.is_file("./qt_source_5.9.9.tar.xz"):
|
||||
base.download("https://download.qt.io/archive/qt/5.9/5.9.9/single/qt-everywhere-opensource-src-5.9.9.tar.xz", "./qt_source_5.9.9.tar.xz")
|
||||
base.download("https://download.qt.io/new_archive/qt/5.9/5.9.9/single/qt-everywhere-opensource-src-5.9.9.tar.xz", "./qt_source_5.9.9.tar.xz")
|
||||
|
||||
if not base.is_dir("./qt-everywhere-opensource-src-5.9.9"):
|
||||
base.cmd("tar", ["-xf", "./qt_source_5.9.9.tar.xz"])
|
||||
|
||||
21
tools/linux/elf/build.py
Executable file
21
tools/linux/elf/build.py
Executable file
@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
sys.path.append('../../../scripts')
|
||||
import base
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
base.cmd("git", ["clone", "https://github.com/NixOS/patchelf.git", "patchelf_dir"])
|
||||
cur_dir = os.getcwd()
|
||||
os.chdir("patchelf_dir")
|
||||
base.cmd("git", ["checkout", "tags/0.17.2"])
|
||||
base.cmd("./bootstrap.sh")
|
||||
base.cmd("./configure")
|
||||
base.replaceInFile("./src/Makefile.am", "AM_CXXFLAGS = ", "AM_CXXFLAGS = -static-libstdc++ -static-libgcc ")
|
||||
base.cmd("make")
|
||||
os.chdir(cur_dir)
|
||||
if base.is_file("./patchelf"):
|
||||
base.delete_file("./patchelf")
|
||||
base.copy_file("./patchelf_dir/src/patchelf", "./patchelf")
|
||||
base.delete_dir("patchelf_dir")
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user