Skip to content

Set up development environment for developer

matrixbirds edited this page Nov 13, 2019 · 3 revisions

Windows

Preparation

  • Install nodejs x64 LTS
  • Download agora rtc sdk x64
  • Set up Visual Studio 2015 & Visual Studio C++
  • git
  • agora-electron-quickstart

1. Download the project locally

git clone https://github.com/agoraio/electron-sdk.git

2. Modify the scripts/build.js

Find:

if (platform === 'win32') {
  command.push(`--arch=ia32 --msvs_version=${msvsVersion}`)
}

Replace it by:

 if (platform === 'win32') {
  command.push(`--arch=x64 --msvs_version=${msvsVersion}`)
}

3. Download the agora rtc sdk for Windows x64

Navigate to the folder electron-sdk/, replace the dll, include and .lib file by the files with the same name in the extracted windows x64 package.

4. Install npm dependency

npm install

5. Build Electron Environment

npm run build:electron -- --platform=win32 --msvs_version=vs2015 --electron_version=5.0.8 --debug=true

6. Compile in VS

Navigate to the folder build, open binding.sln by using Visual Studio. After running the compile task successfully, you will see the agora_node_ext.node and the VideoSource.exe in the Release folder.

7. Replace the binary file compiled by the electron-sdk

Replace the agora_node_ext.node and the VideoSource.exe under the folder node_modules/agora-electron-sdk/build/Release in the agora-electron-quickstart project by using the files with the same name under the folder electron-sdk/Release. Replace the dll and win files under the folder node_modules/agora-electron-sdk/sdk/ by using the files with the same name under the folder electron-sdk/sdk.

MAC

Preparation

Install nodejs LTS

  • git
  • Download agora-electron-quickstart
  • Set up xcode & c++

1. Download the project locally

git clone https://github.com/agoraio/electron-sdk.git

2. Install npm dependency

npm install

3. Build Electron Environment

npm run build:electron -- --platform=darwin --arch=x64 --electron_version=5.0.8 --debug=true

4. Compile in Xcode

Open build/binding.xcodeproj by using xcode

5. Replace the binary file compiled by the electron-sdk

Replace the agora_node_ext.node and the VideoSource under the folder node_modules/agora-electron-sdk/build/Release in the electron project by using the agora_node_ext.node and the VideoSource under the products folder in Xcode.