Compare commits

...

14 Commits

8 changed files with 157 additions and 102 deletions

View File

@ -769,7 +769,7 @@ def generate_doctrenderer_config(path, root, product, vendor = ""):
file.close()
return
def generate_plist(path):
def generate_plist_framework_folder(file):
bundle_id_url = "com.onlyoffice."
if ("" != get_env("PUBLISHER_BUNDLE_ID")):
bundle_id_url = get_env("PUBLISHER_BUNDLE_ID")
@ -782,43 +782,52 @@ def generate_plist(path):
for n in bundle_version_natural:
bundle_version.append(n)
for file in glob.glob(path + '/**/*.framework', recursive=True):
if not is_dir(file):
continue
name = os.path.basename(file)
name = name.replace(".framework", "")
name = os.path.basename(file)
name = name.replace(".framework", "")
content = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
content += "<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n"
content += "<plist version=\"1.0\">\n"
content += "<dict>\n"
content += "\t<key>CFBundleExecutable</key>\n"
content += ("\t<string>" + name + "</string>\n")
content += "\t<key>CFBundleGetInfoString</key>\n"
content += "\t<string>Created by " + bundle_creator + "</string>\n"
content += "\t<key>CFBundleIdentifier</key>\n"
content += "\t<string>" + bundle_id_url + correct_bundle_identifier(name) + "</string>\n"
content += "\t<key>CFBundlePackageType</key>\n"
content += "\t<string>FMWK</string>\n"
content += "\t<key>CFBundleShortVersionString</key>\n"
content += "\t<string>" + bundle_version[0] + "." + bundle_version[1] + "</string>\n"
content += "\t<key>CFBundleSignature</key>\n"
content += "\t<string>????</string>\n"
content += "\t<key>CFBundleVersion</key>\n"
content += "\t<string>" + bundle_version[0] + "." + bundle_version[1] + "." + bundle_version[2] + "</string>\n"
content += "\t<key>MinimumOSVersion</key>\n"
content += "\t<string>13.0</string>\n"
content += "</dict>\n"
content += "</plist>"
content = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
content += "<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n"
content += "<plist version=\"1.0\">\n"
content += "<dict>\n"
content += "\t<key>CFBundleExecutable</key>\n"
content += ("\t<string>" + name + "</string>\n")
content += "\t<key>CFBundleGetInfoString</key>\n"
content += "\t<string>Created by " + bundle_creator + "</string>\n"
content += "\t<key>CFBundleIdentifier</key>\n"
content += "\t<string>" + bundle_id_url + correct_bundle_identifier(name) + "</string>\n"
content += "\t<key>CFBundlePackageType</key>\n"
content += "\t<string>FMWK</string>\n"
content += "\t<key>CFBundleShortVersionString</key>\n"
content += "\t<string>" + bundle_version[0] + "." + bundle_version[1] + "</string>\n"
content += "\t<key>CFBundleSignature</key>\n"
content += "\t<string>????</string>\n"
content += "\t<key>CFBundleVersion</key>\n"
content += "\t<string>" + bundle_version[0] + "." + bundle_version[1] + "." + bundle_version[2] + "</string>\n"
content += "\t<key>MinimumOSVersion</key>\n"
content += "\t<string>13.0</string>\n"
content += "</dict>\n"
content += "</plist>"
fileDst = file + "/Info.plist"
if is_file(fileDst):
delete_file(fileDst)
fileDst = file + "/Info.plist"
if is_file(fileDst):
delete_file(fileDst)
fileInfo = codecs.open(fileDst, "w", "utf-8")
fileInfo.write(content)
fileInfo.close()
fileInfo = codecs.open(fileDst, "w", "utf-8")
fileInfo.write(content)
fileInfo.close()
return
def generate_plist(path):
src_folder = path
if ("/" != path[-1:]):
src_folder += "/"
src_folder += "*"
for file in glob.glob(src_folder):
if (is_dir(file)):
if file.endswith(".framework"):
generate_plist_framework_folder(file)
else:
generate_plist(file)
return
def correct_bundle_identifier(bundle_identifier):

View File

