VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2017-05-14 11:42:52 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2017-05-15 01:16:40 +0200
commit817ffac87ea49147f0c82b00d0c5e2d0f38f7fc3 (patch)
tree15ad9b28c5ea6953b461ff5d6631adb79d567eb9 /src/Common
parent5e1fffa87191c3566bcbe20c6e8d29d5f21651d5 (diff)
downloadVeraCrypt-817ffac87ea49147f0c82b00d0c5e2d0f38f7fc3.tar.gz
VeraCrypt-817ffac87ea49147f0c82b00d0c5e2d0f38f7fc3.zip
Replace Codeplex links by ones on veracrypt.fr
Diffstat (limited to 'src/Common')
-rw-r--r--src/Common/Dlgcode.c105
-rw-r--r--src/Common/Dlgcode.h1
-rw-r--r--src/Common/Language.xml4
-rw-r--r--src/Common/Tcdefs.h5
4 files changed, 72 insertions, 43 deletions
diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c
index c177793b..5ff9a83b 100644
--- a/src/Common/Dlgcode.c
+++ b/src/Common/Dlgcode.c
@@ -6967,6 +6967,17 @@ void CorrectFileName (wchar_t* fileName)
}
}
+void CorrectURL (wchar_t* fileName)
+{
+ /* replace '\' by '/' */
+ size_t i, len = wcslen (fileName);
+ for (i = 0; i < len; i++)
+ {
+ if (fileName [i] == L'\\')
+ fileName [i] = L'/';
+ }
+}
+
void IncreaseWrongPwdRetryCount (int count)
{
WrongPwdRetryCounter += count;
@@ -10162,140 +10173,158 @@ std::wstring GetWindowsEdition ()
void Applink (char *dest, BOOL bSendOS, char *extraOutput)
{
- char url [MAX_URL_LENGTH];
+ wchar_t url [MAX_URL_LENGTH] = {0};
+ wchar_t page[MAX_PATH] = {0};
+ wchar_t installDir[MAX_PATH] = {0};
+ BOOL buildUrl = TRUE;
+ int r;
ArrowWaitCursor ();
+
+ GetModPath (installDir, MAX_PATH);
- // sprintf_s (url, sizeof (url), TC_APPLINK "%s%s&dest=%s", bSendOS ? ("&os=" + GetWindowsEdition()).c_str() : "", extraOutput, dest);
if (strcmp(dest, "donate") == 0)
{
- StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=Donation#VeraCryptDonation");
+ StringCbCopyW (page, sizeof (page),L"Donation.html");
}
else if (strcmp(dest, "main") == 0)
{
- StringCbCopyA (url, sizeof (url),TC_HOMEPAGE);
+ StringCbCopyW (url, sizeof (url), TC_HOMEPAGE);
+ buildUrl = FALSE;
}
else if (strcmp(dest,"localizations") == 0)
{
- StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=Language%20Packs");
+ StringCbCopyW (page, sizeof (page),L"Language%20Packs.html");
}
else if (strcmp(dest, "beginnerstutorial") == 0 || strcmp(dest,"tutorial") == 0)
{
- StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=Beginner%27s%20Tutorial");
+ StringCbCopyW (page, sizeof (page),L"Beginner%27s%20Tutorial.html");
}
else if (strcmp(dest, "releasenotes") == 0 || strcmp(dest, "history") == 0)
{
- StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=Release%20Notes");
+ StringCbCopyW (page, sizeof (page),L"Release%20Notes.html");
}
else if (strcmp(dest, "hwacceleration") == 0)
{
- StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=Hardware%20Acceleration");
+ StringCbCopyW (page, sizeof (page),L"Hardware%20Acceleration.html");
}
else if (strcmp(dest, "parallelization") == 0)
{
- StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=Parallelization");
+ StringCbCopyW (page, sizeof (page),L"Parallelization.html");
}
else if (strcmp(dest, "help") == 0)
{
- StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/documentation");
+ StringCbCopyW (page, sizeof (page),L"Documentation.html");
}
else if (strcmp(dest, "keyfiles") == 0)
{
- StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=Keyfiles");
+ StringCbCopyW (page, sizeof (page),L"Keyfiles.html");
}
else if (strcmp(dest, "introcontainer") == 0)
{
- StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=Creating%20New%20Volumes");
+ StringCbCopyW (page, sizeof (page),L"Creating%20New%20Volumes.html");
}
else if (strcmp(dest, "introsysenc") == 0)
{
- StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=System%20Encryption");
+ StringCbCopyW (page, sizeof (page),L"System%20Encryption.html");
}
else if (strcmp(dest, "hiddensysenc") == 0)
{
- StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=VeraCrypt%20Hidden%20Operating%20System");
+ StringCbCopyW (page, sizeof (page),L"VeraCrypt%20Hidden%20Operating%20System.html");
}
else if (strcmp(dest, "sysencprogressinfo") == 0)
{
- StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=System%20Encryption");
+ StringCbCopyW (page, sizeof (page),L"System%20Encryption.html");
}
else if (strcmp(dest, "hiddenvolume") == 0)
{
- StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=Hidden%20Volume");
+ StringCbCopyW (page, sizeof (page),L"Hidden%20Volume.html");
}
else if (strcmp(dest, "aes") == 0)
{
- StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=AES");
+ StringCbCopyW (page, sizeof (page),L"AES.html");
}
else if (strcmp(dest, "serpent") == 0)
{
- StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=Serpent");
+ StringCbCopyW (page, sizeof (page),L"Serpent.html");
}
else if (strcmp(dest, "twofish") == 0)
{
- StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=Twofish");
- }
- else if (strcmp(dest, "gost89") == 0)
- {
- StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=GOST89");
+ StringCbCopyW (page, sizeof (page),L"Twofish.html");
}
else if (strcmp(dest, "kuznyechik") == 0)
{
- StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=Kuznyechik");
+ StringCbCopyW (page, sizeof (page),L"Kuznyechik.html");
}
else if (strcmp(dest, "camellia") == 0)
{
- StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=Camellia");
+ StringCbCopyW (page, sizeof (page),L"Camellia.html");
}
else if (strcmp(dest, "cascades") == 0)
{
- StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=Cascades");
+ StringCbCopyW (page, sizeof (page),L"Cascades.html");
}
else if (strcmp(dest, "hashalgorithms") == 0)
{
- StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=Hash%20Algorithms");
+ StringCbCopyW (page, sizeof (page),L"Hash%20Algorithms.html");
}
else if (strcmp(dest, "isoburning") == 0)
{
- StringCbCopyA (url, sizeof (url),"https://cdburnerxp.se/en/home");
+ StringCbCopyW (url, sizeof (url),L"https://cdburnerxp.se/en/home");
+ buildUrl = FALSE;
}
else if (strcmp(dest, "sysfavorites") == 0)
{
- StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=System%20Favorite%20Volumes");
+ StringCbCopyW (page, sizeof (page),L"System%20Favorite%20Volumes.html");
}
else if (strcmp(dest, "favorites") == 0)
{
- StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=Favorite%20Volumes");
+ StringCbCopyW (page, sizeof (page),L"Favorite%20Volumes.html");
}
else if (strcmp(dest, "hiddenvolprotection") == 0)
{
- StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=Protection%20of%20Hidden%20Volumes");
+ StringCbCopyW (page, sizeof (page),L"Protection%20of%20Hidden%20Volumes.html");
}
else if (strcmp(dest, "faq") == 0)
{
- StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=FAQ");
+ StringCbCopyW (page, sizeof (page),L"FAQ.html");
}
else if (strcmp(dest, "downloads") == 0)
{
- StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=Downloads");
+ StringCbCopyW (page, sizeof (page),L"Downloads.html");
}
else if (strcmp(dest, "news") == 0)
{
- StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=News");
+ StringCbCopyW (page, sizeof (page),L"News.html");
}
else if (strcmp(dest, "contact") == 0)
{
- StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=Contact");
+ StringCbCopyW (page, sizeof (page),L"Contact.html");
}
else if (strcmp(dest, "pim") == 0)
{
- StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=Personal%20Iterations%20Multiplier%20%28PIM%29");
+ StringCbCopyW (page, sizeof (page),L"Personal%20Iterations%20Multiplier%20%28PIM%29.html");
}
else
{
- StringCbCopyA (url, sizeof (url),TC_APPLINK);
+ StringCbCopyW (url, sizeof (url),TC_APPLINK);
+ buildUrl = FALSE;
+ }
+
+ if (buildUrl)
+ {
+ StringCbPrintfW (url, sizeof (url), L"file:///%sdocs/html/en/%s", installDir, page);
+ CorrectURL (url);
}
- ShellExecuteA (NULL, "open", url, NULL, NULL, SW_SHOWNORMAL);
+
+ r = (int) ShellExecuteW (NULL, L"open", url, NULL, NULL, SW_SHOWNORMAL);
+
+ if (((r == ERROR_FILE_NOT_FOUND) || (r == ERROR_PATH_NOT_FOUND)) && buildUrl)
+ {
+ // fallbacl to online resources
+ StringCbPrintfW (url, sizeof (url), L"https://www.veracrypt.fr/en/%s", page);
+ ShellExecuteW (NULL, L"open", url, NULL, NULL, SW_SHOWNORMAL);
+ }
Sleep (200);
NormalCursor ();
diff --git a/src/Common/Dlgcode.h b/src/Common/Dlgcode.h
index a1930f67..8d92cf40 100644
--- a/src/Common/Dlgcode.h
+++ b/src/Common/Dlgcode.h
@@ -336,6 +336,7 @@ BOOL UpdateDriveCustomLabel (int driveNo, wchar_t* effectiveLabel, BOOL bSetValu
BOOL CheckCapsLock (HWND hwnd, BOOL quiet);
BOOL CheckFileExtension (wchar_t *fileName);
void CorrectFileName (wchar_t* fileName);
+void CorrectURL (wchar_t* fileName);
void IncreaseWrongPwdRetryCount (int count);
void ResetWrongPwdRetryCount (void);
BOOL WrongPwdRetryCountOverLimit (void);
diff --git a/src/Common/Language.xml b/src/Common/Language.xml
index 6c5697b4..a53d69a2 100644
--- a/src/Common/Language.xml
+++ b/src/Common/Language.xml
@@ -857,7 +857,7 @@
<string lang="en" key="TC_INSTALLER_IS_RUNNING">VeraCrypt Installer is currently running on this system and performing or preparing installation or update of VeraCrypt. Before you proceed, please wait for it to finish or close it. If you cannot close it, please restart your computer before proceeding.</string>
<string lang="en" key="INSTALL_FAILED">Installation failed.</string>
<string lang="en" key="UNINSTALL_FAILED">Uninstallation failed.</string>
- <string lang="en" key="DIST_PACKAGE_CORRUPTED">This distribution package is damaged. Please try downloading it again (preferably from the official VeraCrypt website at https://veracrypt.codeplex.com).</string>
+ <string lang="en" key="DIST_PACKAGE_CORRUPTED">This distribution package is damaged. Please try downloading it again (preferably from the official VeraCrypt website at https://www.veracrypt.fr).</string>
<string lang="en" key="CANNOT_WRITE_FILE_X">Cannot write file %s</string>
<string lang="en" key="EXTRACTING_VERB">Extracting</string>
<string lang="en" key="CANNOT_READ_FROM_PACKAGE">Cannot read data from the package.</string>
@@ -1232,7 +1232,7 @@
<string lang="en" key="HIDDEN_OS_CREATION_PREINFO_HELP">In the next steps, VeraCrypt will create the hidden operating system by copying the content of the system partition to the hidden volume (data being copied will be encrypted on the fly with an encryption key different from the one that will be used for the decoy operating system).\n\nPlease note that the process will be performed in the pre-boot environment (before Windows starts) and it may take a long time to complete; several hours or even several days (depending on the size of the system partition and on the performance of your computer).\n\nYou will be able to interrupt the process, shut down your computer, start the operating system and then resume the process. However, if you interrupt it, the entire process of copying the system will have to start from the beginning (because the content of the system partition must not change during cloning).</string>
<string lang="en" key="CONFIRM_CANCEL_HIDDEN_OS_CREATION">Do you want to cancel the entire process of creation of the hidden operating system?\n\nNote: You will NOT be able to resume the process if you cancel it now.</string>
<string lang="en" key="CONFIRM_CANCEL_SYS_ENC_PRETEST">Do you want to cancel the system encryption pretest?</string>
- <string lang="en" key="BOOT_PRETEST_FAILED_RETRY">The VeraCrypt system encryption pretest failed. Do you want to try again?\n\nIf you select 'No', the pre-boot authentication component will be uninstalled.\n\nNotes:\n\n- If the VeraCrypt Boot Loader did not ask you to enter the password before Windows started, it is possible that your operating system does not boot from the drive on which it is installed. This is not supported.\n\n- If you used an encryption algorithm other than AES and the pretest failed (and you entered the password), it may have been caused by an inappropriately designed driver. Select 'No', and try encrypting the system partition/drive again, but use the AES encryption algorithm (which has the lowest memory requirements).\n\n- For more possible causes and solutions, see: https://veracrypt.codeplex.com/wikipage?title=Troubleshooting</string>
+ <string lang="en" key="BOOT_PRETEST_FAILED_RETRY">The VeraCrypt system encryption pretest failed. Do you want to try again?\n\nIf you select 'No', the pre-boot authentication component will be uninstalled.\n\nNotes:\n\n- If the VeraCrypt Boot Loader did not ask you to enter the password before Windows started, it is possible that your operating system does not boot from the drive on which it is installed. This is not supported.\n\n- If you used an encryption algorithm other than AES and the pretest failed (and you entered the password), it may have been caused by an inappropriately designed driver. Select 'No', and try encrypting the system partition/drive again, but use the AES encryption algorithm (which has the lowest memory requirements).\n\n- For more possible causes and solutions, see: https://www.veracrypt.fr/en/Troubleshooting.html</string>
<string lang="en" key="SYS_DRIVE_NOT_ENCRYPTED">The system partition/drive does not appear to be encrypted (neither partially nor fully).</string>
<string lang="en" key="SETUP_FAILED_BOOT_DRIVE_ENCRYPTED">Your system partition/drive is encrypted (partially or fully).\n\nPlease decrypt your system partition/drive entirely before proceeding. To do so, select 'System' &gt; 'Permanently Decrypt System Partition/Drive' from the menu bar of the main VeraCrypt window.</string>
<string lang="en" key="SETUP_FAILED_BOOT_DRIVE_ENCRYPTED_DOWNGRADE">When the system partition/drive is encrypted (partially or fully), you cannot downgrade VeraCrypt (but you can upgrade it or reinstall the same version).</string>
diff --git a/src/Common/Tcdefs.h b/src/Common/Tcdefs.h
index 9a5cb43a..bcf2928e 100644
--- a/src/Common/Tcdefs.h
+++ b/src/Common/Tcdefs.h
@@ -359,9 +359,8 @@ void EraseMemory (void *memory, int size);
#define MAX_URL_LENGTH 2084 /* Internet Explorer limit. Includes the terminating null character. */
-#define TC_HOMEPAGE "http://www.idrix.fr/"
-#define TC_APPLINK "https://veracrypt.codeplex.com"
-#define TC_APPLINK_SECURE "https://veracrypt.codeplex.com"
+#define TC_HOMEPAGE L"https://www.idrix.fr/"
+#define TC_APPLINK L"https://www.veracrypt.fr"
enum
{