Skip to content

Latest commit

 

History

History
132 lines (93 loc) · 2.78 KB

README.md

File metadata and controls

132 lines (93 loc) · 2.78 KB

Development Guide

English | 中文

Introduction

ODC has a centralized deployment web version and a locally run client version. The web version requires ODC Server to run, while the client version automatically installs the corresponding dependencies and generates a standalone installation package.

Project Initialization

Environment Requirements

  1. Nodejs 16 or above
  2. pnpm
  3. Minimum 8GB RAM
  4. (Optional, required for generating Mac client) MacOS system

Client Dependency Installation (Skip for Web Version)

ODC Server

After packaging the ODC Server Jar file, store it in the following directory: Build Jar

libraries
 - java
   - odc.jar
   - plugins
     - plugin-related packages
   - starters
     - starter-related packages
pnpm run prepack jar
JRE
# Use ODC provided JRE
pnpm run prepack jre
OBClient
# Use ODC provided OBClient
pnpm run prepack obclient

Install Dependencies

pnpm install

Configure ODC Server Address

Modify the proxy field in config/config.js and change the target attribute to the address of the ODC Server.

proxy: {
    '/api/v1/webSocket/obclient': {
      target: 'ODC Server Address',
      ws: true,
    },
    '/api/': {
      target: 'ODC Server Address',
    },
    '/oauth2/': {
      target: 'ODC Server Address',
    },
    '/login/': {
      target: 'ODC Server Address',
    }
  }

Development

Web Version Development

pnpm run dev

This will start a web server on the default 8000 port. Access http://localhost:8000 to open ODC.

Client Development

ODC client is developed based on Electron. We need to start two services: the web server and the Electron server.

Start the Client Web Server
pnpm run dev:client

After it starts successfully, we can proceed to start Electron.

Start Electron
pnpm run start-electron

Build

Web Version Build

pnpm run build:odc

The packaged artifacts can be found in dist/renderer.

Client Build

# Build for win, linux, mac
node ./scripts/client/build.js all

You can adjust the command parameters to selectively build different installation packages. Currently, the following types are supported:

  1. mac - dmg installation package
  2. linux_x86 - x86_64 version deb, AppImage installation package
  3. linux_aarch64 - arm64 version deb, AppImage installation package
  4. win - win32, win64 version installation package
  5. all - all installation packages