Skip to content

Commit dc89d00

Browse files
authored
Merge pull request #101 from AgoraIO/dev/windows-3.0.1
Dev/windows 3.0.1
2 parents cd310b3 + 7b3ab27 commit dc89d00

16 files changed

Lines changed: 305 additions & 85 deletions

OpenLive-Windows-MFC/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,4 +352,5 @@ ASALocalRun/
352352
*.exe
353353
*.out
354354
*.app
355-
sdk/
355+
sdk/
356+
libs/

OpenLive-Windows-MFC/OpenLive/OpenLive.vcxproj

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@
121121
<PostBuildEvent>
122122
<Command>if exist ..\sdk (copy ..\sdk\dll\*.dll ..\Debug\) else if exist ..\..\..\sdk (copy ..\..\..\sdk\dll\*.dll ..\Debug\)</Command>
123123
</PostBuildEvent>
124+
<PreBuildEvent>
125+
<Command>$(SolutionDir)\prebuild.bat $(PlatformTarget) $(SolutionDir)</Command>
126+
</PreBuildEvent>
124127
</ItemDefinitionGroup>
125128
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
126129
<ClCompile>
@@ -146,6 +149,9 @@
146149
<PostBuildEvent>
147150
<Command>if exist ..\sdk (copy ..\sdk\dll\*.dll ..\Debug\) else if exist ..\..\..\sdk (copy ..\..\..\sdk\dll\*.dll ..\Debug\)</Command>
148151
</PostBuildEvent>
152+
<PreBuildEvent>
153+
<Command>$(SolutionDir)\prebuild.bat $(PlatformTarget) $(SolutionDir)</Command>
154+
</PreBuildEvent>
149155
</ItemDefinitionGroup>
150156
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
151157
<ClCompile>
@@ -176,6 +182,9 @@
176182
<PostBuildEvent>
177183
<Command>if exist ..\sdk (copy ..\sdk\dll\*.dll ..\Release\) else if exist ..\..\..\sdk (copy ..\..\..\sdk\dll\*.dll ..\Release\)</Command>
178184
</PostBuildEvent>
185+
<PreBuildEvent>
186+
<Command>$(SolutionDir)\prebuild.bat $(PlatformTarget) $(SolutionDir)</Command>
187+
</PreBuildEvent>
179188
</ItemDefinitionGroup>
180189
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
181190
<ClCompile>
@@ -205,6 +214,9 @@
205214
<PostBuildEvent>
206215
<Command>if exist ..\sdk (copy ..\sdk\dll\*.dll ..\Release\) else if exist ..\..\..\sdk (copy ..\..\..\sdk\dll\*.dll ..\Release\)</Command>
207216
</PostBuildEvent>
217+
<PreBuildEvent>
218+
<Command>$(SolutionDir)\prebuild.bat $(PlatformTarget) $(SolutionDir)</Command>
219+
</PreBuildEvent>
208220
</ItemDefinitionGroup>
209221
<ItemGroup>
210222
<ClInclude Include="AGButton.h" />

OpenLive-Windows-MFC/README.md

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Open Live Windows
1+
# Open Live Windows
22

33
*其他语言版本: [简体中文](README.zh.md)*
44

@@ -16,34 +16,39 @@ This demo is written in **C++**
1616

