Skip to content

Commit

Permalink
Merge pull request #647 from ONLYOFFICE/release/v7.4.0
Browse files Browse the repository at this point in the history
Release/v7.4.0
  • Loading branch information
K0R0L authored Apr 13, 2023
2 parents fb9d1e6 + b91cbf1 commit 014b74b
Show file tree
Hide file tree
Showing 15 changed files with 107 additions and 31 deletions.
1 change: 1 addition & 0 deletions build.pro
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ desktop {
!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)
}
Expand Down
20 changes: 13 additions & 7 deletions scripts/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,20 +72,26 @@ def parse():
#if check_option("platform", "ios"):
# extend_option("config", "core_ios_32")

# check vs-version
if ("" == option("vs-version")):
options["vs-version"] = "2015"

# enable v8 8.9 version, if compiler support sources
if ("linux" == host_platform) and (5004 <= base.get_gcc_version()) and not check_option("platform", "android"):
extend_option("config", "v8_version_89")

if ("linux" == host_platform) and (5004 > base.get_gcc_version()) and not check_option("platform", "android"):
extend_option("config", "cef_version_107")
extend_option("config", "v8_version_60")

if ("windows" == host_platform) and ("2019" == option("vs-version")):
extend_option("config", "v8_version_89")
extend_option("config", "vs2019")
# check vs-version
if ("windows" == host_platform) and ("" == option("vs-version")):
options["vs-version"] = "2019"
if check_option("platform", "win_64_xp") or check_option("platform", "win_64_xp"):
options["vs-version"] = "2015"

if ("windows" == host_platform):
if ("2019" == option("vs-version")):
extend_option("config", "vs2019")
extend_option("config", "v8_version_89")
else:
extend_option("config", "v8_version_60")

if check_option("platform", "linux_arm64"):
extend_option("config", "v8_version_89")
Expand Down
2 changes: 2 additions & 0 deletions scripts/core_common/modules/boost.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ def make():
win_toolset = "msvc-14.2"
win_boot_arg = "vc142"
win_vs_version = "vc142"

# add "define=_ITERATOR_DEBUG_LEVEL=0" to b2 args before install for disable _ITERATOR_DEBUG_LEVEL
if (-1 != config.option("platform").find("win_64")) and not base.is_file("../build/win_64/lib/libboost_system-" + win_vs_version + "-mt-x64-1_72.lib"):
base.cmd("bootstrap.bat", [win_boot_arg])
base.cmd("b2.exe", ["headers"])
Expand Down
1 change: 1 addition & 0 deletions scripts/core_common/modules/icu.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ def make():
base.create_dir(base_dir + "/icu/cross_build")
os.chdir("icu/cross_build")
base.cmd("./../source/runConfigureICU", ["Linux", "--prefix=" + base_dir + "/icu/cross_build_install"])
base.replaceInFile("./../source/icudefs.mk.in", "LDFLAGS = @LDFLAGS@ $(RPATHLDFLAGS)", "LDFLAGS = @LDFLAGS@ $(RPATHLDFLAGS) -static-libstdc++ -static-libgcc")
base.cmd("make", ["-j4"])
base.cmd("make", ["install"], True)
base.create_dir(base_dir + "/linux_64")
Expand Down
2 changes: 2 additions & 0 deletions scripts/core_common/modules/v8.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ def make():
base.cmd2("gn", ["gen", "out.gn/mac_64", "--args=\"is_debug=false " + base_args64 + "\""])
base.cmd("ninja", ["-C", "out.gn/mac_64"])

# add enable_iterator_debugging=false for disable _ITERATOR_DEBUG_LEVEL
if config.check_option("platform", "win_64"):
if (-1 != config.option("config").lower().find("debug")):
base.cmd2("gn", ["gen", "out.gn/win_64/debug", "--args=\"is_debug=true " + base_args64 + " is_clang=false\""])
Expand Down Expand Up @@ -265,6 +266,7 @@ def make_xp():
" replaceInFile(file, '<RuntimeLibrary>MultiThreaded</RuntimeLibrary>', '<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>')",
]);

# add "SET CL=\"/D_ITERATOR_DEBUG_LEVEL=0\"" before devenv for disable _ITERATOR_DEBUG_LEVEL in debug
if config.check_option("platform", "win_64_xp"):
if not base.is_dir("win_64/release"):
base.run_as_bat(["call python v8/build/gyp_v8 -Dtarget_arch=x64", "call python v8/build/common_xp.py", "call devenv v8/tools/gyp/v8.sln /Rebuild Release"])
Expand Down
37 changes: 37 additions & 0 deletions scripts/core_common/modules/v8_89.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
class StrongRootBlockAllocator {
public:
using pointer = Address*;
using const_pointer = const Address*;
using reference = Address&;
using const_reference = const Address&;
using value_type = Address;
using size_type = size_t;
using difference_type = ptrdiff_t;
template <class U>
struct rebind;

explicit StrongRootBlockAllocator(Heap* heap) : heap_(heap) {}

Address* allocate(size_t n);
void deallocate(Address* p, size_t n) noexcept;

private:
Heap* heap_;
};

