Skip to content

Commit 02cfdc6

Browse files
committed
Build some DLLs as ARM64X
These are meant to be loaded to both x64 and ARM64 processes. We will compile them as ARM64X (when building for ARM64). That way they will contain both x64 and ARM64 code paths. https://learn.microsoft.com/en-us/windows/arm/arm64x-pe
1 parent 72de1d4 commit 02cfdc6

18 files changed

+95
-108
lines changed

Src/ClassicExplorer/ClassicExplorer.vcxproj

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
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>
812
<ProjectConfiguration Include="Debug|Win32">
913
<Configuration>Debug</Configuration>
1014
<Platform>Win32</Platform>
@@ -17,6 +21,10 @@
1721
<Configuration>Release</Configuration>
1822
<Platform>ARM64</Platform>
1923
</ProjectConfiguration>
24+
<ProjectConfiguration Include="Release|ARM64EC">
25+
<Configuration>Release</Configuration>
26+
<Platform>ARM64EC</Platform>
27+
</ProjectConfiguration>
2028
<ProjectConfiguration Include="Release|Win32">
2129
<Configuration>Release</Configuration>
2230
<Platform>Win32</Platform>
@@ -29,6 +37,10 @@
2937
<Configuration>Setup</Configuration>
3038
<Platform>ARM64</Platform>
3139
</ProjectConfiguration>
40+
<ProjectConfiguration Include="Setup|ARM64EC">
41+
<Configuration>Setup</Configuration>
42+
<Platform>ARM64EC</Platform>
43+
</ProjectConfiguration>
3244
<ProjectConfiguration Include="Setup|Win32">
3345
<Configuration>Setup</Configuration>
3446
<Platform>Win32</Platform>
@@ -65,8 +77,12 @@
6577
<PropertyGroup Condition="'$(Platform)'=='x64'">
6678
<TargetName>$(ProjectName)64</TargetName>
6779
</PropertyGroup>
80+
<PropertyGroup Condition="'$(Platform)'=='ARM64EC'">
81+
<TargetName>$(ProjectName)64</TargetName>
82+
</PropertyGroup>
6883
<PropertyGroup Condition="'$(Platform)'=='ARM64'">
69-
<TargetName>$(ProjectName)A64</TargetName>
84+
<TargetName>$(ProjectName)64</TargetName>
85+
<BuildAsX>true</BuildAsX>
7086
</PropertyGroup>
7187
<PropertyGroup>
7288
<IgnoreImportLibrary>true</IgnoreImportLibrary>
@@ -113,7 +129,6 @@
113129
<None Include="ClassicExplorer.rgs" />
114130
<None Include="ClassicExplorer32.def" />
115131
<None Include="ClassicExplorer64.def" />
116-
<None Include="ClassicExplorerA64.def" />
117132
<None Include="ExplorerBand.rgs" />
118133
<None Include="ExplorerBHO.rgs" />
119134
<None Include="ExplorerL10N.ini">

Src/ClassicExplorer/ClassicExplorer.vcxproj.filters

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,6 @@
8080
<None Include="ShareOverlay.rgs">
8181
<Filter>Resource Files</Filter>
8282
</None>
83-
<None Include="ClassicExplorerA64.def">
84-
<Filter>Source Files</Filter>
85-
</None>
8683
</ItemGroup>
8784
<ItemGroup>
8885
<Text Include="..\Localization\English\ClassicExplorerADMX.txt">

Src/ClassicExplorer/ClassicExplorerA64.def

Lines changed: 0 additions & 13 deletions
This file was deleted.

Src/ClassicIE/ClassicIE.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,8 @@ int WINAPI wWinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdL
189189
}
190190
}
191191

192-
#if defined(_M_AMD64)
192+
#ifdef _WIN64
193193
HMODULE hHookModule=GetModuleHandle(L"ClassicIEDLL_64.dll");
194-
#elif defined(_M_ARM64)
195-
HMODULE hHookModule=GetModuleHandle(L"ClassicIEDLL_A64.dll");
196194
#else
197195
HMODULE hHookModule=GetModuleHandle(L"ClassicIEDLL_32.dll");
198196
#endif

Src/ClassicIE/ClassicIE.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
<TargetName>$(ProjectName)_64</TargetName>
6767
</PropertyGroup>
6868
<PropertyGroup Condition="'$(Platform)'=='ARM64'">
69-
<TargetName>$(ProjectName)_A64</TargetName>
69+
<TargetName>$(ProjectName)_64</TargetName>
7070
</PropertyGroup>
7171
<ItemDefinitionGroup>
7272
<ClCompile>

