Skip to content

Commit c96c90f

Browse files
committed
[PE Helper] Official ARM64 support for DIM
The ARM64 build of the Driver Installation Module (DIM) works without any problems on a Raspberry Pi. This officially introduces support for that architecture on the PE Helper when it creates the ISO files. The Arm64EC version is removed because of 2 reasons: 1. It didn't work 2. It isn't necessary, since we don't have to slowly convert the AMD64 native code to ARM64 and have an in-between version However, ARM64 Windows PEs will still have support for Arm64EC, for **your** applications (you will have to target them to this platform first) An additional note is that, in order to fully experience the DIM in the ARM64 DISMTools PE, you will have to start ISO creation from within an ARM64 system (so use your Copilot+ PCs with Recall and other stuff no one asked, or Project Volterra, or your Lumia phone, or your Android phone... WoA is everywhere! When will it arrive to iPhones, though?)
1 parent 5cc6832 commit c96c90f

File tree

6 files changed

+10
-83
lines changed

6 files changed

+10
-83
lines changed

DISMTools.vbproj

-3
Original file line numberDiff line numberDiff line change
@@ -1450,9 +1450,6 @@
14501450
<Content Include="Helpers\extps1\PE_Helper\tools\DIM\amd64\DT-DIM.exe">
14511451
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
14521452
</Content>
1453-
<Content Include="Helpers\extps1\PE_Helper\tools\DIM\arm64ec\DT-DIM.exe">
1454-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
1455-
</Content>
14561453
<Content Include="Helpers\extps1\PE_Helper\tools\DIM\i386\DT-DIM.exe">
14571454
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
14581455
</Content>

Helpers/extps1/PE_Helper/PE_Helper.ps1