// Rebinding to Address gives another StrongRootBlockAllocator.
template <>
struct StrongRootBlockAllocator::rebind<Address> {
using other = StrongRootBlockAllocator;
};

// Rebinding to something other than Address gives a std::allocator that
// is copy-constructable from StrongRootBlockAllocator.
template <class U>
struct StrongRootBlockAllocator::rebind {
class other : public std::allocator<U> {
public:
// NOLINTNEXTLINE
other(const StrongRootBlockAllocator&) {}
};
};
30 changes: 29 additions & 1 deletion scripts/core_common/modules/v8_89.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,16 @@ def make_args(args, platform, is_64=True, is_debug=False):

if is_debug:
args_copy.append("is_debug=true")
if (platform == "windows"):
args_copy.append("enable_iterator_debugging=true")
else:
args_copy.append("is_debug=false")

if (platform == "linux"):
args_copy.append("is_clang=true")
args_copy.append("use_sysroot=false")
if (platform == "windows"):
args_copy.append("is_clang=false")
args_copy.append("is_clang=false")

return "--args=\"" + " ".join(args_copy) + "\""

Expand All @@ -50,6 +52,28 @@ def ninja_windows_make(args, is_64=True, is_debug=False):
base.move_file("./" + directory_out + "/obj/v8_wrappers.ninja.bak", "./" + directory_out + "/obj/v8_wrappers.ninja")
return

# patch v8 for build ---------------------------------------------------
def patch_windows_debug():
# v8 8.9 version does not built with enable_iterator_debugging flag
# patch heap.h file:
file_patch = "./src/heap/heap.h"
base.copy_file(file_patch, file_patch + ".bak")
content_old = base.readFile(file_patch)
posStart = content_old.find("class StrongRootBlockAllocator {")
posEnd = content_old.find("};", posStart + 1)
posEnd = content_old.find("};", posEnd + 1)
content = content_old[0:posStart]
content += base.readFile("./../../../../../build_tools/scripts/core_common/modules/v8_89.patch")
content += content_old[posEnd + 2:]
base.writeFile(file_patch, content)
return

def unpatch_windows_debug():
file_patch = "./src/heap/heap.h"
base.move_file(file_patch + ".bak", file_patch)
return
# ----------------------------------------------------------------------

def make():
old_env = dict(os.environ)
old_cur = os.getcwd()
Expand Down Expand Up @@ -114,15 +138,19 @@ def make():
if config.check_option("platform", "win_64"):
if (-1 != config.option("config").lower().find("debug")):
if not base.is_file("out.gn/win_64/debug/obj/v8_monolith.lib"):
patch_windows_debug()
ninja_windows_make(gn_args, True, True)
unpatch_windows_debug()

if not base.is_file("out.gn/win_64/release/obj/v8_monolith.lib"):
ninja_windows_make(gn_args)

if config.check_option("platform", "win_32"):
if (-1 != config.option("config").lower().find("debug")):
if not base.is_file("out.gn/win_32/debug/obj/v8_monolith.lib"):
patch_windows_debug()
ninja_windows_make(gn_args, False, True)
unpatch_windows_debug()

if not base.is_file("out.gn/win_32/release/obj/v8_monolith.lib"):
ninja_windows_make(gn_args, False)
Expand Down
4 changes: 2 additions & 2 deletions scripts/deploy_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ def make():
else:
base.copy_exe(core_build_dir + "/bin/" + platform_postfix, root_dir, "x2t")

if (native_platform == "linux_64"):
base.generate_check_linux_system(git_dir + "/build_tools", root_dir)
#if (native_platform == "linux_64"):
# base.generate_check_linux_system(git_dir + "/build_tools", root_dir)

# icu
if (0 == platform.find("win")):
Expand Down
9 changes: 5 additions & 4 deletions scripts/deploy_desktop.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,14 @@ def make():
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "Fb2File")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "EpubFile")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "DocxRenderer")
base.copy_file(git_dir + "/sdkjs/pdf/src/engine/cmap.bin", root_dir + "/cmap.bin")


if ("ios" == platform):
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "x2t")
else:
base.copy_exe(core_build_dir + "/bin/" + platform_postfix, root_dir + "/converter", "x2t")

