From 0307890bf35eff69e3b6242360227c60623976ed Mon Sep 17 00:00:00 2001 From: Eugene Kozyrev <67453079+EugeneKozyrev@users.noreply.github.com> Date: Mon, 7 Nov 2022 15:33:56 +0300 Subject: [PATCH 01/16] Delete quotes in AddUpgradeCode action (#555) --- scripts/package_desktop.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/package_desktop.py b/scripts/package_desktop.py index 737be6b..f8658c6 100644 --- a/scripts/package_desktop.py +++ b/scripts/package_desktop.py @@ -308,11 +308,11 @@ def make_msi(): else: utils.replace_in_file('DesktopEditors.aip','()', r'\1%s\3' % (branding.desktop_upgrade_code)) aic_content += [ - "AddUpgradeCode '{47EEF706-B0E4-4C43-944B-E5F914B92B79}' \ - -min_ver 7.1.1 -include_min_ver \ - -max_ver 7.2.2 -include_max_ver\ - -include_lang 1049 \ - -property_name UPGRADE_2 -enable_migrate", + "AddUpgradeCode {47EEF706-B0E4-4C43-944B-E5F914B92B79} \ + -min_ver 7.1.1 -include_min_ver \ + -max_ver 7.2.2 -include_max_ver \ + -include_lang 1049 \ + -property_name UPGRADE_2 -enable_migrate", "DelLanguage 1029 -buildname DefaultBuild", "DelLanguage 1031 -buildname DefaultBuild", "DelLanguage 1041 -buildname DefaultBuild", From 62a8e2f72a5674952ef3c339304249bc2f8f79ed Mon Sep 17 00:00:00 2001 From: Kulikova Svetlana Date: Tue, 8 Nov 2022 09:41:57 +0300 Subject: [PATCH 02/16] PdfFile instead of PdfReader and PdfWriter --- build.pro | 12 +++++------- scripts/base.py | 15 +++++++-------- scripts/deploy_builder.py | 3 +-- scripts/deploy_core.py | 3 +-- scripts/deploy_desktop.py | 3 +-- scripts/deploy_mobile.py | 7 +++---- scripts/deploy_server.py | 3 +-- 7 files changed, 19 insertions(+), 27 deletions(-) diff --git a/build.pro b/build.pro index bb4ee71..e66bda0 100644 --- a/build.pro +++ b/build.pro @@ -37,16 +37,14 @@ addSubProject(network, $$CORE_ROOT_DIR/Common/Network/network.pro,\ kernel unicodeconverter) addSubProject(graphics, $$CORE_ROOT_DIR/DesktopEditor/graphics/pro/graphics.pro,\ kernel unicodeconverter) -addSubProject(pdfwriter, $$CORE_ROOT_DIR/PdfWriter/PdfWriter.pro,\ +addSubProject(pdffile, $$CORE_ROOT_DIR/PdfFile/PdfFile.pro,\ kernel unicodeconverter graphics) addSubProject(djvufile, $$CORE_ROOT_DIR/DjVuFile/DjVuFile.pro,\ - kernel unicodeconverter graphics pdfwriter) + kernel unicodeconverter graphics pdffile) addSubProject(xpsfile, $$CORE_ROOT_DIR/XpsFile/XpsFile.pro,\ - kernel unicodeconverter graphics pdfwriter) + kernel unicodeconverter graphics pdffile) addSubProject(htmlrenderer, $$CORE_ROOT_DIR/HtmlRenderer/htmlrenderer.pro,\ - kernel unicodeconverter graphics pdfwriter) -addSubProject(pdfreader, $$CORE_ROOT_DIR/PdfReader/PdfReader.pro,\ - kernel unicodeconverter graphics pdfwriter htmlrenderer) + kernel unicodeconverter graphics) addSubProject(docxrenderer, $$CORE_ROOT_DIR/DocxRenderer/DocxRenderer.pro,\ kernel unicodeconverter graphics) addSubProject(htmlfile2, $$CORE_ROOT_DIR/HtmlFile2/HtmlFile2.pro,\ @@ -97,7 +95,7 @@ desktop { addSubProject(ooxmlsignature, $$CORE_ROOT_DIR/DesktopEditor/xmlsec/src/ooxmlsignature.pro,\ kernel unicodeconverter graphics) addSubProject(documentscore, $$ROOT_DIR/desktop-sdk/ChromiumBasedEditors/lib/ascdocumentscore.pro,\ - kernel unicodeconverter graphics hunspell ooxmlsignature htmlrenderer pdfwriter pdfreader djvufile xpsfile) + kernel unicodeconverter graphics hunspell ooxmlsignature htmlrenderer pdffile djvufile xpsfile) addSubProject(documentscore_helper, $$ROOT_DIR/desktop-sdk/ChromiumBasedEditors/lib/ascdocumentscore_helper.pro,\ documentscore) !core_mac { diff --git a/scripts/base.py b/scripts/base.py index f701348..dea1618 100644 --- a/scripts/base.py +++ b/scripts/base.py @@ -1015,14 +1015,13 @@ def mac_correct_rpath_x2t(dir): 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", "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("PdfFile", ["UnicodeConverter", "kernel", "graphics", "kernel_network"]) + mac_correct_rpath_library("DjVuFile", ["UnicodeConverter", "kernel", "graphics", "PdfFile"]) + mac_correct_rpath_library("XpsFile", ["UnicodeConverter", "kernel", "graphics", "PdfFile"]) 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"]) + mac_correct_rpath_binary("./x2t", ["icudata.58", "icuuc.58", "UnicodeConverter", "kernel", "kernel_network", "graphics", "PdfFile", "HtmlRenderer", "XpsFile", "DjVuFile", "HtmlFile2", "Fb2File", "EpubFile", "doctrenderer", "DocxRenderer"]) if is_file("./allfontsgen"): cmd("chmod", ["-v", "+x", "./allfontsgen"]) cmd("install_name_tool", ["-add_rpath", "@executable_path", "./allfontsgen"], True) @@ -1039,7 +1038,7 @@ def mac_correct_rpath_docbuilder(dir): 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"]) + mac_correct_rpath_binary("./docbuilder", ["icudata.58", "icuuc.58", "UnicodeConverter", "kernel", "kernel_network", "graphics", "PdfFile", "HtmlRenderer", "XpsFile", "DjVuFile", "HtmlFile2", "Fb2File", "EpubFile", "doctrenderer", "DocxRenderer"]) os.chdir(cur_dir) return @@ -1049,9 +1048,9 @@ def mac_correct_rpath_desktop(dir): os.chdir(dir) mac_correct_rpath_library("hunspell", []) mac_correct_rpath_library("ooxmlsignature", ["kernel"]) - mac_correct_rpath_library("ascdocumentscore", ["UnicodeConverter", "kernel", "graphics", "kernel_network", "PdfWriter", "HtmlRenderer", "PdfReader", "XpsFile", "DjVuFile", "hunspell", "ooxmlsignature"]) + mac_correct_rpath_library("ascdocumentscore", ["UnicodeConverter", "kernel", "graphics", "kernel_network", "PdfFile", "HtmlRenderer", "XpsFile", "DjVuFile", "hunspell", "ooxmlsignature"]) cmd("install_name_tool", ["-change", "@executable_path/../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework", "@rpath/Chromium Embedded Framework.framework/Chromium Embedded Framework", "libascdocumentscore.dylib"]) - mac_correct_rpath_binary("./editors_helper.app/Contents/MacOS/editors_helper", ["ascdocumentscore", "UnicodeConverter", "kernel", "kernel_network", "graphics", "PdfWriter", "HtmlRenderer", "PdfReader", "XpsFile", "DjVuFile", "hunspell", "ooxmlsignature"]) + mac_correct_rpath_binary("./editors_helper.app/Contents/MacOS/editors_helper", ["ascdocumentscore", "UnicodeConverter", "kernel", "kernel_network", "graphics", "PdfFile", "HtmlRenderer", "XpsFile", "DjVuFile", "hunspell", "ooxmlsignature"]) cmd("install_name_tool", ["-add_rpath", "@executable_path/../../../../Frameworks", "./editors_helper.app/Contents/MacOS/editors_helper"], True) cmd("install_name_tool", ["-add_rpath", "@executable_path/../../../../Resources/converter", "./editors_helper.app/Contents/MacOS/editors_helper"], True) cmd("chmod", ["-v", "+x", "./editors_helper.app/Contents/MacOS/editors_helper"]) diff --git a/scripts/deploy_builder.py b/scripts/deploy_builder.py index f441d7a..84af002 100644 --- a/scripts/deploy_builder.py +++ b/scripts/deploy_builder.py @@ -36,8 +36,7 @@ def make(): base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "UnicodeConverter") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "kernel_network") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "graphics") - base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "PdfWriter") - base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "PdfReader") + base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "PdfFile") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "DjVuFile") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "XpsFile") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "HtmlFile2") diff --git a/scripts/deploy_core.py b/scripts/deploy_core.py index 66b3881..438cebd 100644 --- a/scripts/deploy_core.py +++ b/scripts/deploy_core.py @@ -33,8 +33,7 @@ def make(): base.copy_lib(core_build_dir + "/lib/" + platform_postfix, archive_dir, "HtmlRenderer") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, archive_dir, "DjVuFile") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, archive_dir, "XpsFile") - base.copy_lib(core_build_dir + "/lib/" + platform_postfix, archive_dir, "PdfReader") - base.copy_lib(core_build_dir + "/lib/" + platform_postfix, archive_dir, "PdfWriter") + base.copy_lib(core_build_dir + "/lib/" + platform_postfix, archive_dir, "PdfFile") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, archive_dir, "HtmlFile2") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, archive_dir, "UnicodeConverter") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, archive_dir, "Fb2File") diff --git a/scripts/deploy_desktop.py b/scripts/deploy_desktop.py index 6089eb6..d3f0b33 100644 --- a/scripts/deploy_desktop.py +++ b/scripts/deploy_desktop.py @@ -47,8 +47,7 @@ def make(): base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "kernel_network") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "UnicodeConverter") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "graphics") - base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "PdfWriter") - base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "PdfReader") + base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "PdfFile") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "DjVuFile") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "XpsFile") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "HtmlFile2") diff --git a/scripts/deploy_mobile.py b/scripts/deploy_mobile.py index 950ee29..4914f7b 100644 --- a/scripts/deploy_mobile.py +++ b/scripts/deploy_mobile.py @@ -42,8 +42,7 @@ def make(): base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "kernel_network") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "UnicodeConverter") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "graphics") - base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "PdfWriter") - base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "PdfReader") + base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "PdfFile") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "DjVuFile") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "XpsFile") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "HtmlFile2") @@ -59,8 +58,8 @@ def make(): base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "x2t") if ("ios" == platform) and config.check_option("config", "bundle_dylibs") and config.check_option("config", "simulator"): - exclude_arch(root_dir, ["kernel", "kernel_network", "UnicodeConverter", "graphics", "PdfWriter", - "PdfReader", "DjVuFile", "XpsFile", "HtmlFile2", "HtmlRenderer", "doctrenderer", + exclude_arch(root_dir, ["kernel", "kernel_network", "UnicodeConverter", "graphics", "PdfFile", + "DjVuFile", "XpsFile", "HtmlFile2", "HtmlRenderer", "doctrenderer", "Fb2File", "EpubFile", "x2t"]) diff --git a/scripts/deploy_server.py b/scripts/deploy_server.py index 7614038..edb0c52 100644 --- a/scripts/deploy_server.py +++ b/scripts/deploy_server.py @@ -75,8 +75,7 @@ def make(): base.copy_lib(core_build_dir + "/lib/" + platform_postfix, converter_dir, "kernel_network") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, converter_dir, "UnicodeConverter") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, converter_dir, "graphics") - base.copy_lib(core_build_dir + "/lib/" + platform_postfix, converter_dir, "PdfWriter") - base.copy_lib(core_build_dir + "/lib/" + platform_postfix, converter_dir, "PdfReader") + base.copy_lib(core_build_dir + "/lib/" + platform_postfix, converter_dir, "PdfFile") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, converter_dir, "DjVuFile") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, converter_dir, "XpsFile") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, converter_dir, "HtmlFile2") From 173b81c2884c20e306cf40af3f4b9f0d27b25aa7 Mon Sep 17 00:00:00 2001 From: Eugene Kozyrev <67453079+EugeneKozyrev@users.noreply.github.com> Date: Tue, 8 Nov 2022 11:24:51 +0300 Subject: [PATCH 03/16] Add feature switches (#553) --- scripts/package_desktop.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/package_desktop.py b/scripts/package_desktop.py index f8658c6..fcf57ec 100644 --- a/scripts/package_desktop.py +++ b/scripts/package_desktop.py @@ -322,12 +322,14 @@ def make_msi(): "DelLanguage 1036 -buildname DefaultBuild", "DelLanguage 3082 -buildname DefaultBuild", "DelLanguage 1033 -buildname DefaultBuild", + "SetCurrentFeature ExtendedFeature", "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" ] aic_content += [ "AddOsLc -buildname DefaultBuild -arch " + arch, + "SetCurrentFeature MainFeature", "NewSync APPDIR " + source_dir, "UpdateFile APPDIR\\DesktopEditors.exe " + source_dir + "\\DesktopEditors.exe", "SetVersion " + package_version, From 55f1a05d1746a314fdbf2a519eb71ed5b8580d01 Mon Sep 17 00:00:00 2001 From: Semyon Bezrukov Date: Wed, 9 Nov 2022 18:28:26 +0300 Subject: [PATCH 04/16] Update vcredist checksums (#556) --- scripts/package_common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/package_common.py b/scripts/package_common.py index 3ddb68c..07468c7 100644 --- a/scripts/package_common.py +++ b/scripts/package_common.py @@ -21,11 +21,11 @@ vcredist_links = { "2022": { "x64": { "url": "https://aka.ms/vs/17/release/vc_redist.x64.exe", - "md5": "cdce5d5ee259d8071fa82f522c5c7d6e" + "md5": "703bd677778f2a1ba1eb4338bac3b868" }, "x86": { "url": "https://aka.ms/vs/17/release/vc_redist.x86.exe", - "md5": "dd89ae7bc09cad5648524905d0f53214" + "md5": "732d0ac9cd31b8136f1c8e72efec1636" } }, "2015": { From f13471428cffe2bc310df2e858aef5e017025fc8 Mon Sep 17 00:00:00 2001 From: Semyon Bezrukov Date: Thu, 10 Nov 2022 15:56:27 +0300 Subject: [PATCH 05/16] Fix macos package script (#558) * Fix macos package script * Small fix * Small fix --- scripts/package_desktop.py | 46 +++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/scripts/package_desktop.py b/scripts/package_desktop.py index fcf57ec..830f2e6 100644 --- a/scripts/package_desktop.py +++ b/scripts/package_desktop.py @@ -362,9 +362,9 @@ def make_macos(): changes_dir = branding.desktop_changes_dir update_changes_list = branding.desktop_update_changes_list suffixes = { - "macos_x86_64": "x86_64", - "macos_x86_64_v8": "v8", - "macos_arm64": "arm64" + "darwin_x86_64": "x86_64", + "darwin_x86_64_v8": "v8", + "darwin_arm64": "arm64" } suffix = suffixes[common.platform] lane = "release_" + suffix @@ -374,29 +374,33 @@ def make_macos(): utils.set_cwd(build_dir) - if 'clean' in targets: + if common.clean: utils.log("\n=== Clean\n") utils.delete_dir(utils.get_env("HOME") + "/Library/Developer/Xcode/Archives") utils.delete_dir(utils.get_env("HOME") + "/Library/Caches/Sparkle_generate_appcast") - script = ''' - appcast=$(curl -s ''' + branding.sparkle_base_url + '''/''' + suffix + '''/onlyoffice.xml 2> /dev/null) - echo -n \"RELEASE_MACOS_VERSION=\" - echo $appcast \ - | xmllint --xpath \"/rss/channel/item[1]/enclosure/@*[name()='sparkle:shortVersionString']\" - \ - | cut -f 2 -d \\\\\" - echo -n \"RELEASE_MACOS_BUILD=\" - echo $appcast \ - | xmllint --xpath \"/rss/channel/item[1]/enclosure/@*[name()='sparkle:version']\" - \ - | cut -f 2 -d \\\\\" + plist_path = common.workspace_dir + "/desktop-apps/macos/ONLYOFFICE/Resources/ONLYOFFICE-" + suffix + "/Info.plist" + current_version = utils.sh_output( + '/usr/libexec/PlistBuddy -c "Print :CFBundleShortVersionString" ' + plist_path, + verbose=True).rstrip() + current_build = utils.sh_output( + '/usr/libexec/PlistBuddy -c "Print :CFBundleVersion" ' + plist_path, + verbose=True).rstrip() - path=desktop-apps/macos/ONLYOFFICE/Resources/ONLYOFFICE-''' + suffix + '''/Info.plist - echo -n \"CURRENT_MACOS_VERSION=\" - /usr/libexec/PlistBuddy -c 'print :CFBundleShortVersionString' $path - echo -n \"CURRENT_MACOS_BUILD=\" - /usr/libexec/PlistBuddy -c 'print :CFBundleVersion' $path - ''' - utils.sh_output(script, verbose=True) + appcast_url = branding.sparkle_base_url + "/" + suffix + "/" + branding.desktop_package_name.lower() + ".xml" + release_version = utils.sh_output( + 'curl -s ' + appcast_url + ' 2> /dev/null' \ + + ' | xmllint --xpath "/rss/channel/item[1]/enclosure/@*[name()=\'sparkle:shortVersionString\']" -' \ + + ' | cut -f2 -d\\\"', + verbose=True).rstrip() + release_build = utils.sh_output( + 'curl -s ' + appcast_url + ' 2> /dev/null' \ + + ' | xmllint --xpath "/rss/channel/item[1]/enclosure/@*[name()=\'sparkle:version\']" -' \ + + ' | cut -f2 -d\\\"', + verbose=True).rstrip() + + utils.log("CURRENT=" + current_version + "(" + current_build + ")" \ + + "\nRELEASE=" + release_version + "(" + release_build + ")") make_dmg() # if : From 6195485cc7211860480d1342f5e4e07688528102 Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Fri, 11 Nov 2022 11:32:29 +0300 Subject: [PATCH 06/16] [desktop] skip WinSparkle from deploy --- make.py | 9 --------- scripts/deploy_desktop.py | 1 - 2 files changed, 10 deletions(-) diff --git a/make.py b/make.py index e3e6695..987f23f 100755 --- a/make.py +++ b/make.py @@ -77,16 +77,7 @@ if 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 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") diff --git a/scripts/deploy_desktop.py b/scripts/deploy_desktop.py index 6089eb6..33bc31b 100644 --- a/scripts/deploy_desktop.py +++ b/scripts/deploy_desktop.py @@ -234,7 +234,6 @@ def make(): base.delete_file(root_dir + "/converter/icudtl.dat") if (0 == platform.find("win")): - base.copy_lib(git_dir + "/desktop-apps/win-linux/3dparty/WinSparkle/" + platform, root_dir, "WinSparkle") base.delete_file(root_dir + "/cef_sandbox.lib") base.delete_file(root_dir + "/libcef.lib") From 110981066e5d70d3fb20d3459d78b3ff54b9dd11 Mon Sep 17 00:00:00 2001 From: Semyon Bezrukov Date: Fri, 11 Nov 2022 16:17:18 +0300 Subject: [PATCH 07/16] Fix macos package build (#561) --- scripts/package_desktop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/package_desktop.py b/scripts/package_desktop.py index 830f2e6..542df67 100644 --- a/scripts/package_desktop.py +++ b/scripts/package_desktop.py @@ -414,7 +414,7 @@ def make_dmg(): utils.log_h2(scheme) utils.log_h2("build/" + package_name + ".app") rc = utils.sh( - "bundler exec fastlane " + lane + " git_bump:false", + "bundler exec fastlane " + lane + " skip_git_bump:true", verbose=True ) utils.set_summary("desktop dmg build", rc == 0) From f074914f1b2279903128e327965ec643ae2a107e Mon Sep 17 00:00:00 2001 From: Semyon Bezrukov Date: Fri, 11 Nov 2022 17:46:41 +0300 Subject: [PATCH 08/16] Add build mobile package (#562) --- make_package.py | 4 ++-- scripts/package_mobile.py | 42 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 scripts/package_mobile.py diff --git a/make_package.py b/make_package.py index 1577255..2f84a2c 100755 --- a/make_package.py +++ b/make_package.py @@ -73,8 +73,8 @@ if "server-enterprise" in common.targets: package_server.make("enterprise") if "server-developer" in common.targets: package_server.make("developer") -# if "mobile" in common.targets: -# package_mobile.make() +if "mobile" in common.targets: + package_mobile.make() # summary utils.log_h1("Build summary") diff --git a/scripts/package_mobile.py b/scripts/package_mobile.py new file mode 100644 index 0000000..50940af --- /dev/null +++ b/scripts/package_mobile.py @@ -0,0 +1,42 @@ +#!/usr/bin/env python + +import package_utils as utils +import package_common as common +import package_branding as branding + +def make(): + utils.log_h1("MOBILE") + if not utils.is_linux(): + utils.log("Unsupported host OS") + return + make_mobile() + return + +def aws_s3_upload(local, key, ptype=None): + rc = utils.sh("aws s3 cp --acl public-read --no-progress " \ + + local + " s3://" + common.s3_bucket + "/" + key, verbose=True) + if rc == 0 and ptype is not None: + utils.add_deploy_data("mobile", ptype, local, key) + return rc + +def make_mobile(): + utils.set_cwd("build_tools/out") + + if common.clean: + utils.log_h2("mobile clean") + utils.sh("rm -rfv *.zip", verbose=True) + + zip_file = "android-libs-" + common.version + "-" + common.build + ".zip" + zip_key = branding.company_name_l + "/" + common.release_branch + "/android/" + zip_file + + utils.log_h2("mobile build") + rc = utils.sh("zip -r " + zip_file + " ./android* ./js", verbose=True) + utils.set_summary("mobile build", rc == 0) + + utils.log_h2("mobile deploy") + if rc == 0: + rc = aws_s3_upload(zip_file, zip_key, "Android") + utils.set_summary("mobile deploy", rc == 0) + + utils.set_cwd(common.workspace_dir) + return From 8dadf0dadaa648c33b3e6ec2bfd41472415da1fa Mon Sep 17 00:00:00 2001 From: Semyon Bezrukov Date: Mon, 14 Nov 2022 16:11:24 +0300 Subject: [PATCH 09/16] Fix packages build (#563) --- make_package.py | 1 + scripts/package_desktop.py | 21 ++++++++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/make_package.py b/make_package.py index 2f84a2c..212a88c 100755 --- a/make_package.py +++ b/make_package.py @@ -57,6 +57,7 @@ import package_core import package_desktop import package_server import package_builder +import package_mobile # build utils.set_cwd(common.workspace_dir, verbose=True) diff --git a/scripts/package_desktop.py b/scripts/package_desktop.py index 542df67..96bbf87 100644 --- a/scripts/package_desktop.py +++ b/scripts/package_desktop.py @@ -379,7 +379,8 @@ def make_macos(): utils.delete_dir(utils.get_env("HOME") + "/Library/Developer/Xcode/Archives") utils.delete_dir(utils.get_env("HOME") + "/Library/Caches/Sparkle_generate_appcast") - plist_path = common.workspace_dir + "/desktop-apps/macos/ONLYOFFICE/Resources/ONLYOFFICE-" + suffix + "/Info.plist" + plist_path = "%s/%s/ONLYOFFICE/Resources/%s-%s/Info.plist" \ + % (common.workspace_dir, branding.desktop_branding_dir, branding.desktop_package_name, suffix) current_version = utils.sh_output( '/usr/libexec/PlistBuddy -c "Print :CFBundleShortVersionString" ' + plist_path, verbose=True).rstrip() @@ -403,8 +404,10 @@ def make_macos(): + "\nRELEASE=" + release_version + "(" + release_build + ")") make_dmg() - # if : - make_sparkle_updates() + if int(current_build) > int(release_build): + make_sparkle_updates() + else: + utils.log(release_build + " <= " + current_build) utils.set_cwd(common.workspace_dir) return @@ -431,11 +434,11 @@ def make_sparkle_updates(): utils.log_h2("desktop sparkle files build") app_version = utils.sh_output("/usr/libexec/PlistBuddy \ - -c 'print :CFBundleShortVersionString' \ + -c 'Print :CFBundleShortVersionString' \ build/" + package_name + ".app/Contents/Info.plist", verbose=True) zip_filename = scheme + '-' + app_version macos_zip = "build/" + zip_filename + ".zip" - updates_storage_dir = "%s/%s/_updates" % (get_env('ARCHIVES_DIR'), scheme) + updates_storage_dir = "%s/%s/_updates" % (utils.get_env('ARCHIVES_DIR'), scheme) utils.create_dir(updates_dir) utils.copy_dir_content(updates_storage_dir, updates_dir, ".zip") # utils.copy_dir_content(updates_storage_dir, updates_dir, ".html") @@ -448,8 +451,8 @@ def make_sparkle_updates(): utils.copy_file(notes_src, notes_dst) cur_date = utils.sh_output("env LC_ALL=en_US.UTF-8 date -u \"+%B %e, %Y\"", verbose=True) utils.replace_in_file(notes_dst, - r"().+()", - "\\1 - " + cur_date + "\\2") + r"().+()", + "\\1 - " + cur_date + "\\2") else: utils.write_file(notes_dst, '\n') @@ -463,8 +466,8 @@ def make_sparkle_updates(): utils.copy_file(notes_src, notes_dst) cur_date = utils.sh_output("env LC_ALL=ru_RU.UTF-8 date -u \"+%e %B %Y\"", verbose=True) utils.replace_in_file(notes_dst, - r"().+()", - "\\1 - " + cur_date + "\\2") + r"().+()", + "\\1 - " + cur_date + "\\2") else: utils.write_file(notes_dst, '\n') From ab77f6d936f322e776ab4dbb9b9ccc5dc7801fd2 Mon Sep 17 00:00:00 2001 From: Semyon Bezrukov Date: Tue, 15 Nov 2022 15:24:54 +0300 Subject: [PATCH 10/16] Fix macOS ARM package build (#564) --- scripts/package_desktop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/package_desktop.py b/scripts/package_desktop.py index 96bbf87..5f9acb7 100644 --- a/scripts/package_desktop.py +++ b/scripts/package_desktop.py @@ -364,7 +364,7 @@ def make_macos(): suffixes = { "darwin_x86_64": "x86_64", "darwin_x86_64_v8": "v8", - "darwin_arm64": "arm64" + "darwin_arm64": "arm" } suffix = suffixes[common.platform] lane = "release_" + suffix From 68367474d00723d4cb737bf8da0bb48811a3d512 Mon Sep 17 00:00:00 2001 From: Nikita Khromov Date: Thu, 17 Nov 2022 12:19:48 +0500 Subject: [PATCH 11/16] Updated script for generation plugin macros documentation. --- .../generate_builder_intarface.py | 60 ++++++++++--------- 1 file changed, 33 insertions(+), 27 deletions(-) diff --git a/scripts/sdkjs_common/generate_builder_intarface.py b/scripts/sdkjs_common/generate_builder_intarface.py index dd09388..ecbc65c 100644 --- a/scripts/sdkjs_common/generate_builder_intarface.py +++ b/scripts/sdkjs_common/generate_builder_intarface.py @@ -46,12 +46,12 @@ class EditorApi(object): if -1 != retParam.find("[]"): isArray = True retParam = retParam.replace("[]", "") - retType = retParam.replace("|", " ").split(" ")[0] + retType = retParam.replace("|", " ").replace(".", " ").split(" ")[0] retTypeLower = retType.lower() retValue = "" if -1 != retType.find("\""): retValue = "\"\"" - elif "bool" == retTypeLower: + elif "boolean" == retTypeLower or "bool" == retTypeLower: retValue = "true" elif "string" == retTypeLower: retValue = "\"\"" @@ -61,6 +61,12 @@ class EditorApi(object): retValue = "undefined" elif "null" == retTypeLower: retValue = "null" + elif "array" == retTypeLower: + retValue = "[]" + elif "base64img" == retTypeLower: + retValue = "base64img" + elif "error" == retTypeLower: + retValue = "undefined" else: retValue = "new " + retType + "()" if isArray: @@ -85,39 +91,39 @@ class EditorApi(object): decoration = decoration.replace("{Api}", "{ApiInterface}") decoration = decoration.replace("@return ", "@returns ") decoration = decoration.replace("@returns {?", "@returns {") + decoration = decoration.replace("?}", "}") if -1 != decoration.find("@name ApiInterface"): self.append_record(decoration, "var ApiInterface = function() {};\nvar Api = new ApiInterface();\n", True) return code = rec[indexEndDecoration + 2:] - code = code.strip("\t\n\r ") + code = code.replace("=\n", "= ").strip("\t\n\r ") lines = code.split("\n") codeCorrect = "" sMethodName = re.search(r'.prototype.(.*)=', code) - # может быть только объявление свойства - if (sMethodName is not None): - is_found_function = False - addon_for_func = "{}" - if -1 != decoration.find("@return"): - addon_for_func = "{ return null; }" - for line in lines: - line = line.strip("\t\n\r ") - line = line.replace("{", "") - line = line.replace("}", "") - lineWithoutSpaces = line.replace(" ", "") - if not is_found_function and 0 == line.find("function "): - codeCorrect += (line + addon_for_func + "\n") - is_found_function = True - if not is_found_function and -1 != line.find(".prototype."): - codeCorrect += (line + self.getReturnValue(decoration) + ";\n") - is_found_function = True - if -1 != lineWithoutSpaces.find(".prototype="): - codeCorrect += (line + "\n") - if -1 != line.find(".prototype.constructor"): - codeCorrect += (line + "\n") - codeCorrect = codeCorrect.replace("Api.prototype", "ApiInterface.prototype") - self.append_record(decoration, codeCorrect) - className = codeCorrect[0:codeCorrect.find('.')] + is_found_function = False + addon_for_func = "{}" + if -1 != decoration.find("@return"): + addon_for_func = "{ return null; }" + + for line in lines: + line = line.strip("\t\n\r ") + line = line.replace("{", "") + line = line.replace("}", "") + lineWithoutSpaces = line.replace(" ", "") + if not is_found_function and 0 == line.find("function "): + codeCorrect += (line + addon_for_func + "\n") + is_found_function = True + if not is_found_function and -1 != line.find(".prototype."): + codeCorrect += (line + self.getReturnValue(decoration) + ";\n") + is_found_function = True + if -1 != lineWithoutSpaces.find(".prototype="): + codeCorrect += (line + "\n") + if -1 != line.find(".prototype.constructor"): + codeCorrect += (line + "\n") + codeCorrect = codeCorrect.replace("Api.prototype", "ApiInterface.prototype") + self.append_record(decoration, codeCorrect) + className = codeCorrect[0:codeCorrect.find('.')] # если свойство определено сразу под методом (без декорации) if propName is not None and sMethodName is not None: From 96913b568f26d846bd9a1c27ffa6091ecff3603f Mon Sep 17 00:00:00 2001 From: Semyon Bezrukov Date: Thu, 17 Nov 2022 12:22:29 +0300 Subject: [PATCH 12/16] Fix core archive --- scripts/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/base.py b/scripts/base.py index f701348..6f90431 100644 --- a/scripts/base.py +++ b/scripts/base.py @@ -881,7 +881,7 @@ def extract_unicode(src, dst): def archive_folder(src, dst): app = "7za" if ("mac" == host_platform()) else "7z" - return cmd_exe(app, ["a", "-r", dst, src]) + return cmd_exe(app, ["a", dst, src]) # windows vcvarsall def _call_vcvarsall_and_return_env(arch): From 255ecd64b2156cfdbd786496c562866de7b68229 Mon Sep 17 00:00:00 2001 From: Semyon Bezrukov Date: Thu, 17 Nov 2022 12:56:15 +0300 Subject: [PATCH 13/16] Small fix --- scripts/deploy_core.py | 6 +++--- scripts/package_core.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/deploy_core.py b/scripts/deploy_core.py index 66b3881..20c3889 100644 --- a/scripts/deploy_core.py +++ b/scripts/deploy_core.py @@ -59,9 +59,9 @@ def make(): base.copy_exe(core_build_dir + "/bin/" + platform_postfix, archive_dir, "x2ttester") - if base.is_file(archive_dir + "/core.7z"): - base.delete_file(archive_dir + "/core.7z") - base.archive_folder(archive_dir, archive_dir + "/core.7z") + if base.is_file(archive_dir + ".7z"): + base.delete_file(archive_dir + ".7z") + base.archive_folder(archive_dir + "/*", archive_dir + ".7z") return diff --git a/scripts/package_core.py b/scripts/package_core.py index c0cfc14..4e7db65 100644 --- a/scripts/package_core.py +++ b/scripts/package_core.py @@ -24,7 +24,7 @@ def make_core(): } repo = repos[common.platform] branch = utils.get_env("BRANCH_NAME") - core_7z = utils.get_path("build_tools/out/%s/%s/core/core.7z" % (prefix, company)) + core_7z = utils.get_path("build_tools/out/%s/%s/core.7z" % (prefix, company)) dest_version = "%s/core/%s/%s/%s/" % (repo["repo"], branch, repo["version"], repo["arch"]) dest_latest = "%s/core/%s/%s/%s/" % (repo["repo"], branch, "latest", repo["arch"]) From 7841606a41f99fbf4b61ad3226de7e67df8e8cca Mon Sep 17 00:00:00 2001 From: Semyon Bezrukov Date: Fri, 18 Nov 2022 18:14:39 +0300 Subject: [PATCH 14/16] Add macOS ARM core archive build (#568) --- scripts/package_core.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/package_core.py b/scripts/package_core.py index 4e7db65..677d4e7 100644 --- a/scripts/package_core.py +++ b/scripts/package_core.py @@ -20,6 +20,7 @@ def make_core(): "windows_x64": { "repo": "windows", "arch": "x64", "version": common.version + "." + common.build }, "windows_x86": { "repo": "windows", "arch": "x86", "version": common.version + "." + common.build }, "darwin_x86_64": { "repo": "mac", "arch": "x64", "version": common.version + "-" + common.build }, + "darwin_arm64": { "repo": "mac", "arch": "arm", "version": common.version + "-" + common.build }, "linux_x86_64": { "repo": "linux", "arch": "x64", "version": common.version + "-" + common.build }, } repo = repos[common.platform] From a12f5dba9f8ac87ff6e6ecbc48c4c6186c59d319 Mon Sep 17 00:00:00 2001 From: "Oleg.Korshul" Date: Fri, 18 Nov 2022 22:20:17 +0300 Subject: [PATCH 15/16] Fix build --- build.pro | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/build.pro b/build.pro index bb4ee71..9a9f67f 100644 --- a/build.pro +++ b/build.pro @@ -58,22 +58,26 @@ addSubProject(fb2file, $$CORE_ROOT_DIR/Fb2File/Fb2File.pro,\ addSubProject(epubfile, $$CORE_ROOT_DIR/EpubFile/CEpubFile.pro,\ kernel unicodeconverter graphics htmlfile2) !no_x2t { - addSubProject(docxformat, $$CORE_ROOT_DIR/Common/DocxFormat/DocxFormatLib/DocxFormatLib.pro) - addSubProject(pptxformat, $$CORE_ROOT_DIR/ASCOfficePPTXFile/PPTXLib/Linux/PPTXFormatLib/PPTXFormatLib.pro) - addSubProject(docxfile, $$CORE_ROOT_DIR/ASCOfficeDocxFile2/Linux/ASCOfficeDocxFile2Lib.pro) - addSubProject(txtxmlformat, $$CORE_ROOT_DIR/ASCOfficeTxtFile/TxtXmlFormatLib/Linux/TxtXmlFormatLib.pro) - addSubProject(rtfformat, $$CORE_ROOT_DIR/ASCOfficeRtfFile/RtfFormatLib/Linux/RtfFormatLib.pro) - addSubProject(pptformat, $$CORE_ROOT_DIR/ASCOfficePPTFile/PPTFormatLib/Linux/PPTFormatLib.pro) - addSubProject(docformat, $$CORE_ROOT_DIR/ASCOfficeDocFile/DocFormatLib/Linux/DocFormatLib.pro) - addSubProject(odffilereader,$$CORE_ROOT_DIR/ASCOfficeOdfFile/linux/OdfFileReaderLib.pro) - addSubProject(odffilewriter,$$CORE_ROOT_DIR/ASCOfficeOdfFileW/linux/OdfFileWriterLib.pro) - addSubProject(xlsformat, $$CORE_ROOT_DIR/ASCOfficeXlsFile2/source/linux/XlsFormatLib.pro) - addSubProject(xlsbformat, $$CORE_ROOT_DIR/Common/DocxFormat/DocxFormatLib/XlsbFormatLib.pro) - addSubProject(vbaformat, $$CORE_ROOT_DIR/ASCOfficeXlsFile2/source/linux/VbaFormatLib.pro) - addSubProject(cfcpp, $$CORE_ROOT_DIR/Common/cfcpp/cfcpp.pro) - addSubProject(x2t, $$CORE_ROOT_DIR/X2tConverter/build/Qt/X2tConverter.pro,\ - docxformat pptxformat docxfile txtxmlformat rtfformat pptformat docformat odffilereader odffilewriter xlsformat xlsbformat fb2file epubfile docxrenderer) + addSubProject(docxformat, $$CORE_ROOT_DIR/OOXML/Projects/Linux/DocxFormatLib/DocxFormatLib.pro) + addSubProject(pptxformat, $$CORE_ROOT_DIR/OOXML/Projects/Linux/PPTXFormatLib/PPTXFormatLib.pro) + addSubProject(xlsbformat, $$CORE_ROOT_DIR/OOXML/Projects/Linux/XlsbFormatLib/XlsbFormatLib.pro) + + addSubProject(docformat, $$CORE_ROOT_DIR/MsBinaryFile/Projects/DocFormatLib/Linux/DocFormatLib.pro) + addSubProject(pptformat, $$CORE_ROOT_DIR/MsBinaryFile/Projects/PPTFormatLib/Linux/PPTFormatLib.pro) + addSubProject(xlsformat, $$CORE_ROOT_DIR/MsBinaryFile/Projects/XlsFormatLib/Linux/XlsFormatLib.pro) + addSubProject(vbaformat, $$CORE_ROOT_DIR/MsBinaryFile/Projects/VbaFormatLib/Linux/VbaFormatLib.pro) + + addSubProject(txtxmlformat, $$CORE_ROOT_DIR/TxtFile/Projects/Linux/TxtXmlFormatLib.pro) + addSubProject(rtfformat, $$CORE_ROOT_DIR/RtfFile/Projects/Linux/RtfFormatLib.pro) + addSubProject(odffile, $$CORE_ROOT_DIR/OdfFile/Projects/Linux/OdfFormatLib.pro) + + addSubProject(cfcpp, $$CORE_ROOT_DIR/Common/cfcpp/cfcpp.pro) + addSubProject(bindocument, $$CORE_ROOT_DIR/OOXML/Projects/Linux/BinDocument/BinDocument.pro) + + addSubProject(x2t, $$CORE_ROOT_DIR/X2tConverter/build/Qt/X2tConverter.pro,\ + docxformat pptxformat xlsbformat docformat pptformat xlsformat vbaformat txtxmlformat rtfformat odffile cfcpp bindocument fb2file epubfile docxrenderer) } + !no_use_common_binary { addSubProject(allfontsgen, $$CORE_ROOT_DIR/DesktopEditor/AllFontsGen/AllFontsGen.pro,\ kernel unicodeconverter graphics) From 694d562a805f7330e154f8ffa7d4e8c1ffab5658 Mon Sep 17 00:00:00 2001 From: "Oleg.Korshul" Date: Sun, 20 Nov 2022 21:43:50 +0300 Subject: [PATCH 16/16] [ios] Add xcframeworks to mobile deploy --- scripts/base.py | 32 +++++++++++++++++++++++++++++++- scripts/deploy_mobile.py | 5 +++++ 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/scripts/base.py b/scripts/base.py index 6f90431..d661cf1 100644 --- a/scripts/base.py +++ b/scripts/base.py @@ -1331,4 +1331,34 @@ 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 \ No newline at end of file + return + +def convert_ios_framework_to_xcframework(folder, lib): + cur_dir = os.getcwd() + os.chdir(folder) + + create_dir(lib + "_xc_tmp") + create_dir(lib + "_xc_tmp/iphoneos") + create_dir(lib + "_xc_tmp/iphonesimulator") + copy_dir(lib + ".framework", lib + "_xc_tmp/iphoneos/" + lib + ".framework") + copy_dir(lib + ".framework", lib + "_xc_tmp/iphonesimulator/" + lib + ".framework") + + cmd("xcrun", ["lipo", "-remove", "x86_64", "./" + lib + "_xc_tmp/iphoneos/" + lib + ".framework/" + lib, + "-o", "./" + lib + "_xc_tmp/iphoneos/" + lib + ".framework/" + lib]) + cmd("xcrun", ["lipo", "-remove", "arm64", "./" + lib + "_xc_tmp/iphonesimulator/" + lib + ".framework/" + lib, + "-o", "./" + lib + "_xc_tmp/iphonesimulator/" + lib + ".framework/" + lib]) + + cmd("xcodebuild", ["-create-xcframework", + "-framework", "./" + lib + "_xc_tmp/iphoneos/" + lib + ".framework/", + "-framework", "./" + lib + "_xc_tmp/iphonesimulator/" + lib + ".framework/", + "-output", lib + ".xcframework"]) + + delete_dir(lib + "_xc_tmp") + + os.chdir(cur_dir) + return + +def convert_ios_framework_to_xcframework_folder(folder, libs): + for lib in libs: + convert_ios_framework_to_xcframework(folder, lib) + return diff --git a/scripts/deploy_mobile.py b/scripts/deploy_mobile.py index 950ee29..5b715d1 100644 --- a/scripts/deploy_mobile.py +++ b/scripts/deploy_mobile.py @@ -63,6 +63,11 @@ def make(): "PdfReader", "DjVuFile", "XpsFile", "HtmlFile2", "HtmlRenderer", "doctrenderer", "Fb2File", "EpubFile", "x2t"]) + if ("ios" == platform): + if (config.check_option("config", "bundle_dylibs")): + base.convert_ios_framework_to_xcframework_folder(root_dir, + ["kernel", "kernel_network", "UnicodeConverter", "graphics", "PdfWriter", "PdfReader", "DjVuFile", "XpsFile", + "HtmlFile2", "HtmlRenderer", "doctrenderer", "Fb2File", "EpubFile", "DocxRenderer", "x2t"]) # icu if (0 == platform.find("win")):