def parse_defaults(): defaults_path = base.get_script_dir() + "/../defaults" if ("" != option("branding")): defaults_path_branding = base.get_script_dir() + "/../../" + option( "branding") + "/build_tools/defaults" if base.is_file(defaults_path_branding): defaults_path = defaults_path_branding defaults_file = open(defaults_path, "r") defaults_options = {} for line in defaults_file: name, value = line.partition("=")[::2] k = name.strip() v = value.strip(" '\"\r\n") if ("true" == v.lower()): v = "1" if ("false" == v.lower()): v = "0" defaults_options[k] = v for name in defaults_options: if name in options: options[name] = options[name].replace("default", defaults_options[name]) else: options[name] = defaults_options[name] return
def restart_win_rabbit(): base.print_info('restart RabbitMQ node to prevent "Erl.exe high CPU usage every Monday morning on Windows" https://groups.google.com/forum/#!topic/rabbitmq-users/myl74gsYyYg') rabbitmqctl = find_rabbitmqctl(os.environ['ProgramFiles']) or find_rabbitmqctl(os.environ['ProgramFiles(x86)']) if rabbitmqctl is not None: base.cmd_in_dir(base.get_script_dir(rabbitmqctl), 'rabbitmqctl.bat', ['stop_app']) base.cmd_in_dir(base.get_script_dir(rabbitmqctl), 'rabbitmqctl.bat', ['start_app']) else: base.print_info('Missing rabbitmqctl.bat')
def check_postgreConfig(postgrePath=''): result = True if (host_platform == 'windows'): base.set_env('PGPASSWORD', install_params['PostgreSQL']['dbPass']) rootUser = install_params['PostgreSQL']['root'] dbUser = install_params['PostgreSQL']['dbUser'] dbName = install_params['PostgreSQL']['dbName'] dbPass = install_params['PostgreSQL']['dbPass'] postgre_path_to_bin = get_postrgre_path_to_bin(postgrePath) postgreLoginRoot = get_postgreLoginSrting(rootUser) postgreLoginDbUser = get_postgreLoginSrting(dbUser) creatdb_path = base.get_script_dir( ) + "/../../server/schema/postgresql/createdb.sql" if (base.run_command_in_dir(postgre_path_to_bin, postgreLoginRoot + ' -c "\du ' + dbUser + '"')['stdout'].find(dbUser) != -1): print('User ' + dbUser + ' is exist') if (os.system(postgreLoginDbUser + '-c "\q"') != 0): print('Invalid user password!') base.print_info('Changing password...') result = change_userPass(dbUser, dbPass, postgre_path_to_bin) and result else: print('User ' + dbUser + ' not exist!') base.print_info('Creating ' + dbName + ' user...') result = create_postgreUser(dbUser, dbPass, postgre_path_to_bin) and result if (base.run_command_in_dir( postgre_path_to_bin, postgreLoginRoot + ' -c "SELECT datname FROM pg_database;"') ['stdout'].find('onlyoffice') == -1): print('Database ' + dbName + ' not found') base.print_info('Creating ' + dbName + ' database...') result = create_postgreDb(dbName, postgre_path_to_bin) and configureDb( dbUser, dbName, creatdb_path, postgre_path_to_bin) else: if (base.run_command_in_dir( postgre_path_to_bin, postgreLoginRoot + '-c "SELECT pg_size_pretty(pg_database_size(' + "'" + dbName + "'" + '));"')['stdout'].find('7559 kB') != -1): print('Database ' + dbName + ' not configured') base.print_info('Configuring ' + dbName + ' database...') result = configureDb(dbName, creatdb_path, postgre_path_to_bin) and result print('Database ' + dbName + ' is valid') if (base.run_command_in_dir( postgre_path_to_bin, postgreLoginRoot + '-c "\l+ ' + dbName + '"')['stdout'].find(dbUser + '=CTc/' + rootUser) == -1): print('User ' + dbUser + ' has no database privileges!') base.print_info('Setting database privileges for user ' + dbUser + '...') result = set_dbPrivilegesForUser(dbUser, dbName, postgre_path_to_bin) and result print('User ' + dbUser + ' has database privileges') return result
def make(): #check server module to build if(not config.check_option("module", "server")): return server_dir = base.get_script_dir() + "/../../server" base.cmd_in_dir(server_dir, "npm", ["install"]) base.cmd_in_dir(server_dir, "grunt", ["--no-color", "-v"] + base.server_addons_param()) #env variables product_version = base.get_env('PRODUCT_VERSION') if(not product_version): product_version = "0.0.0" build_number = base.get_env('BUILD_NUMBER') if(not build_number): build_number = "0" cur_date = datetime.date.today().strftime("%m/%d/%Y") server_build_dir = server_dir + "/build/server" base.replaceInFileRE(server_build_dir + "/Common/sources/commondefines.js", "const buildNumber = [0-9]*", "const buildNumber = " + build_number) base.replaceInFileRE(server_build_dir + "/Common/sources/license.js", "const buildDate = '[0-9-/]*'", "const buildDate = '" + cur_date + "'") base.replaceInFileRE(server_build_dir + "/Common/sources/commondefines.js", "const buildVersion = '[0-9.]*'", "const buildVersion = '" + product_version + "'") pkg_target = "node10" if ("linux" == base.host_platform()): pkg_target += "-linux" if ("windows" == base.host_platform()): pkg_target += "-win" base.cmd_in_dir(server_build_dir + "/DocService", "pkg", [".", "-t", pkg_target, "--options", "max_old_space_size=4096", "-o", "docservice"]) base.cmd_in_dir(server_build_dir + "/FileConverter", "pkg", [".", "-t", pkg_target, "-o", "converter"]) base.cmd_in_dir(server_build_dir + "/Metrics", "pkg", [".", "-t", pkg_target, "-o", "metrics"]) base.cmd_in_dir(server_build_dir + "/SpellChecker", "pkg", [".", "-t", pkg_target, "-o", "spellchecker"]) example_dir = base.get_script_dir() + "/../../document-server-integration/web/documentserver-example/nodejs" base.cmd_in_dir(example_dir, "npm", ["install"]) base.cmd_in_dir(example_dir, "pkg", [".", "-t", pkg_target, "-o", "example"])
def check_gitPath(): path = base.get_env('PATH') gitExecPath = base.find_file( os.path.join(os.environ['PROGRAMW6432'], 'Git\\cmd'), 'git.exe') or base.find_file( os.path.join(os.environ['ProgramFiles(x86)'], 'Git\\cmd'), 'git.exe') gitDir = base.get_script_dir(gitExecPath) if (path.find(gitDir) == -1): base.set_env('PATH', gitDir + os.pathsep + path)
def make(): if ("1" == base.get_env("OO_NO_BUILD_JS")): return if ("core" == config.option("module")): return base_dir = base.get_script_dir() + "/.." out_dir = base_dir + "/out/js/" branding = config.option("branding-name") if ("" == branding): branding = "onlyoffice" out_dir += branding base.create_dir(out_dir) # builder build_interface(base_dir + "/../web-apps/build") build_sdk_builder(base_dir + "/../sdkjs/build") base.create_dir(out_dir + "/builder") base.copy_dir(base_dir + "/../web-apps/deploy/web-apps", out_dir + "/builder/web-apps") base.copy_dir(base_dir + "/../sdkjs/deploy/sdkjs", out_dir + "/builder/sdkjs") # desktop build_sdk_desktop(base_dir + "/../sdkjs/build") if config.check_option("module", "desktop"): build_sdk_desktop(base_dir + "/../sdkjs/build") base.create_dir(out_dir + "/desktop") base.copy_dir(base_dir + "/../sdkjs/deploy/sdkjs", out_dir + "/desktop/sdkjs") base.copy_dir(base_dir + "/../web-apps/deploy/web-apps", out_dir + "/desktop/web-apps") base.delete_dir(out_dir + "/desktop/web-apps/apps/documenteditor/embed") base.delete_dir(out_dir + "/desktop/web-apps/apps/documenteditor/mobile") base.delete_dir(out_dir + "/desktop/web-apps/apps/presentationeditor/embed") base.delete_dir(out_dir + "/desktop/web-apps/apps/presentationeditor/mobile") base.delete_dir(out_dir + "/desktop/web-apps/apps/spreadsheeteditor/embed") base.delete_dir(out_dir + "/desktop/web-apps/apps/spreadsheeteditor/mobile") base.copy_file( base_dir + "/../web-apps/apps/api/documents/index.html.desktop", out_dir + "/desktop/web-apps/apps/api/documents/index.html") build_interface(base_dir + "/../desktop-apps/common/loginpage/build") base.copy_file( base_dir + "/../desktop-apps/common/loginpage/deploy/index.html", out_dir + "/desktop/index.html") return
def check_MySQLConfig(mysqlPath = ''): result = True mysqlLoginSrt = get_mysqlLoginSrting() mysql_path_to_bin = get_mysql_path_to_bin(mysqlPath) if (base.run_command_in_dir(mysql_path_to_bin, mysqlLoginSrt + ' -e "SHOW DATABASES;"')['stdout'].find('onlyoffice') == -1): print('Database onlyoffice not found') creatdb_path = base.get_script_dir() + "/../../server/schema/mysql/createdb.sql" result = execMySQLScript(mysqlPath, creatdb_path) if (base.run_command_in_dir(mysql_path_to_bin, mysqlLoginSrt + ' -e "SELECT plugin from mysql.user where User='******'" + install_params['MySQLServer']['user'] + "';" + '"')['stdout'].find('mysql_native_password') == -1): print('Password encryption is not valid') result = set_MySQLEncrypt(mysqlPath, 'mysql_native_password') and result return result
def make(): path = base.get_script_dir() + "/../../core/Common/3dParty/openssl" old_cur = os.getcwd() os.chdir(path) base.set_env("ANDROID_HOME", base.get_android_sdk_home()) if (-1 != config.option("platform").find("android") and not base.is_dir("./build/android")): subprocess.call(["./build-android-openssl.sh"]) if (-1 != config.option("platform").find("ios") and not base.is_dir("./build/ios")): subprocess.call(["./build-ios-openssl.sh"]) os.chdir(old_cur) return
def make(): path = base.get_script_dir() + "/../../core/Common/3dParty/curl" old_cur = os.getcwd() os.chdir(path) if (-1 != config.option("platform").find("android")): if base.is_dir(path + "/build/android"): os.chdir(old_cur) return subprocess.call(["./build-android-curl.sh"]) elif (-1 != config.option("platform").find("ios")): if base.is_dir(path + "/build/ios"): os.chdir(old_cur) return subprocess.call(["./build-ios-curl.sh"]) os.chdir(old_cur) return
def make(): if ("windows" != base.host_platform()): return if not config.check_option("module", "mobile"): return print("[fetch & build]: glew") base_dir = base.get_script_dir() + "/../../core/Common/3dParty/glew" old_cur = os.getcwd() os.chdir(base_dir) base.common_check_version("glew", "1", clean) if not base.is_dir("glew-2.1.0"): base.download( "https://deac-ams.dl.sourceforge.net/project/glew/glew/2.1.0/glew-2.1.0-win32.zip", "./archive.zip") base.extract("./archive.zip", "./") base.delete_file("./archive.zip") os.chdir(old_cur) return
def make(): if ("windows" == base.host_platform() or "ios" == config.option("platform")): return print("[fetch & build]: openssl") base_dir = base.get_script_dir() + "/../../core/Common/3dParty/openssl" old_cur = os.getcwd() os.chdir(base_dir) base.common_check_version("openssl", "1", clean) if not base.is_dir("openssl"): base.cmd("git", [ "clone", "--depth=1", "--branch", "OpenSSL_1_1_1f", "https://github.com/openssl/openssl.git" ]) os.chdir(base_dir + "/openssl") if not base.is_file("Makefile"): base.cmd("./config", ["no-shared", "no-asm"]) if base.is_file("./libssl.a") and base.is_file("./libcrypto.a"): os.chdir(old_cur) return if ("linux" == base.host_platform()): 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", ["build_libs"]) os.chdir(old_cur) return
def make(): if ("android" == base.host_platform() or "ios" == config.option("platform")): return print("[fetch & build]: openssl") 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) if not base.is_dir("openssl"): base.cmd("git", [ "clone", "--depth=1", "--branch", "OpenSSL_1_1_1f", "https://github.com/openssl/openssl.git" ]) os.chdir(base_dir + "/openssl") old_cur_dir = base_dir.replace(" ", "\\ ") if ("windows" == base.host_platform()): old_cur_dir = base_dir.replace(" ", "\\ ") if (-1 != config.option("platform").find("win_64") ) and not base.is_dir("../build/win_64"): 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("call nmake clean") qmake_bat.append("call nmake build_libs install") base.run_as_bat(qmake_bat, True) if (-1 != config.option("platform").find("win_32") ) and not base.is_dir("../build/win_32"): 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("call nmake clean") qmake_bat.append("call nmake build_libs install") base.run_as_bat(qmake_bat, True) os.chdir(old_cur) # xp ---------------------------------------------------------------------------------------------------- os.chdir(base_dir + "/openssl") base.replaceInFile(base_dir + "/openssl/crypto/rand/rand_win.c", "define USE_BCRYPTGENRANDOM", "define USE_BCRYPTGENRANDOM_FIX") old_cur_dir = base_dir.replace(" ", "\\ ") if (-1 != config.option("platform").find("win_64_xp") ) and not base.is_dir("../build/win_64_xp"): 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("call nmake clean") qmake_bat.append("call nmake build_libs install") base.run_as_bat(qmake_bat, True) if (-1 != config.option("platform").find("win_32_xp") ) and not base.is_dir("../build/win_32_xp"): 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("call nmake clean") qmake_bat.append("call nmake build_libs install") base.run_as_bat(qmake_bat, True) os.chdir(old_cur) # ------------------------------------------------------------------------------------------------------- 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.replaceInFile("./Makefile", "CFLAGS=-Wall -O3", "CFLAGS=-Wall -O3 -fvisibility=hidden") base.replaceInFile("./Makefile", "CXXFLAGS=-Wall -O3", "CXXFLAGS=-Wall -O3 -fvisibility=hidden") base.cmd("make") base.cmd("make", ["install"]) # TODO: support x86 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("make", ["build_libs", "install"]) if (-1 != config.option("platform").find("mac") ) and not base.is_dir("../build/mac_arm64"): os.chdir(base_dir) base.cmd("git", [ "clone", "--depth=1", "--branch", "OpenSSL_1_1_1f", "https://github.com/openssl/openssl.git", "openssl2" ]) os.chdir(base_dir + "/openssl2") replace1 = "\"darwin64-x86_64-cc\" => {" replace2 = "\"darwin64-arm64-cc\" => {\n\ inherit_from => [ \"darwin-common\", asm(\"aarch64_asm\") ],\n\ CFLAGS => add(\"-Wall\"),\n\ cflags => add(\"-arch arm64 -isysroot " + base.find_mac_sdk( ) + "\"),\n\ lib_cppflags => add(\"-DL_ENDIAN\"),\n\ bn_ops => \"SIXTY_FOUR_BIT_LONG\",\n\ perlasm_scheme => \"macosx\",\n\ },\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("make", ["build_libs", "install"]) os.chdir(old_cur) return
def make(): base_dir = base.get_script_dir() + "/../out" git_dir = base.get_script_dir() + "/../.." core_dir = git_dir + "/core" branding = config.branding() platforms = config.option("platform").split() for native_platform in platforms: if not native_platform in config.platforms: continue root_dir = base_dir + ( "/" + native_platform + "/" + branding + ("/DesktopEditors" if base.is_windows() else "/desktopeditors")) if (base.is_dir(root_dir)): base.delete_dir(root_dir) base.create_dir(root_dir) qt_dir = base.qt_setup(native_platform) # check platform on xp isWindowsXP = False if (-1 == native_platform.find("_xp")) else True platform = native_platform[0:-3] if isWindowsXP else native_platform apps_postfix = "build" + base.qt_dst_postfix() if ("" != config.option("branding")): apps_postfix += ("/" + config.option("branding")) apps_postfix += "/" apps_postfix += platform if isWindowsXP: apps_postfix += "/xp" core_build_dir = core_dir + "/build" if ("" != config.option("branding")): core_build_dir += ("/" + config.option("branding")) platform_postfix = platform + base.qt_dst_postfix() # x2t base.create_dir(root_dir + "/converter") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "kernel") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "UnicodeConverter") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "graphics") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "PdfWriter") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "PdfReader") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "DjVuFile") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "XpsFile") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "HtmlFile2") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "HtmlRenderer") 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") 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") # 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") if (0 == platform.find("linux")): base.copy_file( core_dir + "/Common/3dParty/icu/" + platform + "/build/libicudata.so.58", root_dir + "/converter/libicudata.so.58") base.copy_file( core_dir + "/Common/3dParty/icu/" + platform + "/build/libicuuc.so.58", root_dir + "/converter/libicuuc.so.58") if (0 == platform.find("mac")): base.copy_file( core_dir + "/Common/3dParty/icu/" + platform + "/build/libicudata.58.dylib", root_dir + "/converter/libicudata.58.dylib") base.copy_file( core_dir + "/Common/3dParty/icu/" + platform + "/build/libicuuc.58.dylib", root_dir + "/converter/libicuuc.58.dylib") # doctrenderer if isWindowsXP: base.copy_lib(core_build_dir + "/lib/" + platform_postfix + "/xp", root_dir + "/converter", "doctrenderer") base.copy_files( core_dir + "/Common/3dParty/v8/v8_xp/" + platform + "/release/icudt*.dll", root_dir + "/converter/") else: base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "doctrenderer") if (0 == platform.find("win")): base.copy_files( core_dir + "/Common/3dParty/v8/v8/out.gn/" + platform + "/release/icudt*.dat", root_dir + "/converter/") else: base.copy_file( core_dir + "/Common/3dParty/v8/v8/out.gn/" + platform + "/icudtl.dat", root_dir + "/converter/icudtl.dat") base.generate_doctrenderer_config( root_dir + "/converter/DoctRenderer.config", "../editors/", "desktop") base.copy_dir(git_dir + "/desktop-apps/common/converter/empty", root_dir + "/converter/empty") # dictionaries base.create_dir(root_dir + "/dictionaries") base.copy_dir_content(git_dir + "/dictionaries", root_dir + "/dictionaries", "", ".git") base.copy_dir(git_dir + "/desktop-apps/common/package/fonts", root_dir + "/fonts") base.copy_file( git_dir + "/desktop-apps/common/package/license/3dparty/3DPARTYLICENSE", root_dir + "/3DPARTYLICENSE") # cef if not isWindowsXP: base.copy_files( core_dir + "/Common/3dParty/cef/" + platform + "/build/*", root_dir) else: base.copy_files( core_dir + "/Common/3dParty/cef/" + native_platform + "/build/*", root_dir) isUseQt = True if (0 == platform.find("mac")) or (0 == platform.find("ios")): isUseQt = False # libraries base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "hunspell") base.copy_lib( core_build_dir + "/lib/" + platform_postfix + ("/xp" if isWindowsXP else ""), root_dir, "ooxmlsignature") base.copy_lib( core_build_dir + "/lib/" + platform_postfix + ("/xp" if isWindowsXP else ""), root_dir, "ascdocumentscore") if (0 != platform.find("mac")): base.copy_lib( core_build_dir + "/lib/" + platform_postfix + ("/xp" if isWindowsXP else ""), root_dir, "qtascdocumentscore") if (0 == platform.find("mac")): base.copy_dir( core_build_dir + "/bin/" + platform_postfix + "/editors_helper.app", root_dir + "/editors_helper.app") else: base.copy_exe( core_build_dir + "/bin/" + platform_postfix + ("/xp" if isWindowsXP else ""), root_dir, "editors_helper") if isUseQt: base.qt_copy_lib("Qt5Core", root_dir) base.qt_copy_lib("Qt5Gui", root_dir) base.qt_copy_lib("Qt5PrintSupport", root_dir) base.qt_copy_lib("Qt5Svg", root_dir) base.qt_copy_lib("Qt5Widgets", root_dir) base.qt_copy_lib("Qt5Multimedia", root_dir) base.qt_copy_lib("Qt5MultimediaWidgets", root_dir) base.qt_copy_lib("Qt5Network", root_dir) base.qt_copy_lib("Qt5OpenGL", root_dir) base.qt_copy_plugin("bearer", root_dir) base.qt_copy_plugin("iconengines", root_dir) base.qt_copy_plugin("imageformats", root_dir) base.qt_copy_plugin("platforms", root_dir) base.qt_copy_plugin("platforminputcontexts", root_dir) base.qt_copy_plugin("printsupport", root_dir) base.qt_copy_plugin("mediaservice", root_dir) base.qt_copy_plugin("playlistformats", root_dir) base.qt_copy_plugin("platformthemes", root_dir) base.qt_copy_plugin("xcbglintegrations", root_dir) base.qt_copy_plugin("styles", root_dir) if (0 == platform.find("linux")): base.qt_copy_lib("Qt5DBus", root_dir) base.qt_copy_lib("Qt5X11Extras", root_dir) base.qt_copy_lib("Qt5XcbQpa", root_dir) base.qt_copy_icu(root_dir) base.copy_files( base.get_env("QT_DEPLOY") + "/../lib/libqgsttools_p.so*", root_dir) if (0 == platform.find("win")): base.copy_file( git_dir + "/desktop-apps/win-linux/extras/projicons/" + apps_postfix + "/projicons.exe", root_dir + "/DesktopEditors.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")): base.copy_file( git_dir + "/desktop-apps/win-linux/" + apps_postfix + "/DesktopEditors", root_dir + "/DesktopEditors") base.copy_lib( core_build_dir + "/lib/" + platform_postfix + ("/xp" if isWindowsXP else ""), root_dir, "videoplayer") base.create_dir(root_dir + "/editors") base.copy_dir(base_dir + "/js/" + branding + "/desktop/sdkjs", root_dir + "/editors/sdkjs") base.copy_dir(base_dir + "/js/" + branding + "/desktop/web-apps", root_dir + "/editors/web-apps") base.copy_dir( git_dir + "/desktop-sdk/ChromiumBasedEditors/resources/local", root_dir + "/editors/sdkjs/common/Images/local") base.create_dir(root_dir + "/editors/sdkjs-plugins") base.copy_sdkjs_plugins(root_dir + "/editors/sdkjs-plugins", True, True) # remove some default plugins if base.is_dir(root_dir + "/editors/sdkjs-plugins/speech"): base.delete_dir(root_dir + "/editors/sdkjs-plugins/speech") # io base.create_dir(root_dir + "/editors/sdkjs-plugins/v1") base.download( "https://onlyoffice.github.io/sdkjs-plugins/v1/plugins.js", root_dir + "/editors/sdkjs-plugins/v1/plugins.js") base.download( "https://onlyoffice.github.io/sdkjs-plugins/v1/plugins-ui.js", root_dir + "/editors/sdkjs-plugins/v1/plugins-ui.js") 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}") if (0 != platform.find("mac")): base.copy_sdkjs_plugin( git_dir + "/desktop-sdk/ChromiumBasedEditors/plugins", root_dir + "/editors/sdkjs-plugins", "sendto", True) 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") isUseJSC = False if (0 == platform.find("mac")): file_size_doctrenderer = os.path.getsize( root_dir + "/converter/libdoctrenderer.dylib") print("file_size_doctrenderer: " + str(file_size_doctrenderer)) if (file_size_doctrenderer < 5 * 1024 * 1024): isUseJSC = True if isUseJSC: base.delete_file(root_dir + "/converter/icudtl.dat") if (0 == platform.find("win")): base.copy_lib( git_dir + "/desktop-apps/win-linux/3dparty/WinSparkle/" + platform, root_dir, "WinSparkle") base.delete_file(root_dir + "/cef_sandbox.lib") base.delete_file(root_dir + "/libcef.lib") # all themes generate ---- base.copy_exe(core_build_dir + "/bin/" + platform_postfix, root_dir + "/converter", "allfontsgen") base.copy_exe(core_build_dir + "/bin/" + platform_postfix, root_dir + "/converter", "allthemesgen") if (0 == platform.find("mac")): base.mac_correct_rpath_desktop(root_dir) themes_params = [] if ("" != config.option("themesparams")): themes_params = [ "--params=\"" + config.option("themesparams") + "\"" ] base.cmd_exe(root_dir + "/converter/allfontsgen", [ "--use-system=\"1\"", "--input=\"" + root_dir + "/fonts\"", "--input=\"" + git_dir + "/core-fonts\"", "--allfonts=\"" + root_dir + "/converter/AllFonts.js\"", "--selection=\"" + root_dir + "/converter/font_selection.bin\"" ]) base.cmd_exe(root_dir + "/converter/allthemesgen", [ "--converter-dir=\"" + root_dir + "/converter\"", "--src=\"" + root_dir + "/editors/sdkjs/slide/themes\"", "--allfonts=\"AllFonts.js\"", "--output=\"" + root_dir + "/editors/sdkjs/common/Images\"" ] + themes_params) base.delete_exe(root_dir + "/converter/allfontsgen") base.delete_exe(root_dir + "/converter/allthemesgen") base.delete_file(root_dir + "/converter/AllFonts.js") base.delete_file(root_dir + "/converter/font_selection.bin") if not isUseJSC: base.delete_file(root_dir + "/editors/sdkjs/slide/sdk-all.cache") return
def make(): base_dir = base.get_script_dir() + "/../out" git_dir = base.get_script_dir() + "/../.." core_dir = git_dir + "/core" plugins_dir = git_dir + "/sdkjs-plugins" branding = config.branding() platforms = config.option("platform").split() for native_platform in platforms: if not native_platform in config.platforms: continue if (-1 != native_platform.find("_xp")): print("Server module not supported on Windows XP") continue if (-1 != native_platform.find("ios")): print("Server module not supported on iOS") continue if (-1 != native_platform.find("android")): print("Server module not supported on Android") 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) build_server_dir = root_dir + '/server' server_dir = base.get_script_dir() + "/../../server" bin_server_dir = server_dir + "/build/server" base.create_dir(build_server_dir + '/DocService') base.copy_dir(bin_server_dir + '/Common/config', build_server_dir + '/Common/config') base.create_dir(build_server_dir + '/DocService') base.copy_exe(bin_server_dir + "/DocService", build_server_dir + '/DocService', "docservice") base.create_dir(build_server_dir + '/FileConverter') base.copy_exe(bin_server_dir + "/FileConverter", build_server_dir + '/FileConverter', "converter") base.create_dir(build_server_dir + '/Metrics') base.copy_exe(bin_server_dir + "/Metrics", build_server_dir + '/Metrics', "metrics") base.copy_dir(bin_server_dir + '/Metrics/config', build_server_dir + '/Metrics/config') base.create_dir(build_server_dir + '/Metrics/node_modules/modern-syslog/build/Release') base.copy_file(bin_server_dir + "/Metrics/node_modules/modern-syslog/build/Release/core.node", build_server_dir + "/Metrics/node_modules/modern-syslog/build/Release/core.node") base.create_dir(build_server_dir + '/SpellChecker') base.copy_exe(bin_server_dir + "/SpellChecker", build_server_dir + '/SpellChecker', "spellchecker") base.create_dir(build_server_dir + '/SpellChecker/node_modules/nodehun/build/Release') base.copy_file(bin_server_dir + "/SpellChecker/node_modules/nodehun/build/Release/nodehun.node", build_server_dir + '/SpellChecker/node_modules/nodehun/build/Release/nodehun.node') qt_dir = base.qt_setup(native_platform) platform = native_platform core_build_dir = core_dir + "/build" if ("" != config.option("branding")): core_build_dir += ("/" + config.option("branding")) platform_postfix = platform + base.qt_dst_postfix() converter_dir = root_dir + "/server/FileConverter/bin" base.create_dir(converter_dir) base.copy_lib(core_build_dir + "/lib/" + platform_postfix, converter_dir, "kernel") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, converter_dir, "UnicodeConverter") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, converter_dir, "graphics") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, converter_dir, "PdfWriter") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, converter_dir, "PdfReader") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, converter_dir, "DjVuFile") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, converter_dir, "XpsFile") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, converter_dir, "HtmlFile2") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, converter_dir, "HtmlRenderer") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, converter_dir, "doctrenderer") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, converter_dir, "Fb2File") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, converter_dir, "EpubFile") base.copy_exe(core_build_dir + "/bin/" + platform_postfix, converter_dir, "x2t") base.generate_doctrenderer_config(converter_dir + "/DoctRenderer.config", "../../../", "server") # icu if (0 == platform.find("win")): base.copy_file(core_dir + "/Common/3dParty/icu/" + platform + "/build/icudt58.dll", converter_dir + "/icudt58.dll") base.copy_file(core_dir + "/Common/3dParty/icu/" + platform + "/build/icuuc58.dll", converter_dir + "/icuuc58.dll") if (0 == platform.find("linux")): base.copy_file(core_dir + "/Common/3dParty/icu/" + platform + "/build/libicudata.so.58", converter_dir + "/libicudata.so.58") base.copy_file(core_dir + "/Common/3dParty/icu/" + platform + "/build/libicuuc.so.58", converter_dir + "/libicuuc.so.58") if (0 == platform.find("mac")): base.copy_file(core_dir + "/Common/3dParty/icu/" + platform + "/build/libicudata.58.dylib", converter_dir + "/libicudata.58.dylib") base.copy_file(core_dir + "/Common/3dParty/icu/" + platform + "/build/libicuuc.58.dylib", converter_dir + "/libicuuc.58.dylib") if (0 == platform.find("win")): base.copy_files(core_dir + "/Common/3dParty/v8/v8/out.gn/" + platform + "/release/icudt*.dat", converter_dir + "/") else: base.copy_file(core_dir + "/Common/3dParty/v8/v8/out.gn/" + platform + "/icudtl.dat", converter_dir + "/icudtl.dat") # builder base.copy_exe(core_build_dir + "/bin/" + platform_postfix, converter_dir, "docbuilder") base.copy_dir(git_dir + "/DocumentBuilder/empty", converter_dir + "/empty") # js js_dir = root_dir base.copy_dir(base_dir + "/js/" + branding + "/builder/sdkjs", js_dir + "/sdkjs") base.copy_dir(base_dir + "/js/" + branding + "/builder/web-apps", js_dir + "/web-apps") # plugins base.create_dir(js_dir + "/sdkjs-plugins") base.copy_sdkjs_plugins(js_dir + "/sdkjs-plugins", False, True) base.copy_sdkjs_plugins_server(js_dir + "/sdkjs-plugins", False, True) base.create_dir(js_dir + "/sdkjs-plugins/v1") base.download("https://onlyoffice.github.io/sdkjs-plugins/v1/plugins.js", js_dir + "/sdkjs-plugins/v1/plugins.js") base.download("https://onlyoffice.github.io/sdkjs-plugins/v1/plugins-ui.js", js_dir + "/sdkjs-plugins/v1/plugins-ui.js") base.download("https://onlyoffice.github.io/sdkjs-plugins/v1/plugins.css", js_dir + "/sdkjs-plugins/v1/plugins.css") base.support_old_versions_plugins(js_dir + "/sdkjs-plugins") # tools tools_dir = root_dir + "/server/tools" base.create_dir(tools_dir) base.copy_exe(core_build_dir + "/bin/" + platform_postfix, tools_dir, "allfontsgen") base.copy_exe(core_build_dir + "/bin/" + platform_postfix, tools_dir, "allthemesgen") branding_dir = server_dir + "/branding" if("" != config.option("branding") and "onlyoffice" != config.option("branding")): branding_dir = git_dir + '/' + config.option("branding") + '/server' #dictionaries spellchecker_dictionaries = build_server_dir + '/SpellChecker/dictionaries' spellchecker_dictionaries_files = server_dir + '/../dictionaries/*_*' base.create_dir(spellchecker_dictionaries) base.copy_files(spellchecker_dictionaries_files, spellchecker_dictionaries) if (0 == platform.find("win")): exec_ext = '.exe' else: exec_ext = '' #schema schema_files = server_dir + '/schema' schema = build_server_dir + '/schema' base.create_dir(schema) base.copy_dir(schema_files, schema) #core-fonts core_fonts_files = server_dir + '/../core-fonts' core_fonts = build_server_dir + '/../core-fonts' base.create_dir(core_fonts) base.copy_dir_content(core_fonts_files, core_fonts, "", ".git") #license license_file1 = server_dir + '/LICENSE.txt' license_file2 = server_dir + '/3rd-Party.txt' license_dir = server_dir + '/license' license = build_server_dir + '/license' base.copy_file(license_file1, build_server_dir) base.copy_file(license_file2, build_server_dir) base.copy_dir(license_dir, license) #branding welcome_files = branding_dir + '/welcome' welcome = build_server_dir + '/welcome' base.create_dir(welcome) base.copy_dir(welcome_files, welcome) info_files = branding_dir + '/info' info = build_server_dir + '/info' base.create_dir(info) base.copy_dir(info_files, info) # example build_example_dir = root_dir + '-example' bin_example_dir = base.get_script_dir() + "/../../document-server-integration/web/documentserver-example/nodejs" base.create_dir(build_example_dir) base.copy_exe(bin_example_dir, build_example_dir, "example") base.copy_dir(bin_example_dir + "/config", build_example_dir + "/config") # snap if (0 == platform.find("linux")): 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
def make(): base_dir = base.get_script_dir() + "/../out" git_dir = base.get_script_dir() + "/../.." core_dir = git_dir + "/core" branding = config.branding() platforms = config.option("platform").split() for native_platform in platforms: if not native_platform in config.platforms: continue root_dir = base_dir + ( "/" + native_platform + "/" + branding + ("/DesktopEditors" if base.is_windows() else "/desktopeditors")) if (base.is_dir(root_dir)): base.delete_dir(root_dir) base.create_dir(root_dir) qt_dir = base.qt_setup(native_platform) # check platform on xp isWindowsXP = False if (-1 == native_platform.find("_xp")) else True platform = native_platform[0:-3] if isWindowsXP else native_platform apps_postfix = "build" + base.qt_dst_postfix() if ("" != config.option("branding")): apps_postfix += ("/" + config.option("branding")) apps_postfix += "/" apps_postfix += platform if isWindowsXP: apps_postfix += "/xp" core_build_dir = core_dir + "/build" if ("" != config.option("branding")): core_build_dir += ("/" + config.option("branding")) platform_postfix = platform + base.qt_dst_postfix() # x2t base.create_dir(root_dir + "/converter") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "kernel") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "UnicodeConverter") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "graphics") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "PdfWriter") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "PdfReader") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "DjVuFile") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "XpsFile") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "HtmlFile") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "HtmlRenderer") 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") # 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") if (0 == platform.find("linux")): base.copy_file( core_dir + "/Common/3dParty/icu/" + platform + "/build/libicudata.so.58", root_dir + "/converter/libicudata.so.58") base.copy_file( core_dir + "/Common/3dParty/icu/" + platform + "/build/libicuuc.so.58", root_dir + "/converter/libicuuc.so.58") if (0 == platform.find("mac")): base.copy_file( core_dir + "/Common/3dParty/icu/" + platform + "/build/libicudata.58.dylib", root_dir + "/converter/libicudata.58.dylib") base.copy_file( core_dir + "/Common/3dParty/icu/" + platform + "/build/libicuuc.58.dylib", root_dir + "/converter/libicuuc.58.dylib") # doctrenderer if isWindowsXP: base.copy_lib(core_build_dir + "/lib/" + platform_postfix + "/xp", root_dir + "/converter", "doctrenderer") base.copy_files( core_dir + "/Common/3dParty/v8/v8_xp/" + platform + "/release/icudt*.dll", root_dir + "/converter/") else: base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir + "/converter", "doctrenderer") if (0 == platform.find("win")): base.copy_files( core_dir + "/Common/3dParty/v8/v8/out.gn/" + platform + "/release/icudt*.dat", root_dir + "/converter/") else: base.copy_file( core_dir + "/Common/3dParty/v8/v8/out.gn/" + platform + "/icudtl.dat", root_dir + "/converter/icudtl.dat") base.generate_doctrenderer_config( root_dir + "/converter/DoctRenderer.config", "../editors/", "desktop") base.copy_dir(git_dir + "/desktop-apps/common/converter/empty", root_dir + "/converter/empty") if (False == isWindowsXP) and (0 != platform.find("mac")) and ( 0 != platform.find("ios")): base.copy_exe(core_build_dir + "/lib/" + platform_postfix, root_dir, "HtmlFileInternal") # dictionaries base.create_dir(root_dir + "/dictionaries") base.copy_dir_content(git_dir + "/dictionaries", root_dir + "/dictionaries", "", ".git") base.copy_dir(git_dir + "/desktop-apps/common/package/fonts", root_dir + "/fonts") base.copy_file( git_dir + "/desktop-apps/common/package/license/3dparty/3DPARTYLICENSE", root_dir + "/3DPARTYLICENSE") # cef if not isWindowsXP: base.copy_files( core_dir + "/Common/3dParty/cef/" + platform + "/build/*", root_dir) else: base.copy_files( core_dir + "/Common/3dParty/cef/" + native_platform + "/build/*", root_dir) isUseQt = True if (0 == platform.find("mac")) or (0 == platform.find("ios")): isUseQt = False # libraries base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "hunspell") base.copy_lib(core_build_dir + "/lib/" + platform_postfix, root_dir, "ooxmlsignature") base.copy_lib( core_build_dir + "/lib/" + platform_postfix + ("/xp" if isWindowsXP else ""), root_dir, "ascdocumentscore") if (0 != platform.find("mac")): base.copy_lib( core_build_dir + "/lib/" + platform_postfix + ("/xp" if isWindowsXP else ""), root_dir, "qtascdocumentscore") if (0 == platform.find("mac")): base.copy_dir( core_build_dir + "/bin/" + platform_postfix + "/editors_helper.app", root_dir + "/editors_helper.app") else: base.copy_exe( core_build_dir + "/bin/" + platform_postfix + ("/xp" if isWindowsXP else ""), root_dir, "editors_helper") if isUseQt: base.qt_copy_lib("Qt5Core", root_dir) base.qt_copy_lib("Qt5Gui", root_dir) base.qt_copy_lib("Qt5PrintSupport", root_dir) base.qt_copy_lib("Qt5Svg", root_dir) base.qt_copy_lib("Qt5Widgets", root_dir) base.qt_copy_lib("Qt5Multimedia", root_dir) base.qt_copy_lib("Qt5MultimediaWidgets", root_dir) base.qt_copy_lib("Qt5Network", root_dir) base.qt_copy_lib("Qt5OpenGL", root_dir) base.qt_copy_plugin("bearer", root_dir) base.qt_copy_plugin("iconengines", root_dir) base.qt_copy_plugin("imageformats", root_dir) base.qt_copy_plugin("platforms", root_dir) base.qt_copy_plugin("platforminputcontexts", root_dir) base.qt_copy_plugin("printsupport", root_dir) base.qt_copy_plugin("mediaservice", root_dir) base.qt_copy_plugin("playlistformats", root_dir) base.qt_copy_plugin("platformthemes", root_dir) base.qt_copy_plugin("xcbglintegrations", root_dir) base.qt_copy_plugin("styles", root_dir) if (0 == platform.find("linux")): base.qt_copy_lib("Qt5DBus", root_dir) base.qt_copy_lib("Qt5X11Extras", root_dir) base.qt_copy_lib("Qt5XcbQpa", root_dir) base.qt_copy_icu(root_dir) base.copy_files( base.get_env("QT_DEPLOY") + "/../lib/libqgsttools_p.so*", root_dir) if (0 == platform.find("win")): base.copy_file( git_dir + "/desktop-apps/win-linux/extras/projicons/" + apps_postfix + "/projicons.exe", root_dir + "/DesktopEditors.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")): base.copy_file( git_dir + "/desktop-apps/win-linux/" + apps_postfix + "/DesktopEditors", root_dir + "/DesktopEditors") base.create_dir(root_dir + "/editors") base.copy_dir(base_dir + "/js/" + branding + "/desktop/sdkjs", root_dir + "/editors/sdkjs") base.copy_dir(base_dir + "/js/" + branding + "/desktop/web-apps", root_dir + "/editors/web-apps") base.copy_dir( git_dir + "/desktop-sdk/ChromiumBasedEditors/resources/local", root_dir + "/editors/sdkjs/common/Images/local") base.create_dir(root_dir + "/editors/sdkjs-plugins") base.copy_file(git_dir + "/sdkjs-plugins/LICENSE.txt", root_dir + "/editors/sdkjs-plugins/LICENSE.txt") base.copy_file(git_dir + "/sdkjs-plugins/README.md", root_dir + "/editors/sdkjs-plugins/README.md") base.copy_file(git_dir + "/sdkjs-plugins/plugins.css", root_dir + "/editors/sdkjs-plugins/plugins.css") base.copy_file(git_dir + "/sdkjs-plugins/pluginBase.js", root_dir + "/editors/sdkjs-plugins/pluginBase.js") base.copy_dir( git_dir + "/sdkjs-plugins/youtube", root_dir + "/editors/sdkjs-plugins/{38E022EA-AD92-45FC-B22B-49DF39746DB4}") base.copy_dir( git_dir + "/sdkjs-plugins/ocr", root_dir + "/editors/sdkjs-plugins/{440EBF13-9B19-4BD8-8621-05200E58140B}") base.copy_dir( git_dir + "/sdkjs-plugins/translate", root_dir + "/editors/sdkjs-plugins/{7327FC95-16DA-41D9-9AF2-0E7F449F687D}") base.copy_dir( git_dir + "/sdkjs-plugins/synonim", root_dir + "/editors/sdkjs-plugins/{BE5CBF95-C0AD-4842-B157-AC40FEDD9840}") base.copy_dir( git_dir + "/sdkjs-plugins/code", root_dir + "/editors/sdkjs-plugins/{BE5CBF95-C0AD-4842-B157-AC40FEDD9841}") base.copy_dir( git_dir + "/sdkjs-plugins/photoeditor", root_dir + "/editors/sdkjs-plugins/{07FD8DFA-DFE0-4089-AL24-0730933CC80A}") base.copy_dir( git_dir + "/sdkjs-plugins/macros", root_dir + "/editors/sdkjs-plugins/{E6978D28-0441-4BD7-8346-82FAD68BCA3B}") base.copy_dir( git_dir + "/desktop-sdk/ChromiumBasedEditors/plugins/{8D67F3C5-7736-4BAE-A0F2-8C7127DC4BB8}", root_dir + "/editors/sdkjs-plugins/{8D67F3C5-7736-4BAE-A0F2-8C7127DC4BB8}") #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}") if (0 != platform.find("mac")): base.copy_dir( git_dir + "/desktop-sdk/ChromiumBasedEditors/plugins/{060E6A7D-2766-44E8-A0EE-9A8CB9DB00D1}", root_dir + "/editors/sdkjs-plugins/{060E6A7D-2766-44E8-A0EE-9A8CB9DB00D1}" ) base.copy_dir( git_dir + "/desktop-sdk/ChromiumBasedEditors/plugins/{B509123E-6335-40BD-B965-91EB799346E3}", root_dir + "/editors/sdkjs-plugins/{B509123E-6335-40BD-B965-91EB799346E3}" ) base.copy_dir( git_dir + "/desktop-sdk/ChromiumBasedEditors/plugins/{F7E59EB4-317E-4E0B-AB2C-58E038A59EE2}", root_dir + "/editors/sdkjs-plugins/{F7E59EB4-317E-4E0B-AB2C-58E038A59EE2}" ) base.copy_file(base_dir + "/js/" + branding + "/desktop/index.html", root_dir + "/index.html") base.copy_file( git_dir + "/desktop-apps/common/loginpage/addon/externalcloud.json", root_dir + "/editors/externalcloud.json") if (0 == platform.find("win")): base.copy_lib( git_dir + "/desktop-apps/win-linux/3dparty/WinSparkle/" + platform, root_dir, "WinSparkle") base.delete_file(root_dir + "/cef_sandbox.lib") base.delete_file(root_dir + "/libcef.lib") # all themes generate ---- base.copy_exe(core_build_dir + "/bin/" + platform_postfix, root_dir + "/converter", "allfontsgen") base.copy_exe(core_build_dir + "/bin/" + platform_postfix, root_dir + "/converter", "allthemesgen") if (0 == platform.find("mac")): base.mac_correct_rpath_desktop(root_dir) themes_params = [] if ("" != config.option("themesparams")): themes_params = [ "--params=\"" + config.option("themesparams") + "\"" ] base.cmd_exe(root_dir + "/converter/allfontsgen", [ "--use-system=\"1\"", "--input=\"" + root_dir + "/fonts\"", "--input=\"" + git_dir + "/core-fonts\"", "--allfonts=\"" + root_dir + "/converter/AllFonts.js\"", "--selection=\"" + root_dir + "/converter/font_selection.bin\"" ]) base.cmd_exe(root_dir + "/converter/allthemesgen", [ "--converter-dir=\"" + root_dir + "/converter\"", "--src=\"" + root_dir + "/editors/sdkjs/slide/themes\"", "--allfonts=\"AllFonts.js\"", "--output=\"" + root_dir + "/editors/sdkjs/common/Images\"" ] + themes_params) base.delete_exe(root_dir + "/converter/allfontsgen") base.delete_exe(root_dir + "/converter/allthemesgen") base.delete_file(root_dir + "/converter/AllFonts.js") base.delete_file(root_dir + "/converter/font_selection.bin") base.delete_file(root_dir + "/editors/sdkjs/slide/sdk-all.cache") return
def make_xp(): if not is_xp_platform(): return print("[fetch & build]: v8_xp") old_env = dict(os.environ) base_dir = base.get_script_dir() + "/../../core/Common/3dParty/v8/v8_xp" old_cur = os.getcwd() os.chdir(base_dir) if ("windows" == base.host_platform()): base.set_env("DEPOT_TOOLS_WIN_TOOLCHAIN", "0") base.set_env("GYP_MSVS_VERSION", "2015") base.common_check_version("v8", "1", clean) if not base.is_dir("win_64") and not base.is_dir("win_32"): clean() if not base.is_dir("depot_tools"): base.cmd( "git", ["clone", "http://120.92.49.206:3232/chromiumsrc/depot_tools.git"]) if ("windows" == base.host_platform()): # hack for 32 bit system!!! if base.is_file("depot_tools/cipd.ps1"): base.replaceInFile("depot_tools/cipd.ps1", "windows-386", "windows-amd64") os.environ["PATH"] = os.pathsep.join([ base_dir + "/depot_tools", base_dir + "/depot_tools/win_tools-2_7_13_chromium7_bin/python/bin", config.option("vs-path") + "/../Common7/IDE", os.environ["PATH"] ]) # -------------------------------------------------------------------------- # fetch if not base.is_dir("v8"): base.cmd("./depot_tools/fetch", ["v8"], True) base.cmd("./depot_tools/gclient", ["sync", "-r", "4.10.253"], True) base.delete_dir_with_access_error("v8/buildtools/win") base.cmd("git", ["config", "--system", "core.longpaths", "true"]) base.cmd("gclient", ["sync", "--force"], True) # save common py script base.save_as_script("v8/build/common_xp.py", [ "import os", "def replaceInFile(path, text, textReplace):", " filedata = '';", " with open(path, 'r') as file:", " filedata = file.read()", " filedata = filedata.replace(text, textReplace)", " os.remove(path)", " with open(path, 'w') as file:", " file.write(filedata)", " return", "", "projects = ['v8/tools/gyp/v8_base_0.vcxproj', 'v8/tools/gyp/v8_base_1.vcxproj', 'v8/tools/gyp/v8_base_2.vcxproj', 'v8/tools/gyp/v8_base_3.vcxproj',", "'v8/tools/gyp/v8_libbase.vcxproj', 'v8/tools/gyp/v8_libplatform.vcxproj', 'v8/tools/gyp/v8_nosnapshot.vcxproj', 'v8/tools/gyp/mksnapshot.vcxproj',", "'v8/third_party/icu/icui18n.vcxproj', 'v8/third_party/icu/icuuc.vcxproj']", "", "for file in projects:", " replaceInFile(file, '<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>', '<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>')", " replaceInFile(file, '<RuntimeLibrary>MultiThreaded</RuntimeLibrary>', '<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>')", ]) 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" ]) base.create_dir("win_64/release") base.copy_files("v8/build/Release/lib/*", "win_64/release/") base.copy_file("v8/build/Release/icudt.dll", "win_64/release/icudt.dll") if (-1 != config.option("config").lower().find("debug") ) and not base.is_dir("win_64/debug"): 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 Debug" ]) base.create_dir("win_64/debug") base.copy_files("v8/build/Debug/lib/*", "win_64/debug/") base.copy_file("v8/build/Debug/icudt.dll", "win_64/debug/icudt.dll") if config.check_option("platform", "win_32_xp"): if not base.is_dir("win_32/release"): base.run_as_bat([ "call python v8/build/gyp_v8", "call python v8/build/common_xp.py", "call devenv v8/tools/gyp/v8.sln /Rebuild Release" ]) base.create_dir("win_32/release") base.copy_files("v8/build/Release/lib/*", "win_32/release/") base.copy_file("v8/build/Release/icudt.dll", "win_32/release/icudt.dll") if (-1 != config.option("config").lower().find("debug") ) and not base.is_dir("win_32/debug"): base.run_as_bat([ "call python v8/build/gyp_v8", "call python v8/build/common_xp.py", "call devenv v8/tools/gyp/v8.sln /Rebuild Debug" ]) base.create_dir("win_32/debug") base.copy_files("v8/build/Debug/lib/*", "win_32/debug/") base.copy_file("v8/build/Debug/icudt.dll", "win_32/debug/icudt.dll") os.chdir(old_cur) os.environ.clear() os.environ.update(old_env) return
def make(): print("[fetch & build]: cef") base_dir = base.get_script_dir() + "/../../core/Common/3dParty/cef" old_cur = os.getcwd() os.chdir(base_dir) platforms = ["win_64", "win_32", "win_64_xp", "win_32_xp", "linux_64", "linux_32", "mac_64"] url = "http://d2ettrnqo7v976.cloudfront.net/cef/3770/" for platform in platforms: if not config.check_option("platform", platform): continue url += (platform + "/cef_binary.7z") if not base.is_dir(platform): base.create_dir(platform) os.chdir(platform) data_url = base.get_file_last_modified_url(url) old_data_url = base.readFile("./cef_binary.7z.data") 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_dir("build"): continue # download if not base.is_file("./cef_binary.7z"): base.download(url, "./cef_binary.7z") # extract base.extract("./cef_binary.7z", "./") base.delete_file("./cef_binary.7z.data") base.writeFile("./cef_binary.7z.data", data_url) base.create_dir("./build") # deploy if ("mac_64" != platform): 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 ("mac_64" == platform): base.cmd("mv", ["Chromium Embedded Framework.framework", "build/Chromium Embedded Framework.framework"]) os.chdir(base_dir) os.chdir(old_cur) return
default="", help="defines product") parser.add_option("--package", action="store", type="string", dest="package", default="", help="defines packages") (options, args) = parser.parse_args(sys.argv[1:]) configOptions = vars(options) branding = configOptions["branding"] product = configOptions["product"] package_list = configOptions["package"] base_dir = base.get_script_dir(__file__) # branding if ("" != branding): branding_dir = base_dir + "/../" + branding if base.is_file(branding_dir + "/build_tools/make_packages.py"): base.check_build_version(branding_dir + "/build_tools") base.cmd_in_dir(branding_dir + "/build_tools", "python3", [ "make_packages.py", '--product', product, '--package', package_list ]) exit(0) base.check_build_version(base_dir) # build packages
def make(): if not is_main_platform(): make_xp() return if ("ios" == config.option("platform")): return print("[fetch & build]: v8") base_dir = base.get_script_dir() + "/../../core/Common/3dParty/v8" old_cur = os.getcwd() os.chdir(base_dir) if ("windows" == base.host_platform()): base.set_env("DEPOT_TOOLS_WIN_TOOLCHAIN", "0") base.set_env("GYP_MSVS_VERSION", "2015") base.common_check_version("v8", "1", clean) if not base.is_dir("v8/out.gn"): clean() if not base.is_dir("depot_tools"): base.cmd("git", ["clone", "https://chromium.googlesource.com/chromium/tools/depot_tools.git"]) if ("windows" == base.host_platform()): # hack for 32 bit system!!! base.replaceInFile("depot_tools/cipd.ps1", "windows-386", "windows-amd64") os.environ["PATH"] = base_dir + "/depot_tools" + os.pathsep + os.environ["PATH"] if "ppc64" in platform.machine(): os.environ["VPYTHON_BYPASS"] = "******" if not base.is_dir("v8/out.gn"): base.cmd("gclient") # -------------------------------------------------------------------------- # fetch if not base.is_dir("v8"): base.cmd("./depot_tools/fetch", ["v8"], True) os.chdir(base_dir + "/v8") base.cmd("git", ["checkout", "-b", "6.0", "branch-heads/6.0"], True) os.chdir(base_dir) # -------------------------------------------------------------------------- # correct if not base.is_dir("v8/out.gn"): base.cmd("gclient", ["sync"], True) if ("linux" == base.host_platform()): if base.is_dir("v8/third_party/binutils/Linux_x64/Release"): base.delete_dir("v8/third_party/binutils/Linux_x64/Release") if base.is_dir("v8/third_party/binutils/Linux_ppc64/Release"): base.delete_dir("v8/third_party/binutils/Linux_ppc64/Release") if base.is_dir("v8/third_party/binutils/Linux_ia32/Release"): base.delete_dir("v8/third_party/binutils/Linux_ia32/Release") base.cmd("gclient", ["sync", "--no-history"]) if base.is_dir("v8/third_party/binutils/Linux_x64/Release/bin"): for file in os.listdir("v8/third_party/binutils/Linux_x64/Release/bin"): name = file.split("/")[-1] if ("ld.gold" != name): base.cmd("mv", ["v8/third_party/binutils/Linux_x64/Release/bin/" + name, "v8/third_party/binutils/Linux_x64/Release/bin/old_" + name]) base.cmd("ln", ["-s", "/usr/bin/" + name, "v8/third_party/binutils/Linux_x64/Release/bin/" + name]) if base.is_dir("v8/third_party/binutils/Linux_ppc64/Release/bin"): for file in os.listdir("v8/third_party/binutils/Linux_ppc64/Release/bin"): name = file.split("/")[-1] if ("ld.gold" != name): base.cmd("mv", ["v8/third_party/binutils/Linux_ppc64/Release/bin/" + name, "v8/third_party/binutils/Linux_ppc64/Release/bin/old_" + name]) base.cmd("ln", ["-s", "/usr/bin/" + name, "v8/third_party/binutils/Linux_ppc64/Release/bin/" + name]) if base.is_dir("v8/third_party/binutils/Linux_ia32/Release/bin"): for file in os.listdir("v8/third_party/binutils/Linux_ia32/Release/bin"): name = file.split("/")[-1] if ("ld.gold" != name): base.cmd("mv", ["v8/third_party/binutils/Linux_ia32/Release/bin/" + name, "v8/third_party/binutils/Linux_ia32/Release/bin/old_" + name]) base.cmd("ln", ["-s", "/usr/bin/" + name, "v8/third_party/binutils/Linux_ia32/Release/bin/" + name]) if ("windows" == base.host_platform()): base.replaceInFile("v8/build/config/win/BUILD.gn", ":static_crt", ":dynamic_crt") if ("mac" == base.host_platform()): base.replaceInFile("v8/build/config/mac/mac_sdk.gni", "if (mac_sdk_version != mac_sdk_min_build_override", "if (false && mac_sdk_version != mac_sdk_min_build_override") if "ppc64" in platform.machine(): # Google's gn and ninja binaries won't work, they're x86 only by Google fiat. # Remove them and use the system binaries... try: os.remove(base_dir + "/depot_tools/gn") except: pass try: os.remove(base_dir + "/depot_tools/ninja") except: pass # -------------------------------------------------------------------------- # build os.chdir("v8") if "ppc64le" in platform.machine(): base_args64 = "target_cpu=\\\"ppc64\\\" v8_target_cpu=\\\"ppc64\\\" v8_static_library=true is_component_build=false v8_use_snapshot=false" else: base_args64 = "target_cpu=\\\"x64\\\" v8_target_cpu=\\\"x64\\\" v8_static_library=true is_component_build=false v8_use_snapshot=false" base_args32 = "target_cpu=\\\"x86\\\" v8_target_cpu=\\\"x86\\\" v8_static_library=true is_component_build=false v8_use_snapshot=false" if config.check_option("platform", "linux_64"): base.cmd2("gn", ["gen", "out.gn/linux_64", "--args=\"is_debug=false " + base_args64 + " is_clang=false use_sysroot=false treat_warnings_as_errors=false\""]) base.cmd("ninja", ["-C", "out.gn/linux_64"]) if config.check_option("platform", "linux_32"): base.cmd2("gn", ["gen", "out.gn/linux_32", "--args=\"is_debug=false " + base_args32 + " is_clang=false use_sysroot=false\""]) base.cmd("ninja", ["-C", "out.gn/linux_32"]) if config.check_option("platform", "mac_64"): base.cmd2("gn", ["gen", "out.gn/mac_64", "--args=\"is_debug=false " + base_args64 + "\""]) base.cmd("ninja", ["-C", "out.gn/mac_64"]) 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\""]) base.cmd("ninja", ["-C", "out.gn/win_64/debug"]) base.cmd2("gn", ["gen", "out.gn/win_64/release", "--args=\"is_debug=false " + base_args64 + " is_clang=false\""]) base.cmd("ninja", ["-C", "out.gn/win_64/release"]) if config.check_option("platform", "win_32"): if (-1 != config.option("config").lower().find("debug")): base.cmd2("gn", ["gen", "out.gn/win_32/debug", "--args=\"is_debug=true " + base_args32 + " is_clang=false\""]) base.cmd("ninja", ["-C", "out.gn/win_32/debug"]) base.cmd2("gn", ["gen", "out.gn/win_32/release", "--args=\"is_debug=false " + base_args32 + " is_clang=false\""]) base.cmd("ninja", ["-C", "out.gn/win_32/release"]) os.chdir(old_cur) make_xp() return
def make(): print("[fetch & build]: v8") base_dir = base.get_script_dir() + "/../../core/Common/3dParty/v8" old_cur = os.getcwd() os.chdir(base_dir) if ("windows" == base.host_platform()): base.set_env("DEPOT_TOOLS_WIN_TOOLCHAIN", "0") base.set_env("GYP_MSVS_VERSION", "2015") if not base.is_dir("depot_tools"): base.cmd("git", ["clone", "https://chromium.googlesource.com/chromium/tools/depot_tools.git"]) else: os.chdir(base_dir + "/depot_tools") base.cmd("git", ["reset", "--hard"]) os.chdir(base_dir) os.environ["PATH"] = base_dir + "/depot_tools" + os.pathsep + os.environ["PATH"] if not base.is_dir("v8/out.gn"): base.delete_file("./.gclient") base.delete_file("./.gclient_entries") base.delete_dir("./.cipd") base.cmd("gclient") # -------------------------------------------------------------------------- # fetch if not base.is_dir("v8"): base.cmd("./depot_tools/fetch", ["v8"], True) os.chdir(base_dir + "/v8") base.cmd("git", ["checkout", "-b", "6.0", "branch-heads/6.0"], True) os.chdir(base_dir) # -------------------------------------------------------------------------- # correct if not base.is_dir("v8/out.gn"): base.cmd("gclient", ["sync"], True) if ("linux" == base.host_platform()): if base.is_dir("v8/third_party/binutils/Linux_x64/Release"): base.delete_dir("v8/third_party/binutils/Linux_x64/Release") if base.is_dir("v8/third_party/binutils/Linux_ia32/Release"): base.delete_dir("v8/third_party/binutils/Linux_ia32/Release") base.cmd("gclient", ["sync", "--no-history"]) if base.is_dir("v8/third_party/binutils/Linux_x64/Release/bin"): for file in os.listdir("v8/third_party/binutils/Linux_x64/Release/bin"): name = file.split("/")[-1] if ("ld.gold" != name): base.cmd("mv", ["v8/third_party/binutils/Linux_x64/Release/bin/" + name, "v8/third_party/binutils/Linux_x64/Release/bin/old_" + name]) base.cmd("ln", ["-s", "/usr/bin/" + name, "v8/third_party/binutils/Linux_x64/Release/bin/" + name]) if base.is_dir("v8/third_party/binutils/Linux_ia32/Release/bin"): for file in os.listdir("v8/third_party/binutils/Linux_ia32/Release/bin"): name = file.split("/")[-1] if ("ld.gold" != name): base.cmd("mv", ["v8/third_party/binutils/Linux_ia32/Release/bin/" + name, "v8/third_party/binutils/Linux_ia32/Release/bin/old_" + name]) base.cmd("ln", ["-s", "/usr/bin/" + name, "v8/third_party/binutils/Linux_ia32/Release/bin/" + name]) if ("windows" == base.host_platform()): base.replaceInFile("v8/build/config/win/BUILD.gn", ":static_crt", ":dynamic_crt") if ("mac" == base.host_platform()): base.replaceInFile("v8/build/config/mac/mac_sdk.gni", "if (mac_sdk_version != mac_sdk_min_build_override", "if (false && mac_sdk_version != mac_sdk_min_build_override") # -------------------------------------------------------------------------- # build os.chdir("v8") base_args64 = "target_cpu=\\\"x64\\\" v8_target_cpu=\\\"x64\\\" v8_static_library=true is_component_build=false v8_use_snapshot=false" base_args32 = "target_cpu=\\\"x86\\\" v8_target_cpu=\\\"x86\\\" v8_static_library=true is_component_build=false v8_use_snapshot=false" if config.check_option("platform", "linux_64"): base.cmd2("gn", ["gen", "out.gn/linux_64", "--args=\"is_debug=false " + base_args64 + " is_clang=false use_sysroot=false\""]) base.cmd("ninja", ["-C", "out.gn/linux_64"]) if config.check_option("platform", "linux_32"): base.cmd2("gn", ["gen", "out.gn/linux_32", "--args=\"is_debug=false " + base_args32 + " is_clang=false use_sysroot=false\""]) base.cmd("ninja", ["-C", "out.gn/linux_32"]) if config.check_option("platform", "mac_64"): base.cmd2("gn", ["gen", "out.gn/mac_64", "--args=\"is_debug=false " + base_args64 + "\""]) base.cmd("ninja", ["-C", "out.gn/mac_64"]) 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\""]) base.cmd("ninja", ["-C", "out.gn/win_64/debug"]) base.cmd2("gn", ["gen", "out.gn/win_64/release", "--args=\"is_debug=false " + base_args64 + " is_clang=false\""]) base.cmd("ninja", ["-C", "out.gn/win_64/release"]) if config.check_option("platform", "win_32"): if (-1 != config.option("config").lower().find("debug")): base.cmd2("gn", ["gen", "out.gn/win_32/debug", "--args=\"is_debug=true " + base_args32 + " is_clang=false\""]) base.cmd("ninja", ["-C", "out.gn/win_32/debug"]) base.cmd2("gn", ["gen", "out.gn/win_32/release", "--args=\"is_debug=false " + base_args32 + " is_clang=false\""]) base.cmd("ninja", ["-C", "out.gn/win_32/release"]) os.chdir(old_cur) if config.check_option("platform", "win_64_xp") or config.check_option("platform", "win_32_xp"): make_xp() return
def make(): #check server module to build if (not config.check_option("module", "server")): return git_dir = base.get_script_dir() + "/../.." server_dir = base.get_script_dir() + "/../../server" branding_dir = server_dir + "/branding" if ("" != config.option("branding")): branding_dir = git_dir + '/' + config.option("branding") + '/server' base.cmd_in_dir(server_dir, "npm", ["install"]) base.cmd_in_dir(server_dir, "grunt", ["--no-color", "-v"] + base.server_addons_param()) #env variables product_version = base.get_env('PRODUCT_VERSION') if (not product_version): product_version = "0.0.0" build_number = base.get_env('BUILD_NUMBER') if (not build_number): build_number = "0" license_connections = base.get_env('LICENSE_CONNECTIONS') if (not license_connections): license_connections = "99999" cur_date = datetime.date.today().strftime("%m/%d/%Y") server_build_dir = server_dir + "/build/server" base.replaceInFileRE(server_build_dir + "/Common/sources/commondefines.js", "const buildNumber = [0-9]*", "const buildNumber = " + build_number) base.replaceInFileRE(server_build_dir + "/Common/sources/license.js", "const buildDate = '[0-9-/]*'", "const buildDate = '" + cur_date + "'") base.replaceInFileRE(server_build_dir + "/Common/sources/commondefines.js", "const buildVersion = '[0-9.]*'", "const buildVersion = '" + product_version + "'") base.replaceInFileRE( server_build_dir + "/Common/sources/constants.js", "exports.LICENSE_CONNECTIONS = '[0-9]*'", "exports.LICENSE_CONNECTIONS = '" + license_connections + "'") custom_public_key = branding_dir + '/debug.js' if (base.is_exist(custom_public_key)): base.copy_file(custom_public_key, server_build_dir + '/Common/sources') pkg_target = "node10" if ("linux" == base.host_platform()): pkg_target += "-linux" if ("windows" == base.host_platform()): pkg_target += "-win" base.cmd_in_dir(server_build_dir + "/DocService", "pkg", [ ".", "-t", pkg_target, "--options", "max_old_space_size=4096", "-o", "docservice" ]) base.cmd_in_dir(server_build_dir + "/FileConverter", "pkg", [".", "-t", pkg_target, "-o", "converter"]) base.cmd_in_dir(server_build_dir + "/Metrics", "pkg", [".", "-t", pkg_target, "-o", "metrics"]) base.cmd_in_dir(server_build_dir + "/SpellChecker", "pkg", [".", "-t", pkg_target, "-o", "spellchecker"]) example_dir = base.get_script_dir( ) + "/../../document-server-integration/web/documentserver-example/nodejs" base.delete_dir(example_dir + "/node_modules") base.cmd_in_dir(example_dir, "npm", ["install"]) sync_rpc_lib_dir = example_dir + "/node_modules/sync-rpc/lib" patch_file = base.get_script_dir() + "/../tools/linux/sync-rpc.patch" if ("linux" == base.host_platform()): base.cmd_in_dir(sync_rpc_lib_dir, "patch", ["-N", "-i", patch_file]) if ("windows" == base.host_platform()): patch_exe_dir = base.git_dir() + "/usr/bin" base.cmd_in_dir(patch_exe_dir, "patch.exe", ["-N", "-d", sync_rpc_lib_dir, "-i", patch_file]) base.cmd_in_dir(example_dir, "pkg", [".", "-t", pkg_target, "-o", "example"])
#!/usr/bin/env python import config import base import os import build_js # parse configuration config.parse() config.extend_option("jsminimize", "0") branding = config.option("branding-name") if ("" == branding): branding = "onlyoffice" base_dir = base.get_script_dir() + "/.." out_dir = base_dir + "/../native-sdk/examples/win-linux-mac/build/sdkjs" base.create_dir(out_dir) build_js.build_sdk_native(base_dir + "/../sdkjs/build") vendor_dir_src = base_dir + "/../web-apps/vendor/" sdk_dir_src = base_dir + "/../sdkjs/deploy/sdkjs/" base.join_scripts([ vendor_dir_src + "xregexp/xregexp-all-min.js", vendor_dir_src + "underscore/underscore-min.js", base_dir + "/../sdkjs/common/externs/jszip-utils.js", base_dir + "/../sdkjs/common/Native/native.js", base_dir + "/../sdkjs/common/Native/Wrappers/common.js", base_dir + "/../sdkjs/common/Native/jquery_native.js" ], out_dir + "/banners_word.js")
def build_server_develop(): server_dir = base.get_script_dir() + "/../../server" base.cmd_in_dir(server_dir, "npm", ["install"]) base.cmd_in_dir(server_dir, "grunt", ["develop", "-v"] + base.server_addons_param())
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys sys.path.append('../..') import config import base import os import config current_dir = base.get_script_dir() + "/../../core/Common/3dParty/socketrocket" def buildIOS(): # Build for iphone base.cmd("xcodebuild", [ "-sdk", "iphoneos", "BITCODE_GENERATION_MODE = bitcode", "ENABLE_BITCODE = YES", "OTHER_CFLAGS = -fembed-bitcode", "-configuration", "Release" ]) # Build for simulator base.cmd("xcodebuild", [ "-sdk", "iphonesimulator", "BITCODE_GENERATION_MODE = bitcode", "ENABLE_BITCODE = YES", "OTHER_CFLAGS = -fembed-bitcode", "-configuration", "Release" ]) # Remove arm64 for simulator for SDK 14 base.cmd("lipo", [ "-remove", "arm64", "-output",
def make(): print("[fetch & build]: boost") base_dir = base.get_script_dir() + "/../../core/Common/3dParty/boost" old_cur = os.getcwd() os.chdir(base_dir) # download #url = "https://downloads.sourceforge.net/project/boost/boost/1.58.0/boost_1_58_0.7z" #if not base.is_file("boost_1_58_0.7z"): # base.download("https://downloads.sourceforge.net/project/boost/boost/1.58.0/boost_1_58_0.7z", "boost_1_58_0.7z") #if not base.is_dir("boost_1_58_0"): # base.extract("boost_1_58_0.7z", "./") base.common_check_version("boost", "5", clean) if not base.is_dir("boost_1_72_0"): base.cmd("git", [ "clone", "--recursive", "--depth=1", "https://github.com/boostorg/boost.git", "boost_1_72_0", "-b" "boost-1.72.0" ]) os.chdir("boost_1_72_0") # build if ("windows" == base.host_platform()): win_toolset = "msvc-14.0" if (-1 != config.option("platform").find("win_64") ) and not base.is_dir("../build/win_64"): base.cmd("bootstrap.bat") base.cmd("b2.exe", ["headers"]) base.cmd("b2.exe", ["--clean"]) base.cmd("b2.exe", [ "--prefix=./../build/win_64", "link=static", "--with-filesystem", "--with-system", "--with-date_time", "--with-regex", "--toolset=" + win_toolset, "address-model=64", "install" ]) if (-1 != config.option("platform").find("win_32") ) and not base.is_dir("../build/win_32"): base.cmd("bootstrap.bat") base.cmd("b2.exe", ["headers"]) base.cmd("b2.exe", ["--clean"]) base.cmd("b2.exe", [ "--prefix=./../build/win_32", "link=static", "--with-filesystem", "--with-system", "--with-date_time", "--with-regex", "--toolset=" + win_toolset, "address-model=32", "install" ]) correct_install_includes_win(base_dir, "win_64") correct_install_includes_win(base_dir, "win_32") if (-1 != config.option("platform").find("linux") ) and not base.is_dir("../build/linux_64"): base.cmd("./bootstrap.sh", ["--with-libraries=filesystem,system,date_time,regex"]) base.cmd("./b2", ["headers"]) base.cmd("./b2", ["--clean"]) base.cmd("./b2", [ "--prefix=./../build/linux_64", "link=static", "cxxflags=-fPIC", "install" ]) # TODO: support x86 if (-1 != config.option("platform").find("mac") ) and not base.is_dir("../build/mac_64"): clang_correct() base.cmd("./bootstrap.sh", ["--with-libraries=filesystem,system,date_time,regex"]) base.cmd("./b2", ["headers"]) base.cmd("./b2", ["--clean"]) base.cmd("./b2", ["--prefix=./../build/mac_64", "link=static", "install"]) if (-1 != config.option("platform").find("ios") ) and not base.is_dir("../build/ios"): clang_correct() os.chdir("../") base.bash("./boost_ios") if (-1 != config.option("platform").find("android")): platforms = config.option("platform").split() for platform in platforms: if not platform in config.platforms: continue if (0 != platform.find("android")): continue if (base.is_dir("../build/" + platform)): continue boost_android.make(platform[8:]) os.chdir(old_cur) return
def restore_icu_defs(current_dir): icudef_file = current_dir + "/icudefs.mk" icudef_file_old = current_dir + "/icudefs.mk.back" base.delete_file(icudef_file) base.copy_file(icudef_file_old, icudef_file) base.delete_file(icudef_file_old) return icu_major = "58" icu_minor = "2" current_dir_old = os.getcwd() current_dir = base.get_script_dir() + "/../../core/Common/3dParty/icu" os.chdir(current_dir) if not base.is_dir(current_dir + "/mac_cross_64"): base.create_dir(current_dir + "/mac_cross_64") os.chdir(current_dir + "/mac_cross_64") base.cmd("../icu/source/runConfigureICU", [ "MacOSX", "--prefix=" + current_dir + "/mac_cross_64", "CFLAGS=-Os CXXFLAGS=--std=c++11" ]) change_icu_defs(current_dir + "/mac_cross_64", "x86_64") base.cmd("make", ["-j4"])
def make(): print("[fetch & build]: icu") base_dir = base.get_script_dir() + "/../../core/Common/3dParty/icu" old_cur = os.getcwd() os.chdir(base_dir) icu_major = "58" icu_minor = "2" if not base.is_dir("icu"): base.cmd("svn", ["export", "https://github.com/unicode-org/icu/tags/release-" + icu_major + "-" + icu_minor + "/icu4c", "./icu"]) if ("windows" == base.host_platform()): need_platforms = [] if (-1 != config.option("platform").find("win_64")): need_platforms.append("win_64") if (-1 != config.option("platform").find("win_32")): need_platforms.append("win_32") for platform in need_platforms: if not config.check_option("platform", platform) and not config.check_option("platform", platform + "_xp"): continue if not base.is_dir(platform + "/build"): base.create_dir(platform) base.vcvarsall_start("x64" if ("win_64" == platform) else "x86") base.cmd("MSBuild.exe", ["icu/source/allinone/allinone.sln", "/p:Configuration=Release", "/p:PlatformToolset=v140", "/p:Platform=" + ("X64" if ("win_64" == platform) else "Win32")]) base.vcvarsall_end() bin_dir = "icu/bin64/" if ("win_64" == platform) else "icu/bin/" lib_dir = "icu/lib64/" if ("win_64" == platform) else "icu/lib/" base.create_dir(platform + "/build") base.copy_file(bin_dir + "icudt" + icu_major + ".dll", platform + "/build/") base.copy_file(bin_dir + "icuuc" + icu_major + ".dll", platform + "/build/") base.copy_file(lib_dir + "icudt.lib", platform + "/build/") base.copy_file(lib_dir + "icuuc.lib", platform + "/build/") platform = "" if ("linux" == base.host_platform()): platform = "linux_64" if not base.is_dir(platform + "/build"): base.replaceInFile("./icu/source/i18n/digitlst.cpp", "xlocale", "locale") if ("mac" == base.host_platform()): platform = "mac_64" if not base.is_dir(platform + "/build"): base.replaceInFile("./icu/source/tools/pkgdata/pkgdata.cpp", "cmd, \"%s %s -o %s%s %s %s%s %s %s\",", "cmd, \"%s %s -o %s%s %s %s %s %s %s\",") if (-1 != config.option("platform").find("ios")): if not base.is_dir("build"): base.bash("./icu_ios") elif ("" != platform) and not base.is_dir(platform + "/build"): base.create_dir(platform) os.chdir("icu/source") base.cmd("./runConfigureICU", ["Linux" if "linux" == base.host_platform() else "MacOSX"]) old_dest_dir = base.get_env("DESTDIR") base.set_env("DESTDIR", base_dir + "/" + platform) base.cmd("make", ["install"]) base.set_env("DESTDIR", old_dest_dir) os.chdir("../..") base.create_dir(platform + "/build") if ("linux_64" == platform): base.copy_file("icu/source/lib/libicudata.so." + icu_major + "." + icu_minor, platform + "/build/libicudata.so." + icu_major) base.copy_file("icu/source/lib/libicuuc.so." + icu_major + "." + icu_minor, platform + "/build/libicuuc.so." + icu_major) elif ("mac_64" == platform): base.copy_file("icu/source/lib/libicudata." + icu_major + "." + icu_minor + ".dylib", platform + "/build/libicudata." + icu_major + ".dylib") base.copy_file("icu/source/lib/libicuuc." + icu_major + "." + icu_minor + ".dylib", platform + "/build/libicuuc." + icu_major + ".dylib") os.chdir(old_cur) return
def build_server_develop(): server_dir = base.get_script_dir() + "/../../server" base.cmd_in_dir(server_dir, "npm", ["install", "--registry=https://registry.npm.taobao.org"]) base.cmd_in_dir(server_dir, "grunt", ["develop", "-v"] + base.server_addons_param())
def make(): if not is_main_platform(): make_xp() return base_dir = base.get_script_dir() + "/../../core/Common/3dParty/v8" if ("ios" == config.option("platform")): return if (-1 != config.option("platform").find("android")): base.cmd_in_dir(base_dir + "/android", "python", ["./make.py"]) if (-1 == config.option("platform").find("linux")) and ( -1 == config.option("platform").find("mac")) and ( -1 == config.option("platform").find("win")): return print("[fetch & build]: v8") old_env = dict(os.environ) old_cur = os.getcwd() os.chdir(base_dir) if ("windows" == base.host_platform()): base.set_env("DEPOT_TOOLS_WIN_TOOLCHAIN", "0") base.set_env("GYP_MSVS_VERSION", "2015") base.common_check_version("v8", "1", clean) if not base.is_dir("v8/out.gn"): clean() if not base.is_dir("depot_tools"): base.cmd( "git", ["clone", "http://120.92.49.206:3232/chromiumsrc/depot_tools.git"]) if ("windows" == base.host_platform()): # hack for 32 bit system!!! if base.is_file("depot_tools/cipd.ps1"): base.replaceInFile("depot_tools/cipd.ps1", "windows-386", "windows-amd64") if base.is_file("depot_tools/fetch_configs/v8.py"): base.replaceInFile("depot_tools/fetch_configs/v8.py", "https://chromium.googlesource.com/v8/v8.git", "https://gitee.com/mirrors/V8.git") os.environ[ "PATH"] = base_dir + "/depot_tools" + os.pathsep + os.environ["PATH"] if not base.is_dir("v8/out.gn"): base.cmd("gclient") # -------------------------------------------------------------------------- # fetch if not base.is_dir("v8"): base.cmd("./depot_tools/fetch", ["v8"], True) os.chdir(base_dir + "/v8") base.cmd("git", ["checkout", "-b", "6.0", "branch-heads/6.0"], True) os.chdir(base_dir) # -------------------------------------------------------------------------- # correct if not base.is_dir("v8/out.gn"): # windows hack (delete later) ---------------------- if ("windows" == base.host_platform()): base.delete_dir_with_access_error("v8/buildtools/win") base.cmd("git", ["config", "--system", "core.longpaths", "true"]) base.cmd("gclient", ["sync", "--force"], True) else: base.cmd("gclient", ["sync"], True) # normal version !!! #base.cmd("gclient", ["sync"], True) # -------------------------------------------------- if ("linux" == base.host_platform()): if base.is_dir("v8/third_party/binutils/Linux_x64/Release"): base.delete_dir("v8/third_party/binutils/Linux_x64/Release") if base.is_dir("v8/third_party/binutils/Linux_ia32/Release"): base.delete_dir("v8/third_party/binutils/Linux_ia32/Release") base.cmd("gclient", ["sync", "--no-history"]) if base.is_dir("v8/third_party/binutils/Linux_x64/Release/bin"): for file in os.listdir( "v8/third_party/binutils/Linux_x64/Release/bin"): name = file.split("/")[-1] if ("ld.gold" != name): base.cmd("mv", [ "v8/third_party/binutils/Linux_x64/Release/bin/" + name, "v8/third_party/binutils/Linux_x64/Release/bin/old_" + name ]) base.cmd("ln", [ "-s", "/usr/bin/" + name, "v8/third_party/binutils/Linux_x64/Release/bin/" + name ]) if base.is_dir("v8/third_party/binutils/Linux_ia32/Release/bin"): for file in os.listdir( "v8/third_party/binutils/Linux_ia32/Release/bin"): name = file.split("/")[-1] if ("ld.gold" != name): base.cmd("mv", [ "v8/third_party/binutils/Linux_ia32/Release/bin/" + name, "v8/third_party/binutils/Linux_ia32/Release/bin/old_" + name ]) base.cmd("ln", [ "-s", "/usr/bin/" + name, "v8/third_party/binutils/Linux_ia32/Release/bin/" + name ]) if ("windows" == base.host_platform()): base.replaceInFile("v8/build/config/win/BUILD.gn", ":static_crt", ":dynamic_crt") if ("mac" == base.host_platform()): base.replaceInFile( "v8/build/config/mac/mac_sdk.gni", "if (mac_sdk_version != mac_sdk_min_build_override", "if (false && mac_sdk_version != mac_sdk_min_build_override") base.replaceInFile("v8/build/mac/find_sdk.py", "^MacOSX(10\\.\\d+)\\.sdk$", "^MacOSX(1\\d\\.\\d+)\\.sdk$") # -------------------------------------------------------------------------- # build os.chdir("v8") base_args64 = "target_cpu=\\\"x64\\\" v8_target_cpu=\\\"x64\\\" v8_static_library=true is_component_build=false v8_use_snapshot=false" base_args32 = "target_cpu=\\\"x86\\\" v8_target_cpu=\\\"x86\\\" v8_static_library=true is_component_build=false v8_use_snapshot=false" if config.check_option("platform", "linux_64"): base.cmd2("gn", [ "gen", "out.gn/linux_64", "--args=\"is_debug=false " + base_args64 + " is_clang=" + is_use_clang() + " use_sysroot=false treat_warnings_as_errors=false\"" ]) base.cmd("ninja", ["-C", "out.gn/linux_64"]) if config.check_option("platform", "linux_32"): base.cmd2("gn", [ "gen", "out.gn/linux_32", "--args=\"is_debug=false " + base_args32 + " is_clang=" + is_use_clang() + " use_sysroot=false treat_warnings_as_errors=false\"" ]) base.cmd("ninja", ["-C", "out.gn/linux_32"]) if config.check_option("platform", "mac_64"): base.cmd2("gn", [ "gen", "out.gn/mac_64", "--args=\"is_debug=false " + base_args64 + "\"" ]) base.cmd("ninja", ["-C", "out.gn/mac_64"]) 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\"" ]) base.cmd("ninja", ["-C", "out.gn/win_64/debug"]) base.cmd2("gn", [ "gen", "out.gn/win_64/release", "--args=\"is_debug=false " + base_args64 + " is_clang=false\"" ]) base.cmd("ninja", ["-C", "out.gn/win_64/release"]) if config.check_option("platform", "win_32"): if (-1 != config.option("config").lower().find("debug")): base.cmd2("gn", [ "gen", "out.gn/win_32/debug", "--args=\"is_debug=true " + base_args32 + " is_clang=false\"" ]) base.cmd("ninja", ["-C", "out.gn/win_32/debug"]) base.cmd2("gn", [ "gen", "out.gn/win_32/release", "--args=\"is_debug=false " + base_args32 + " is_clang=false\"" ]) base.cmd("ninja", ["-C", "out.gn/win_32/release"]) os.chdir(old_cur) os.environ.clear() os.environ.update(old_env) make_xp() return
def make(): if ("1" == base.get_env("OO_NO_BUILD_JS")): return base_dir = base.get_script_dir() + "/.." out_dir = base_dir + "/out/js/" branding = config.option("branding-name") if ("" == branding): branding = "onlyoffice" out_dir += branding base.create_dir(out_dir) # builder build_interface(base_dir + "/../web-apps/build") build_sdk_builder(base_dir + "/../sdkjs/build") base.create_dir(out_dir + "/builder") base.copy_dir(base_dir + "/../web-apps/deploy/web-apps", out_dir + "/builder/web-apps") base.copy_dir(base_dir + "/../sdkjs/deploy/sdkjs", out_dir + "/builder/sdkjs") # desktop if config.check_option("module", "desktop"): build_sdk_desktop(base_dir + "/../sdkjs/build") base.create_dir(out_dir + "/desktop") base.copy_dir(base_dir + "/../sdkjs/deploy/sdkjs", out_dir + "/desktop/sdkjs") base.copy_dir(base_dir + "/../web-apps/deploy/web-apps", out_dir + "/desktop/web-apps") if not base.is_file(out_dir + "/desktop/sdkjs/common/AllFonts.js"): base.copy_file( base_dir + "/../sdkjs/common/HtmlFileInternal/AllFonts.js", out_dir + "/desktop/sdkjs/common/AllFonts.js") base.delete_dir(out_dir + "/desktop/web-apps/apps/documenteditor/embed") base.delete_dir(out_dir + "/desktop/web-apps/apps/documenteditor/mobile") base.delete_dir(out_dir + "/desktop/web-apps/apps/presentationeditor/embed") base.delete_dir(out_dir + "/desktop/web-apps/apps/presentationeditor/mobile") base.delete_dir(out_dir + "/desktop/web-apps/apps/spreadsheeteditor/embed") base.delete_dir(out_dir + "/desktop/web-apps/apps/spreadsheeteditor/mobile") base.copy_file( base_dir + "/../web-apps/apps/api/documents/index.html.desktop", out_dir + "/desktop/web-apps/apps/api/documents/index.html") build_interface(base_dir + "/../desktop-apps/common/loginpage/build") base.copy_file( base_dir + "/../desktop-apps/common/loginpage/deploy/index.html", out_dir + "/desktop/index.html") # mobile if config.check_option("module", "mobile"): build_sdk_native(base_dir + "/../sdkjs/build") base.create_dir(out_dir + "/mobile") base.create_dir(out_dir + "/mobile/sdkjs") vendor_dir_src = base_dir + "/../web-apps/vendor/" sdk_dir_src = base_dir + "/../sdkjs/deploy/sdkjs/" # banners base.join_scripts([ vendor_dir_src + "xregexp/xregexp-all-min.js", vendor_dir_src + "underscore/underscore-min.js", sdk_dir_src + "common/Native/native.js", sdk_dir_src + "../../common/Native/Wrappers/common.js", sdk_dir_src + "common/Native/jquery_native.js" ], out_dir + "/mobile/sdkjs/banners.js") base.create_dir(out_dir + "/mobile/sdkjs/word") base.join_scripts([ out_dir + "/mobile/sdkjs/banners.js", sdk_dir_src + "word/sdk-all-min.js", sdk_dir_src + "word/sdk-all.js" ], out_dir + "/mobile/sdkjs/word/script.bin") base.create_dir(out_dir + "/mobile/sdkjs/cell") base.join_scripts([ out_dir + "/mobile/sdkjs/banners.js", sdk_dir_src + "cell/sdk-all-min.js", sdk_dir_src + "cell/sdk-all.js" ], out_dir + "/mobile/sdkjs/cell/script.bin") base.create_dir(out_dir + "/mobile/sdkjs/slide") base.join_scripts([ out_dir + "/mobile/sdkjs/banners.js", sdk_dir_src + "slide/sdk-all-min.js", sdk_dir_src + "slide/sdk-all.js" ], out_dir + "/mobile/sdkjs/slide/script.bin") base.delete_file(out_dir + "/mobile/sdkjs/banners.js") return