Skip to content

Commit 2035ba1

Browse files
authored
[README] Update Windows instructions (#2036)
* windows-readme * nits * nits * nits * nits
1 parent 29201e3 commit 2035ba1

File tree

1 file changed

+29
-9
lines changed

1 file changed

+29
-9
lines changed

Diff for: README.md

+29-9
Original file line numberDiff line numberDiff line change
@@ -81,43 +81,63 @@ By default we download all the libraries from GitHub and build them locally, so
8181

8282
### Configuring on Windows
8383

84-
Install [MS Visual Studio Community / Enterprise](https://visualstudio.microsoft.com/vs/community/), [Strawberry perl](https://strawberryperl.com/), and [Chocolatey](https://chocolatey.org/install) if not installed already
84+
#### Installing the dependencies / environment
85+
Install [MS Visual Studio Community / Enterprise](https://visualstudio.microsoft.com/vs/community/), [Strawberry perl](https://strawberryperl.com/), and [Chocolatey](https://chocolatey.org/install) if not installed already.
8586

86-
Get the libraries by running the following in powershell
87+
Install the libraries by running the following in `powershell`
8788
```shell
89+
choco install pkgconfiglite
8890
choco install gstreamer
8991
choco install gstreamer-devel
9092
curl.exe -o C:\tools\pthreads-w32-2-9-1-release.zip ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-2-9-1-release.zip
9193
mkdir C:\tools\pthreads-w32-2-9-1-release\
9294
Expand-Archive -Path C:\tools\pthreads-w32-2-9-1-release.zip -DestinationPath C:\tools\pthreads-w32-2-9-1-release
9395
```
94-
95-
Modify the path to the downloaded and unzipped PThreads in cmake in `build_windows_openssl.bat` if needed / unzipped at a path other than the one mentioned above
96+
#### Customizing the `.github\build_windows_openssl.bat` file
97+
If you unzipped at a path other than the one mentioned above / your pkg-config is in a different location, modify the path to the downloaded and unzipped PThreads in cmake in `.github\build_windows_openssl.bat`
9698
```shell
97-
cmake -G "NMake Makefiles" -DBUILD_TEST=TRUE -DEXT_PTHREAD_INCLUDE_DIR="C:/tools/pthreads-w32-2-9-1-release/Pre-built.2/include/" -DEXT_PTHREAD_LIBRARIES="C:/tools/pthreads-w32-2-9-1-release/Pre-built.2/lib/x64/libpthreadGC2.a" ..
99+
cmake -G "NMake Makefiles" -DPKG_CONFIG_EXECUTABLE="D:\\gstreamer\\1.0\\x86_64\\bin\\pkg-config.exe" -DEXT_PTHREAD_INCLUDE_DIR="C:/tools/pthreads-w32-2-9-1-release/Pre-built.2/include/" -DEXT_PTHREAD_LIBRARIES="C:/tools/pthreads-w32-2-9-1-release/Pre-built.2/lib/x64/libpthreadGC2.a" ..
98100
```
99-
Modify the path to MSVC as well in the `build_windows_openssl.bat` if needed / installed a different version / location
100101

102+
If not using MSVC Enterprise 2022 or have MSVC in a different location modify the path to MSVC as well in the `.github\build_windows_openssl.bat`
103+
104+
##### Enterprise
101105
```shell
102106
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64
103107
```
104108

109+
##### Community
110+
```shell
111+
call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64
112+
```
113+
114+
##### Custom version
115+
```shell
116+
call "C:\Program Files\Microsoft Visual Studio\<your-version>\Community\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64
117+
```
118+
119+
#### Allowing long paths
105120
Allow long paths before we start the build
106121
```shell
107122
git config --system core.longpaths true
108123
```
109124

110125
Note that if the paths are still too long (which can cause the build to fail unfortunately), we recommend renaming the folders to use shorter names and moving them to `C:/`
111126

112-
Build the SDK
127+
#### Building the SDK
128+
129+
Run the script that we customized above
113130

114131
```shell
115132
.github\build_windows_openssl.bat
116133
```
117134

118-
To run the sample application, make sure that you've exported the following paths and appended them to env:Path for powershell
135+
#### Customizing and setting PATH to run the samples
136+
To run the sample application, make sure that you've exported the following paths and appended them to env:Path for `powershell`.
137+
138+
Modify the `<path-to-webrtc-root>\open-source\bin`, `<path-to-webrtc-root>\build`, `<path-to-pthreads-unzip-location>\pthreads-w32-2-9-1-release\Pre-built.2\dll\x64`
119139
```shell
120-
$env:Path += ';C:\webrtc\open-source\bin;C:\tools\pthreads-w32-2-9-1-release\Pre-built.2\dll\x64;C:\webrtc\build'
140+
$env:Path += ';<path-to-webrtc-root>\open-source\bin;<path-to-pthreads-unzip-location>\pthreads-w32-2-9-1-release\Pre-built.2\dll\x64;<path-to-webrtc-root>\build'
121141
```
122142

123143
### Dependency requirements

0 commit comments

Comments
 (0)