Skip to content

Commit

Permalink
Merge branch 'feat/3.9.0/screencapture'
Browse files Browse the repository at this point in the history
  • Loading branch information
nmgwddj committed Aug 11, 2021
2 parents fb6fbfb + 763285a commit 9327c48
Show file tree
Hide file tree
Showing 44 changed files with 9,588 additions and 1,442 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/node-gyp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: node-gyp

on: [push]

env:
# Path to the solution file relative to the root of the project.
SOLUTION_FILE_PATH: .

# Configuration type to build.
# You can convert this to a build matrix if you need coverage of multiple configuration types.
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
BUILD_CONFIGURATION: Release

jobs:
darwin:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14.17.1'
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
# Build x64
- run: npm install --verbose
- run: npx just fetch-wrapper --target_platform=darwin --target_arch=x64
- run: npx just build --runtime=electron --target=9.4.4 --target_platform=darwin --target_arch=x64
- run: npx just build --runtime=electron --target=11.4.5 --target_platform=darwin --target_arch=x64
- run: npx just build --runtime=electron --target=12.0.11 --target_platform=darwin --target_arch=x64
# Upload artifacts
- uses: actions/upload-artifact@v2
with:
path: ${{ github.workspace }}/packages/*.tar.gz

win32:
runs-on: windows-2016
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14.17.1'
architecture: 'x64' # optional, x64 or x86. If not specified, x64 will be used by default

- name: Add MSBuild to PATH
uses: microsoft/[email protected]

# Build ia32
- run: npm install --verbose
- run: npx just fetch-wrapper --target_platform=win32 --target_arch=ia32
- run: npx just build --runtime=electron --target=9.4.4 --target_platform=win32 --target_arch=ia32
- run: npx just build --runtime=electron --target=11.4.5 --target_platform=win32 --target_arch=ia32
- run: npx just build --runtime=electron --target=12.0.11 --target_platform=win32 --target_arch=ia32
# Build x64
- run: npx just fetch-wrapper --target_platform=win32 --target_arch=x64
- run: npx just build --runtime=electron --target=9.4.4 --target_platform=win32 --target_arch=x64
- run: npx just build --runtime=electron --target=11.4.5 --target_platform=win32 --target_arch=x64
- run: npx just build --runtime=electron --target=12.0.11 --target_platform=win32 --target_arch=x64
# Upload artifacts
- uses: actions/upload-artifact@v2
with:
path: ${{ github.workspace }}/packages/*.tar.gz
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ bin/*
log/
out/
build/
nertc_sdk/
nertc_sdk/
*.zip
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 李天意
Copyright (c) 2021 Oleg Lee

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# node-nertc-sdk
# nertc-electron-sdk

3.9.0-rc-903
## Installation

```bash
npm install nertc-electron-sdk
```

based on 网易云信 https://netease.im/
60 changes: 36 additions & 24 deletions binding.gyp
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"targets": [
{
'target_name': 'nertc-sdk',
'target_name': 'nertc-electron-sdk',
'include_dirs': [
'./shared',
'./shared/libyuv/include',
'./nertc_sdk',
'./nertc_sdk/api'
'./nertc_sdk/api',
'./nertc_sdk/nertc_sdk_Mac.framework/Headers/'
],
'sources': [
'./nertc_sdk_node/nertc_node_engine.cpp',
Expand All @@ -25,6 +26,7 @@
'./shared/sdk_helper/nim_node_async_queue.cpp',
'./shared/sdk_helper/nim_event_handler.h',
'./shared/sdk_helper/nim_event_handler.cpp',
'./shared/sdk_helper/superfasthash.cpp',
'./shared/libyuv/source/compare_common.cc',
'./shared/libyuv/source/compare.cc',
'./shared/libyuv/source/convert_argb.cc',
Expand Down Expand Up @@ -54,12 +56,20 @@
[
'OS=="win"',
{
'copies': [{
'destination': '<(PRODUCT_DIR)',
'files': [
'./nertc_sdk/dll/nertc_sdk.dll',
'./nertc_sdk/dll/protoopp.dll',
'./nertc_sdk/dll/SDL2.dll',
]
}],
'defines': [
'WIN32',
'WIN32_LEAN_AND_MEAN'
],
'library_dirs': [
'./nertc_sdk/libs/windows/x86/'
'./nertc_sdk/lib/'
],
'link_settings': {
'libraries': [
Expand All @@ -69,14 +79,9 @@
},
'msvs_settings': {
'VCCLCompilerTool': {
# 'WarningLevel': '3',
# 'DisableSpecificWarnings': ['4819'],
# 'WarnAsError': 'false',
# 'ExceptionHandling': '0',
'AdditionalOptions': [
# '/EHsc',
'/utf-8'
]
]
}
},
'defines!': [
Expand All @@ -87,35 +92,33 @@
'./shared/libyuv/source/compare_win.cc',
'./shared/libyuv/source/rotate_win.cc',
'./shared/libyuv/source/row_win.cc',
'./shared/libyuv/source/scale_win.cc'
'./shared/libyuv/source/scale_win.cc',
'./shared/util/windows_helper.h',
'./shared/util/windows_helper.cpp',
'./shared/util/string_util.h',
'./shared/util/string_util.cpp',
'./shared/util/ConvertUTF.c',
'./shared/util/ConvertUTF.h'
],
'configurations': {
'Release': {
'msvs_settings': {
'VCCLCompilerTool': {
# 多线程 DLL (/MD)
'RuntimeLibrary': '2',
# 完全优化 /Os
'Optimization': '2',
# 使用内部函数 /Oi
'EnableIntrinsicFunctions': 'true',
# 程序数据库 (/Zi)
'DebugInformationFormat': '3',
'AdditionalOptions': [
]
]
}
},
},
'Debug': {
'msvs_settings': {
'VCCLCompilerTool': {
'RuntimeLibrary': '3',
# 'WarningLevel': '3',
# 'DisableSpecificWarnings': ['4819'],
# 'WarnAsError': 'false',
# 'ExceptionHandling': '0',
'AdditionalOptions': [
]
]
}
},
}
Expand All @@ -125,20 +128,28 @@
[
'OS=="mac"',
{
'copies': [{
'destination': '<(PRODUCT_DIR)',
'files': [
'./nertc_sdk/nertc_sdk_Mac.framework',
'./nertc_sdk/NEFundation_Mac.framework'
]
}],
'defines': [
],
'mac_framework_dirs': [
'../nertc_sdk/bin/darwin'
'../nertc_sdk/'
],
'library_dirs': [
'../nertc_sdk/bin/darwin'
'../nertc_sdk/'
],
'link_settings': {
'libraries': [
'Foundation.framework',
'nertc_sdk_Mac.framework',
'NEFundation_Mac.framework',
'-rpath ./macsdk/'
'-rpath ./nertc_sdk/',
'-Wl,-rpath,@loader_path'
]
},
'sources': [
Expand All @@ -152,11 +163,12 @@
'MACOSX_DEPLOYMENT_TARGET': '10.14',
'EXCUTABLE_EXTENSION': 'node',
'FRAMEWORK_SEARCH_PATHS': [
'./nertc_sdk/bin/darwin'
],
'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
'OTHER_CFLAGS': [
],
}# xcode_settings
}
}
]
]
Expand Down
Loading

0 comments on commit 9327c48

Please sign in to comment.