mirror of
https://github.com/ONLYOFFICE/build_tools.git
synced 2026-04-07 14:06:31 +08:00
Compare commits
58 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1269d0234d | |||
| c1f7e8f471 | |||
| fe098a7ee7 | |||
| aced6c5119 | |||
| 94cd21189e | |||
| 4e07941e7a | |||
| a2fcf85e3b | |||
| e830cb9141 | |||
| 9bf3985fb2 | |||
| 59ad11b0f4 | |||
| ca7d92703e | |||
| cd040fc148 | |||
| 56c6ff289e | |||
| 7f41b96e07 | |||
| 41d2dfce6a | |||
| 0a712e3a68 | |||
| 0eca5a6fba | |||
| 8ab3f20eb8 | |||
| 634119f66a | |||
| 28718191d6 | |||
| f5f40c4746 | |||
| f6f832a7dd | |||
| e50882881d | |||
| 2937163371 | |||
| 0e6af8fc1b | |||
| 4da15cc3bd | |||
| 96312f29e3 | |||
| 32e2956346 | |||
| be820dc843 | |||
| 1a31d76034 | |||
| 73f0fb77bf | |||
| 263c857ca2 | |||
| 21e2a8f72e | |||
| 762eec7bf2 | |||
| ad388af712 | |||
| 9e6cd77650 | |||
| 101bbebbe6 | |||
| 2c27efe936 | |||
| 6404e71e22 | |||
| 575f835475 | |||
| ad2cdeebd8 | |||
| 66591ea617 | |||
| e5f4ee1555 | |||
| b1576abb74 | |||
| 35aa3e8ee2 | |||
| 9b0c7a1008 | |||
| ebccbfbbe2 | |||
| e921585baa | |||
| 9662f10652 | |||
| 9b374f2683 | |||
| a5eceac4c5 | |||
| 200a3c698a | |||
| 5b265245a4 | |||
| 9e974d30db | |||
| afbe93c5cb | |||
| 554e6489e5 | |||
| be06b3c2c8 | |||
| bfcc577df1 |
@ -29,12 +29,12 @@ core_android {
|
||||
}
|
||||
|
||||
addSubProject(cryptopp, $$CORE_ROOT_DIR/Common/3dParty/cryptopp/project/cryptopp.pro)
|
||||
addSubProject(kernel, $$CORE_ROOT_DIR/Common/kernel.pro,\
|
||||
cryptopp)
|
||||
addSubProject(unicodeconverter, $$CORE_ROOT_DIR/UnicodeConverter/UnicodeConverter.pro,\
|
||||
kernel)
|
||||
cryptopp)
|
||||
addSubProject(kernel, $$CORE_ROOT_DIR/Common/kernel.pro,\
|
||||
unicodeconverter)
|
||||
addSubProject(network, $$CORE_ROOT_DIR/Common/Network/network.pro,\
|
||||
kernel)
|
||||
kernel unicodeconverter)
|
||||
addSubProject(graphics, $$CORE_ROOT_DIR/DesktopEditor/graphics/pro/graphics.pro,\
|
||||
kernel unicodeconverter)
|
||||
addSubProject(pdfwriter, $$CORE_ROOT_DIR/PdfWriter/PdfWriter.pro,\
|
||||
|
||||
29
make.py
29
make.py
@ -70,21 +70,26 @@ if ("1" == base.get_env("OO_ONLY_BUILD_JS")):
|
||||
make_common.make()
|
||||
|
||||
# build updmodule for desktop (only for windows version)
|
||||
if ("windows" == base.host_platform()) and (config.check_option("module", "desktop")):
|
||||
config.extend_option("config", "updmodule")
|
||||
config.extend_option("qmake_addon", "LINK=https://download.onlyoffice.com/install/desktop/editors/windows/onlyoffice/appcast.xml")
|
||||
if config.check_option("module", "desktop"):
|
||||
config.extend_option("qmake_addon", "URL_WEBAPPS_HELP=https://download.onlyoffice.com/install/desktop/editors/help/v" + base.get_env('PRODUCT_VERSION') + "-1/apps")
|
||||
|
||||
if not base.is_file(base_dir + "/tools/WinSparkle-0.7.0.zip"):
|
||||
base.cmd("curl.exe", ["https://d2ettrnqo7v976.cloudfront.net/winsparkle/WinSparkle-0.7.0.zip", "--output", base_dir + "/tools/WinSparkle-0.7.0.zip"])
|
||||
|
||||
if not base.is_dir(base_dir + "/tools/WinSparkle-0.7.0"):
|
||||
base.cmd("7z.exe", ["x", base_dir + "/tools/WinSparkle-0.7.0.zip", "-otools"])
|
||||
if "windows" == base.host_platform():
|
||||
config.extend_option("config", "updmodule")
|
||||
config.extend_option("qmake_addon", "LINK=https://download.onlyoffice.com/install/desktop/editors/windows/onlyoffice/appcast.xml")
|
||||
|
||||
base.create_dir(base_dir + "/../desktop-apps/win-linux/3dparty/WinSparkle")
|
||||
#base.copy_dir(base_dir + "/tools/WinSparkle-0.7.0/include", base_dir + "/../desktop-apps/win-linux/3dparty/WinSparkle/include")
|
||||
base.copy_dir(base_dir + "/tools/WinSparkle-0.7.0/Release", base_dir + "/../desktop-apps/win-linux/3dparty/WinSparkle/win_32")
|
||||
base.copy_dir(base_dir + "/tools/WinSparkle-0.7.0/x64/Release", base_dir + "/../desktop-apps/win-linux/3dparty/WinSparkle/win_64")
|
||||
if not base.is_file(base_dir + "/tools/WinSparkle-0.7.0.zip"):
|
||||
base.cmd("curl.exe", ["https://d2ettrnqo7v976.cloudfront.net/winsparkle/WinSparkle-0.7.0.zip", "--output", base_dir + "/tools/WinSparkle-0.7.0.zip"])
|
||||
|
||||
if not base.is_dir(base_dir + "/tools/WinSparkle-0.7.0"):
|
||||
base.cmd("7z.exe", ["x", base_dir + "/tools/WinSparkle-0.7.0.zip", "-otools"])
|
||||
|
||||
base.create_dir(base_dir + "/../desktop-apps/win-linux/3dparty/WinSparkle")
|
||||
#base.copy_dir(base_dir + "/tools/WinSparkle-0.7.0/include", base_dir + "/../desktop-apps/win-linux/3dparty/WinSparkle/include")
|
||||
base.copy_dir(base_dir + "/tools/WinSparkle-0.7.0/Release", base_dir + "/../desktop-apps/win-linux/3dparty/WinSparkle/win_32")
|
||||
base.copy_dir(base_dir + "/tools/WinSparkle-0.7.0/x64/Release", base_dir + "/../desktop-apps/win-linux/3dparty/WinSparkle/win_64")
|
||||
|
||||
if ("windows" == base.host_platform()):
|
||||
base.set_env("VIDEO_PLAYER_VLC_DIR", base_dir + "/../desktop-sdk/ChromiumBasedEditors/videoplayerlib/vlc")
|
||||
|
||||
# build
|
||||
build.make()
|
||||
|
||||
134
scripts/base.py
134
scripts/base.py
@ -175,6 +175,14 @@ def create_dir(path):
|
||||
os.makedirs(path2)
|
||||
return
|
||||
|
||||
def move_dir(src, dst):
|
||||
if is_dir(dst):
|
||||
delete_dir(dst)
|
||||
if is_dir(src):
|
||||
copy_dir(src, dst)
|
||||
delete_dir(src)
|
||||
return
|
||||
|
||||
def copy_dir(src, dst):
|
||||
if is_dir(dst):
|
||||
delete_dir(dst)
|
||||
@ -240,6 +248,9 @@ def copy_exe(src, dst, name):
|
||||
return
|
||||
|
||||
def replaceInFile(path, text, textReplace):
|
||||
if not is_file(path):
|
||||
print("[replaceInFile] file not exist: " + path)
|
||||
return
|
||||
filedata = ""
|
||||
with open(get_path(path), "r") as file:
|
||||
filedata = file.read()
|
||||
@ -249,6 +260,9 @@ def replaceInFile(path, text, textReplace):
|
||||
file.write(filedata)
|
||||
return
|
||||
def replaceInFileRE(path, pattern, textReplace):
|
||||
if not is_file(path):
|
||||
print("[replaceInFile] file not exist: " + path)
|
||||
return
|
||||
filedata = ""
|
||||
with open(get_path(path), "r") as file:
|
||||
filedata = file.read()
|
||||
@ -447,14 +461,13 @@ def get_repositories():
|
||||
result["core"] = [False, False]
|
||||
result["sdkjs"] = [False, False]
|
||||
result.update(get_sdkjs_addons())
|
||||
result.update(get_sdkjs_plugins())
|
||||
result.update(get_sdkjs_plugins_server())
|
||||
result["onlyoffice.github.io"] = [False, False]
|
||||
result["web-apps"] = [False, False]
|
||||
result.update(get_web_apps_addons())
|
||||
result["dictionaries"] = [False, False]
|
||||
|
||||
if config.check_option("module", "builder"):
|
||||
result["DocumentBuilder"] = [False, False]
|
||||
result["document-templates"] = [False, False]
|
||||
|
||||
if config.check_option("module", "desktop"):
|
||||
result["desktop-sdk"] = [False, False]
|
||||
@ -824,22 +837,6 @@ def get_web_apps_addons():
|
||||
result[name] = [True, False]
|
||||
return result
|
||||
|
||||
def get_plugins(plugins_list=""):
|
||||
result = {}
|
||||
if ("" == plugins_list):
|
||||
return result
|
||||
plugins_list = plugins_list.rsplit(", ")
|
||||
plugins_dir = get_script_dir() + "/../../sdkjs-plugins"
|
||||
for name in plugins_list:
|
||||
result["plugin-" + name] = [True, plugins_dir]
|
||||
return result
|
||||
|
||||
def get_sdkjs_plugins():
|
||||
return get_plugins(config.option("sdkjs-plugin"))
|
||||
|
||||
def get_sdkjs_plugins_server():
|
||||
return get_plugins(config.option("sdkjs-plugin-server"))
|
||||
|
||||
def sdkjs_addons_param():
|
||||
if ("" == config.option("sdkjs-addons")):
|
||||
return []
|
||||
@ -1006,7 +1003,7 @@ def get_file_last_modified_url(url):
|
||||
|
||||
def mac_correct_rpath_binary(path, libs):
|
||||
for lib in libs:
|
||||
cmd("install_name_tool", ["-change", "lib" + lib + ".dylib", "@rpath/lib" + lib + ".dylib", path])
|
||||
cmd("install_name_tool", ["-change", "lib" + lib + ".dylib", "@rpath/lib" + lib + ".dylib", path], True)
|
||||
return
|
||||
|
||||
def mac_correct_rpath_library(name, libs):
|
||||
@ -1017,20 +1014,20 @@ def mac_correct_rpath_x2t(dir):
|
||||
os.chdir(dir)
|
||||
mac_correct_rpath_library("icudata.58", [])
|
||||
mac_correct_rpath_library("icuuc.58", ["icudata.58"])
|
||||
mac_correct_rpath_library("UnicodeConverter", ["icuuc.58", "icudata.58", "kernel"])
|
||||
mac_correct_rpath_library("kernel", [])
|
||||
mac_correct_rpath_library("kernel_network", ["kernel"])
|
||||
mac_correct_rpath_library("UnicodeConverter", ["icuuc.58", "icudata.58"])
|
||||
mac_correct_rpath_library("kernel", ["UnicodeConverter"])
|
||||
mac_correct_rpath_library("kernel_network", ["UnicodeConverter", "kernel"])
|
||||
mac_correct_rpath_library("graphics", ["UnicodeConverter", "kernel"])
|
||||
mac_correct_rpath_library("doctrenderer", ["UnicodeConverter", "kernel", "kernel_network", "graphics"])
|
||||
mac_correct_rpath_library("HtmlFile2", ["UnicodeConverter", "kernel", "kernel_network", "graphics"])
|
||||
mac_correct_rpath_library("EpubFile", ["kernel", "HtmlFile2", "graphics"])
|
||||
mac_correct_rpath_library("EpubFile", ["UnicodeConverter", "kernel", "HtmlFile2", "graphics"])
|
||||
mac_correct_rpath_library("Fb2File", ["UnicodeConverter", "kernel", "graphics"])
|
||||
mac_correct_rpath_library("HtmlRenderer", ["UnicodeConverter", "kernel", "graphics"])
|
||||
mac_correct_rpath_library("PdfWriter", ["UnicodeConverter", "kernel", "graphics"])
|
||||
mac_correct_rpath_library("DjVuFile", ["kernel", "UnicodeConverter", "graphics", "PdfWriter"])
|
||||
mac_correct_rpath_library("PdfReader", ["kernel", "UnicodeConverter", "graphics", "PdfWriter", "HtmlRenderer"])
|
||||
mac_correct_rpath_library("XpsFile", ["kernel", "UnicodeConverter", "graphics", "PdfWriter"])
|
||||
mac_correct_rpath_library("DocxRenderer", ["kernel", "UnicodeConverter", "graphics"])
|
||||
mac_correct_rpath_library("PdfWriter", ["UnicodeConverter", "kernel", "graphics", "kernel_network"])
|
||||
mac_correct_rpath_library("DjVuFile", ["UnicodeConverter", "kernel", "graphics", "PdfWriter"])
|
||||
mac_correct_rpath_library("PdfReader", ["UnicodeConverter", "kernel", "graphics", "PdfWriter", "HtmlRenderer"])
|
||||
mac_correct_rpath_library("XpsFile", ["UnicodeConverter", "kernel", "graphics", "PdfWriter"])
|
||||
mac_correct_rpath_library("DocxRenderer", ["UnicodeConverter", "kernel", "graphics"])
|
||||
cmd("chmod", ["-v", "+x", "./x2t"])
|
||||
cmd("install_name_tool", ["-add_rpath", "@executable_path", "./x2t"], True)
|
||||
mac_correct_rpath_binary("./x2t", ["icudata.58", "icuuc.58", "UnicodeConverter", "kernel", "kernel_network", "graphics", "PdfWriter", "HtmlRenderer", "PdfReader", "XpsFile", "DjVuFile", "HtmlFile2", "Fb2File", "EpubFile", "doctrenderer", "DocxRenderer"])
|
||||
@ -1045,6 +1042,15 @@ def mac_correct_rpath_x2t(dir):
|
||||
os.chdir(cur_dir)
|
||||
return
|
||||
|
||||
def mac_correct_rpath_docbuilder(dir):
|
||||
cur_dir = os.getcwd()
|
||||
os.chdir(dir)
|
||||
cmd("chmod", ["-v", "+x", "./docbuilder"])
|
||||
cmd("install_name_tool", ["-add_rpath", "@executable_path", "./docbuilder"], True)
|
||||
mac_correct_rpath_binary("./docbuilder", ["icudata.58", "icuuc.58", "UnicodeConverter", "kernel", "kernel_network", "graphics", "PdfWriter", "HtmlRenderer", "PdfReader", "XpsFile", "DjVuFile", "HtmlFile2", "Fb2File", "EpubFile", "doctrenderer", "DocxRenderer"])
|
||||
os.chdir(cur_dir)
|
||||
return
|
||||
|
||||
def mac_correct_rpath_desktop(dir):
|
||||
mac_correct_rpath_x2t(dir + "/converter")
|
||||
cur_dir = os.getcwd()
|
||||
@ -1088,7 +1094,7 @@ def common_check_version(name, good_version, clean_func):
|
||||
return
|
||||
|
||||
def copy_sdkjs_plugin(src_dir, dst_dir, name, is_name_as_guid=False, is_desktop_local=False):
|
||||
src_dir_path = src_dir + "/plugin-" + name
|
||||
src_dir_path = src_dir + "/" + name
|
||||
if not is_dir(src_dir_path):
|
||||
src_dir_path = src_dir + "/" + name
|
||||
if not is_file(src_dir_path + "/config.json"):
|
||||
@ -1124,7 +1130,7 @@ def copy_sdkjs_plugin(src_dir, dst_dir, name, is_name_as_guid=False, is_desktop_
|
||||
return
|
||||
|
||||
def copy_sdkjs_plugins(dst_dir, is_name_as_guid=False, is_desktop_local=False):
|
||||
plugins_dir = get_script_dir() + "/../../sdkjs-plugins"
|
||||
plugins_dir = get_script_dir() + "/../../onlyoffice.github.io/sdkjs-plugins/content"
|
||||
plugins_list_config = config.option("sdkjs-plugin")
|
||||
if ("" == plugins_list_config):
|
||||
return
|
||||
@ -1134,7 +1140,7 @@ def copy_sdkjs_plugins(dst_dir, is_name_as_guid=False, is_desktop_local=False):
|
||||
return
|
||||
|
||||
def copy_sdkjs_plugins_server(dst_dir, is_name_as_guid=False, is_desktop_local=False):
|
||||
plugins_dir = get_script_dir() + "/../../sdkjs-plugins"
|
||||
plugins_dir = get_script_dir() + "/../../onlyoffice.github.io/sdkjs-plugins/content"
|
||||
plugins_list_config = config.option("sdkjs-plugin-server")
|
||||
if ("" == plugins_list_config):
|
||||
return
|
||||
@ -1231,6 +1237,16 @@ def make_sln(directory, args, is_no_errors):
|
||||
os.environ.update(old_env)
|
||||
return
|
||||
|
||||
def make_sln_project(directory, sln_path):
|
||||
args = []
|
||||
args.append(sln_path)
|
||||
args.append("/Rebuild")
|
||||
if (config.check_option("platform", "win_64")):
|
||||
make_sln(directory, args + ["\"Release|x64\""], True)
|
||||
if True:#(config.check_option("platform", "win_32")):
|
||||
make_sln(directory, args + ["\"Release|Win32\""], True)
|
||||
return
|
||||
|
||||
def get_android_sdk_home():
|
||||
ndk_root_path = get_env("ANDROID_NDK_ROOT")
|
||||
if (-1 != ndk_root_path.find("/ndk/")):
|
||||
@ -1270,3 +1286,57 @@ def copy_v8_files(core_dir, deploy_dir, platform, is_xp=False):
|
||||
else:
|
||||
copy_files(directory_v8 + platform + "/icudt*.dat", deploy_dir + "/")
|
||||
return
|
||||
|
||||
def clone_marketplace_plugin(out_dir, is_name_as_guid=False):
|
||||
old_cur = os.getcwd()
|
||||
os.chdir(out_dir)
|
||||
git_update("onlyoffice.github.io", False, True)
|
||||
os.chdir(old_cur)
|
||||
|
||||
dst_dir_name = "marketplace"
|
||||
if is_name_as_guid:
|
||||
config_content = readFile(out_dir + "/onlyoffice.github.io/store/plugin/config.json")
|
||||
index_start = config_content.find("\"asc.{")
|
||||
index_start += 5
|
||||
index_end = config_content.find("}", index_start)
|
||||
index_end += 1
|
||||
guid = config_content[index_start:index_end]
|
||||
dst_dir_name = guid
|
||||
|
||||
dst_dir_path = out_dir + "/" + dst_dir_name
|
||||
|
||||
if is_dir(dst_dir_path):
|
||||
delete_dir(dst_dir_path)
|
||||
|
||||
copy_dir(out_dir + "/onlyoffice.github.io/store/plugin", dst_dir_path)
|
||||
delete_dir_with_access_error(out_dir + "/onlyoffice.github.io")
|
||||
return
|
||||
|
||||
def correctPathForBuilder(path):
|
||||
replace_value = "../../../build/"
|
||||
if (config.option("branding") != ""):
|
||||
replace_value += (config.option("branding") + "/")
|
||||
replace_value += "lib/"
|
||||
if (config.check_option("config", "debug")):
|
||||
replace_value += ("debug/")
|
||||
if (replace_value == "../../../build/lib/"):
|
||||
return ""
|
||||
new_path = path + ".bak"
|
||||
copy_file(path, new_path)
|
||||
replaceInFile(path, "../../../build/lib/", replace_value)
|
||||
return new_path
|
||||
|
||||
def restorePathForBuilder(new_path):
|
||||
if ("" == new_path):
|
||||
return
|
||||
old_path = new_path[:-4]
|
||||
delete_file(old_path)
|
||||
copy_file(new_path, old_path)
|
||||
delete_file(new_path);
|
||||
return
|
||||
|
||||
def generate_check_linux_system(build_tools_dir, out_dir):
|
||||
create_dir(out_dir + "/.system")
|
||||
copy_file(build_tools_dir + "/tools/linux/check_system/check.sh", out_dir + "/.system/check.sh")
|
||||
copy_file(build_tools_dir + "/tools/linux/check_system/libstdc++.so.6", out_dir + "/.system/libstdc++.so.6")
|
||||
return
|
||||
@ -51,7 +51,7 @@ def make_pro_file(makefiles_dir, pro_file):
|
||||
# qmake ADDON
|
||||
qmake_addon = []
|
||||
if ("" != config.option("qmake_addon")):
|
||||
qmake_addon.append(config.option("qmake_addon"))
|
||||
qmake_addon = config.option("qmake_addon").split()
|
||||
|
||||
if not base.is_file(qt_dir + "/bin/qmake") and not base.is_file(qt_dir + "/bin/qmake.exe"):
|
||||
print("THIS PLATFORM IS NOT SUPPORTED")
|
||||
@ -79,7 +79,7 @@ def make_pro_file(makefiles_dir, pro_file):
|
||||
qmake_bat.append("if exist ./" + makefiles_dir + "/build.makefile_" + file_suff + " del /F ./" + makefiles_dir + "/build.makefile_" + file_suff)
|
||||
qmake_addon_string = ""
|
||||
if ("" != config.option("qmake_addon")):
|
||||
qmake_addon_string = " \"" + config.option("qmake_addon") + "\""
|
||||
qmake_addon_string = " " + (" ").join(["\"" + addon + "\"" for addon in qmake_addon])
|
||||
qmake_bat.append("call \"" + qt_dir + "/bin/qmake\" -nocache " + pro_file + " \"CONFIG+=" + config_param + "\"" + qmake_addon_string)
|
||||
if ("1" == config.option("clean")):
|
||||
qmake_bat.append("call nmake clean -f " + makefiles_dir + "/build.makefile_" + file_suff)
|
||||
@ -97,25 +97,17 @@ def make_pro_file(makefiles_dir, pro_file):
|
||||
|
||||
# make build.pro
|
||||
def make():
|
||||
is_no_brandind_build = base.is_file("config")
|
||||
make_pro_file("makefiles", "build.pro")
|
||||
if config.check_option("module", "builder") and base.is_windows() and is_no_brandind_build:
|
||||
if config.check_option("module", "builder") and base.is_windows() and "onlyoffice" == config.branding():
|
||||
# check replace
|
||||
replace_path_lib = ""
|
||||
replace_path_lib_file = os.getcwd() + "/../core/DesktopEditor/doctrenderer/docbuilder.com/docbuilder.h"
|
||||
option_branding = config.option("branding")
|
||||
if (option_branding != ""):
|
||||
replace_path_lib = "../../../build/" + option_branding + "/lib/"
|
||||
# replace
|
||||
if (replace_path_lib != ""):
|
||||
base.replaceInFile(replace_path_lib_file, "../../../build/lib/", replace_path_lib)
|
||||
new_replace_path = base.correctPathForBuilder(os.getcwd() + "/../core/DesktopEditor/doctrenderer/docbuilder.com/docbuilder.h")
|
||||
if ("2019" == config.option("vs-version")):
|
||||
base.make_sln("../core/DesktopEditor/doctrenderer/docbuilder.com", ["docbuilder.com_2019.sln", "/Rebuild", "\"Release|x64\""], True)
|
||||
base.make_sln("../core/DesktopEditor/doctrenderer/docbuilder.com", ["docbuilder.com_2019.sln", "/Rebuild", "\"Release|Win32\""], True)
|
||||
base.make_sln_project("../core/DesktopEditor/doctrenderer/docbuilder.com", "docbuilder.com_2019.sln")
|
||||
if (True):
|
||||
new_path_net = base.correctPathForBuilder(os.getcwd() + "/../core/DesktopEditor/doctrenderer/docbuilder.net/src/docbuilder.net.cpp")
|
||||
base.make_sln_project("../core/DesktopEditor/doctrenderer/docbuilder.net/src", "docbuilder.net.sln")
|
||||
base.restorePathForBuilder(new_path_net)
|
||||
else:
|
||||
base.make_sln("../core/DesktopEditor/doctrenderer/docbuilder.com", ["docbuilder.com.sln", "/Rebuild", "\"Release|x64\""], True)
|
||||
base.make_sln("../core/DesktopEditor/doctrenderer/docbuilder.com", ["docbuilder.com.sln", "/Rebuild", "\"Release|Win32\""], True)
|
||||
# restore
|
||||
if (replace_path_lib != ""):
|
||||
base.replaceInFile(replace_path_lib_file, replace_path_lib, "../../../build/lib/")
|
||||
base.make_sln_project("../core/DesktopEditor/doctrenderer/docbuilder.com", "docbuilder.com.sln")
|
||||
base.restorePathForBuilder(new_replace_path)
|
||||
return
|
||||
|
||||
@ -51,6 +51,9 @@ 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)
|
||||
|
||||
# icu
|
||||
if (0 == platform.find("win")):
|
||||
base.copy_file(core_dir + "/Common/3dParty/icu/" + platform + "/build/icudt58.dll", root_dir + "/icudt58.dll")
|
||||
@ -77,7 +80,7 @@ def make():
|
||||
# app
|
||||
base.copy_exe(core_build_dir + "/bin/" + platform_postfix, root_dir, "docbuilder")
|
||||
base.generate_doctrenderer_config(root_dir + "/DoctRenderer.config", "./", "builder")
|
||||
base.copy_dir(git_dir + "/DocumentBuilder/empty", root_dir + "/empty")
|
||||
base.copy_dir(git_dir + "/document-templates/new/en-US", root_dir + "/empty")
|
||||
|
||||
# js
|
||||
base.copy_dir(base_dir + "/js/" + branding + "/builder/sdkjs", root_dir + "/sdkjs")
|
||||
@ -93,8 +96,10 @@ def make():
|
||||
|
||||
if ("win_64" == platform):
|
||||
base.copy_file(core_dir + "/DesktopEditor/doctrenderer/docbuilder.com/x64/Release/docbuilder.com.dll", root_dir + "/docbuilder.com.dll")
|
||||
base.copy_file(core_dir + "/DesktopEditor/doctrenderer/docbuilder.net/deploy/win_64/docbuilder.net.dll", root_dir + "/docbuilder.net.dll")
|
||||
elif ("win_32" == platform):
|
||||
base.copy_file(core_dir + "/DesktopEditor/doctrenderer/docbuilder.com/Win32/Release/docbuilder.com.dll", root_dir + "/docbuilder.com.dll")
|
||||
base.copy_file(core_dir + "/DesktopEditor/doctrenderer/docbuilder.net/deploy/win_32/docbuilder.net.dll", root_dir + "/docbuilder.net.dll")
|
||||
|
||||
# correct ios frameworks
|
||||
if ("ios" == platform):
|
||||
@ -102,6 +107,7 @@ def make():
|
||||
|
||||
if (0 == platform.find("mac")):
|
||||
base.mac_correct_rpath_x2t(root_dir)
|
||||
|
||||
base.mac_correct_rpath_docbuilder(root_dir)
|
||||
|
||||
return
|
||||
|
||||
|
||||
@ -62,10 +62,14 @@ def make():
|
||||
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")
|
||||
|
||||
# icu
|
||||
if (0 == platform.find("win")):
|
||||
base.copy_file(core_dir + "/Common/3dParty/icu/" + platform + "/build/icudt58.dll", root_dir + "/converter/icudt58.dll")
|
||||
base.copy_file(core_dir + "/Common/3dParty/icu/" + platform + "/build/icuuc58.dll", root_dir + "/converter/icuuc58.dll")
|
||||
base.copy_file(git_dir + "/desktop-apps/common/converter/package.config", root_dir + "/converter/package.config")
|
||||
|
||||
if (0 == platform.find("linux")):
|
||||
base.copy_file(core_dir + "/Common/3dParty/icu/" + platform + "/build/libicudata.so.58", root_dir + "/converter/libicudata.so.58")
|
||||
@ -153,17 +157,49 @@ def make():
|
||||
elif (0 == platform.find("linux")):
|
||||
base.copy_file(git_dir + "/desktop-apps/win-linux/" + apps_postfix + "/DesktopEditors", root_dir + "/DesktopEditors")
|
||||
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix + ("/xp" if isWindowsXP else ""), root_dir, "videoplayer")
|
||||
if ("" != base.get_env("VIDEO_PLAYER_VLC_DIR")):
|
||||
vlc_dir = git_dir + "/desktop-sdk/ChromiumBasedEditors/videoplayerlib/vlc/"
|
||||
if (0 == platform.find("win")):
|
||||
base.copy_file(vlc_dir + platform + "/bin/libvlc.dll", root_dir + "/libvlc.dll")
|
||||
base.copy_file(vlc_dir + platform + "/bin/libvlccore.dll", root_dir + "/libvlccore.dll")
|
||||
base.copy_file(vlc_dir + platform + "/bin/VLCQtCore.dll", root_dir + "/VLCQtCore.dll")
|
||||
base.copy_file(vlc_dir + platform + "/bin/VLCQtWidgets.dll", root_dir + "/VLCQtWidgets.dll")
|
||||
else:
|
||||
base.copy_file(vlc_dir + platform + "/bin/libvlc.so", root_dir + "/libvlc.so")
|
||||
base.copy_file(vlc_dir + platform + "/bin/libvlc.so.5", root_dir + "/libvlc.so.5")
|
||||
base.copy_file(vlc_dir + platform + "/bin/libvlccore.so", root_dir + "/libvlccore.so")
|
||||
base.copy_file(vlc_dir + platform + "/bin/libvlccore.so.8", root_dir + "/libvlccore.so.8")
|
||||
base.copy_file(vlc_dir + platform + "/bin/VLCQtCore.so", root_dir + "/VLCQtCore.so")
|
||||
base.copy_file(vlc_dir + platform + "/bin/VLCQtWidgets.so", root_dir + "/VLCQtWidgets.so")
|
||||
|
||||
if isWindowsXP:
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform + "/mediaplayer/xp", root_dir, "videoplayer")
|
||||
else:
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform + "/mediaplayer", root_dir, "videoplayer")
|
||||
|
||||
base.copy_dir(vlc_dir + platform + "/bin/plugins", root_dir + "/plugins")
|
||||
else:
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix + ("/xp" if isWindowsXP else ""), root_dir, "videoplayer")
|
||||
|
||||
base.create_dir(root_dir + "/editors")
|
||||
base.copy_dir(base_dir + "/js/" + branding + "/desktop/sdkjs", root_dir + "/editors/sdkjs")
|
||||
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")
|
||||
|
||||
# remove help from install until web-apps containes help
|
||||
base.delete_dir(root_dir + "/editors/web-apps/apps/documenteditor/main/resources/help")
|
||||
base.delete_dir(root_dir + "/editors/web-apps/apps/presentationeditor/main/resources/help")
|
||||
base.delete_dir(root_dir + "/editors/web-apps/apps/spreadsheeteditor/main/resources/help")
|
||||
# desktopeditors-help
|
||||
root_help_dir = root_dir + "-help"
|
||||
if (base.is_dir(root_help_dir)):
|
||||
base.delete_dir(root_help_dir)
|
||||
for i in ["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/documenteditor/main/resources/help")
|
||||
base.delete_dir(root_dir + "/editors/web-apps/apps/presentationeditor/main/resources/help")
|
||||
base.delete_dir(root_dir + "/editors/web-apps/apps/spreadsheeteditor/main/resources/help")
|
||||
|
||||
base.create_dir(root_dir + "/editors/sdkjs-plugins")
|
||||
base.copy_sdkjs_plugins(root_dir + "/editors/sdkjs-plugins", True, True)
|
||||
|
||||
@ -87,6 +87,9 @@ def make():
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, converter_dir, "DocxRenderer")
|
||||
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)
|
||||
|
||||
base.generate_doctrenderer_config(converter_dir + "/DoctRenderer.config", "../../../", "server")
|
||||
|
||||
# icu
|
||||
@ -106,12 +109,15 @@ def make():
|
||||
|
||||
# builder
|
||||
base.copy_exe(core_build_dir + "/bin/" + platform_postfix, converter_dir, "docbuilder")
|
||||
base.copy_dir(git_dir + "/DocumentBuilder/empty", converter_dir + "/empty")
|
||||
base.copy_dir(git_dir + "/document-templates/new/en-US", converter_dir + "/empty")
|
||||
|
||||
# js
|
||||
js_dir = root_dir
|
||||
base.copy_dir(base_dir + "/js/" + branding + "/builder/sdkjs", js_dir + "/sdkjs")
|
||||
base.copy_dir(base_dir + "/js/" + branding + "/builder/web-apps", js_dir + "/web-apps")
|
||||
|
||||
# add embed worker code
|
||||
base.cmd_in_dir(git_dir + "/sdkjs/common/embed", "python", ["make.py", js_dir + "/web-apps/apps/api/documents/api.js"])
|
||||
|
||||
# plugins
|
||||
base.create_dir(js_dir + "/sdkjs-plugins")
|
||||
@ -122,6 +128,8 @@ def make():
|
||||
base.download("https://onlyoffice.github.io/sdkjs-plugins/v1/plugins-ui.js", js_dir + "/sdkjs-plugins/v1/plugins-ui.js")
|
||||
base.download("https://onlyoffice.github.io/sdkjs-plugins/v1/plugins.css", js_dir + "/sdkjs-plugins/v1/plugins.css")
|
||||
base.support_old_versions_plugins(js_dir + "/sdkjs-plugins")
|
||||
|
||||
base.clone_marketplace_plugin(root_dir + "/sdkjs-plugins")
|
||||
|
||||
# tools
|
||||
tools_dir = root_dir + "/server/tools"
|
||||
@ -159,8 +167,8 @@ def make():
|
||||
#document-templates
|
||||
document_templates_files = server_dir + '/../document-templates'
|
||||
document_templates = build_server_dir + '/../document-templates'
|
||||
base.create_dir(document_templates)
|
||||
base.copy_dir(document_templates_files, document_templates)
|
||||
base.copy_dir(document_templates_files + '/new', document_templates + '/new')
|
||||
base.copy_dir(document_templates_files + '/sample', document_templates + '/sample')
|
||||
|
||||
#license
|
||||
license_file1 = server_dir + '/LICENSE.txt'
|
||||
|
||||
@ -62,7 +62,12 @@ def make():
|
||||
print("-----------------------------------------------------------")
|
||||
|
||||
base.generate_doctrenderer_config("./DoctRenderer.config", "../../../sdkjs/deploy/", "server", "../../../web-apps/vendor/")
|
||||
|
||||
if not base.is_dir(git_dir + "/sdkjs-plugins"):
|
||||
base.create_dir(git_dir + "/sdkjs-plugins")
|
||||
|
||||
base.support_old_versions_plugins(git_dir + "/sdkjs-plugins")
|
||||
base.clone_marketplace_plugin(git_dir + "/sdkjs-plugins")
|
||||
|
||||
if not base.is_dir(git_dir + "/fonts"):
|
||||
base.create_dir(git_dir + "/fonts")
|
||||
|
||||
@ -34,9 +34,6 @@ config.parse_defaults()
|
||||
|
||||
repositories = base.get_repositories()
|
||||
|
||||
# Add other plugins
|
||||
repositories.update(base.get_plugins('autocomplete, easybib, wordpress'))
|
||||
|
||||
# Add other repositories
|
||||
if config.check_option("module", "builder"):
|
||||
repositories['document-builder-package'] = [False, False]
|
||||
|
||||
@ -39,8 +39,6 @@ config.parse_defaults()
|
||||
|
||||
repositories = base.get_repositories()
|
||||
|
||||
# Add other plugins
|
||||
repositories.update(base.get_plugins('autocomplete, easybib, glavred, wordpress'))
|
||||
# Add other repositories
|
||||
repositories['core-ext'] = [True, False]
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ if product == 'desktop':
|
||||
product_name = 'Desktop Editors'
|
||||
product_name_s = product_name.replace(' ','')
|
||||
package_name = company_name + '_' + product_name_s
|
||||
vcredist_list = ['2022']
|
||||
vcredist_list = ['2022', '2013']
|
||||
update_changes_list = {
|
||||
'en': "changes",
|
||||
'ru': "changes_ru"
|
||||
|
||||
@ -76,7 +76,11 @@ def download_isxdl():
|
||||
|
||||
def make_innosetup():
|
||||
log("\n=== Build innosetup project\n")
|
||||
iscc_args = ["/DVERSION=" + package_version]
|
||||
iscc_args = [
|
||||
"/Qp",
|
||||
"/DVERSION=" + package_version,
|
||||
"/DARCH=" + arch
|
||||
]
|
||||
if not onlyoffice:
|
||||
iscc_args.append("/DBRANDING_DIR=" + get_abspath(git_dir, branding, build_dir, "exe"))
|
||||
if sign:
|
||||
|
||||
@ -26,8 +26,9 @@ def make():
|
||||
#
|
||||
|
||||
def make_windows():
|
||||
global package_version, sign, machine, arch, xp, iscc_args, source_dir, \
|
||||
innosetup_file, innosetup_update_file, advinst_file, portable_zip_file
|
||||
global package_version, sign, machine, arch, xp, iscc_args, \
|
||||
source_dir, source_help_dir, innosetup_file, innosetup_help_file, \
|
||||
innosetup_update_file, advinst_file, portable_zip_file
|
||||
|
||||
set_cwd(get_abspath(git_dir, build_dir))
|
||||
|
||||
@ -58,6 +59,7 @@ def make_windows():
|
||||
suffix = arch + ("_xp" if xp else "")
|
||||
source_prefix = "win_" + machine + ("_xp" if xp else "")
|
||||
source_dir = get_path("%s/%s/%s/%s" % (out_dir, source_prefix, company_name_l, product_name_s))
|
||||
source_help_dir = source_dir + "-help"
|
||||
|
||||
if target.startswith('innosetup'):
|
||||
for year in vcredist_list:
|
||||
@ -73,6 +75,10 @@ def make_windows():
|
||||
if 'winsparkle-files' in targets:
|
||||
make_winsparkle_files()
|
||||
|
||||
if target.startswith('innosetup-help'):
|
||||
innosetup_help_file = "%s_Help_%s_%s.exe" % (package_name, package_version, suffix)
|
||||
make_innosetup_help()
|
||||
|
||||
if target.startswith('advinst'):
|
||||
advinst_file = "%s_%s_%s.msi" % (package_name, package_version, suffix)
|
||||
make_advinst()
|
||||
@ -119,6 +125,29 @@ def make_innosetup():
|
||||
cmd("iscc", iscc_args + ["common.iss"])
|
||||
return
|
||||
|
||||
def make_innosetup_help():
|
||||
log("\n=== Build innosetup help project\n")
|
||||
global iscc_args
|
||||
iscc_args = [
|
||||
"/Qp",
|
||||
"/DsAppVersion=" + package_version,
|
||||
"/DDEPLOY_PATH=" + source_help_dir,
|
||||
"/D_ARCH=" + machine
|
||||
]
|
||||
if onlyoffice:
|
||||
iscc_args.append("/D_ONLYOFFICE=1")
|
||||
else:
|
||||
iscc_args.append("/DsBrandingFolder=" + get_abspath(git_dir, branding_dir))
|
||||
if sign:
|
||||
iscc_args.append("/DENABLE_SIGNING=1")
|
||||
iscc_args.append("/Sbyparam=signtool.exe sign /v /n $q" + cert_name + "$q /t " + tsa_server + " $f")
|
||||
log("--- " + innosetup_help_file)
|
||||
if is_file(innosetup_help_file):
|
||||
log("! file exist, skip")
|
||||
return
|
||||
cmd("iscc", iscc_args + ["help.iss"])
|
||||
return
|
||||
|
||||
def make_innosetup_update():
|
||||
log("\n=== Build innosetup update project\n")
|
||||
log("--- " + innosetup_update_file)
|
||||
@ -139,6 +168,7 @@ def make_winsparkle_files():
|
||||
awk_args = [
|
||||
"-v", "Version=" + version,
|
||||
"-v", "Build=" + build,
|
||||
"-v", "Branch=" + get_env("RELEASE_BRANCH"),
|
||||
"-v", "Timestamp=" + timestamp,
|
||||
"-i", get_path(build_branding_dir, awk_branding)
|
||||
]
|
||||
@ -190,22 +220,50 @@ def make_advinst():
|
||||
if is_file(advinst_file):
|
||||
log("! file exist, skip")
|
||||
return
|
||||
aic_content = [";aic"]
|
||||
if not onlyoffice:
|
||||
branding_path = get_abspath(git_dir, branding_dir)
|
||||
copy_dir_content(
|
||||
get_abspath(git_dir, branding_dir, "win-linux/package/windows/data"),
|
||||
"data", ".bmp")
|
||||
branding_path + "\\win-linux\\package\\windows\\data", "data", ".bmp")
|
||||
copy_dir_content(
|
||||
get_abspath(git_dir, branding_dir, "win-linux/package/windows/data"),
|
||||
"data", ".png")
|
||||
branding_path + "\\win-linux\\package\\windows\\data", "data", ".png")
|
||||
copy_dir_content(
|
||||
branding_path + "\\win-linux\\extras\\projicons\\res",
|
||||
"..\\..\\extras\\projicons\\res", ".ico")
|
||||
copy_file(
|
||||
branding_path + "\\win-linux\\package\\windows\\dictionary.ail",
|
||||
"dictionary.ail")
|
||||
copy_file(
|
||||
branding_path + "\\common\\package\\license\\eula_" + branding + ".rtf",
|
||||
"..\\..\\..\\common\\package\\license\\agpl-3.0.rtf")
|
||||
copy_file(
|
||||
branding_path + "\\..\\multimedia\\videoplayer\\icons\\" + branding + ".ico",
|
||||
"..\\..\\extras\\projicons\\res\\media.ico")
|
||||
copy_file(
|
||||
branding_path + "\\..\\multimedia\\imageviewer\\icons\\ico\\" + branding + ".ico",
|
||||
"..\\..\\extras\\projicons\\res\\gallery.ico")
|
||||
aic_content = [";aic"]
|
||||
if not sign:
|
||||
aic_content += [
|
||||
"ResetSig"
|
||||
]
|
||||
if machine == '32':
|
||||
aic_content += [
|
||||
"SetPackageType x86",
|
||||
"SetAppdir -buildname DefaultBuild -path [ProgramFilesFolder][MANUFACTURER_INSTALL_FOLDER]\\[PRODUCT_INSTALL_FOLDER]",
|
||||
'DelPrerequisite "Microsoft Visual C++ 2015-2022 Redistributable (x64)"',
|
||||
'DelPrerequisite "Microsoft Visual C++ 2013 Redistributable (x64)"'
|
||||
]
|
||||
if machine == '64':
|
||||
aic_content += [
|
||||
'DelPrerequisite "Microsoft Visual C++ 2015-2022 Redistributable (x86)"',
|
||||
'DelPrerequisite "Microsoft Visual C++ 2013 Redistributable (x86)"'
|
||||
]
|
||||
if onlyoffice:
|
||||
aic_content += [
|
||||
"DelFolder CUSTOM_PATH"
|
||||
]
|
||||
else:
|
||||
aic_content += [
|
||||
"SetProperty ProductName=\"%s\"" % product_name_full,
|
||||
"SetProperty Manufacturer=\"%s\"" % publisher_name.replace('"', '""'),
|
||||
"SetProperty ARPURLINFOABOUT=\"%s\"" % info_about_url,
|
||||
"SetProperty ARPURLUPDATEINFO=\"%s\"" % update_info_url,
|
||||
"SetProperty ARPHELPLINK=\"%s\"" % help_url,
|
||||
"SetProperty ARPHELPTELEPHONE=\"%s\"" % help_phone,
|
||||
"SetProperty ARPCONTACT=\"%s\"" % publisher_address,
|
||||
"DelLanguage 1029 -buildname DefaultBuild",
|
||||
"DelLanguage 1031 -buildname DefaultBuild",
|
||||
"DelLanguage 1041 -buildname DefaultBuild",
|
||||
@ -214,21 +272,23 @@ def make_advinst():
|
||||
"DelLanguage 1060 -buildname DefaultBuild",
|
||||
"DelLanguage 1036 -buildname DefaultBuild",
|
||||
"DelLanguage 3082 -buildname DefaultBuild",
|
||||
"DelLanguage 1033 -buildname DefaultBuild"
|
||||
"DelLanguage 1033 -buildname DefaultBuild",
|
||||
"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",
|
||||
"SetProperty ASCC_REG_PREFIX=" + ascc_reg_prefix
|
||||
]
|
||||
if not sign: aic_content.append("ResetSig")
|
||||
if machine == '32': aic_content.append("SetPackageType x86")
|
||||
aic_content += [
|
||||
"AddOsLc -buildname DefaultBuild -arch " + arch,
|
||||
"NewSync APPDIR " + source_dir + " -existingfiles delete",
|
||||
"UpdateFile APPDIR\\DesktopEditors.exe " + get_path(source_dir, "DesktopEditors.exe"),
|
||||
"NewSync APPDIR " + source_dir,
|
||||
"UpdateFile APPDIR\\DesktopEditors.exe " + source_dir + "\\DesktopEditors.exe",
|
||||
"SetVersion " + package_version,
|
||||
"SetPackageName " + advinst_file + " -buildname DefaultBuild",
|
||||
"Rebuild -buildslist DefaultBuild"
|
||||
]
|
||||
write_file("DesktopEditors.aic", "\r\n".join(aic_content), 'utf-8-sig')
|
||||
cmd("AdvancedInstaller.com",
|
||||
["/execute", "DesktopEditors.aip", "DesktopEditors.aic", "-nofail"])
|
||||
["/execute", "DesktopEditors.aip", "DesktopEditors.aic"])
|
||||
return
|
||||
|
||||
def make_win_portable():
|
||||
@ -249,6 +309,11 @@ def make_macos():
|
||||
|
||||
set_cwd(git_dir + "/" + branding_build_dir)
|
||||
|
||||
if 'clean' in targets:
|
||||
log("\n=== Clean\n")
|
||||
delete_dir(get_env("HOME") + "/Library/Developer/Xcode/Archives")
|
||||
delete_dir(get_env("HOME") + "/Library/Caches/Sparkle_generate_appcast")
|
||||
|
||||
for target in targets:
|
||||
if not target.startswith('diskimage'):
|
||||
continue
|
||||
@ -284,26 +349,43 @@ def make_sparkle_updates():
|
||||
updates_storage_dir = "%s/%s/_updates" % (get_env('ARCHIVES_DIR'), scheme)
|
||||
create_dir(updates_dir)
|
||||
copy_dir_content(updates_storage_dir, updates_dir, ".zip")
|
||||
copy_dir_content(updates_storage_dir, updates_dir, ".html")
|
||||
# copy_dir_content(updates_storage_dir, updates_dir, ".html")
|
||||
copy_file(macos_zip, updates_dir)
|
||||
|
||||
for lang, base in update_changes_list.items():
|
||||
notes_src = "%s/%s/%s.html" % (changes_dir, app_version, base)
|
||||
if "en" in update_changes_list:
|
||||
notes_src = "%s/%s/%s.html" % (changes_dir, app_version, update_changes_list["en"])
|
||||
notes_dst = "%s/%s.html" % (updates_dir, zip_filename)
|
||||
if lang == 'en':
|
||||
encoding = 'en_US.UTF-8'
|
||||
cur_date = sh_output("env LC_ALL=" + encoding + " date -u \"+%B %e, %Y\"", verbose=True)
|
||||
elif lang == 'ru':
|
||||
encoding = 'ru_RU.UTF-8'
|
||||
cur_date = sh_output("env LC_ALL=" + encoding + " date -u \"+%e %B %Y\"", verbose=True)
|
||||
if is_file(notes_src):
|
||||
copy_file(notes_src, notes_dst)
|
||||
cur_date = sh_output("env LC_ALL=en_US.UTF-8 date -u \"+%B %e, %Y\"", verbose=True)
|
||||
replace_in_file(notes_dst,
|
||||
r"(<span class=\"releasedate\">).+(</span>)",
|
||||
"\\1 - " + cur_date + "\\2")
|
||||
# else:
|
||||
# write_file(notes_dst, "placeholder\n")
|
||||
cmd(git_dir + "/" + build_dir + "/Vendor/Sparkle/bin/generate_appcast", [updates_dir])
|
||||
else:
|
||||
write_file(notes_dst, '<html></html>\n')
|
||||
|
||||
if "ru" in update_changes_list:
|
||||
notes_src = "%s/%s/%s.html" % (changes_dir, app_version, update_changes_list["ru"])
|
||||
if update_changes_list["ru"] != "ReleaseNotes":
|
||||
notes_dst = "%s/%s.ru.html" % (updates_dir, zip_filename)
|
||||
else:
|
||||
notes_dst = "%s/%s.html" % (updates_dir, zip_filename)
|
||||
if is_file(notes_src):
|
||||
copy_file(notes_src, notes_dst)
|
||||
cur_date = sh_output("env LC_ALL=ru_RU.UTF-8 date -u \"+%e %B %Y\"", verbose=True)
|
||||
replace_in_file(notes_dst,
|
||||
r"(<span class=\"releasedate\">).+(</span>)",
|
||||
"\\1 - " + cur_date + "\\2")
|
||||
else:
|
||||
write_file(notes_dst, '<html></html>\n')
|
||||
|
||||
sparkle_download_url = "%s/%s/updates/" % (sparkle_base_url, suffix)
|
||||
sparkle_release_notes_url = "%s/%s/updates/changes/%s/" % (sparkle_base_url, suffix, app_version)
|
||||
cmd(git_dir + "/" + build_dir + "/Vendor/Sparkle/bin/generate_appcast", [
|
||||
updates_dir,
|
||||
"--download-url-prefix", sparkle_download_url,
|
||||
"--release-notes-url-prefix", sparkle_release_notes_url
|
||||
])
|
||||
|
||||
log("\n=== Edit Sparkle appcast links\n")
|
||||
appcast_url = sparkle_base_url + "/" + suffix
|
||||
@ -312,17 +394,12 @@ def make_sparkle_updates():
|
||||
for lang, base in update_changes_list.items():
|
||||
if base == "ReleaseNotes":
|
||||
replace_in_file(appcast,
|
||||
r"(<sparkle:releaseNotesLink>)(?:.+" + package_name + \
|
||||
"-(?:x86|x86_64|v8|arm)-([0-9.]+)\..+)(</sparkle:releaseNotesLink>)",
|
||||
"\\1" + appcast_url + "/updates/changes/\\2/" + base + ".html\\3")
|
||||
r'(<sparkle:releaseNotesLink>.+/).+(\.html</sparkle:releaseNotesLink>)',
|
||||
"\\1" + base + "\\2")
|
||||
else:
|
||||
replace_in_file(appcast,
|
||||
r"(<sparkle:releaseNotesLink xml:lang=\"" + lang + "\">)(?:" + package_name + \
|
||||
"-(?:x86|x86_64|v8|arm)-([0-9.]+)\..+)(</sparkle:releaseNotesLink>)",
|
||||
"\\1" + appcast_url + "/updates/changes/\\2/" + base + ".html\\3")
|
||||
replace_in_file(appcast,
|
||||
r"(url=\")(?:.+/)(" + package_name + ".+\")",
|
||||
"\\1" + appcast_url + "/updates/\\2")
|
||||
r'(<sparkle:releaseNotesLink xml:lang="' + lang + r'">).+(\.html</sparkle:releaseNotesLink>)',
|
||||
"\\1" + sparkle_release_notes_url + base + "\\2")
|
||||
|
||||
log("\n=== Delete unnecessary files\n")
|
||||
for file in os.listdir(updates_dir):
|
||||
|
||||
@ -5,6 +5,7 @@ sys.path.append('../../scripts')
|
||||
import base
|
||||
import os
|
||||
import glob
|
||||
from xml.sax.saxutils import escape
|
||||
|
||||
AVS_OFFICESTUDIO_FILE_DOCUMENT = 0x0040
|
||||
AVS_OFFICESTUDIO_FILE_DOCUMENT_DOCX = AVS_OFFICESTUDIO_FILE_DOCUMENT + 0x0001
|
||||
@ -135,8 +136,8 @@ def convertFile(directory_x2t, file_input, file_output, convert_params):
|
||||
|
||||
xml_convert = u"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
|
||||
xml_convert += u"<TaskQueueDataConvert>"
|
||||
xml_convert += (u"<m_sFileFrom>" + file_input + u"</m_sFileFrom>")
|
||||
xml_convert += (u"<m_sFileTo>" + file_output + u"</m_sFileTo>")
|
||||
xml_convert += (u"<m_sFileFrom>" + escape(file_input) + u"</m_sFileFrom>")
|
||||
xml_convert += (u"<m_sFileTo>" + escape(file_output) + u"</m_sFileTo>")
|
||||
xml_convert += u"<m_nFormatTo>" + str(getFormatByFile(file_output)) + u"</m_nFormatTo>"
|
||||
xml_convert += (u"<m_sAllFontsPath>" + directory_fonts + u"/AllFonts.js</m_sAllFontsPath>")
|
||||
xml_convert += (u"<m_sFontDir>" + directory_fonts + "</m_sFontDir>")
|
||||
|
||||
9
tools/linux/check_system/check.sh
Executable file
9
tools/linux/check_system/check.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
SCRIPTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
DIR_X2T=$SCRIPTPATH/..
|
||||
$("$DIR_X2T/x2t" &>/dev/null)
|
||||
status=$?
|
||||
|
||||
[ $status -ne 88 ] && $(cp "$SCRIPTPATH/libstdc++.so.6" "$DIR_X2T/libstdc++.so.6")
|
||||
|
||||
BIN
tools/linux/check_system/libstdc++.so.6
Normal file
BIN
tools/linux/check_system/libstdc++.so.6
Normal file
Binary file not shown.
Reference in New Issue
Block a user