From 76244784116a1efc6c676220e8e741e7bda17210 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E5=B9=BF?= Date: Thu, 6 Apr 2023 09:51:58 +0800 Subject: [PATCH] add script --- .gitignore | 3 ++- build-docker.sh | 2 ++ build.sh | 4 ++++ pack.sh | 6 ++++++ src/HkStreamer.cpp | 2 +- 5 files changed, 15 insertions(+), 2 deletions(-) create mode 100755 build-docker.sh create mode 100755 build.sh create mode 100755 pack.sh diff --git a/.gitignore b/.gitignore index e003da9..3e42f70 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .qtc_clangd -build \ No newline at end of file +build +dist \ No newline at end of file diff --git a/build-docker.sh b/build-docker.sh new file mode 100755 index 0000000..8192cad --- /dev/null +++ b/build-docker.sh @@ -0,0 +1,2 @@ +#!/bin/bash +docker run --rm -v `pwd`:/apps -w /apps danger89/cmake:latest ./build.sh \ No newline at end of file diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..509f599 --- /dev/null +++ b/build.sh @@ -0,0 +1,4 @@ +#!/bin/bash +cmake -S . -B build +cd build +cmake --build . \ No newline at end of file diff --git a/pack.sh b/pack.sh new file mode 100755 index 0000000..45b85e3 --- /dev/null +++ b/pack.sh @@ -0,0 +1,6 @@ +#!/bin/bash +mkdir -p dist +cp build/hkstreamer dist/ +cp -r lib dist/ +cd dist +tar -cvzf hkstreamer.tar.gz . \ No newline at end of file diff --git a/src/HkStreamer.cpp b/src/HkStreamer.cpp index 871ff8c..d073ae1 100644 --- a/src/HkStreamer.cpp +++ b/src/HkStreamer.cpp @@ -139,7 +139,7 @@ int _readChannelConfig(long lUserID,LPStream stream){ if(checkResult(!resCode, "read channel config fail")){ return HPR_ERROR; } - int startNum = ipcfg.dwStartDChan; + if(checkResult(stream->lChannel > ipcfg.dwDChanNum, "channel not correct")){ return HPR_ERROR; }