Src/ClassicIE/ClassicIEDLL/ClassicIEBHO.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,7 @@ static DWORD StartBroker( bool bWait, const wchar_t *param )
5050
PathAppend(path,L"ClassicIE_32.exe");
5151
else
5252
#endif
53-
#if defined(_M_AMD64) || defined(_M_IX86)
5453
PathAppend(path,L"ClassicIE_64.exe");
55-
#elif defined(_M_ARM64)
56-
PathAppend(path,L"ClassicIE_A64.exe");
57-
#endif
5854

5955
wchar_t cmdLine[1024];
6056
Sprintf(cmdLine,_countof(cmdLine),L"\"%s\" %s",path,param);

Src/ClassicIE/ClassicIEDLL/ClassicIEDLL.vcxproj

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
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>
812
<ProjectConfiguration Include="Debug|Win32">
913
<Configuration>Debug</Configuration>
1014
<Platform>Win32</Platform>
@@ -17,6 +21,10 @@
1721
<Configuration>Release</Configuration>
1822
<Platform>ARM64</Platform>
1923
</ProjectConfiguration>
24+
<ProjectConfiguration Include="Release|ARM64EC">
25+
<Configuration>Release</Configuration>
26+
<Platform>ARM64EC</Platform>
27+
</ProjectConfiguration>
2028
<ProjectConfiguration Include="Release|Win32">
2129
<Configuration>Release</Configuration>
2230
<Platform>Win32</Platform>
@@ -29,6 +37,10 @@
2937
<Configuration>Setup</Configuration>
3038
<Platform>ARM64</Platform>
3139
</ProjectConfiguration>
40+
<ProjectConfiguration Include="Setup|ARM64EC">
41+
<Configuration>Setup</Configuration>
42+
<Platform>ARM64EC</Platform>
43+
</ProjectConfiguration>
3244
<ProjectConfiguration Include="Setup|Win32">
3345
<Configuration>Setup</Configuration>
3446
<Platform>Win32</Platform>
@@ -65,8 +77,12 @@
6577
<PropertyGroup Condition="'$(Platform)'=='x64'">
6678
<TargetName>$(ProjectName)_64</TargetName>
6779
</PropertyGroup>
80+
<PropertyGroup Condition="'$(Platform)'=='ARM64EC'">
81+
<TargetName>$(ProjectName)_64</TargetName>
82+
</PropertyGroup>
6883
<PropertyGroup Condition="'$(Platform)'=='ARM64'">
69-
<TargetName>$(ProjectName)_A64</TargetName>
84+
<TargetName>$(ProjectName)_64</TargetName>
85+
<BuildAsX>true</BuildAsX>
7086
</PropertyGroup>
7187
<ItemDefinitionGroup>
7288
<ClCompile>
@@ -107,7 +123,6 @@
107123
<None Include="ClassicIEDLL.rgs" />
108124
<None Include="ClassicIEDLL_32.def" />
109125
<None Include="ClassicIEDLL_64.def" />
110-
<None Include="ClassicIEDLL_A64.def" />
111126
</ItemGroup>
112127
<ItemGroup>
113128
<ClInclude Include="ClassicIEBHO.h" />

Src/ClassicIE/ClassicIEDLL/ClassicIEDLL.vcxproj.filters

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,6 @@
5858
<None Include="ClassicIEDLL.rgs">
5959
<Filter>Resource Files</Filter>
6060
</None>
61-
<None Include="ClassicIEDLL_A64.def">
62-
<Filter>Source Files</Filter>
63-
</None>
6461
</ItemGroup>
6562
<ItemGroup>
6663
<ClInclude Include="ClassicIEBHO.h">
@@ -101,4 +98,4 @@
10198
<Filter>Resource Files</Filter>
10299
</Image>
103100
</ItemGroup>
104-
</Project>
101+
</Project>

Src/ClassicIE/ClassicIEDLL/ClassicIEDLL_A64.def

Lines changed: 0 additions & 10 deletions
This file was deleted.

