diff --git a/etc/deps/cpu-capabilities/cpu-capabilities-x64.dll b/etc/deps/cpu-capabilities/cpu-capabilities-x64.dll
new file mode 100644
index 0000000..d483af3
Binary files /dev/null and b/etc/deps/cpu-capabilities/cpu-capabilities-x64.dll differ
diff --git a/etc/deps/cpu-capabilities/cpu-capabilities-x86.dll b/etc/deps/cpu-capabilities/cpu-capabilities-x86.dll
new file mode 100644
index 0000000..7a47a83
Binary files /dev/null and b/etc/deps/cpu-capabilities/cpu-capabilities-x86.dll differ
diff --git a/frontend/SlunkCrypt.vcxproj b/frontend/SlunkCrypt.vcxproj
index 4a01308..89b4589 100644
--- a/frontend/SlunkCrypt.vcxproj
+++ b/frontend/SlunkCrypt.vcxproj
@@ -209,7 +209,7 @@
false
$(SolutionDir)bin\$(Configuration)\
$(SolutionDir)obj\$(Configuration)\$(PlatformShortName)\$(ProjectName)\
- slunkcrypt-cli-$(PlatformShortName)
+ slunkcrypt-cli-$(PlatformShortName)-sse2
false
@@ -239,7 +239,7 @@
false
$(SolutionDir)bin\$(Configuration)\
$(SolutionDir)obj\$(Configuration)\$(PlatformShortName)\$(ProjectName)\
- slunkcrypt-cli-$(PlatformShortName)
+ slunkcrypt-cli-$(PlatformShortName)-sse2
false
@@ -421,6 +421,7 @@
Fast
4706;4204
false
+ NotSet
Console
diff --git a/gui/Process/SlunkCryptRunner.cs b/gui/Process/SlunkCryptRunner.cs
index 15c6722..68294a6 100644
--- a/gui/Process/SlunkCryptRunner.cs
+++ b/gui/Process/SlunkCryptRunner.cs
@@ -25,6 +25,7 @@ namespace com.muldersoft.slunkcrypt.gui.process
private const string COMMAND_DECRYPT = "-d";
private static readonly Regex RX_PROGRESS = new Regex(@"(\d+)\.(\d)%", RegexOptions.Compiled);
+
private readonly FileStream m_executableFile;
// =============================================================================
@@ -77,15 +78,20 @@ namespace com.muldersoft.slunkcrypt.gui.process
{
FileStream executableFile = null;
string appBaseDirectory = AppDomain.CurrentDomain.BaseDirectory;
- if (Environment.Is64BitOperatingSystem)
+ CPUFeatures cpuFeatures = CPUFeatures.Features;
+ if (cpuFeatures.x64 && CheckExecutableFile(ref executableFile, appBaseDirectory, "x64"))
{
- if (CheckExecutableFile(ref executableFile, appBaseDirectory, "x64"))
- {
- return executableFile;
- }
+ Trace.Assert(executableFile != null);
+ return executableFile;
+ }
+ if (cpuFeatures.sse2 && CheckExecutableFile(ref executableFile, appBaseDirectory, "x86-sse2"))
+ {
+ Trace.Assert(executableFile != null);
+ return executableFile;
}
if (CheckExecutableFile(ref executableFile, appBaseDirectory, "x86"))
{
+ Trace.Assert(executableFile != null);
return executableFile;
}
throw new ExecutableNotFoundException("SlunkCrypt executable file not found!", FILENAME_FORMAT);
@@ -140,7 +146,7 @@ namespace com.muldersoft.slunkcrypt.gui.process
return double.NaN;
}
- private string GetCommandString(Mode mode)
+ private static string GetCommandString(Mode mode)
{
switch(mode)
{
diff --git a/gui/Properties/AssemblyInfo.cs b/gui/Properties/AssemblyInfo.cs
index 18fe4fc..c8c31b5 100644
--- a/gui/Properties/AssemblyInfo.cs
+++ b/gui/Properties/AssemblyInfo.cs
@@ -19,5 +19,5 @@ using System.Windows;
[assembly: ComVisible(false)]
[assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)]
-[assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AssemblyVersion("1.1.*")]
+[assembly: AssemblyFileVersion("1.1.0.0")]
diff --git a/gui/SlunkCryptGUI.csproj b/gui/SlunkCryptGUI.csproj
index 55426de..9c7ae44 100644
--- a/gui/SlunkCryptGUI.csproj
+++ b/gui/SlunkCryptGUI.csproj
@@ -79,8 +79,10 @@
PasswordToggleBox.xaml
+
+
@@ -187,6 +189,9 @@
+
+ copy /Y "$(SolutionDir)\etc\deps\cpu-capabilities\*.dll" "$(TargetDir)"
+