Skip to content

Commit

Permalink
Merge pull request #101 from AgoraIO/dev/windows-3.0.1
Browse files Browse the repository at this point in the history
Dev/windows 3.0.1
  • Loading branch information
plutoless authored Jun 14, 2020
2 parents cd310b3 + 7b3ab27 commit dc89d00
Show file tree
Hide file tree
Showing 16 changed files with 305 additions and 85 deletions.
3 changes: 2 additions & 1 deletion OpenLive-Windows-MFC/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -352,4 +352,5 @@ ASALocalRun/
*.exe
*.out
*.app
sdk/
sdk/
libs/
12 changes: 12 additions & 0 deletions OpenLive-Windows-MFC/OpenLive/OpenLive.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@
<PostBuildEvent>
<Command>if exist ..\sdk (copy ..\sdk\dll\*.dll ..\Debug\) else if exist ..\..\..\sdk (copy ..\..\..\sdk\dll\*.dll ..\Debug\)</Command>
</PostBuildEvent>
<PreBuildEvent>
<Command>$(SolutionDir)\prebuild.bat $(PlatformTarget) $(SolutionDir)</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
Expand All @@ -146,6 +149,9 @@
<PostBuildEvent>
<Command>if exist ..\sdk (copy ..\sdk\dll\*.dll ..\Debug\) else if exist ..\..\..\sdk (copy ..\..\..\sdk\dll\*.dll ..\Debug\)</Command>
</PostBuildEvent>
<PreBuildEvent>
<Command>$(SolutionDir)\prebuild.bat $(PlatformTarget) $(SolutionDir)</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
Expand Down Expand Up @@ -176,6 +182,9 @@
<PostBuildEvent>
<Command>if exist ..\sdk (copy ..\sdk\dll\*.dll ..\Release\) else if exist ..\..\..\sdk (copy ..\..\..\sdk\dll\*.dll ..\Release\)</Command>
</PostBuildEvent>
<PreBuildEvent>
<Command>$(SolutionDir)\prebuild.bat $(PlatformTarget) $(SolutionDir)</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
Expand Down Expand Up @@ -205,6 +214,9 @@
<PostBuildEvent>
<Command>if exist ..\sdk (copy ..\sdk\dll\*.dll ..\Release\) else if exist ..\..\..\sdk (copy ..\..\..\sdk\dll\*.dll ..\Release\)</Command>
</PostBuildEvent>
<PreBuildEvent>
<Command>$(SolutionDir)\prebuild.bat $(PlatformTarget) $(SolutionDir)</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="AGButton.h" />
Expand Down
27 changes: 16 additions & 11 deletions OpenLive-Windows-MFC/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Open Live Windows
# Open Live Windows

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

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

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)

## Developer Environment Requirements
* VS 2013(or higher), default is vs2017
* Windows 7(or higher)

## Running the App
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.

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

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.

#[AppID]
#[AppID]

#AppID=xxxxxxxxxxxxxxxxxxx
#AppID=xxxxxxxxxxxxxxxxxxx

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).

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

Note:
1. After the program is compiled, if the program "xxx\xxx\xxx\Debug\Language\English.dll" cannot be started when running the program,
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.
2. You may encounter crash when running this demo under debug mode. Please run this demo under release mode.

## Developer Environment Requirements
* VC++ 2013(or higher)
* Windows 7(or higher)

## Connect Us

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

## License

Expand Down
36 changes: 21 additions & 15 deletions OpenLive-Windows-MFC/README.zh.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Open Live Windows
# Open Live Windows

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

Expand All @@ -16,40 +16,46 @@

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

## 环境主备
* vs 2013(或更高版本),默认支持vs2017。
* Windows 7(或更高版本)。

**注意** 使用其他版本需要自行修改该配置,编译release还需要安装兼容xp相关插件。