1717
A tutorial demo can be found here: [Agora-Windows-Tutorial-1to1](https://github.com/AgoraIO/Basic-Video-Call/tree/master/One-to-One-Video/Agora-Windows-Tutorial-1to1)
1818

19+
## Developer Environment Requirements
20+
* VS 2013(or higher), default is vs2017
21+
* Windows 7(or higher)
22+
1923
## Running the App
2024
First, create a developer account at [Agora.io](https://dashboard.agora.io/signin/), and obtain an App ID. define the APP_ID with your App ID.
2125

22-
#define APP_ID _T("Your App ID")
26+
* #define APP_ID _T("Your App ID")
2327

2428
If you don't want to modify the code part, you can create an AppId.ini file under Debug/Release. Modify the appId value to the App ID you just applied.
2529

26-
#[AppID]
30+
#[AppID]
2731

28-
#AppID=xxxxxxxxxxxxxxxxxxx
32+
#AppID=xxxxxxxxxxxxxxxxxxx
2933

3034
Next, download the **Agora Video SDK** from [Agora.io SDK](https://www.agora.io/en/download/). Unzip the downloaded SDK package and copy the **sdk** to the project folder(the old one may be over written).
3135

32-
Finally, Open OpenLive.sln with your VC++ 2013(or higher) and build all solution and run.
36+
Finally, Open OpenLive.sln with your Vs 2013(or higher) and build all solution and run.
3337

3438
Note:
3539
1. After the program is compiled, if the program "xxx\xxx\xxx\Debug\Language\English.dll" cannot be started when running the program,
3640
please select the OpenLive project in the Solution Explorer and right click. In the pop-up menu bar, select "Set as startup project" to solve. Then run the program again.
3741
2. You may encounter crash when running this demo under debug mode. Please run this demo under release mode.
3842

39-
## Developer Environment Requirements
40-
* VC++ 2013(or higher)
41-
* Windows 7(or higher)
42-
4343
## Connect Us
4444

45-
- You can find full API document at [Document Center](https://docs.agora.io/en/)
46-
- You can file bugs about this demo at [issue](https://github.com/AgoraIO/Basic-Video-Call/issues)
45+
- For potential issues, take a look at our [FAQ](https://docs.agora.io/cn/faq) first
46+
- Dive into [Agora SDK Samples](https://github.com/AgoraIO) to see more tutorials
47+
- Take a look at [Agora Use Case](https://github.com/AgoraIO-usecase) for more complicated real use case
48+
- Repositories managed by developer communities can be found at [Agora Community](https://github.com/AgoraIO-Community)
49+
- You can find full API documentation at [Document Center](https://docs.agora.io/en/)
50+
- If you encounter problems during integration, you can ask question in [Stack Overflow](https://stackoverflow.com/questions/tagged/agora.io)
51+
- You can file bugs about this sample at [issue](https://github.com/AgoraIO/Basic-Video-Broadcasting/issues)
4752

4853
## License
4954

OpenLive-Windows-MFC/README.zh.md

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Open Live Windows
1+
# Open Live Windows
22

33
*Read this in other languages: [English](README.md)*
44

@@ -16,40 +16,46 @@
1616

1717
你也可以在这里查看入门版的示例项目:[Agora-Windows-Tutorial-1to1](https://github.com/AgoraIO/Basic-Video-Call/tree/master/One-to-One-Video/Agora-Windows-Tutorial-1to1)
1818

19+
## 环境主备
20+
* vs 2013(或更高版本),默认支持vs2017。
21+
* Windows 7(或更高版本)。
22+
23+
**注意** 使用其他版本需要自行修改该配置,编译release还需要安装兼容xp相关插件。
24+
25+
1926
## 运行示例程序
2027
首先在 [Agora.io 注册](https://dashboard.agora.io/cn/signup/) 注册账号,并创建自己的测试项目,获取到 App ID。将 APP_ID宏定义内容改为刚才申请的 App ID
2128

2229

23-
#define APP_ID _T("Your App ID")
30+
* #define APP_ID _T("Your App ID")
2431

2532

26-
如果你不想修改代码部分,你可以在在Debug/Release下创建一个AppId.ini文件.修改appId的值为刚才申请的App ID
33+
如果你不想修改代码部分,你可以在在Debug/Release下创建一个AppId.ini文件.修改appId的值为刚才申请的App ID
2734

28-
#[AppID]
35+
[AppID]
2936

30-
#AppID=xxxxxxxxxxxxxxxxxxx
37+
AppID=xxxxxxxxxxxxxxxxxxx
3138

3239

33-
然后在 [Agora.io SDK](https://www.agora.io/cn/download/) 下载 **视频通话 + 直播 SDK**,解压后将其中的 **sdk** 复制到本项目目录下(并覆盖原有旧目录)。
40+
然后在 [Agora.io SDK](https://www.agora.io/cn/download/) 下载 **视频通话 + 直播 SDK**,解压后将其中的 **libs** 复制到本项目目录下(并覆盖原有旧目录)。
41+
最后使用 Vs2017 打开 OpenLive.sln,编译整个解决方案即可运行
3442

35-
最后使用 VC++2013 打开 OpenLive.sln,编译整个解决方案即可运行
43+
**Note:**
3644

37-
Note:
3845
1. 程序编译后,在运行程序时如若出现:无法启动程序"xxx\xxx\xxx\Debug\Language\English.dll"的错误提示,
3946
请在解决方案资源管理器中选中OpenLive 项目,并右击,在弹出的菜单栏中选择 "设为启动项目",即可解决。之后重新运行程序即可。
4047
2. 本开源项目在 debug 模式下运行可能会出现崩溃,请在 release 模式下运行。
4148

42-
## 运行环境
43-
* VC++ 2013(或更高版本)
44-
* Windows 7(或更高版本)
4549

4650
## 联系我们
4751

52+
- 如果你遇到了困难,可以先参阅[常见问题](https://docs.agora.io/cn/faq)
53+
- 如果你想了解更多官方示例,可以参考[官方SDK示例](https://github.com/AgoraIO)
54+
- 如果你想了解声网SDK在复杂场景下的应用,可以参考[官方场景案例](https://github.com/AgoraIO-usecase)
55+
- 如果你想了解声网的一些社区开发者维护的项目,可以查看[社区](https://github.com/AgoraIO-Community)
4856
- 完整的 API 文档见 [文档中心](https://docs.agora.io/cn/)
49-
- 如果在集成中遇到问题,你可以到 [开发者社区](https://dev.agora.io/cn/) 提问
50-
- 如果有售前咨询问题,可以拨打 400 632 6626,或加入官方Q群 12742516 提问
51-
- 如果需要售后技术支持,你可以在 [Agora Dashboard](https://dashboard.agora.io) 提交工单
52-
- 如果发现了示例代码的bug,欢迎提交 [issue](https://github.com/AgoraIO/Basic-Video-Call/issues)
57+
- 若遇到问题需要开发者帮助,你可以到 [开发者社区](https://rtcdeveloper.com/) 提问
58+
- 如果发现了示例代码的 bug,欢迎提交 [issue](https://github.com/AgoraIO/Basic-Video-Broadcasting/issues)
5359

5460
## 代码许可
5561

OpenLive-Windows-MFC/prebuild.bat

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
set sdkversion=small
2+
3+
set Machine=%~1
4+
set absolute_path=%~2
5+
cd %absolute_path%
6+
7+
if %sdkversion% == origin ( exit )
8+
9+
10+
if %sdkversion% == small (
11+
set sdkinclude=libs\include
12+
if exist %sdkinclude% ( exit )
13+
set sdkdll=libs\x86
14+
set sdklib=libs\x86
15+
if %Machine% == x64 (
16+
set sdkdll=libs\x86_64
17+
set sdklib=libs\x86_64
18+
)
19+
)
20+
21+
if not exist sdk (
22+
mkdir sdk
23+
)
24+
25+
if exist sdk (
26+
pushd sdk
27+
if not exist dll (
28+
mkdir dll
29+
)
30+
31+
if not exist lib (
32+
mkdir lib
33+
)
34+
if not exist include (
35+
mkdir include
36+
)
37+
popd
38+
)
39+
40+
if %sdkversion% == small (
41+
if exist %sdkinclude% (
42+
copy %sdkinclude%\*.h sdk\include
43+
)
44+
45+
if exist %sdklib% (
46+
copy %sdklib%\*.lib sdk\lib /y
47+
)
48+
if exist %sdkdll% (
49+
copy %sdkdll%\*.dll sdk\dll /y
50+
)
51+
)
52+
pause

OpenLive-Windows/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,5 @@ sdk/
8080
Makefile*
8181
release/
8282
*.ini
83-
.qmake.stash
83+
.qmake.stash
84+
libs/

OpenLive-Windows/OpenLive.pro

Lines changed: 26 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,20 @@ QT += core gui
88
CONFIG += c++11
99
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
1010

11-
TARGET = OpenLive
12-
TEMPLATE = app
11+
SDKPATHNAME=libs
12+
SDKLIBPATHNAME=x86
13+
SDKDLLPATHNAME=x86
1314

15+
!contains(QMAKE_TARGET.arch, x86_64) {
16+
SDKLIBPATHNAME=x86
17+
SDKDLLPATHNAME=x86
18+
} else {
19+
SDKLIBPATHNAME=x86_64
20+
SDKDLLPATHNAME=x86_64
21+
}
1422

23+
TARGET = OpenLive
24+
TEMPLATE = app
1525
SOURCES += main.cpp\
1626
mainwindow.cpp \
1727
agoraconfig.cpp \
@@ -43,37 +53,24 @@ RESOURCES += \
4353
DISTFILES += \
4454
openlive.rc
4555

46-
exists( $$PWD/../../sdk) {
47-
AGORASDKPATH = $$PWD/../../sdk
48-
AGORASDKDLLPATH =..\..\sdk\dll
56+
exists( $$PWD/$${SDKPATHNAME}) {
57+
AGORASDKPATH = $$PWD/$${SDKPATHNAME}
58+
AGORASDKDLLPATH = .\\$${SDKPATHNAME}\\$${SDKDLLPATHNAME}
4959
} else {
50-
AGORASDKPATH = $$PWD/sdk
51-
AGORASDKDLLPATH = .\sdk\dll
60+
AGORASDKPATH = $$PWD/../../$${SDKPATHNAME}
61+
AGORASDKDLLPATH =..\\..\\$${SDKPATHNAME}\\$${SDKDLLPATHNAME}
5262
}
5363

5464
win32: {
55-
!contains(QMAKE_TARGET.arch, x86_64) {
56-
message(x86)
57-
INCLUDEPATH += $${AGORASDKPATH}/include
58-
LIBS += -L$${AGORASDKPATH}/lib -lagora_rtc_sdk
59-
LIBS += User32.LIB
60-
CONFIG(debug, debug|release) {
61-
QMAKE_POST_LINK += copy $${AGORASDKDLLPATH}\*.dll .\Debug
62-
} else {
63-
QMAKE_POST_LINK += copy $${AGORASDKDLLPATH}\*.dll .\Release
64-
QMAKE_POST_LINK += && windeployqt Release\OpenLive.exe
65-
}
66-
}else {
67-
message(x64)
68-
INCLUDEPATH += $${AGORASDKPATH}/include
69-
LIBS += -L$${AGORASDKPATH}/lib -lagora_rtc_sdk
70-
LIBS += User32.LIB
71-
CONFIG(debug, debug|release) {
72-
QMAKE_POST_LINK += copy $${AGORASDKDLLPATH}\*.dll .\Debug
73-
} else {
74-
QMAKE_POST_LINK += copy $${AGORASDKDLLPATH}\*.dll .\Release
75-
QMAKE_POST_LINK += && windeployqt Release\OpenLive.exe
76-
}
65+
INCLUDEPATH += $${AGORASDKPATH}/include
66+
LIBS += -L$${AGORASDKPATH}/$${SDKLIBPATHNAME} -lagora_rtc_sdk
67+
LIBS += User32.LIB
68+
69+
CONFIG(debug, debug|release) {
70+
QMAKE_POST_LINK += copy $${AGORASDKDLLPATH}\*.dll .\Debug
71+
} else {
72+
QMAKE_POST_LINK += copy $${AGORASDKDLLPATH}\*.dll .\Release
73+
QMAKE_POST_LINK += && windeployqt Release\OpenLive.exe
7774
}
7875

7976
}

OpenLive-Windows/README.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,17 @@ This demo is written in **C++**
1616

1717
A tutorial demo can be found here: [Agora-Windows-Tutorial-1to1](https://github.com/AgoraIO/Basic-Video-Call/tree/master/One-to-One-Video/Agora-Windows-Tutorial-1to1)
1818

19+
## Developer Environment Requirements
20+
* VS 2013(or higher)
21+
* QT5.6(or higher)
22+
* Windows 7(or higher)
23+
1924
## Running the App
2025
First, create a developer account at [Agora.io](https://dashboard.agora.io/signin/), and obtain an App ID. define the APP_ID with your App ID.
2126

2227
* #define APP_ID _T("Your App ID")
2328

24-
Next, download the **Agora Video SDK** from [Agora.io SDK](https://www.agora.io/en/download/). Unzip the downloaded SDK package and copy the **sdk** to the project folder(the old one may be over written).
29+
Next, download the **Agora Video SDK** from [Agora.io SDK](https://www.agora.io/en/download/). Unzip the downloaded SDK package and copy the **libs** to the project folder(the old one may be over written).
2530

2631
Finally, Open OpenLive.pro with your Qt5.6(or higher) and build current project and run.
2732

@@ -31,17 +36,16 @@ Finally, Open OpenLive.pro with your Qt5.6(or higher) and build current project
3136
AppId=xxxx
3237

3338
**Note:**If you fill appid in the code file, appid in ini file will be omitted.
34-
35-
## Developer Environment Requirements
36-
* VC++ 2013(or higher)
37-
* QT5.6(or higher)
38-
* Windows 7(or higher)
3939

4040
## Connect Us
4141

42-
- You can find full API document at [Document Center](https://docs.agora.io/en/)
43-
- You can file bugs about this demo at [issue](https://github.com/AgoraIO/Basic-Video-Call/issues)
44-
42+
- For potential issues, take a look at our [FAQ](https://docs.agora.io/cn/faq) first
43+
- Dive into [Agora SDK Samples](https://github.com/AgoraIO) to see more tutorials
44+
- Take a look at [Agora Use Case](https://github.com/AgoraIO-usecase) for more complicated real use case
45+
- Repositories managed by developer communities can be found at [Agora Community](https://github.com/AgoraIO-Community)
46+
- You can find full API documentation at [Document Center](https://docs.agora.io/en/)
47+
- If you encounter problems during integration, you can ask question in [Stack Overflow](https://stackoverflow.com/questions/tagged/agora.io)
48+
- You can file bugs about this sample at [issue](https://github.com/AgoraIO/Basic-Video-Broadcasting/issues)
4549
## License
4650

4751
The MIT License (MIT).

OpenLive-Windows/README.zh.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616

1717
你也可以在这里查看入门版的示例项目:[Agora-Windows-Tutorial-1to1](https://github.com/AgoraIO/Basic-Video-Call/tree/master/One-to-One-Video/Agora-Windows-Tutorial-1to1)
1818

19+
## 环境准备
20+
21+
* VS++ 2013(或更高版本)
22+
* QT5.6(或更高版本)
23+
* Windows 7(或更高版本)
24+
1925
## 运行示例程序
2026
首先在 [Agora.io 注册](https://dashboard.agora.io/cn/signup/) 注册账号,并创建自己的测试项目,获取到 App ID。将 APP_ID宏定义内容改为刚才申请的 App ID
2127

@@ -33,18 +39,15 @@
3339
**注意:**如果代码里指定了appid就不会使用ini文件的appid。
3440

3541

36-
## 运行环境
37-
* VC++ 2013(或更高版本)
38-
* QT5.6(或更高版本)
39-
* Windows 7(或更高版本)
40-
4142
## 联系我们
4243

44+
- 如果你遇到了困难,可以先参阅[常见问题](https://docs.agora.io/cn/faq)
45+
- 如果你想了解更多官方示例,可以参考[官方SDK示例](https://github.com/AgoraIO)
46+
- 如果你想了解声网SDK在复杂场景下的应用,可以参考[官方场景案例](https://github.com/AgoraIO-usecase)
47+
- 如果你想了解声网的一些社区开发者维护的项目,可以查看[社区](https://github.com/AgoraIO-Community)
4348
- 完整的 API 文档见 [文档中心](https://docs.agora.io/cn/)
44-
- 如果在集成中遇到问题,你可以到 [开发者社区](https://dev.agora.io/cn/) 提问
45-
- 如果有售前咨询问题,可以拨打 400 632 6626,或加入官方Q群 12742516 提问
46-
- 如果需要售后技术支持,你可以在 [Agora Dashboard](https://dashboard.agora.io) 提交工单
47-
- 如果发现了示例代码的bug,欢迎提交 [issue](https://github.com/AgoraIO/Basic-Video-Call/issues)
49+
- 若遇到问题需要开发者帮助,你可以到 [开发者社区](https://rtcdeveloper.com/) 提问
50+
- 如果发现了示例代码的 bug,欢迎提交 [issue](https://github.com/AgoraIO/Basic-Video-Broadcasting/issues)
4851

4952
## 代码许可
5053

0 commit comments

Comments
 (0)