Skip to content
Merged
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ bld/
# Autogenerated VS solution and project files
*.csproj
*.sln
!Plugin~/*.sln

# Visual Studio 2017 auto generated files
Generated\ Files/
Expand Down
18 changes: 9 additions & 9 deletions .yamato/promotion.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
yamato_name: webrtc
test_editors:
- version: 2019.1
test_platforms:
Expand All @@ -7,13 +8,12 @@ test_platforms:
flavor: b1.large
packages:
- name: webrtc
- name: renderstreaming
---

{% for editor in test_editors %}
{% for platform in test_platforms %}
promotion_test_{{ platform.name }}_{{ editor.version }}:
name : Promotion Test {{ editor.version }} on {{ platform.name }}
name : {{ yamato_name }} Promotion Test {{ editor.version }} on {{ platform.name }}
agent:
type: {{ platform.type }}
image: {{ platform.image }}
Expand All @@ -24,24 +24,24 @@ promotion_test_{{ platform.name }}_{{ editor.version }}:
- npm install upm-ci-utils@stable -g --registry https://api.bintray.com/npm/unity/unity-npm
- upm-ci package test --unity-version {{ editor.version }}
artifacts:
logs:
{{ yamato_name }}_promotion_test_results:
paths:
- "upm-ci~/test-results/**/*"
dependencies:
{% for package in packages %}
- .yamato/upm-ci-renderstreaming-packages.yml#pack_{{ package.name }}
- .yamato/upm-ci-{{ yamato_name }}-packages.yml#pack_{{ package.name }}
{% endfor %}
{% endfor %}
{% endfor %}

promotion_test_trigger:
name: Promotion Tests Trigger
name: {{ yamato_name }} Promotion Tests Trigger
agent:
type: Unity::VM
image: package-ci/win10:stable
flavor: b1.large
artifacts:
logs:
{{ yamato_name }}_promotion_trigger_test_results:
paths:
- "upm-ci~/test-results/**/*"
packages:
Expand All @@ -55,7 +55,7 @@ promotion_test_trigger:
{% endfor %}

promote:
name: Promote to Production
name: Promote {{ yamato_name }} to Production
agent:
type: Unity::VM
image: package-ci/win10:stable
Expand All @@ -70,12 +70,12 @@ promote:
only:
- /^(r|R)elease-\d+\.\d+\.\d+(-preview(\.\d+)?)?$/
artifacts:
artifacts:
{{ yamato_name }}_promote_artifacts:
paths:
- "upm-ci~/packages/*.tgz"
dependencies:
{% for package in packages %}
- .yamato/upm-ci-renderstreaming-packages.yml#pack_{{ package.name }}
- .yamato/upm-ci-{{ yamato_name }}-packages.yml#pack_{{ package.name }}
{% endfor %}
{% for editor in test_editors %}
{% for platform in test_platforms %}
Expand Down
2 changes: 1 addition & 1 deletion .yamato/upm-ci-libwebrtc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ platforms:
type: Unity::VM
image: renderstreaming/win10:v0.1.2-276056
flavor: b1.xlarge
build_command: build_libwebrtc.cmd
build_command: BuildScripts~/build_libwebrtc.cmd
projects:
- name: libwebrtc
---
Expand Down
11 changes: 1 addition & 10 deletions .yamato/upm-ci-publish-github-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ platforms:
- name: mac
packages:
- name: webrtc
- name: renderstreaming
---
publish_github_release:
name: Publish Github Release
Expand All @@ -14,21 +13,13 @@ publish_github_release:
commands:
- npm install github-release-cli -g
- github-release upload -o "Unity-Technologies" -r "UnityRenderStreaming" -t "%GIT_TAG%" -n "%GIT_TAG%" "upm-ci~/packages/com.unity.webrtc-%GIT_TAG%.tgz"
- github-release upload -o "Unity-Technologies" -r "UnityRenderStreaming" -t "%GIT_TAG%" -n "%GIT_TAG%" "upm-ci~/packages/com.unity.renderstreaming-%GIT_TAG%.tgz"
- github-release upload -o "Unity-Technologies" -r "UnityRenderStreaming" -t "%GIT_TAG%" -n "%GIT_TAG%" "upm-ci~/packages/com.unity.template.renderstreaming-%GIT_TAG%.tgz"
- github-release upload -o "Unity-Technologies" -r "UnityRenderStreaming" -t "%GIT_TAG%" -n "%GIT_TAG%" "Assets/bin~/webserver"
- github-release upload -o "Unity-Technologies" -r "UnityRenderStreaming" -t "%GIT_TAG%" -n "%GIT_TAG%" "Assets/bin~/webserver.exe"
- github-release upload -o "Unity-Technologies" -r "UnityRenderStreaming" -t "%GIT_TAG%" -n "%GIT_TAG%" "artifacts/webrtc-win.zip"
triggers:
tags:
only:
- /^(v|V)?\d+\.\d+\.\d+(-preview(\.\d+)?)?$/
dependencies:
{% for package in packages%}
- .yamato/upm-ci-renderstreaming-packages.yml#pack_{{ package.name }}
{% endfor %}
- .yamato/upm-ci-template.yml#pack
{% for platform in platforms %}
- .yamato/upm-ci-webapp.yml#pack_{{ platform.name }}
- .yamato/upm-ci-webrtc-packages.yml#pack_{{ package.name }}
{% endfor %}
- .yamato/upm-ci-libwebrtc.yml#build_win
25 changes: 9 additions & 16 deletions .yamato/upm-ci-webrtc-packages.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# .yamato/upm-ci-renderstreaming-packages.yml
# .yamato/upm-ci-webrtc-packages.yml
editors:
- version: 2019.1
- version: 2019.2
Expand All @@ -13,10 +13,7 @@ platforms:
packages:
- name: webrtc
packagename: com.unity.webrtc
prepack_command: build_plugin.cmd
- name: renderstreaming
packagename: com.unity.renderstreaming
prepack_command:
prepack_command: BuildScripts~/build_plugin.cmd