if (native_platform == "linux_64"):
base.generate_check_linux_system(git_dir + "/build_tools", root_dir + "/converter")
#if (native_platform == "linux_64"):
# base.generate_check_linux_system(git_dir + "/build_tools", root_dir + "/converter")

# icu
if (0 == platform.find("win")):
Expand Down Expand Up @@ -156,6 +155,8 @@ def make():

if (0 == platform.find("win")):
base.copy_file(git_dir + "/desktop-apps/win-linux/extras/projicons/" + apps_postfix + "/projicons.exe", root_dir + "/DesktopEditors.exe")
if not isWindowsXP:
base.copy_file(git_dir + "/desktop-apps/win-linux/extras/update-daemon/" + apps_postfix + "/updatesvc.exe", root_dir + "/updatesvc.exe")
base.copy_file(git_dir + "/desktop-apps/win-linux/" + apps_postfix + "/DesktopEditors.exe", root_dir + "/editors.exe")
base.copy_file(git_dir + "/desktop-apps/win-linux/res/icons/desktopeditors.ico", root_dir + "/app.ico")
elif (0 == platform.find("linux")):
Expand Down
4 changes: 2 additions & 2 deletions scripts/deploy_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ def make():
base.copy_file(git_dir + "/sdkjs/pdf/src/engine/cmap.bin", converter_dir + "/cmap.bin")
base.copy_exe(core_build_dir + "/bin/" + platform_postfix, converter_dir, "x2t")

if (native_platform == "linux_64"):
base.generate_check_linux_system(git_dir + "/build_tools", converter_dir)
#if (native_platform == "linux_64"):
# base.generate_check_linux_system(git_dir + "/build_tools", converter_dir)

base.generate_doctrenderer_config(converter_dir + "/DoctRenderer.config", "../../../", "server")

Expand Down
2 changes: 1 addition & 1 deletion scripts/package_branding.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
if utils.is_windows():
desktop_product_name = "Desktop Editors"
desktop_product_name_s = desktop_product_name.replace(" ","")
desktop_package_name = company_name + "_" + desktop_product_name_s
desktop_package_name = company_name + "-" + desktop_product_name_s
desktop_vcredist_list = ["2022"]
desktop_update_changes_list = {
"en": "changes",
Expand Down
14 changes: 6 additions & 8 deletions scripts/package_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,17 @@ def make_windows():
utils.set_cwd("document-builder-package")

prefix = common.platforms[common.platform]["prefix"]
company = branding.company_name.lower()
product = branding.builder_product_name.replace(" ","").lower()
company = branding.company_name
product = branding.builder_product_name.replace(" ","")
source_dir = "..\\build_tools\\out\\%s\\%s\\%s" % (prefix, company, product)
package_name = company + "_" + product
package_name = company + "-" + product
package_version = common.version + "." + common.build
suffix = {
"windows_x64": "x64",
"windows_x86": "x86",
"windows_x64_xp": "x64_xp",
"windows_x86_xp": "x86_xp"
"windows_x86": "x86"
}[common.platform]
zip_file = "%s_%s_%s.zip" % (package_name, package_version, suffix)
inno_file = "%s_%s_%s.exe" % (package_name, package_version, suffix)
zip_file = "%s-%s-%s-%s.zip" % (company, product, package_version, suffix)
inno_file = "%s-%s-%s-%s.exe" % (company, product, package_version, suffix)

if common.clean:
utils.log_h2("builder clean")
Expand Down
10 changes: 5 additions & 5 deletions scripts/package_desktop.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ def make_windows():
"windows_x86_xp": "32"
}
suffix = arch_list[common.platform]
if common.platform.endswith("_xp"): suffix += "_xp"
zip_file = "%s_%s_%s.zip" % (package_name, package_version, suffix)
inno_file = "%s_%s_%s.exe" % (package_name, package_version, suffix)
inno_help_file = "%s_Help_%s_%s.exe" % (package_name, package_version, suffix)
if common.platform.endswith("_xp"): suffix += "-xp"
zip_file = "%s-%s-%s.zip" % (package_name, package_version, suffix)
inno_file = "%s-%s-%s.exe" % (package_name, package_version, suffix)
inno_help_file = "%s-Help-%s-%s.exe" % (package_name, package_version, suffix)
inno_update_file = "update\\editors_update_%s.exe" % suffix
advinst_file = "%s_%s_%s.msi" % (package_name, package_version, suffix)
advinst_file = "%s-%s-%s.msi" % (package_name, package_version, suffix)

if common.clean:
utils.log_h2("desktop clean")
Expand Down
Binary file added tools/linux/sysroot/ubuntu14/libdbus-1.so.3
Binary file not shown.
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.3.3
7.4.0

0 comments on commit 014b74b

Please sign in to comment.