Skip to content

Commit 00c37bc

Browse files
committed
Merge branch 'feature/mac-frameworks' into feature/libheif
2 parents 972bcc8 + d4231e0 commit 00c37bc

File tree

100 files changed

+5322
-1039
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+5322
-1039
lines changed
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: Git Operations
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
operation:
7+
description: 'Operation to perform'
8+
required: true
9+
type: choice
10+
options:
11+
- create
12+
- remove
13+
default: 'create'
14+
15+
branch_name:
16+
description: 'Branch name to create or remove'
17+
required: true
18+
type: string
19+
20+
base_branch:
21+
description: 'Base branch to work from (for create operation)'
22+
required: false
23+
type: string
24+
default: 'develop'
25+
26+
branding:
27+
description: 'Branding name'
28+
required: false
29+
type: string
30+
default: 'onlyoffice'
31+
32+
branding_url:
33+
description: 'Branding repository URL (relative to git host)'
34+
required: false
35+
type: string
36+
default: 'ONLYOFFICE/onlyoffice.git'
37+
38+
jobs:
39+
git-operations:
40+
runs-on: ubuntu-latest
41+
42+
steps:
43+
- name: Checkout repository
44+
uses: actions/checkout@v4
45+
with:
46+
path: ONLYOFFICE/build_tools
47+
token: ${{ secrets.GITHUB_TOKEN }}
48+
fetch-depth: 0
49+
50+
- name: Set up Python
51+
uses: actions/setup-python@v4
52+
with:
53+
python-version: '3.x'
54+
55+
- name: Install dependencies
56+
run: |
57+
python -m pip install --upgrade pip
58+
# Install any Python dependencies if requirements.txt exists
59+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
60+
61+
- name: Configure Git
62+
run: |
63+
git config --global user.name "GitHub Actions Bot"
64+
git config --global user.email "[email protected]"
65+
66+
- name: Run Git Operations
67+
run: |
68+
cd ONLYOFFICE/build_tools/scripts/develop
69+
python git_operations.py ${{ inputs.operation }} "${{ inputs.branch_name }}" \
70+
--base-branch="${{ inputs.base_branch }}" \
71+
--branding="${{ inputs.branding }}" \
72+
--branding-url="${{ inputs.branding_url }}" \
73+
--modules="${{ inputs.modules }}"
74+
env:
75+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
76+
77+
- name: Operation Summary
78+
run: |
79+
echo "## Git Operations Summary" >> $GITHUB_STEP_SUMMARY
80+
echo "- **Operation**: ${{ inputs.operation }}" >> $GITHUB_STEP_SUMMARY
81+
echo "- **Branch Name**: ${{ inputs.branch_name }}" >> $GITHUB_STEP_SUMMARY
82+
echo "- **Base Branch**: ${{ inputs.base_branch }}" >> $GITHUB_STEP_SUMMARY
83+
echo "- **Branding**: ${{ inputs.branding }}" >> $GITHUB_STEP_SUMMARY
84+
echo "- **Branding URL**: ${{ inputs.branding_url }}" >> $GITHUB_STEP_SUMMARY
85+
echo "- **Modules**: ${{ inputs.modules }}" >> $GITHUB_STEP_SUMMARY
86+
if [ "${{ inputs.operation }}" = "remove" ] && [ "${{ inputs.force_remove }}" = "true" ]; then
87+
echo "- **Force Remove**: Yes" >> $GITHUB_STEP_SUMMARY
88+
fi

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ tests/puppeteer/node_modules
1212
tests/puppeteer/work_directory
1313
tests/puppeteer/package.json
1414
tests/puppeteer/package-lock.json
15+
scripts/sdkjs_common/jsdoc/node_modules
16+
scripts/sdkjs_common/jsdoc/package-lock.json

Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:16.04
1+
FROM ubuntu:20.04
22

33
ENV TZ=Etc/UTC
44
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
@@ -11,5 +11,4 @@ RUN rm /usr/bin/python && ln -s /usr/bin/python2 /usr/bin/python
1111
ADD . /build_tools
1212
WORKDIR /build_tools
1313

14-
CMD cd tools/linux && \
15-
python3 ./automate.py
14+
CMD ["sh", "-c", "cd tools/linux && python3 ./automate.py"]

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ necessary for the compilation process, all the dependencies required for the
88
correct work, as well as to get the latest version of
99
**ONLYOFFICE products** source code and build all their components.
1010

11-
**Important!** We can only guarantee the correct work of the products built from
12-
the `master` branch.
11+
**Important!** We can only guarantee the correct work of the products built
12+
from the `master` branch.
1313