Src/Common.props

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
<OutDir>$(MSBuildThisFileDirectory)..\build\bin\$(Configuration)ARM64\</OutDir>
2121
<IntDir>$(MSBuildThisFileDirectory)..\build\obj\$(ProjectName)\$(Configuration)ARM64\</IntDir>
2222
</PropertyGroup>
23+
<PropertyGroup Condition="'$(Platform)'=='ARM64EC'">
24+
<OutDir>$(MSBuildThisFileDirectory)..\build\bin\$(Configuration)ARM64EC\</OutDir>
25+
<IntDir>$(MSBuildThisFileDirectory)..\build\obj\$(ProjectName)\$(Configuration)ARM64EC\</IntDir>
26+
</PropertyGroup>
2327

2428
<!-- Common settings for all configurations -->
2529
<ItemDefinitionGroup>

Src/Lib/Lib.vcxproj

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
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>
812
<ProjectConfiguration Include="Debug|Win32">
913
<Configuration>Debug</Configuration>
1014
<Platform>Win32</Platform>
@@ -17,6 +21,10 @@
1721
<Configuration>Release</Configuration>
1822
<Platform>ARM64</Platform>
1923
</ProjectConfiguration>
24+
<ProjectConfiguration Include="Release|ARM64EC">
25+
<Configuration>Release</Configuration>
26+
<Platform>ARM64EC</Platform>
27+
</ProjectConfiguration>
2028
<ProjectConfiguration Include="Release|Win32">
2129
<Configuration>Release</Configuration>
2230
<Platform>Win32</Platform>
@@ -50,6 +58,9 @@
5058
<PropertyGroup>
5159
<OutDir>$(IntDir)</OutDir>
5260
</PropertyGroup>
61+
<PropertyGroup Condition="'$(Platform)'=='ARM64'">
62+
<BuildAsX>true</BuildAsX>
63+
</PropertyGroup>
5364
<ItemDefinitionGroup>
5465
<ClCompile>
5566
<PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>

Src/Setup/BuildBinaries.bat

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ copy /B ..\..\build\bin\Release\Update.exe Output > nul
5151
copy /B ..\..\build\bin\Release\DesktopToasts.dll Output > nul
5252
copy /B ..\..\build\bin\Release\SetupHelper.exe Output > nul
5353

54-
copy /B ..\..\build\bin\SetupARM64\ClassicExplorerA64.dll Output\ARM64 > nul
55-
copy /B ..\..\build\bin\SetupARM64\ClassicIEDLL_A64.dll Output\ARM64 > nul
56-
copy /B ..\..\build\bin\SetupARM64\ClassicIE_A64.exe Output\ARM64 > nul
54+
copy /B ..\..\build\bin\SetupARM64\ClassicExplorer64.dll Output\ARM64 > nul
55+
copy /B ..\..\build\bin\SetupARM64\ClassicIEDLL_64.dll Output\ARM64 > nul
56+
copy /B ..\..\build\bin\SetupARM64\ClassicIE_64.exe Output\ARM64 > nul
5757
copy /B ..\..\build\bin\SetupARM64\StartMenu.exe Output\ARM64 > nul
5858
copy /B ..\..\build\bin\SetupARM64\StartMenuDLL.dll Output\ARM64 > nul
59-
copy /B ..\..\build\bin\SetupARM64\StartMenuHelperA64.dll Output\ARM64 > nul
59+
copy /B ..\..\build\bin\SetupARM64\StartMenuHelper64.dll Output\ARM64 > nul
6060

6161
copy /B ..\..\build\bin\Setup64\ClassicExplorer64.dll Output\x64 > nul
6262
copy /B ..\..\build\bin\Setup64\ClassicIEDLL_64.dll Output\x64 > nul
@@ -99,8 +99,8 @@ copy /B ..\..\build\bin\Setup64\ClassicExplorer64.pdb Output\PDB64 > nul
9999
copy /B Output\x64\ClassicExplorer64.dll Output\PDB64 > nul
100100

101101
REM Explorer ARM64
102-
copy /B ..\..\build\bin\SetupARM64\ClassicExplorerA64.pdb Output\PDBARM64 > nul
103-
copy /B Output\ARM64\ClassicExplorerA64.dll Output\PDBARM64 > nul
102+
copy /B ..\..\build\bin\SetupARM64\ClassicExplorer64.pdb Output\PDBARM64 > nul
103+
copy /B Output\ARM64\ClassicExplorer64.dll Output\PDBARM64 > nul
104104

105105
REM IE 32
106106
copy /B ..\..\build\bin\Setup\ClassicIEDLL_32.pdb Output\PDB32 > nul
@@ -115,10 +115,10 @@ copy /B ..\..\build\bin\Setup64\ClassicIE_64.pdb Output\PDB64 > nul
115115
copy /B Output\x64\ClassicIE_64.exe Output\PDB64 > nul
116116

