Skip to content

Commit

Permalink
Merge branch release/v8.1.0 into master
Browse files Browse the repository at this point in the history
  • Loading branch information
papacarlo committed Jun 19, 2024
2 parents e719ae2 + 1af5c37 commit 6505ee1
Show file tree
Hide file tree
Showing 41 changed files with 1,365 additions and 893 deletions.
149 changes: 0 additions & 149 deletions build.pro

This file was deleted.

2 changes: 1 addition & 1 deletion develop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ instruction show how to use docker without sudo.
```bash
cd build_tools/develop
docker pull onlyoffice/documentserver
docker build -t documentserver-develop .
docker build --no-cache -t documentserver-develop .
```

**Note**: The dot at the end is required.
Expand Down
31 changes: 23 additions & 8 deletions make.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,32 @@
#!/usr/bin/env python

import os
import sys
sys.path.append('scripts')
sys.path.append('scripts/develop')
sys.path.append('scripts/develop/vendor')
sys.path.append('scripts/core_common')
sys.path.append('scripts/core_common/modules')
__dir__name__ = os.path.dirname(os.path.abspath(__file__))
sys.path.append(__dir__name__ + '/scripts')
sys.path.append(__dir__name__ + '/scripts/develop')
sys.path.append(__dir__name__ + '/scripts/develop/vendor')
sys.path.append(__dir__name__ + '/scripts/core_common')
sys.path.append(__dir__name__ + '/scripts/core_common/modules')
sys.path.append(__dir__name__ + '/scripts/core_common/modules/android')
import config
import base
import build
import build_sln
import build_js
import build_server
import deploy
import make_common
import develop
import argparse

base.check_python()

parser = argparse.ArgumentParser(description="options")
parser.add_argument("--build-only-branding", action="store_true")
args = parser.parse_args()

if (args.build_only_branding):
base.set_env("OO_BUILD_ONLY_BRANDING", "1")

# parse configuration
config.parse()
Expand Down Expand Up @@ -59,13 +72,15 @@
base.configure_common_apps()

# developing...
develop.make();
develop.make()

# check only js builds
if ("1" == base.get_env("OO_ONLY_BUILD_JS")):
build_js.make()
exit(0)

#base.check_tools()

# core 3rdParty
make_common.make()

Expand All @@ -79,7 +94,7 @@
base.set_env("DESKTOP_URL_UPDATES_DEV_CHANNEL", "https://download.onlyoffice.com/install/desktop/editors/windows/onlyoffice/appcastdev.json")

# build
build.make()
build_sln.make()

# js
build_js.make()
Expand Down
6 changes: 4 additions & 2 deletions make_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,11 @@
if "core" in common.targets:
package_core.make()
if "closuremaps_opensource" in common.targets:
package_core.deploy_closuremaps("opensource")
package_core.deploy_closuremaps_sdkjs("opensource")
package_core.deploy_closuremaps_webapps("opensource")
if "closuremaps_commercial" in common.targets:
package_core.deploy_closuremaps("commercial")
package_core.deploy_closuremaps_sdkjs("commercial")
package_core.deploy_closuremaps_webapps("commercial")
if "desktop" in common.targets:
package_desktop.make()
if "builder" in common.targets:
Expand Down
71 changes: 71 additions & 0 deletions scripts/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,9 @@ def copy_lib(src, dst, name):
create_dir(dst + "/simulator")
copy_dir(src + "/simulator/" + name + ".framework", dst + "/simulator/" + name + ".framework")

if is_dir(dst + "/" + name + ".xcframework"):
delete_dir(dst + "/" + name + ".xcframework")

