Skip to content

Commit 345fab5

Browse files
committed
Added AppVeyor config
1 parent 2490bec commit 345fab5

File tree

11 files changed

+181
-27
lines changed

11 files changed

+181
-27
lines changed

appveyor.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
version: 1.0.{build}
2+
branches:
3+
only:
4+
- main
5+
image: Visual Studio 2022
6+
build_script:
7+
- ps: .\build_nuget.ps1
8+
artifacts:
9+
- path: Output\*.nupkg
10+
name: NugetPackages
11+
deploy:
12+
- provider: NuGet
13+
api_key:
14+
secure: SpmYcFTtKxHbv/9755B2KPjhS0iuD/LQKvIVksFyFDV3TExX0vmhnp8rE8qA6fo+
15+
username:
16+
secure: 1K8aMtHh4cgJD51abewigQ==
17+
artifact: NugetPackages

build_nuget.ps1

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Initialize build environment
2+
Write-Host 'Finding Visual Studio...' -ForegroundColor Magenta
3+
$vsPath = .\Tools\vswhere.exe -latest -property installationPath
4+
Write-Host $vsPath
5+
6+
Write-Host 'Importing environment variables...' -ForegroundColor Magenta
7+
cmd.exe /c "call `"$vsPath\VC\Auxiliary\Build\vcvars64.bat`" && set > %temp%\vcvars.txt"
8+
Get-Content "$env:temp\vcvars.txt" | Foreach-Object {
9+
if ($_ -match "^(.*?)=(.*)$") {
10+
Set-Content "env:\$($matches[1])" $matches[2]
11+
}
12+
}
13+
14+
# Build projects
15+
$coreCount = (Get-CimInstance -class Win32_ComputerSystem).NumberOfLogicalProcessors
16+
$configurations = "Debug", "Release"
17+
$platforms = "x64", "x86"
18+
19+
foreach ($platform in $platforms) {
20+
foreach ($config in $configurations) {
21+
Write-Host "Building $platform $config..." -ForegroundColor Magenta
22+
MSBuild.exe .\warpr.sln -t:warp-drive -p:Configuration=$config -p:Platform=$platform -m:$coreCount -v:m
23+
}
24+
}
25+
26+
# Pack nuget
27+
Write-Host 'Creating output directory...' -ForegroundColor Magenta
28+
New-Item -Path '.\Output' -ItemType Directory -Force
29+
30+
Write-Host 'Patching nuspec...' -ForegroundColor Magenta
31+
$nuspec = [xml](Get-Content "$PSScriptRoot\warp-drive\Warpr.WarpDrive.nuspec")
32+
33+
$nuspec.package.metadata.version = if ($null -ne $env:APPVEYOR_BUILD_VERSION) { $env:APPVEYOR_BUILD_VERSION } else { "1.0.0.0" }
34+
$nuspec.package.metadata.repository.branch = if ($null -ne $env:APPVEYOR_REPO_BRANCH) { $env:APPVEYOR_REPO_BRANCH } else { "main" }
35+
$commit = if ($null -ne $env:APPVEYOR_REPO_COMMIT) { $env:APPVEYOR_REPO_COMMIT } else { $null }
36+
if ($null -ne $commit) {
37+
$nuspec.package.metadata.repository.SetAttribute("commit", $commit)
38+
}
39+
40+
$nuspec.Save("$PSScriptRoot\warp-drive\WarpDrive.Patched.nuspec")
41+
42+
Write-Host 'Creating nuget package...' -ForegroundColor Magenta
43+
.\Tools\nuget.exe pack .\warp-drive\WarpDrive.Patched.nuspec -OutputDirectory .\Output
44+
Remove-Item -Path '.\warp-drive\WarpDrive.Patched.nuspec'

desk-beamer/desk-beamer.cpp

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#include "Include\WarpDrive.h"
22

3-
#include <iostream>
4-
53
using namespace Warpr;
64
using namespace Warpr::Capture;
75
using namespace std;
@@ -15,17 +13,6 @@ int main()
1513

1614
WarpDrive drive{ configuration };
1715

18-
this_thread::sleep_for(10000s);
16+
system("pause");
1917
return 0;
20-
}
21-
22-
// Run program: Ctrl + F5 or Debug > Start Without Debugging menu
23-
// Debug program: F5 or Debug > Start Debugging menu
24-
25-
// Tips for Getting Started:
26-
// 1. Use the Solution Explorer window to add/manage files
27-
// 2. Use the Team Explorer window to connect to source control
28-
// 3. Use the Output window to see build output and other messages
29-
// 4. Use the Error List window to view errors
30-
// 5. Go to Project > Add New Item to create new code files, or Project > Add Existing Item to add existing code files to the project
31-
// 6. In the future, to open this project again, go to File > Open > Project and select the .sln file
18+
}

desk-beamer/desk-beamer.vcxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,16 +109,16 @@
109109
</ItemGroup>
110110
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
111111
<ImportGroup Label="ExtensionTargets">
112-
<Import Project="..\packages\Axodox.Common.1.0.47\build\native\Axodox.Common.targets" Condition="Exists('..\packages\Axodox.Common.1.0.47\build\native\Axodox.Common.targets')" />
113-
<Import Project="..\packages\libdatachannel.0.22.4\build\native\libdatachannel.targets" Condition="Exists('..\packages\libdatachannel.0.22.4\build\native\libdatachannel.targets')" />
114112
<Import Project="..\packages\nvenc.12.2.72\build\native\nvenc.targets" Condition="Exists('..\packages\nvenc.12.2.72\build\native\nvenc.targets')" />
113+
<Import Project="..\packages\libdatachannel.0.22.4.1\build\native\libdatachannel.targets" Condition="Exists('..\packages\libdatachannel.0.22.4.1\build\native\libdatachannel.targets')" />
114+
<Import Project="..\packages\Axodox.Common.1.0.48\build\native\Axodox.Common.targets" Condition="Exists('..\packages\Axodox.Common.1.0.48\build\native\Axodox.Common.targets')" />
115115
</ImportGroup>
116116
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
117117
<PropertyGroup>
118118
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
119119
</PropertyGroup>
120-
<Error Condition="!Exists('..\packages\Axodox.Common.1.0.47\build\native\Axodox.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Axodox.Common.1.0.47\build\native\Axodox.Common.targets'))" />
121-
<Error Condition="!Exists('..\packages\libdatachannel.0.22.4\build\native\libdatachannel.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\libdatachannel.0.22.4\build\native\libdatachannel.targets'))" />
122120
<Error Condition="!Exists('..\packages\nvenc.12.2.72\build\native\nvenc.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\nvenc.12.2.72\build\native\nvenc.targets'))" />
121+
<Error Condition="!Exists('..\packages\libdatachannel.0.22.4.1\build\native\libdatachannel.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\libdatachannel.0.22.4.1\build\native\libdatachannel.targets'))" />
122+
<Error Condition="!Exists('..\packages\Axodox.Common.1.0.48\build\native\Axodox.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Axodox.Common.1.0.48\build\native\Axodox.Common.targets'))" />
123123
</Target>
124124
</Project>

desk-beamer/packages.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Axodox.Common" version="1.0.47" targetFramework="native" />
4-
<package id="libdatachannel" version="0.22.4" targetFramework="native" />
3+
<package id="Axodox.Common" version="1.0.48" targetFramework="native" />
4+
<package id="libdatachannel" version="0.22.4.1" targetFramework="native" />
55
<package id="nvenc" version="12.2.72" targetFramework="native" />
66
</packages>

tools/nuget.exe

6.47 MB
Binary file not shown.

tools/vswhere.exe

444 KB
Binary file not shown.

warp-drive/Warpr.WarpDrive.nuspec

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<?xml version="1.0"?>
2+
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
3+
<metadata>
4+
<!-- The identifier that must be unique within the hosting gallery -->
5+
<id>Warpr.WarpDrive</id>
6+
7+
<!-- The package version number that is used when resolving dependencies -->
8+
<version>1.0.0.0</version>
9+
10+
<!-- Authors contain text that appears directly on the gallery -->
11+
<authors>Peter Major</authors>
12+
13+
<!-- Owners are typically nuget.org identities that allow gallery
14+
users to earily find other packages by the same owners. -->
15+
<owners>axodox</owners>
16+
17+
<!-- License and project URLs provide links for the gallery -->
18+
<license type="expression">MIT</license>
19+
<repository type="git" url="https://github.com/axodox/warpr" branch="main"/>
20+
21+
<!-- The icon is used in Visual Studio's package manager UI -->
22+
<!--<icon>icon.png</icon>-->
23+
24+
<!-- If true, this value prompts the user to accept the license when
25+
installing the package. -->
26+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
27+
28+
<!-- Any details about this particular release -->
29+
<releaseNotes>Initial release.</releaseNotes>
30+
31+
<!-- The description can be used in package manager UI. Note that the
32+
nuget.org gallery uses information you add in the portal. -->
33+
<description>Warper is a WebRTC based ultra-low latency video streaming library.</description>
34+
35+
<!-- Copyright information -->
36+
<copyright>Copyright ©2025 Peter Major</copyright>
37+
38+
<!-- Tags appear in the gallery and can be used for tag searches -->
39+
<tags>axodox webrtc streaming nvenc native</tags>
40+
41+
<dependencies>
42+
<dependency id="Axodox.Common" version="1.0.48" />
43+
<dependency id="libdatachannel" version="0.22.4.1" />
44+
<dependency id="nvenc" version="12.2.72" />
45+
</dependencies>
46+
</metadata>
47+
48+
<!-- A readme.txt will be displayed when the package is installed -->
49+
<files>
50+
<file src="Warpr.WarpDrive.targets" target="build/native/Warpr.WarpDrive.targets" />
51+
<file src="**\*.h" target="include" />
52+
53+
<file src="bin\**\WarpDrive.lib" target="lib\desktop" />
54+
<file src="bin\**\WarpDrive.exp" target="lib\desktop" />
55+
56+
<file src="bin\**\WarpDrive.dll" target="bin\desktop" />
57+
<file src="bin\**\WarpDrive.pdb" target="bin\desktop" />
58+
</files>
59+
</package>

warp-drive/Warpr.WarpDrive.targets

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<WarpDrive-Runtime>desktop</WarpDrive-Runtime>
5+
</PropertyGroup>
6+
7+
<PropertyGroup>
8+
<WarpDrive-Libraries>$(MSBuildThisFileDirectory)..\..\bin\$(WarpDrive-Runtime)\$(Platform)\$(Configuration)</WarpDrive-Libraries>
9+
<WarpDrive-DependencyRoot>$(MSBuildThisFileDirectory)..\..\lib\$(WarpDrive-Runtime)\$(Platform)\$(Configuration)</WarpDrive-DependencyRoot>
10+
<WarpDrive-Dependencies>$(WarpDrive-DependencyRoot)\*.lib</WarpDrive-Dependencies>
11+
<WarpDrive-Includes>$(MSBuildThisFileDirectory)..\..\include</WarpDrive-Includes>
12+
</PropertyGroup>
13+
14+
<PropertyGroup Condition="'$(Warpr-Location)'!=''">
15+
<WarpDrive-Libraries>$(Warpr-Location)\warp-drive\bin\$(Platform)\$(Configuration)</WarpDrive-Libraries>
16+
<WarpDrive-DependencyRoot>$(Warpr-Location)\warp-drive\bin\$(Platform)\$(Configuration)</WarpDrive-DependencyRoot>
17+
<WarpDrive-Dependencies>$(Warpr-DependencyRoot)\*.lib</WarpDrive-Dependencies>
18+
<WarpDrive-Includes>$(Warpr-Location)\warp-drive</WarpDrive-Includes>
19+
</PropertyGroup>
20+
21+
<ItemGroup>
22+
<ProjectReference Include="$(Warpr-Location)\warp-drive\warp-drive.vcxproj">
23+
<Project>{0383b8f8-a914-4cf4-8197-73c681c17a8a}</Project>
24+
</ProjectReference>
25+
</ItemGroup>
26+
27+
<ItemGroup>
28+
<None Include="$(WarpDrive-Libraries)\*.*">
29+
<InProject>False</InProject>
30+
<Link>%(FileName)%(Extension)</Link>
31+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
32+
</None>
33+
</ItemGroup>
34+
35+
<ItemDefinitionGroup>
36+
<Link>
37+
<AdditionalLibraryDirectories>$(WarpDrive-Libraries);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
38+
<AdditionalDependencies>$(WarpDrive-Dependencies);%(AdditionalDependencies)</AdditionalDependencies>
39+
</Link>
40+
</ItemDefinitionGroup>
41+
42+
<ItemDefinitionGroup>
43+
<ClCompile>
44+
<AdditionalIncludeDirectories>$(WarpDrive-Includes);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
45+
</ClCompile>
46+
</ItemDefinitionGroup>
47+
</Project>

warp-drive/packages.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Axodox.Common" version="1.0.47" targetFramework="native" />
4-
<package id="libdatachannel" version="0.22.4" targetFramework="native" />
3+
<package id="Axodox.Common" version="1.0.48" targetFramework="native" />
4+
<package id="libdatachannel" version="0.22.4.1" targetFramework="native" />
55
<package id="nvenc" version="12.2.72" targetFramework="native" />
66
</packages>

0 commit comments

Comments
 (0)