diff --git a/Contributors.asciidoc b/Contributors.asciidoc index 3ace0b19..dfef611b 100644 --- a/Contributors.asciidoc +++ b/Contributors.asciidoc @@ -66,6 +66,7 @@ CONTRIBUTOR LIST |Gal Hammer (Red Hat, https://www.redhat.com) |ghammer at redhat.com |John Oberschelp |john at oberschelp.net |John Tyner |jtyner at gmail.com +|Konstantinos Karakostas |noiredev at protonmail.com |Paweł Wegner (Google LLC, https://google.com) |lemourin at google.com |Pedro Frejo (Arpa System, https://arpasystem.com) |pedro.frejo at arpasystem.com |Ronny Chan |ronny at ronnychan.ca diff --git a/appveyor.yml b/appveyor.yml index 45c7c2c4..9afddef1 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -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% diff --git a/build/VStudio/Directory.Build.props b/build/VStudio/Directory.Build.props new file mode 100644 index 00000000..f22c97d3 --- /dev/null +++ b/build/VStudio/Directory.Build.props @@ -0,0 +1,9 @@ + + + + + $(SolutionDir)build\$(MSBuildProjectName).build\ + + + + \ No newline at end of file diff --git a/build/VStudio/dotnet/winfsp.net.csproj b/build/VStudio/dotnet/winfsp.net.csproj index 52b5eebf..7d1f38d3 100644 --- a/build/VStudio/dotnet/winfsp.net.csproj +++ b/build/VStudio/dotnet/winfsp.net.csproj @@ -1,43 +1,38 @@ - - + - - Debug - AnyCPU - {94580219-CC8D-4FE5-A3BE-437B0B3481E1} - Library + netstandard2.0;net35 winfsp.net + disable + disable + true + AnyCPU Fsp $(MyProductFileName)-msil - v3.5 512 - + $(SolutionDir)build\$(Configuration)\$(MSBuildProjectName) + $(BaseIntermediateOutputPath)$(Configuration)\ + true + $(BaseIntermediateOutputPath)$(Configuration)\$(MyProductFileName)-msil.xml + true + 1591 true full false - $(SolutionDir)build\$(Configuration)\ - $(SolutionDir)build\$(ProjectName).build\ - $(BaseIntermediateOutputPath)$(Configuration)\ DEBUG;TRACE prompt 4 - true $(BaseIntermediateOutputPath)$(Configuration)\$(MyProductFileName)-msil.xml 1591 pdbonly true - $(SolutionDir)build\$(Configuration)\ - $(SolutionDir)build\$(ProjectName).build\ - $(BaseIntermediateOutputPath)$(Configuration)\ TRACE prompt 4 - true $(BaseIntermediateOutputPath)$(Configuration)\$(MyProductFileName)-msil.xml 1591 @@ -47,9 +42,6 @@ winfsp.net.snk - - - FileSystemBase+Const.cs @@ -70,29 +62,31 @@ - - - - - - - - - - - - - - - - - - - + + + 5.0.0 + + + 5.0.0 + + + + + $(MyProductFileName)-msil + $(MyDescription) + $(MyProductName) + $(MyCopyright) + $(MyAssemblyVersion) + $(MyVersion) + + + $(MyProductFileName)-msil + $(MyVersion) + $(MyDescription) + $(MyCompanyName) + $(MyCompanyName) + + exit /b 0 @@ -103,8 +97,8 @@ set MyAssemblyVersion=$(MyAssemblyVersion) setlocal EnableDelayedExpansion if exist $(OutDir)policy.$(MyAssemblyPolicyVersion).$(TargetName).config del $(OutDir)policy.$(MyAssemblyPolicyVersion).$(TargetName).config for /f "delims=" %25%25l in ($(ProjectDir)winfsp.net.policy.config) do ( - set line=%25%25l - echo !line! >>$(OutDir)policy.$(MyAssemblyPolicyVersion).$(TargetName).config +set line=%25%25l +echo !line! >>$(OutDir)policy.$(MyAssemblyPolicyVersion).$(TargetName).config ) "$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.0A\Bin\al.exe" /product:"$(MyProductName)" /title:"$(MyDescription)" /company:"$(MyCompanyName)" /copyright:"$(MyCopyright)" /version:"$(MyAssemblyPolicyVersion)" /fileversion:"$(MyVersion)" /link:$(OutDir)policy.$(MyAssemblyPolicyVersion).$(TargetName).config /out:$(OutDir)policy.$(MyAssemblyPolicyVersion).$(TargetName).dll /keyfile:$(ProjectDir)$(ProjectName).snk diff --git a/build/VStudio/installer/Product.wxs b/build/VStudio/installer/Product.wxs index 1e3ac352..9b581d96 100644 --- a/build/VStudio/installer/Product.wxs +++ b/build/VStudio/installer/Product.wxs @@ -171,10 +171,10 @@ - + - + + + + + Exe + net452 + memfs-dotnet + memfs + memfs-dotnet-msil + $(SolutionDir)build\$(Configuration)\$(MSBuildProjectName) + $(BaseIntermediateOutputPath)$(Configuration)\ + 512 + + + AnyCPU + true + full + false + DEBUG;TRACE + prompt + 4 + false + + + AnyCPU + pdbonly + true + TRACE + prompt + 4 + + + + + + + \ No newline at end of file diff --git a/tools/build.bat b/tools/build.bat index 9e5ebad7..a95877e0 100755 --- a/tools/build.bat +++ b/tools/build.bat @@ -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" diff --git a/tools/gensrc/remove-build-dotnet.bat b/tools/gensrc/remove-build-dotnet.bat new file mode 100644 index 00000000..a12423d2 --- /dev/null +++ b/tools/gensrc/remove-build-dotnet.bat @@ -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% +) diff --git a/tools/gensrc/remove-sln-project.ps1 b/tools/gensrc/remove-sln-project.ps1 new file mode 100644 index 00000000..ccf8856e --- /dev/null +++ b/tools/gensrc/remove-sln-project.ps1 @@ -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 \ No newline at end of file