Skip to content

Commit

Permalink
Merge pull request #474 from microsoft/pete-dev
Browse files Browse the repository at this point in the history
Final DP8 Updates
  • Loading branch information
Psychlist1972 authored Dec 19, 2024
2 parents 061158c + 65790cc commit e9d0db2
Show file tree
Hide file tree
Showing 41 changed files with 634 additions and 469 deletions.
6 changes: 4 additions & 2 deletions .nuke/build.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@
"BuildUserToolsSharedComponents",
"CreateVersionIncludes",
"Prerequisites",
"ZipPowershellDevUtilities"
"ZipPowershellDevUtilities",
"ZipWdmaud2"
]
}
},
Expand All @@ -106,7 +107,8 @@
"BuildUserToolsSharedComponents",
"CreateVersionIncludes",
"Prerequisites",
"ZipPowershellDevUtilities"
"ZipPowershellDevUtilities",
"ZipWdmaud2"
]
}
},
Expand Down
29 changes: 24 additions & 5 deletions build/nuke_build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ class Build : NukeBuild

string[] SdkPlatforms => new string[] { "x64", "Arm64EC" };
string[] ServiceAndApiPlatforms => new string[] { "x64", "Arm64" };
string[] ServiceAndApiPlatformsAll => new string[] { "x64", "Arm64", "Arm64EC" };
string[] ServiceAndApiPlatformsAll => new string[] { "x64", "Arm64", "Arm64EC" }; // the order here matters because the dependencies in the solution aren't perfect
string[] ToolsPlatforms => new string[] { "x64", "Arm64" };
string[] NativeSamplesPlatforms => new string[] { "x64", "Arm64EC", "Arm64" };
string[] NativeSamplesPlatforms => new string[] { "x64", "Arm64", "Arm64EC" };
string[] ManagedSamplesPlatforms => new string[] { "x64", "Arm64" };
string[] InstallerPlatforms => new string[] { "x64", "Arm64" };

Expand Down Expand Up @@ -263,7 +263,7 @@ class Build : NukeBuild

// This transport gets compiled to Arm64X and x64. The Arm64X output is in the Arm64EC folder
stagingFiles.Add(ApiSolutionFolder / "vsfiles" / platform / Configuration.Release / $"Midi2.MidiSrvTransport.dll");

stagingFiles.Add(ApiSolutionFolder / "vsfiles" / platform / Configuration.Release / $"wdmaud2.drv");

// only in-proc files, like the MidiSrvTransport, are Arm64EC. For all the others
// any reference to Arm64EC is just Arm64. We don't use any of the Arm64X output
Expand All @@ -283,8 +283,6 @@ class Build : NukeBuild

stagingFiles.Add(ApiSolutionFolder / "vsfiles" / servicePlatform / Configuration.Release / $"Midi2.SchedulerTransform.dll");

stagingFiles.Add(ApiSolutionFolder / "vsfiles" / servicePlatform / Configuration.Release / $"wdmaud2.drv");

foreach (var file in stagingFiles)
{
FileSystemTasks.CopyFileToDirectory(file, ApiStagingFolder / servicePlatform, FileExistsPolicy.Overwrite, true);
Expand Down Expand Up @@ -1538,12 +1536,33 @@ void UpdatePackagesConfigForCPPProject(string configFilePath)
regHelpersFolder.ZipTo(ThisReleaseFolder / $"dev-pre-setup-scripts.zip");
});

Target ZipWdmaud2 => _ => _
.DependsOn(Prerequisites)
.DependsOn(BuildServiceAndPlugins)
.Executes(() =>
{
var zipRoot = (StagingRootFolder / "wdmaud2").CreateOrCleanDirectory();

var arm64 = (zipRoot / "arm64").CreateOrCleanDirectory();
var x64 = (zipRoot / "x64").CreateOrCleanDirectory();

string driverFile = "wdmaud2.drv";

CopyFile(ApiStagingFolder / "arm64" / driverFile, arm64 / driverFile, FileExistsPolicy.Fail, false);
CopyFile(ApiStagingFolder / "x64" / driverFile, x64 / driverFile, FileExistsPolicy.Fail, false);

// todo: add takeown / copy scripts

zipRoot.ZipTo(ThisReleaseFolder / $"wdmaud2-winmm-shim-driver.zip");

});


Target BuildAndPublishAll => _ => _
.DependsOn(Prerequisites)
.DependsOn(CreateVersionIncludes)
.DependsOn(BuildServiceAndPlugins)
.DependsOn(ZipWdmaud2)
.DependsOn(BuildServiceAndPluginsInstaller)
.DependsOn(BuildInDevelopmentServicePlugins)
.DependsOn(BuildInDevelopmentServicePluginsInstaller)
Expand Down
23 changes: 23 additions & 0 deletions build/replace_wdmaud2_x64.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@echo off
echo This is for copying build artifacts into the system for testing.
echo This will only replace the github-built Windows service and components
echo If you are using the in-box service or dism-deployed service, this will not work.
echo This must be run as administrator.

