mirror of
https://github.com/ONLYOFFICE/build_tools.git
synced 2025-12-23 17:40:16 +00:00
Merge remote-tracking branch 'origin/hotfix/v5.6.0' into release/v6.0.0
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
FROM ubuntu:14.04
|
||||
|
||||
RUN apt-get -y update
|
||||
ENV TZ=Etc/UTC
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
RUN apt-get -y update && \
|
||||
apt-get -y install python3 \
|
||||
sudo
|
||||
|
||||
ADD . /build_tools
|
||||
WORKDIR /build_tools
|
||||
|
||||
44
configure.py
44
configure.py
@@ -7,28 +7,28 @@ import optparse
|
||||
arguments = sys.argv[1:]
|
||||
|
||||
parser = optparse.OptionParser()
|
||||
parser.add_option("--update", action="store", type="string", dest="update", default="1", help="is need update")
|
||||
parser.add_option("--update-light", action="store", type="string", dest="update-light", default="", help="is need light update (if not exist: clone & go to branch, else: pull)")
|
||||
parser.add_option("--branch", action="store", type="string", dest="branch", default="master", help="branch all repo [used only if update==1]")
|
||||
parser.add_option("--clean", action="store", type="string", dest="clean", default="1", help="clean build")
|
||||
parser.add_option("--module", action="store", type="string", dest="module", default="builder", help="list build modules [desktop | builder]")
|
||||
parser.add_option("--platform", action="store", type="string", dest="platform", default="native", help="destination platform build [all: windows(win_64, win_32, win_64_xp, win_32_xp), linux(linux_64, linux_32), mac(mac_64); combination: native | win_64 | win_32 | win_64_xp | win_32_xp | linux_64 | mac_64 | ios | android")
|
||||
parser.add_option("--config", action="store", type="string", dest="config", default="", help="qmake CONFIG addition")
|
||||
parser.add_option("--qt-dir", action="store", type="string", dest="qt-dir", default="", help="qt (qmake) directory")
|
||||
parser.add_option("--qt-dir-xp", action="store", type="string", dest="qt-dir-xp", default="", help="qt for Windows XP (qmake) directory")
|
||||
parser.add_option("--compiler", action="store", type="string", dest="compiler", default="", help="compiler name")
|
||||
parser.add_option("--no-apps", action="store", type="string", dest="no-apps", default="0", help="disable build desktop apps (qt)")
|
||||
parser.add_option("--themesparams", action="store", type="string", dest="themesparams", default="", help="presentation themes thumbnails additions")
|
||||
parser.add_option("--git-protocol", action="store", type="string", dest="git-protocol", default="https", help="presentation themes thumbnails additions")
|
||||
parser.add_option("--branding", action="store", type="string", dest="branding", default="", help="branding path")
|
||||
parser.add_option("--branding-name", action="store", type="string", dest="branding-name", default="", help="branding name")
|
||||
parser.add_option("--branding-url", action="store", type="string", dest="branding-url", default="", help="branding url")
|
||||
parser.add_option("--sdkjs-addon", action="append", type="string", dest="sdkjs-addons", default=[], help="sdkjs addons")
|
||||
parser.add_option("--sdkjs-addon-desktop", action="append", type="string", dest="sdkjs-addons-desktop", default=[], help="sdkjs addons desktop")
|
||||
parser.add_option("--server-addon", action="append", type="string", dest="server-addons", default=[], help="server addons")
|
||||
parser.add_option("--web-apps-addon", action="append", type="string", dest="web-apps-addons", default=[], help="web-apps addons")
|
||||
parser.add_option("--sdkjs-plugin", action="append", type="string", dest="sdkjs-plugin", default=["default"], help="sdkjs addons for all products")
|
||||
parser.add_option("--sdkjs-plugin-server", action="append", type="string", dest="sdkjs-plugin-server", default=["default"], help="sdkjs addons for server")
|
||||
parser.add_option("--update", action="store", type="string", dest="update", default="1", help="defines whether it's necessary to update/clone repos. If it's set to true (1 === true), build_tools automatically get the necessary subrepos. If it's set to false (0 === false), you should define which ones to use")
|
||||
parser.add_option("--update-light", action="store", type="string", dest="update-light", default="", help="performs pull/clone without switching branches, can be used only if update is true.")
|
||||
parser.add_option("--branch", action="store", type="string", dest="branch", default="master", help="branch/tag name, used only if update is true and update_light is not used. Updates/clones all the repos and switches the branch to the proper one deleting all the local changes")
|
||||
parser.add_option("--clean", action="store", type="string", dest="clean", default="1", help="defines whether to build everything anew")
|
||||
parser.add_option("--module", action="store", type="string", dest="module", default="builder", help="defines what modules to build. You can specify several of them, e.g. --module 'core desktop builder server develop mobile'")
|
||||
parser.add_option("--platform", action="store", type="string", dest="platform", default="native", help="defines the destination platform for your build ['win_64', 'win_32', 'win_64_xp', 'win_32_xp', 'linux_64', 'linux_32', 'mac_64', 'ios', 'android_arm64_v8a', 'android_armv7', 'android_x86', 'android_x86_64'; combinations: 'native': your current system (windows/linux/mac only); 'all': all available systems; 'windows': win_64 win_32 win_64_xp win_32_xp; 'linux': linux_64 linux_32; 'mac': mac_64; 'android': android_arm64_v8a android_armv7 android_x86 android_x86_64]")
|
||||
parser.add_option("--config", action="store", type="string", dest="config", default="", help="provides ability to specify additional parameters for qmake")
|
||||
parser.add_option("--qt-dir", action="store", type="string", dest="qt-dir", default="", help="defines qmake directory path. qmake can be found in qt-dir/compiler/bin directory")
|
||||
parser.add_option("--qt-dir-xp", action="store", type="string", dest="qt-dir-xp", default="", help="defines qmake directory path for Windows XP. qmake can be found in 'qt-dir/compiler/bin directory")
|
||||
parser.add_option("--compiler", action="store", type="string", dest="compiler", default="", help="defines compiler name. It is not recommended to use it as it's defined automatically (msvc2015, msvc2015_64, gcc, gcc_64, clang, clang_64, etc)")
|
||||
parser.add_option("--no-apps", action="store", type="string", dest="no-apps", default="0", help="disables building desktop apps that use qt")
|
||||
parser.add_option("--themesparams", action="store", type="string", dest="themesparams", default="", help="provides settings for generating presentation themes thumbnails")
|
||||
parser.add_option("--git-protocol", action="store", type="string", dest="git-protocol", default="https", help="can be used only if update is set to true - 'https', 'ssh'")
|
||||
parser.add_option("--branding", action="store", type="string", dest="branding", default="", help="provides branding path")
|
||||
parser.add_option("--branding-name", action="store", type="string", dest="branding-name", default="", help="provides branding name")
|
||||
parser.add_option("--branding-url", action="store", type="string", dest="branding-url", default="", help="provides branding url")
|
||||
parser.add_option("--sdkjs-addon", action="append", type="string", dest="sdkjs-addons", default=[], help="provides sdkjs addons")
|
||||
parser.add_option("--sdkjs-addon-desktop", action="append", type="string", dest="sdkjs-addons-desktop", default=[], help="provides sdkjs addons for desktop")
|
||||
parser.add_option("--server-addon", action="append", type="string", dest="server-addons", default=[], help="provides server addons")
|
||||
parser.add_option("--web-apps-addon", action="append", type="string", dest="web-apps-addons", default=[], help="provides web-apps addons")
|
||||
parser.add_option("--sdkjs-plugin", action="append", type="string", dest="sdkjs-plugin", default=["default"], help="provides plugins for server-based and desktop versions of the editors")
|
||||
parser.add_option("--sdkjs-plugin-server", action="append", type="string", dest="sdkjs-plugin-server", default=["default"], help="provides plugins for server-based version of the editors")
|
||||
|
||||
(options, args) = parser.parse_args(arguments)
|
||||
configOptions = vars(options)
|
||||
|
||||
@@ -563,6 +563,12 @@ def sdkjs_addons_checkout():
|
||||
for name in addons_list:
|
||||
if name in config.sdkjs_addons:
|
||||
git_update(config.sdkjs_addons[name], True)
|
||||
|
||||
if ("" != config.option("sdkjs-addons-desktop")):
|
||||
addons_list = config.option("sdkjs-addons-desktop").rsplit(", ")
|
||||
for name in addons_list:
|
||||
if name in config.sdkjs_addons_desktop:
|
||||
git_update(config.sdkjs_addons_desktop[name], True)
|
||||
return
|
||||
|
||||
def server_addons_checkout():
|
||||
|
||||
@@ -59,7 +59,7 @@ def make_pro_file(makefiles_dir, pro_file):
|
||||
# non windows platform
|
||||
if not base.is_windows():
|
||||
if ("1" == config.option("clean")):
|
||||
base.cmd(base.app_make(), ["clean", "all", "-f", makefiles_dir + "/build.makefile_" + file_suff], True)
|
||||
base.cmd(base.app_make(), ["clean", "-f", makefiles_dir + "/build.makefile_" + file_suff], True)
|
||||
base.cmd(base.app_make(), ["distclean", "-f", makefiles_dir + "/build.makefile_" + file_suff], True)
|
||||
|
||||
if base.is_file(makefiles_dir + "/build.makefile_" + file_suff):
|
||||
@@ -70,7 +70,7 @@ def make_pro_file(makefiles_dir, pro_file):
|
||||
qmake_bat = []
|
||||
qmake_bat.append("call \"" + config.option("vs-path") + "/vcvarsall.bat\" " + ("x86" if base.platform_is_32(platform) else "x64"))
|
||||
if ("1" == config.option("clean")):
|
||||
qmake_bat.append("call nmake clean all -f " + makefiles_dir + "/build.makefile_" + file_suff)
|
||||
qmake_bat.append("call nmake clean -f " + makefiles_dir + "/build.makefile_" + file_suff)
|
||||
qmake_bat.append("call nmake distclean -f " + makefiles_dir + "/build.makefile_" + file_suff)
|
||||
qmake_addon_string = ""
|
||||
if ("" != config.option("qmake_addon")):
|
||||
|
||||
@@ -32,6 +32,7 @@ def make():
|
||||
continue
|
||||
|
||||
root_dir = base_dir + ("/" + native_platform + "/" + branding + "/documentserver")
|
||||
root_dir_snap = root_dir + '-snap'
|
||||
if (base.is_dir(root_dir)):
|
||||
base.delete_dir(root_dir)
|
||||
base.create_dir(root_dir)
|
||||
@@ -190,5 +191,21 @@ def make():
|
||||
base.copy_exe(bin_example_dir, build_example_dir, "example")
|
||||
base.copy_dir(bin_example_dir + "/config", build_example_dir + "/config")
|
||||
|
||||
# snap
|
||||
base.create_dir(root_dir_snap)
|
||||
base.copy_dir(root_dir, root_dir_snap)
|
||||
base.copy_dir(bin_server_dir + '/DocService/node_modules', root_dir_snap + '/server/DocService/node_modules')
|
||||
base.copy_dir(bin_server_dir + '/DocService/sources', root_dir_snap + '/server/DocService/sources')
|
||||
base.copy_dir(bin_server_dir + '/DocService/public', root_dir_snap + '/server/DocService/public')
|
||||
base.delete_file(root_dir_snap + '/server/DocService/docservice')
|
||||
base.copy_dir(bin_server_dir + '/FileConverter/node_modules', root_dir_snap + '/server/FileConverter/node_modules')
|
||||
base.copy_dir(bin_server_dir + '/FileConverter/sources', root_dir_snap + '/server/FileConverter/sources')
|
||||
base.delete_file(root_dir_snap + '/server/FileConverter/converter')
|
||||
base.copy_dir(bin_server_dir + '/SpellChecker/node_modules', root_dir_snap + '/server/SpellChecker/node_modules')
|
||||
base.copy_dir(bin_server_dir + '/SpellChecker/sources', root_dir_snap + '/server/SpellChecker/sources')
|
||||
base.delete_file(root_dir_snap + '/server/SpellChecker/spellchecker')
|
||||
base.copy_dir(bin_server_dir + '/Common/node_modules', root_dir_snap + '/server/Common/node_modules')
|
||||
base.copy_dir(bin_server_dir + '/Common/sources', root_dir_snap + '/server/Common/sources')
|
||||
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user