mirror of
https://github.com/winfsp/winfsp.git
synced 2025-07-02 17:02:57 -05:00
WinFsp rebranding support
This commit is contained in:
@ -3,10 +3,12 @@
|
||||
setlocal
|
||||
setlocal EnableDelayedExpansion
|
||||
|
||||
set MsiName="WinFsp - Windows File System Proxy"
|
||||
call "%~dp0myinfo.bat"
|
||||
|
||||
set MsiName="%MyProductName% - %MyDescription%"
|
||||
set CrossCert="%~dp0DigiCert High Assurance EV Root CA.crt"
|
||||
set Issuer="DigiCert"
|
||||
set Subject="Navimatics LLC"
|
||||
set Subject="%MyCompanyName%"
|
||||
|
||||
set Configuration=Release
|
||||
set SignedPackage=
|
||||
@ -14,6 +16,9 @@ set SignedPackage=
|
||||
if not X%1==X set Configuration=%1
|
||||
if not X%2==X set SignedPackage=%2
|
||||
|
||||
echo Configuration=%Configuration%
|
||||
echo:
|
||||
|
||||
if X%~nx0==Xbuild-choco.bat (
|
||||
cd %~dp0..\build\VStudio
|
||||
goto :choco
|
||||
@ -22,9 +27,9 @@ if X%~nx0==Xbuild-choco.bat (
|
||||
call "%~dp0vcvarsall.bat" x64
|
||||
|
||||
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 "%~dp0..\build\VStudio\build\%Configuration%\%MyProductFileName%-*.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"
|
||||
del "%~dp0..\build\VStudio\build\%Configuration%\%MyProductFileName%-*.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
|
||||
@ -44,7 +49,7 @@ if X%SignedPackage%==X (
|
||||
devenv winfsp.sln /build "%Configuration%|x86"
|
||||
if errorlevel 1 goto fail
|
||||
|
||||
for %%f in (build\%Configuration%\winfsp-x64.sys build\%Configuration%\winfsp-x86.sys) do (
|
||||
for %%f in (build\%Configuration%\%MyProductFileName%-x64.sys build\%Configuration%\%MyProductFileName%-x86.sys) do (
|
||||
signtool sign /ac %CrossCert% /i %Issuer% /n %Subject% /fd sha1 /t http://timestamp.digicert.com %%f
|
||||
if errorlevel 1 set /a signfail=signfail+1
|
||||
signtool sign /as /ac %CrossCert% /i %Issuer% /n %Subject% /fd sha256 /tr http://timestamp.digicert.com /td sha256 %%f
|
||||
@ -66,10 +71,10 @@ if X%SignedPackage%==X (
|
||||
echo .Set DiskDirectory1=. >>driver.ddf
|
||||
echo .Set DestinationDir=x64 >>driver.ddf
|
||||
echo driver-x64.inf >>driver.ddf
|
||||
echo winfsp-x64.sys >>driver.ddf
|
||||
echo %MyProductFileName%-x64.sys >>driver.ddf
|
||||
echo .Set DestinationDir=x86 >>driver.ddf
|
||||
echo driver-x86.inf >>driver.ddf
|
||||
echo winfsp-x86.sys >>driver.ddf
|
||||
echo %MyProductFileName%-x86.sys >>driver.ddf
|
||||
makecab /F driver.ddf
|
||||
signtool sign /ac %CrossCert% /i %Issuer% /n %Subject% /t http://timestamp.digicert.com driver.cab
|
||||
if errorlevel 1 set /a signfail=signfail+1
|
||||
@ -79,7 +84,7 @@ if X%SignedPackage%==X (
|
||||
devenv winfsp.sln /build "Installer.%Configuration%|x86"
|
||||
if errorlevel 1 goto fail
|
||||
|
||||
for %%f in (build\%Configuration%\winfsp-*.msi) do (
|
||||
for %%f in (build\%Configuration%\%MyProductFileName%-*.msi) do (
|
||||
signtool sign /ac %CrossCert% /i %Issuer% /n %Subject% /fd sha1 /t http://timestamp.digicert.com /d %MsiName% %%f
|
||||
if errorlevel 1 set /a signfail=signfail+1
|
||||
REM signtool sign /ac %CrossCert% /i %Issuer% /n %Subject% /fd sha256 /tr http://timestamp.digicert.com /td sha256 /d %MsiName% %%f
|
||||
@ -89,8 +94,8 @@ for %%f in (build\%Configuration%\winfsp-*.msi) do (
|
||||
if not %signfail%==0 echo SIGNING FAILED! The product has been successfully built, but not signed.
|
||||
|
||||
set Version=
|
||||
for %%f in (build\%Configuration%\winfsp-*.msi) do set Version=%%~nf
|
||||
set Version=!Version:winfsp-=!
|
||||
for %%f in (build\%Configuration%\%MyProductFileName%-*.msi) do set Version=%%~nf
|
||||
set Version=!Version:%MyProductFileName%-=!
|
||||
if X%SignedPackage%==X (
|
||||
pushd build\%Configuration%
|
||||
powershell -command "Compress-Archive -Path winfsp-tests-*.exe,..\..\..\..\License.txt,..\..\..\..\tst\winfsp-tests\README.md -DestinationPath winfsp-tests-!Version!.zip"
|
||||
@ -99,10 +104,10 @@ if X%SignedPackage%==X (
|
||||
)
|
||||
|
||||
:choco
|
||||
if not exist "build\%Configuration%\winfsp-*.msi" (echo installer msi not found >&2 & exit /b 1)
|
||||
if not exist "build\%Configuration%\%MyProductFileName%-*.msi" (echo installer msi not found >&2 & exit /b 1)
|
||||
set Version=
|
||||
for %%f in (build\%Configuration%\winfsp-*.msi) do set Version=%%~nf
|
||||
set Version=!Version:winfsp-=!
|
||||
for %%f in (build\%Configuration%\%MyProductFileName%-*.msi) do set Version=%%~nf
|
||||
set Version=!Version:%MyProductFileName%-=!
|
||||
set ProductStage=
|
||||
for /f "delims=<> tokens=3" %%i in ('findstr "<MyProductStage>" version.properties') do (
|
||||
set MyProductStage=%%i
|
||||
@ -115,7 +120,7 @@ where /q choco.exe
|
||||
if %ERRORLEVEL% equ 0 (
|
||||
copy ..\choco\* build\%Configuration%
|
||||
copy ..\choco\LICENSE.TXT /B + ..\..\License.txt /B build\%Configuration%\LICENSE.txt /B
|
||||
certutil -hashfile build\%Configuration%\winfsp-!Version!.msi SHA256 >>build\%Configuration%\VERIFICATION.txt
|
||||
certutil -hashfile build\%Configuration%\%MyProductFileName%-!Version!.msi SHA256 >>build\%Configuration%\VERIFICATION.txt
|
||||
choco pack build\%Configuration%\winfsp.nuspec --version=!PackageVersion! --outputdirectory=build\%Configuration% MsiVersion=!Version!
|
||||
if errorlevel 1 goto fail
|
||||
)
|
||||
|
@ -3,10 +3,12 @@
|
||||
setlocal
|
||||
setlocal EnableDelayedExpansion
|
||||
|
||||
set MsiName="WinFsp - Windows File System Proxy"
|
||||
call "%~dp0myinfo.bat"
|
||||
|
||||
set MsiName="%MyProductName% - %MyDescription%"
|
||||
set CrossCert="%~dp0DigiCert High Assurance EV Root CA.crt"
|
||||
set Issuer="DigiCert"
|
||||
set Subject="Navimatics LLC"
|
||||
set Subject="%MyCompanyName%"
|
||||
|
||||
set Configuration=Release
|
||||
set SignedPackage=
|
||||
@ -14,6 +16,9 @@ set SignedPackage=
|
||||
if not X%1==X set Configuration=%1
|
||||
if not X%2==X set SignedPackage=%2
|
||||
|
||||
echo Configuration=%Configuration%
|
||||
echo:
|
||||
|
||||
if X%~nx0==Xbuild-choco.bat (
|
||||
cd %~dp0..\build\VStudio
|
||||
goto :choco
|
||||
@ -22,9 +27,9 @@ if X%~nx0==Xbuild-choco.bat (
|
||||
call "%~dp0vcvarsall.bat" x64
|
||||
|
||||
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 "%~dp0..\build\VStudio\build\%Configuration%\%MyProductFileName%-*.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"
|
||||
del "%~dp0..\build\VStudio\build\%Configuration%\%MyProductFileName%-*.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
|
||||
@ -44,7 +49,7 @@ if X%SignedPackage%==X (
|
||||
devenv winfsp.sln /build "%Configuration%|x86"
|
||||
if errorlevel 1 goto fail
|
||||
|
||||
for %%f in (build\%Configuration%\winfsp-x64.sys build\%Configuration%\winfsp-x86.sys) do (
|
||||
for %%f in (build\%Configuration%\%MyProductFileName%-x64.sys build\%Configuration%\%MyProductFileName%-x86.sys) do (
|
||||
signtool sign /ac %CrossCert% /i %Issuer% /n %Subject% /fd sha1 /t http://timestamp.digicert.com %%f
|
||||
if errorlevel 1 set /a signfail=signfail+1
|
||||
signtool sign /as /ac %CrossCert% /i %Issuer% /n %Subject% /fd sha256 /tr http://timestamp.digicert.com /td sha256 %%f
|
||||
@ -66,10 +71,10 @@ if X%SignedPackage%==X (
|
||||
echo .Set DiskDirectory1=. >>driver.ddf
|
||||
echo .Set DestinationDir=x64 >>driver.ddf
|
||||
echo driver-x64.inf >>driver.ddf
|
||||
echo winfsp-x64.sys >>driver.ddf
|
||||
echo %MyProductFileName%-x64.sys >>driver.ddf
|
||||
echo .Set DestinationDir=x86 >>driver.ddf
|
||||
echo driver-x86.inf >>driver.ddf
|
||||
echo winfsp-x86.sys >>driver.ddf
|
||||
echo %MyProductFileName%-x86.sys >>driver.ddf
|
||||
makecab /F driver.ddf
|
||||
signtool sign /ac %CrossCert% /i %Issuer% /n %Subject% /t http://timestamp.digicert.com driver.cab
|
||||
if errorlevel 1 set /a signfail=signfail+1
|
||||
@ -79,7 +84,7 @@ if X%SignedPackage%==X (
|
||||
devenv winfsp.sln /build "Installer.%Configuration%|x86"
|
||||
if errorlevel 1 goto fail
|
||||
|
||||
for %%f in (build\%Configuration%\winfsp-*.msi) do (
|
||||
for %%f in (build\%Configuration%\%MyProductFileName%-*.msi) do (
|
||||
signtool sign /ac %CrossCert% /i %Issuer% /n %Subject% /fd sha1 /t http://timestamp.digicert.com /d %MsiName% %%f
|
||||
if errorlevel 1 set /a signfail=signfail+1
|
||||
REM signtool sign /ac %CrossCert% /i %Issuer% /n %Subject% /fd sha256 /tr http://timestamp.digicert.com /td sha256 /d %MsiName% %%f
|
||||
@ -89,8 +94,8 @@ for %%f in (build\%Configuration%\winfsp-*.msi) do (
|
||||
if not %signfail%==0 echo SIGNING FAILED! The product has been successfully built, but not signed.
|
||||
|
||||
set Version=
|
||||
for %%f in (build\%Configuration%\winfsp-*.msi) do set Version=%%~nf
|
||||
set Version=!Version:winfsp-=!
|
||||
for %%f in (build\%Configuration%\%MyProductFileName%-*.msi) do set Version=%%~nf
|
||||
set Version=!Version:%MyProductFileName%-=!
|
||||
if X%SignedPackage%==X (
|
||||
pushd build\%Configuration%
|
||||
powershell -command "Compress-Archive -Path winfsp-tests-*.exe,..\..\..\..\License.txt,..\..\..\..\tst\winfsp-tests\README.md -DestinationPath winfsp-tests-!Version!.zip"
|
||||
@ -99,10 +104,10 @@ if X%SignedPackage%==X (
|
||||
)
|
||||
|
||||
:choco
|
||||
if not exist "build\%Configuration%\winfsp-*.msi" (echo installer msi not found >&2 & exit /b 1)
|
||||
if not exist "build\%Configuration%\%MyProductFileName%-*.msi" (echo installer msi not found >&2 & exit /b 1)
|
||||
set Version=
|
||||
for %%f in (build\%Configuration%\winfsp-*.msi) do set Version=%%~nf
|
||||
set Version=!Version:winfsp-=!
|
||||
for %%f in (build\%Configuration%\%MyProductFileName%-*.msi) do set Version=%%~nf
|
||||
set Version=!Version:%MyProductFileName%-=!
|
||||
set ProductStage=
|
||||
for /f "delims=<> tokens=3" %%i in ('findstr "<MyProductStage>" version.properties') do (
|
||||
set MyProductStage=%%i
|
||||
@ -115,7 +120,7 @@ where /q choco.exe
|
||||
if %ERRORLEVEL% equ 0 (
|
||||
copy ..\choco\* build\%Configuration%
|
||||
copy ..\choco\LICENSE.TXT /B + ..\..\License.txt /B build\%Configuration%\LICENSE.txt /B
|
||||
certutil -hashfile build\%Configuration%\winfsp-!Version!.msi SHA256 >>build\%Configuration%\VERIFICATION.txt
|
||||
certutil -hashfile build\%Configuration%\%MyProductFileName%-!Version!.msi SHA256 >>build\%Configuration%\VERIFICATION.txt
|
||||
choco pack build\%Configuration%\winfsp.nuspec --version=!PackageVersion! --outputdirectory=build\%Configuration% MsiVersion=!Version!
|
||||
if errorlevel 1 goto fail
|
||||
)
|
||||
|
20
tools/myinfo.bat
Normal file
20
tools/myinfo.bat
Normal file
@ -0,0 +1,20 @@
|
||||
@echo off
|
||||
|
||||
for /F "tokens=2,3,4 delims=<>" %%a in (%~dp0..\build\VStudio\version.properties) do (
|
||||
if "/%%a"=="%%c" (
|
||||
if "%%a"=="MyProductName" (
|
||||
set MyProductName=%%b
|
||||
) else if "%%a"=="MyProductFileName" (
|
||||
set MyProductFileName=%%b
|
||||
) else if "%%a"=="MyDescription" (
|
||||
set MyDescription=%%b
|
||||
) else if "%%a"=="MyCompanyName" (
|
||||
set MyCompanyName=%%b
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
echo MyProductName=%MyProductName%
|
||||
echo MyProductFileName=%MyProductFileName%
|
||||
echo MyDescription=%MyDescription%
|
||||
echo MyCompanyName=%MyCompanyName%
|
Reference in New Issue
Block a user