set servicepath="%ProgramFiles%\Windows MIDI Services\Service"
set apipath="%ProgramFiles%\Windows MIDI Services\API"
set dmppath="%ProgramFiles%\Windows MIDI Services\"
set buildoutput="%midi_repo_root%src\api\VSFiles\x64\Release"

echo Stopping midisrv
net stop midisrv

echo stopping AEB
net stop /Y AudioEndpointBuilder

timeout 3
%midi_repo_root%build\sfpcopy %buildoutput%\wdmaud2.drv %windir%\system32\wdmaud2.drv

net start audiosrv

pause
2 changes: 1 addition & 1 deletion build/staging/version/BundleInfo.wxi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Include>
<?define SetupVersionName="Developer Preview 8 Arm64" ?>
<?define SetupVersionNumber="1.0.2-preview-8.241217-1713" ?>
<?define SetupVersionNumber="1.0.2-preview-8.241219-1336" ?>
</Include>
6 changes: 3 additions & 3 deletions build/staging/version/WindowsMidiServicesVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ public static class MidiBuildInformation
{
public const string Source = "GitHub Preview";
public const string Name = "Developer Preview 8";
public const string BuildFullVersion = "1.0.2-preview-8.241217-1713";
public const string BuildFullVersion = "1.0.2-preview-8.241219-1336";
public const string VersionMajor = "1";
public const string VersionMinor = "0";
public const string VersionRevision = "2";
public const string VersionDateNumber = "241217";
public const string VersionTimeNumber = "1713";
public const string VersionDateNumber = "241219";
public const string VersionTimeNumber = "1336";
}
}

6 changes: 3 additions & 3 deletions build/staging/version/WindowsMidiServicesVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@

#define WINDOWS_MIDI_SERVICES_BUILD_SOURCE L"GitHub Preview"
#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_NAME L"Developer Preview 8"
#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_FULL L"1.0.2-preview-8.241217-1713"
#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_FULL L"1.0.2-preview-8.241219-1336"
#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_MAJOR L"1"
#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_MINOR L"0"
#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_REVISION L"2"
#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_DATE_NUMBER L"241217"
#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_TIME_NUMBER L"1713"
#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_DATE_NUMBER L"241219"
#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_TIME_NUMBER L"1336"

#endif

