Skip to content

Commit

Permalink
Remove WOW64 checking. Switch to Microsoft.NETFramework.ReferenceAsse…
Browse files Browse the repository at this point in the history
…mblies.net20. Fix scripts.
  • Loading branch information
ww898 committed Apr 22, 2020
1 parent 8dc848a commit f2ccd4f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
6 changes: 0 additions & 6 deletions AELauncher/AEProcess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@ namespace ww898.AELauncher
public static class AEProcess
{
private const string Sys32Dir = @"%SystemRoot%\System32";
private const string Wow64Dir = @"%SystemRoot%\SysWOW64";

private const string AeLoaderDll = "AELoader.dll";

private const string Sys32AeLoaderDll = Sys32Dir + @"\" + AeLoaderDll;
private const string Wow64AeLoaderDll = Wow64Dir + @"\" + AeLoaderDll;

private const string DonorExe = Sys32Dir + @"\recdisc.exe";

Expand Down Expand Up @@ -53,10 +51,6 @@ private static void Run(string executable, string arguments = null)
if (!File.Exists(Environment.ExpandEnvironmentVariables(Sys32AeLoaderDll)))
throw new FileNotFoundException(Sys32AeLoaderDll + " wasn't found");

if (Directory.Exists(Environment.ExpandEnvironmentVariables(Wow64Dir)))
if (!File.Exists(Environment.ExpandEnvironmentVariables(Wow64AeLoaderDll)))
throw new FileNotFoundException(Wow64AeLoaderDll + " wasn't found");

if (!ElevationUtil.IsUacEnabled())
throw new Exception("UAC is disabled");

Expand Down
10 changes: 7 additions & 3 deletions Common.targets
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@
<Authors>Mikhail Pilin</Authors>
<Copyright>Copyright © 2020 Mikhail Pilin</Copyright>
<Description>Auto elevation executor</Description>
<Version>1.0.2</Version>
<PackageReleaseNotes>Remove unnecessary WOW64 checking</PackageReleaseNotes>
<Version>1.0.3</Version>
</PropertyGroup>
<PropertyGroup Condition="'$(OS)' == 'Windows_NT' AND ('$(TargetFramework)' == 'net20' or '$(TargetFramework)' == 'net30' or '$(TargetFramework)' == 'net35')">
<FrameworkPathOverride>$(MSBuildProgramFiles32)\Reference Assemblies\Microsoft\Framework\.NETFramework\v3.5\Profile\Client</FrameworkPathOverride>
<PropertyGroup>
<FrameworkPathOverride Condition="'$(TargetFramework)' == 'net20'">$(NuGetPackageRoot)microsoft.netframework.referenceassemblies.net20/1.0.0/build/.NETFramework/v2.0/</FrameworkPathOverride>
</PropertyGroup>
<ItemGroup>
<PackageReference Condition="'$(TargetFramework)' == 'net20'" Include="Microsoft.NETFramework.ReferenceAssemblies.net20" Version="1.0.0" ExcludeAssets="All" PrivateAssets="All" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set _root_dir=%~dp0..
set _ae_dir=%_root_dir%\ae
set _install_dir=%_ae_dir%\install
set _run_dir=%_ae_dir%\run
set _zip_file=%_root_dir%\ae.zip
set _zip_file=%_root_dir%\AELoader.zip

del /q "%_zip_file%"
rmdir /q /s "%_ae_dir%"
Expand Down
Binary file modified version.hpp
Binary file not shown.

0 comments on commit f2ccd4f

Please sign in to comment.