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