diff --git a/InteropTests/WinRTComponent/WinMD/CMakeLists.txt b/InteropTests/WinRTComponent/WinMD/CMakeLists.txt index 350d7e3..808f4f5 100644 --- a/InteropTests/WinRTComponent/WinMD/CMakeLists.txt +++ b/InteropTests/WinRTComponent/WinMD/CMakeLists.txt @@ -39,7 +39,7 @@ set(OUTPUT_XMLDOCS "${CMAKE_CURRENT_BINARY_DIR}/WinRTComponent.xml") # Generate the WinMD add_custom_command( - OUTPUT "${OUTPUT_WINMD}.timestamped" "${OUTPUT_HEADER}" + OUTPUT "${OUTPUT_WINMD}" "${OUTPUT_HEADER}" DEPENDS ${IDL_SOURCES} ${FOUNDATIONCONTRACT_WINMD} ${UNIVERSALAPICONTRACT_WINMD} COMMAND "$" /W1 /nologo /nomidl @@ -50,15 +50,6 @@ add_custom_command( /header "$" "$") -# Remove the timestamp from the generated WinRTComponent.winmd file for cachability -# TODO: We also need to zero the random "mvid" (module version id) field of the module metadata table :/ -add_custom_command( - OUTPUT "${OUTPUT_WINMD}" - DEPENDS "${OUTPUT_WINMD}.timestamped" - COMMAND powershell.exe -File "${CMAKE_CURRENT_SOURCE_DIR}/Clear-PEDateTimeStamp.ps1" - -In "$.timestamped" - -Out "$") - add_custom_command( OUTPUT "${OUTPUT_XMLDOCS}" DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/WinRTComponent.xml" diff --git a/InteropTests/WinRTComponent/WinMD/Clear-PEDateTimeStamp.ps1 b/InteropTests/WinRTComponent/WinMD/Clear-PEDateTimeStamp.ps1 deleted file mode 100644 index db1fa07..0000000 --- a/InteropTests/WinRTComponent/WinMD/Clear-PEDateTimeStamp.ps1 +++ /dev/null @@ -1,19 +0,0 @@ -[CmdletBinding(PositionalBinding=$false)] -param( - [Parameter(Mandatory=$true)] - [string] $In, - [Parameter(Mandatory=$true)] - [string] $Out -) - -$ErrorActionPreference = "Stop" - -$PEBytes = [IO.File]::ReadAllBytes($In) -$MSDosSignature = [BitConverter]::ToUInt16($PEBytes, 0x0) -if ($MSDosSignature -ne 0x5A4D) { throw "Invalid MS-DOS signature" } # "MZ", little endian -$PEHeaderOffset = [BitConverter]::ToInt32($PEBytes, 0x3C) -$PESignature = [BitConverter]::ToInt32($PEBytes, $PEHeaderOffset) -if ($PESignature -ne 0x4550) { throw "Invalid PE signature" } # "PE\0\0", little endian -$PETimeDateStampOffset = $PEHeaderOffset + 0x8 -[Array]::Clear($PEBytes, $PETimeDateStampOffset, 0x4) -[IO.File]::WriteAllBytes($Out, $PEBytes) \ No newline at end of file