Exemple #1
0
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
Exemple #2
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")

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/cell/native/common.js",
    base_dir + "/../sdkjs/common/Native/jquery_native.js"
], out_dir + "/banners_cell.js")

base.join_scripts([
    vendor_dir_src + "xregexp/xregexp-all-min.js",