mirror of
https://github.com/ONLYOFFICE/build_tools.git
synced 2026-04-07 14:06:31 +08:00
@ -929,4 +929,40 @@ def support_old_versions_plugins(out_dir):
|
||||
file.write(content_plugin_base)
|
||||
delete_file(out_dir + "/plugins.js")
|
||||
delete_file(out_dir + "/plugins-ui.js")
|
||||
return
|
||||
return
|
||||
|
||||
def get_xcode_major_version():
|
||||
popen = subprocess.Popen("xcodebuild -version", stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
|
||||
version = ""
|
||||
try:
|
||||
stdout, stderr = popen.communicate()
|
||||
popen.wait()
|
||||
version = stdout.strip().decode("utf-8")
|
||||
finally:
|
||||
popen.stdout.close()
|
||||
popen.stderr.close()
|
||||
|
||||
return int(version.split('.')[0][6:])
|
||||
|
||||
def hack_xcode_ios():
|
||||
if (12 > get_xcode_major_version()):
|
||||
return
|
||||
|
||||
qmake_spec_file = config.option("qt-dir") + "/ios/mkspecs/macx-ios-clang/qmake.conf"
|
||||
|
||||
filedata = ""
|
||||
with open(get_path(qmake_spec_file), "r") as file:
|
||||
filedata = file.read()
|
||||
|
||||
content_hack = "QMAKE_CXXFLAGS += -arch $$QT_ARCH"
|
||||
if (-1 != filedata.find(content_hack)):
|
||||
return
|
||||
|
||||
filedata += "\n"
|
||||
filedata += content_hack
|
||||
filedata += "\n\n"
|
||||
|
||||
delete_file(qmake_spec_file)
|
||||
with open(get_path(qmake_spec_file), "w") as file:
|
||||
file.write(filedata)
|
||||
return
|
||||
|
||||
@ -34,6 +34,9 @@ def make_pro_file(makefiles_dir, pro_file):
|
||||
else:
|
||||
base.set_env("ANDROID_NDK_PLATFORM", "android-16")
|
||||
|
||||
if (-1 != platform.find("ios")):
|
||||
base.hack_xcode_ios()
|
||||
|
||||
# makefile suffix
|
||||
file_suff = platform
|
||||
if (config.check_option("config", "debug")):
|
||||
|
||||
@ -40,6 +40,9 @@ def make():
|
||||
base.copy_exe(core_build_dir + "/bin/" + platform, archive_dir, "x2t")
|
||||
|
||||
base.copy_dir(base_dir + "/js/" + branding + "/builder/sdkjs", archive_dir + "/sdkjs")
|
||||
base.create_dir(archive_dir + "/sdkjs/vendor")
|
||||
base.copy_dir(base_dir + "/js/" + branding + "/builder/web-apps/vendor/jquery", archive_dir + "/sdkjs/vendor/jquery")
|
||||
base.copy_dir(base_dir + "/js/" + branding + "/builder/web-apps/vendor/xregexp", archive_dir + "/sdkjs/vendor/xregexp")
|
||||
|
||||
if ("windows" == base.host_platform()):
|
||||
base.copy_files(core_dir + "/Common/3dParty/icu/" + platform + "/build/*.dll", archive_dir + "/")
|
||||
|
||||
Reference in New Issue
Block a user