Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge branch release/v8.2.0 into develop #863

Merged
merged 42 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
6338fd5
Split functions
Coolcooo Mar 19, 2024
1cca8af
Merge branch 'develop' of https://github.com/ONLYOFFICE/build_tools i…
Coolcooo Jul 2, 2024
f707156
Merge remote-tracking branch 'remotes/origin/release/v8.2.0' into fea…
Jul 25, 2024
963c3bf
Merge pull request #801 from ONLYOFFICE/feature/split_functions
SergeyLuzyanin Jul 25, 2024
6bf413a
Merge branch hotfix/v8.1.1 into release/v8.2.0
papacarlo Jul 26, 2024
e46d738
Added documentation generation scripts
KhromovNikita Jul 26, 2024
a8f6b0c
Merge pull request #846 from ONLYOFFICE/feature/documentation
K0R0L Jul 26, 2024
f012c60
Build json docs fixes
KhromovNikita Jul 26, 2024
331bbad
Merge pull request #847 from ONLYOFFICE/fix/documentation
K0R0L Jul 26, 2024
f6d55d0
Fixed getting doclets for docs generation
KhromovNikita Jul 26, 2024
1727313
Merge pull request #848 from ONLYOFFICE/fix/jsdoc
K0R0L Jul 26, 2024
efcfb00
Fixed docs generation scripts
KhromovNikita Jul 29, 2024
f8845d4
Merge pull request #849 from ONLYOFFICE/fix/jsdoc
K0R0L Jul 29, 2024
13db6d3
Fixed path in jsdoc generation script
KhromovNikita Jul 29, 2024
e99a3e8
Merge pull request #850 from ONLYOFFICE/fix/jsdoc
K0R0L Jul 29, 2024
d6b5dc0
Fixed comments
KhromovNikita Jul 29, 2024
871750d
Merge pull request #851 from ONLYOFFICE/fix/jsdoc
K0R0L Jul 29, 2024
dcfde5b
Refactoring
K0R0L Jul 29, 2024
e29fd0c
Added branch name to dist path for jsdoc json generation
KhromovNikita Jul 29, 2024
9d000b2
Merge pull request #852 from ONLYOFFICE/fix/generation-path
K0R0L Jul 29, 2024
8e7db87
Refactoring linux packages deploy (#853)
heatray Jul 31, 2024
0983e67
[jsdoc] Fixed api docs generation
KhromovNikita Aug 2, 2024
f91264b
Merge pull request #854 from ONLYOFFICE/fix/docs-generation
K0R0L Aug 2, 2024
eeca17e
Fixed jsdoc md generation
KhromovNikita Aug 2, 2024
07665dd
Merge pull request #855 from ONLYOFFICE/fix/jsdoc
K0R0L Aug 2, 2024
9a44dae
Jsdocs api plugins generation script
KhromovNikita Aug 5, 2024
d04f04f
Merge pull request #856 from ONLYOFFICE/fix/plugins-docs
K0R0L Aug 5, 2024
8b77361
Fix builder rpm package deploy (#857)
heatray Aug 6, 2024
a8912df
Refactoring
K0R0L Aug 6, 2024
13cbd84
Change documentType for pdf
K0R0L Aug 6, 2024
9ce103b
Add returncode in runcommand function
K0R0L Aug 6, 2024
096ce99
[jsdoc][plugins] Added examples field to json.
KhromovNikita Aug 7, 2024
626efaf
Merge pull request #858 from ONLYOFFICE/fix/jsdoc
K0R0L Aug 7, 2024
ebc084f
[jsdoc][bu] Removed example filed from json docs
KhromovNikita Aug 7, 2024
8f75c75
Merge pull request #859 from ONLYOFFICE/fix/builder-docs
K0R0L Aug 7, 2024
01575d1
Fix core and builder archive deploy (#860)
heatray Aug 12, 2024
40e9938
Add test for dicts & spellmodule to core
K0R0L Aug 12, 2024
6e4a2e4
Add dictionariestester to core deploy
K0R0L Aug 12, 2024
50eca8a
Fix build
K0R0L Aug 13, 2024
997bfa3
Fix typo
K0R0L Aug 13, 2024
dabbc31
Handling complex dependencies in project file
K0R0L Aug 13, 2024
63fbbc5
Add missed library to deploy
K0R0L Aug 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
name: Markdown check
name: Markdown Lint

on:
workflow_dispatch:
push:
branches:
- '*'
- '**'
paths:
- '*.md'
- 'develop/*.md'
- 'scripts/**.md'
- '.markdownlint.jsonc'

jobs:
markdownlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: DavidAnson/markdownlint-cli2-action@v9
- uses: actions/checkout@v4
- uses: DavidAnson/markdownlint-cli2-action@v16
with:
command: config
globs: |
.markdownlint.jsonc
*.md
develop/*.md
scripts/**.md
scripts/**.md
9 changes: 3 additions & 6 deletions .github/workflows/update-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,13 @@ name: Update hard-coded version
on: workflow_dispatch

jobs:

update-version:
if: >-
${{ contains(github.ref, 'refs/heads/hotfix/v') ||
contains(github.ref, 'refs/heads/release/v') }}
runs-on: ubuntu-latest
steps:

- name: Checkout
uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
token: ${{ secrets.PUSH_TOKEN }}

Expand All @@ -25,9 +22,9 @@ jobs:
run: echo "${{ env.version }}" > version

- name: Commit & push changes
uses: EndBug/add-and-commit@v8
uses: EndBug/add-and-commit@v9
with:
author_name: github-actions[bot]
author_email: github-actions[bot]@users.noreply.github.com
message: Update hard-coded version to v${{ env.version }}
message: Update hard-coded version to ${{ env.version }}
add: version
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ tests/puppeteer/node_modules
tests/puppeteer/work_directory
tests/puppeteer/package.json
tests/puppeteer/package-lock.json
scripts/sdkjs_common/jsdoc/node_modules
scripts/sdkjs_common/jsdoc/package-lock.json
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,8 @@ LD_LIBRARY_PATH=./ ./DesktopEditors
**Note**: The created database must have **onlyoffice** both for user and password.

```bash
sudo -i -u postgres psql -c "CREATE DATABASE onlyoffice;"
sudo -i -u postgres psql -c "CREATE USER onlyoffice WITH password 'onlyoffice';"
sudo -i -u postgres psql -c "GRANT ALL privileges ON DATABASE onlyoffice TO onlyoffice;"
sudo -i -u postgres psql -c "CREATE USER onlyoffice WITH PASSWORD 'onlyoffice';"
sudo -i -u postgres psql -c "CREATE DATABASE onlyoffice OWNER onlyoffice;"
```

3. Configure the database:
Expand Down
6 changes: 3 additions & 3 deletions develop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ Clone development modules to the work dir
* `server` repo is located [here](https://github.com/ONLYOFFICE/server/)

```bash
cd ../..
git clone https://github.com/ONLYOFFICE/sdkjs.git
git clone https://github.com/ONLYOFFICE/web-apps.git
git clone https://github.com/ONLYOFFICE/server.git
Expand All @@ -75,14 +74,15 @@ along with the relative paths to the required folders.
The folders `sdkjs` and `web-apps` are required for proper development workflow.
The folders `server` is optional

**Note**: Run command with the current working directory
containing `sdkjs`, `web-apps`...

**Note**: ONLYOFFICE server uses port 80.
Look for another application using port 80 and stop it

**Note**: Server start with `sdkjs` and `web-apps` takes 15 minutes
and takes 20 minutes with `server`

**Note**: Run command from work dir with development modules

### docker run on Windows (PowerShell)

**Note**: Run PowerShell as administrator to fix EACCES error when installing
Expand Down
28 changes: 19 additions & 9 deletions make_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,17 @@
# parse
parser = argparse.ArgumentParser(description="Build packages.")
parser.add_argument("-P", "--platform", dest="platform", type=str,
action="store", help="Defines platform", required=True)
parser.add_argument("-T", "--targets", dest="targets", type=str, nargs="+",
action="store", help="Defines targets", required=True)
parser.add_argument("-R", "--branding", dest="branding", type=str,
action="store", help="Provides branding path")
action="store", help="Defines platform", required=True)
parser.add_argument("-T", "--targets", dest="targets", type=str, nargs="+",
action="store", help="Defines targets", required=True)
parser.add_argument("-V", "--version", dest="version", type=str,
action="store", help="Defines version")
action="store", help="Defines version")
parser.add_argument("-B", "--build", dest="build", type=str,
action="store", help="Defines build")
action="store", help="Defines build")
parser.add_argument("-H", "--branch", dest="branch", type=str,
action="store", help="Defines branch")
parser.add_argument("-R", "--branding", dest="branding", type=str,
action="store", help="Provides branding path")
args = parser.parse_args()

# vars
Expand All @@ -29,8 +31,16 @@
common.clean = "clean" in args.targets
common.sign = "sign" in args.targets
common.deploy = "deploy" in args.targets
common.version = args.version if args.version else utils.get_env("BUILD_VERSION", "0.0.0")
common.build = args.build if args.build else utils.get_env("BUILD_NUMBER", "0")
if args.version: common.version = args.version
else: common.version = utils.get_env("PRODUCT_VERSION", "0.0.0")
utils.set_env("PRODUCT_VERSION", common.version)
utils.set_env("BUILD_VERSION", common.version)
if args.build: common.build = args.build
else: common.build = utils.get_env("BUILD_NUMBER", "0")
utils.set_env("BUILD_NUMBER", common.build)
if args.branch: common.branch = args.branch
else: common.branch = utils.get_env("BRANCH_NAME", "null")
utils.set_env("BRANCH_NAME", common.branch)
common.branding = args.branding
common.timestamp = utils.get_timestamp()
common.workspace_dir = utils.get_abspath(utils.get_script_dir(__file__) + "/..")
Expand Down
28 changes: 20 additions & 8 deletions scripts/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ def cmd2(prog, args=[], is_no_errors=False):
sys.exit("Error (" + prog + "): " + str(ret))
return ret

def cmd_exe(prog, args):
def cmd_exe(prog, args, is_no_errors=False):
prog_dir = os.path.dirname(prog)
env_dir = os.environ
if ("linux" == host_platform()):
Expand All @@ -406,7 +406,7 @@ def cmd_exe(prog, args):
command += (" \"" + arg + "\"")
process = subprocess.Popen(command, stderr=subprocess.STDOUT, shell=True, env=env_dir)
ret = process.wait()
if ret != 0:
if ret != 0 and True != is_no_errors:
sys.exit("Error (" + prog + "): " + str(ret))
return ret

Expand All @@ -426,12 +426,13 @@ def cmd_and_return_cwd(prog, args=[], is_no_errors=False):

def run_command(sCommand):
popen = subprocess.Popen(sCommand, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
result = {'stdout' : '', 'stderr' : ''}
result = {'stdout' : '', 'stderr' : '', 'returncode' : 0}
try:
stdout, stderr = popen.communicate()
popen.wait()
result['stdout'] = stdout.strip().decode('utf-8', errors='ignore')
result['stderr'] = stderr.strip().decode('utf-8', errors='ignore')
result['returncode'] = popen.returncode
finally:
popen.stdout.close()
popen.stderr.close()
Expand Down Expand Up @@ -1046,15 +1047,15 @@ def web_apps_addons_param():
def download(url, dst):
return cmd_exe("curl", ["-L", "-o", dst, url])

def extract(src, dst):
def extract(src, dst, is_no_errors=False):
app = "7za" if ("mac" == host_platform()) else "7z"
return cmd_exe(app, ["x", "-y", src, "-o" + dst])
return cmd_exe(app, ["x", "-y", src, "-o" + dst], is_no_errors)

def extract_unicode(src, dst):
def extract_unicode(src, dst, is_no_errors=False):
if "windows" == host_platform():
run_as_bat_win_isolate([u"chcp 65001", u"call 7z.exe x -y \"" + src + u"\" \"-o" + dst + u"\"", u"exit"])
return
return extract(src, dst)
return extract(src, dst, is_no_errors)

def archive_folder(src, dst):
app = "7za" if ("mac" == host_platform()) else "7z"
Expand Down Expand Up @@ -1354,7 +1355,7 @@ def copy_sdkjs_plugins(dst_dir, is_name_as_guid=False, is_desktop_local=False, i
plugins_dir = __file__script__path__ + "/../../onlyoffice.github.io/sdkjs-plugins/content"
plugins_list_config = config.option("sdkjs-plugin")
if isXp:
plugins_list_config="photoeditor, macros, drawio, highlightcode, doc2md"
plugins_list_config="photoeditor, macros, highlightcode, doc2md"
if ("" == plugins_list_config):
return
plugins_list = plugins_list_config.rsplit(", ")
Expand Down Expand Up @@ -1743,3 +1744,14 @@ def check_tools():
create_dir(directory + "/qt")
cmd("python", [directory + "/arm/build_qt.py", "--arch", "arm64", directory + "/qt/arm64"])
return

def apply_patch(file, patch):
patch_content = readFile(patch)
index1 = patch_content.find("<<<<<<<")
index2 = patch_content.find("=======")
index3 = patch_content.find(">>>>>>>")
file_content_old = patch_content[index1 + 7:index2].strip()
file_content_new = patch_content[index2 + 7:index3].strip()
#file_content_new = "\n#if 0" + file_content_old + "#else" + file_content_new + "#endif\n"
replaceInFile(file, file_content_old, file_content_new)
return
16 changes: 13 additions & 3 deletions scripts/build_js.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,25 @@ def build_sdk_native(directory, minimize=True):
_run_grunt(directory, get_build_param(minimize) + ["--mobile=true"] + addons)
return

def build_js_develop(root_dir):
#_run_npm_cli(root_dir + "/sdkjs/build")

def build_sdkjs_develop(root_dir):
external_folder = config.option("--external-folder")
if (external_folder != ""):
external_folder = "/" + external_folder

_run_npm_ci(root_dir + external_folder + "/sdkjs/build")
_run_grunt(root_dir + external_folder + "/sdkjs/build", get_build_param(False) + base.sdkjs_addons_param())
_run_grunt(root_dir + external_folder + "/sdkjs/build", ["develop"] + base.sdkjs_addons_param())


def build_js_develop(root_dir):
#_run_npm_cli(root_dir + "/sdkjs/build")
external_folder = config.option("--external-folder")
if (external_folder != ""):
external_folder = "/" + external_folder

build_sdkjs_develop(root_dir)

_run_npm(root_dir + external_folder + "/web-apps/build")
_run_npm_ci(root_dir + external_folder + "/web-apps/build/sprites")
_run_grunt(root_dir + external_folder + "/web-apps/build/sprites", [])
Expand Down
1 change: 0 additions & 1 deletion scripts/core_common/modules/android/icu_android.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@

"-DUCONFIG_NO_COLLATION=0",
"-DUCONFIG_NO_FORMATTING=0",
"-DUCONFIG_NO_LEGACY_CONVERSION=1",
"-DUCONFIG_NO_REGULAR_EXPRESSIONS=0",
"-DUCONFIG_NO_TRANSLITERATION=0",

Expand Down
8 changes: 8 additions & 0 deletions scripts/core_common/modules/socket_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,16 @@ def make():
base_dir = base.get_script_dir() + "/../../core/Common/3dParty/socketio"
if not base.is_dir(base_dir + "/socket.io-client-cpp"):
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", ["checkout", "da779141a7379cc30c870d48295033bc16a23c66"])
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"])
base.cmd_in_dir(base_dir + "/socket.io-client-cpp/lib/asio", "git", ["checkout", "230c0d2ae035c5ce1292233fcab03cea0d341264"])
base.cmd_in_dir(base_dir + "/socket.io-client-cpp/lib/websocketpp", "git", ["checkout", "56123c87598f8b1dd471be83ca841ceae07f95ba"])
# patches
base.apply_patch(base_dir + "/socket.io-client-cpp/lib/websocketpp/websocketpp/impl/connection_impl.hpp", base_dir + "/patches/websocketpp.patch")
base.apply_patch(base_dir + "/socket.io-client-cpp/src/internal/sio_client_impl.cpp", base_dir + "/patches/sio_client_impl_fail.patch")
base.apply_patch(base_dir + "/socket.io-client-cpp/src/internal/sio_client_impl.cpp", base_dir + "/patches/sio_client_impl_open.patch")
base.apply_patch(base_dir + "/socket.io-client-cpp/src/internal/sio_client_impl.cpp", base_dir + "/patches/sio_client_impl_close_timeout.patch")

# no tls realization (remove if socket.io fix this)
dst_dir = base_dir + "/socket.io-client-cpp/src_no_tls"
Expand Down
7 changes: 2 additions & 5 deletions scripts/deploy_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def make():
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, archive_dir, "Fb2File")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, archive_dir, "EpubFile")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, archive_dir, "DocxRenderer")
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, archive_dir, "hunspell")
base.copy_file(git_dir + "/sdkjs/pdf/src/engine/cmap.bin", archive_dir + "/cmap.bin")
base.copy_exe(core_build_dir + "/bin/" + platform_postfix, archive_dir, "x2t")

Expand All @@ -61,13 +62,9 @@ def make():
base.copy_exe(core_build_dir + "/bin/" + platform_postfix, archive_dir, "ooxml_crypt")
base.copy_exe(core_build_dir + "/bin/" + platform_postfix, archive_dir, "vboxtester")
base.copy_exe(core_build_dir + "/bin/" + platform_postfix, archive_dir, "metafiletester")
base.copy_exe(core_build_dir + "/bin/" + platform_postfix, archive_dir, "dictionariestester")

# dictionaries
base.copy_dictionaries(git_dir + "/dictionaries", archive_dir + "/dictionaries", True, False)

if base.is_file(archive_dir + ".7z"):
base.delete_file(archive_dir + ".7z")
base.archive_folder(archive_dir + "/*", archive_dir + ".7z")

return

24 changes: 13 additions & 11 deletions scripts/develop/config_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
import os
import json

def get_core_url(arch, branch):
return "http://repo-doc-onlyoffice-com.s3.amazonaws.com/" + base.host_platform() + "/core/" + branch + "/latest/" + arch + "/core.7z"
def get_core_url(platform, branch):
return "http://repo-doc-onlyoffice-com.s3.amazonaws.com/archive/" \
+ branch + "/latest/core-" + platform.replace("_", "-") + ".7z"

def make():
git_dir = base.get_script_dir() + "/../.."
Expand All @@ -20,14 +21,21 @@ def make():

arch = "x64"
arch2 = "_64"
if ("windows" == base.host_platform()) and not base.host_platform_is64():
if base.is_windows() and not base.host_platform_is64():
arch = "x86"
arch2 = "_32"
if base.is_os_arm():
arch2 = "_arm64"
platform = ""
if base.is_windows():
platform = "win" + arch2
else:
platform = base.host_platform() + arch2

url = get_core_url(arch, config.option("branch"))
url = get_core_url(platform, config.option("branch"))
data_url = base.get_file_last_modified_url(url)
if (data_url == "" and config.option("branch") != "develop"):
url = get_core_url(arch, "develop")
url = get_core_url(platform, "develop")
data_url = base.get_file_last_modified_url(url)

old_data_url = base.readFile("./core.7z.data")
Expand All @@ -49,12 +57,6 @@ def make():
base.extract("./core.7z", "./")
base.writeFile("./core.7z.data", data_url)

platform = ""
if ("windows" == base.host_platform()):
platform = "win" + arch2
else:
platform = base.host_platform() + arch2

base.copy_files("./core/*", "./")
else:
print("-----------------------------------------------------------")
Expand Down
22 changes: 13 additions & 9 deletions scripts/develop/run_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,18 @@ def run_integration_example():

def start_linux_services():
base.print_info('Restart MySQL Server')



def update_config(args):
platform = base.host_platform()
branch = base.run_command('git rev-parse --abbrev-ref HEAD')['stdout']

if ("linux" == platform):
base.cmd_in_dir(base_dir + '/../../', 'python', ['configure.py', '--branch', branch or 'develop', '--develop', '1', '--module', 'server', '--update', '1', '--update-light', '1', '--clean', '0'] + args)
else:
base.cmd_in_dir(base_dir + '/../../', 'python', ['configure.py', '--branch', branch or 'develop', '--develop', '1', '--module', 'server', '--update', '1', '--update-light', '1', '--clean', '0', '--sql-type', 'mysql', '--db-port', '3306', '--db-name', 'onlyoffice', '--db-user', 'root', '--db-pass', 'onlyoffice'] + args)


def make_start():
base.configure_common_apps()

Expand All @@ -64,15 +75,8 @@ def make_start():
start_linux_services()

def make_configure(args):
platform = base.host_platform()
branch = base.run_command('git rev-parse --abbrev-ref HEAD')['stdout']

base.print_info('Build modules')
if ("linux" == platform):
base.cmd_in_dir(base_dir + '/../../', 'python', ['configure.py', '--branch', branch or 'develop', '--develop', '1', '--module', 'server', '--update', '1', '--update-light', '1', '--clean', '0'] + args)
else:
base.cmd_in_dir(base_dir + '/../../', 'python', ['configure.py', '--branch', branch or 'develop', '--develop', '1', '--module', 'server', '--update', '1', '--update-light', '1', '--clean', '0', '--sql-type', 'mysql', '--db-port', '3306', '--db-name', 'onlyoffice', '--db-user', 'root', '--db-pass', 'onlyoffice'] + args)

update_config(args)
base.cmd_in_dir(base_dir + '/../../', 'python', ['make.py'])
def make_install():
platform = base.host_platform()
Expand Down
Loading