117117
REM IE ARM64
118-
copy /B ..\..\build\bin\SetupARM64\ClassicIEDLL_A64.pdb Output\PDBARM64 > nul
119-
copy /B Output\ARM64\ClassicIEDLL_A64.dll Output\PDBARM64 > nul
120-
copy /B ..\..\build\bin\SetupARM64\ClassicIE_A64.pdb Output\PDBARM64 > nul
121-
copy /B Output\ARM64\ClassicIE_A64.exe Output\PDBARM64 > nul
118+
copy /B ..\..\build\bin\SetupARM64\ClassicIEDLL_64.pdb Output\PDBARM64 > nul
119+
copy /B Output\ARM64\ClassicIEDLL_64.dll Output\PDBARM64 > nul
120+
copy /B ..\..\build\bin\SetupARM64\ClassicIE_64.pdb Output\PDBARM64 > nul
121+
copy /B Output\ARM64\ClassicIE_64.exe Output\PDBARM64 > nul
122122

123123
REM Menu 32
124124
copy /B ..\..\build\bin\Setup\StartMenu.pdb Output\PDB32 > nul
@@ -145,8 +145,8 @@ copy /B ..\..\build\bin\SetupARM64\StartMenu.pdb Output\PDBARM64 > nul
145145
copy /B Output\ARM64\StartMenu.exe Output\PDBARM64 > nul
146146
copy /B ..\..\build\bin\SetupARM64\StartMenuDLL.pdb Output\PDBARM64 > nul
147147
copy /B Output\ARM64\StartMenuDLL.dll Output\PDBARM64 > nul
148-
copy /B ..\..\build\bin\SetupARM64\StartMenuHelperA64.pdb Output\PDBARM64 > nul
149-
copy /B Output\ARM64\StartMenuHelperA64.dll Output\PDBARM64 > nul
148+
copy /B ..\..\build\bin\SetupARM64\StartMenuHelper64.pdb Output\PDBARM64 > nul
149+
copy /B Output\ARM64\StartMenuHelper64.dll Output\PDBARM64 > nul
150150

151151
REM ********* Source Index PDBs
152152

