mirror of
https://github.com/winfsp/winfsp.git
synced 2025-06-07 04:22:09 -05:00
tools: use dotnet build in VS2015 CI
This commit is contained in:
parent
2945971ba9
commit
2770eca1bf
@ -51,6 +51,11 @@ install:
|
||||
$targets.Save("C:\Program Files (x86)\Windows Kits\10\build\WindowsDriver.Common.targets")
|
||||
Add-AppveyorMessage "Hack to make WDK 1903 work on VS2015"
|
||||
}
|
||||
# Install .NET SDK on VS2015 image
|
||||
- ps: |
|
||||
if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2015") {
|
||||
& ([scriptblock]::Create((New-Object System.Net.WebClient).DownloadString('https://dot.net/v1/dotnet-install.ps1'))) -InstallDir "C:\dotnet"
|
||||
}
|
||||
# Submodules
|
||||
- git submodule update --init --recursive
|
||||
# Kernel and user mode dumps
|
||||
@ -76,6 +81,9 @@ build_script:
|
||||
# remove ARM64 project configurations to build in VS2015/VS2017
|
||||
- if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2015" tools\gensrc\remove-build-arm64.bat
|
||||
- if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" tools\gensrc\remove-build-arm64.bat
|
||||
# remove .NET library from solution for VS2015 and use the .NET SDK instead
|
||||
- if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2015" tools\gensrc\remove-build-dotnet.bat build\VStudio
|
||||
- if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2015" set PATH=C:\dotnet;%PATH%
|
||||
# build winfsp
|
||||
- tools\build.bat %CONFIGURATION%
|
||||
|
||||
|
@ -9,25 +9,9 @@
|
||||
<RootNamespace>Fsp</RootNamespace>
|
||||
<AssemblyName>$(MyProductFileName)-msil</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<DocumentationFile>$(BaseIntermediateOutputPath)$(Configuration)\$(MyProductFileName)-msil.xml</DocumentationFile>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DocumentationFile>$(BaseIntermediateOutputPath)$(Configuration)\$(MyProductFileName)-msil.xml</DocumentationFile>
|
||||
<NoWarn>1591</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DocumentationFile>$(BaseIntermediateOutputPath)$(Configuration)\$(MyProductFileName)-msil.xml</DocumentationFile>
|
||||
<NoWarn>1591</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
|
@ -1,17 +1,17 @@
|
||||
<Project Sdk="Microsoft.NET.SDK">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), build.common.props))/build.common.props" />
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net452</TargetFramework>
|
||||
<ProjectName>memfs-dotnet</ProjectName>
|
||||
<RootNamespace>memfs</RootNamespace>
|
||||
<AssemblyName>memfs-dotnet-msil</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\dotnet\winfsp.net.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\..\tst\memfs-dotnet\Program.cs" />
|
||||
</ItemGroup>
|
||||
<Project Sdk="Microsoft.NET.SDK">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), build.common.props))/build.common.props" />
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net452</TargetFramework>
|
||||
<ProjectName>memfs-dotnet</ProjectName>
|
||||
<RootNamespace>memfs</RootNamespace>
|
||||
<AssemblyName>memfs-dotnet-msil</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\dotnet\winfsp.net.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\..\tst\memfs-dotnet\Program.cs" />
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -27,6 +27,7 @@ if X%~nx0==Xbuild-choco.bat (
|
||||
set BuildArm64=yes
|
||||
if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2015" (
|
||||
set BuildArm64=no
|
||||
set UseDotnetSdk=yes
|
||||
)
|
||||
if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" (
|
||||
set BuildArm64=no
|
||||
@ -56,6 +57,13 @@ if X%SignedPackage%==X (
|
||||
if exist build\ for /R build\ %%d in (%Configuration%) do (
|
||||
if exist "%%d" rmdir /s/q "%%d"
|
||||
)
|
||||
|
||||
if X%UseDotnetSdk%==Xyes (
|
||||
dotnet build ./dotnet/ -c "%Configuration%" -p:SolutionDir=..\
|
||||
if errorlevel 1 goto fail
|
||||
dotnet build ./testing/memfs-dotnet.csproj -c "%Configuration%" -p:SolutionDir=..\
|
||||
if errorlevel 1 goto fail
|
||||
)
|
||||
|
||||
if X%BuildArm64%==Xyes (
|
||||
devenv winfsp.sln /build "%Configuration%|ARM64"
|
||||
|
17
tools/gensrc/remove-build-dotnet.bat
Normal file
17
tools/gensrc/remove-build-dotnet.bat
Normal file
@ -0,0 +1,17 @@
|
||||
@echo off
|
||||
|
||||
setlocal
|
||||
setlocal EnableDelayedExpansion
|
||||
|
||||
if "%1"=="" (
|
||||
cd %~dp0..\..
|
||||
) else (
|
||||
cd "%1"
|
||||
)
|
||||
|
||||
|
||||
if exist winfsp.sln (
|
||||
powershell -NoProfile -ExecutionPolicy Bypass -Command "& '%~dp0remove-sln-project.ps1' -Path '%cd%\winfsp.sln' -Match '*dotnet*'
|
||||
) else (
|
||||
echo winfsp.sln not found in %cd%
|
||||
)
|
12
tools/gensrc/remove-sln-project.ps1
Normal file
12
tools/gensrc/remove-sln-project.ps1
Normal file
@ -0,0 +1,12 @@
|
||||
param (
|
||||
[Parameter(Mandatory)][string]$Path,
|
||||
[Parameter(Mandatory)][string]$Match
|
||||
)
|
||||
|
||||
echo "Removing projects that match $($Match) from $($Path)"
|
||||
|
||||
Get-Content $Path -Delimiter 'EndProject' |
|
||||
Where-Object {$_ -notlike $Match} |
|
||||
Set-Content "$($Path).new"
|
||||
|
||||
Move-Item -Path "$($Path).new" -Destination $Path -Force
|
Loading…
x
Reference in New Issue
Block a user