VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Setup/Setup.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2015-09-06 16:58:41 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2015-09-06 18:31:07 (GMT)
commit13bfb2db5952703de6759393fc96b8a0539da7a1 (patch)
tree66a63e91cf26372069c67f20bfe83071226d69bf /src/Setup/Setup.c
parente445863ae477b36ed2831591e3e414685aab2785 (diff)
downloadVeraCrypt-13bfb2db5952703de6759393fc96b8a0539da7a1.zip
VeraCrypt-13bfb2db5952703de6759393fc96b8a0539da7a1.tar.gz
Windows: Installer and Traveler Disk Setup both always copy 32-bit and 64-bit executable binaries.
Diffstat (limited to 'src/Setup/Setup.c')
-rw-r--r--src/Setup/Setup.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/Setup/Setup.c b/src/Setup/Setup.c
index 98b94b0..bd7a6ee 100644
--- a/src/Setup/Setup.c
+++ b/src/Setup/Setup.c
@@ -641,6 +641,18 @@ BOOL DoFilesInstall (HWND hwndDlg, char *szDestDir)
continue; // Destination = target
}
+ // skip files that don't apply to the current architecture
+ if ( (Is64BitOs () && (strcmp (szFiles[i], "AVeraCrypt-x64.exe") == 0))
+ || (Is64BitOs () && (strcmp (szFiles[i], "AVeraCryptExpander-x64.exe") == 0))
+ || (Is64BitOs () && (strcmp (szFiles[i], "AVeraCrypt Format-x64.exe") == 0))
+ || (!Is64BitOs () && (strcmp (szFiles[i], "AVeraCrypt-x86.exe") == 0))
+ || (!Is64BitOs () && (strcmp (szFiles[i], "AVeraCryptExpander-x86.exe") == 0))
+ || (!Is64BitOs () && (strcmp (szFiles[i], "AVeraCrypt Format-x86.exe") == 0))
+ )
+ {
+ continue;
+ }
+
if (*szFiles[i] == 'A')
StringCbCopyA (szDir, sizeof(szDir), szDestDir);
else if (*szFiles[i] == 'D')
@@ -700,17 +712,35 @@ BOOL DoFilesInstall (HWND hwndDlg, char *szDestDir)
}
if (Is64BitOs ()
+ && strcmp (szFiles[i], "AVeraCrypt-x86.exe") == 0)
+ {
+ StringCbCopyNA (curFileName, sizeof(curFileName), "VeraCrypt.exe", sizeof ("VeraCrypt.exe"));
+ }
+
+ if (Is64BitOs ()
&& strcmp (szFiles[i], "AVeraCryptExpander.exe") == 0)
{
StringCbCopyNA (curFileName, sizeof(curFileName), "VeraCryptExpander-x64.exe", sizeof ("VeraCryptExpander-x64.exe"));
}
if (Is64BitOs ()
+ && strcmp (szFiles[i], "AVeraCryptExpander-x86.exe") == 0)
+ {
+ StringCbCopyNA (curFileName, sizeof(curFileName), "VeraCryptExpander.exe", sizeof ("VeraCryptExpander.exe"));
+ }
+
+ if (Is64BitOs ()
&& strcmp (szFiles[i], "AVeraCrypt Format.exe") == 0)
{
StringCbCopyNA (curFileName, sizeof(curFileName), "VeraCrypt Format-x64.exe", sizeof ("VeraCrypt Format-x64.exe"));
}
+ if (Is64BitOs ()
+ && strcmp (szFiles[i], "AVeraCrypt Format-x86.exe") == 0)
+ {
+ StringCbCopyNA (curFileName, sizeof(curFileName), "VeraCrypt Format.exe", sizeof ("VeraCrypt Format.exe"));
+ }
+
if (!bDevm)
{
bResult = FALSE;