Src/Setup/Setup.wxs

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,9 @@
6464
<?endif ?>
6565
<Feature Id="ClassicExplorer" Level="1" Title="!(loc.ExplorerTitle)" ConfigurableDirectory="APPLICATIONFOLDER" AllowAdvertise="no" Description="!(loc.ExplorerDesc)">
6666
<ComponentRef Id="ClassicExplorer32.dll" />
67-
<?if $(var.x64)=1 ?>
67+
<?if $(var.x64)=1 Or $(var.ARM64)=1 ?>
6868
<ComponentRef Id="ClassicExplorer64.dll" />
6969
<?endif ?>
70-
<?if $(var.ARM64)=1 ?>
71-
<ComponentRef Id="ClassicExplorerA64.dll" />
72-
<?endif ?>
7370
<ComponentRef Id="ExplorerL10N.ini" />
7471
<ComponentRef Id="ClassicExplorerSettings.exe" />
7572
<ComponentRef Id="ExplorerSettingsLink" />
@@ -79,12 +76,9 @@
7976
<ComponentRef Id="StartMenuDLL.dll" />
8077
<ComponentRef Id="StartMenuL10N.ini" />
8178
<ComponentRef Id="StartMenuHelper32.dll" />
82-
<?if $(var.x64)=1 ?>
79+
<?if $(var.x64)=1 Or $(var.ARM64)=1 ?>
8380
<ComponentRef Id="StartMenuHelper64.dll" />
8481
<?endif ?>
85-
<?if $(var.ARM64)=1 ?>
86-
<ComponentRef Id="StartMenuHelperA64.dll" />
87-
<?endif ?>
8882
<ComponentRef Id="StartScreenLink" />
8983
<ComponentRef Id="StartMenuHelperL10N.ini" />
9084
<ComponentRef Id="ClassicSkin.skin" />
@@ -109,12 +103,9 @@
109103
<Feature Id="ClassicIE" Level="2" Title="!(loc.IETitle)" ConfigurableDirectory="APPLICATIONFOLDER" AllowAdvertise="no" Description="!(loc.IEDesc)">
110104
<ComponentRef Id="ClassicIEDLL_32.dll" />
111105
<ComponentRef Id="ClassicIE_32.exe" />
112-
<?if $(var.x64)=1 ?>
106+
<?if $(var.x64)=1 Or $(var.ARM64)=1 ?>
113107
<ComponentRef Id="ClassicIEDLL_64.dll" />
114108
<ComponentRef Id="ClassicIE_64.exe" />
115-
<?elseif $(var.ARM64)=1 ?>
116-
<ComponentRef Id="ClassicIEDLL_A64.dll" />
117-
<ComponentRef Id="ClassicIE_A64.exe" />
118109
<?endif ?>
119110
<ComponentRef Id="IESettingsLink" />
120111
</Feature>
@@ -458,14 +449,14 @@
458449
<File Id="StartMenuDLL.dll" Checksum="yes" KeyPath="yes" Source="Output\x64\StartMenuDLL.dll" Vital="yes" />
459450
</Component>
460451
<?elseif $(var.ARM64)=1 ?>
461-
<Component Id="ClassicExplorerA64.dll" Guid="2C25783D-394D-4E5B-9259-1650F561E2CE" Win64="yes" DiskId="2">
462-
<File Id="ClassicExplorerA64.dll" KeyPath="yes" Source="Output\ARM64\ClassicExplorerA64.dll" Checksum="yes" SelfRegCost="0" Vital="yes" />
452+
<Component Id="ClassicExplorer64.dll" Guid="2C25783D-394D-4E5B-9259-1650F561E2CE" Win64="yes" DiskId="2">
453+
<File Id="ClassicExplorer64.dll" KeyPath="yes" Source="Output\ARM64\ClassicExplorer64.dll" Checksum="yes" SelfRegCost="0" Vital="yes" />
463454
</Component>
464-
<Component Id="ClassicIEDLL_A64.dll" Guid="43E62408-40EB-4FBB-98CC-7463F5B78266" Win64="yes" DiskId="2">
465-
<File Id="ClassicIEDLL_A64.dll" KeyPath="yes" Source="Output\ARM64\ClassicIEDLL_A64.dll" Checksum="yes" SelfRegCost="0" Vital="yes" />
455+
<Component Id="ClassicIEDLL_64.dll" Guid="43E62408-40EB-4FBB-98CC-7463F5B78266" Win64="yes" DiskId="2">
456+
<File Id="ClassicIEDLL_64.dll" KeyPath="yes" Source="Output\ARM64\ClassicIEDLL_64.dll" Checksum="yes" SelfRegCost="0" Vital="yes" />
466457
</Component>
467-
<Component Id="ClassicIE_A64.exe" Guid="E822E720-8477-4511-AD93-172313EFA636" Win64="yes" DiskId="2">
468-
<File Id="ClassicIE_A64.exe" KeyPath="yes" Source="Output\ARM64\ClassicIE_A64.exe" Checksum="yes" Vital="yes" />
458+
<Component Id="ClassicIE_64.exe" Guid="E822E720-8477-4511-AD93-172313EFA636" Win64="yes" DiskId="2">
459+
<File Id="ClassicIE_64.exe" KeyPath="yes" Source="Output\ARM64\ClassicIE_64.exe" Checksum="yes" Vital="yes" />
469460
</Component>
470461
<Component Id="StartMenu.exe" Guid="FC69E080-4232-4161-A1E5-20E255FB2F6B" Win64="yes" DiskId="2">
471462
<File Id="StartMenu.exe" KeyPath="yes" Checksum="yes" Source="Output\ARM64\StartMenu.exe" Vital="yes" />
@@ -658,8 +649,8 @@
658649
</Component>
659650
<?endif ?>
660651
<?if $(var.ARM64)=1 ?>
661-
<Component Id="StartMenuHelperA64.dll" Guid="108B11E8-2F76-4C37-A274-62BAE6240490" Win64="yes" DiskId="2">
662-
<File Id="StartMenuHelperA64.dll" KeyPath="yes" Source="Output\ARM64\StartMenuHelperA64.dll" Checksum="yes" SelfRegCost="0" Vital="yes" />
652+
<Component Id="StartMenuHelper64.dll" Guid="108B11E8-2F76-4C37-A274-62BAE6240490" Win64="yes" DiskId="2">
653+
<File Id="StartMenuHelper64.dll" KeyPath="yes" Source="Output\ARM64\StartMenuHelper64.dll" Checksum="yes" SelfRegCost="0" Vital="yes" />
663654
</Component>
664655
<?endif ?>
665656
</DirectoryRef>

0 commit comments

Comments
 (0)