@ -20,7 +20,6 @@ import hunspell
import glew
import harfbuzz
import hyphen
import socket_io
def check_android_ndk_macos_arm(dir):
if base.is_dir(dir + "/darwin-x86_64") and not base.is_dir(dir + "/darwin-arm64"):
@ -44,10 +43,10 @@ def make():
hunspell.make(False)
harfbuzz.make()
glew.make()
hyphen.make()
socket_io.make()
hyphen.make()
if config.check_option("module", "mobile"):
curl.make()
if (config.check_option("platform", "android")):
curl.make()
websocket.make()
return

View File

@ -6,6 +6,22 @@ import config
import base
import os
import subprocess
import glob
def correct_namespace(dir):
folder = dir
if ("/" != folder[-1:]):
folder += "/"
folder += "*"
for file in glob.glob(folder):
if base.is_file(file):
base.replaceInFile(file, "namespace sio", "namespace sio_no_tls")
base.replaceInFile(file, "asio::", "asio_no_tls::")
base.replaceInFile(file, "sio::", "sio_no_tls::")
base.replaceInFile(file, "asio_no_tls::", "asio::")
elif base.is_dir(file):
correct_namespace(file)
return
def make():
base_dir = base.get_script_dir() + "/../../core/Common/3dParty/socketio"
@ -13,4 +29,16 @@ def make():
base.cmd_in_dir(base_dir, "git", ["clone", "https://github.com/socketio/socket.io-client-cpp.git"])
base.cmd_in_dir(base_dir + "/socket.io-client-cpp", "git", ["submodule", "init"])
base.cmd_in_dir(base_dir + "/socket.io-client-cpp", "git", ["submodule", "update"])
# no tls realization (remove if socket.io fix this)
dst_dir = base_dir + "/socket.io-client-cpp/src_no_tls"
base.copy_dir(base_dir + "/socket.io-client-cpp/src", dst_dir)
correct_namespace(dst_dir)
base.replaceInFile(dst_dir + "/internal/sio_client_impl.h", "SIO_TLS", "SIO_TLS_NO")
base.replaceInFile(dst_dir + "/internal/sio_client_impl.cpp", "SIO_TLS", "SIO_TLS_NO")
base.replaceInFile(dst_dir + "/sio_socket.h", "SIO_SOCKET_H", "SIO_SOCKET_NO_TLS_H")
base.replaceInFile(dst_dir + "/sio_client.h", "SIO_CLIENT_H", "SIO_CLIENT_NO_TLS_H")
base.replaceInFile(dst_dir + "/sio_message.h", "__SIO_MESSAGE_H__", "__SIO_MESSAGE_NO_TLS_H__")
base.replaceInFile(dst_dir + "/internal/sio_packet.h", "SIO_PACKET_H", "SIO_PACKET_NO_TLS_H")
return

View File

@ -70,12 +70,14 @@ def make():
if not base.is_dir("v8"):
base.cmd("./depot_tools/fetch", ["v8"], True)
base.copy_dir("./v8/third_party", "./v8/third_party_new")
if ("windows" == base.host_platform()):
os.chdir("v8")
base.cmd("git", ["config", "--system", "core.longpaths", "true"])
os.chdir("../")
base.cmd("./depot_tools/gclient", ["sync", "-r", "remotes/branch-heads/8.9"], True)
base.cmd("gclient", ["sync", "--force"], True)
base.copy_dir("./v8/third_party_new/ninja", "./v8/third_party/ninja")
if ("windows" == base.host_platform()):
base.replaceInFile("v8/build/config/win/BUILD.gn", ":static_crt", ":dynamic_crt")

View File

@ -6,11 +6,13 @@ import config
import base
import ixwebsocket
import socketrocket
import socket_io
config_file = base.get_script_dir() + "/../../core/Common/WebSocket/websocket.pri"
def make():
ixwebsocket.make()
socketrocket.make()
#ixwebsocket.make()
#socketrocket.make()
socket_io.make()
return

View File

