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

Commit eb8def0

Browse files
committed
project: Update AppVeyor CI to use gitlink.
1 parent 140151b commit eb8def0

3 files changed

Lines changed: 57 additions & 21 deletions

File tree

SMP/appveyor.yml

Lines changed: 40 additions & 6 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
16+
- MSVC_VER: 14
17+
18+
install:
19+
# Install GitLink
20+
- cmd: choco install gitlink
1421

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)">
2635
<PropertyGroup>
2736
<CurrentPlatform>%(PlatformList.Identity)</CurrentPlatform>
2837
</PropertyGroup>
29-
<MSBuild Projects="SMP/APPVEYOR_PROJECT_NAME.sln" Properties="Configuration=%(ConfigurationList.Identity);Platform=$(CurrentPlatform);OutDir=$(MSBuildThisFileDirectory)build_out\;" />
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)">
48+
<PropertyGroup>
49+
<CurrentPlatform>%(PlatformList.Identity)</CurrentPlatform>
50+
</PropertyGroup>
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,10 +57,22 @@ 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
4172

73+
# Reset platform
74+
- cmd: SET PLATFORM=%PLATFORMBACK%
75+
4276
build:
4377
project: build.vcxproj
4478
parallel: true

SMP/libmodplug.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}") = "libmodplug", "libmodplug.vc
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-
{38E671C9-3FE3-40B7-A1AF-D2D566762186}.Debug|Win32.ActiveCfg = Debug|Win32
22-
{38E671C9-3FE3-40B7-A1AF-D2D566762186}.Debug|Win32.Build.0 = Debug|Win32
2321
{38E671C9-3FE3-40B7-A1AF-D2D566762186}.Debug|x64.ActiveCfg = Debug|x64
2422
{38E671C9-3FE3-40B7-A1AF-D2D566762186}.Debug|x64.Build.0 = Debug|x64
25-
{38E671C9-3FE3-40B7-A1AF-D2D566762186}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
26-
{38E671C9-3FE3-40B7-A1AF-D2D566762186}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
23+
{38E671C9-3FE3-40B7-A1AF-D2D566762186}.Debug|x86.ActiveCfg = Debug|Win32
24+
{38E671C9-3FE3-40B7-A1AF-D2D566762186}.Debug|x86.Build.0 = Debug|Win32
2725
{38E671C9-3FE3-40B7-A1AF-D2D566762186}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
2826
{38E671C9-3FE3-40B7-A1AF-D2D566762186}.DebugDLL|x64.Build.0 = DebugDLL|x64
29-
{38E671C9-3FE3-40B7-A1AF-D2D566762186}.Release|Win32.ActiveCfg = Release|Win32
30-
{38E671C9-3FE3-40B7-A1AF-D2D566762186}.Release|Win32.Build.0 = Release|Win32
27+
{38E671C9-3FE3-40B7-A1AF-D2D566762186}.DebugDLL|x86.ActiveCfg = DebugDLL|Win32
28+
{38E671C9-3FE3-40B7-A1AF-D2D566762186}.DebugDLL|x86.Build.0 = DebugDLL|Win32
3129
{38E671C9-3FE3-40B7-A1AF-D2D566762186}.Release|x64.ActiveCfg = Release|x64
3230
{38E671C9-3FE3-40B7-A1AF-D2D566762186}.Release|x64.Build.0 = Release|x64
33-
{38E671C9-3FE3-40B7-A1AF-D2D566762186}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
34-
{38E671C9-3FE3-40B7-A1AF-D2D566762186}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
31+
{38E671C9-3FE3-40B7-A1AF-D2D566762186}.Release|x86.ActiveCfg = Release|Win32
32+
{38E671C9-3FE3-40B7-A1AF-D2D566762186}.Release|x86.Build.0 = Release|Win32
3533
{38E671C9-3FE3-40B7-A1AF-D2D566762186}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
3634
{38E671C9-3FE3-40B7-A1AF-D2D566762186}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
37-
{38E671C9-3FE3-40B7-A1AF-D2D566762186}.ReleaseLTO|Win32.ActiveCfg = ReleaseLTO|Win32
38-
{38E671C9-3FE3-40B7-A1AF-D2D566762186}.ReleaseLTO|Win32.Build.0 = ReleaseLTO|Win32
35+
{38E671C9-3FE3-40B7-A1AF-D2D566762186}.ReleaseDLL|x86.ActiveCfg = ReleaseDLL|Win32
36+
{38E671C9-3FE3-40B7-A1AF-D2D566762186}.ReleaseDLL|x86.Build.0 = ReleaseDLL|Win32
3937
{38E671C9-3FE3-40B7-A1AF-D2D566762186}.ReleaseLTO|x64.ActiveCfg = ReleaseLTO|x64
4038
{38E671C9-3FE3-40B7-A1AF-D2D566762186}.ReleaseLTO|x64.Build.0 = ReleaseLTO|x64
39+
{38E671C9-3FE3-40B7-A1AF-D2D566762186}.ReleaseLTO|x86.ActiveCfg = ReleaseLTO|Win32
40+
{38E671C9-3FE3-40B7-A1AF-D2D566762186}.ReleaseLTO|x86.Build.0 = ReleaseLTO|Win32
4141
EndGlobalSection
4242
GlobalSection(SolutionProperties) = preSolution
4343
HideSolutionNode = FALSE

SMP/libmodplug.vcxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -698,6 +698,7 @@ del /f /q $(OutDir)\licenses\libmodplug.txt
698698
<ProfileGuidedDatabase>$(IntDir)\$(TargetName).pgd</ProfileGuidedDatabase>
699699
<ModuleDefinitionFile>libmodplug.def</ModuleDefinitionFile>
700700
<LargeAddressAware>true</LargeAddressAware>
701+
<GenerateDebugInformation>true</GenerateDebugInformation>
701702
</Link>
702703
<PostBuildEvent>
703704
<Command>mkdir $(OutDir)\include
@@ -760,6 +761,7 @@ del /f /q $(OutDir)\licenses\libmodplug.txt
760761
<ImportLibrary>$(OutDir)\lib\x64\$(TargetName).lib</ImportLibrary>
761762
<ProfileGuidedDatabase>$(IntDir)\$(TargetName).pgd</ProfileGuidedDatabase>
762763
<ModuleDefinitionFile>libmodplug.def</ModuleDefinitionFile>
764+
<GenerateDebugInformation>true</GenerateDebugInformation>
763765
</Link>
764766
<PostBuildEvent>
765767
<Command>mkdir $(OutDir)\include

0 commit comments

Comments
 (0)