cmd("xcodebuild", ["-create-xcframework",
"-framework", dst + "/" + name + ".framework",
"-framework", dst + "/simulator/" + name + ".framework",
Expand Down Expand Up @@ -697,6 +700,22 @@ def check_congig_option_with_platfom(platform, option_name):
return True
return False

def correct_makefile_after_qmake(platform, file):
if (0 == platform.find("android")):
if ("android_arm64_v8a" == platform):
replaceInFile(file, "_arm64-v8a.a", ".a")
replaceInFile(file, "_arm64-v8a.so", ".so")
if ("android_armv7" == platform):
replaceInFile(file, "_armeabi-v7a.a", ".a")
replaceInFile(file, "_armeabi-v7a.so", ".so")
if ("android_x86_64" == platform):
replaceInFile(file, "_x86_64.a", ".a")
replaceInFile(file, "_x86_64.so", ".so")
if ("android_x86" == platform):
replaceInFile(file, "_x86.a", ".a")
replaceInFile(file, "_x86.so", ".so")
return

def qt_config_platform_addon(platform):
config_addon = ""
if (0 == platform.find("win")):
Expand Down Expand Up @@ -751,6 +770,21 @@ def qt_major_version():
qt_dir = qt_version()
return qt_dir.split(".")[0]

def qt_version_decimal():
qt_dir = qt_version()
return 10 * int(qt_dir.split(".")[0]) + int(qt_dir.split(".")[1])

def qt_config_as_param(value):
qt_version = qt_version_decimal()
ret_params = []
if (66 > qt_version):
ret_params.append("CONFIG+=" + value)
else:
params = value.split()
for name in params:
ret_params.append("CONFIG+=" + name)
return ret_params

def qt_copy_lib(lib, dir):
qt_dir = get_env("QT_DEPLOY")
if ("windows" == host_platform()):
Expand Down Expand Up @@ -1190,6 +1224,8 @@ def mac_correct_rpath_docbuilder(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", "PdfFile", "HtmlRenderer", "XpsFile", "DjVuFile", "HtmlFile2", "Fb2File", "EpubFile", "doctrenderer", "DocxRenderer"])
mac_correct_rpath_library("docbuilder.c", ["icudata.58", "icuuc.58", "UnicodeConverter", "kernel", "kernel_network", "graphics", "doctrenderer"])
cmd("install_name_tool", ["-add_rpath", "@loader_path", "libdocbuilder.c.dylib"], True)
os.chdir(cur_dir)
return

Expand Down Expand Up @@ -1225,6 +1261,19 @@ def mac_correct_rpath_desktop(dir):
os.chdir(cur_dir)
return

def linux_set_origin_rpath_libraries(dir, libs):
tools_dir = get_script_dir() + "/../tools/linux/elf/"
cur_dir = os.getcwd()
os.chdir(dir)
for lib in libs:
cmd(tools_dir + "patchelf", ["--set-rpath", "\\$ORIGIN", "lib" + lib], True)
os.chdir(cur_dir)
return

def linux_correct_rpath_docbuilder(dir):
linux_set_origin_rpath_libraries(dir, ["docbuilder.c.so", "icuuc.so.58", "doctrenderer.so", "graphics.so", "kernel.so", "kernel_network.so", "UnicodeConverter.so"])
return

def common_check_version(name, good_version, clean_func):
version_good = name + "_version_" + good_version
version_path = "./" + name + ".data"
Expand Down Expand Up @@ -1672,3 +1721,25 @@ def check_module_version(actual_version, clear_func):
writeFile(module_file, actual_version)
clear_func()
return

def check_python():
if ("linux" != host_platform()):
return
directory = __file__script__path__ + "/../tools/linux"
directory_bin = __file__script__path__ + "/../tools/linux/python3/bin"

if not is_dir(directory + "/python3"):
cmd("tar", ["xfz", directory + "/python3.tar.gz", "-C", directory])
cmd("ln", ["-s", directory_bin + "/python3", directory_bin + "/python"])
directory_bin = directory_bin.replace(" ", "\\ ")
os.environ["PATH"] = directory_bin + os.pathsep + os.environ["PATH"]
return

def check_tools():
if ("linux" == host_platform()):
directory = __file__script__path__ + "/../tools/linux"
if not is_os_arm() and config.check_option("platform", "linux_arm64"):
if not is_dir(directory + "/qt"):
create_dir(directory + "/qt")
cmd("python", [directory + "/arm/build_qt.py", "--arch", "arm64", directory + "/qt/arm64"])
return
Loading

0 comments on commit 6505ee1

Please sign in to comment.