Skip to content

Commit 9ea0652

Browse files
committed
Update documentation and scripts for Visual Studio 2022 compatibility and AVBlocks Core version
1 parent 8122660 commit 9ea0652

File tree

5 files changed

+51
-17
lines changed

5 files changed

+51
-17
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ xcode/
2525

2626
vs2017/
2727
vs2019/
28+
vs2022/
2829

2930

3031

configure.ps1

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@ New-Item -Force -ItemType Directory $script_dir/build/debug_demo_x64
99
New-Item -Force -ItemType Directory $script_dir/build/release_demo_x64
1010

1111
# setup Visual C++ environment
12-
# see: https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=vs-2017
13-
# see: https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=vs-2019
12+
# see: https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=vs-2022
1413

15-
$vs_install_dir = $(Get-VSSetupInstance | Select-VSSetupInstance -Version '[15.0,16.0]' | Select-Object -ExpandProperty InstallationPath)
14+
$vs_install_dir = $(Get-VSSetupInstance | Select-VSSetupInstance -Version '[17.0,18.0]' | Select-Object -ExpandProperty InstallationPath)
1615
$vs_common_tools = "${vs_install_dir}/Common7/Tools/"
1716

1817
./scripts/Invoke-CmdScript.ps1 "$vs_common_tools/VsDevCmd.bat" "-arch=amd64 -host_arch=amd64"

docs/build-windows.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,23 @@ start .\primo-avblocks-cpp.sln
7474
popd
7575
```
7676

77+
### Generate Visual Studio 2022 project
78+
79+
```powershell
80+
new-item -Force -ItemType Directory ./vs2022
81+
pushd ./vs2022
82+
cmake cmake -G "Visual Studio 17 2022" -A x64 -DPLATFORM=x64 ..
83+
popd
84+
```
85+
86+
Open the project in Visual Studio:
87+
88+
```powershell
89+
pushd ./vs2022
90+
start .\primo-avblocks-cpp.sln
91+
popd
92+
```
93+
7794
### Build
7895

7996
In the Visual Studio menu select `Build| Build Solution`

docs/download-avblocks-core-and-assets-windows.md

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,35 @@ In the script below, change the tag to the release that you need. For the availa
1414

1515
```powershell
1616
# select version and platform
17-
$tag='v3.0.0-demo.1'
17+
$tag='v3.1.0-demo.1'
1818
$platform='windows'
1919
2020
# download
2121
new-item -Force -ItemType Directory ./sdk
22+
cd ./sdk
23+
24+
# sdk
2225
curl.exe `
2326
--location `
24-
--output ./sdk/avblocks_$tag-$platform.zip `
25-
https://github.com/avblocks/avblocks-core/releases/download/$tag/avblocks_$tag-$platform.zip
27+
--output ./avblocks-$tag-$platform.zip `
28+
https://github.com/avblocks/avblocks-core/releases/download/$tag/avblocks-$tag-$platform.zip
2629
30+
31+
# sha256 checksum
32+
curl.exe `
33+
--location `
34+
--output ./avblocks-$tag-$platform.zip.sha256 `
35+
https://github.com/avblocks/avblocks-core/releases/download/$tag/avblocks-$tag-$platform.zip.sha256
36+
37+
# verify checksum
38+
$downloadedHash = (Get-FileHash -Algorithm SHA256 ./avblocks-$tag-$platform.zip).Hash.ToLower()
39+
$expectedHash = (Get-Content ./avblocks-$tag-$platform.zip.sha256).Split(' ')[0].ToLower()
40+
if ($downloadedHash -eq $expectedHash) { Write-Host "Checksum OK!"; } else { { Write-Host "Checksum failed!"; } }
41+
2742
# unzip
28-
pushd sdk
29-
expand-archive -Force -Path avblocks_$tag-$platform.zip -DestinationPath .
30-
popd
43+
expand-archive -Force -Path avblocks-$tag-$platform.zip -DestinationPath .
44+
45+
cd ..
3146
```
3247

3348
## Assets
@@ -36,14 +51,16 @@ These demo audio and video assets are used as input for the AVBlocks samples.
3651

3752
```powershell
3853
new-item -Force -ItemType Directory ./assets
54+
cd ./assets
55+
3956
curl.exe `
4057
--location `
41-
--output ./assets/avblocks_assets_v1.zip `
58+
--output ./avblocks_assets_v1.zip `
4259
https://github.com/avblocks/avblocks-assets/releases/download/v1/avblocks_assets_v1.zip
4360
4461
# unzip
45-
pushd assets
4662
expand-archive -Force -Path avblocks_assets_v1.zip -DestinationPath .
47-
popd
63+
64+
cd ..
4865
```
4966

docs/setup-windows.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ choco config set cacheLocation C:/ChocoCache
3838
choco upgrade chocolatey
3939
```
4040

41-
## Visual Studio 2017
41+
## Visual Studio 2022
4242

43-
This is needed for the C++ compiler. Install [Visual Studio 2017 Community Edition](https://visualstudio.microsoft.com/vs/older-downloads/).
43+
This is needed for the C++ compiler. Install [Visual Studio 2022 Community Edition](https://visualstudio.microsoft.com/vs/older-downloads/).
4444

4545
During installation select C++ desktop development and latest Windows 10 SDK.
4646

47-
After installation open Visual Studio and check for updates. Install the latest 2017 version that is available.
47+
After installation open Visual Studio and check for updates. Install the latest 2022 version that is available.
4848

4949
## CMake
5050

@@ -85,11 +85,11 @@ Test. Close and reopen PowerShell:
8585

8686
```powershell
8787
Get-VSSetupInstance `
88-
| Select-VSSetupInstance -Version '[15.0,16.0]' `
88+
| Select-VSSetupInstance -Version '[17.0,18.0]' `
8989
| Select-Object -ExpandProperty InstallationPath
9090
```
9191

92-
> This finds the installation path for Visual Studio 2017.
92+
> This finds the installation path for Visual Studio 2022.
9393
9494
See [Selecting an Instance](https://github.com/Microsoft/vssetup.powershell/wiki/Selecting-an-Instance)
9595

0 commit comments

Comments
 (0)