Compare commits

...

34 Commits

Author SHA1 Message Date
151c4e7d2f Merge branch release/v9.3.0 into develop 2026-02-25 15:13:49 +00:00
9b97de22df Merge pull request '[jsdoc] Fix editor name' (#168) from fix/js-doc into release/v9.3.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/build_tools/pulls/168
2026-02-25 08:59:34 +00:00
997734860b [jsdoc] Fix editor name 2026-02-25 15:53:24 +07:00
923d839483 [build] Reapply server-admin-panel addon check before building admin panel 2026-02-24 11:38:28 +03:00
39b1c1e22c [server] Build adminpanel from server-admin-panel private repository 2026-02-24 11:38:28 +03:00
849d78fea0 [build] Reapply server-admin-panel addon check before building admin panel 2026-02-22 23:21:43 +03:00
49619cdb40 Merge pull request '[jsdoc] rename forms editor to "forms" instead of "pdf"' (#167) from fix/js-doc into release/v9.3.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/build_tools/pulls/167
2026-02-22 10:59:54 +00:00
9bdb69dfa3 [jsdoc] rename forms editor to "forms" instead of "pdf" 2026-02-22 17:53:21 +07:00
ceda5ea658 Merge pull request '[jsdoc] Api Docs for PDF editor' (#166) from fix/js-doc into release/v9.3.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/build_tools/pulls/166
2026-02-22 10:50:06 +00:00
ec2d587993 [jsdoc] Api Docs for PDF editor 2026-02-22 17:40:41 +07:00
10118f4c68 Revert "Check server-admin-panel addon before building admin panel"
This reverts commit 3cdc164d7f.
2026-02-20 23:42:39 +03:00
3cdc164d7f Check server-admin-panel addon before building admin panel 2026-02-20 20:11:36 +03:00
b9c9811b9e [server] Build adminpanel from server-admin-panel private repository 2026-02-19 17:43:40 +03:00
70bbdfbd43 Fix build 2026-02-19 11:27:54 +03:00
5dbf27a039 Fix build 2026-02-18 16:54:53 +03:00
39fb488af8 Merge remote-tracking branch 'origin/release/v9.3.0' into develop 2026-02-17 22:39:07 +03:00
4866786097 Merge pull request 'Up version to 9.3.0' (#164) from fix/version9.3.0 into release/v9.3.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/build_tools/pulls/164
2026-02-16 07:39:53 +00:00
07b1eadc0a Up version to 9.3.0 2026-02-16 10:21:01 +05:00
9db40b2505 Fix the uninitialized config version 2026-02-06 14:50:19 +03:00
42b57d6b40 Merge branch 'release/v9.3.0' into develop 2026-02-03 10:57:03 +03:00
506fbd056a Fix build 2026-01-29 13:41:32 +03:00
def11f3134 Fix build 2026-01-29 13:16:06 +03:00
3285a3e3c5 Fix clean build with sysroot 2026-01-29 12:23:45 +03:00
bdcdfa89e7 [server] Add document-formats repository to server deploy 2026-01-29 01:52:42 +03:00
1835e3ad28 Merge branch 'release/v9.3.0' of https://git.onlyoffice.com/ONLYOFFICE/build_tools into release/v9.3.0 2026-01-28 16:16:04 +03:00
1b33175880 Update iwork module 2026-01-28 16:15:53 +03:00
4629471d5b [deploy] Set docservice max_old_space_size=6144 for bug 75586 2026-01-28 14:00:44 +03:00
a4b29c6acc Fix build 2026-01-27 22:51:15 +03:00
621b34ffde Fix build 2026-01-27 19:23:17 +03:00
50addf9d18 Remove legacy desktop editors update build 2026-01-22 17:25:51 +03:00
7269dda75e Merge pull request 'Set build environment for swift compiling' (#161) from feature/ios-swiftc into release/v9.3.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/build_tools/pulls/161
2026-01-20 20:31:47 +00:00
3f54aec7f8 Add ooxmlsirnature ref to x2t 2026-01-20 20:57:50 +03:00
2d059101ee Set build environment for swift compiling 2026-01-20 17:08:08 +04:00
b6d3392571 Fix package build paths 2026-01-13 18:21:00 +03:00
28 changed files with 234 additions and 77 deletions

View File

@ -256,7 +256,10 @@ def delete_dir(path):
shutil.rmtree(get_path(path), ignore_errors=True)
return
def copy_lib(src, dst, name):
def copy_lib(src_folder, dst, name, subdir=""):
src = src_folder
if subdir != "":
src += ("/" + subdir)
if (config.check_option("config", "bundle_dylibs")) and is_dir(src + "/" + name + ".framework"):
copy_dir(src + "/" + name + ".framework", dst + "/" + name + ".framework", symlinks=True)
@ -443,14 +446,14 @@ def cmd_in_dir_qemu(platform, directory, prog, args=[], is_no_errors=False):
"default_libs": "/usr/arm-linux-gnueabi"
}
}
if platform not in platform_config:
return 0
libs_path = platform_config[platform]["default_libs"]
if config.option("sysroot") != "":
libs_path = config.option("sysroot_" + platform)
return cmd_in_dir(directory, platform_config[platform]["qemu"], ["-L", libs_path, prog] + args, is_no_errors)
def create_qemu_wrapper(binary_path, platform):
@ -458,19 +461,19 @@ def create_qemu_wrapper(binary_path, platform):
binary_name = os.path.basename(binary_path)
binary_bin = binary_path + '.bin'
sysroot = config.option("sysroot_" + platform)
if os.path.exists(binary_path):
os.rename(binary_path, binary_bin)
wrapper_content = f'''#!/bin/bash
DIR="$(cd "$(dirname "${{BASH_SOURCE[0]}}")" && pwd)"
export QEMU_LD_PREFIX={sysroot}
exec qemu-aarch64 -L {sysroot} "$DIR/{binary_name}.bin" "$@"
'''
with open(binary_path, 'w') as f:
f.write(wrapper_content)
os.chmod(binary_path, 0o755)
return binary_bin
@ -656,6 +659,7 @@ def get_repositories():
result.update(get_server_addons())
result["document-server-integration"] = [False, False]
result["document-templates"] = [False, False]
result["document-formats"] = [False, False]
get_branding_repositories(result)
return result
@ -962,7 +966,7 @@ def qt_copy_icu(out, platform):
postfixes += ["/aarch64-linux-gnu"]
elif ("linux_32" == platform):
postfixes += ["/i386-linux-gnu"]
for postfix in postfixes:
tests += [prefix + "/lib" + postfix]
tests += [prefix + "/lib64" + postfix]
@ -1361,7 +1365,10 @@ def mac_change_rpath_library(lib_name, old, new):
def mac_correct_rpath_binary(path, libs):
# if framework are built, instead of correcting lib paths add `@loader_path` to rpaths with `mac_add_loader_path_to_rpath()`
if config.check_option("config", "bundle_dylibs"):
try:
if config.check_option("config", "bundle_dylibs"):
return
except:
return
for lib in libs:
@ -1393,6 +1400,7 @@ def mac_correct_rpath_x2t(dir):
mac_correct_rpath_library("IWorkFile", ["UnicodeConverter", "kernel"])
mac_correct_rpath_library("HWPFile", ["UnicodeConverter", "kernel", "graphics", "StarMathConverter"])
mac_correct_rpath_library("StarMathConverter", ["kernel"])
mac_correct_rpath_library("ooxmlsignature", ["kernel"])
def correct_core_executable(name, libs):
cmd("chmod", ["-v", "+x", name])
@ -1400,7 +1408,7 @@ def mac_correct_rpath_x2t(dir):
mac_correct_rpath_binary(name, mac_icu_libs + libs)
return
correct_core_executable("x2t", ["UnicodeConverter", "kernel", "kernel_network", "graphics", "PdfFile", "XpsFile", "OFDFile", "DjVuFile", "HtmlFile2", "Fb2File", "EpubFile", "doctrenderer", "DocxRenderer", "IWorkFile", "HWPFile", "StarMathConverter"])
correct_core_executable("x2t", ["UnicodeConverter", "kernel", "kernel_network", "graphics", "PdfFile", "XpsFile", "OFDFile", "DjVuFile", "HtmlFile2", "Fb2File", "EpubFile", "doctrenderer", "DocxRenderer", "IWorkFile", "HWPFile", "StarMathConverter", "ooxmlsignature"])
if is_file("./allfontsgen"):
correct_core_executable("allfontsgen", ["UnicodeConverter", "kernel", "graphics"])
if is_file("./allthemesgen"):
@ -1633,6 +1641,12 @@ def hack_xcode_ios():
file.write(filedata)
return
def find_ios_sdk(sdk_name):
return run_command("xcrun --sdk " + sdk_name + " --show-sdk-path")['stdout']
def find_xcode_toolchain(sdk_name):
return run_command("xcrun --sdk " + sdk_name + " --show-toolchain-path")['stdout']
def find_mac_sdk_version():
sdk_dir = run_command("xcode-select -print-path")['stdout']
sdk_dir = os.path.join(sdk_dir, "Platforms/MacOSX.platform/Developer/SDKs")
@ -1945,7 +1959,7 @@ def set_sysroot_env(platform):
path = config.option("sysroot_" + platform)
sysroot_path_bin = config.get_custom_sysroot_bin(platform)
compiler_gcc_prefix = get_compiler_gcc_prefix(platform)
os.environ['PATH'] = sysroot_path_bin + ":" + get_env("PATH")
os.environ['LD_LIBRARY_PATH'] = config.get_custom_sysroot_lib(platform)
@ -1953,7 +1967,7 @@ def set_sysroot_env(platform):
os.environ['CXX'] = compiler_gcc_prefix + "g++"
os.environ['AR'] = compiler_gcc_prefix + "ar"
os.environ['RANLIB'] = compiler_gcc_prefix + "ranlib"
os.environ['CFLAGS'] = "--sysroot=" + path
os.environ['CXXFLAGS'] = "--sysroot=" + path
os.environ['LDFLAGS'] = "--sysroot=" + path
@ -1975,7 +1989,7 @@ def check_python():
download('https://github.com/ONLYOFFICE-data/build_tools_data/raw/refs/heads/master/python/python3.tar.gz', directory + "/python3.tar.gz")
download('https://github.com/ONLYOFFICE-data/build_tools_data/raw/refs/heads/master/python/extract.sh', directory + "/extract.sh")
cmd_in_dir(directory, "chmod", ["+x", "./extract.sh"])
cmd_in_dir(directory, "./extract.sh")
cmd_in_dir(directory, "./extract.sh")
directory_bin = directory_bin.replace(" ", "\\ ")
os.environ["PATH"] = directory_bin + os.pathsep + os.environ["PATH"]
return

View File

@ -11,6 +11,7 @@ def make():
git_dir = base.get_script_dir() + "/../.."
server_dir = base.get_script_dir() + "/../../server"
server_admin_panel_dir = base.get_script_dir() + "/../../server-admin-panel"
branding_dir = server_dir + "/branding"
if("" != config.option("branding")):
@ -49,10 +50,11 @@ def make():
if ("windows" == base.host_platform()):
pkg_target += "-win"
base.cmd_in_dir(server_dir + "/DocService", "pkg", [".", "-t", pkg_target, "--options", "max_old_space_size=4096", "-o", "docservice"])
base.cmd_in_dir(server_dir + "/DocService", "pkg", [".", "-t", pkg_target, "--options", "max_old_space_size=6144", "-o", "docservice"])
base.cmd_in_dir(server_dir + "/FileConverter", "pkg", [".", "-t", pkg_target, "-o", "converter"])
base.cmd_in_dir(server_dir + "/Metrics", "pkg", [".", "-t", pkg_target, "-o", "metrics"])
base.cmd_in_dir(server_dir + "/AdminPanel/server", "pkg", [".", "-t", pkg_target, "-o", "adminpanel"])
if "server-admin-panel" in base.get_server_addons() and base.is_exist(server_admin_panel_dir):
base.cmd_in_dir(server_admin_panel_dir + "/server", "pkg", [".", "-t", pkg_target, "-o", "adminpanel"])
example_dir = base.get_script_dir() + "/../../document-server-integration/web/documentserver-example/nodejs"
base.delete_dir(example_dir + "/node_modules")

View File

@ -72,7 +72,10 @@ def build_with_cmake(platform, cmake_args, build_type):
cmake_args_ext += ["-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0", "-DCMAKE_OSX_ARCHITECTURES=arm64"]
elif config.option("sysroot") != "":
# force use custom CXXFLAGS with Release/Debug build
cmake_args += ["-DCMAKE_TOOLCHAIN_FILE=" + LINUX_CUSTOM_SYSROOT_TOOLCHAIN_FILE]
if (platform == "linux_64"):
cmake_args += ["-DCMAKE_TOOLCHAIN_FILE=" + LINUX_CUSTOM_SYSROOT_TOOLCHAIN_FILE]
else:
cmake_args += ["-DCMAKE_TOOLCHAIN_FILE=" + LINUX_SYSTEM_AARCH64_TOOLCHAIN_FILE]
elif platform == "linux_arm64" and not base.is_os_arm():
cmake_args += ["-DCMAKE_TOOLCHAIN_FILE=" + LINUX_SYSTEM_AARCH64_TOOLCHAIN_FILE]
# IOS
@ -109,7 +112,7 @@ def build_with_cmake(platform, cmake_args, build_type):
# env setup for custom sysroot
if config.option("sysroot") != "":
base.set_sysroot_env("linux_arm64")
base.set_sysroot_env(platform)
# run cmake
base.cmd("cmake", cmake_args + cmake_args_ext)

View File

@ -22,7 +22,7 @@ def make(use_gperf = True):
base_dir = base.get_script_dir() + "/../../core/Common/3dParty/apple"
os.chdir(base_dir)
base.check_module_version("3", clear_module)
base.check_module_version("4", clear_module)
os.chdir(old_cur_dir)
cmd_args = ["fetch.py"]
@ -35,4 +35,5 @@ def make(use_gperf = True):
if __name__ == '__main__':
# manual compile
make(False)
make(False)

View File

@ -120,7 +120,8 @@ def make():
else:
if config.option("sysroot") != "":
base.set_sysroot_env("linux_arm64")
base.cmd("./Configure", ["linux-aarch64", "enable-md2", "no-shared", "no-asm", "no-tests", "--prefix=" + old_cur_dir + "/build/linux_arm64", "--openssldir=" + old_cur_dir + "/build/linux_arm64"])
base.cmd("/usr/bin/perl", ["./Configure", "linux-aarch64", "enable-md2", "no-shared", "no-asm", "no-tests", "--prefix=" + old_cur_dir + "/build/linux_arm64", "--openssldir=" + old_cur_dir + "/build/linux_arm64"])
#base.cmd("./Configure", ["linux-aarch64", "enable-md2", "no-shared", "no-asm", "no-tests", "--prefix=" + old_cur_dir + "/build/linux_arm64", "--openssldir=" + old_cur_dir + "/build/linux_arm64"])
base.replaceInFile("./Makefile", "CFLAGS=-Wall -O3", "CFLAGS=-Wall -O3 -fvisibility=hidden")
base.replaceInFile("./Makefile", "CXXFLAGS=-Wall -O3", "CXXFLAGS=-Wall -O3 -fvisibility=hidden")
base.cmd("make", [], True)

View File

@ -53,6 +53,31 @@ def change_bootstrap():
base.writeFile("./depot_tools/bootstrap/manifest.txt", content)
return
def is_ubuntu_24_or_higher():
try:
with open('/etc/os-release') as f:
for line in f:
if line.startswith('VERSION_ID='):
version = line.split('=')[1].strip().strip('"')
return float(version) >= 24
except:
pass
return False
def fix_ubuntu24():
#if not is_ubuntu_24_or_higher():
# return
if "" == config.option("sysroot"):
return
old_cur = os.getcwd()
os.chdir("third_party/llvm-build/Release+Asserts/lib")
base.cmd("mv", ["libstdc++.so.6", "libstdc++.so.6.old"])
base.cmd("ln", ["-s", "/usr/lib/x86_64-linux-gnu/libstdc++.so.6", "libstdc++.so.6"])
os.chdir(old_cur)
return
def make_args(args, platform, is_64=True, is_debug=False):
args_copy = args[:]
if is_64:
@ -66,7 +91,6 @@ def make_args(args, platform, is_64=True, is_debug=False):
args_copy = args[:]
args_copy.append("target_cpu=\\\"arm64\\\"")
args_copy.append("v8_target_cpu=\\\"arm64\\\"")
args_copy.append("use_sysroot=true")
if (platform == "win_arm64"):
args_copy = args[:]
@ -84,8 +108,26 @@ def make_args(args, platform, is_64=True, is_debug=False):
linux_clang = False
if platform == "linux":
if "" != config.option("sysroot"):
args_copy.append("use_sysroot=false")
args_copy.append("use_sysroot=true")
args_copy.append("is_clang=false")
if is_ubuntu_24_or_higher():
args_copy.append("use_gold=false")
args_copy.append("sysroot=\\\"" + config.option("sysroot_linux_64") + "\\\"")
args_copy.append("target_sysroot=\\\"" + config.option("sysroot_linux_64") + "\\\"")
else:
args_copy.append("is_clang=true")
if "1" == config.option("use-clang"):
linux_clang = True
else:
args_copy.append("use_sysroot=false")
if platform == "linux_arm64":
if "" != config.option("sysroot"):
args_copy.append("use_sysroot=true")
if is_ubuntu_24_or_higher():
args_copy.append("use_gold=false")
#args_copy.append("sysroot=\\\"" + config.option("sysroot_linux_64") + "\\\"")
args_copy.append("target_sysroot=\\\"" + config.option("sysroot_linux_arm64") + "\\\"")
else:
args_copy.append("is_clang=true")
if "1" == config.option("use-clang"):
@ -197,6 +239,9 @@ def make():
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")
if ("linux" == base.host_platform()):
if not base.is_file("./depot_tools/python3_bin_reldir.txt"):
base.cmd_in_dir("./depot_tools", "./ensure_bootstrap", [], True)
if ("windows" == base.host_platform()):
base.replaceInFile("v8/build/config/win/BUILD.gn", ":static_crt", ":dynamic_crt")
@ -226,6 +271,9 @@ def make():
base.replaceInFile("v8/third_party/jinja2/tests.py", "from collections import Mapping", "try:\n from collections.abc import Mapping\nexcept ImportError:\n from collections import Mapping")
os.chdir("v8")
is_ubuntu24 = is_ubuntu_24_or_higher()
fix_ubuntu24()
gn_args = ["v8_static_library=true",
"is_component_build=false",
@ -237,17 +285,15 @@ def make():
if config.option("sysroot") != "":
sysroot_path = config.option("sysroot_linux_64")
sysroot_path_bin = config.get_custom_sysroot_bin("linux_64")
src_replace = "config(\"compiler\") {\n asmflags = []\n cflags = []\n cflags_c = []\n cflags_cc = []\n cflags_objc = []\n cflags_objcc = []\n ldflags = []"
dst_replace = "config(\"compiler\") {\n asmflags = []\n cflags = [\"--sysroot=" + sysroot_path + "\"]" + "\n cflags_c = []\n cflags_cc = [\"--sysroot=" + sysroot_path + "\"]" + "\n cflags_objc = []\n cflags_objcc = []\n ldflags = [\"--sysroot=" + sysroot_path + "\"]"
base.replaceInFile("build/config/compiler/BUILD.gn", src_replace, dst_replace)
src_replace = "gcc_toolchain(\"x64\") {\n cc = \"gcc\"\n cxx = \"g++\""
dst_replace = "gcc_toolchain(\"x64\") {\n cc = \""+ sysroot_path_bin + "/gcc\"\n cxx = \"" + sysroot_path_bin + "/g++\""
base.replaceInFile("build/toolchain/linux/BUILD.gn", src_replace, dst_replace)
old_env = dict(os.environ)
base.set_sysroot_env("linux_64")
pkg_old = os.environ.get("PKG_CONFIG_PATH", "")
os.environ["PKG_CONFIG_PATH"] = sysroot_path + "/usr/lib/x86_64-linux-gnu/pkgconfig:" + sysroot_path + "/usr/lib/pkgconfig:" + sysroot_path + "/usr/share/pkgconfig"
base.cmd2("gn", ["gen", "out.gn/linux_64", make_args(gn_args, "linux")], False)
os.environ["PKG_CONFIG_PATH"] = pkg_old
base.cmd2("ninja", ["-C", "out.gn/linux_64"], False)
base.restore_sysroot_env()
else:
@ -261,7 +307,13 @@ def make():
if config.check_option("platform", "linux_arm64"):
base.cmd("build/linux/sysroot_scripts/install-sysroot.py", ["--arch=arm64"], False)
sysroot_path = config.option("sysroot_linux_64")
pkg_old = os.environ.get("PKG_CONFIG_PATH", "")
os.environ["PKG_CONFIG_PATH"] = sysroot_path + "/usr/lib/x86_64-linux-gnu/pkgconfig:" + sysroot_path + "/usr/lib/pkgconfig:" + sysroot_path + "/usr/share/pkgconfig"
base.cmd2("gn", ["gen", "out.gn/linux_arm64", make_args(gn_args, "linux_arm64", False)])
os.environ["PKG_CONFIG_PATH"] = pkg_old
base.cmd("ninja", ["-C", "out.gn/linux_arm64"])
if config.check_option("platform", "mac_64"):

View File

@ -48,6 +48,7 @@ def make():
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "HWPFile")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "DocxRenderer")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "StarMathConverter")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "ooxmlsignature", "xp" if isWindowsXP else "")
base.copy_file(git_dir + "/sdkjs/pdf/src/engine/cmap.bin", root_dir + "/cmap.bin")
if ("ios" == platform):

