@@ -521,6 +521,27 @@ def git_get_origin():
521521 os .chdir (cur_dir )
522522 return ret
523523
524+ def git_get_base_url ():
525+ """Get the base URL for git operations, with fallback to GitHub"""
526+ origin = git_get_origin ()
527+ if origin :
528+ # Extract base URL from origin
529+ if origin .startswith ("https://" ):
530+ # For HTTPS URLs like https://git.example.com/owner/repo.git
531+ parts = origin .split ("/" )
532+ if len (parts ) >= 4 :
533+ return "/" .join (parts [:3 ]) + "/"
534+ elif ":" in origin and "@" in origin :
535+ # For SSH URLs like [email protected] :owner/repo.git 536+ at_pos = origin .find ("@" )
537+ colon_pos = origin .find (":" , at_pos )
538+ if at_pos != - 1 and colon_pos != - 1 :
539+ host = origin [at_pos + 1 :colon_pos ]
540+ return f"https://{ host } /"
541+
542+ # Fallback to GitHub
543+ return "https://github.com/"
544+
524545def git_is_ssh ():
525546 git_protocol = config .option ("git-protocol" )
526547 if (git_protocol == "https" ):
@@ -542,7 +563,7 @@ def get_ssh_base_url():
542563def git_update (repo , is_no_errors = False , is_current_dir = False , git_owner = "" ):
543564 print ("[git] update: " + repo )
544565 owner = git_owner if git_owner else "ONLYOFFICE"
545- url = "https://github.com/" + owner + "/" + repo + ".git"
566+ url = git_get_base_url () + owner + "/" + repo + ".git"
546567 if git_is_ssh ():
547568 url = get_ssh_base_url () + repo + ".git"
548569 folder = get_script_dir () + "/../../" + repo
@@ -614,7 +635,7 @@ def get_branding_repositories(checker):
614635
615636def create_pull_request (branches_to , repo , is_no_errors = False , is_current_dir = False ):
616637 print ("[git] create pull request: " + repo )
617- url = "https://github.com/ ONLYOFFICE/" + repo + ".git"
638+ url = git_get_base_url () + " ONLYOFFICE/" + repo + ".git"
618639 if git_is_ssh ():
619640 url = get_ssh_base_url () + repo + ".git"
620641 folder = get_script_dir () + "/../../" + repo
@@ -1288,9 +1309,9 @@ def mac_correct_rpath_desktop(dir):
12881309 os .chdir (dir )
12891310 mac_correct_rpath_library ("hunspell" , [])
12901311 mac_correct_rpath_library ("ooxmlsignature" , ["kernel" ])
1291- mac_correct_rpath_library ("ascdocumentscore" , ["UnicodeConverter" , "kernel" , "graphics" , "kernel_network" , "PdfFile" , "XpsFile" , "DjVuFile" , "hunspell" , "ooxmlsignature" ])
1312+ mac_correct_rpath_library ("ascdocumentscore" , ["UnicodeConverter" , "kernel" , "graphics" , "kernel_network" , "PdfFile" , "XpsFile" , "DjVuFile" , "hunspell" , "ooxmlsignature" , "doctrenderer" ])
12921313 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" ])
1293- mac_correct_rpath_binary ("./editors_helper.app/Contents/MacOS/editors_helper" , ["ascdocumentscore" , "UnicodeConverter" , "kernel" , "kernel_network" , "graphics" , "PdfFile" , "XpsFile" , "OFDFile" , "DjVuFile" , "hunspell" , "ooxmlsignature" ])
1314+ mac_correct_rpath_binary ("./editors_helper.app/Contents/MacOS/editors_helper" , ["ascdocumentscore" , "UnicodeConverter" , "kernel" , "kernel_network" , "graphics" , "PdfFile" , "XpsFile" , "OFDFile" , "DjVuFile" , "hunspell" , "ooxmlsignature" , "doctrenderer" ])
12941315 cmd ("install_name_tool" , ["-add_rpath" , "@executable_path/../../../../Frameworks" , "./editors_helper.app/Contents/MacOS/editors_helper" ], True )
12951316 cmd ("install_name_tool" , ["-add_rpath" , "@executable_path/../../../../Resources/converter" , "./editors_helper.app/Contents/MacOS/editors_helper" ], True )
12961317 cmd ("chmod" , ["-v" , "+x" , "./editors_helper.app/Contents/MacOS/editors_helper" ])
@@ -1407,7 +1428,7 @@ def copy_sdkjs_plugins(dst_dir, is_name_as_guid=False, is_desktop_local=False, i
14071428 plugins_dir = __file__script__path__ + "/../../onlyoffice.github.io/sdkjs-plugins/content"
14081429 plugins_list_config = config .option ("sdkjs-plugin" )
14091430 if isXp :
1410- plugins_list_config = "photoeditor, macros, highlightcode, doc2md"
1431+ plugins_list_config = "photoeditor, highlightcode, doc2md"
14111432 if ("" == plugins_list_config ):
14121433 return
14131434 plugins_list = plugins_list_config .rsplit (", " )
@@ -1856,4 +1877,3 @@ def setup_local_qmake(dir_qmake):
18561877 dir_base = os .path .dirname (dir_qmake )
18571878 writeFile (dir_base + "/onlyoffice_qt.conf" , "Prefix = " + dir_base )
18581879 return
1859-
0 commit comments