1414
## How to use - Linux
1515

configure.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,13 @@
2121
parser.add_option("--external-folder", action="store", type="string", dest="external-folder", default="", help="defines a directory with external folder")
2222
parser.add_option("--sql-type", action="store", type="string", dest="sql-type", default="postgres", help="defines the sql type wich will be used")
2323
parser.add_option("--db-port", action="store", type="string", dest="db-port", default="5432", help="defines the sql db-port wich will be used")
24+
parser.add_option("--db-name", action="store", type="string", dest="db-name", default="onlyoffice", help="defines the sql db-name wich will be used")
2425
parser.add_option("--db-user", action="store", type="string", dest="db-user", default="onlyoffice", help="defines the sql db-user wich will be used")
2526
parser.add_option("--db-pass", action="store", type="string", dest="db-pass", default="onlyoffice", help="defines the sql db-pass wich will be used")
2627
parser.add_option("--compiler", action="store", type="string", dest="compiler", default="", help="defines compiler name. It is not recommended to use it as it's defined automatically (msvc2015, msvc2015_64, gcc, gcc_64, clang, clang_64, etc)")
2728
parser.add_option("--no-apps", action="store", type="string", dest="no-apps", default="0", help="disables building desktop apps that use qt")
2829
parser.add_option("--themesparams", action="store", type="string", dest="themesparams", default="", help="provides settings for generating presentation themes thumbnails")
29-
parser.add_option("--git-protocol", action="store", type="string", dest="git-protocol", default="https", help="can be used only if update is set to true - 'https', 'ssh'")
30+
parser.add_option("--git-protocol", action="store", type="string", dest="git-protocol", default="auto", help="can be used only if update is set to true - 'https', 'ssh'")
3031
parser.add_option("--branding", action="store", type="string", dest="branding", default="", help="provides branding path")
3132
parser.add_option("--branding-name", action="store", type="string", dest="branding-name", default="", help="provides branding name")
3233
parser.add_option("--branding-url", action="store", type="string", dest="branding-url", default="", help="provides branding url")

develop/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ but don't want to compile pretty compilcated core product to make those changes.
66

77
## System requirements
88

9+
**Note**: ARM-based architectures are currently **NOT** supported;
10+
attempting to run the images on ARM devices may result in startup failures
11+
or other runtime issues.
12+
913
### Windows
1014

1115
You need the latest

develop/run_build_js.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import config
99
import base
1010

11-
git_dir = sys.argv[1];
11+
git_dir = sys.argv[1]
1212

1313
base.print_info('argv :'+' '.join(sys.argv))
1414
base.cmd_in_dir(git_dir + '/build_tools/', 'python3', ['configure.py', '--develop', '1'] + sys.argv[2:])
@@ -18,7 +18,7 @@
1818

1919
if base.is_exist(git_dir + "/server/FileConverter/bin/fonts.log"):
2020
base.print_info('remove font cache to regenerate fonts in external sdkjs volume')
21-
base.delete_file(git_dir + "/server/FileConverter/bin/fonts.log");
21+
base.delete_file(git_dir + "/server/FileConverter/bin/fonts.log")
2222

2323
# external server volume
2424
if base.is_exist(sys.argv[1] + '/server/DocService/package.json'):
@@ -28,7 +28,7 @@
2828
base.replaceInFileRE("/etc/supervisor/conf.d/ds-converter.conf", "command=.*", "command=node " + git_dir + "/server/FileConverter/sources/convertermaster.js")
2929
base.replaceInFileRE("/app/ds/setup/config/supervisor/ds/ds-converter.conf", "command=.*", "command=node " + git_dir + "/server/FileConverter/sources/convertermaster.js")
3030
base.print_info('run_server.run_docker_server')
31-
run_server.run_docker_server();
31+
run_server.run_docker_server()
3232
else:
3333
#Fix theme generation for external sdkjs volume
3434
if base.is_exist(git_dir + "/server/FileConverter/bin/DoctRenderer.config"):

make.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@
9292
config.extend_option("config", "updmodule")
9393
base.set_env("DESKTOP_URL_UPDATES_MAIN_CHANNEL", "https://download.onlyoffice.com/install/desktop/editors/windows/onlyoffice/appcast.json")
9494
base.set_env("DESKTOP_URL_UPDATES_DEV_CHANNEL", "https://download.onlyoffice.com/install/desktop/editors/windows/onlyoffice/appcastdev.json")
95+
base.set_env("DESKTOP_URL_INSTALL_CHANNEL", "https://download.onlyoffice.com/install/desktop/editors/windows/distrib/onlyoffice/<file>")
96+
base.set_env("DESKTOP_URL_INSTALL_DEV_CHANNEL", "https://download.onlyoffice.com/install/desktop/editors/windows/onlyoffice/onlineinstallerdev/<file>")
9597