View File

@ -25,6 +25,7 @@ def make():
platform = native_platform
platform_postfix = platform + base.qt_dst_postfix()
isWindowsXP = False if (-1 == native_platform.find("_xp")) else True
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, archive_dir, "kernel")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, archive_dir, "kernel_network")
@ -43,6 +44,7 @@ def make():
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, archive_dir, "DocxRenderer")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, archive_dir, "hunspell")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, archive_dir, "StarMathConverter")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, archive_dir, "ooxmlsignature", "xp" if isWindowsXP else "")
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")

View File

@ -73,6 +73,7 @@ def make():
base.copy_lib(build_libraries_path, root_dir + "/converter", "HWPFile")
base.copy_lib(build_libraries_path, root_dir + "/converter", "DocxRenderer")
base.copy_lib(build_libraries_path, root_dir + "/converter", "StarMathConverter")
base.copy_lib(build_libraries_path, root_dir + "/converter", "ooxmlsignature", "xp" if isWindowsXP else "")
if ("ios" == platform):
base.copy_lib(build_libraries_path, root_dir + "/converter", "x2t")
@ -138,7 +139,6 @@ def make():
# libraries
base.copy_lib(build_libraries_path, root_dir, "hunspell")
base.copy_lib(build_libraries_path + ("/xp" if isWindowsXP else ""), root_dir, "ooxmlsignature")
base.copy_lib(build_libraries_path + ("/xp" if isWindowsXP else ""), root_dir, "ascdocumentscore")
if (0 != platform.find("mac")):
base.copy_lib(build_libraries_path + ("/xp" if isWindowsXP else ""), root_dir, "qtascdocumentscore")

