Skip to content
This repository was archived by the owner on Jan 26, 2026. It is now read-only.

Commit f0240ff

Browse files
committed
project: Update AppVeyor CI to use gitlink.
1 parent 5c7f017 commit f0240ff

File tree

3 files changed

+66
-25
lines changed

3 files changed

+66
-25
lines changed

SMP/appveyor.yml

Lines changed: 49 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,51 @@ branches:
44
only:
55
- master
66
skip_non_tags: true
7-
configuration: Release+ReleaseDLL
87
shallow_clone: true
98

9+
configuration: Release+ReleaseDLL
10+
11+
platform: x86+x64
12+
1013
environment:
1114
matrix:
12-
- MSVC_VER: 14
1315
- MSVC_VER: 12
14-
16+
- MSVC_VER: 14
17+
18+
install:
19+
# Install GitLink
20+
- cmd: choco install gitlink
21+
1522
before_build:
23+
# Create build project to compile all configurations and platforms at once
1624
- ps: >-
1725
$script = @'
1826
19-
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build" ToolsVersion="4.0">
27+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="GitLink" ToolsVersion="4.0">
2028
<ItemGroup>
2129
<ConfigurationList Condition="'@(ConfigurationList)' == '' and $(Configuration) != ''" Include="$(Configuration.Split('+'))" />
2230
<ConfigurationList Condition="'@(ConfigurationList)' == ''" Include="Release" />
23-
<PlatformList Condition="'@(PlatformList)' == ''" Include="x64;Win32" />
31+
<PlatformList Condition="'@(PlatformList)' == '' and $(Platform) != ''" Include="$(Platform.Split('+'))" />
32+
<PlatformList Condition="'@(PlatformList)' == ''" Include="x64;x86" />
2433
</ItemGroup>
25-
<Target Name="Build" Outputs="%(PlatformList.Identity)">
34+
<Target Name="List" Outputs="%(PlatformList.Identity)">
35+
<PropertyGroup>
36+
<CurrentPlatform>%(PlatformList.Identity)</CurrentPlatform>
37+
</PropertyGroup>
38+
<ItemGroup>
39+
<ProjectToBuild Include="SMP/APPVEYOR_PROJECT_NAME.sln">
40+
<Properties>Configuration=%(ConfigurationList.Identity);Platform=$(CurrentPlatform);OutDir=$(MSBuildThisFileDirectory)build_out\</Properties>
41+
</ProjectToBuild>
42+
</ItemGroup>
43+
</Target>
44+
<Target Name="Build" DependsOnTargets="List">
45+
<MSBuild Projects="@(ProjectToBuild)" BuildInParallel="true" />
46+
</Target>
47+
<Target Name="GitLink" DependsOnTargets="Build" Outputs="%(PlatformList.Identity)">
2648
<PropertyGroup>
2749
<CurrentPlatform>%(PlatformList.Identity)</CurrentPlatform>
2850
</PropertyGroup>
29-
<MSBuild Projects="SMP/APPVEYOR_PROJECT_NAME.sln" Properties="Configuration=%(ConfigurationList.Identity);Platform=$(CurrentPlatform);OutDir=$(MSBuildThisFileDirectory)build_out\;" />
51+
<Exec Command="GitLink . -f SMP/APPVEYOR_PROJECT_NAME.sln -c %(ConfigurationList.Identity) -p $(CurrentPlatform) -d $(MSBuildThisFileDirectory)build_out\lib\$(CurrentPlatform) -u https://github.com/APPVEYOR_REPO_NAME.git -s APPVEYOR_REPO_COMMIT"/>
3052
</Target>
3153
</Project>
3254
@@ -35,16 +57,33 @@ before_build:
3557
3658
$script = $script -replace "APPVEYOR_PROJECT_NAME", "$env:APPVEYOR_PROJECT_NAME"
3759
60+
$script = $script -replace "APPVEYOR_REPO_NAME", "$env:APPVEYOR_REPO_NAME"
61+
62+
$script = $script -replace "APPVEYOR_REPO_COMMIT", "$env:APPVEYOR_REPO_COMMIT"
63+
3864
$script | Out-File build.vcxproj
65+
66+
# Backup platform so it is not affected by vcvars
67+
- cmd: SET PLATFORMBACK=%PLATFORM%
68+
69+
# Setup msvc environment for required compiler version (specified by MSVC_VER)
3970
- ps: $env:VSCOMNTOOLS=(Get-Content ("env:VS" + "$env:MSVC_VER" + "0COMNTOOLS"))
4071
- cmd: call "%VSCOMNTOOLS%\..\..\VC\vcvarsall.bat" amd64
72+
73+
# Reset platform
74+
- cmd: SET PLATFORM=%PLATFORMBACK%
75+
76+
# Download and install yasm integration
4177
- ps: (New-Object Net.WebClient).DownloadFile('http://www.tortall.net/projects/yasm/releases/vsyasm-1.3.0-win64.zip', "$pwd\yasm.zip")
42-
- ps: Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::ExtractToDirectory("$pwd\yasm.zip", "$pwd\TempYASMUnpack");
78+
- ps: Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::ExtractToDirectory("$pwd\yasm.zip", "$pwd\TempYASMUnpack")
4379
- ps: Move-Item -Force "TempYASMUnpack\*.exe" "$env:VSCOMNTOOLS\..\..\VC\bin"
4480
- ps: $env:MSBUILDDIR=((Get-Command msbuild.exe).Path | Split-Path -parent)
4581
- ps: (Get-Content "$pwd\TempYASMUnpack\vsyasm.props") -replace '\$\(Platform\)', 'win$(PlatformArchitecture)' | Set-Content "$pwd\TempYASMUnpack\vsyasm.props"
46-
- ps: Move-Item -Force "TempYASMUnpack\*.*" "$env:MSBUILDDIR\..\..\..\Microsoft.Cpp\v4.0\V${env:MSVC_VER}0\BuildCustomizations"
47-
82+
- ps: Copy-Item -Force "TempYASMUnpack\*.*" "$env:MSBUILDDIR\..\..\..\Microsoft.Cpp\v4.0\V${env:MSVC_VER}0\BuildCustomizations"
83+
# Make additional copy so its available to GitLink (which currently looks in the wrong location)
84+
- ps: Copy-Item -Force "TempYASMUnpack\*.*" "$env:MSBUILDDIR\..\..\..\Microsoft.Cpp\v4.0\BuildCustomizations"
85+
- ps: Copy-Item -Force "TempYASMUnpack\*.*" "$env:MSBUILDDIR\..\..\..\Microsoft.Cpp\v4.0\V120\BuildCustomizations"
86+
4887
build:
4988
project: build.vcxproj
5089
parallel: true