2 changes: 1 addition & 1 deletion samples/cpp-winrt/basics/client-basics-cpp.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props')" />
<PropertyGroup Label="Globals">
<WindowsMidiServicesSdkPackage>Microsoft.Windows.Devices.Midi2.1.0.2-preview-8.241217-1713</WindowsMidiServicesSdkPackage>
<WindowsMidiServicesSdkPackage>Microsoft.Windows.Devices.Midi2.1.0.2-preview-8.241219-1336</WindowsMidiServicesSdkPackage>
<CppWinRTOptimized>true</CppWinRTOptimized>
<CppWinRTRootNamespaceAutoMerge>true</CppWinRTRootNamespaceAutoMerge>
<CppWinRTGenerateWindowsMetadata>false</CppWinRTGenerateWindowsMetadata>
Expand Down
2 changes: 1 addition & 1 deletion samples/cpp-winrt/basics/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Windows.CppWinRT" version="2.0.240405.15" targetFramework="native" />
<package id="Microsoft.Windows.Devices.Midi2" version="1.0.2-preview-8.241217-1713" targetFramework="native" />
<package id="Microsoft.Windows.Devices.Midi2" version="1.0.2-preview-8.241219-1336" targetFramework="native" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props')" />
<PropertyGroup Label="Globals">
<WindowsMidiServicesSdkPackage>Microsoft.Windows.Devices.Midi2.1.0.2-preview-8.241217-1713</WindowsMidiServicesSdkPackage>
<WindowsMidiServicesSdkPackage>Microsoft.Windows.Devices.Midi2.1.0.2-preview-8.241219-1336</WindowsMidiServicesSdkPackage>
<CppWinRTOptimized>true</CppWinRTOptimized>
<CppWinRTRootNamespaceAutoMerge>true</CppWinRTRootNamespaceAutoMerge>
<CppWinRTGenerateWindowsMetadata>true</CppWinRTGenerateWindowsMetadata>
Expand Down
2 changes: 1 addition & 1 deletion samples/cpp-winrt/loopback-endpoints/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Windows.CppWinRT" version="2.0.240405.15" targetFramework="native" />
<package id="Microsoft.Windows.Devices.Midi2" version="1.0.2-preview-8.241217-1713" targetFramework="native" />
<package id="Microsoft.Windows.Devices.Midi2" version="1.0.2-preview-8.241219-1336" targetFramework="native" />
</packages>
2 changes: 1 addition & 1 deletion samples/cpp-winrt/send-speed/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Windows.CppWinRT" version="2.0.240405.15" targetFramework="native" />
<package id="Microsoft.Windows.Devices.Midi2" version="1.0.2-preview-8.241217-1713" targetFramework="native" />
<package id="Microsoft.Windows.Devices.Midi2" version="1.0.2-preview-8.241219-1336" targetFramework="native" />
</packages>
2 changes: 1 addition & 1 deletion samples/cpp-winrt/send-speed/send-speed-cpp.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props')" />
<PropertyGroup Label="Globals">
<WindowsMidiServicesSdkPackage>Microsoft.Windows.Devices.Midi2.1.0.2-preview-8.241217-1713</WindowsMidiServicesSdkPackage>
<WindowsMidiServicesSdkPackage>Microsoft.Windows.Devices.Midi2.1.0.2-preview-8.241219-1336</WindowsMidiServicesSdkPackage>
<CppWinRTOptimized>true</CppWinRTOptimized>
<CppWinRTRootNamespaceAutoMerge>true</CppWinRTRootNamespaceAutoMerge>
<CppWinRTGenerateWindowsMetadata>true</CppWinRTGenerateWindowsMetadata>
Expand Down
2 changes: 1 addition & 1 deletion samples/cpp-winrt/simple-app-to-app-midi/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Windows.CppWinRT" version="2.0.240405.15" targetFramework="native" />
<package id="Microsoft.Windows.Devices.Midi2" version="1.0.2-preview-8.241217-1713" targetFramework="native" />
<package id="Microsoft.Windows.Devices.Midi2" version="1.0.2-preview-8.241219-1336" targetFramework="native" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props')" />
<PropertyGroup Label="Globals">
<WindowsMidiServicesSdkPackage>Microsoft.Windows.Devices.Midi2.1.0.2-preview-8.241217-1713</WindowsMidiServicesSdkPackage>
<WindowsMidiServicesSdkPackage>Microsoft.Windows.Devices.Midi2.1.0.2-preview-8.241219-1336</WindowsMidiServicesSdkPackage>
<CppWinRTOptimized>true</CppWinRTOptimized>
<CppWinRTRootNamespaceAutoMerge>true</CppWinRTRootNamespaceAutoMerge>
<CppWinRTGenerateWindowsMetadata>true</CppWinRTGenerateWindowsMetadata>
Expand Down
2 changes: 1 addition & 1 deletion samples/cpp-winrt/static-enum-endpoints/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Windows.CppWinRT" version="2.0.240405.15" targetFramework="native" />
<package id="Microsoft.Windows.Devices.Midi2" version="1.0.2-preview-8.241217-1713" targetFramework="native" />
<package id="Microsoft.Windows.Devices.Midi2" version="1.0.2-preview-8.241219-1336" targetFramework="native" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props')" />
<PropertyGroup Label="Globals">
<WindowsMidiServicesSdkPackage>Microsoft.Windows.Devices.Midi2.1.0.2-preview-8.241217-1713</WindowsMidiServicesSdkPackage>
<WindowsMidiServicesSdkPackage>Microsoft.Windows.Devices.Midi2.1.0.2-preview-8.241219-1336</WindowsMidiServicesSdkPackage>
<CppWinRTOptimized>true</CppWinRTOptimized>
<CppWinRTRootNamespaceAutoMerge>true</CppWinRTRootNamespaceAutoMerge>
<CppWinRTGenerateWindowsMetadata>true</CppWinRTGenerateWindowsMetadata>
Expand Down
2 changes: 1 addition & 1 deletion samples/cpp-winrt/watch-endpoints/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Windows.CppWinRT" version="2.0.240405.15" targetFramework="native" />
<package id="Microsoft.Windows.Devices.Midi2" version="1.0.2-preview-8.241217-1713" targetFramework="native" />
<package id="Microsoft.Windows.Devices.Midi2" version="1.0.2-preview-8.241219-1336" targetFramework="native" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props')" />
<PropertyGroup Label="Globals">
<WindowsMidiServicesSdkPackage>Microsoft.Windows.Devices.Midi2.1.0.2-preview-8.241217-1713</WindowsMidiServicesSdkPackage>
<WindowsMidiServicesSdkPackage>Microsoft.Windows.Devices.Midi2.1.0.2-preview-8.241219-1336</WindowsMidiServicesSdkPackage>
<CppWinRTOptimized>true</CppWinRTOptimized>
<CppWinRTRootNamespaceAutoMerge>true</CppWinRTRootNamespaceAutoMerge>
<CppWinRTGenerateWindowsMetadata>true</CppWinRTGenerateWindowsMetadata>
Expand Down
Loading

0 comments on commit e9d0db2

Please sign in to comment.