View File

@ -66,6 +66,7 @@ def make():
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "HWPFile")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "DocxRenderer")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "StarMathConverter")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "ooxmlsignature")
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")):

View File

@ -41,6 +41,7 @@ def make():
build_server_dir = root_dir + '/server'
server_dir = base.get_script_dir() + "/../../server"
server_admin_panel_dir = base.get_script_dir() + "/../../server-admin-panel"
base.create_dir(build_server_dir + '/DocService')
@ -58,13 +59,14 @@ def make():
base.create_dir(build_server_dir + '/Metrics/node_modules/modern-syslog/build/Release')
base.copy_file(server_dir + "/Metrics/node_modules/modern-syslog/build/Release/core.node", build_server_dir + "/Metrics/node_modules/modern-syslog/build/Release/core.node")
# AdminPanel server part
base.create_dir(build_server_dir + '/AdminPanel/server')
base.copy_exe(server_dir + "/AdminPanel/server", build_server_dir + '/AdminPanel/server', "adminpanel")
if "server-admin-panel" in base.get_server_addons() and base.is_exist(server_admin_panel_dir):
# AdminPanel server part
base.create_dir(build_server_dir + '/AdminPanel/server')
base.copy_exe(server_admin_panel_dir + "/server", build_server_dir + '/AdminPanel/server', "adminpanel")
# AdminPanel client part
base.create_dir(build_server_dir + '/AdminPanel/client/build')
base.copy_dir(server_dir + '/AdminPanel/client/build', build_server_dir + '/AdminPanel/client/build')
# AdminPanel client part
base.create_dir(build_server_dir + '/AdminPanel/client/build')
base.copy_dir(server_admin_panel_dir + '/client/build', build_server_dir + '/AdminPanel/client/build')
qt_dir = base.qt_setup(native_platform)
platform = native_platform
@ -94,6 +96,7 @@ def make():
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, converter_dir, "HWPFile")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, converter_dir, "DocxRenderer")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, converter_dir, "StarMathConverter")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, converter_dir, "ooxmlsignature")
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")
@ -180,6 +183,12 @@ def make():
base.copy_dir(document_templates_files + '/new', document_templates + '/new')
base.copy_dir(document_templates_files + '/sample', document_templates + '/sample')
#document-formats
document_formats_files = server_dir + '/../document-formats'
document_formats = build_server_dir + '/../document-formats'
base.create_dir(document_formats)
base.copy_file(document_formats_files + '/onlyoffice-docs-formats.json', document_formats + '/onlyoffice-docs-formats.json')
#license
license_file1 = server_dir + '/LICENSE.txt'
license_file2 = server_dir + '/3rd-Party.txt'

