Пример #1
0
    print("\n", "-" * 10, "Installing AGS python plugin", "-" * 10)

    if args.dev:
        rpy_plugin_path = os.path.join(os.path.dirname(__file__), "..", "..",
                                       'ui/Rhino/AGS')
        rpy_plugin_path = os.path.abspath(rpy_plugin_path)
    elif args.plugin_path:
        rpy_plugin_path = os.path.abspath(args.plugin_path)
    else:
        rpy_plugin_path = os.path.dirname(__file__)
        rpy_plugin_path = os.path.join(rpy_plugin_path, "..", "..", "..", "..",
                                       "..")
        rpy_plugin_path = os.path.abspath(rpy_plugin_path)

    install_plugin(rpy_plugin_path, version="6.0")

    print("\n", "-" * 10, "Installing COMPAS packages", "-" * 10)

    install(packages=packages)

    print("\n", "-" * 10, "Installation is successful", "-" * 10)

    print("\n", "-" * 10, "Registering Installation", "-" * 10)

    os.makedirs(compas.APPDATA, exist_ok=True)
    register_json_path = os.path.join(compas.APPDATA, "compas_plugins.json")
    if os.path.exists(register_json_path):
        register_json = json.load(open(register_json_path))
        if not isinstance(register_json["Plugins"], dict):
            register_json["Plugins"] = {}
Пример #2
0
                        action='store_true',
                        help="install dev version of RV2 from current env")
    parser.add_argument('--remove_plugins',
                        action='store_true',
                        help="remove all existing plugins")
    parser.add_argument('--plugin_path',
                        help="The path to the plugin directory.")
    args = parser.parse_args()

    if args.remove_plugins:
        print("\n", "-" * 10, "Removing existing plugins", "-" * 10)
        python_plugins_path = compas_rhino._get_python_plugins_path("6.0")
        print("Plugin location: ", python_plugins_path)
        plugins = os.listdir(python_plugins_path)
        for p in plugins:
            uninstall_plugin(p, version="6.0")

    print("\n", "-" * 10, "Removing existing packages", "-" * 10)
    uninstall()

    print("\n", "-" * 10, "Installing RV2 python plugin", "-" * 10)
    if args.dev:
        install_plugin('ui/Rhino/RV2', version="6.0")
    elif args.plugin_path:
        install_plugin(args.plugin_path, version="6.0")

    print("\n", "-" * 10, "Installing COMPAS packages", "-" * 10)

    install(packages=packages)

    print("\n", "-" * 10, "Installation is successful", "-" * 10)
Пример #3
0
            uninstall_plugin(p, version=args.rhino_version)

    if args.remove_packages:
        print("\n", "-"*10, "Removing existing packages", "-"*10)
        uninstall()

    print("\n", "-"*10, "Installing RV2 python plugin", "-"*10)

    plugin_path = os.path.dirname(__file__)
    plugin_path = os.path.join(plugin_path, 'ui/Rhino/RV2')
    plugin_path = os.path.abspath(plugin_path)

    if os.path.exists(plugin_path):
        python_plugins_path = compas_rhino._get_python_plugins_path(args.rhino_version)
        print("Plugin path:", python_plugins_path)
        install_plugin(plugin_path, version=args.rhino_version)
    else:
        raise RuntimeError("%s does not exist" % plugin_path)

    print("\n", "-"*10, "Installing COMPAS packages", "-"*10)

    install(packages=PACKAGES, version=args.rhino_version)

    print("\n", "-"*10, "Installation is successful", "-"*10)

    print("\n", "-"*10, "Registering Installation", "-"*10)

    os.makedirs(compas.APPDATA, exist_ok=True)
    register_json_path = os.path.join(compas.APPDATA, "compas_plugins.json")

    if os.path.exists(register_json_path):