mirror of
https://github.com/ONLYOFFICE/build_tools.git
synced 2026-02-10 20:45:38 +08:00
Add generation for all products
This commit is contained in:
@ -1972,6 +1972,37 @@ def get_autobuild_version(product, platform="", branch="", build=""):
|
||||
download_addon = download_branch + "/" + download_build + "/" + product + "-" + download_platform + ".7z"
|
||||
return "http://repo-doc-onlyoffice-com.s3.amazonaws.com/archive/" + download_addon
|
||||
|
||||
def create_artifacts_qemu_win_arm(git_dir, branding, product, only_snapshots=False, themes_params=""):
|
||||
qemu_git_dir = f"\\\\10.0.2.2\\{os.path.basename(os.path.abspath(git_dir))}"
|
||||
qemu_root_dir = qemu_git_dir + "\\build_tools\\out\\win_arm64\\" + branding + "\\" + product
|
||||
|
||||
automate_bat_data = ""
|
||||
automate_bat_data = f"call {qemu_root_dir}\\converter\\x2t -create-js-snapshots\n"
|
||||
|
||||
if not only_snapshots:
|
||||
automate_bat_data += f"call {qemu_root_dir}\\converter\\allfontsgen "
|
||||
automate_bat_data += f"--use-system=\"1\" "
|
||||
automate_bat_data += f"--input=\"{qemu_root_dir}\\fonts\" "
|
||||
automate_bat_data += f"--input=\"{qemu_git_dir}\\core-fonts\" "
|
||||
automate_bat_data += f"--allfonts=\"{qemu_root_dir}\\converter\\AllFonts.js\" "
|
||||
automate_bat_data += f"--selection=\"{qemu_root_dir}\\converter\\font_selection.bin\"\n"
|
||||
|
||||
automate_bat_data += f"call {qemu_root_dir}\\converter\\allthemesgen "
|
||||
automate_bat_data += f"--converter-dir=\"{qemu_root_dir}\\converter\" "
|
||||
automate_bat_data += f"--src=\"{qemu_root_dir}\\editors\\sdkjs\\slide\\themes\" "
|
||||
automate_bat_data += f"--allfonts=\"AllFonts.js\" "
|
||||
automate_bat_data += f"--output=\"{qemu_root_dir}\\editors\\sdkjs\\common\\Images\" "
|
||||
automate_bat_data += f"--params=\"{themes_params}\"\n"
|
||||
|
||||
automate_bat_data += f"shutdown /s /f /t 10\n"
|
||||
writeFile(git_dir + "/automate.bat", automate_bat_data)
|
||||
|
||||
old_curr_dir = os.path.abspath(os.curdir)
|
||||
os.chdir(git_dir + "/win-arm-tools")
|
||||
start_qemu_bat_path = f"start.bat"
|
||||
cmd(start_qemu_bat_path, [])
|
||||
os.chdir(old_curr_dir)
|
||||
|
||||
def create_x2t_js_cache(dir, product, platform):
|
||||
# mac
|
||||
if is_file(dir + "/libdoctrenderer.dylib") or is_dir(dir + "/doctrenderer.framework"):
|
||||
|
||||
@ -119,6 +119,8 @@ def make():
|
||||
base.mac_correct_rpath_docbuilder(root_dir)
|
||||
|
||||
base.create_x2t_js_cache(root_dir, "builder", platform)
|
||||
if platform == "win_arm64":
|
||||
base.create_artifacts_qemu_win_arm(git_dir, "builder", branding, True)
|
||||
|
||||
base.create_dir(root_dir + "/fonts")
|
||||
base.copy_dir(git_dir + "/core-fonts/asana", root_dir + "/fonts/asana")
|
||||
|
||||
@ -75,6 +75,8 @@ def make():
|
||||
# js cache
|
||||
base.generate_doctrenderer_config(archive_dir + "/DoctRenderer.config", "./", "builder", "", "./dictionaries")
|
||||
base.create_x2t_js_cache(archive_dir, "core", platform)
|
||||
if platform == "win_arm64":
|
||||
base.create_artifacts_qemu_win_arm(git_dir, "core", branding, True)
|
||||
base.delete_file(archive_dir + "/DoctRenderer.config")
|
||||
|
||||
# dictionaries
|
||||
|
||||
@ -316,34 +316,7 @@ def make():
|
||||
base.delete_dir(sdkjs_dir)
|
||||
base.copy_dir(sdkjs_dir_64, sdkjs_dir)
|
||||
if platform == "win_arm64": # create bat file and start qemu to execute win arm binaries
|
||||
qemu_git_dir = f"\\\\10.0.2.2\\{os.path.basename(os.path.abspath(git_dir))}"
|
||||
qemu_root_dir = qemu_git_dir + "\\build_tools\\out\\" + native_platform + "\\" + branding + "\\DesktopEditors"
|
||||
|
||||
automate_bat_data = ""
|
||||
automate_bat_data = f"call {qemu_root_dir}\\converter\\x2t -create-js-snapshots\n"
|
||||
|
||||
automate_bat_data += f"call {qemu_root_dir}\\converter\\allfontsgen "
|
||||
automate_bat_data += f"--use-system=\"1\" "
|
||||
automate_bat_data += f"--input=\"{qemu_root_dir}\\fonts\" "
|
||||
automate_bat_data += f"--input=\"{qemu_git_dir}\\core-fonts\" "
|
||||
automate_bat_data += f"--allfonts=\"{qemu_root_dir}\\converter\\AllFonts.js\" "
|
||||
automate_bat_data += f"--selection=\"{qemu_root_dir}\\converter\\font_selection.bin\"\n"
|
||||
|
||||
automate_bat_data += f"call {qemu_root_dir}\\converter\\allthemesgen "
|
||||
automate_bat_data += f"--converter-dir=\"{qemu_root_dir}\\converter\" "
|
||||
automate_bat_data += f"--src=\"{qemu_root_dir}\\editors\\sdkjs\\slide\\themes\" "
|
||||
automate_bat_data += f"--allfonts=\"AllFonts.js\" "
|
||||
automate_bat_data += f"--output=\"{qemu_root_dir}\\editors\\sdkjs\\common\\Images\" "
|
||||
automate_bat_data += f"--params=\"{themes_params}\"\n"
|
||||
|
||||
automate_bat_data += f"shutdown /s /f /t 10\n"
|
||||
base.writeFile(git_dir + "/automate.bat", automate_bat_data)
|
||||
|
||||
old_curr_dir = os.path.abspath(os.curdir)
|
||||
os.chdir(git_dir + "/win-arm-tools")
|
||||
start_qemu_bat_path = f"start.bat"
|
||||
base.cmd(start_qemu_bat_path, [])
|
||||
os.chdir(old_curr_dir)
|
||||
base.create_artifacts_qemu_win_arm(git_dir, branding, "DesktopEditors", False, themes_params)
|
||||
else:
|
||||
base.cmd_exe(root_dir + "/converter/allfontsgen", ["--use-system=\"1\"", "--input=\"" + root_dir + "/fonts\"", "--input=\"" + git_dir + "/core-fonts\"", "--allfonts=\"" + root_dir + "/converter/AllFonts.js\"", "--selection=\"" + root_dir + "/converter/font_selection.bin\""], True)
|
||||
base.cmd_exe(root_dir + "/converter/allthemesgen", ["--converter-dir=\"" + root_dir + "/converter\"", "--src=\"" + root_dir + "/editors/sdkjs/slide/themes\"", "--allfonts=\"AllFonts.js\"", "--output=\"" + root_dir + "/editors/sdkjs/common/Images\""] + [themes_params], True)
|
||||
|
||||
@ -123,6 +123,8 @@ def make():
|
||||
base.delete_file(file)
|
||||
|
||||
base.create_x2t_js_cache(converter_dir, "server", platform)
|
||||
if platform == "win_arm64":
|
||||
base.create_artifacts_qemu_win_arm(git_dir, "server", branding, True)
|
||||
|
||||
# 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"])
|
||||
|
||||
Reference in New Issue
Block a user