Compare commits

...

27 Commits

Author SHA1 Message Date
f99bcd2ed0 Merge branch release/v9.2.0 into develop 2025-12-10 10:29:26 +00:00
d548d731ae Update scripts/package_builder.py 2025-12-09 13:46:12 +00:00
4e1cfb10b4 [develop] Fix check_rabbitmq and check_postgreSQL not starting on Debian 2025-12-05 18:38:08 +03:00
71d9e34164 Fix check arm system 2025-11-28 13:54:34 +03:00
d3a2f05945 Merge pull request 'Up version to 9.2.0' (#154) from fix/version9.2.0 into release/v9.2.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/build_tools/pulls/154
2025-11-27 15:13:31 +00:00
97b4421e3c Up version to 9.2.0 2025-11-27 19:50:23 +05:00
73576ff817 Merge branch 'release/v9.2.0' of https://git.onlyoffice.com/ONLYOFFICE/build_tools into release/v9.2.0 2025-11-21 22:48:04 +03:00
b4ba33bb69 Remove AI agent from macos v8 version 2025-11-21 22:47:54 +03:00
e04df1ba9a Optimize package build 2025-11-21 15:43:01 +03:00
dd148a105e Merge pull request 'Fix desktop build' (#152) from fix/sysroot into release/v9.2.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/build_tools/pulls/152
2025-11-14 18:04:41 +00:00
acf75749c2 Fix desktop build 2025-11-14 07:03:45 +03:00
354e4a6a04 Merge pull request 'Fix build with newer qmake' (#151) from fix/sysroot into release/v9.2.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/build_tools/pulls/151
2025-11-13 12:19:21 +00:00
b85fb9c07c Fix build with newer qmake 2025-11-13 14:33:11 +03:00
40b95455a0 Fix package branding build (#146)
Co-authored-by: Semyon Bezrukov <semen.bezrukov@onlyoffice.com>
Co-committed-by: Semyon Bezrukov <semen.bezrukov@onlyoffice.com>
2025-10-28 15:13:29 +00:00
62ab1f9935 Fix xp build 2025-10-27 18:44:19 +03:00
dd26863a2b Enable agent 2025-10-27 14:25:46 +03:00
c02a387a64 Add support version for v8_89 2025-10-27 14:24:46 +03:00
0fd6852fe8 Merge pull request 'Fix build for mac_64' (#145) from release/v9.1.0 into hotfix/v9.2.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/build_tools/pulls/145
2025-10-27 11:01:07 +00:00
44b6d2d64f Fix windows arm64 packages build 2025-10-23 16:19:18 +03:00
b2ce2bbcad Merge pull request 'release/v9.1.0' (#143) from release/v9.1.0 into hotfix/v9.2.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/build_tools/pulls/143
2025-10-21 20:20:48 +00:00
4ca5e4bcb5 Merge branch release/v9.1.0 into master 2025-10-14 14:34:05 +00:00
2ffc1b9347 Merge branch hotfix/v9.0.4 into master 2025-09-11 08:38:14 +00:00
5a403cb3ac Merge pull request 'fix/jsdoc' (#107) from fix/jsdoc into master 2025-08-13 14:29:55 +00:00
d435dd496b [jsdoc] Fix typo 2025-08-12 19:05:12 +07:00
252a5c306d [jsdoc] gen plugins events summary file 2025-08-12 19:04:28 +07:00
fc9d060a78 Merge branch hotfix/v9.0.4 into master 2025-08-06 08:26:46 +00:00
6c700fe492 Merge branch hotfix/v9.0.4 into master 2025-08-05 14:06:58 +00:00
10 changed files with 161 additions and 72 deletions

View File

@ -37,7 +37,7 @@ def is_os_64bit():
return platform.machine().endswith('64')
def is_os_arm():
if -1 == platform.machine().find('arm'):
if -1 == platform.machine().lower().find('arm'):
return False
return True
@ -1894,8 +1894,6 @@ def set_sysroot_env():
if "linux" == host_platform() and config.option("sysroot") != "":
os.environ['PATH'] = config.option("sysroot") + "/usr/bin:" + get_env("PATH")
os.environ['LD_LIBRARY_PATH'] = config.get_custom_sysroot_lib()
os.environ['QMAKE_CUSTOM_SYSROOT'] = config.option("sysroot")
os.environ['PKG_CONFIG_PATH'] = config.get_custom_sysroot_lib() + "/pkgconfig"
os.environ['CC'] = config.get_custom_sysroot_bin() + "/gcc"
os.environ['CXX'] = config.get_custom_sysroot_bin() + "/g++"
os.environ['CFLAGS'] = "--sysroot=" + config.option("sysroot")

View File

@ -235,8 +235,7 @@ def make_xp():
base.replaceInFile("depot_tools/cipd.ps1", "windows-386", "windows-amd64")
# old variant
#path_to_python2 = "/depot_tools/win_tools-2_7_13_chromium7_bin/python/bin"
path_to_python2 = "/depot_tools/bootstrap-2@3_8_10_chromium_23_bin/python/bin"
path_to_python2 = "/depot_tools/bootstrap-2@3_11_8_chromium_35_bin/python/bin"
os.environ["PATH"] = os.pathsep.join([base_dir + "/depot_tools",
base_dir + path_to_python2,
config.option("vs-path") + "/../Common7/IDE",

View File

@ -7,6 +7,25 @@ import base
import os
import subprocess
def clean():
if base.is_dir("depot_tools"):
base.delete_dir_with_access_error("depot_tools")
base.delete_dir("depot_tools")
if base.is_dir("v8"):
base.delete_dir_with_access_error("v8")
base.delete_dir("v8")
if base.is_exist("./.gclient"):
base.delete_file("./.gclient")
if base.is_exist("./.gclient_entries"):
base.delete_file("./.gclient_entries")
if base.is_exist("./.gclient_previous_sync_commits"):
base.delete_file("./.gclient_previous_sync_commits")
if base.is_exist("./.gcs_entries"):
base.delete_file("./.gcs_entries")
if base.is_exist("./.cipd"):
base.delete_dir("./.cipd")
return
def change_bootstrap():
base.move_file("./depot_tools/bootstrap/manifest.txt", "./depot_tools/bootstrap/manifest.txt.bak")
content = "# changed by build_tools\n\n"
@ -149,6 +168,8 @@ def make():
if not base.is_dir(base_dir):
base.create_dir(base_dir)
base.common_check_version("v8", "1", clean)
if ("mac" == base.host_platform()):
base.cmd("git", ["config", "--global", "http.postBuffer", "157286400"], True)

View File

@ -242,9 +242,11 @@ def make():
#base.copy_dir(git_dir + "/desktop-sdk/ChromiumBasedEditors/plugins/encrypt/ui/engine/database/{9AB4BBA8-A7E5-48D5-B683-ECE76A020BB1}", root_dir + "/editors/sdkjs-plugins/{9AB4BBA8-A7E5-48D5-B683-ECE76A020BB1}")
base.copy_sdkjs_plugin(git_dir + "/desktop-sdk/ChromiumBasedEditors/plugins", root_dir + "/editors/sdkjs-plugins", "sendto", True)
isUseAgent = False
isUseAgent = True
if isWindowsXP:
isUseAgent = False
if (0 == platform.find("mac")) and (config.check_option("config", "use_v8")):
isUseAgent = False
if (isUseAgent):
agent_plugin_dir = git_dir + "/desktop-sdk/ChromiumBasedEditors/plugins/ai-agent"

View File

@ -111,7 +111,8 @@ def check_dependencies():
if (host_platform == 'windows'):
checksResult.append(check_nodejs())
if (config.option("sql-type") == 'mysql' and host_platform == 'windows'):
sql_type = config.option("sql-type")
if (sql_type == 'mysql' and host_platform == 'windows'):
checksResult.append(check_mysqlServer())
else:
checksResult.append(check_postgreSQL())
@ -300,9 +301,21 @@ def check_rabbitmq():
print('RabbitMQ is installed')
return dependence
elif (host_platform == 'linux'):
result = base.run_command('service rabbitmq-server status')['stdout']
if (result != ''):
print('Installed RabbitMQ is valid')
result = ''
# Prefer systemctl for systemd
systemctl_result = base.run_command('systemctl status rabbitmq-server')
if systemctl_result['returncode'] == 0 and systemctl_result['stdout']:
result = systemctl_result['stdout']
# Fallback to service for SysV
if result == '':
command_result = base.run_command('service rabbitmq-server status')
if command_result['returncode'] == 0 and command_result['stdout']:
result = command_result['stdout']
if result != '':
print('RabbitMQ is installed')
return dependence
print('RabbitMQ not found')
@ -517,8 +530,9 @@ def check_mysqlServer():
if (host_platform != 'windows'):
result = os.system(mysqlLoginSrt + ' -e "exit"')
if (result == 0):
connectionResult = base.run_command(connectionString)['stdout']
if (connectionResult.find('port') != -1 and connectionResult.find(config.option("db-port")) != -1):
connectionResult = base.run_command(connectionString)
expected_port = config.option("db-port")
if (connectionResult['stdout'].find('port') != -1 and connectionResult['stdout'].find(expected_port) != -1):
print('MySQL configuration is valid')
dependence.sqlPath = 'mysql'
return dependence
@ -533,13 +547,15 @@ def check_mysqlServer():
continue
mysql_full_name = 'MySQL Server ' + info['Version'] + ' '
connectionResult = base.run_command_in_dir(get_mysql_path_to_bin(info['Location']), connectionString)['stdout']
if (connectionResult.find('port') != -1 and connectionResult.find(config.option("db-port")) != -1):
mysql_bin_path = get_mysql_path_to_bin(info['Location'])
connectionResult = base.run_command_in_dir(mysql_bin_path, connectionString)
expected_port = config.option("db-port")
if (connectionResult['stdout'].find('port') != -1 and connectionResult['stdout'].find(expected_port) != -1):
print(mysql_full_name + 'configuration is valid')
dependence.sqlPath = info['Location']
return dependence
print(mysql_full_name + 'configuration is not valid:' + connectionResult)
print(mysql_full_name + 'configuration is not valid')
# if path exists, then further removal and installation fails(according to startup statistics). it is better to fix issue manually.
return dependence
@ -632,8 +648,8 @@ def get_postrgre_path_to_bin(postgrePath = ''):
return postgrePath
def get_postgreLoginSrting(userName):
if (host_platform == 'windows'):
return 'psql -U' + userName + ' '
return 'PGPASSWORD="' + config.option("db-pass") + '" psql -U' + userName + ' -hlocalhost '
return 'psql -U ' + userName + ' -h localhost '
return 'PGPASSWORD="' + config.option("db-pass") + '" psql -U ' + userName + ' -h localhost '
def get_postgreSQLInfoByFlag(flag):
arrInfo = []
@ -667,9 +683,10 @@ def check_postgreSQL():
if (host_platform == 'linux'):
result = os.system(postgreLoginSrt + ' -c "\q"')
connectionResult = base.run_command(connectionString)['stdout']
connectionResult = base.run_command(connectionString)
expected_port = config.option("db-port")
if (result != 0 or connectionResult.find(config.option("db-port")) == -1):
if (result != 0 or connectionResult['stdout'].find(expected_port) == -1):
print('Valid PostgreSQL not found!')
dependence.append_install('PostgreSQL')
dependence.append_uninstall('PostgreSQL')
@ -680,18 +697,20 @@ def check_postgreSQL():
arrInfo = get_postgreSQLInfo()
base.set_env('PGPASSWORD', config.option("db-pass"))
for info in arrInfo:
if (base.is_dir(info['Location']) == False):
continue
postgre_full_name = 'PostgreSQL ' + info['Version'][:2] + ' '
connectionResult = base.run_command_in_dir(get_postrgre_path_to_bin(info['Location']), connectionString)['stdout']
if (connectionResult.find(config.option("db-port")) != -1):
postgre_bin_path = get_postrgre_path_to_bin(info['Location'])
connectionResult = base.run_command_in_dir(postgre_bin_path, connectionString)
expected_port = config.option("db-port")
if (connectionResult['stdout'].find(expected_port) != -1):
print(postgre_full_name + 'configuration is valid')
dependence.sqlPath = info['Location']
return dependence
print(postgre_full_name + 'configuration is not valid')
print('Valid PostgreSQL not found')
@ -704,6 +723,8 @@ def check_postgreSQL():
return dependence
def check_postgreConfig(postgrePath = ''):
result = True
base.print_info('Checking PostgreSQL configuration')
if (host_platform == 'windows'):
base.set_env('PGPASSWORD', config.option("db-pass"))
@ -711,53 +732,78 @@ def check_postgreConfig(postgrePath = ''):
dbUser = config.option("db-user")
dbName = config.option("db-name")
dbPass = config.option("db-pass")
postgre_path_to_bin = get_postrgre_path_to_bin(postgrePath)
postgreLoginRoot = get_postgreLoginSrting(rootUser)
postgreLoginDbUser = get_postgreLoginSrting(dbUser)
creatdb_path = base.get_script_dir() + "/../../server/schema/postgresql/createdb.sql"
if (base.run_command_in_dir(postgre_path_to_bin, postgreLoginRoot + ' -c "\du ' + dbUser + '"')['stdout'].find(dbUser) != -1):
print('User ' + dbUser + ' is exist')
# Check if user exists
user_check_result = base.run_command_in_dir(postgre_path_to_bin, postgreLoginRoot + ' -c "\du ' + dbUser + '"')
if (user_check_result['stdout'].find(dbUser) != -1):
# User exists, check password
if (os.system(postgreLoginDbUser + '-c "\q"') != 0):
print('Invalid user password!')
base.print_info('Changing password...')
print('Invalid user password, changing...')
result = change_userPass(dbUser, dbPass, postgre_path_to_bin) and result
else:
print('User ' + dbUser + ' not exist!')
base.print_info('Creating ' + dbName + ' user...')
print('Creating user ' + dbUser + '...')
result = create_postgreUser(dbUser, dbPass, postgre_path_to_bin) and result
if (base.run_command_in_dir(postgre_path_to_bin, postgreLoginRoot + ' -c "SELECT datname FROM pg_database;"')['stdout'].find(config.option("db-name")) == -1):
print('Database ' + dbName + ' not found')
base.print_info('Creating ' + dbName + ' database...')
result = create_postgreDb(dbName, postgre_path_to_bin) and configureDb(dbUser, dbName, creatdb_path, postgre_path_to_bin)
# Check if database exists
db_check_result = base.run_command_in_dir(postgre_path_to_bin, postgreLoginRoot + ' -c "SELECT datname FROM pg_database;"')
if (db_check_result['stdout'].find(dbName) == -1):
print('Creating database ' + dbName + '...')
create_result = create_postgreDb(dbName, postgre_path_to_bin)
if create_result:
# Grant privileges to user on database and schema
base.run_command_in_dir(postgre_path_to_bin, postgreLoginRoot + '-c "GRANT ALL privileges ON DATABASE ' + dbName + ' TO ' + dbUser + ';"')
base.run_command_in_dir(postgre_path_to_bin, postgreLoginRoot + '-d ' + dbName + ' -c "GRANT ALL ON SCHEMA public TO ' + dbUser + ';"')
configure_result = configureDb(dbUser, dbName, creatdb_path, postgre_path_to_bin)
result = create_result and configure_result
else:
result = False
else:
if (base.run_command_in_dir(postgre_path_to_bin, postgreLoginRoot + '-c "SELECT pg_size_pretty(pg_database_size(' + "'" + dbName + "'" + '));"')['stdout'].find('7559 kB') != -1):
print('Database ' + dbName + ' not configured')
base.print_info('Configuring ' + dbName + ' database...')
result = configureDb(dbName, creatdb_path, postgre_path_to_bin) and result
print('Database ' + dbName + ' is valid')
if (base.run_command_in_dir(postgre_path_to_bin, postgreLoginRoot + '-c "\l+ ' + dbName + '"')['stdout'].find(dbUser +'=CTc/' + rootUser) == -1):
print('User ' + dbUser + ' has no database privileges!')
base.print_info('Setting database privileges for user ' + dbUser + '...')
result = set_dbPrivilegesForUser(dbUser, dbName, postgre_path_to_bin) and result
print('User ' + dbUser + ' has database privileges')
# Database exists - check if tables need to be created
table_count_result = base.run_command_in_dir(postgre_path_to_bin, postgreLoginRoot + '-c "SELECT count(*) FROM information_schema.tables WHERE table_schema = \'public\';"')
needs_configure = False
if table_count_result['stdout'].find(' 0') != -1:
# No tables - need to configure
needs_configure = True
if needs_configure:
# Grant privileges and configure
base.run_command_in_dir(postgre_path_to_bin, postgreLoginRoot + '-c "GRANT ALL privileges ON DATABASE ' + dbName + ' TO ' + dbUser + ';"')
base.run_command_in_dir(postgre_path_to_bin, postgreLoginRoot + '-d ' + dbName + ' -c "GRANT ALL ON SCHEMA public TO ' + dbUser + ';"')
configure_result = configureDb(dbUser, dbName, creatdb_path, postgre_path_to_bin)
result = configure_result and result
return result
def create_postgreDb(dbName, postgre_path_to_bin = ''):
postgreLoginUser = get_postgreLoginSrting(install_params['PostgreSQL']['root'])
if (base.exec_command_in_dir(postgre_path_to_bin, postgreLoginUser + '-c "CREATE DATABASE ' + dbName +';"') != 0):
result = base.run_command_in_dir(postgre_path_to_bin, postgreLoginUser + '-c "CREATE DATABASE ' + dbName +';"')
if (result['returncode'] != 0):
print('Database creation failed!')
return False
return True
def set_dbPrivilegesForUser(userName, dbName, postgre_path_to_bin = ''):
postgreLoginUser = get_postgreLoginSrting(install_params['PostgreSQL']['root'])
if (base.exec_command_in_dir(postgre_path_to_bin, postgreLoginUser + '-c "GRANT ALL privileges ON DATABASE ' + dbName + ' TO ' + userName + ';"') != 0):
result = base.run_command_in_dir(postgre_path_to_bin, postgreLoginUser + '-c "GRANT ALL privileges ON DATABASE ' + dbName + ' TO ' + userName + ';"')
if (result['returncode'] != 0):
print('Grant privileges failed!')
return False
return True
def create_postgreUser(userName, userPass, postgre_path_to_bin = ''):
postgreLoginRoot = get_postgreLoginSrting(install_params['PostgreSQL']['root'])
if (base.exec_command_in_dir(postgre_path_to_bin, postgreLoginRoot + '-c "CREATE USER ' + userName + ' WITH password ' + "'" + userPass + "'" + ';"') != 0):
result = base.run_command_in_dir(postgre_path_to_bin, postgreLoginRoot + '-c "CREATE USER ' + userName + ' WITH password ' + "'" + userPass + "'" + ';"')
if (result['returncode'] != 0):
print('User creation failed!')
return False
return True
def change_userPass(userName, userPass, postgre_path_to_bin = ''):
@ -766,13 +812,24 @@ def change_userPass(userName, userPass, postgre_path_to_bin = ''):
return False
return True
def configureDb(userName, dbName, scriptPath, postgre_path_to_bin = ''):
print('Execution ' + scriptPath)
postgreLoginSrt = get_postgreLoginSrting(userName)
code = base.exec_command_in_dir(postgre_path_to_bin, postgreLoginSrt + ' -d ' + dbName + ' -f "' + scriptPath + '"')
if (code != 0):
print('Execution failed!')
print('Executing ' + scriptPath)
if not base.is_file(scriptPath):
print('ERROR: Script file does not exist!')
return False
postgreLoginSrt = get_postgreLoginSrting(userName)
full_command = postgreLoginSrt + ' -d ' + dbName + ' -f "' + scriptPath + '"'
# Use run_command_in_dir to capture output
result = base.run_command_in_dir(postgre_path_to_bin, full_command)
if (result['returncode'] != 0):
print('Execution failed!')
if result['stderr']:
print('Error: ' + result['stderr'])
return False
print('Execution completed')
return True
def uninstall_postgresql():

View File

@ -131,6 +131,8 @@ def make_tar():
make_args = ["tar"]
if common.platform == "darwin_arm64":
make_args += ["-e", "UNAME_M=arm64"]
if common.platform == "darwin_x86_64":
make_args += ["-e", "UNAME_M=x86_64"]
if common.platform == "linux_aarch64":
make_args += ["-e", "UNAME_M=aarch64"]
if not branding.onlyoffice:

View File

@ -3,14 +3,14 @@
platformPrefixes = {
"windows_x64": "win_64",
"windows_x86": "win_32",
"windows_arm64": "win_arm64",
"windows_x64_xp": "win_64_xp",
"windows_x86_xp": "win_32_xp",
"darwin_x86_64": "mac_64",
"darwin_arm64": "mac_arm64",
"darwin_x86_64": "mac_64",
"darwin_x86_64_v8": "mac_64",
"linux_x86_64": "linux_64",
"linux_aarch64": "linux_arm64",
"linux_x86_64_cef": "linux_64",
}
out_dir = "build_tools/out"

View File

@ -44,7 +44,8 @@ def make_windows():
"windows_x64": "x64",
"windows_x64_xp": "x64",
"windows_x86": "x86",
"windows_x86_xp": "x86"
"windows_x86_xp": "x86",
"windows_arm64": "arm64"
}[common.platform]
xp = common.platform.endswith("_xp")
@ -61,16 +62,17 @@ def make_windows():
if not xp:
make_prepare()
make_zip()
make_inno()
if branding.onlyoffice:
make_inno()
make_inno("standalone")
make_inno("update")
make_advinst()
if arch != "arm64":
make_inno("update")
make_advinst()
make_prepare("commercial")
make_zip("commercial")
make_inno("commercial")
make_advinst("commercial")
make_prepare("commercial")
make_zip("commercial")
make_inno("commercial")
make_advinst("commercial")
else:
make_prepare("xp")
make_zip("xp")
@ -83,7 +85,8 @@ def make_prepare(edition = "opensource"):
args = [
"-Version", package_version,
"-Arch", arch,
"-Target", edition
"-Target", edition,
"-CompanyName", branding.company_name
]
if common.sign:
args += ["-Sign"]
@ -101,7 +104,8 @@ def make_zip(edition = "opensource"):
args = [
"-Version", package_version,
"-Arch", arch,
"-Target", edition
"-Target", edition,
"-CompanyName", branding.company_name
]
# if common.sign:
# args += ["-Sign"]
@ -329,7 +333,9 @@ def make_linux():
if common.deploy:
for t in branding.desktop_make_targets:
utils.log_h2("desktop " + edition + " " + t["make"] + " deploy")
ret = s3_upload(utils.glob_path(t["src"]), t["dst"])
ret = s3_upload(
[i for i in utils.glob_path(t["src"]) if "enterprise-help" not in i],
t["dst"])
utils.set_summary("desktop " + edition + " " + t["make"] + " deploy", ret)
utils.set_cwd(common.workspace_dir)

View File

@ -100,11 +100,15 @@ def make(platform, project, qmake_config_addon="", is_no_errors=False):
if "1" == config.option("use-clang"):
build_params.append("-spec")
build_params.append("linux-clang-libc++")
if "" != config.option("sysroot"):
os.environ['QMAKE_CUSTOM_SYSROOT'] = config.option("sysroot")
os.environ['PKG_CONFIG_PATH'] = config.get_custom_sysroot_lib() + "/pkgconfig"
base.cmd_exe(qmake_app, build_params)
if "" != config.option("sysroot"):
base.set_sysroot_env()
base.cmd_exe(qmake_app, build_params) # calls cmd_exe to pass os.env
else:
base.cmd(qmake_app, build_params)
base.correct_makefile_after_qmake(platform, makefile)
if ("1" == config.option("clean")):

View File

@ -1 +1 @@
9.1.0
9.2.0