9698
# build
9799
build_sln.make()

make_package.py

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,17 @@
1010
# parse
1111
parser = argparse.ArgumentParser(description="Build packages.")
1212
parser.add_argument("-P", "--platform", dest="platform", type=str,
13-
action="store", help="Defines platform", required=True)
14-
parser.add_argument("-T", "--targets", dest="targets", type=str, nargs="+",
15-
action="store", help="Defines targets", required=True)
16-
parser.add_argument("-R", "--branding", dest="branding", type=str,
17-
action="store", help="Provides branding path")
13+
action="store", help="Defines platform", required=True)
14+
parser.add_argument("-T", "--targets", dest="targets", type=str, nargs="+",
15+
action="store", help="Defines targets", required=True)
1816
parser.add_argument("-V", "--version", dest="version", type=str,
19-
action="store", help="Defines version")
17+
action="store", help="Defines version")
2018
parser.add_argument("-B", "--build", dest="build", type=str,
21-
action="store", help="Defines build")
19+
action="store", help="Defines build")
20+
parser.add_argument("-H", "--branch", dest="branch", type=str,
21+
action="store", help="Defines branch")
22+
parser.add_argument("-R", "--branding", dest="branding", type=str,
23+
action="store", help="Provides branding path")
2224
args = parser.parse_args()
2325

2426
# vars
@@ -29,13 +31,20 @@
2931
common.clean = "clean" in args.targets
3032
common.sign = "sign" in args.targets
3133
common.deploy = "deploy" in args.targets
32-
common.version = args.version if args.version else utils.get_env("BUILD_VERSION", "0.0.0")
33-
common.build = args.build if args.build else utils.get_env("BUILD_NUMBER", "0")
34+
if args.version: common.version = args.version
35+
else: common.version = utils.get_env("PRODUCT_VERSION", "0.0.0")
36+
utils.set_env("PRODUCT_VERSION", common.version)
37+
utils.set_env("BUILD_VERSION", common.version)
38+
if args.build: common.build = args.build
39+
else: common.build = utils.get_env("BUILD_NUMBER", "0")
40+
utils.set_env("BUILD_NUMBER", common.build)
41+
if args.branch: common.branch = args.branch
42+
else: common.branch = utils.get_env("BRANCH_NAME", "null")
43+
utils.set_env("BRANCH_NAME", common.branch)
3444
common.branding = args.branding
3545
common.timestamp = utils.get_timestamp()
3646
common.workspace_dir = utils.get_abspath(utils.get_script_dir(__file__) + "/..")
3747
common.branding_dir = utils.get_abspath(common.workspace_dir + "/" + args.branding) if args.branding else common.workspace_dir
38-
common.deploy_data = utils.get_path(common.workspace_dir + "/deploy.txt")
3948
common.summary = []
4049
utils.log("os_family: " + common.os_family)
4150
utils.log("platform: " + str(common.platform))
@@ -64,15 +73,14 @@
6473

6574
# build
6675
utils.set_cwd(common.workspace_dir, verbose=True)
67-
utils.delete_file(common.deploy_data)
6876
if "core" in common.targets:
6977
package_core.make()
70-
if "closuremaps_opensource" in common.targets:
78+
if "closuremaps_sdkjs_opensource" in common.targets:
7179
package_core.deploy_closuremaps_sdkjs("opensource")
72-
package_core.deploy_closuremaps_webapps("opensource")
73-
if "closuremaps_commercial" in common.targets:
80+
if "closuremaps_sdkjs_commercial" in common.targets:
7481
package_core.deploy_closuremaps_sdkjs("commercial")
75-
package_core.deploy_closuremaps_webapps("commercial")
82+
if "closuremaps_webapps" in common.targets:
83+
package_core.deploy_closuremaps_webapps("opensource")
7684
if "desktop" in common.targets:
7785
package_desktop.make()
7886
if "builder" in common.targets:
@@ -83,6 +91,8 @@
8391
package_server.make("enterprise")
8492
if "server_developer" in common.targets:
8593
package_server.make("developer")
94+
if "server_prerequisites" in common.targets:
95+
package_server.make("prerequisites")
8696
if "mobile" in common.targets:
8797
package_mobile.make()
8898

0 commit comments

Comments
 (0)