SMP/libxvidcore.sln

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,38 +6,38 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libxvidcore", "libxvidcore.
66
EndProject
77
Global
88
GlobalSection(SolutionConfigurationPlatforms) = preSolution
9-
Debug|Win32 = Debug|Win32
109
Debug|x64 = Debug|x64
11-
DebugDLL|Win32 = DebugDLL|Win32
10+
Debug|x86 = Debug|x86
1211
DebugDLL|x64 = DebugDLL|x64
13-
Release|Win32 = Release|Win32
12+
DebugDLL|x86 = DebugDLL|x86
1413
Release|x64 = Release|x64
15-
ReleaseDLL|Win32 = ReleaseDLL|Win32
14+
Release|x86 = Release|x86
1615
ReleaseDLL|x64 = ReleaseDLL|x64
17-
ReleaseLTO|Win32 = ReleaseLTO|Win32
16+
ReleaseDLL|x86 = ReleaseDLL|x86
1817
ReleaseLTO|x64 = ReleaseLTO|x64
18+
ReleaseLTO|x86 = ReleaseLTO|x86
1919
EndGlobalSection
2020
GlobalSection(ProjectConfigurationPlatforms) = postSolution
21-
{E0889360-2F17-4D9C-A185-A5C51EA8073B}.Debug|Win32.ActiveCfg = Debug|Win32
22-
{E0889360-2F17-4D9C-A185-A5C51EA8073B}.Debug|Win32.Build.0 = Debug|Win32
2321
{E0889360-2F17-4D9C-A185-A5C51EA8073B}.Debug|x64.ActiveCfg = Debug|x64
2422
{E0889360-2F17-4D9C-A185-A5C51EA8073B}.Debug|x64.Build.0 = Debug|x64
25-
{E0889360-2F17-4D9C-A185-A5C51EA8073B}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
26-
{E0889360-2F17-4D9C-A185-A5C51EA8073B}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
23+
{E0889360-2F17-4D9C-A185-A5C51EA8073B}.Debug|x86.ActiveCfg = Debug|Win32
24+
{E0889360-2F17-4D9C-A185-A5C51EA8073B}.Debug|x86.Build.0 = Debug|Win32
2725
{E0889360-2F17-4D9C-A185-A5C51EA8073B}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
2826
{E0889360-2F17-4D9C-A185-A5C51EA8073B}.DebugDLL|x64.Build.0 = DebugDLL|x64
29-
{E0889360-2F17-4D9C-A185-A5C51EA8073B}.Release|Win32.ActiveCfg = Release|Win32
30-
{E0889360-2F17-4D9C-A185-A5C51EA8073B}.Release|Win32.Build.0 = Release|Win32
27+
{E0889360-2F17-4D9C-A185-A5C51EA8073B}.DebugDLL|x86.ActiveCfg = DebugDLL|Win32
28+
{E0889360-2F17-4D9C-A185-A5C51EA8073B}.DebugDLL|x86.Build.0 = DebugDLL|Win32
3129
{E0889360-2F17-4D9C-A185-A5C51EA8073B}.Release|x64.ActiveCfg = Release|x64
3230
{E0889360-2F17-4D9C-A185-A5C51EA8073B}.Release|x64.Build.0 = Release|x64
33-
{E0889360-2F17-4D9C-A185-A5C51EA8073B}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
34-
{E0889360-2F17-4D9C-A185-A5C51EA8073B}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
31+
{E0889360-2F17-4D9C-A185-A5C51EA8073B}.Release|x86.ActiveCfg = Release|Win32
32+
{E0889360-2F17-4D9C-A185-A5C51EA8073B}.Release|x86.Build.0 = Release|Win32
3533
{E0889360-2F17-4D9C-A185-A5C51EA8073B}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
3634
{E0889360-2F17-4D9C-A185-A5C51EA8073B}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
37-
{E0889360-2F17-4D9C-A185-A5C51EA8073B}.ReleaseLTO|Win32.ActiveCfg = ReleaseLTO|Win32
38-
{E0889360-2F17-4D9C-A185-A5C51EA8073B}.ReleaseLTO|Win32.Build.0 = ReleaseLTO|Win32
35+
{E0889360-2F17-4D9C-A185-A5C51EA8073B}.ReleaseDLL|x86.ActiveCfg = ReleaseDLL|Win32
36+
{E0889360-2F17-4D9C-A185-A5C51EA8073B}.ReleaseDLL|x86.Build.0 = ReleaseDLL|Win32
3937
{E0889360-2F17-4D9C-A185-A5C51EA8073B}.ReleaseLTO|x64.ActiveCfg = ReleaseLTO|x64
4038
{E0889360-2F17-4D9C-A185-A5C51EA8073B}.ReleaseLTO|x64.Build.0 = ReleaseLTO|x64
39+
{E0889360-2F17-4D9C-A185-A5C51EA8073B}.ReleaseLTO|x86.ActiveCfg = ReleaseLTO|Win32
40+
{E0889360-2F17-4D9C-A185-A5C51EA8073B}.ReleaseLTO|x86.Build.0 = ReleaseLTO|Win32
4141
EndGlobalSection
4242
GlobalSection(SolutionProperties) = preSolution
4343
HideSolutionNode = FALSE

SMP/libxvidcore.vcxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,7 @@ del /f /q $(OutDir)\licenses\xvid.txt
690690
</AddModuleNamesToAssembly>
691691
<ModuleDefinitionFile>..\build\generic\libxvidcore.def</ModuleDefinitionFile>
692692
<LargeAddressAware>true</LargeAddressAware>
693+
<GenerateDebugInformation>true</GenerateDebugInformation>
693694
</Link>
694695
<PostBuildEvent>
695696
<Command>mkdir $(OutDir)\include
@@ -751,6 +752,7 @@ del /f /q $(OutDir)\licenses\xvid.txt
751752
<AddModuleNamesToAssembly>
752753
</AddModuleNamesToAssembly>
753754
<ModuleDefinitionFile>..\build\generic\libxvidcore.def</ModuleDefinitionFile>
755+
<GenerateDebugInformation>true</GenerateDebugInformation>
754756
</Link>
755757
<PostBuildEvent>
756758
<Command>mkdir $(OutDir)\include

0 commit comments

Comments
 (0)