Compare commits

...

22 Commits

Author SHA1 Message Date
1269d0234d Add ASCC_REG_PREFIX substitution (#554) 2022-11-08 10:20:55 +02:00
c1f7e8f471 Merge branch hotfix/v7.2.1 into master 2022-10-20 13:04:51 +00:00
fe098a7ee7 Add desktop help installer build / Fix bug 58536 (#541) 2022-10-18 18:33:27 +03:00
aced6c5119 Fix server document-templates files (#540) 2022-10-18 16:58:24 +03:00
94cd21189e Merge branch release/v7.2.0 into hotfix/v7.2.1 2022-10-12 12:26:08 +00:00
4e07941e7a Merge branch release/v7.2.0 into master 2022-10-12 12:26:02 +00:00
a2fcf85e3b Add move_dir method 2022-10-12 10:12:38 +03:00
e830cb9141 Add embed worker to deploy 2022-10-04 15:27:07 +03:00
9bf3985fb2 Fix notes_dst variable (#533) 2022-10-03 11:49:59 +03:00
59ad11b0f4 Update hard-coded version to v7.2.1 2022-09-29 13:14:56 +00:00
ca7d92703e Keep desktop local help for windows xp (#532) 2022-09-29 14:53:39 +03:00
cd040fc148 Create sdkjs-plugins if folder doesn't present 2022-09-28 12:04:15 +03:00
56c6ff289e Fix macOS appcast (#529) 2022-09-27 14:24:20 +03:00
7f41b96e07 Merge branch release/v7.2.0 into master 2022-09-22 12:16:05 +00:00
41d2dfce6a Small fix macOS package build (#522) 2022-09-20 20:32:15 +03:00
0a712e3a68 Fix macOS generate appcast (#521)
* Fix macOS generate appcast

* Small fix
2022-09-20 18:23:17 +03:00
0eca5a6fba Add macOS package cache clean (#518) 2022-09-14 16:06:47 +03:00
8ab3f20eb8 Fix builder installer build (#517) 2022-09-09 14:54:27 +03:00
634119f66a Add windows builder 32-bit package (#516) 2022-09-08 17:26:15 +03:00
28718191d6 Fix deploy plugins (from store) 2022-09-06 13:59:41 +03:00
e921585baa Merge branch hotfix/v7.1.1 into master 2022-07-18 09:55:05 +00:00
afbe93c5cb Merge branch hotfix/v7.1.1 into master 2022-06-01 16:17:23 +00:00
9 changed files with 99 additions and 56 deletions

View File

@ -175,6 +175,14 @@ def create_dir(path):
os.makedirs(path2)
return
def move_dir(src, dst):
if is_dir(dst):
delete_dir(dst)
if is_dir(src):
copy_dir(src, dst)
delete_dir(src)
return
def copy_dir(src, dst):
if is_dir(dst):
delete_dir(dst)
@ -453,8 +461,7 @@ def get_repositories():
result["core"] = [False, False]
result["sdkjs"] = [False, False]
result.update(get_sdkjs_addons())
result.update(get_sdkjs_plugins())
result.update(get_sdkjs_plugins_server())
result["onlyoffice.github.io"] = [False, False]
result["web-apps"] = [False, False]
result.update(get_web_apps_addons())
result["dictionaries"] = [False, False]
@ -830,22 +837,6 @@ def get_web_apps_addons():
result[name] = [True, False]
return result
def get_plugins(plugins_list=""):
result = {}
if ("" == plugins_list):
return result
plugins_list = plugins_list.rsplit(", ")
plugins_dir = get_script_dir() + "/../../sdkjs-plugins"
for name in plugins_list:
result["plugin-" + name] = [True, plugins_dir]
return result
def get_sdkjs_plugins():
return get_plugins(config.option("sdkjs-plugin"))
def get_sdkjs_plugins_server():
return get_plugins(config.option("sdkjs-plugin-server"))
def sdkjs_addons_param():
if ("" == config.option("sdkjs-addons")):
return []
@ -1103,7 +1094,7 @@ def common_check_version(name, good_version, clean_func):
return
def copy_sdkjs_plugin(src_dir, dst_dir, name, is_name_as_guid=False, is_desktop_local=False):
src_dir_path = src_dir + "/plugin-" + name
src_dir_path = src_dir + "/" + name
if not is_dir(src_dir_path):
src_dir_path = src_dir + "/" + name
if not is_file(src_dir_path + "/config.json"):
@ -1139,7 +1130,7 @@ def copy_sdkjs_plugin(src_dir, dst_dir, name, is_name_as_guid=False, is_desktop_
return
def copy_sdkjs_plugins(dst_dir, is_name_as_guid=False, is_desktop_local=False):
plugins_dir = get_script_dir() + "/../../sdkjs-plugins"
plugins_dir = get_script_dir() + "/../../onlyoffice.github.io/sdkjs-plugins/content"
plugins_list_config = config.option("sdkjs-plugin")
if ("" == plugins_list_config):
return
@ -1149,7 +1140,7 @@ def copy_sdkjs_plugins(dst_dir, is_name_as_guid=False, is_desktop_local=False):
return
def copy_sdkjs_plugins_server(dst_dir, is_name_as_guid=False, is_desktop_local=False):
plugins_dir = get_script_dir() + "/../../sdkjs-plugins"
plugins_dir = get_script_dir() + "/../../onlyoffice.github.io/sdkjs-plugins/content"
plugins_list_config = config.option("sdkjs-plugin-server")
if ("" == plugins_list_config):
return

View File

@ -195,7 +195,7 @@ def make():
base_dir + "/js/" + branding + "/desktop/web-apps/apps/%s/main/resources/help" % i,
root_help_dir + "/editors/web-apps/apps/%s/main/resources/help" % i)
if ("1" != config.option("preinstalled-help")):
if ("1" != config.option("preinstalled-help") and not isWindowsXP):
# remove help from install until web-apps containes help
base.delete_dir(root_dir + "/editors/web-apps/apps/documenteditor/main/resources/help")
base.delete_dir(root_dir + "/editors/web-apps/apps/presentationeditor/main/resources/help")

View File

@ -115,6 +115,9 @@ def make():
js_dir = root_dir
base.copy_dir(base_dir + "/js/" + branding + "/builder/sdkjs", js_dir + "/sdkjs")
base.copy_dir(base_dir + "/js/" + branding + "/builder/web-apps", js_dir + "/web-apps")
# 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"])
# plugins
base.create_dir(js_dir + "/sdkjs-plugins")
@ -164,8 +167,8 @@ def make():
#document-templates
document_templates_files = server_dir + '/../document-templates'
document_templates = build_server_dir + '/../document-templates'
base.create_dir(document_templates)
base.copy_dir_content(document_templates_files, document_templates, "", ".git")
base.copy_dir(document_templates_files + '/new', document_templates + '/new')
base.copy_dir(document_templates_files + '/sample', document_templates + '/sample')
#license
license_file1 = server_dir + '/LICENSE.txt'

View File

@ -62,8 +62,11 @@ def make():
print("-----------------------------------------------------------")
base.generate_doctrenderer_config("./DoctRenderer.config", "../../../sdkjs/deploy/", "server", "../../../web-apps/vendor/")
base.support_old_versions_plugins(git_dir + "/sdkjs-plugins")
if not base.is_dir(git_dir + "/sdkjs-plugins"):
base.create_dir(git_dir + "/sdkjs-plugins")
base.support_old_versions_plugins(git_dir + "/sdkjs-plugins")
base.clone_marketplace_plugin(git_dir + "/sdkjs-plugins")
if not base.is_dir(git_dir + "/fonts"):

View File

@ -34,9 +34,6 @@ config.parse_defaults()
repositories = base.get_repositories()
# Add other plugins
repositories.update(base.get_plugins('autocomplete, easybib, wordpress'))
# Add other repositories
if config.check_option("module", "builder"):
repositories['document-builder-package'] = [False, False]

View File

@ -39,8 +39,6 @@ config.parse_defaults()
repositories = base.get_repositories()
# Add other plugins
repositories.update(base.get_plugins('autocomplete, easybib, glavred, wordpress'))
# Add other repositories
repositories['core-ext'] = [True, False]

View File

@ -76,7 +76,11 @@ def download_isxdl():
def make_innosetup():
log("\n=== Build innosetup project\n")
iscc_args = ["/DVERSION=" + package_version]
iscc_args = [
"/Qp",
"/DVERSION=" + package_version,
"/DARCH=" + arch
]
if not onlyoffice:
iscc_args.append("/DBRANDING_DIR=" + get_abspath(git_dir, branding, build_dir, "exe"))
if sign:

View File

@ -26,8 +26,9 @@ def make():
#
def make_windows():
global package_version, sign, machine, arch, xp, iscc_args, source_dir, \
innosetup_file, innosetup_update_file, advinst_file, portable_zip_file
global package_version, sign, machine, arch, xp, iscc_args, \
source_dir, source_help_dir, innosetup_file, innosetup_help_file, \
innosetup_update_file, advinst_file, portable_zip_file
set_cwd(get_abspath(git_dir, build_dir))
@ -58,6 +59,7 @@ def make_windows():
suffix = arch + ("_xp" if xp else "")
source_prefix = "win_" + machine + ("_xp" if xp else "")
source_dir = get_path("%s/%s/%s/%s" % (out_dir, source_prefix, company_name_l, product_name_s))
source_help_dir = source_dir + "-help"
if target.startswith('innosetup'):
for year in vcredist_list:
@ -73,6 +75,10 @@ def make_windows():
if 'winsparkle-files' in targets:
make_winsparkle_files()
if target.startswith('innosetup-help'):
innosetup_help_file = "%s_Help_%s_%s.exe" % (package_name, package_version, suffix)
make_innosetup_help()
if target.startswith('advinst'):
advinst_file = "%s_%s_%s.msi" % (package_name, package_version, suffix)
make_advinst()
@ -119,6 +125,29 @@ def make_innosetup():
cmd("iscc", iscc_args + ["common.iss"])
return
def make_innosetup_help():
log("\n=== Build innosetup help project\n")
global iscc_args
iscc_args = [
"/Qp",
"/DsAppVersion=" + package_version,
"/DDEPLOY_PATH=" + source_help_dir,
"/D_ARCH=" + machine
]
if onlyoffice:
iscc_args.append("/D_ONLYOFFICE=1")
else:
iscc_args.append("/DsBrandingFolder=" + get_abspath(git_dir, branding_dir))
if sign:
iscc_args.append("/DENABLE_SIGNING=1")
iscc_args.append("/Sbyparam=signtool.exe sign /v /n $q" + cert_name + "$q /t " + tsa_server + " $f")
log("--- " + innosetup_help_file)
if is_file(innosetup_help_file):
log("! file exist, skip")
return
cmd("iscc", iscc_args + ["help.iss"])
return
def make_innosetup_update():
log("\n=== Build innosetup update project\n")
log("--- " + innosetup_update_file)
@ -246,7 +275,8 @@ def make_advinst():
"DelLanguage 1033 -buildname DefaultBuild",
"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"
"UpdateFile CUSTOM_PATH\\VideoPlayer.exe " + source_dir + "\\..\\MediaViewer\\VideoPlayer.exe",
"SetProperty ASCC_REG_PREFIX=" + ascc_reg_prefix
]
aic_content += [
"AddOsLc -buildname DefaultBuild -arch " + arch,
@ -279,6 +309,11 @@ def make_macos():
set_cwd(git_dir + "/" + branding_build_dir)
if 'clean' in targets:
log("\n=== Clean\n")
delete_dir(get_env("HOME") + "/Library/Developer/Xcode/Archives")
delete_dir(get_env("HOME") + "/Library/Caches/Sparkle_generate_appcast")
for target in targets:
if not target.startswith('diskimage'):
continue
@ -314,26 +349,43 @@ def make_sparkle_updates():
updates_storage_dir = "%s/%s/_updates" % (get_env('ARCHIVES_DIR'), scheme)
create_dir(updates_dir)
copy_dir_content(updates_storage_dir, updates_dir, ".zip")
copy_dir_content(updates_storage_dir, updates_dir, ".html")
# copy_dir_content(updates_storage_dir, updates_dir, ".html")
copy_file(macos_zip, updates_dir)
for lang, base in update_changes_list.items():
notes_src = "%s/%s/%s.html" % (changes_dir, app_version, base)
if "en" in update_changes_list:
notes_src = "%s/%s/%s.html" % (changes_dir, app_version, update_changes_list["en"])
notes_dst = "%s/%s.html" % (updates_dir, zip_filename)
if lang == 'en':
encoding = 'en_US.UTF-8'
cur_date = sh_output("env LC_ALL=" + encoding + " date -u \"+%B %e, %Y\"", verbose=True)
elif lang == 'ru':
encoding = 'ru_RU.UTF-8'
cur_date = sh_output("env LC_ALL=" + encoding + " date -u \"+%e %B %Y\"", verbose=True)
if is_file(notes_src):
copy_file(notes_src, notes_dst)
cur_date = sh_output("env LC_ALL=en_US.UTF-8 date -u \"+%B %e, %Y\"", verbose=True)
replace_in_file(notes_dst,
r"(<span class=\"releasedate\">).+(</span>)",
"\\1 - " + cur_date + "\\2")
# else:
# write_file(notes_dst, "placeholder\n")
cmd(git_dir + "/" + build_dir + "/Vendor/Sparkle/bin/generate_appcast", [updates_dir])
else:
write_file(notes_dst, '<html></html>\n')
if "ru" in update_changes_list:
notes_src = "%s/%s/%s.html" % (changes_dir, app_version, update_changes_list["ru"])
if update_changes_list["ru"] != "ReleaseNotes":
notes_dst = "%s/%s.ru.html" % (updates_dir, zip_filename)
else:
notes_dst = "%s/%s.html" % (updates_dir, zip_filename)
if is_file(notes_src):
copy_file(notes_src, notes_dst)
cur_date = sh_output("env LC_ALL=ru_RU.UTF-8 date -u \"+%e %B %Y\"", verbose=True)
replace_in_file(notes_dst,
r"(<span class=\"releasedate\">).+(</span>)",
"\\1 - " + cur_date + "\\2")
else:
write_file(notes_dst, '<html></html>\n')
sparkle_download_url = "%s/%s/updates/" % (sparkle_base_url, suffix)
sparkle_release_notes_url = "%s/%s/updates/changes/%s/" % (sparkle_base_url, suffix, app_version)
cmd(git_dir + "/" + build_dir + "/Vendor/Sparkle/bin/generate_appcast", [
updates_dir,
"--download-url-prefix", sparkle_download_url,
"--release-notes-url-prefix", sparkle_release_notes_url
])
log("\n=== Edit Sparkle appcast links\n")
appcast_url = sparkle_base_url + "/" + suffix
@ -342,17 +394,12 @@ def make_sparkle_updates():
for lang, base in update_changes_list.items():
if base == "ReleaseNotes":
replace_in_file(appcast,
r"(<sparkle:releaseNotesLink>)(?:.+" + package_name + \
"-(?:x86|x86_64|v8|arm)-([0-9.]+)\..+)(</sparkle:releaseNotesLink>)",
"\\1" + appcast_url + "/updates/changes/\\2/" + base + ".html\\3")
r'(<sparkle:releaseNotesLink>.+/).+(\.html</sparkle:releaseNotesLink>)',
"\\1" + base + "\\2")
else:
replace_in_file(appcast,
r"(<sparkle:releaseNotesLink xml:lang=\"" + lang + "\">)(?:" + package_name + \
"-(?:x86|x86_64|v8|arm)-([0-9.]+)\..+)(</sparkle:releaseNotesLink>)",
"\\1" + appcast_url + "/updates/changes/\\2/" + base + ".html\\3")
replace_in_file(appcast,
r"(url=\")(?:.+/)(" + package_name + ".+\")",
"\\1" + appcast_url + "/updates/\\2")
r'(<sparkle:releaseNotesLink xml:lang="' + lang + r'">).+(\.html</sparkle:releaseNotesLink>)',
"\\1" + sparkle_release_notes_url + base + "\\2")
log("\n=== Delete unnecessary files\n")
for file in os.listdir(updates_dir):

View File

@ -1 +1 @@
7.2.0
7.2.1