## 运行示例程序
首先在 [Agora.io 注册](https://dashboard.agora.io/cn/signup/) 注册账号,并创建自己的测试项目,获取到 App ID。将 APP_ID宏定义内容改为刚才申请的 App ID


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


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

#[AppID]
[AppID]

#AppID=xxxxxxxxxxxxxxxxxxx
AppID=xxxxxxxxxxxxxxxxxxx


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

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

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

## 运行环境
* VC++ 2013(或更高版本)
* Windows 7(或更高版本)

## 联系我们

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

## 代码许可

Expand Down
52 changes: 52 additions & 0 deletions OpenLive-Windows-MFC/prebuild.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
set sdkversion=small

set Machine=%~1
set absolute_path=%~2
cd %absolute_path%

if %sdkversion% == origin ( exit )


if %sdkversion% == small (
set sdkinclude=libs\include
if exist %sdkinclude% ( exit )
set sdkdll=libs\x86
set sdklib=libs\x86
if %Machine% == x64 (
set sdkdll=libs\x86_64
set sdklib=libs\x86_64
)
)

if not exist sdk (
mkdir sdk
)

if exist sdk (
pushd sdk
if not exist dll (
mkdir dll
)

if not exist lib (
mkdir lib
)
if not exist include (
mkdir include
)
popd
)

if %sdkversion% == small (
if exist %sdkinclude% (
copy %sdkinclude%\*.h sdk\include
)

if exist %sdklib% (
copy %sdklib%\*.lib sdk\lib /y
)
if exist %sdkdll% (
copy %sdkdll%\*.dll sdk\dll /y
)
)
pause
3 changes: 2 additions & 1 deletion OpenLive-Windows/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,5 @@ sdk/
Makefile*
release/
*.ini
.qmake.stash
.qmake.stash
libs/
55 changes: 26 additions & 29 deletions OpenLive-Windows/OpenLive.pro
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,20 @@ QT += core gui
CONFIG += c++11
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = OpenLive
TEMPLATE = app
SDKPATHNAME=libs
SDKLIBPATHNAME=x86
SDKDLLPATHNAME=x86

!contains(QMAKE_TARGET.arch, x86_64) {
SDKLIBPATHNAME=x86
SDKDLLPATHNAME=x86
} else {
SDKLIBPATHNAME=x86_64
SDKDLLPATHNAME=x86_64
}

TARGET = OpenLive
TEMPLATE = app
SOURCES += main.cpp\
mainwindow.cpp \
agoraconfig.cpp \
Expand Down Expand Up @@ -43,37 +53,24 @@ RESOURCES += \
DISTFILES += \
openlive.rc

exists( $$PWD/../../sdk) {
AGORASDKPATH = $$PWD/../../sdk
AGORASDKDLLPATH =..\..\sdk\dll
exists( $$PWD/$${SDKPATHNAME}) {
AGORASDKPATH = $$PWD/$${SDKPATHNAME}
AGORASDKDLLPATH = .\\$${SDKPATHNAME}\\$${SDKDLLPATHNAME}
} else {
AGORASDKPATH = $$PWD/sdk
AGORASDKDLLPATH = .\sdk\dll
AGORASDKPATH = $$PWD/../../$${SDKPATHNAME}
AGORASDKDLLPATH =..\\..\\$${SDKPATHNAME}\\$${SDKDLLPATHNAME}
}

win32: {
!contains(QMAKE_TARGET.arch, x86_64) {
message(x86)
INCLUDEPATH += $${AGORASDKPATH}/include
LIBS += -L$${AGORASDKPATH}/lib -lagora_rtc_sdk
LIBS += User32.LIB
CONFIG(debug, debug|release) {
QMAKE_POST_LINK += copy $${AGORASDKDLLPATH}\*.dll .\Debug
} else {
QMAKE_POST_LINK += copy $${AGORASDKDLLPATH}\*.dll .\Release
QMAKE_POST_LINK += && windeployqt Release\OpenLive.exe
}
}else {
message(x64)
INCLUDEPATH += $${AGORASDKPATH}/include
LIBS += -L$${AGORASDKPATH}/lib -lagora_rtc_sdk
LIBS += User32.LIB
CONFIG(debug, debug|release) {
QMAKE_POST_LINK += copy $${AGORASDKDLLPATH}\*.dll .\Debug
} else {
QMAKE_POST_LINK += copy $${AGORASDKDLLPATH}\*.dll .\Release
QMAKE_POST_LINK += && windeployqt Release\OpenLive.exe
}
INCLUDEPATH += $${AGORASDKPATH}/include
LIBS += -L$${AGORASDKPATH}/$${SDKLIBPATHNAME} -lagora_rtc_sdk
LIBS += User32.LIB

CONFIG(debug, debug|release) {
QMAKE_POST_LINK += copy $${AGORASDKDLLPATH}\*.dll .\Debug
} else {
QMAKE_POST_LINK += copy $${AGORASDKDLLPATH}\*.dll .\Release
QMAKE_POST_LINK += && windeployqt Release\OpenLive.exe
}

}
Expand Down
22 changes: 13 additions & 9 deletions OpenLive-Windows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,17 @@ This demo is written in **C++**

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)

## Developer Environment Requirements
* VS 2013(or higher)
* QT5.6(or higher)
* Windows 7(or higher)

## Running the App
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.

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

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).
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).

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

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

**Note:**If you fill appid in the code file, appid in ini file will be omitted.

## Developer Environment Requirements
* VC++ 2013(or higher)
* QT5.6(or higher)
* Windows 7(or higher)

## Connect Us

- You can find full API document at [Document Center](https://docs.agora.io/en/)
- You can file bugs about this demo at [issue](https://github.com/AgoraIO/Basic-Video-Call/issues)

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

The MIT License (MIT).
21 changes: 12 additions & 9 deletions OpenLive-Windows/README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@

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

## 环境准备

* VS++ 2013(或更高版本)
* QT5.6(或更高版本)
* Windows 7(或更高版本)

## 运行示例程序
首先在 [Agora.io 注册](https://dashboard.agora.io/cn/signup/) 注册账号,并创建自己的测试项目,获取到 App ID。将 APP_ID宏定义内容改为刚才申请的 App ID

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


## 运行环境
* VC++ 2013(或更高版本)
* QT5.6(或更高版本)
* Windows 7(或更高版本)

## 联系我们

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

## 代码许可

Expand Down
Loading

0 comments on commit dc89d00

Please sign in to comment.