---
{% for package in packages %}
Expand All @@ -29,10 +26,6 @@ prepack_{{ package.name }}_{{ platform.name }}:
flavor: {{ platform.flavor}}
commands:
- {{ package.prepack_command}}
artifacts:
{{ package.name }}_{{ platform.name }}_prepack:
paths:
- "Packages/{{ package.packagename }}/**/*"
{% endfor %}

pack_{{ package.name }}:
Expand All @@ -43,14 +36,14 @@ pack_{{ package.name }}:
flavor: b1.large
commands:
- npm install upm-ci-utils -g --registry https://api.bintray.com/npm/unity/unity-npm
- upm-ci package pack --package-path Packages/{{ package.packagename }}
- upm-ci package pack
artifacts:
{{ package.name }}_package:
paths:
- "upm-ci~/packages/**/*"
dependencies:
{% for platform in platforms %}
- .yamato/upm-ci-renderstreaming-packages.yml#prepack_{{ package.name }}_{{ platform.name }}
- .yamato/upm-ci-{{ package.name }}-packages.yml#prepack_{{ package.name }}_{{ platform.name }}
{% endfor %}

{% for editor in editors %}
Expand All @@ -63,7 +56,7 @@ test_{{ package.name }}_{{ platform.name }}_{{ editor.version }}:
flavor: {{ platform.flavor}}
commands:
- npm install upm-ci-utils -g --registry https://api.bintray.com/npm/unity/unity-npm
- upm-ci package test -u {{ editor.version }} --package-path Packages/{{ package.packagename }}
- upm-ci package test -u {{ editor.version }}
triggers:
branches:
only:
Expand All @@ -76,7 +69,7 @@ test_{{ package.name }}_{{ platform.name }}_{{ editor.version }}:
paths:
- "upm-ci~/test-results/**/*"
dependencies:
- .yamato/upm-ci-renderstreaming-packages.yml#pack_{{ package.name }}
- .yamato/upm-ci-{{ package.name }}-packages.yml#pack_{{ package.name }}
{% endfor %}
{% endfor %}

Expand All @@ -88,7 +81,7 @@ publish_{{ package.name }}:
flavor: b1.large
commands:
- npm install upm-ci-utils -g --registry https://api.bintray.com/npm/unity/unity-npm
- upm-ci package publish --package-path Packages/{{ package.packagename }}
- upm-ci package publish
triggers:
tags:
only:
Expand All @@ -98,10 +91,10 @@ publish_{{ package.name }}:
paths:
- "upm-ci~/packages/*.tgz"
dependencies:
- .yamato/upm-ci-renderstreaming-packages.yml#pack_{{ package.name }}
- .yamato/upm-ci-{{ package.name }}-packages.yml#pack_{{ package.name }}
{% for editor in editors %}
{% for platform in platforms %}
- .yamato/upm-ci-renderstreaming-packages.yml#test_{{ package.name }}_{{ platform.name }}_{{ editor.version }}
- .yamato/upm-ci-{{ package.name }}-packages.yml#test_{{ package.name }}_{{ platform.name }}_{{ editor.version }}
{% endfor %}
{% endfor %}
{% endfor %}
File renamed without changes.
2 changes: 1 addition & 1 deletion Unescape.ps1 → BuildScripts~/Unescape.ps1
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Add-Type -AssemblyName System.Web
Add-Type -AssemblyName System.Web
(gc $Args[0]) | Out-String | % { [System.Web.HttpUtility]::HtmlDecode($_) } | Set-Content -Path $Args[0]
File renamed without changes.
3 changes: 1 addition & 2 deletions build_plugin.cmd → BuildScripts~/build_plugin.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

