From 709ead9e0630d0a5b50f7c8dd603dfc0d74a788f Mon Sep 17 00:00:00 2001 From: Bill Zissimopoulos Date: Thu, 9 Mar 2017 22:14:50 -0800 Subject: [PATCH] build: choco: initial chocolatey package implementation --- appveyor.yml | 3 +- build/choco/chocolateyInstall.ps1 | 14 ++++++++++ build/choco/winfsp.nuspec | 46 +++++++++++++++++++++++++++++++ tools/build.bat | 12 ++++++++ 4 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 build/choco/chocolateyInstall.ps1 create mode 100644 build/choco/winfsp.nuspec diff --git a/appveyor.yml b/appveyor.yml index d35b51cb..40b6a22b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -23,7 +23,8 @@ build_script: - tools\build.bat %CONFIGURATION% test_script: -- for %%f in ("build\VStudio\build\%CONFIGURATION%\winfsp-*.msi") do start /wait msiexec /i %%f /qn INSTALLLEVEL=1000 +- rem for %%f in ("build\VStudio\build\%CONFIGURATION%\winfsp-*.msi") do start /wait msiexec /i %%f /qn INSTALLLEVEL=1000 +- choco install winfsp -s build\VStudio\build\%CONFIGURATION% - if %TESTING%==Func appveyor DownloadFile http://www.secfs.net/winfsp/resources/Test.Filter.Driver.zip && 7z x Test.Filter.Driver.zip - if %TESTING%==Func start /wait msiexec /i "Test.Filter.Driver\HCK Filter.Driver Content-x86_en-us.msi" /qn - if %TESTING%==Func tools\nmake-ext-test.bat %CONFIGURATION% diff --git a/build/choco/chocolateyInstall.ps1 b/build/choco/chocolateyInstall.ps1 new file mode 100644 index 00000000..92439266 --- /dev/null +++ b/build/choco/chocolateyInstall.ps1 @@ -0,0 +1,14 @@ +$ErrorActionPreference = 'Stop'; + +$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" +$fileLocation = @(Get-ChildItem $toolsDir -filter winfsp-*.msi)[0].FullName + +$packageArgs = @{ + packageName = 'winfsp' + fileType = 'msi' + file = $fileLocation + silentArgs = "/qn /norestart INSTALLLEVEL=1000" + validExitCodes = @(0, 3010, 1641) +} + +Install-ChocolateyInstallPackage @packageArgs diff --git a/build/choco/winfsp.nuspec b/build/choco/winfsp.nuspec new file mode 100644 index 00000000..88a61bca --- /dev/null +++ b/build/choco/winfsp.nuspec @@ -0,0 +1,46 @@ + + + + winfsp + $version$ + https://github.com/billziss-gh/winfsp/tree/master/build/choco + Bill Zissimopoulos <billziss at navimatics.com> + + WinFsp + Bill Zissimopoulos <billziss at navimatics.com> + https://github.com/billziss-gh/winfsp + https://github.com/billziss-gh/winfsp/raw/master/art/winfsp-solid.png + Bill Zissimopoulos + https://github.com/billziss-gh/winfsp/blob/master/License.txt + false + https://github.com/billziss-gh/winfsp + https://github.com/billziss-gh/winfsp/tree/master/doc + https://groups.google.com/forum/#!forum/winfsp + https://github.com/billziss-gh/winfsp/issues + driver filesystem fuse gplv3 windows-kernel + Windows File System Proxy - FUSE for Windows + +WinFsp is a set of software components for Windows computers that allows the creation of user mode file systems. In this sense it is similar to FUSE (Filesystem in Userspace), which provides the same functionality on UNIX-like computers. + +Some of the benefits of using WinFsp are listed below: + +* Very well-tested and stable. +* Very fast. +* Strives for compatibility with NTFS. +* Easy to understand but comprehensive API. +* FUSE compatibility layer for native Windows and Cygwin. +* Signed drivers provided on every release. +* Available under the GPLv3 license with a special exception for Free/Libre and Open Source Software. + + https://github.com/billziss-gh/winfsp/blob/master/Changelog.asciidoc + + + + + + + + + diff --git a/tools/build.bat b/tools/build.bat index 712c0e85..3be5fe87 100755 --- a/tools/build.bat +++ b/tools/build.bat @@ -1,6 +1,7 @@ @echo off setlocal +setlocal EnableDelayedExpansion set MsiName="WinFsp - Windows File System Proxy" set CrossCert="%~dp0DigiCert High Assurance EV Root CA.crt" @@ -19,6 +20,7 @@ if not X%SignedPackage%==X ( if not exist "%~dp0..\build\VStudio\build\%Configuration%\winfsp-*.msi" (echo previous build not found >&2 & exit /b 1) if not exist "%SignedPackage%" (echo signed package not found >&2 & exit /b 1) del "%~dp0..\build\VStudio\build\%Configuration%\winfsp-*.msi" + if exist "%~dp0..\build\VStudio\build\%Configuration%\winfsp.*.nupkg" del "%~dp0..\build\VStudio\build\%Configuration%\winfsp.*.nupkg" for /R "%SignedPackage%" %%f in (*.sys) do ( copy "%%f" "%~dp0..\build\VStudio\build\%Configuration%" >nul ) @@ -81,6 +83,16 @@ for %%f in (build\%Configuration%\winfsp-*.msi) do ( if not %signfail%==0 echo SIGNING FAILED! The product has been successfully built, but not signed. +where /q choco.exe +if %ERRORLEVEL% equ 0 ( + for %%f in (build\%Configuration%\winfsp-*.msi) do set Version=%%~nf + set Version=!Version:winfsp-=! + + copy ..\choco\* build\%Configuration% + choco pack build\%Configuration%\winfsp.nuspec --version=!Version! --outputdirectory=build\%Configuration% + if errorlevel 1 goto fail +) + exit /b 0 :fail