diff --git a/BUILD.md b/BUILD.md new file mode 100644 index 0000000..bad4a98 --- /dev/null +++ b/BUILD.md @@ -0,0 +1,32 @@ +Building OpenXT Tools +============================= + +Note that only xenbus, xenvusb, and xenusbdevice are built; the other drivers +use the binaries provided by the Xen Project. + +First you'll need a device driver build environment for Windows 10. Happily +Microsoft has made this easy with the introduction of the 'EWDK'. This is an +ISO containing all the build environment you need (except for Wix, which is +included in the project). + +The package should support building with the following EWDKs: + +- EWDK for Windows 10, version 1903 with Visual Studio Build Tools 16.0 +- EWDK for Windows 10, version 1809 with Visual Studio Build Tools 15.8.9 + +Once you have downloaded the ISO, open it and you should see a file called: + +LaunchBuildEnv.cmd + +Run this and it should give you a build environment command prompt. From +within this shell navigate to the root of your checked out repository +and run: + +buildall.bat checked + +Or, for a release build: + +buildall.bat free + + + diff --git a/buildall.bat b/buildall.bat new file mode 100644 index 0000000..5552bd8 --- /dev/null +++ b/buildall.bat @@ -0,0 +1,14 @@ +@echo off + +set type=%1 + +for %%x in (xenbus, xenvusb, xenusbdevice) do ( + pushd %%x + powershell ./build.ps1 %type% + popd +) + +set type=%type:checked=Debug% +set type=%type:free=Release% + +msbuild.exe -p:Configuration=%type% -p:Platform=x64 diff --git a/externals.csv b/externals.csv new file mode 100644 index 0000000..5ddf860 --- /dev/null +++ b/externals.csv @@ -0,0 +1,9 @@ +uri,outFile,sha256hash +https://xenbits.xenproject.org/pvdrivers/win/9.0.0/xenvkbd.tar,xenvkbd.tar,B4F82EE0B66EBD9C6599C017F9EF4B943A3A260D8D55A6E1FA060585A31AB589 +https://xenbits.xenproject.org/pvdrivers/win/9.0.0/xenhid.tar,xenhid.tar,85A53CFD85BACC2B74E28464608E59C7BD7554F64A0BA0A4A8F47539B04CAD4F +https://xenbits.xenproject.org/pvdrivers/win/9.0.0/xencons.tar,xencons.tar,E03CE84B0B89F9AC595DC82AD8651C02347716510CCCADD1339AA2B90CAC2FE1 +https://xenbits.xenproject.org/pvdrivers/win/9.0.0/xenvbd.tar,xenvbd.tar,CE23961AC45BCC40B7219FA8ED7F41AA9A76D5BCA5E8F0C88C5AF04ABFBAFBAB +https://xenbits.xenproject.org/pvdrivers/win/9.0.0/xennet.tar,xennet.tar,9D94C1EE04C82B4060A8D3E1301C3BECE46C440091B6512DE4DBE602FC298109 +https://xenbits.xenproject.org/pvdrivers/win/9.0.0/xenvif.tar,xenvif.tar,CEF7366EF832CADB069EA57125FB3755B6B96A910F51A62E35C8D31012304788 +https://xenbits.xenproject.org/pvdrivers/win/9.0.0/xeniface.tar,xeniface.tar,8A59A48A6D4E1F3CFBCC3B4165A1278B8FE4AF5A2D8B7C6DEC14D4B8DE65F19A +https://github.com/wixtoolset/wix3/releases/download/wix3112rtm/wix311-binaries.zip,wix.zip,2C1888D5D1DBA377FC7FA14444CF556963747FF9A0A289A3599CF09DA03B9E2E \ No newline at end of file diff --git a/fetch-externals.ps1 b/fetch-externals.ps1 new file mode 100644 index 0000000..816cec1 --- /dev/null +++ b/fetch-externals.ps1 @@ -0,0 +1,27 @@ +function expandArchive ($file) { + Write-Host "Expanding $file" + $fileExtension = $file.substring($file.length - 3, 3) + if ($fileExtension -eq "zip") { + Expand-Archive $file + } elseif ($fileExtension -eq "tar") { + tar xf $file + } else { + Write-Host "Unknown file ending: [$fileExtension]" + } +} + +function fileDownloadAndValidate( $uri, $outFile, $sha256Hash ) { + Write-Host "Downloading $uri" + Invoke-WebRequest -Uri "$uri" -OutFile "$outFile" + $calculatedHash = ( Get-FileHash -Algorithm SHA256 $outFile ).Hash + if ($calculatedHash -ne "$sha256Hash") { + Write-Host "ERROR: Incorrect SHA256 hash of [$calculatedHash] for [$outFile]; expected [$sha256Hash]" + exit -1 + } +} + +$externals = Import-Csv "externals.csv" +$externals | ForEach-Object { + fileDownloadAndValidate $_.uri $_.outFile $_.sha256Hash + expandArchive $_.outFile +} diff --git a/installer.sln b/installer.sln new file mode 100644 index 0000000..c346e52 --- /dev/null +++ b/installer.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29926.136 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "installer", "installer\installer.wixproj", "{F4AD33F1-6717-46D2-A5C2-8CC6B06A9B57}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F4AD33F1-6717-46D2-A5C2-8CC6B06A9B57}.Debug|x64.ActiveCfg = Debug|x64 + {F4AD33F1-6717-46D2-A5C2-8CC6B06A9B57}.Debug|x64.Build.0 = Debug|x64 + {F4AD33F1-6717-46D2-A5C2-8CC6B06A9B57}.Debug|x86.ActiveCfg = Debug|x86 + {F4AD33F1-6717-46D2-A5C2-8CC6B06A9B57}.Debug|x86.Build.0 = Debug|x86 + {F4AD33F1-6717-46D2-A5C2-8CC6B06A9B57}.Release|x64.ActiveCfg = Release|x64 + {F4AD33F1-6717-46D2-A5C2-8CC6B06A9B57}.Release|x64.Build.0 = Release|x64 + {F4AD33F1-6717-46D2-A5C2-8CC6B06A9B57}.Release|x86.ActiveCfg = Release|x86 + {F4AD33F1-6717-46D2-A5C2-8CC6B06A9B57}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {55B5064E-42DA-44FB-A3ED-96EDCBC4B2C3} + EndGlobalSection +EndGlobal diff --git a/installer/installer.wixproj b/installer/installer.wixproj new file mode 100644 index 0000000..1326120 --- /dev/null +++ b/installer/installer.wixproj @@ -0,0 +1,76 @@ + + + + ..\wix\ + $(WixToolPath)Wix.targets + wixtasks.dll + + + Debug + x86 + 3.10 + f4ad33f1-6717-46d2-a5c2-8cc6b06a9b57 + 2.0 + OpenXT-Tools + Package + + + bin\$(Configuration)\ + obj\$(Configuration)\ + Debug + -ext WixDifxAppExtension + -ext WixDifxAppExtension + + + bin\$(Configuration)\ + obj\$(Configuration)\ + -ext WixDifxAppExtension + -ext WixDifxAppExtension + + + Debug + bin\$(Platform)\$(Configuration)\ + obj\$(Platform)\$(Configuration)\ + -ext WixDifxAppExtension + -ext WixDifxAppExtension + + + bin\$(Platform)\$(Configuration)\ + obj\$(Platform)\$(Configuration)\ + -ext WixDifxAppExtension + -ext WixDifxAppExtension + + + Debug + bin\$(Platform)\$(Configuration)\ + obj\$(Platform)\$(Configuration)\ + + + bin\$(Platform)\$(Configuration)\ + obj\$(Platform)\$(Configuration)\ + + + + + $(WixExtDir)\difxapp_x64.wixlib + difxapp_x64 + + + $(WixExtDir)\WixIIsExtension.dll + WixIIsExtension + + + + + + + + + \ No newline at end of file diff --git a/installer/installer.wxs b/installer/installer.wxs new file mode 100644 index 0000000..64a7e6b --- /dev/null +++ b/installer/installer.wxs @@ -0,0 +1,149 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/installer/testsigning.cer b/installer/testsigning.cer new file mode 100644 index 0000000..ae9c033 Binary files /dev/null and b/installer/testsigning.cer differ