set WebRTC_VERSION=M72
set LIBWEBRTC_DOWNLOAD_URL=https://github.com/karasusan/build-webrtc/releases/download/v0.1.0/webrtc-win.zip
set SOLUTION_DIR=%cd%\Plugin
set PLUGIN_DIR=%cd%\Packages\com.unity.webrtc\Runtime\Plugins\x86_64
set SOLUTION_DIR=%cd%\Plugin~

echo -------------------
echo Download LibWebRTC
Expand Down
31 changes: 31 additions & 0 deletions Plugin~/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# プラグイン

`com.unity.webrtc` が依存するネイティブプラグインのビルド及び配置の方法について説明します。

### libwebrtc の組み込み

プラグインは **libwebrtc** に依存しているため、ビルドするために libwebrtc をスタティックリンクする必要があります。Github Release ページに `webrtc-win.zip` を配置しています。
<img src="../Packages/com.unity.webrtc/Documentation~/images/libwebrtc_github_release.png" width=600 align=center>

zip ファイルを展開後、Plugin フォルダ直下に配置します。

<img src="../Packages/com.unity.webrtc/Documentation~/images/deploy_libwebrtc.png" width=500 align=center>

### 開発環境

version 1.0 現在、ビルドは **Visual Studio 2017** を利用しています。

### プロジェクトの設定

プラグインの開発を行うためには、個別の環境に合わせて`WebRTCPlugin` プロジェクトのプロパティを変更する必要があります。

`Command` に Unity の実行ファイルパス、`Command Arguments` にプロジェクトパスを指定してください。この設定を行うことで、デバッグ実行時に Unity エディタが起動し、ブレークポイントが有効になります。

<img src="../Packages/com.unity.webrtc/Documentation~/images/command_config_vs2017.png" width=600 align=center>

### プラグインの配置

ビルド実行すると、`webrtc.dll` が `Packages\com.unity.webrtc\Runtime\Plugins\x86_64` に配置されます。このとき Unity のインスペクタ上で以下の設定になっていることを確認してください。

<img src="../Packages/com.unity.webrtc/Documentation~/images/inspector_webrtc_plugin.png" width=600 align=center>

32 changes: 32 additions & 0 deletions Plugin~/README_EN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Building the Plugin

This guide will cover building and deploying the native plugin `com.unity.webrtc` depends on.

### Embedding libwebrtc

The plugin relies on **libwebrtc**, so building it requires a static libwebrtc link. `webrtc-win.zip` can be found on the Github Release page.

<img src="../Packages/com.unity.webrtc/Documentation~/images/libwebrtc_github_release.png" width=600 align=center>

Extract the files from the zip, and place them in the Plugin folder.

<img src="../Packages/com.unity.webrtc/Documentation~/images/deploy_libwebrtc.png" width=500 align=center>

### Build

Version 1.0 is currently built with **Visual Studio 2017**.

### Project Settings

The `WebRTCPlugin` project properties must be adjusted to match your environment in order to build the plugin.

Set the Unity .exe path under `Command` and the project path under `Command Arguments`. Once set, during debugging the Unity Editor will run and breakpoints will be enabled.

<img src="../Packages/com.unity.webrtc/Documentation~/images/command_config_vs2017.png" width=600 align=center>

### Deploying the Plugin

When you run the build, `webrtc.dll` will be placed in `Packages\com.unity.webrtc\Runtime\Plugins\x86_64`. You should then be able to verify the following settings in the Unity Inspector window.

<img src="../Packages/com.unity.webrtc/Documentation~/images/inspector_webrtc_plugin.png" width=600 align=center>

36 changes: 36 additions & 0 deletions Plugin~/UnityRenderStreamingPlugin.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.168
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A4FF90C2-F334-42A1-9113-EEFD06C242B2}"
ProjectSection(SolutionItems) = preProject
..\.editorconfig = ..\.editorconfig
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebRTCPlugin", "WebRTCPlugin\WebRTCPlugin.vcxproj", "{94D2206F-BF45-45BD-8E13-214A3ED917AE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{94D2206F-BF45-45BD-8E13-214A3ED917AE}.Debug|x64.ActiveCfg = Debug|x64
{94D2206F-BF45-45BD-8E13-214A3ED917AE}.Debug|x64.Build.0 = Debug|x64
{94D2206F-BF45-45BD-8E13-214A3ED917AE}.Debug|x86.ActiveCfg = Debug|Win32
{94D2206F-BF45-45BD-8E13-214A3ED917AE}.Debug|x86.Build.0 = Debug|Win32
{94D2206F-BF45-45BD-8E13-214A3ED917AE}.Release|x64.ActiveCfg = Release|x64
{94D2206F-BF45-45BD-8E13-214A3ED917AE}.Release|x64.Build.0 = Release|x64
{94D2206F-BF45-45BD-8E13-214A3ED917AE}.Release|x86.ActiveCfg = Release|Win32
{94D2206F-BF45-45BD-8E13-214A3ED917AE}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {8A11BBD6-F885-493B-A8D0-16DED9CF9CED}
EndGlobalSection
EndGlobal
Loading