+8-3
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,11 @@ function Start-PECustomization
543543
{
544544
Write-Host "Could not modify terminal settings"
545545
}
546-
if (($arch.ToString() -eq "x86") -or ($arch.ToString() -eq "amd64"))
546+
$supportedArchitectures = [List[string]]::new()
547+
$supportedArchitectures.Add("x86")
548+
$supportedArchitectures.Add("amd64")
549+
$supportedArchitectures.Add("arm64")
550+
if ($supportedArchitectures.Contains($arch.ToString()))
547551
{
548552
try
549553
{
@@ -582,7 +586,7 @@ function Start-PECustomization
582586
x86 {
583587
Copy-Item -Path "\Windows\system32\ExplorerFrame.dll" -Destination "$imagePath\Windows\system32" -Force -Verbose
584588
}
585-
amd64 {
589+
{($arch -eq 'amd64') -or ($arch -eq 'arm64')} {
586590
Copy-Item -Path "\Windows\system32\ExplorerFrame.dll" -Destination "$imagePath\Windows\system32" -Force -Verbose
587591
Copy-Item -Path "\Windows\SysWOW64\ExplorerFrame.dll" -Destination "$imagePath\Windows\SysWOW64" -Force -Verbose
588592
}
@@ -1037,7 +1041,7 @@ function Get-SystemArchitecture
10371041
return "amd64"
10381042
}
10391043
"12" {
1040-
return "arm64"
1044+
return "aarch64"
10411045
}
10421046
default {
10431047
return ""
@@ -1087,6 +1091,7 @@ function Get-Disks
10871091
$supportedArchitectures = [List[string]]::new()
10881092
$supportedArchitectures.Add("i386")
10891093
$supportedArchitectures.Add("amd64")
1094+
$supportedArchitectures.Add("aarch64")
10901095
$systemArchitecture = Get-SystemArchitecture
10911096

10921097
if ($supportedArchitectures.Contains($systemArchitecture))

Helpers/extps1/PE_Helper/files/dim_start/dimstart.bat

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ for %%D in (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) do (
1515
"%sysdrive%\Tools\DIM\i386\DT-DIM.exe"
1616
) else if "%PROCESSOR_ARCHITECTURE%" equ "AMD64" (
1717
"%sysdrive%\Tools\DIM\amd64\DT-DIM.exe"
18+
) else if "%PROCESSOR_ARCHITECTURE%" equ "ARM64" (
19+
"%sysdrive%\Tools\DIM\aarch64\DT-DIM.exe"
1820
)
1921
exit
2022
)
Binary file not shown.

Helpers/extps1/PE_Helper/tools/DIM/src/DT-DIM.vcxproj

-75
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55
<Configuration>Debug</Configuration>
66
<Platform>ARM64</Platform>
77
</ProjectConfiguration>
8-
<ProjectConfiguration Include="Debug|ARM64EC">
9-
<Configuration>Debug</Configuration>
10-
<Platform>ARM64EC</Platform>
11-
</ProjectConfiguration>
128
<ProjectConfiguration Include="Debug|Win32">
139
<Configuration>Debug</Configuration>
1410
<Platform>Win32</Platform>
@@ -21,10 +17,6 @@
2117
<Configuration>Release</Configuration>
2218
<Platform>ARM64</Platform>
2319
</ProjectConfiguration>
24-
<ProjectConfiguration Include="Release|ARM64EC">
25-
<Configuration>Release</Configuration>
26-
<Platform>ARM64EC</Platform>
27-
</ProjectConfiguration>
2820
<ProjectConfiguration Include="Release|Win32">
2921
<Configuration>Release</Configuration>
3022
<Platform>Win32</Platform>
@@ -55,13 +47,6 @@
5547
<UseOfMfc>false</UseOfMfc>
5648
<PlatformToolset>v143</PlatformToolset>
5749
</PropertyGroup>
58-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64EC'" Label="Configuration">
59-
<ConfigurationType>Application</ConfigurationType>
60-
<UseDebugLibraries>true</UseDebugLibraries>
61-
<CharacterSet>Unicode</CharacterSet>
62-
<UseOfMfc>false</UseOfMfc>
63-
<PlatformToolset>v143</PlatformToolset>
64-
</PropertyGroup>
6550
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
6651
<ConfigurationType>Application</ConfigurationType>
6752
<UseDebugLibraries>true</UseDebugLibraries>
@@ -83,13 +68,6 @@
8368
<WholeProgramOptimization>true</WholeProgramOptimization>
8469
<CharacterSet>Unicode</CharacterSet>
8570
</PropertyGroup>
86-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64EC'" Label="Configuration">
87-
<ConfigurationType>Application</ConfigurationType>
88-
<UseDebugLibraries>false</UseDebugLibraries>
89-
<PlatformToolset>v110</PlatformToolset>
90-
<WholeProgramOptimization>true</WholeProgramOptimization>
91-
<CharacterSet>Unicode</CharacterSet>
92-
</PropertyGroup>
9371
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
9472
<ConfigurationType>Application</ConfigurationType>
9573
<UseDebugLibraries>false</UseDebugLibraries>
@@ -106,9 +84,6 @@
10684
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
10785
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
10886
</ImportGroup>
109-
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64EC'" Label="PropertySheets">
110-
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
111-
</ImportGroup>
11287
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="PropertySheets">
11388
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
11489
</ImportGroup>
@@ -118,9 +93,6 @@
11893
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
11994
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
12095
</ImportGroup>
121-
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64EC'" Label="PropertySheets">
122-
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
123-
</ImportGroup>
12496
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="PropertySheets">
12597
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
12698
</ImportGroup>
@@ -134,10 +106,6 @@
134106
<LinkIncremental>true</LinkIncremental>
135107
<EmbedManifest>true</EmbedManifest>
136108
</PropertyGroup>
137-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64EC'">
138-
<LinkIncremental>true</LinkIncremental>
139-
<EmbedManifest>true</EmbedManifest>
140-
</PropertyGroup>
141109
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
142110
<LinkIncremental>true</LinkIncremental>
143111
<EmbedManifest>true</EmbedManifest>
@@ -148,9 +116,6 @@
148116
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
149117
<LinkIncremental>false</LinkIncremental>
150118
</PropertyGroup>
151-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64EC'">
152-
<LinkIncremental>false</LinkIncremental>
153-
</PropertyGroup>
154119
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
155120
<LinkIncremental>false</LinkIncremental>
156121
</PropertyGroup>
@@ -198,28 +163,6 @@
198163
</AdditionalManifestFiles>
199164
</Manifest>
200165
</ItemDefinitionGroup>
201-
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64EC'">
202-
<ClCompile>
203-
<PrecompiledHeader>
204-
</PrecompiledHeader>
205-
<WarningLevel>Level3</WarningLevel>
206-
<Optimization>Disabled</Optimization>
207-
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
208-
<SDLCheck>true</SDLCheck>
209-
<CompileAsManaged>false</CompileAsManaged>
210-
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
211-
<DisableSpecificWarnings>4005</DisableSpecificWarnings>
212-
</ClCompile>
213-
<Link>
214-
<SubSystem>Windows</SubSystem>
215-
<GenerateDebugInformation>true</GenerateDebugInformation>
216-
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
217-
</Link>
218-
<Manifest>
219-
<AdditionalManifestFiles>
220-
</AdditionalManifestFiles>
221-
</Manifest>
222-
</ItemDefinitionGroup>
223166
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
224167
<ClCompile>
225168
<PrecompiledHeader>
@@ -278,24 +221,6 @@
278221
<OptimizeReferences>true</OptimizeReferences>
279222
</Link>
280223
</ItemDefinitionGroup>
281-
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64EC'">
282-
<ClCompile>
283-
<WarningLevel>Level3</WarningLevel>
284-
<PrecompiledHeader>
285-
</PrecompiledHeader>
286-
<Optimization>MaxSpeed</Optimization>
287-
<FunctionLevelLinking>true</FunctionLevelLinking>
288-
<IntrinsicFunctions>true</IntrinsicFunctions>
289-
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
290-
<SDLCheck>true</SDLCheck>
291-
</ClCompile>
292-
<Link>
293-
<SubSystem>Windows</SubSystem>
294-
<GenerateDebugInformation>true</GenerateDebugInformation>
295-
<EnableCOMDATFolding>true</EnableCOMDATFolding>
296-
<OptimizeReferences>true</OptimizeReferences>
297-
</Link>
298-
</ItemDefinitionGroup>
299224
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
300225
<ClCompile>
301226
<WarningLevel>Level3</WarningLevel>

Helpers/extps1/PE_Helper/tools/DIM/src/build.bat

-2
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,10 @@ GOTO Fail_NoBuildTools
2121
%BuildToolPath% DT-DIM.vcxproj /p:Configuration=Debug /p:Platform=Win32 /p:PlatformToolset=v110
2222
%BuildToolPath% DT-DIM.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:PlatformToolset=v110
2323
%BuildToolPath% DT-DIM.vcxproj /p:Configuration=Debug /p:Platform=ARM64
24-
%BuildToolPath% DT-DIM.vcxproj /p:Configuration=Debug /p:Platform=ARM64EC
2524
ECHO Executables were built. Copying them to final outputs...
2625
XCOPY Win32\Debug\DT-DIM.exe ..\i386\DT-DIM.exe /cey /-i
2726
XCOPY x64\Debug\DT-DIM.exe ..\amd64\DT-DIM.exe /cey /-i
2827
XCOPY ARM64\Debug\DT-DIM.exe ..\aarch64\DT-DIM.exe /cey /-i
29-
XCOPY ARM64EC\Debug\DT-DIM.exe ..\arm64ec\DT-DIM.exe /cey /-i
3028
EXIT /B
3129

3230
:Fail_NoVS

0 commit comments

Comments
 (0)