mirror of
https://github.com/ONLYOFFICE/build_tools.git
synced 2026-04-07 14:06:31 +08:00
Compare commits
109 Commits
feature/do
...
v7.4.0.76
| Author | SHA1 | Date | |
|---|---|---|---|
| 362d82e32c | |||
| a024ff4899 | |||
| 98a4dbddfc | |||
| e2f0d4b643 | |||
| ad67f0de2c | |||
| 6df78fb8c0 | |||
| b75f9cc039 | |||
| 776b50945f | |||
| 6bdfc8a141 | |||
| 88fc4a26ed | |||
| 904fee3f53 | |||
| 784a9928cd | |||
| 493b79a18c | |||
| 503ae7679f | |||
| 873b1f3774 | |||
| e9e7e7a4c7 | |||
| e508edb680 | |||
| 334ad55548 | |||
| d14816d18e | |||
| 204f9fbe51 | |||
| 6d8b407872 | |||
| 0f5dab8095 | |||
| e1271a62cf | |||
| 549e182867 | |||
| 59f8e39092 | |||
| 5ff3c615e9 | |||
| 00300d80c2 | |||
| 7dd97a8490 | |||
| f39cfe8a22 | |||
| 3251c1125f | |||
| a7f0f1611f | |||
| cf1f0bdb63 | |||
| b7808a8fa6 | |||
| 7184016b62 | |||
| cb137bb28a | |||
| 5309911e2b | |||
| 101949ba1c | |||
| 1431d3a541 | |||
| c04ef86daf | |||
| f780bef0a9 | |||
| 2578d22b93 | |||
| b91cbf1233 | |||
| 55955b7731 | |||
| 484c9dc910 | |||
| c235a78634 | |||
| 09bf6684d3 | |||
| ea0a80e4d1 | |||
| 52e706d212 | |||
| 55f8633cce | |||
| 11fa48d1b0 | |||
| a3d7c0bbcd | |||
| 32af7d10c6 | |||
| 1241e7e868 | |||
| 0a8601ca79 | |||
| 8fa8424f24 | |||
| c7465ba9ee | |||
| 98f84e8740 | |||
| 75d975f91d | |||
| 8f146582a4 | |||
| 59bb27998f | |||
| ad53559b4f | |||
| 7e53c18f5b | |||
| a18b226ea2 | |||
| 4112c88c1b | |||
| abda397c9f | |||
| 0c40287764 | |||
| 05902d88a7 | |||
| 228b00d5c7 | |||
| 6c2ce95b0e | |||
| fcb7ece378 | |||
| 65ef84179f | |||
| 0811018560 | |||
| 1a70ce90f9 | |||
| b7aa164ed8 | |||
| cecf304ace | |||
| ce60b83e65 | |||
| 7764d4ba30 | |||
| 719a198e55 | |||
| 8eac35df75 | |||
| 975972885a | |||
| 056da4b782 | |||
| 0de3c26200 | |||
| f5539cf79f | |||
| a0bdca62b5 | |||
| ad996d39d2 | |||
| d393b9ea90 | |||
| 6efb0cfccf | |||
| 19ac16ff62 | |||
| 468f1788b8 | |||
| 36b5e1b5d7 | |||
| 4b50455a22 | |||
| 5250de602c | |||
| ffb88cdf57 | |||
| 306703e677 | |||
| 256edf489c | |||
| 655837f8cd | |||
| ef43e6a9a4 | |||
| 8fa222a9b9 | |||
| 0e90989998 | |||
| dd9a8b9df5 | |||
| d758cd1e7d | |||
| ad83a772a1 | |||
| 1ad42f671a | |||
| b3ab757416 | |||
| 65571cfa06 | |||
| 4fd5d6a814 | |||
| c68c365261 | |||
| d2d7dc0717 | |||
| e50a0e84f2 |
7
.github/workflows/check.yml
vendored
7
.github/workflows/check.yml
vendored
@ -14,8 +14,5 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: DavidAnson/markdownlint-cli2-action@v9
|
||||
with:
|
||||
command: config
|
||||
globs: |
|
||||
.markdownlint.jsonc
|
||||
*.md
|
||||
develop/*.md
|
||||
globs: '*.md,develop/*.md'
|
||||
separator: ','
|
||||
|
||||
@ -1,5 +0,0 @@
|
||||
{
|
||||
"line-length": {
|
||||
"code_block_line_length": 300
|
||||
}
|
||||
}
|
||||
@ -114,6 +114,7 @@ desktop {
|
||||
!no_desktop_apps {
|
||||
core_windows:addSubProject(projicons, $$ROOT_DIR/desktop-apps/win-linux/extras/projicons/ProjIcons.pro,\
|
||||
documentscore videoplayer)
|
||||
core_windows:!build_xp:addSubProject(updatedaemon, $$ROOT_DIR/desktop-apps/win-linux/extras/update-daemon/UpdateDaemon.pro)
|
||||
addSubProject(desktopapp, $$ROOT_DIR/desktop-apps/win-linux/ASCDocumentEditor.pro,\
|
||||
documentscore videoplayer)
|
||||
}
|
||||
|
||||
@ -3,17 +3,11 @@ RUN apt-get update -y && \
|
||||
apt-get install git -y \
|
||||
python3 -y \
|
||||
openjdk-11-jdk -y \
|
||||
bzip2 -y \
|
||||
npm -y && \
|
||||
npm install -g grunt grunt-cli -y && \
|
||||
npm install -g grunt-cli -y && \
|
||||
ln -s /usr/bin/python3 /usr/bin/python && \
|
||||
ln -s /usr/bin/pip3 /usr/bin/pip && \
|
||||
git clone --depth 1 -b feature/docker-instruction https://github.com/ONLYOFFICE/build_tools.git var/www/onlyoffice/documentserver/build_tools && \
|
||||
git clone --depth 1 https://github.com/ONLYOFFICE/build_tools.git var/www/onlyoffice/documentserver/build_tools && \
|
||||
sed -i '/documentserver-static-gzip.sh ${ONLYOFFICE_DATA_CONTAINER}/d' /app/ds/run-document-server.sh && \
|
||||
#Set Up Debug Logging
|
||||
sed -i 's/WARN/ALL/g' /etc/onlyoffice/documentserver/log4js/production.json && \
|
||||
#Start test example
|
||||
if [ -s /etc/supervisor/conf.d/ds-example.conf ] ; then sed -i 's,autostart=false,autostart=true,' /etc/supervisor/conf.d/ds-example.conf; fi && \
|
||||
if [ -s /app/ds/setup/config/supervisor/ds/ds-example.conf ] ; then sed -i 's,autostart=false,autostart=true,' /app/ds/setup/config/supervisor/ds/ds-example.conf; fi && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
ENTRYPOINT python3 /var/www/onlyoffice/documentserver/build_tools/develop/run_build_js.py /var/www/onlyoffice/documentserver $@ && /bin/sh -c /app/ds/run-document-server.sh
|
||||
ENTRYPOINT python3 /var/www/onlyoffice/documentserver/build_tools/develop/run_build_js.py /var/www/onlyoffice/documentserver && /bin/sh -c /app/ds/run-document-server.sh
|
||||
|
||||
@ -1,219 +1,50 @@
|
||||
# Docker
|
||||
|
||||
This directory containing instruction for developers,
|
||||
who want to change something in sdkjs or web-apps or server module,
|
||||
who want to change something in sdkjs or web-apps module,
|
||||
but don't want to compile pretty compilcated core product to make those changes.
|
||||
|
||||
## System requirements
|
||||
## Installing ONLYOFFICE Docs
|
||||
|
||||
### Windows
|
||||
## How to use - Linux or macOS
|
||||
|
||||
You need the latest
|
||||
[Docker Desktop for Windows](https://docs.docker.com/desktop/install/windows-install/)
|
||||
installed.
|
||||
**Note**: You need the latest Docker version installed.
|
||||
|
||||
**Note**: Docker Desktop does not start automatically after installation.
|
||||
You should manually start the **Docker Desktop** application.
|
||||
|
||||
**Note**: If you have problems running Docker Desktop with the
|
||||
"Use WSL 2 instead of Hyper-V" installation option,
|
||||
try reinstalling it without this option.
|
||||
|
||||
### Linux or macOS
|
||||
|
||||
You need the latest
|
||||
[Docker](https://docs.docker.com/engine/install/)
|
||||
version installed.
|
||||
|
||||
## Create develop Docker Images
|
||||
|
||||
To create a image with the ability to include external non-minified sdkjs code,
|
||||
use the following commands:
|
||||
|
||||
### Clone development environment to work dir
|
||||
|
||||
```bash
|
||||
git clone -b feature/docker-instruction https://github.com/ONLYOFFICE/build_tools.git
|
||||
```
|
||||
|
||||
### Modify Docker Images
|
||||
You might need to pull **onlyoffice/documentserver** image:
|
||||
|
||||
**Note**: Do not prefix docker command with sudo.
|
||||
[This](https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user)
|
||||
instruction show how to use docker without sudo.
|
||||
|
||||
```bash
|
||||
cd build_tools/develop
|
||||
docker pull onlyoffice/documentserver
|
||||
```
|
||||
|
||||
### Create develop image
|
||||
|
||||
To create a image with the ability to include external non-minified sdkjs code,
|
||||
use the following command:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/ONLYOFFICE/build_tools.git
|
||||
cd build_tools/develop
|
||||
docker build -t documentserver-develop .
|
||||
```
|
||||
|
||||
**Note**: The dot at the end is required.
|
||||
|
||||
**Note**: Sometimes script may fail due to network errors. Just restart it.
|
||||
### Connecting external folders
|
||||
|
||||
## Clone development modules
|
||||
|
||||
Clone development modules to the work dir
|
||||
To connect external folders to the container,
|
||||
you need to pass the "-v" parameter
|
||||
along with the relative paths to the required folders.
|
||||
The folders `sdkjs` and `web-apps` are required for proper development workflow
|
||||
|
||||
* `sdkjs` repo is located [here](https://github.com/ONLYOFFICE/sdkjs/)
|
||||
* `web-apps` repo is located [here](https://github.com/ONLYOFFICE/web-apps/)
|
||||
* `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
|
||||
```
|
||||
|
||||
## Start server with external folders
|
||||
|
||||
To mount external folders to the container,
|
||||
you need to pass the "-v" parameter
|
||||
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**: 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
|
||||
node_modules
|
||||
|
||||
run with `sdkjs` and `web-apps`
|
||||
|
||||
```bash
|
||||
docker run -i -t -p 80:80 --restart=always -e ALLOW_PRIVATE_IP_ADDRESS=true -v $pwd/sdkjs:/var/www/onlyoffice/documentserver/sdkjs -v $pwd/web-apps:/var/www/onlyoffice/documentserver/web-apps documentserver-develop
|
||||
```
|
||||
|
||||
or run with `sdkjs`, `web-apps` and `server`
|
||||
|
||||
```bash
|
||||
docker run -i -t -p 80:80 --restart=always -e ALLOW_PRIVATE_IP_ADDRESS=true -v $pwd/sdkjs:/var/www/onlyoffice/documentserver/sdkjs -v $pwd/web-apps:/var/www/onlyoffice/documentserver/web-apps -v $pwd/server:/var/www/onlyoffice/documentserver/server documentserver-develop
|
||||
```
|
||||
|
||||
### docker run on Linux or macOS
|
||||
|
||||
run with `sdkjs` and `web-apps`
|
||||
|
||||
```bash
|
||||
docker run -i -t -p 80:80 --restart=always -e ALLOW_PRIVATE_IP_ADDRESS=true -v $(pwd)/sdkjs:/var/www/onlyoffice/documentserver/sdkjs -v $(pwd)/web-apps:/var/www/onlyoffice/documentserver/web-apps documentserver-develop
|
||||
```
|
||||
|
||||
or run with `sdkjs`, `web-apps` and `server`
|
||||
|
||||
```bash
|
||||
docker run -i -t -p 80:80 --restart=always -e ALLOW_PRIVATE_IP_ADDRESS=true -v $(pwd)/sdkjs:/var/www/onlyoffice/documentserver/sdkjs -v $(pwd)/web-apps:/var/www/onlyoffice/documentserver/web-apps -v $(pwd)/server:/var/www/onlyoffice/documentserver/server documentserver-develop
|
||||
```
|
||||
|
||||
## Open editor
|
||||
|
||||
After the server starts successfully, you will see Docker log messages like this
|
||||
|
||||
```bash
|
||||
[Date] [WARN] [localhost] [docId] [userId] nodeJS
|
||||
```
|
||||
|
||||
To try the document editor, open a browser tab and type
|
||||
[http://localhost/example](http://localhost/example) into the URL bar.
|
||||
|
||||
**Note**: Disable **ad blockers** for localhost page.
|
||||
It may block some scripts (like Analytics.js)
|
||||
|
||||
## Modify sources
|
||||
|
||||
### To change something in `sdkjs` do the following steps
|
||||
|
||||
1)Edit source file. Let's insert an image url into each open document.
|
||||
Following command inserts (in case of problems, you can replace URL)
|
||||
`this.AddImageUrl(['http://localhost/example/images/logo.png']);`
|
||||
after event
|
||||
`this.sendEvent('asc_onDocumentContentReady');`
|
||||
in file
|
||||
`sdkjs/common/apiBase.js`
|
||||
|
||||
### change sdkjs on Windows (PowerShell)
|
||||
|
||||
```bash
|
||||
(Get-Content sdkjs/common/apiBase.js) -replace "this\.sendEvent\('asc_onDocumentContentReady'\);", "this.sendEvent('asc_onDocumentContentReady');this.AddImageUrl(['http://localhost/example/images/logo.png']);" | Set-Content sdkjs/common/apiBase.js
|
||||
```
|
||||
|
||||
### change sdkjs on Linux or macOS
|
||||
|
||||
```bash
|
||||
sed -i "s,this.sendEvent('asc_onDocumentContentReady');,this.sendEvent('asc_onDocumentContentReady');this.AddImageUrl(['http://localhost/example/images/logo.png']);," sdkjs/common/apiBase.js
|
||||
```
|
||||
|
||||
2)Delete browser cache or hard reload the page `Ctrl + Shift + R`
|
||||
|
||||
3)Open new file in browser
|
||||
|
||||
### To change something in `server` do the following steps
|
||||
|
||||
1)Edit source file. Let's send `"Hello World!"`
|
||||
chart message every time a document is opened.
|
||||
Following command inserts
|
||||
`yield* onMessage(ctx, conn, {"message": "Hello World!"});`
|
||||
in function
|
||||
`sendAuthInfo`
|
||||
in file
|
||||
`server/DocService/sources/DocsCoServer.js`
|
||||
|
||||
### change server on Windows (PowerShell)
|
||||
|
||||
```bash
|
||||
(Get-Content server/DocService/sources/DocsCoServer.js) -replace 'opt_hasForgotten, opt_openedAt\) \{', 'opt_hasForgotten, opt_openedAt) {yield* onMessage(ctx, conn, {"message": "Hello World!"});' | Set-Content server/DocService/sources/DocsCoServer.js
|
||||
```
|
||||
|
||||
### change server on Linux or macOS
|
||||
|
||||
```bash
|
||||
sed -i 's#opt_hasForgotten, opt_openedAt) {#opt_hasForgotten, opt_openedAt) {yield* onMessage(ctx, conn, {"message": "Hello World!"});#' server/DocService/sources/DocsCoServer.js
|
||||
```
|
||||
|
||||
2)Restart document server process
|
||||
|
||||
**Note**: Look for ``CONTAINER_ID`` in the result of ``docker ps``.
|
||||
|
||||
```bash
|
||||
docker exec -it CONTAINER_ID supervisorctl restart all
|
||||
```
|
||||
|
||||
3)Open new file in browser
|
||||
|
||||
## Start server with additional functionality(addons)
|
||||
|
||||
To get additional functionality and branding you need to connect a branding folder,
|
||||
additional addon folders and pass command line arguments
|
||||
|
||||
For example run with `onlyoffice` branding and
|
||||
addons:`sdkjs-forms`, `sdkjs-ooxml`, `web-apps-mobile`
|
||||
|
||||
### docker run on Windows (PowerShell) with branding
|
||||
|
||||
**Note**: Run PowerShell as administrator to fix EACCES error when installing
|
||||
node_modules
|
||||
|
||||
```bash
|
||||
docker run -i -t -p 80:80 --restart=always -e ALLOW_PRIVATE_IP_ADDRESS=true `
|
||||
-v $pwd/sdkjs:/var/www/onlyoffice/documentserver/sdkjs -v $pwd/web-apps:/var/www/onlyoffice/documentserver/web-apps `
|
||||
-v $pwd/onlyoffice:/var/www/onlyoffice/documentserver/onlyoffice -v $pwd/sdkjs-ooxml:/var/www/onlyoffice/documentserver/sdkjs-ooxml -v $pwd/sdkjs-forms:/var/www/onlyoffice/documentserver/sdkjs-forms -v $pwd/web-apps-mobile:/var/www/onlyoffice/documentserver/web-apps-mobile `
|
||||
documentserver-develop args --branding onlyoffice --branding-url 'https://github.com/ONLYOFFICE/onlyoffice.git' --siteUrl localhost
|
||||
```
|
||||
|
||||
### docker run on Linux or macOS with branding
|
||||
|
||||
```bash
|
||||
docker run -i -t -p 80:80 --restart=always -e ALLOW_PRIVATE_IP_ADDRESS=true \
|
||||
-v $(pwd)/sdkjs:/var/www/onlyoffice/documentserver/sdkjs -v $(pwd)/web-apps:/var/www/onlyoffice/documentserver/web-apps \
|
||||
-v $(pwd)/onlyoffice:/var/www/onlyoffice/documentserver/onlyoffice -v $(pwd)/sdkjs-ooxml:/var/www/onlyoffice/documentserver/sdkjs-ooxml -v $(pwd)/sdkjs-forms:/var/www/onlyoffice/documentserver/sdkjs-forms -v $(pwd)/web-apps-mobile:/var/www/onlyoffice/documentserver/web-apps-mobile \
|
||||
documentserver-develop args --branding onlyoffice --branding-url 'https://github.com/ONLYOFFICE/onlyoffice.git' --siteUrl localhost
|
||||
docker run -i -t -d -p 80:80 --restart=always \
|
||||
-v /host-dir/sdkjs:/var/www/onlyoffice/documentserver/sdkjs \
|
||||
-v /host-dir/web-apps:/var/www/onlyoffice/documentserver/web-apps documentserver-develop
|
||||
```
|
||||
|
||||
@ -2,56 +2,11 @@
|
||||
|
||||
import sys
|
||||
sys.path.append(sys.argv[1] + '/build_tools/scripts')
|
||||
sys.path.append(sys.argv[1] + '/build_tools/scripts/develop')
|
||||
import build_js
|
||||
import run_server
|
||||
import config
|
||||
import base
|
||||
|
||||
git_dir = sys.argv[1];
|
||||
|
||||
base.print_info('argv :'+' '.join(sys.argv))
|
||||
base.cmd_in_dir(git_dir + '/build_tools/', 'python3', ['configure.py', '--develop', '1'] + sys.argv[2:])
|
||||
|
||||
base.cmd_in_dir(sys.argv[1] + '/build_tools/', 'python3', ['configure.py'])
|
||||
config.parse()
|
||||
config.parse_defaults()
|
||||
|
||||
if base.is_exist(git_dir + "/server/FileConverter/bin/fonts.log"):
|
||||
base.print_info('remove font cache to regenerate fonts in external sdkjs volume')
|
||||
base.delete_file(git_dir + "/server/FileConverter/bin/fonts.log");
|
||||
|
||||
# external server volume
|
||||
if base.is_exist(sys.argv[1] + '/server/DocService/package.json'):
|
||||
base.print_info('replace supervisor cfg to run docservice and converter from source')
|
||||
base.replaceInFileRE("/etc/supervisor/conf.d/ds-docservice.conf", "command=.*", "command=node " + git_dir + "/server/DocService/sources/server.js")
|
||||
base.replaceInFileRE("/app/ds/setup/config/supervisor/ds/ds-docservice.conf", "command=.*", "command=node " + git_dir + "/server/DocService/sources/server.js")
|
||||
base.replaceInFileRE("/etc/supervisor/conf.d/ds-converter.conf", "command=.*", "command=node " + git_dir + "/server/FileConverter/sources/convertermaster.js")
|
||||
base.replaceInFileRE("/app/ds/setup/config/supervisor/ds/ds-converter.conf", "command=.*", "command=node " + git_dir + "/server/FileConverter/sources/convertermaster.js")
|
||||
base.print_info('run_server.run_docker_server')
|
||||
run_server.run_docker_server();
|
||||
else:
|
||||
#Fix theme generation for external sdkjs volume
|
||||
if base.is_exist(git_dir + "/server/FileConverter/bin/DoctRenderer.config"):
|
||||
base.print_info('replace DoctRenderer.config for external sdkjs volume')
|
||||
base.generate_doctrenderer_config(git_dir + "/server/FileConverter/bin/DoctRenderer.config", "../../../sdkjs/deploy/", "server", "../../../web-apps/vendor/")
|
||||
|
||||
addons = {}
|
||||
addons.update(base.get_sdkjs_addons())
|
||||
addons.update(base.get_web_apps_addons())
|
||||
staticContent = ""
|
||||
for addon in addons:
|
||||
if (addon):
|
||||
staticContent += '"/' + addon + '": {"path": "/var/www/onlyoffice/documentserver/' + addon + '","options": {"maxAge": "7d"}},'
|
||||
|
||||
if staticContent:
|
||||
base.print_info('replace production-linux.json for addons'+staticContent)
|
||||
base.replaceInFileRE("/etc/onlyoffice/documentserver/production-linux.json", '"static_content": {.*', '"static_content": {' + staticContent)
|
||||
|
||||
base.print_info('replace supervisor cfg to run docservice and converter from pkg')
|
||||
base.replaceInFileRE("/etc/supervisor/conf.d/ds-docservice.conf", "command=node .*", "command=/var/www/onlyoffice/documentserver/server/DocService/docservice")
|
||||
base.replaceInFileRE("/app/ds/setup/config/supervisor/ds/ds-docservice.conf", "command=node .*", "command=/var/www/onlyoffice/documentserver/server/DocService/docservice")
|
||||
base.replaceInFileRE("/etc/supervisor/conf.d/ds-converter.conf", "command=node .*", "command=/var/www/onlyoffice/documentserver/server/FileConverter/converter")
|
||||
base.replaceInFileRE("/app/ds/setup/config/supervisor/ds/ds-converter.conf", "command=node .*", "command=/var/www/onlyoffice/documentserver/server/FileConverter/converter")
|
||||
base.print_info('run_server.run_docker_sdk_web_apps: ' + git_dir)
|
||||
run_server.run_docker_sdk_web_apps(git_dir)
|
||||
|
||||
build_js.build_js_develop(sys.argv[1])
|
||||
|
||||
5
make.py
5
make.py
@ -33,7 +33,7 @@ if ("1" != base.get_env("OO_RUNNING_BRANDING")) and ("" != config.option("brandi
|
||||
base.cmd("git", ["clone", config.option("branding-url"), branding_dir])
|
||||
|
||||
base.cmd_in_dir(branding_dir, "git", ["fetch"], True)
|
||||
|
||||
|
||||
if not is_exist or ("1" != config.option("update-light")):
|
||||
base.cmd_in_dir(branding_dir, "git", ["checkout", "-f", config.option("branch")], True)
|
||||
|
||||
@ -75,7 +75,8 @@ if config.check_option("module", "desktop"):
|
||||
|
||||
if "windows" == base.host_platform():
|
||||
config.extend_option("config", "updmodule")
|
||||
config.extend_option("qmake_addon", "LINK=https://download.onlyoffice.com/install/desktop/editors/windows/onlyoffice/appcast.json")
|
||||
base.set_env("DESKTOP_URL_UPDATES_MAIN_CHANNEL", "https://download.onlyoffice.com/install/desktop/editors/windows/onlyoffice/appcast.json")
|
||||
base.set_env("DESKTOP_URL_UPDATES_DEV_CHANNEL", "https://download.onlyoffice.com/install/desktop/editors/windows/onlyoffice/appcastdev.json")
|
||||
|
||||
|
||||
|
||||
|
||||
@ -64,6 +64,10 @@ utils.set_cwd(common.workspace_dir, verbose=True)
|
||||
utils.delete_file("deploy.json")
|
||||
if "core" in common.targets:
|
||||
package_core.make()
|
||||
if "closure-maps-os" in common.targets:
|
||||
package_core.deploy_closure_maps("opensource")
|
||||
if "closure-maps-com" in common.targets:
|
||||
package_core.deploy_closure_maps("commercial")
|
||||
if "desktop" in common.targets:
|
||||
package_desktop.make()
|
||||
if "builder" in common.targets:
|
||||
|
||||
110
scripts/base.py
110
scripts/base.py
@ -440,9 +440,10 @@ def set_cwd(dir):
|
||||
return
|
||||
|
||||
# git ---------------------------------------------------
|
||||
def git_update(repo, is_no_errors=False, is_current_dir=False):
|
||||
def git_update(repo, is_no_errors=False, is_current_dir=False, git_owner=""):
|
||||
print("[git] update: " + repo)
|
||||
url = "https://github.com/ONLYOFFICE/" + repo + ".git"
|
||||
owner = git_owner if git_owner else "ONLYOFFICE"
|
||||
url = "https://github.com/" + owner + "/" + repo + ".git"
|
||||
if config.option("git-protocol") == "ssh":
|
||||
url = "git@github.com:ONLYOFFICE/" + repo + ".git"
|
||||
folder = get_script_dir() + "/../../" + repo
|
||||
@ -769,7 +770,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 +783,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):
|
||||
@ -1287,17 +1297,16 @@ def copy_v8_files(core_dir, deploy_dir, platform, is_xp=False):
|
||||
if (-1 != config.option("config").find("use_javascript_core")):
|
||||
return
|
||||
directory_v8 = core_dir + "/Common/3dParty"
|
||||
|
||||
if is_xp:
|
||||
directory_v8 += "/v8/v8_xp"
|
||||
|
||||
if (-1 != config.option("config").lower().find("v8_version_89")) and not is_xp:
|
||||
directory_v8 += "/v8_89/v8/out.gn/"
|
||||
else:
|
||||
directory_v8 += "/v8/v8/out.gn/"
|
||||
|
||||
if is_xp:
|
||||
copy_files(directory_v8 + platform + "/release/icudt*.dll", deploy_dir + "/")
|
||||
return
|
||||
|
||||
if config.check_option("config", "v8_version_60"):
|
||||
directory_v8 += "/v8/v8/out.gn/"
|
||||
else:
|
||||
directory_v8 += "/v8_89/v8/out.gn/"
|
||||
|
||||
if (0 == platform.find("win")):
|
||||
copy_files(directory_v8 + platform + "/release/icudt*.dat", deploy_dir + "/")
|
||||
@ -1305,10 +1314,10 @@ def copy_v8_files(core_dir, deploy_dir, platform, is_xp=False):
|
||||
copy_files(directory_v8 + platform + "/icudt*.dat", deploy_dir + "/")
|
||||
return
|
||||
|
||||
def clone_marketplace_plugin(out_dir, is_name_as_guid=False):
|
||||
def clone_marketplace_plugin(out_dir, is_name_as_guid=False, is_replace_paths=False, is_delete_git_dir=True, git_owner=""):
|
||||
old_cur = os.getcwd()
|
||||
os.chdir(out_dir)
|
||||
git_update("onlyoffice.github.io", False, True)
|
||||
git_update("onlyoffice.github.io", False, True, git_owner)
|
||||
os.chdir(old_cur)
|
||||
|
||||
dst_dir_name = "marketplace"
|
||||
@ -1325,9 +1334,14 @@ def clone_marketplace_plugin(out_dir, is_name_as_guid=False):
|
||||
|
||||
if is_dir(dst_dir_path):
|
||||
delete_dir(dst_dir_path)
|
||||
|
||||
copy_dir(out_dir + "/onlyoffice.github.io/store/plugin", dst_dir_path)
|
||||
delete_dir_with_access_error(out_dir + "/onlyoffice.github.io")
|
||||
|
||||
if is_replace_paths:
|
||||
for file in glob.glob(dst_dir_path + "/*.html"):
|
||||
replaceInFile(file, "https://onlyoffice.github.io/sdkjs-plugins/", "../")
|
||||
|
||||
if is_delete_git_dir:
|
||||
delete_dir_with_access_error(out_dir + "/onlyoffice.github.io")
|
||||
return
|
||||
|
||||
def correctPathForBuilder(path):
|
||||
|
||||
@ -111,6 +111,9 @@ def make():
|
||||
def _run_npm(directory):
|
||||
return base.cmd_in_dir(directory, "npm", ["install"])
|
||||
|
||||
def _run_npm_ci(directory):
|
||||
return base.cmd_in_dir(directory, "npm", ["ci"])
|
||||
|
||||
def _run_npm_cli(directory):
|
||||
return base.cmd_in_dir(directory, "npm", ["install", "-g", "grunt-cli"])
|
||||
|
||||
@ -139,7 +142,7 @@ def build_sdk_desktop(directory):
|
||||
def build_sdk_builder(directory):
|
||||
#_run_npm_cli(directory)
|
||||
_run_npm(directory)
|
||||
_run_grunt(directory, get_build_param() + base.sdkjs_addons_param())
|
||||
_run_grunt(directory, get_build_param() + base.sdkjs_addons_param() + ["--map"])
|
||||
return
|
||||
|
||||
def build_sdk_native(directory, minimize=True):
|
||||
@ -154,7 +157,7 @@ def build_js_develop(root_dir):
|
||||
if (external_folder != ""):
|
||||
external_folder = "/" + external_folder
|
||||
|
||||
_run_npm(root_dir + external_folder + "/sdkjs/build")
|
||||
_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())
|
||||
_run_npm(root_dir + external_folder + "/web-apps/build")
|
||||
|
||||
@ -69,23 +69,19 @@ def parse():
|
||||
if check_option("platform", "android"):
|
||||
options["platform"] += " android_arm64_v8a android_armv7 android_x86 android_x86_64"
|
||||
|
||||
#if check_option("platform", "ios"):
|
||||
# extend_option("config", "core_ios_32")
|
||||
|
||||
# check vs-version
|
||||
if ("" == option("vs-version")):
|
||||
options["vs-version"] = "2015"
|
||||
|
||||
# enable v8 8.9 version, if compiler support sources
|
||||
if ("linux" == host_platform) and (5004 <= base.get_gcc_version()) and not check_option("platform", "android"):
|
||||
extend_option("config", "v8_version_89")
|
||||
if ("windows" == host_platform) and ("" == option("vs-version")):
|
||||
options["vs-version"] = "2019"
|
||||
if check_option("platform", "win_64_xp") or check_option("platform", "win_32_xp"):
|
||||
options["vs-version"] = "2015"
|
||||
|
||||
if ("windows" == host_platform) and ("2019" == option("vs-version")):
|
||||
extend_option("config", "v8_version_89")
|
||||
extend_option("config", "vs2019")
|
||||
extend_option("config", "vs2019")
|
||||
|
||||
if check_option("platform", "linux_arm64"):
|
||||
extend_option("config", "v8_version_89")
|
||||
if is_cef_107():
|
||||
extend_option("config", "cef_version_107")
|
||||
if is_v8_60():
|
||||
extend_option("config", "v8_version_60")
|
||||
|
||||
# check vs-path
|
||||
if ("windows" == host_platform) and ("" == option("vs-path")):
|
||||
@ -115,6 +111,14 @@ def parse():
|
||||
if not check_option("config", "bundle_dylibs"):
|
||||
extend_option("config", "bundle_dylibs")
|
||||
|
||||
if check_option("use-system-qt", "1"):
|
||||
base.cmd_in_dir(base.get_script_dir() + "/../tools/linux", "python", ["use_system_qt.py"])
|
||||
options["qt-dir"] = base.get_script_dir() + "/../tools/linux/system_qt"
|
||||
|
||||
# disable all warnings (enable if needed with core_enable_all_warnings options)
|
||||
if not check_option("config", "core_enable_all_warnings"):
|
||||
extend_option("config", "core_disable_all_warnings")
|
||||
|
||||
return
|
||||
|
||||
def check_compiler(platform):
|
||||
@ -211,3 +215,26 @@ def parse_defaults():
|
||||
else:
|
||||
options[name] = defaults_options[name]
|
||||
return
|
||||
|
||||
def is_cef_107():
|
||||
if ("linux" == base.host_platform()) and (5004 > base.get_gcc_version()) and not check_option("platform", "android"):
|
||||
return True
|
||||
return False
|
||||
|
||||
def is_v8_60():
|
||||
if check_option("platform", "linux_arm64"):
|
||||
return False
|
||||
|
||||
if ("linux" == base.host_platform()) and (5004 > base.get_gcc_version()) and not check_option("platform", "android"):
|
||||
return True
|
||||
|
||||
if check_option("platform", "android"):
|
||||
return True
|
||||
|
||||
if ("windows" == base.host_platform()) and ("2015" == option("vs-version")):
|
||||
return True
|
||||
|
||||
if check_option("config", "use_v8"):
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
@ -20,7 +20,7 @@ import hunspell
|
||||
import glew
|
||||
import harfbuzz
|
||||
import hyphen
|
||||
import socket_io
|
||||
import googletest
|
||||
|
||||
def check_android_ndk_macos_arm(dir):
|
||||
if base.is_dir(dir + "/darwin-x86_64") and not base.is_dir(dir + "/darwin-arm64"):
|
||||
@ -45,9 +45,10 @@ def make():
|
||||
harfbuzz.make()
|
||||
glew.make()
|
||||
hyphen.make()
|
||||
socket_io.make()
|
||||
googletest.make()
|
||||
|
||||
if config.check_option("module", "mobile"):
|
||||
curl.make()
|
||||
if (config.check_option("platform", "android")):
|
||||
curl.make()
|
||||
websocket.make()
|
||||
return
|
||||
|
||||
@ -73,6 +73,8 @@ def make():
|
||||
win_toolset = "msvc-14.2"
|
||||
win_boot_arg = "vc142"
|
||||
win_vs_version = "vc142"
|
||||
|
||||
# add "define=_ITERATOR_DEBUG_LEVEL=0" to b2 args before install for disable _ITERATOR_DEBUG_LEVEL
|
||||
if (-1 != config.option("platform").find("win_64")) and not base.is_file("../build/win_64/lib/libboost_system-" + win_vs_version + "-mt-x64-1_72.lib"):
|
||||
base.cmd("bootstrap.bat", [win_boot_arg])
|
||||
base.cmd("b2.exe", ["headers"])
|
||||
|
||||
@ -15,54 +15,69 @@ def make():
|
||||
|
||||
platforms = ["win_64", "win_32", "win_64_xp", "win_32_xp", "linux_64", "linux_32", "mac_64", "mac_arm64"]
|
||||
|
||||
url = "http://d2ettrnqo7v976.cloudfront.net/cef/4280/"
|
||||
|
||||
for platform in platforms:
|
||||
if not config.check_option("platform", platform):
|
||||
continue
|
||||
|
||||
url = "http://d2ettrnqo7v976.cloudfront.net/cef/"
|
||||
archive_name = "./cef_binary.7z"
|
||||
|
||||
if (-1 != platform.find("_xp")):
|
||||
url += "4280/"
|
||||
archive_name = "./cef_binary_xp.7z"
|
||||
elif (config.check_option("config", "cef_version_107")):
|
||||
url += "5304/"
|
||||
archive_name = "./cef_binary_107.7z"
|
||||
else:
|
||||
url += "5414/"
|
||||
|
||||
url_platform = (url + platform + "/cef_binary.7z")
|
||||
archive_name_data = archive_name + ".data"
|
||||
|
||||
if not base.is_dir(platform):
|
||||
base.create_dir(platform)
|
||||
|
||||
os.chdir(platform)
|
||||
|
||||
|
||||
data_url = base.get_file_last_modified_url(url_platform)
|
||||
old_data_url = base.readFile("./cef_binary.7z.data")
|
||||
old_data_url = base.readFile(archive_name_data)
|
||||
|
||||
build_dir_name = "build"
|
||||
if (0 == platform.find("linux")) and (config.check_option("config", "cef_version_107")):
|
||||
build_dir_name = "build_107"
|
||||
|
||||
if (data_url != old_data_url):
|
||||
if base.is_file("./cef_binary.7z"):
|
||||
base.delete_file("./cef_binary.7z")
|
||||
if base.is_dir("build"):
|
||||
base.delete_dir("build")
|
||||
if base.is_file(archive_name):
|
||||
base.delete_file(archive_name)
|
||||
if base.is_dir(build_dir_name):
|
||||
base.delete_dir(build_dir_name)
|
||||
|
||||
if base.is_dir("build"):
|
||||
if base.is_dir(build_dir_name):
|
||||
os.chdir(base_dir)
|
||||
continue
|
||||
|
||||
# download
|
||||
if not base.is_file("./cef_binary.7z"):
|
||||
base.download(url_platform, "./cef_binary.7z")
|
||||
if not base.is_file(archive_name):
|
||||
base.download(url_platform, archive_name)
|
||||
|
||||
# extract
|
||||
base.extract("./cef_binary.7z", "./")
|
||||
base.extract(archive_name, "./")
|
||||
|
||||
base.delete_file("./cef_binary.7z.data")
|
||||
base.writeFile("./cef_binary.7z.data", data_url)
|
||||
base.delete_file(archive_name_data)
|
||||
base.writeFile(archive_name_data, data_url)
|
||||
|
||||
base.create_dir("./build")
|
||||
base.create_dir("./" + build_dir_name)
|
||||
|
||||
# deploy
|
||||
if (0 != platform.find("mac")):
|
||||
base.copy_files("cef_binary/Release/*", "build/")
|
||||
base.copy_files("cef_binary/Resources/*", "build/")
|
||||
|
||||
if (0 == platform.find("linux")):
|
||||
base.cmd("chmod", ["a+xr", "build/locales"])
|
||||
|
||||
if (0 == platform.find("mac")):
|
||||
base.cmd("mv", ["Chromium Embedded Framework.framework", "build/Chromium Embedded Framework.framework"])
|
||||
base.delete_dir("./Chromium Embedded Framework.framework")
|
||||
else:
|
||||
base.copy_files("cef_binary/Release/*", build_dir_name + "/")
|
||||
base.copy_files("cef_binary/Resources/*", build_dir_name + "/")
|
||||
if (0 == platform.find("linux")):
|
||||
base.cmd("chmod", ["a+xr", build_dir_name + "/locales"])
|
||||
base.delete_dir("./cef_binary")
|
||||
|
||||
os.chdir(base_dir)
|
||||
|
||||
|
||||
19
scripts/core_common/modules/googletest.py
Normal file
19
scripts/core_common/modules/googletest.py
Normal file
@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
sys.path.append('../..')
|
||||
import base
|
||||
import os
|
||||
|
||||
def make():
|
||||
print("[fetch]: googletest")
|
||||
|
||||
base_dir = base.get_script_dir() + "/../../core/Common/3dParty/googletest"
|
||||
old_cur = os.getcwd()
|
||||
os.chdir(base_dir)
|
||||
|
||||
if not base.is_dir("googletest"):
|
||||
base.cmd("git", ["clone", "https://github.com/google/googletest.git", "-b", "v1.13.0"])
|
||||
|
||||
os.chdir(old_cur)
|
||||
return
|
||||
@ -66,6 +66,7 @@ def make():
|
||||
base.create_dir(base_dir + "/icu/cross_build")
|
||||
os.chdir("icu/cross_build")
|
||||
base.cmd("./../source/runConfigureICU", ["Linux", "--prefix=" + base_dir + "/icu/cross_build_install"])
|
||||
base.replaceInFile("./../source/icudefs.mk.in", "LDFLAGS = @LDFLAGS@ $(RPATHLDFLAGS)", "LDFLAGS = @LDFLAGS@ $(RPATHLDFLAGS) -static-libstdc++ -static-libgcc")
|
||||
base.cmd("make", ["-j4"])
|
||||
base.cmd("make", ["install"], True)
|
||||
base.create_dir(base_dir + "/linux_64")
|
||||
|
||||
@ -19,15 +19,16 @@ def make():
|
||||
|
||||
print("[fetch & build]: openssl")
|
||||
|
||||
if (-1 != config.option("platform").find("android") or -1 != config.option("platform").find("ios")):
|
||||
openssl_mobile.make()
|
||||
return
|
||||
|
||||
base_dir = base.get_script_dir() + "/../../core/Common/3dParty/openssl"
|
||||
old_cur = os.getcwd()
|
||||
os.chdir(base_dir)
|
||||
|
||||
base.common_check_version("openssl", "3", clean)
|
||||
base.common_check_version("openssl", "4", clean)
|
||||
|
||||
if (-1 != config.option("platform").find("android") or -1 != config.option("platform").find("ios")):
|
||||
os.chdir(old_cur)
|
||||
openssl_mobile.make()
|
||||
return
|
||||
|
||||
if not base.is_dir("openssl"):
|
||||
base.cmd("git", ["clone", "--depth=1", "--branch", "OpenSSL_1_1_1f", "https://github.com/openssl/openssl.git"])
|
||||
@ -41,7 +42,7 @@ def make():
|
||||
base.create_dir("./../build/win_64")
|
||||
qmake_bat = []
|
||||
qmake_bat.append("call \"" + config.option("vs-path") + "/vcvarsall.bat\" x64")
|
||||
qmake_bat.append("perl Configure VC-WIN64A --prefix=" + old_cur_dir + "\\build\\win_64 --openssldir=" + old_cur_dir + "\\build\\win_64 no-shared no-asm")
|
||||
qmake_bat.append("perl Configure VC-WIN64A --prefix=" + old_cur_dir + "\\build\\win_64 --openssldir=" + old_cur_dir + "\\build\\win_64 no-shared no-asm enable-md2")
|
||||
qmake_bat.append("call nmake clean")
|
||||
qmake_bat.append("call nmake build_libs install")
|
||||
base.run_as_bat(qmake_bat, True)
|
||||
@ -49,7 +50,7 @@ def make():
|
||||
base.create_dir("./../build/win_32")
|
||||
qmake_bat = []
|
||||
qmake_bat.append("call \"" + config.option("vs-path") + "/vcvarsall.bat\" x86")
|
||||
qmake_bat.append("perl Configure VC-WIN32 --prefix=" + old_cur_dir + "\\build\\win_32 --openssldir=" + old_cur_dir + "\\build\\win_32 no-shared no-asm")
|
||||
qmake_bat.append("perl Configure VC-WIN32 --prefix=" + old_cur_dir + "\\build\\win_32 --openssldir=" + old_cur_dir + "\\build\\win_32 no-shared no-asm enable-md2")
|
||||
qmake_bat.append("call nmake clean")
|
||||
qmake_bat.append("call nmake build_libs install")
|
||||
base.run_as_bat(qmake_bat, True)
|
||||
@ -62,7 +63,7 @@ def make():
|
||||
base.create_dir("./../build/win_64_xp")
|
||||
qmake_bat = []
|
||||
qmake_bat.append("call \"" + config.option("vs-path") + "/vcvarsall.bat\" x64")
|
||||
qmake_bat.append("perl Configure VC-WIN64A --prefix=" + old_cur_dir + "\\build\\win_64_xp --openssldir=" + old_cur_dir + "\\build\\win_64_xp no-shared no-asm no-async")
|
||||
qmake_bat.append("perl Configure VC-WIN64A --prefix=" + old_cur_dir + "\\build\\win_64_xp --openssldir=" + old_cur_dir + "\\build\\win_64_xp no-shared no-asm no-async enable-md2")
|
||||
qmake_bat.append("call nmake clean")
|
||||
qmake_bat.append("call nmake build_libs install")
|
||||
base.run_as_bat(qmake_bat, True)
|
||||
@ -70,7 +71,7 @@ def make():
|
||||
base.create_dir("./../build/win_32_xp")
|
||||
qmake_bat = []
|
||||
qmake_bat.append("call \"" + config.option("vs-path") + "/vcvarsall.bat\" x86")
|
||||
qmake_bat.append("perl Configure VC-WIN32 --prefix=" + old_cur_dir + "\\build\\win_32_xp --openssldir=" + old_cur_dir + "\\build\\win_32_xp no-shared no-asm no-async")
|
||||
qmake_bat.append("perl Configure VC-WIN32 --prefix=" + old_cur_dir + "\\build\\win_32_xp --openssldir=" + old_cur_dir + "\\build\\win_32_xp no-shared no-asm no-async enable-md2")
|
||||
qmake_bat.append("call nmake clean")
|
||||
qmake_bat.append("call nmake build_libs install")
|
||||
base.run_as_bat(qmake_bat, True)
|
||||
@ -79,7 +80,7 @@ def make():
|
||||
return
|
||||
|
||||
if (-1 != config.option("platform").find("linux")) and not base.is_dir("../build/linux_64"):
|
||||
base.cmd("./config", ["no-shared", "no-asm", "--prefix=" + old_cur_dir + "/build/linux_64", "--openssldir=" + old_cur_dir + "/build/linux_64"])
|
||||
base.cmd("./config", ["enable-md2", "no-shared", "no-asm", "--prefix=" + old_cur_dir + "/build/linux_64", "--openssldir=" + old_cur_dir + "/build/linux_64"])
|
||||
base.replaceInFile("./Makefile", "CFLAGS=-Wall -O3", "CFLAGS=-Wall -O3 -fvisibility=hidden")
|
||||
base.replaceInFile("./Makefile", "CXXFLAGS=-Wall -O3", "CXXFLAGS=-Wall -O3 -fvisibility=hidden")
|
||||
base.cmd("make")
|
||||
@ -94,14 +95,14 @@ def make():
|
||||
if ("" == cross_compiler_arm64):
|
||||
cross_compiler_arm64 = "/usr/bin"
|
||||
cross_compiler_arm64_prefix = cross_compiler_arm64 + "/" + base.get_prefix_cross_compiler_arm64()
|
||||
base.cmd("./Configure", ["linux-aarch64", "--cross-compile-prefix=" + cross_compiler_arm64_prefix, "no-shared", "no-asm", "no-tests", "--prefix=" + old_cur_dir + "/build/linux_arm64", "--openssldir=" + old_cur_dir + "/build/linux_arm64"])
|
||||
base.cmd("./Configure", ["linux-aarch64", "--cross-compile-prefix=" + cross_compiler_arm64_prefix, "enable-md2", "no-shared", "no-asm", "no-tests", "--prefix=" + old_cur_dir + "/build/linux_arm64", "--openssldir=" + old_cur_dir + "/build/linux_arm64"])
|
||||
base.replaceInFile("./Makefile", "CFLAGS=-Wall -O3", "CFLAGS=-Wall -O3 -fvisibility=hidden")
|
||||
base.replaceInFile("./Makefile", "CXXFLAGS=-Wall -O3", "CXXFLAGS=-Wall -O3 -fvisibility=hidden")
|
||||
base.cmd("make", [], True)
|
||||
base.cmd("make", ["install"], True)
|
||||
|
||||
if (-1 != config.option("platform").find("mac")) and not base.is_dir("../build/mac_64"):
|
||||
base.cmd("./Configure", ["no-shared", "no-asm", "darwin64-x86_64-cc", "--prefix=" + old_cur_dir + "/build/mac_64", "--openssldir=" + old_cur_dir + "/build/mac_64", "-mmacosx-version-min=10.11"])
|
||||
base.cmd("./Configure", ["enable-md2", "no-shared", "no-asm", "darwin64-x86_64-cc", "--prefix=" + old_cur_dir + "/build/mac_64", "--openssldir=" + old_cur_dir + "/build/mac_64", "-mmacosx-version-min=10.11"])
|
||||
base.cmd("make", ["build_libs", "install"])
|
||||
|
||||
if (-1 != config.option("platform").find("mac")) and not base.is_dir("../build/mac_arm64"):
|
||||
@ -119,7 +120,7 @@ def make():
|
||||
},\n\
|
||||
\"darwin64-x86_64-cc\" => {"
|
||||
base.replaceInFile(base_dir + "/openssl2/Configurations/10-main.conf", replace1, replace2)
|
||||
base.cmd("./Configure", ["no-shared", "no-asm", "darwin64-arm64-cc", "--prefix=" + old_cur_dir + "/build/mac_arm64", "--openssldir=" + old_cur_dir + "/build/mac_arm64"])
|
||||
base.cmd("./Configure", ["enable-md2", "no-shared", "no-asm", "darwin64-arm64-cc", "--prefix=" + old_cur_dir + "/build/mac_arm64", "--openssldir=" + old_cur_dir + "/build/mac_arm64"])
|
||||
base.cmd("make", ["build_libs", "install"])
|
||||
|
||||
os.chdir(old_cur)
|
||||
|
||||
@ -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
|
||||
|
||||
@ -68,9 +68,9 @@ def make():
|
||||
if ("mac" == base.host_platform()) and (-1 == config.option("config").find("use_v8")):
|
||||
return
|
||||
|
||||
use_v8_89 = False
|
||||
if (-1 != config.option("config").lower().find("v8_version_89")):
|
||||
use_v8_89 = True
|
||||
use_v8_89 = True
|
||||
if config.check_option("config", "v8_version_60"):
|
||||
use_v8_89 = False
|
||||
|
||||
if (use_v8_89):
|
||||
v8_89.make()
|
||||
@ -179,6 +179,7 @@ def make():
|
||||
base.cmd2("gn", ["gen", "out.gn/mac_64", "--args=\"is_debug=false " + base_args64 + "\""])
|
||||
base.cmd("ninja", ["-C", "out.gn/mac_64"])
|
||||
|
||||
# add enable_iterator_debugging=false for disable _ITERATOR_DEBUG_LEVEL
|
||||
if config.check_option("platform", "win_64"):
|
||||
if (-1 != config.option("config").lower().find("debug")):
|
||||
base.cmd2("gn", ["gen", "out.gn/win_64/debug", "--args=\"is_debug=true " + base_args64 + " is_clang=false\""])
|
||||
@ -265,6 +266,7 @@ def make_xp():
|
||||
" replaceInFile(file, '<RuntimeLibrary>MultiThreaded</RuntimeLibrary>', '<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>')",
|
||||
]);
|
||||
|
||||
# add "SET CL=\"/D_ITERATOR_DEBUG_LEVEL=0\"" before devenv for disable _ITERATOR_DEBUG_LEVEL in debug
|
||||
if config.check_option("platform", "win_64_xp"):
|
||||
if not base.is_dir("win_64/release"):
|
||||
base.run_as_bat(["call python v8/build/gyp_v8 -Dtarget_arch=x64", "call python v8/build/common_xp.py", "call devenv v8/tools/gyp/v8.sln /Rebuild Release"])
|
||||
|
||||
37
scripts/core_common/modules/v8_89.patch
Normal file
37
scripts/core_common/modules/v8_89.patch
Normal file
@ -0,0 +1,37 @@
|
||||
class StrongRootBlockAllocator {
|
||||
public:
|
||||
using pointer = Address*;
|
||||
using const_pointer = const Address*;
|
||||
using reference = Address&;
|
||||
using const_reference = const Address&;
|
||||
using value_type = Address;
|
||||
using size_type = size_t;
|
||||
using difference_type = ptrdiff_t;
|
||||
template <class U>
|
||||
struct rebind;
|
||||
|
||||
explicit StrongRootBlockAllocator(Heap* heap) : heap_(heap) {}
|
||||
|
||||
Address* allocate(size_t n);
|
||||
void deallocate(Address* p, size_t n) noexcept;
|
||||
|
||||
private:
|
||||
Heap* heap_;
|
||||
};
|
||||
|
||||
// Rebinding to Address gives another StrongRootBlockAllocator.
|
||||
template <>
|
||||
struct StrongRootBlockAllocator::rebind<Address> {
|
||||
using other = StrongRootBlockAllocator;
|
||||
};
|
||||
|
||||
// Rebinding to something other than Address gives a std::allocator that
|
||||
// is copy-constructable from StrongRootBlockAllocator.
|
||||
template <class U>
|
||||
struct StrongRootBlockAllocator::rebind {
|
||||
class other : public std::allocator<U> {
|
||||
public:
|
||||
// NOLINTNEXTLINE
|
||||
other(const StrongRootBlockAllocator&) {}
|
||||
};
|
||||
};
|
||||
@ -24,6 +24,8 @@ def make_args(args, platform, is_64=True, is_debug=False):
|
||||
|
||||
if is_debug:
|
||||
args_copy.append("is_debug=true")
|
||||
if (platform == "windows"):
|
||||
args_copy.append("enable_iterator_debugging=true")
|
||||
else:
|
||||
args_copy.append("is_debug=false")
|
||||
|
||||
@ -31,7 +33,7 @@ def make_args(args, platform, is_64=True, is_debug=False):
|
||||
args_copy.append("is_clang=true")
|
||||
args_copy.append("use_sysroot=false")
|
||||
if (platform == "windows"):
|
||||
args_copy.append("is_clang=false")
|
||||
args_copy.append("is_clang=false")
|
||||
|
||||
return "--args=\"" + " ".join(args_copy) + "\""
|
||||
|
||||
@ -50,6 +52,28 @@ def ninja_windows_make(args, is_64=True, is_debug=False):
|
||||
base.move_file("./" + directory_out + "/obj/v8_wrappers.ninja.bak", "./" + directory_out + "/obj/v8_wrappers.ninja")
|
||||
return
|
||||
|
||||
# patch v8 for build ---------------------------------------------------
|
||||
def patch_windows_debug():
|
||||
# v8 8.9 version does not built with enable_iterator_debugging flag
|
||||
# patch heap.h file:
|
||||
file_patch = "./src/heap/heap.h"
|
||||
base.copy_file(file_patch, file_patch + ".bak")
|
||||
content_old = base.readFile(file_patch)
|
||||
posStart = content_old.find("class StrongRootBlockAllocator {")
|
||||
posEnd = content_old.find("};", posStart + 1)
|
||||
posEnd = content_old.find("};", posEnd + 1)
|
||||
content = content_old[0:posStart]
|
||||
content += base.readFile("./../../../../../build_tools/scripts/core_common/modules/v8_89.patch")
|
||||
content += content_old[posEnd + 2:]
|
||||
base.writeFile(file_patch, content)
|
||||
return
|
||||
|
||||
def unpatch_windows_debug():
|
||||
file_patch = "./src/heap/heap.h"
|
||||
base.move_file(file_patch + ".bak", file_patch)
|
||||
return
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
def make():
|
||||
old_env = dict(os.environ)
|
||||
old_cur = os.getcwd()
|
||||
@ -70,12 +94,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")
|
||||
@ -83,6 +109,10 @@ def make():
|
||||
if not base.is_file("v8/src/base/platform/wrappers.cc"):
|
||||
base.writeFile("v8/src/base/platform/wrappers.cc", "#include \"src/base/platform/wrappers.h\"\n")
|
||||
|
||||
if not base.is_file("v8/third_party/jinja2/tests.py.bak"):
|
||||
base.copy_file("v8/third_party/jinja2/tests.py", "v8/third_party/jinja2/tests.py.bak")
|
||||
base.replaceInFile("v8/third_party/jinja2/tests.py", "from collections import Mapping", "try:\n from collections.abc import Mapping\nexcept ImportError:\n from collections import Mapping")
|
||||
|
||||
os.chdir("v8")
|
||||
|
||||
gn_args = ["v8_static_library=true",
|
||||
@ -112,7 +142,9 @@ def make():
|
||||
if config.check_option("platform", "win_64"):
|
||||
if (-1 != config.option("config").lower().find("debug")):
|
||||
if not base.is_file("out.gn/win_64/debug/obj/v8_monolith.lib"):
|
||||
patch_windows_debug()
|
||||
ninja_windows_make(gn_args, True, True)
|
||||
unpatch_windows_debug()
|
||||
|
||||
if not base.is_file("out.gn/win_64/release/obj/v8_monolith.lib"):
|
||||
ninja_windows_make(gn_args)
|
||||
@ -120,7 +152,9 @@ def make():
|
||||
if config.check_option("platform", "win_32"):
|
||||
if (-1 != config.option("config").lower().find("debug")):
|
||||
if not base.is_file("out.gn/win_32/debug/obj/v8_monolith.lib"):
|
||||
patch_windows_debug()
|
||||
ninja_windows_make(gn_args, False, True)
|
||||
unpatch_windows_debug()
|
||||
|
||||
if not base.is_file("out.gn/win_32/release/obj/v8_monolith.lib"):
|
||||
ninja_windows_make(gn_args, False)
|
||||
|
||||
@ -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
|
||||
|
||||
@ -51,8 +51,8 @@ def make():
|
||||
else:
|
||||
base.copy_exe(core_build_dir + "/bin/" + platform_postfix, root_dir, "x2t")
|
||||
|
||||
if (native_platform == "linux_64"):
|
||||
base.generate_check_linux_system(git_dir + "/build_tools", root_dir)
|
||||
#if (native_platform == "linux_64"):
|
||||
# base.generate_check_linux_system(git_dir + "/build_tools", root_dir)
|
||||
|
||||
# icu
|
||||
if (0 == platform.find("win")):
|
||||
@ -92,6 +92,8 @@ def make():
|
||||
base.create_dir(root_dir + "/include")
|
||||
base.copy_file(core_dir + "/DesktopEditor/doctrenderer/common_deploy.h", root_dir + "/include/common.h")
|
||||
base.copy_file(core_dir + "/DesktopEditor/doctrenderer/docbuilder.h", root_dir + "/include/docbuilder.h")
|
||||
if (0 == platform.find("win")):
|
||||
base.copy_file(core_dir + "/DesktopEditor/doctrenderer/docbuilder.com/src/docbuilder_midl.h", root_dir + "/include/docbuilder_midl.h")
|
||||
base.replaceInFile(root_dir + "/include/docbuilder.h", "Q_DECL_EXPORT", "BUILDING_DOCBUILDER")
|
||||
|
||||
if ("win_64" == platform):
|
||||
|
||||
@ -4,6 +4,33 @@ import config
|
||||
import base
|
||||
import os
|
||||
import platform
|
||||
import glob
|
||||
|
||||
def deploy_marketplace_plugin(git_dir, root_dir):
|
||||
# old manager
|
||||
#base.copy_sdkjs_plugin(git_dir + "/desktop-sdk/ChromiumBasedEditors/plugins", root_dir + "/editors/sdkjs-plugins", "manager", True)
|
||||
|
||||
# plugin manager with local paths
|
||||
sys_plugins_dir = root_dir + "/editors/sdkjs-plugins"
|
||||
base.clone_marketplace_plugin(sys_plugins_dir, True, True, False, "K0R0L")
|
||||
|
||||
# store with local paths
|
||||
manager_dir = sys_plugins_dir + "/{AA2EA9B6-9EC2-415F-9762-634EE8D9A95E}"
|
||||
|
||||
store_dir_path = manager_dir + "/store"
|
||||
if base.is_dir(store_dir_path):
|
||||
base.delete_dir(store_dir_path)
|
||||
base.create_dir(store_dir_path)
|
||||
|
||||
base.copy_dir_content(sys_plugins_dir + "/onlyoffice.github.io/store", store_dir_path, "", ".git")
|
||||
base.delete_dir(store_dir_path + "/plugin")
|
||||
base.delete_file(store_dir_path + "/build.bat")
|
||||
|
||||
for file in glob.glob(store_dir_path + "/*.html"):
|
||||
base.replaceInFile(file, "https://onlyoffice.github.io/sdkjs-plugins/", "../../")
|
||||
|
||||
base.delete_dir_with_access_error(sys_plugins_dir + "/onlyoffice.github.io")
|
||||
return
|
||||
|
||||
def make():
|
||||
base_dir = base.get_script_dir() + "/../out"
|
||||
@ -55,21 +82,20 @@ def make():
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "Fb2File")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "EpubFile")
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "DocxRenderer")
|
||||
base.copy_file(git_dir + "/sdkjs/pdf/src/engine/cmap.bin", root_dir + "/cmap.bin")
|
||||
|
||||
|
||||
if ("ios" == platform):
|
||||
base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "x2t")
|
||||
else:
|
||||
base.copy_exe(core_build_dir + "/bin/" + platform_postfix, root_dir + "/converter", "x2t")
|
||||
|
||||
if (native_platform == "linux_64"):
|
||||
base.generate_check_linux_system(git_dir + "/build_tools", root_dir + "/converter")
|
||||
#if (native_platform == "linux_64"):
|
||||
# base.generate_check_linux_system(git_dir + "/build_tools", root_dir + "/converter")
|
||||
|
||||
# icu
|
||||
if (0 == platform.find("win")):
|
||||
base.copy_file(core_dir + "/Common/3dParty/icu/" + platform + "/build/icudt58.dll", root_dir + "/converter/icudt58.dll")
|
||||
base.copy_file(core_dir + "/Common/3dParty/icu/" + platform + "/build/icuuc58.dll", root_dir + "/converter/icuuc58.dll")
|
||||
base.copy_file(git_dir + "/desktop-apps/common/converter/package.config", root_dir + "/converter/package.config")
|
||||
#base.copy_file(git_dir + "/desktop-apps/common/converter/package.config", root_dir + "/converter/package.config")
|
||||
|
||||
if (0 == platform.find("linux")):
|
||||
base.copy_file(core_dir + "/Common/3dParty/icu/" + platform + "/build/libicudata.so.58", root_dir + "/converter/libicudata.so.58")
|
||||
@ -97,10 +123,14 @@ def make():
|
||||
base.copy_file(git_dir + "/desktop-apps/common/package/license/3dparty/3DPARTYLICENSE", root_dir + "/3DPARTYLICENSE")
|
||||
|
||||
# cef
|
||||
build_dir_name = "build"
|
||||
if (0 == platform.find("linux")) and (config.check_option("config", "cef_version_107")):
|
||||
build_dir_name = "build_107"
|
||||
|
||||
if not isWindowsXP:
|
||||
base.copy_files(core_dir + "/Common/3dParty/cef/" + platform + "/build/*", root_dir)
|
||||
base.copy_files(core_dir + "/Common/3dParty/cef/" + platform + "/" + build_dir_name + "/*", root_dir)
|
||||
else:
|
||||
base.copy_files(core_dir + "/Common/3dParty/cef/" + native_platform + "/build/*", root_dir)
|
||||
base.copy_files(core_dir + "/Common/3dParty/cef/" + native_platform + "/" + build_dir_name + "/*", root_dir)
|
||||
|
||||
isUseQt = True
|
||||
if (0 == platform.find("mac")) or (0 == platform.find("ios")):
|
||||
@ -152,6 +182,8 @@ def make():
|
||||
|
||||
if (0 == platform.find("win")):
|
||||
base.copy_file(git_dir + "/desktop-apps/win-linux/extras/projicons/" + apps_postfix + "/projicons.exe", root_dir + "/DesktopEditors.exe")
|
||||
if not isWindowsXP:
|
||||
base.copy_file(git_dir + "/desktop-apps/win-linux/extras/update-daemon/" + apps_postfix + "/updatesvc.exe", root_dir + "/updatesvc.exe")
|
||||
base.copy_file(git_dir + "/desktop-apps/win-linux/" + apps_postfix + "/DesktopEditors.exe", root_dir + "/editors.exe")
|
||||
base.copy_file(git_dir + "/desktop-apps/win-linux/res/icons/desktopeditors.ico", root_dir + "/app.ico")
|
||||
elif (0 == platform.find("linux")):
|
||||
@ -190,16 +222,14 @@ def make():
|
||||
root_help_dir = root_dir + "-help"
|
||||
if (base.is_dir(root_help_dir)):
|
||||
base.delete_dir(root_help_dir)
|
||||
for i in ["documenteditor", "presentationeditor", "spreadsheeteditor"]:
|
||||
for i in ["common", "documenteditor", "presentationeditor", "spreadsheeteditor"]:
|
||||
base.copy_dir(
|
||||
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") 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")
|
||||
base.delete_dir(root_dir + "/editors/web-apps/apps/spreadsheeteditor/main/resources/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/%s/main/resources/help" % i)
|
||||
|
||||
base.create_dir(root_dir + "/editors/sdkjs-plugins")
|
||||
base.copy_sdkjs_plugins(root_dir + "/editors/sdkjs-plugins", True, True)
|
||||
@ -214,14 +244,20 @@ def make():
|
||||
base.download("https://onlyoffice.github.io/sdkjs-plugins/v1/plugins.css", root_dir + "/editors/sdkjs-plugins/v1/plugins.css")
|
||||
base.support_old_versions_plugins(root_dir + "/editors/sdkjs-plugins")
|
||||
|
||||
base.copy_sdkjs_plugin(git_dir + "/desktop-sdk/ChromiumBasedEditors/plugins", root_dir + "/editors/sdkjs-plugins", "manager", True)
|
||||
base.copy_sdkjs_plugin(git_dir + "/desktop-sdk/ChromiumBasedEditors/plugins/encrypt", root_dir + "/editors/sdkjs-plugins", "advanced2", True)
|
||||
#base.copy_dir(git_dir + "/desktop-sdk/ChromiumBasedEditors/plugins/encrypt/ui/common/{14A8FC87-8E26-4216-B34E-F27F053B2EC4}", root_dir + "/editors/sdkjs-plugins/{14A8FC87-8E26-4216-B34E-F27F053B2EC4}")
|
||||
#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)
|
||||
|
||||
|
||||
deploy_marketplace_plugin(git_dir, root_dir)
|
||||
|
||||
base.copy_file(base_dir + "/js/" + branding + "/desktop/index.html", root_dir + "/index.html")
|
||||
base.copy_dir(git_dir + "/desktop-apps/common/loginpage/providers", root_dir + "/providers")
|
||||
|
||||
if isWindowsXP:
|
||||
base.create_dir(root_dir + "/providers")
|
||||
base.copy_dir(git_dir + "/desktop-apps/common/loginpage/providers/onlyoffice", root_dir + "/providers/onlyoffice")
|
||||
else:
|
||||
base.copy_dir(git_dir + "/desktop-apps/common/loginpage/providers", root_dir + "/providers")
|
||||
|
||||
isUseJSC = False
|
||||
if (0 == platform.find("mac")):
|
||||
|
||||
@ -87,8 +87,8 @@ def make():
|
||||
base.copy_file(git_dir + "/sdkjs/pdf/src/engine/cmap.bin", converter_dir + "/cmap.bin")
|
||||
base.copy_exe(core_build_dir + "/bin/" + platform_postfix, converter_dir, "x2t")
|
||||
|
||||
if (native_platform == "linux_64"):
|
||||
base.generate_check_linux_system(git_dir + "/build_tools", converter_dir)
|
||||
#if (native_platform == "linux_64"):
|
||||
# base.generate_check_linux_system(git_dir + "/build_tools", converter_dir)
|
||||
|
||||
base.generate_doctrenderer_config(converter_dir + "/DoctRenderer.config", "../../../", "server")
|
||||
|
||||
|
||||
@ -144,10 +144,8 @@ def make():
|
||||
example_config["siteUrl"] = "http://" + config.option("siteUrl") + ":8000/"
|
||||
example_config["apiUrl"] = "web-apps/apps/api/documents/api.js"
|
||||
example_config["preloaderUrl"] = "web-apps/apps/api/documents/cache-scripts.html"
|
||||
json_dir = git_dir + "/document-server-integration/web/documentserver-example/nodejs/config/"
|
||||
json_file = json_dir + "/local-development-" + base.host_platform() + ".json"
|
||||
if base.is_exist(json_dir):
|
||||
base.writeFile(json_file, json.dumps({"server": example_config}, indent=2))
|
||||
json_file = git_dir + "/document-server-integration/web/documentserver-example/nodejs/config/local-development-" + base.host_platform() + ".json"
|
||||
base.writeFile(json_file, json.dumps({"server": example_config}, indent=2))
|
||||
|
||||
os.chdir(old_cur)
|
||||
return
|
||||
|
||||
@ -66,28 +66,6 @@ class CDependencies:
|
||||
res += ['--remove-path', item]
|
||||
return res
|
||||
|
||||
def check__docker_dependencies():
|
||||
if (host_platform == 'windows' and not check_vc_components()):
|
||||
return False
|
||||
if (host_platform == 'mac'):
|
||||
return True
|
||||
|
||||
checksResult = CDependencies()
|
||||
checksResult.append(check_nodejs())
|
||||
checksResult.append(check_7z())
|
||||
if (len(checksResult.install) > 0):
|
||||
install_args = ['install.py']
|
||||
install_args += checksResult.get_uninstall()
|
||||
install_args += checksResult.get_removepath()
|
||||
install_args += checksResult.get_install()
|
||||
base_dir = base.get_script_dir(__file__)
|
||||
install_args[0] = './scripts/develop/' + install_args[0]
|
||||
if (host_platform == 'windows'):
|
||||
code = libwindows.sudo(unicode(sys.executable), install_args)
|
||||
elif (host_platform == 'linux'):
|
||||
get_updates()
|
||||
base.cmd_in_dir(base_dir + "/../../", 'python', install_args, False)
|
||||
|
||||
def check_dependencies():
|
||||
if (host_platform == 'windows' and not check_vc_components()):
|
||||
return False
|
||||
@ -231,18 +209,24 @@ def check_java():
|
||||
dependence = CDependencies()
|
||||
|
||||
base.print_info('Check installed Java')
|
||||
java_version = base.run_command('java -version')['stderr']
|
||||
java_info = base.run_command('java -version')['stderr']
|
||||
|
||||
if (java_version.find('64-Bit') != -1):
|
||||
version_pos = java_info.find('version "')
|
||||
java_v = 0
|
||||
if (version_pos != -1):
|
||||
try:
|
||||
java_v = float(java_info[version_pos + len('version "'): version_pos + len('version "') + 2])
|
||||
except:
|
||||
pass
|
||||
|
||||
if (java_info.find('64-Bit') != -1 and java_v >= 11):
|
||||
print('Installed Java is valid')
|
||||
return dependence
|
||||
|
||||
if (java_version.find('32-Bit') != -1):
|
||||
print('Installed Java must be x64')
|
||||
else:
|
||||
print('Java not found')
|
||||
|
||||
dependence.append_install('Java')
|
||||
else:
|
||||
print('Requires Java version 11+ x64-bit')
|
||||
dependence.append_install('Java')
|
||||
if (version_pos != -1):
|
||||
dependence.append_uninstall('Java')
|
||||
|
||||
return dependence
|
||||
|
||||
def get_erlang_path_to_bin():
|
||||
@ -847,6 +831,7 @@ def installProgram(sName):
|
||||
print(install_command)
|
||||
code = os.system(install_command)
|
||||
base.delete_file(file_name)
|
||||
|
||||
elif (host_platform == 'linux'):
|
||||
if (sName in install_special):
|
||||
code = install_special[sName]()
|
||||
@ -931,7 +916,7 @@ downloads_list = {
|
||||
'Windows': {
|
||||
'Git': 'https://github.com/git-for-windows/git/releases/download/v2.29.0.windows.1/Git-2.29.0-64-bit.exe',
|
||||
'Node.js': 'https://nodejs.org/download/release/v14.17.6/node-v14.17.6-x64.msi',
|
||||
'Java': 'https://javadl.oracle.com/webapps/download/AutoDL?BundleId=242990_a4634525489241b9a9e1aa73d9e118e6',
|
||||
'Java': 'https://aka.ms/download-jdk/microsoft-jdk-11.0.18-windows-x64.msi',
|
||||
'RabbitMQ': 'https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.8.9/rabbitmq-server-3.8.9.exe',
|
||||
'Erlang': 'http://erlang.org/download/otp_win64_23.1.exe',
|
||||
'VC2019x64': 'https://aka.ms/vs/17/release/vc_redist.x64.exe',
|
||||
@ -966,7 +951,6 @@ uninstall_special = {
|
||||
install_params = {
|
||||
'BuildTools': '--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --quiet --wait',
|
||||
'Git': '/VERYSILENT /NORESTART',
|
||||
'Java': '/s',
|
||||
'MySQLServer': {
|
||||
'port': '3306',
|
||||
'user': 'root',
|
||||
@ -985,4 +969,3 @@ install_params = {
|
||||
uninstall_params = {
|
||||
'PostgreSQL': '--mode unattended --unattendedmodeui none'
|
||||
}
|
||||
|
||||
|
||||
@ -10,15 +10,11 @@ import config_server as develop_config_server
|
||||
|
||||
base_dir = base.get_script_dir(__file__)
|
||||
|
||||
def build_docker_server():
|
||||
dependence.check__docker_dependencies()
|
||||
build_develop_server()
|
||||
|
||||
def build_docker_sdk_web_apps(dir):
|
||||
dependence.check__docker_dependencies()
|
||||
build_js.build_js_develop(dir)
|
||||
|
||||
def build_develop_server():
|
||||
def make():
|
||||
if ("1" != config.option("develop")):
|
||||
return
|
||||
if not dependence.check_dependencies():
|
||||
exit(1)
|
||||
build_server.build_server_develop()
|
||||
build_js.build_js_develop(base_dir + "/../../..")
|
||||
develop_config_server.make()
|
||||
@ -26,12 +22,5 @@ def build_develop_server():
|
||||
branding_develop_script_dir = base_dir + "/../../../" + config.option("branding") + "/build_tools/scripts"
|
||||
if base.is_file(branding_develop_script_dir + "/develop.py"):
|
||||
base.cmd_in_dir(branding_develop_script_dir, "python", ["develop.py"], True)
|
||||
|
||||
def make():
|
||||
if ("1" != config.option("develop")):
|
||||
return
|
||||
if not dependence.check_dependencies():
|
||||
exit(1)
|
||||
build_develop_server()
|
||||
exit(0)
|
||||
|
||||
@ -6,9 +6,6 @@ import os
|
||||
import base
|
||||
import dependence
|
||||
import traceback
|
||||
import develop
|
||||
|
||||
base_dir = base.get_script_dir(__file__)
|
||||
|
||||
def install_module(path):
|
||||
base.print_info('Install: ' + path)
|
||||
@ -44,94 +41,56 @@ def start_linux_services():
|
||||
os.system('sudo service rabbitmq-server restart')
|
||||
|
||||
def run_integration_example():
|
||||
if base.is_exist(base_dir + '/../../../document-server-integration/web/documentserver-example/nodejs'):
|
||||
base.cmd_in_dir(base_dir + '/../../../document-server-integration/web/documentserver-example/nodejs', 'python', ['run-develop.py'])
|
||||
base.cmd_in_dir('../../../document-server-integration/web/documentserver-example/nodejs', 'python', ['run-develop.py'])
|
||||
|
||||
def start_linux_services():
|
||||
base.print_info('Restart MySQL Server')
|
||||
|
||||
def make_start():
|
||||
base.configure_common_apps()
|
||||
|
||||
platform = base.host_platform()
|
||||
if ("windows" == platform):
|
||||
dependence.check_pythonPath()
|
||||
dependence.check_gitPath()
|
||||
restart_win_rabbit()
|
||||
elif ("mac" == platform):
|
||||
start_mac_services()
|
||||
elif ("linux" == platform):
|
||||
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-user', 'root', '--db-pass', 'onlyoffice'] + args)
|
||||
|
||||
base.cmd_in_dir(base_dir + '/../../', 'python', ['make.py'])
|
||||
def make_install():
|
||||
platform = base.host_platform()
|
||||
run_integration_example()
|
||||
|
||||
base.create_dir(base_dir + '/../../../server/App_Data')
|
||||
|
||||
install_module(base_dir + '/../../../server/DocService')
|
||||
install_module(base_dir + '/../../../server/Common')
|
||||
install_module(base_dir + '/../../../server/FileConverter')
|
||||
|
||||
def make_run():
|
||||
platform = base.host_platform()
|
||||
base.set_env('NODE_ENV', 'development-' + platform)
|
||||
base.set_env('NODE_CONFIG_DIR', '../Common/config')
|
||||
|
||||
if ("mac" == platform):
|
||||
base.set_env('DYLD_LIBRARY_PATH', '../FileConverter/bin/')
|
||||
elif ("linux" == platform):
|
||||
base.set_env('LD_LIBRARY_PATH', '../FileConverter/bin/')
|
||||
|
||||
run_module(base_dir + '/../../../server/DocService', ['sources/server.js'])
|
||||
#run_module(base_dir + '/../../../server/DocService', ['sources/gc.js'])
|
||||
run_module(base_dir + '/../../../server/FileConverter', ['sources/convertermaster.js'])
|
||||
#run_module(base_dir + '/../../../server/SpellChecker', ['sources/server.js'])
|
||||
|
||||
def run_docker_server(args = []):
|
||||
try:
|
||||
make_start()
|
||||
develop.build_docker_server()
|
||||
make_install()
|
||||
|
||||
except SystemExit:
|
||||
input("Ignoring SystemExit. Press Enter to continue...")
|
||||
exit(0)
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
except:
|
||||
input("Unexpected error. " + traceback.format_exc() + "Press Enter to continue...")
|
||||
|
||||
def run_docker_sdk_web_apps(dir):
|
||||
try:
|
||||
develop.build_docker_sdk_web_apps(dir)
|
||||
|
||||
except SystemExit:
|
||||
input("Ignoring SystemExit. Press Enter to continue...")
|
||||
exit(0)
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
except:
|
||||
input("Unexpected error. " + traceback.format_exc() + "Press Enter to continue...")
|
||||
|
||||
def make(args = []):
|
||||
try:
|
||||
make_start()
|
||||
make_configure(args)
|
||||
make_install()
|
||||
make_run()
|
||||
base.configure_common_apps()
|
||||
|
||||
platform = base.host_platform()
|
||||
if ("windows" == platform):
|
||||
dependence.check_pythonPath()
|
||||
dependence.check_gitPath()
|
||||
restart_win_rabbit()
|
||||
elif ("mac" == platform):
|
||||
start_mac_services()
|
||||
elif ("linux" == platform):
|
||||
start_linux_services()
|
||||
|
||||
|
||||
branch = base.run_command('git rev-parse --abbrev-ref HEAD')['stdout']
|
||||
|
||||
base.print_info('Build modules')
|
||||
if ("linux" == platform):
|
||||
base.cmd_in_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('../../', '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-user', 'root', '--db-pass', 'onlyoffice'] + args)
|
||||
|
||||
base.cmd_in_dir('../../', 'python', ['make.py'])
|
||||
|
||||
run_integration_example()
|
||||
|
||||
base.create_dir('../../../server/App_Data')
|
||||
|
||||
install_module('../../../server/DocService')
|
||||
install_module('../../../server/Common')
|
||||
install_module('../../../server/FileConverter')
|
||||
|
||||
base.set_env('NODE_ENV', 'development-' + platform)
|
||||
base.set_env('NODE_CONFIG_DIR', '../Common/config')
|
||||
|
||||
if ("mac" == platform):
|
||||
base.set_env('DYLD_LIBRARY_PATH', '../FileConverter/bin/')
|
||||
elif ("linux" == platform):
|
||||
base.set_env('LD_LIBRARY_PATH', '../FileConverter/bin/')
|
||||
|
||||
run_module('../../../server/DocService', ['sources/server.js'])
|
||||
# run_module('../../../server/DocService', ['sources/gc.js'])
|
||||
run_module('../../../server/FileConverter', ['sources/convertermaster.js'])
|
||||
# run_module('../../../server/SpellChecker', ['sources/server.js'])
|
||||
except SystemExit:
|
||||
input("Ignoring SystemExit. Press Enter to continue...")
|
||||
exit(0)
|
||||
|
||||
@ -11,16 +11,19 @@ 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"
|
||||
desktop_product_name_s = desktop_product_name.replace(" ","")
|
||||
desktop_package_name = company_name + "_" + desktop_product_name_s
|
||||
desktop_package_name = company_name + "-" + desktop_product_name_s
|
||||
desktop_vcredist_list = ["2022"]
|
||||
desktop_update_changes_list = {
|
||||
"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"
|
||||
|
||||
@ -36,10 +36,7 @@ def aws_s3_upload(files, key, ptype=None):
|
||||
if upload and ptype is not None:
|
||||
full_key = key
|
||||
if full_key.endswith("/"): full_key += utils.get_basename(file)
|
||||
utils.add_deploy_data(
|
||||
"builder", ptype, file, full_key,
|
||||
branding.s3_bucket, branding.s3_region
|
||||
)
|
||||
utils.add_deploy_data("builder", ptype, file, full_key)
|
||||
return ret
|
||||
|
||||
def make_windows():
|
||||
@ -47,19 +44,17 @@ def make_windows():
|
||||
utils.set_cwd("document-builder-package")
|
||||
|
||||
prefix = common.platforms[common.platform]["prefix"]
|
||||
company = branding.company_name.lower()
|
||||
product = branding.builder_product_name.replace(" ","").lower()
|
||||
company = branding.company_name
|
||||
product = branding.builder_product_name.replace(" ","")
|
||||
source_dir = "..\\build_tools\\out\\%s\\%s\\%s" % (prefix, company, product)
|
||||
package_name = company + "_" + product
|
||||
package_name = company + "-" + product
|
||||
package_version = common.version + "." + common.build
|
||||
suffix = {
|
||||
"windows_x64": "x64",
|
||||
"windows_x86": "x86",
|
||||
"windows_x64_xp": "x64_xp",
|
||||
"windows_x86_xp": "x86_xp"
|
||||
"windows_x86": "x86"
|
||||
}[common.platform]
|
||||
zip_file = "%s_%s_%s.zip" % (package_name, package_version, suffix)
|
||||
inno_file = "%s_%s_%s.exe" % (package_name, package_version, suffix)
|
||||
zip_file = "%s-%s-%s-%s.zip" % (company, product, package_version, suffix)
|
||||
inno_file = "%s-%s-%s-%s.exe" % (company, product, package_version, suffix)
|
||||
|
||||
if common.clean:
|
||||
utils.log_h2("builder clean")
|
||||
@ -85,9 +80,7 @@ def make_zip():
|
||||
|
||||
if common.deploy and ret:
|
||||
utils.log_h2("builder zip deploy")
|
||||
ret = aws_s3_upload(
|
||||
["build\\" + zip_file], "win/generic/%s/" % common.channel, "Portable"
|
||||
)
|
||||
ret = aws_s3_upload(["build\\" + zip_file], "win/generic/", "Portable")
|
||||
utils.set_summary("builder zip deploy", ret)
|
||||
return
|
||||
|
||||
@ -96,25 +89,27 @@ def make_inno():
|
||||
utils.log_h3(inno_file)
|
||||
|
||||
args = [
|
||||
"-Arch " + suffix,
|
||||
"-Version " + common.version,
|
||||
"-Build " + common.build
|
||||
"-Arch", suffix,
|
||||
"-Version", common.version,
|
||||
"-Build", common.build
|
||||
]
|
||||
if not branding.onlyoffice:
|
||||
args.append("-Branding '..\\..\\%s\\document-builder-package\\exe'" % common.branding)
|
||||
args += [
|
||||
"-Branding", "%s\\%s\\document-builder-package\\exe" % (common.workspace_dir, common.branding)
|
||||
]
|
||||
if common.sign:
|
||||
args.append("-Sign")
|
||||
args.append("-CertName '%s'" % branding.cert_name)
|
||||
args += [
|
||||
"-Sign",
|
||||
"-CertName", branding.cert_name
|
||||
]
|
||||
ret = utils.ps1(
|
||||
".\\make_inno.ps1", args, creates="build\\" + inno_file, verbose=True
|
||||
"make_inno.ps1", args, creates="build\\" + inno_file, verbose=True
|
||||
)
|
||||
utils.set_summary("builder inno build", ret)
|
||||
|
||||
if common.deploy and ret:
|
||||
utils.log_h2("builder inno deploy")
|
||||
ret = aws_s3_upload(
|
||||
["build\\" + inno_file], "win/inno/%s/" % common.channel, "Installer"
|
||||
)
|
||||
ret = aws_s3_upload(["build\\" + inno_file], "win/inno/", "Installer")
|
||||
utils.set_summary("builder inno deploy", ret)
|
||||
return
|
||||
|
||||
@ -140,24 +135,21 @@ def make_linux():
|
||||
utils.log_h2("builder tar deploy")
|
||||
ret = aws_s3_upload(
|
||||
utils.glob_path("tar/*.tar.gz"),
|
||||
"linux/generic/%s/" % common.channel,
|
||||
"Portable"
|
||||
"linux/generic/", "Portable"
|
||||
)
|
||||
utils.set_summary("builder tar deploy", ret)
|
||||
if "deb" in branding.builder_make_targets:
|
||||
utils.log_h2("builder deb deploy")
|
||||
ret = aws_s3_upload(
|
||||
utils.glob_path("deb/*.deb"),
|
||||
"linux/debian/%s/" % common.channel,
|
||||
"Debian"
|
||||
"linux/debian/", "Debian"
|
||||
)
|
||||
utils.set_summary("builder deb deploy", ret)
|
||||
if "rpm" in branding.builder_make_targets:
|
||||
utils.log_h2("builder rpm deploy")
|
||||
ret = aws_s3_upload(
|
||||
utils.glob_path("rpm/builddir/RPMS/" + rpm_arch + "/*.rpm"),
|
||||
"linux/rhel/%s/" % common.channel,
|
||||
"CentOS"
|
||||
"linux/rhel/", "CentOS"
|
||||
)
|
||||
utils.set_summary("builder rpm deploy", ret)
|
||||
else:
|
||||
|
||||
@ -19,11 +19,11 @@ vcredist_links = {
|
||||
"2022": {
|
||||
"x64": {
|
||||
"url": "https://aka.ms/vs/17/release/vc_redist.x64.exe",
|
||||
"md5": "703bd677778f2a1ba1eb4338bac3b868"
|
||||
"md5": "119dde89a20674349a51893114eae5ed"
|
||||
},
|
||||
"x86": {
|
||||
"url": "https://aka.ms/vs/17/release/vc_redist.x86.exe",
|
||||
"md5": "732d0ac9cd31b8136f1c8e72efec1636"
|
||||
"md5": "ca8c521c30f57c0c199d526b9a23fc4a"
|
||||
}
|
||||
},
|
||||
"2015": {
|
||||
|
||||
@ -46,7 +46,7 @@ def make_core():
|
||||
else:
|
||||
ret = utils.sh(" ".join(args), verbose=True)
|
||||
if ret:
|
||||
utils.add_deploy_data("core", "Archive", core_7z, dest_version + "core.7z", branding.s3_bucket, branding.s3_region)
|
||||
utils.add_deploy_data("core", "Archive", core_7z, dest_version + "core.7z")
|
||||
args = ["aws", "s3", "sync", "--delete",
|
||||
"--acl", "public-read", "--no-progress",
|
||||
"s3://" + branding.s3_bucket + "/" + dest_version,
|
||||
@ -57,3 +57,37 @@ def make_core():
|
||||
ret &= utils.sh(" ".join(args), verbose=True)
|
||||
utils.set_summary("core deploy", ret)
|
||||
return
|
||||
|
||||
def deploy_closure_maps(license):
|
||||
if not common.deploy: return
|
||||
utils.log_h1("CLOSURE MAPS")
|
||||
utils.set_cwd(utils.get_path("sdkjs/build/maps"))
|
||||
|
||||
maps = utils.glob_path("*.js.map")
|
||||
if not maps:
|
||||
utils.log_err("files do not exist")
|
||||
utils.set_summary("closure maps " + license + " deploy", False)
|
||||
return
|
||||
|
||||
utils.log_h2("closure maps " + license + " deploy")
|
||||
dest = "closure-maps/%s/%s/%s" % (common.version, common.build, license)
|
||||
ret = True
|
||||
for file in maps:
|
||||
args = ["aws"]
|
||||
if hasattr(branding, "s3_endpoint_url"):
|
||||
args += ["--endpoint-url=" + branding.s3_endpoint_url]
|
||||
args += [
|
||||
"s3", "cp", "--no-progress", file,
|
||||
"s3://" + branding.s3_bucket + "/" + dest + "/"
|
||||
]
|
||||
if common.os_family == "windows":
|
||||
upload = utils.cmd(*args, verbose=True)
|
||||
else:
|
||||
upload = utils.sh(" ".join(args), verbose=True)
|
||||
ret &= upload
|
||||
if upload:
|
||||
utils.add_deploy_data("core", "Closure maps " + license, file, dest + "/" + file)
|
||||
utils.set_summary("closure maps " + license + " deploy", ret)
|
||||
|
||||
utils.set_cwd(common.workspace_dir)
|
||||
return
|
||||
|
||||
@ -39,10 +39,7 @@ def aws_s3_upload(files, key, ptype=None):
|
||||
if upload and ptype is not None:
|
||||
full_key = key
|
||||
if full_key.endswith("/"): full_key += utils.get_basename(file)
|
||||
utils.add_deploy_data(
|
||||
"desktop", ptype, file, full_key,
|
||||
branding.s3_bucket, branding.s3_region
|
||||
)
|
||||
utils.add_deploy_data("desktop", ptype, file, full_key)
|
||||
return ret
|
||||
|
||||
#
|
||||
@ -56,11 +53,12 @@ def make_windows():
|
||||
utils.set_cwd("desktop-apps\\win-linux\\package\\windows")
|
||||
|
||||
prefix = common.platforms[common.platform]["prefix"]
|
||||
company = branding.company_name.lower()
|
||||
product = branding.desktop_product_name.replace(" ","").lower()
|
||||
company = branding.company_name
|
||||
product = branding.desktop_product_name.replace(" ","")
|
||||
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",
|
||||
@ -74,15 +72,16 @@ def make_windows():
|
||||
"windows_x86_xp": "32"
|
||||
}
|
||||
suffix = arch_list[common.platform]
|
||||
if common.platform.endswith("_xp"): suffix += "_xp"
|
||||
zip_file = "%s_%s_%s.zip" % (package_name, package_version, suffix)
|
||||
inno_file = "%s_%s_%s.exe" % (package_name, package_version, suffix)
|
||||
inno_help_file = "%s_Help_%s_%s.exe" % (package_name, package_version, suffix)
|
||||
inno_update_file = "update\\editors_update_%s.exe" % suffix
|
||||
advinst_file = "%s_%s_%s.msi" % (package_name, package_version, suffix)
|
||||
if common.platform.endswith("_xp"): suffix += "-xp"
|
||||
zip_file = "build\\%s-%s-%s.zip" % (package_name, package_version, suffix)
|
||||
inno_file = "%s-%s-%s.exe" % (package_name, package_version, suffix)
|
||||
inno_help_file = "%s-Help-%s-%s.exe" % (package_name, package_version, suffix)
|
||||
inno_update_file = "update\\editors_update_%s.exe" % suffix.replace("-","_")
|
||||
advinst_file = "%s-%s-%s.msi" % (package_name, package_version, suffix)
|
||||
|
||||
if common.clean:
|
||||
utils.log_h2("desktop clean")
|
||||
utils.delete_dir("build")
|
||||
# utils.delete_dir("data\\vcredist")
|
||||
utils.delete_dir("DesktopEditors-cache")
|
||||
utils.delete_files("*.exe")
|
||||
@ -94,6 +93,12 @@ def make_windows():
|
||||
utils.delete_files("update\\*.xml")
|
||||
utils.delete_files("update\\*.html")
|
||||
|
||||
utils.log_h2("copy arifacts")
|
||||
utils.create_dir("build\\desktop")
|
||||
utils.create_dir("build\\help")
|
||||
utils.copy_dir_content(source_dir, "build\\desktop\\")
|
||||
utils.copy_dir_content(source_help_dir, "build\\help\\")
|
||||
|
||||
make_zip()
|
||||
|
||||
vcdl = True
|
||||
@ -102,18 +107,19 @@ 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()
|
||||
make_inno_update()
|
||||
|
||||
if branding.onlyoffice and common.platform in ["windows_x64", "windows_x86"]:
|
||||
make_inno_help()
|
||||
|
||||
if common.platform == "windows_x64":
|
||||
make_winsparkle_files()
|
||||
make_update_files()
|
||||
|
||||
if common.platform in ["windows_x64", "windows_x86"]:
|
||||
make_advinst()
|
||||
@ -123,19 +129,21 @@ def make_windows():
|
||||
|
||||
def make_zip():
|
||||
utils.log_h2("desktop zip build")
|
||||
ret = utils.cmd(
|
||||
"7z", "a", "-y", zip_file, source_dir + "\\*",
|
||||
creates=zip_file, verbose=True
|
||||
|
||||
args = ["-OutFile", zip_file]
|
||||
if common.sign:
|
||||
args += [
|
||||
"-Sign",
|
||||
"-CertName", branding.cert_name
|
||||
]
|
||||
ret = utils.ps1(
|
||||
"make_zip.ps1", args, creates=zip_file, verbose=True
|
||||
)
|
||||
utils.set_summary("desktop zip build", ret)
|
||||
|
||||
if common.deploy and ret:
|
||||
utils.log_h2("desktop zip deploy")
|
||||
ret = aws_s3_upload(
|
||||
[zip_file],
|
||||
"win/generic/%s/" % common.channel,
|
||||
"Portable"
|
||||
)
|
||||
ret = aws_s3_upload([zip_file], "win/generic/", "Portable")
|
||||
utils.set_summary("desktop zip deploy", ret)
|
||||
return
|
||||
|
||||
@ -173,7 +181,7 @@ def make_inno():
|
||||
iscc_args.append("/D_WIN_XP=1")
|
||||
if common.sign:
|
||||
iscc_args.append("/DENABLE_SIGNING=1")
|
||||
iscc_args.append("/Sbyparam=signtool.exe sign /v /n $q" + \
|
||||
iscc_args.append("/Sbyparam=signtool.exe sign /a /v /n $q" + \
|
||||
branding.cert_name + "$q /t " + common.tsa_server + " $f")
|
||||
args = ["iscc"] + iscc_args + ["common.iss"]
|
||||
ret = utils.cmd(*args, creates=inno_file, verbose=True)
|
||||
@ -187,6 +195,14 @@ def make_inno():
|
||||
"Installer"
|
||||
)
|
||||
utils.set_summary("desktop inno deploy", ret)
|
||||
|
||||
utils.log_h2("desktop inno update deploy")
|
||||
ret = aws_s3_upload(
|
||||
[inno_file],
|
||||
"win/inno/%s/%s/%s" % (common.version, common.build, utils.get_basename(inno_update_file)),
|
||||
"Installer"
|
||||
)
|
||||
utils.set_summary("desktop inno update deploy", ret)
|
||||
return
|
||||
|
||||
def make_inno_help():
|
||||
@ -207,7 +223,7 @@ def make_inno_help():
|
||||
utils.get_abspath(common.workspace_dir + "\\" + common.branding + "\\desktop-apps"))
|
||||
if common.sign:
|
||||
args.append("/DENABLE_SIGNING=1")
|
||||
args.append("/Sbyparam=signtool.exe sign /v /n $q" + \
|
||||
args.append("/Sbyparam=signtool.exe sign /a /v /n $q" + \
|
||||
branding.cert_name + "$q /t " + common.tsa_server + " $f")
|
||||
args.append("help.iss")
|
||||
ret = utils.cmd(*args, creates=inno_help_file, verbose=True)
|
||||
@ -223,82 +239,68 @@ def make_inno_help():
|
||||
utils.set_summary("desktop inno help deploy", ret)
|
||||
return
|
||||
|
||||
def make_inno_update():
|
||||
utils.log_h2("desktop inno update build")
|
||||
utils.log_h2(inno_update_file)
|
||||
|
||||
args = ["iscc"] + iscc_args + ["/DTARGET_NAME=" + inno_file, "update_common.iss"]
|
||||
ret = utils.cmd(*args, creates=inno_update_file, verbose=True)
|
||||
utils.set_summary("desktop inno update build", ret)
|
||||
|
||||
if common.deploy and ret:
|
||||
utils.log_h2("desktop inno update deploy")
|
||||
ret = aws_s3_upload(
|
||||
[inno_update_file],
|
||||
"win/inno/%s/%s/" % (common.version, common.build),
|
||||
"WinSparkle"
|
||||
)
|
||||
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/desktop/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 +336,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,10 +381,10 @@ 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",
|
||||
"UpdateFile APPDIR\\updatesvc.exe " + source_dir + "\\updatesvc.exe",
|
||||
"SetVersion " + package_version,
|
||||
"SetPackageName " + advinst_file + " -buildname DefaultBuild",
|
||||
"Rebuild -buildslist DefaultBuild"
|
||||
@ -389,11 +396,7 @@ def make_advinst():
|
||||
|
||||
if common.deploy and ret:
|
||||
utils.log_h2("desktop advinst deploy")
|
||||
ret = aws_s3_upload(
|
||||
[advinst_file],
|
||||
"win/advinst/%s/" % common.channel,
|
||||
"Installer"
|
||||
)
|
||||
ret = aws_s3_upload([advinst_file], "win/advinst/", "Installer")
|
||||
utils.set_summary("desktop advinst deploy", ret)
|
||||
return
|
||||
|
||||
@ -420,41 +423,37 @@ def make_macos():
|
||||
utils.set_cwd(branding_dir)
|
||||
|
||||
if common.clean:
|
||||
utils.log("\n=== Clean\n")
|
||||
utils.log_h2("clean")
|
||||
utils.delete_dir(utils.get_env("HOME") + "/Library/Developer/Xcode/Archives")
|
||||
utils.delete_dir(utils.get_env("HOME") + "/Library/Caches/Sparkle_generate_appcast")
|
||||
|
||||
plist_path = "%s/%s/ONLYOFFICE/Resources/%s-%s/Info.plist" \
|
||||
% (common.workspace_dir, branding.desktop_branding_dir, branding.desktop_package_name, suffix)
|
||||
current_version = utils.sh_output(
|
||||
'/usr/libexec/PlistBuddy -c "Print :CFBundleShortVersionString" ' + plist_path,
|
||||
verbose=True).rstrip()
|
||||
current_build = utils.sh_output(
|
||||
'/usr/libexec/PlistBuddy -c "Print :CFBundleVersion" ' + plist_path,
|
||||
verbose=True).rstrip()
|
||||
app_version = current_version
|
||||
|
||||
appcast_url = branding.sparkle_base_url + "/" + suffix + "/" + branding.desktop_package_name.lower() + ".xml"
|
||||
release_version = utils.sh_output(
|
||||
release_bundle_version_string = utils.sh_output(
|
||||
'curl -Ls ' + appcast_url + ' 2> /dev/null' \
|
||||
+ ' | xmllint --xpath "/rss/channel/item[1]/enclosure/@*[name()=\'sparkle:shortVersionString\']" -' \
|
||||
+ ' | cut -f2 -d\\\"',
|
||||
verbose=True).rstrip()
|
||||
release_build = utils.sh_output(
|
||||
release_bundle_version = utils.sh_output(
|
||||
'curl -Ls ' + appcast_url + ' 2> /dev/null' \
|
||||
+ ' | xmllint --xpath "/rss/channel/item[1]/enclosure/@*[name()=\'sparkle:version\']" -' \
|
||||
+ ' | cut -f2 -d\\\"',
|
||||
verbose=True).rstrip()
|
||||
|
||||
utils.log("CURRENT=" + current_version + "(" + current_build + ")" \
|
||||
+ "\nRELEASE=" + release_version + "(" + release_build + ")")
|
||||
app_version = common.version
|
||||
bundle_version = str(int(release_bundle_version) + 1)
|
||||
plist_path = "%s/%s/ONLYOFFICE/Resources/%s-%s/Info.plist" \
|
||||
% (common.workspace_dir, branding.desktop_branding_dir, branding.desktop_package_name, suffix)
|
||||
utils.sh('/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString %s" %s' \
|
||||
% (common.version, plist_path), verbose=True)
|
||||
utils.sh('/usr/libexec/PlistBuddy -c "Set :CFBundleVersion %s" %s' \
|
||||
% (bundle_version, plist_path), verbose=True)
|
||||
|
||||
utils.log("RELEASE=" + release_bundle_version_string + "(" + release_bundle_version + ")" \
|
||||
+ "\nCURRENT=" + common.version + "(" + bundle_version + ")")
|
||||
|
||||
dmg = make_dmg()
|
||||
if dmg:
|
||||
if int(current_build) > int(release_build):
|
||||
make_sparkle_updates()
|
||||
else:
|
||||
utils.log(release_build + " <= " + current_build)
|
||||
make_sparkle_updates()
|
||||
|
||||
utils.set_cwd(common.workspace_dir)
|
||||
return
|
||||
@ -473,7 +472,7 @@ def make_dmg():
|
||||
utils.log_h2("desktop dmg deploy")
|
||||
ret = aws_s3_upload(
|
||||
utils.glob_path("build/*.dmg"),
|
||||
"mac/%s/%s/%s/" % (suffix, common.version, common.build),
|
||||
"mac/%s/%s/%s/" % (common.version, common.build, suffix),
|
||||
"Disk Image"
|
||||
)
|
||||
utils.set_summary("desktop dmg deploy", ret)
|
||||
@ -481,7 +480,7 @@ def make_dmg():
|
||||
utils.log_h2("desktop zip deploy")
|
||||
ret = aws_s3_upload(
|
||||
["build/%s-%s.zip" % (scheme, app_version)],
|
||||
"mac/%s/%s/%s/" % (suffix, common.version, common.build),
|
||||
"mac/%s/%s/%s/" % (common.version, common.build, suffix),
|
||||
"Archive"
|
||||
)
|
||||
utils.set_summary("desktop zip deploy", ret)
|
||||
@ -546,7 +545,7 @@ def make_sparkle_updates():
|
||||
utils.glob_path("build/update/*.delta") \
|
||||
+ utils.glob_path("build/update/*.xml") \
|
||||
+ utils.glob_path("build/update/*.html"),
|
||||
"mac/%s/%s/%s/" % (suffix, common.version, common.build),
|
||||
"mac/%s/%s/%s/" % (common.version, common.build, suffix),
|
||||
"Sparkle"
|
||||
)
|
||||
utils.set_summary("desktop sparkle files deploy", ret)
|
||||
@ -554,7 +553,7 @@ def make_sparkle_updates():
|
||||
utils.log_h2("desktop checksums deploy")
|
||||
ret = aws_s3_upload(
|
||||
utils.glob_path("build/update/*.txt"),
|
||||
"mac/%s/%s/%s/" % (suffix, common.version, common.build),
|
||||
"mac/%s/%s/%s/" % (common.version, common.build, suffix),
|
||||
"Checksums"
|
||||
)
|
||||
utils.set_summary("desktop checksums deploy", ret)
|
||||
@ -586,24 +585,21 @@ def make_linux():
|
||||
if "tar" in branding.desktop_make_targets:
|
||||
ret = aws_s3_upload(
|
||||
utils.glob_path("tar/*.tar.gz") + utils.glob_path("tar/*.tar.xz"),
|
||||
"linux/generic/%s/" % common.channel,
|
||||
"Portable"
|
||||
"linux/generic/", "Portable"
|
||||
)
|
||||
utils.set_summary("desktop tar deploy", ret)
|
||||
if "deb" in branding.desktop_make_targets:
|
||||
utils.log_h2("desktop deb deploy")
|
||||
ret = aws_s3_upload(
|
||||
utils.glob_path("deb/*.deb"),
|
||||
"linux/debian/%s/" % common.channel,
|
||||
"Debian"
|
||||
"linux/debian/", "Debian"
|
||||
)
|
||||
utils.set_summary("desktop deb deploy", ret)
|
||||
if "deb-astra" in branding.desktop_make_targets:
|
||||
utils.log_h2("desktop deb-astra deploy")
|
||||
ret = aws_s3_upload(
|
||||
utils.glob_path("deb-astra/*.deb"),
|
||||
"linux/astra/",
|
||||
"Astra Linux Signed"
|
||||
"linux/astra/", "Astra Linux Special Edition"
|
||||
)
|
||||
utils.set_summary("desktop deb-astra deploy", ret)
|
||||
if "rpm" in branding.desktop_make_targets:
|
||||
@ -611,8 +607,7 @@ def make_linux():
|
||||
ret = aws_s3_upload(
|
||||
utils.glob_path("rpm/builddir/RPMS/" + rpm_arch + "/*.rpm") \
|
||||
+ utils.glob_path("rpm/builddir/RPMS/noarch/*.rpm"),
|
||||
"linux/rhel/%s/" % common.channel,
|
||||
"CentOS"
|
||||
"linux/rhel/", "CentOS"
|
||||
)
|
||||
utils.set_summary("desktop rpm deploy", ret)
|
||||
if "suse-rpm" in branding.desktop_make_targets:
|
||||
@ -620,8 +615,7 @@ def make_linux():
|
||||
ret = aws_s3_upload(
|
||||
utils.glob_path("suse-rpm/builddir/RPMS/" + rpm_arch + "/*.rpm") \
|
||||
+ utils.glob_path("suse-rpm/builddir/RPMS/noarch/*.rpm"),
|
||||
"linux/suse/%s/" % common.channel,
|
||||
"SUSE Linux"
|
||||
"linux/suse/", "SUSE Linux"
|
||||
)
|
||||
utils.set_summary("desktop suse-rpm deploy", ret)
|
||||
if "apt-rpm" in branding.desktop_make_targets:
|
||||
@ -629,8 +623,7 @@ def make_linux():
|
||||
ret = aws_s3_upload(
|
||||
utils.glob_path("apt-rpm/builddir/RPMS/" + rpm_arch + "/*.rpm") \
|
||||
+ utils.glob_path("apt-rpm/builddir/RPMS/noarch/*.rpm"),
|
||||
"linux/altlinux/%s/" % common.channel,
|
||||
"ALT Linux"
|
||||
"linux/altlinux/", "ALT Linux"
|
||||
)
|
||||
utils.set_summary("desktop apt-rpm deploy", ret)
|
||||
if "urpmi" in branding.desktop_make_targets:
|
||||
@ -638,8 +631,7 @@ def make_linux():
|
||||
ret = aws_s3_upload(
|
||||
utils.glob_path("urpmi/builddir/RPMS/" + rpm_arch + "/*.rpm") \
|
||||
+ utils.glob_path("urpmi/builddir/RPMS/noarch/*.rpm"),
|
||||
"linux/rosa/%s/" % common.channel,
|
||||
"ROSA"
|
||||
"linux/rosa/", "ROSA"
|
||||
)
|
||||
utils.set_summary("desktop urpmi deploy", ret)
|
||||
else:
|
||||
|
||||
@ -20,7 +20,7 @@ def make_mobile():
|
||||
utils.sh("rm -rfv *.zip", verbose=True)
|
||||
|
||||
zip_file = "build-" + common.version + "-" + common.build + ".zip"
|
||||
s3_key = "mobile/android/%s/%s" % (common.channel, zip_file)
|
||||
s3_key = "mobile/android/" + zip_file
|
||||
|
||||
utils.log_h2("mobile build")
|
||||
ret = utils.sh("zip -r " + zip_file + " ./android* ./js", verbose=True)
|
||||
@ -35,10 +35,7 @@ def make_mobile():
|
||||
verbose=True
|
||||
)
|
||||
if ret:
|
||||
utils.add_deploy_data(
|
||||
"mobile", "Android", zip_file, s3_key,
|
||||
branding.s3_bucket, branding.s3_region
|
||||
)
|
||||
utils.add_deploy_data("mobile", "Android", zip_file, s3_key)
|
||||
utils.set_summary("mobile deploy", ret)
|
||||
|
||||
utils.set_cwd(common.workspace_dir)
|
||||
|
||||
@ -35,10 +35,7 @@ def aws_s3_upload(files, key, edition, ptype=None):
|
||||
if upload and ptype is not None:
|
||||
full_key = key
|
||||
if full_key.endswith("/"): full_key += utils.get_basename(file)
|
||||
utils.add_deploy_data(
|
||||
"server_" + edition, ptype, file, full_key,
|
||||
branding.s3_bucket, branding.s3_region
|
||||
)
|
||||
utils.add_deploy_data("server_" + edition, ptype, file, full_key)
|
||||
return ret
|
||||
|
||||
def make_windows(edition):
|
||||
@ -62,9 +59,7 @@ def make_windows(edition):
|
||||
utils.log_h2("server " + edition + " inno deploy")
|
||||
ret = aws_s3_upload(
|
||||
utils.glob_path("exe/*.exe"),
|
||||
"win/inno/%s/" % common.channel,
|
||||
edition,
|
||||
"Installer"
|
||||
"win/inno/", edition, "Installer"
|
||||
)
|
||||
utils.set_summary("server " + edition + " inno deploy", ret)
|
||||
|
||||
@ -99,36 +94,28 @@ def make_linux(edition):
|
||||
utils.log_h2("server " + edition + " deb deploy")
|
||||
ret = aws_s3_upload(
|
||||
utils.glob_path("deb/*.deb"),
|
||||
"linux/debian/%s/" % common.channel,
|
||||
edition,
|
||||
"Debian"
|
||||
"linux/debian/", edition, "Debian"
|
||||
)
|
||||
utils.set_summary("server " + edition + " deb deploy", ret)
|
||||
if "rpm" in branding.server_make_targets:
|
||||
utils.log_h2("server " + edition + " rpm deploy")
|
||||
ret = aws_s3_upload(
|
||||
utils.glob_path("rpm/builddir/RPMS/" + rpm_arch + "/*.rpm"),
|
||||
"linux/rhel/%s/" % common.channel,
|
||||
edition,
|
||||
"CentOS"
|
||||
"linux/rhel/", edition, "CentOS"
|
||||
)
|
||||
utils.set_summary("server " + edition + " rpm deploy", ret)
|
||||
if "apt-rpm" in branding.server_make_targets:
|
||||
utils.log_h2("server " + edition + " apt-rpm deploy")
|
||||
ret = aws_s3_upload(
|
||||
utils.glob_path("apt-rpm/builddir/RPMS/" + rpm_arch + "/*.rpm"),
|
||||
"linux/altlinux/%s/" % common.channel,
|
||||
edition,
|
||||
"ALT Linux"
|
||||
"linux/altlinux/", edition, "ALT Linux"
|
||||
)
|
||||
utils.set_summary("server " + edition + " apt-rpm deploy", ret)
|
||||
if "tar" in branding.server_make_targets:
|
||||
utils.log_h2("server " + edition + " snap deploy")
|
||||
ret = aws_s3_upload(
|
||||
utils.glob_path("*.tar.gz"),
|
||||
"linux/generic/%s/" % common.channel,
|
||||
edition,
|
||||
"Snap"
|
||||
"linux/generic/", edition, "Snap"
|
||||
)
|
||||
utils.set_summary("server " + edition + " snap deploy", ret)
|
||||
else:
|
||||
|
||||
@ -258,15 +258,13 @@ def set_summary(target, status):
|
||||
common.summary.append({target: status})
|
||||
return
|
||||
|
||||
def add_deploy_data(product, ptype, src, dst, bucket, region):
|
||||
def add_deploy_data(product, ptype, src, dst):
|
||||
common.deploy_data.append({
|
||||
"platform": common.platforms[common.platform]["title"],
|
||||
"product": product,
|
||||
"type": ptype,
|
||||
# "local": get_path(src),
|
||||
"size": get_file_size(get_path(src)),
|
||||
"bucket": bucket,
|
||||
"region": region,
|
||||
"key": dst
|
||||
})
|
||||
file = open(get_path(common.workspace_dir + "/deploy.json"), 'w')
|
||||
@ -325,7 +323,7 @@ def ps1(file, args=[], **kwargs):
|
||||
if kwargs.get("creates") and is_exist(kwargs["creates"]):
|
||||
return True
|
||||
ret = subprocess.call(
|
||||
["powershell", file] + args, stderr=subprocess.STDOUT, shell=True
|
||||
["powershell", "-File", file] + args, stderr=subprocess.STDOUT, shell=True
|
||||
) == 0
|
||||
return ret
|
||||
|
||||
|
||||
@ -56,9 +56,9 @@ def install_qt():
|
||||
base.cmd_in_dir("./qt-everywhere-opensource-src-5.9.9", "make", ["install"])
|
||||
return
|
||||
|
||||
if not base.is_file("./node_js_setup_10.x"):
|
||||
if not base.is_file("./node_js_setup_14.x"):
|
||||
print("install dependencies...")
|
||||
deps.install_deps()
|
||||
deps.install_deps()
|
||||
|
||||
if not base.is_dir("./qt_build"):
|
||||
print("install qt...")
|
||||
|
||||
@ -54,15 +54,15 @@ def install_deps():
|
||||
print("Installed Node.js version: " + str(nodejs_cur_version_major) + "." + str(nodejs_cur_version_minor))
|
||||
except:
|
||||
nodejs_cur = 1
|
||||
if (nodejs_cur < 10020):
|
||||
print("Node.js version cannot be less 10.20")
|
||||
if (nodejs_cur < 14000):
|
||||
print("Node.js version cannot be less 14")
|
||||
print("Reinstall")
|
||||
if (base.is_dir("./node_js_setup_10.x")):
|
||||
base.delete_dir("./node_js_setup_10.x")
|
||||
if (base.is_dir("./node_js_setup_14.x")):
|
||||
base.delete_dir("./node_js_setup_14.x")
|
||||
base.cmd("sudo", ["apt-get", "remove", "--purge", "-y", "nodejs"])
|
||||
base.download("https://deb.nodesource.com/setup_10.x", "./node_js_setup_10.x")
|
||||
base.download("https://deb.nodesource.com/setup_14.x", "./node_js_setup_14.x")
|
||||
base.cmd('curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo apt-key add -')
|
||||
base.cmd("sudo", ["bash", "./node_js_setup_10.x"])
|
||||
base.cmd("sudo", ["bash", "./node_js_setup_14.x"])
|
||||
base.cmd("sudo", ["apt-get", "install", "-y", "nodejs"])
|
||||
base.cmd("sudo", ["npm", "install", "-g", "npm@6"])
|
||||
else:
|
||||
@ -73,16 +73,14 @@ def install_deps():
|
||||
|
||||
# java
|
||||
java_error = base.cmd("sudo", ["apt-get", "-y", "install", "openjdk-11-jdk"], True)
|
||||
if (0 != java_error):
|
||||
java_error = base.cmd("sudo", ["apt-get", "-y", "install", "openjdk-8-jdk"], True)
|
||||
if (0 != java_error):
|
||||
base.cmd("sudo", ["apt-get", "-y", "install", "software-properties-common"])
|
||||
base.cmd("sudo", ["add-apt-repository", "-y", "ppa:openjdk-r/ppa"])
|
||||
base.cmd("sudo", ["apt-get", "update"])
|
||||
base.cmd("sudo", ["apt-get", "-y", "install", "openjdk-8-jdk"])
|
||||
base.cmd("sudo", ["apt-get", "-y", "install", "openjdk-11-jdk"])
|
||||
base.cmd("sudo", ["update-alternatives", "--config", "java"])
|
||||
base.cmd("sudo", ["update-alternatives", "--config", "javac"])
|
||||
|
||||
|
||||
base.writeFile("./packages_complete", "complete")
|
||||
return
|
||||
|
||||
|
||||
BIN
tools/linux/sysroot/ubuntu14/libdbus-1.so.3
Normal file
BIN
tools/linux/sysroot/ubuntu14/libdbus-1.so.3
Normal file
Binary file not shown.
24
tools/linux/use_system_qt.py
Executable file
24
tools/linux/use_system_qt.py
Executable file
@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
sys.path.append('../../scripts')
|
||||
import base
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
def make():
|
||||
if base.is_dir("./system_qt"):
|
||||
return
|
||||
|
||||
# TODO: check all places...
|
||||
|
||||
base.create_dir("./system_qt")
|
||||
base.create_dir("./system_qt/gcc_64")
|
||||
base.cmd("ln", ["-s", "/usr/lib/x86_64-linux-gnu/qt5/bin", "./system_qt/gcc_64/bin"])
|
||||
base.cmd("ln", ["-s", "/usr/lib/x86_64-linux-gnu", "./system_qt/gcc_64/lib"])
|
||||
base.cmd("ln", ["-s", "/usr/lib/x86_64-linux-gnu/qt5/plugins", "./system_qt/gcc_64/plugins"])
|
||||
return
|
||||
|
||||
if __name__ == "__main__":
|
||||
make()
|
||||
|
||||
Reference in New Issue
Block a user