@ -11,6 +11,7 @@ cert_name = "Ascensio System SIA"
s3_bucket = "repo-doc-onlyoffice-com"
s3_region = "eu-west-1"
s3_base_url = "https://s3.eu-west-1.amazonaws.com/repo-doc-onlyoffice-com"
if utils.is_windows():
desktop_product_name = "Desktop Editors"
@ -21,6 +22,8 @@ if utils.is_windows():
"en": "changes",
"ru": "changes_ru"
}
desktop_changes_url = "https://download.onlyoffice.com/install/desktop/editors/windows/onlyoffice/changes"
desktop_updates_url = "https://download.onlyoffice.com/install/desktop/editors/windows/onlyoffice/updates"
if utils.is_macos():
desktop_package_name = "ONLYOFFICE"

View File

@ -61,6 +61,7 @@ def make_windows():
package_name = branding.desktop_package_name
package_version = common.version + "." + common.build
source_dir = "..\\..\\..\\..\\build_tools\\out\\%s\\%s\\%s" % (prefix, company, product)
source_help_dir = source_dir + "-help"
arch_list = {
"windows_x64": "x64",
"windows_x64_xp": "x64",
@ -102,18 +103,21 @@ def make_windows():
if not vcdl:
utils.set_summary("desktop inno build", False)
# utils.set_summary("desktop inno help build", False)
utils.set_summary("desktop inno help build", False)
utils.set_summary("desktop inno update build", False)
utils.set_summary("desktop advinst build", False)
utils.set_cwd(common.workspace_dir)
return
make_inno()
# make_inno_help()
if branding.onlyoffice and common.platform in ["windows_x64", "windows_x86"]:
make_inno_help()
make_inno_update()
if common.platform == "windows_x64":
make_winsparkle_files()
make_update_files()
if common.platform in ["windows_x64", "windows_x86"]:
make_advinst()
@ -225,7 +229,7 @@ def make_inno_help():
def make_inno_update():
utils.log_h2("desktop inno update build")
utils.log_h2(inno_update_file)
utils.log_h3(inno_update_file)
args = ["iscc"] + iscc_args + ["/DTARGET_NAME=" + inno_file, "update_common.iss"]
ret = utils.cmd(*args, creates=inno_update_file, verbose=True)
@ -241,64 +245,68 @@ def make_inno_update():
utils.set_summary("desktop inno update deploy", ret)
return
def make_winsparkle_files():
utils.log_h2("desktop winsparkle files build")
def make_update_files():
utils.log_h2("desktop update files build")
if branding.onlyoffice:
awk_branding = "update/branding.awk"
changes_dir = "update\\changes\\" + common.version
else:
awk_branding = "../../../../" + common.branding + \
"/desktop-apps/win-linux/package/windows/update/branding.awk"
awk_args = [
"-v", "Version=" + common.version,
"-v", "Build=" + common.build,
"-v", "Branch=" + common.channel,
"-v", "Timestamp=" + common.timestamp,
"-i", awk_branding
changes_dir = "..\\..\\..\\..\\" + common.branding + "\\desktop-apps\\" + \
"win-linux\\package\\windows\\update\\changes\\" + common.version
for lang, base in branding.desktop_update_changes_list.items():
utils.log_h3("changes " + lang + " html")
utils.copy_file(changes_dir + "\\" + lang + ".html", "update\\" + base + ".html")
appcast_args = [
"-Version", package_version,
"-Timestamp", common.timestamp
]
if branding.onlyoffice:
appcast_args.append("-Multilang")
appcast_prod_args = [
"-UpdatesUrlPrefix", branding.desktop_updates_url,
"-ReleaseNotesUrlPrefix", branding.desktop_changes_url
]
appcast_test_base_url = "%s/win/inno/%s/%s" % (branding.s3_base_url, common.version, common.build)
appcast_test_args = [
"-UpdatesUrlPrefix", appcast_test_base_url,
"-ReleaseNotesUrlPrefix", appcast_test_base_url
]
appcast = "update/appcast.xml"
utils.log_h3(appcast)
args = ["env", "LANG=en_US.UTF-8", "awk", "-v", "Prod=1"] + \
awk_args + ["-f", "update/appcast.xml.awk"]
appcast_result = utils.cmd_output(*args, verbose=True)
utils.write_file(appcast, appcast_result)
appcast_test = "update/appcast-test.xml"
utils.log_h3(appcast_test)
args = ["env", "LANG=en_US.UTF-8", "awk"] + \
awk_args + ["-f", "update/appcast.xml.awk"]
appcast_result = utils.cmd_output(*args, verbose=True)
utils.write_file(appcast_test, appcast_result)
if branding.onlyoffice:
changes_dir = "update/changes/" + common.version
else:
changes_dir = "../../../../" + common.branding + \
"/desktop-apps/win-linux/package/windows/update/changes/" + common.version
for lang, base in branding.desktop_update_changes_list.items():
changes = "update/%s.html" % base
if lang == "en": encoding = "en_US.UTF-8"
elif lang == "ru": encoding = "ru_RU.UTF-8"
utils.log_h3(changes)
changes_file = "%s/%s.html" % (changes_dir, lang)
args = ["env", "LANG=" + encoding, "awk"] + awk_args + \
["-f", "update/changes.html.awk", changes_file]
if utils.is_exist(changes_file):
changes_result = utils.cmd_output(*args, verbose=True)
utils.write_file(changes, changes_result)
else:
utils.log("! file not exist: " + changes_file)
utils.log_h3("appcast prod json")
utils.ps1(
"update\\make_appcast.ps1",
appcast_args + appcast_prod_args,
creates="update\\appcast.json", verbose=True
)
utils.log_h3("appcast prod xml")
utils.ps1(
"update\\make_appcast_xml.ps1",
appcast_args + appcast_prod_args,
creates="update\\appcast.xml", verbose=True
)
utils.log_h3("appcast test json")
utils.ps1(
"update\\make_appcast.ps1",
appcast_args + appcast_test_args + ["-OutFile", "appcast-test.json"],
creates="update\\appcast-test.json", verbose=True
)
utils.log_h3("appcast test xml")
utils.ps1(
"update\\make_appcast_xml.ps1",
appcast_args + appcast_test_args + ["-OutFile", "appcast-test.xml"],
creates="update\\appcast-test.xml", verbose=True
)
if common.deploy:
utils.log_h2("desktop winsparkle files deploy")
utils.log_h2("desktop update files deploy")
ret = aws_s3_upload(
utils.glob_path("update/*.xml") + utils.glob_path("update/*.html"),
utils.glob_path("update/*.json") + utils.glob_path("update/*.xml") + \
utils.glob_path("update/*.html"),
"win/inno/%s/%s/" % (common.version, common.build),
"WinSparkle"
"Update"
)
utils.set_summary("desktop winsparkle files deploy", ret)
utils.set_summary("desktop update files deploy", ret)
return
def make_advinst():
@ -334,18 +342,23 @@ def make_advinst():
aic_content += [
"ResetSig"
]
if arch == "x86":
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 arch == "x64":
aic_content += [
"SetPackageType x64 -buildname DefaultBuild",
"AddOsLc -buildname DefaultBuild -arch x64",
"DelOsLc -buildname DefaultBuild -arch x86",
'DelPrerequisite "Microsoft Visual C++ 2015-2022 Redistributable (x86)"',
'DelPrerequisite "Microsoft Visual C++ 2013 Redistributable (x86)"'
]
if arch == "x86":
aic_content += [
"SetPackageType x86 -buildname DefaultBuild",
"AddOsLc -arch x86 -buildname DefaultBuild",
"DelOsLc -arch x64 -buildname DefaultBuild",
"SetAppdir -path [ProgramFilesFolder][MANUFACTURER_INSTALL_FOLDER]\\[PRODUCT_INSTALL_FOLDER] -buildname DefaultBuild",
'DelPrerequisite "Microsoft Visual C++ 2015-2022 Redistributable (x64)"',
'DelPrerequisite "Microsoft Visual C++ 2013 Redistributable (x64)"'
]
if branding.onlyoffice:
aic_content += [
"DelFolder CUSTOM_PATH"
@ -374,7 +387,6 @@ def make_advinst():
"SetProperty ASCC_REG_PREFIX=" + branding.ascc_reg_prefix
]
aic_content += [
"AddOsLc -buildname DefaultBuild -arch " + arch,
"SetCurrentFeature MainFeature",
"NewSync APPDIR " + source_dir,
"UpdateFile APPDIR\\DesktopEditors.exe " + source_dir + "\\DesktopEditors.exe",

View File

@ -1 +1 @@
7.3.0
7.3.3