View File

@ -36,7 +36,7 @@ def s3_upload(files, dst):
def make_windows():
global package_name, package_version, arch, xp
utils.set_cwd("desktop-apps\\win-linux\\package\\windows")
utils.set_cwd("desktop-apps\\package")
package_name = branding.desktop_package_name
package_version = common.version + "." + common.build
@ -51,13 +51,14 @@ def make_windows():
if common.clean:
utils.log_h2("desktop clean")
utils.delete_dir("DesktopEditors-cache")
utils.delete_files("*.exe")
utils.delete_files("*.msi")
utils.delete_files("*.aic")
utils.delete_files("*.tmp")
utils.delete_files("*.zip")
utils.delete_files("data\\*.exe")
utils.delete_dir("build")
utils.delete_files("inno\\package.config")
utils.delete_files("inno\\*.exe")
utils.delete_dir("advinst\\DesktopEditors-cache")
utils.delete_files("advinst\\package.config")
utils.delete_files("advinst\\*.msi")
utils.delete_files("advinst\\*.aic")
utils.delete_dir("zip")
if not xp:
make_prepare()
@ -65,8 +66,6 @@ def make_windows():
if branding.onlyoffice:
make_inno()
make_inno("standalone")
if arch != "arm64":
make_inno("update")
make_advinst()
make_prepare("commercial")
@ -100,7 +99,7 @@ def make_zip(edition = "opensource"):
if edition == "commercial": zip_file = "%s-Enterprise-%s-%s.zip"
elif edition == "xp": zip_file = "%s-XP-%s-%s.zip"
else: zip_file = "%s-%s-%s.zip"
zip_file = zip_file % (package_name, package_version, arch)
zip_file = "zip\\" + zip_file % (package_name, package_version, arch)
args = [
"-Version", package_version,
"-Arch", arch,
@ -126,7 +125,7 @@ def make_inno(edition = "opensource"):
elif edition == "update": inno_file = "%s-Update-%s-%s.exe"
elif edition == "xp": inno_file = "%s-XP-%s-%s.exe"
else: inno_file = "%s-%s-%s.exe"
inno_file = inno_file % (package_name, package_version, arch)
inno_file = "inno\\" + inno_file % (package_name, package_version, arch)
args = [
"-Version", package_version,
"-Arch", arch,
@ -151,7 +150,7 @@ def make_inno(edition = "opensource"):
def make_advinst(edition = "opensource"):
if edition == "commercial": advinst_file = "%s-Enterprise-%s-%s.msi"
else: advinst_file = "%s-%s-%s.msi"
advinst_file = advinst_file % (package_name, package_version, arch)
advinst_file = "advinst\\" + advinst_file % (package_name, package_version, arch)
args = [
"-Version", package_version,
"-Arch", arch,
@ -316,7 +315,7 @@ def make_sparkle_updates():
#
def make_linux():
utils.set_cwd("desktop-apps/win-linux/package/linux")
utils.set_cwd("desktop-apps/package")
for edition in ["opensource", "commercial"]:
utils.log_h2("desktop " + edition + " build")
@ -326,7 +325,7 @@ def make_linux():
if common.platform == "linux_aarch64":
make_args += ["-e", "UNAME_M=aarch64"]
if not branding.onlyoffice:
make_args += ["-e", "BRANDING_DIR=../../../../" + common.branding + "/desktop-apps/win-linux/package/linux"]
make_args += ["-e", "BRANDING_DIR=../../" + common.branding + "/desktop-apps/package"]
ret = utils.sh("make clean && make " + " ".join(make_args), verbose=True)
utils.set_summary("desktop " + edition + " build", ret)

View File

@ -36,7 +36,7 @@ def make(platform, project, qmake_config_addon="", is_no_errors=False):
return
old_env = dict(os.environ)
# qt
qt_dir = base.qt_setup(platform)
base.set_env("OS_DEPLOY", platform)
@ -50,7 +50,7 @@ def make(platform, project, qmake_config_addon="", is_no_errors=False):
if (pro_dir.endswith("/")):
pro_dir = pro_dir[:-1]
makefile_name = "Makefile." + get_make_file_suffix(platform)
makefile_name = "Makefile." + get_make_file_suffix(platform)
makefile = pro_dir + "/" + makefile_name
stash_file = pro_dir + "/.qmake.stash"
@ -73,6 +73,11 @@ def make(platform, project, qmake_config_addon="", is_no_errors=False):
# setup ios env
if (-1 != platform.find("ios")):
base.hack_xcode_ios()
sdk_name = "iphoneos"
if qmake_config_addon.find("ios_simulator") != -1:
sdk_name = "iphonesimulator"
base.set_env("SDK_PATH", base.find_ios_sdk(sdk_name))
base.set_env("XCODE_TOOLCHAIN_PATH", base.find_xcode_toolchain(sdk_name))
if base.is_file(makefile):
base.delete_file(makefile)
@ -100,16 +105,16 @@ def make(platform, project, qmake_config_addon="", is_no_errors=False):
if "1" == config.option("use-clang"):
build_params.append("-spec")
build_params.append("linux-clang-libc++")
if "" != config.option("sysroot"):
sysroot_path = config.option("sysroot_" + platform)
os.environ['QMAKE_CUSTOM_SYSROOT'] = sysroot_path
os.environ['QMAKE_CUSTOM_SYSROOT_BIN'] = config.get_custom_sysroot_bin(platform)
os.environ['PKG_CONFIG_PATH'] = config.get_custom_sysroot_lib(platform, True) + "/pkgconfig"
os.environ['PKG_CONFIG_SYSROOT_DIR'] = sysroot_path
base.cmd_exe(qmake_app, build_params)
if "" != config.option("sysroot"):
base.set_sysroot_env(platform)
@ -117,7 +122,13 @@ def make(platform, project, qmake_config_addon="", is_no_errors=False):
if ("1" == config.option("clean")):
base.cmd_and_return_cwd("make", clean_params, True)
base.cmd_and_return_cwd("make", distclean_params, True)
base.cmd(qmake_app, build_params)
if "" != config.option("sysroot"):
base.restore_sysroot_env()
base.cmd(qmake_app, build_params)
if "" != config.option("sysroot"):
base.set_sysroot_env(platform)
base.correct_makefile_after_qmake(platform, makefile)
base.cmd_and_return_cwd("make", ["-f", makefile] + get_j_num(), is_no_errors)

View File

@ -66,11 +66,21 @@ exports.handlers = {
const isMethod = doclet.kind === 'function' || doclet.kind === 'method';
const hasTypeofEditorsTag = isMethod && doclet.tags && doclet.tags.some(tag => tag.title === 'typeofeditors' && tag.value.includes(process.env.EDITOR));
const shouldAddMethod =
let shouldAddMethod =
doclet.kind !== 'member' &&
(!doclet.longname || doclet.longname.search('private') === -1) &&
doclet.scope !== 'inner' && hasTypeofEditorsTag;
// class names may be the same between editors, we check against the inheritance tree
if (doclet.inherits) {
const parentClass = doclet.inherits.split('#')[0];
const curClass = cleanName(doclet.memberof);
if (!classesDocletsMap[curClass].augments || !classesDocletsMap[curClass].augments.includes(parentClass)) {
shouldAddMethod = false;
}
}
if (shouldAddMethod) {
// if the class is not in our map, then we deleted it ourselves -> not available in the editor
if (false == passedClasses.includes(cleanName(doclet.memberof))) {

View File

@ -1,6 +1,6 @@
{
"source": {
"include": ["../../../../../sdkjs/pdf/apiBuilder.js"]
"include": ["../../../../../sdkjs/word/apiBuilder.js", "../../../../../sdkjs/pdf/apiBuilder.js"]
},
"plugins": ["./correct_doclets.js"],
"opts": {
@ -13,4 +13,4 @@
"pretty": true
}
}
}
}

View File

@ -13,14 +13,16 @@ configs = [
"./config/word.json",
"./config/cell.json",
"./config/slide.json",
"./config/forms.json"
"./config/forms.json",
"./config/pdf.json"
]
editors_maps = {
"word": "CDE",
"cell": "CSE",
"slide": "CPE",
"forms": "CFE"
"forms": "CFE",
"pdf": "PDFE"
}
def generate(output_dir, md=False):
@ -77,10 +79,7 @@ def generate(output_dir, md=False):
doclet['example'] = remove_js_comments(comment) + "```js\n" + code_content + "\n```"
if md == False:
document_type = editor_name
if "forms" == document_type:
document_type = "pdf"
doclet['description'] = doclet['description'] + f'\n\n## Try it\n\n ```js document-builder={{"documentType": "{document_type}"}}\n{code_content}\n```'
doclet['description'] = doclet['description'] + f'\n\n## Try it\n\n ```js document-builder={{"documentType": "{editor_name}"}}\n{code_content}\n```'
# Write the modified JSON file back
with open(output_file, 'w', encoding='utf-8') as f:

View File

@ -10,7 +10,8 @@ editors = {
"word": "text-document-api",
"cell": "spreadsheet-api",
"slide": "presentation-api",
"forms": "form-api"
"forms": "form-api",
"pdf": "pdf-api",
}
@ -482,11 +483,13 @@ def process_doclets(data, output_dir, editor_name):
if editor_name == 'word':
example_editor_name += 'docx'
elif editor_name == 'forms':
example_editor_name += 'pdf'
example_editor_name += 'forms'
elif editor_name == 'slide':
example_editor_name += 'pptx'
elif editor_name == 'cell':
example_editor_name += 'xlsx'
elif editor_name == 'pdf':
example_editor_name += 'pdf'
for doclet in data:
if doclet['kind'] == 'class':

View File

@ -11,14 +11,16 @@ editors = [
"word",
"cell",
"slide",
"forms"
"forms",
"pdf"
]
editors_names = {
"word": "Word",
"cell": "Spreadsheet",
"slide": "Presentation",
"forms": "Forms"
"forms": "Forms",
"pdf": "PDF"
}
script_path = os.path.abspath(__file__)

View File

@ -0,0 +1,16 @@
{
"source": {
"include": ["../../../../../sdkjs/pdf/plugin-events.js"]
},
"plugins": ["../correct_doclets.js"],
"opts": {
"destination": "./out",
"recurse": true,
"encoding": "utf8"
},
"templates": {
"json": {
"pretty": true
}
}
}

View File

@ -0,0 +1,16 @@
{
"source": {
"include": ["../../../../../sdkjs/pdf/api_plugins.js"]
},
"plugins": ["../correct_doclets.js"],
"opts": {
"destination": "./out",
"recurse": true,
"encoding": "utf8"
},
"templates": {
"json": {
"pretty": true
}
}
}

View File

@ -10,7 +10,8 @@ configs = [
"./config/events/word.json",
"./config/events/cell.json",
"./config/events/slide.json",
"./config/events/forms.json"
"./config/events/forms.json",
"./config/events/pdf.json"
]
script_path = os.path.abspath(__file__)

View File

@ -11,7 +11,8 @@ editors = {
"word": "text-document-api",
"cell": "spreadsheet-api",
"slide": "presentation-api",
"forms": "form-api"
"forms": "form-api",
"pdf": "pdf-api"
}
script_path = os.path.abspath(__file__)

View File

@ -10,7 +10,8 @@ configs = [
"./config/methods/word.json",
"./config/methods/cell.json",
"./config/methods/slide.json",
"./config/methods/forms.json"
"./config/methods/forms.json",
"./config/methods/pdf.json"
]
script_path = os.path.abspath(__file__)

View File

@ -10,7 +10,8 @@ editors = {
"word": "text-document-api",
"cell": "spreadsheet-api",
"slide": "presentation-api",
"forms": "form-api"
"forms": "form-api",
"pdf": "pdf-api"
}
script_path = os.path.abspath(__file__)

View File

@ -33,6 +33,8 @@
"core/DesktopEditor/doctrenderer/doctrenderer.pro",
"core/DesktopEditor/xmlsec/src/ooxmlsignature.pro",
"[!no_x2t]core/OOXML/Projects/Linux/DocxFormatLib/DocxFormatLib.pro",
"[!no_x2t]core/OOXML/Projects/Linux/PPTXFormatLib/PPTXFormatLib.pro",
"[!no_x2t]core/OOXML/Projects/Linux/XlsbFormatLib/XlsbFormatLib.pro",
@ -86,8 +88,6 @@
"core",
"multimedia",
"core/DesktopEditor/xmlsec/src/ooxmlsignature.pro",
"desktop-sdk/ChromiumBasedEditors/lib/ascdocumentscore.pro",
"desktop-sdk/ChromiumBasedEditors/lib/ascdocumentscore_helper.pro",

View File

@ -16,6 +16,7 @@ def install_deps():
"build-essential",
"ca-certificates",
"cmake",
"perl",
"curl",
"git",
"glib-2.0-dev",

View File

@ -146,8 +146,10 @@ def fix_absolute_symlinks(sysroot_path, arch):
if arch == "arm64":
lib_dir = os.path.join(sysroot_path, "usr/lib/aarch64-linux-gnu")
target_lib_dir = "aarch64-linux-gnu"
elif arch == "amd64":
lib_dir = os.path.join(sysroot_path, "usr/lib/x86_64-linux-gnu")
target_lib_dir = "x86_64-linux-gnu"
else:
return
@ -182,6 +184,14 @@ def fix_absolute_symlinks(sysroot_path, arch):
print(f" Fixed: {filename} -> {relative_target}")
fixed_count += 1
libgcc_usr_symlink = os.path.join(lib_dir, "libgcc_s.so")
libgcc_target = os.path.join(sysroot_path, "lib", target_lib_dir, "libgcc_s.so.1")
if os.path.exists(libgcc_target) and not os.path.exists(libgcc_usr_symlink):
absolute_libgcc = os.path.abspath(libgcc_target)
os.symlink(absolute_libgcc, libgcc_usr_symlink)
fixed_count += 1
print(f"Fixed {fixed_count} absolute symlinks")

View File

@ -1 +1 @@
9.2.1
9.3.0