Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use as node module #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
build/
node_modules/
Debug/
Release/
*.lock
*.log
package-lock.json
npm-debug.log*

.idea/
.vscode/
.DS_Store
30 changes: 15 additions & 15 deletions build_nodeaddon_mac.sh
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
cd $(dirname $0)

cd `dirname $0`
if [ -d "./demo/node_modules" ];then
cd ./demo
npm run-script postinstall-mac
if [ -d "../../node_modules" ]; then
cd ../../
yarn run postinstall-mac
else
cd ./demo
npm install
npm run-script postinstall-mac
cd ../../
yarn install
yarn run postinstall-mac
fi

version=$(electron --version)
if [ $? -ne 0 ];then
echo "build fail ,electron not install"
exit

if [ $? -ne 0 ]; then
echo "build fail ,electron not install"
exit
else
cd ../
sed -i "" 's/8.2.4/'${version#*v}'/g' ./demo/package.json
node-gyp rebuild --target=${version#*v} --dist-url=https://atom.io/download/electron
cd ./node_modules/zoom-sdk-electron
sed -i "" 's/8.2.4/'${version#*v}'/g' ../../package.json
node-gyp rebuild --target=${version#*v} --dist-url=https://atom.io/download/electron
fi
cp -Rf ./build/Release/zoomsdk.node ./sdk/mac && cp -Rf ./build/Release/zoomsdk_render.node ./sdk/mac


cp -Rf ./build/Release/zoomsdk.node ./sdk/mac && cp -Rf ./build/Release/zoomsdk_render.node ./sdk/mac
27 changes: 27 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
const {
ZOOM_TYPE_OS_TYPE,
ZoomSDK_LANGUAGE_ID,
ZoomSDKError,
ZoomAuthResult,
ZoomLoginStatus,
ZoomMeetingStatus,
ZoomMeetingUIFloatVideoType,
SDKCustomizedStringType,
SDKCustomizedURLType,
ZoomAPPLocale,
} = require("./lib/settings.js");
const ZOOMSDKMOD = require("./lib/zoom_sdk.js");

module.exports = {
ZOOM_TYPE_OS_TYPE,
ZoomSDK_LANGUAGE_ID,
ZoomSDKError,
ZoomAuthResult,
ZoomLoginStatus,
ZoomMeetingStatus,
ZoomMeetingUIFloatVideoType,
SDKCustomizedStringType,
SDKCustomizedURLType,
ZoomAPPLocale,
ZOOMSDKMOD,
};
25 changes: 25 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "zoom-sdk-electron",
"version": "v5.2.41735.0929",
"description": "Zoom Electron Sdk",
"main": "index.js",
"directories": {
"lib": "lib",
"sdk": "sdk"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"install": "node-gyp rebuild"
},
"repository": {
"type": "git",
"url": "git+https://github.com/zoom/zoom-sdk-electron.git"
},
"author": "",
"license": "ISC",
"gypfile": true,
"bugs": {
"url": "https://github.com/zoom/zoom-sdk-electron/issues"
},
"homepage": "https://github.com/zoom/zoom-sdk-electron#readme"
}