From ce4e7fd64d3d462a523253dd53fb36f3aebd179a Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Mon, 15 May 2017 16:01:38 +0200 Subject: Windows installer: use correct installation directory for opening HTML help (for now only donation page). --- src/Common/Dlgcode.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c index fcc69514..73eabfaf 100644 --- a/src/Common/Dlgcode.c +++ b/src/Common/Dlgcode.c @@ -10239,18 +10239,25 @@ std::wstring GetWindowsEdition () return osname; } +#ifdef SETUP +extern wchar_t InstallationPath[TC_MAX_PATH]; +#endif void Applink (char *dest, BOOL bSendOS, char *extraOutput) { wchar_t url [MAX_URL_LENGTH] = {0}; - wchar_t page[MAX_PATH] = {0}; - wchar_t installDir[MAX_PATH] = {0}; + wchar_t page[TC_MAX_PATH] = {0}; + wchar_t installDir[TC_MAX_PATH] = {0}; BOOL buildUrl = TRUE; int r; ArrowWaitCursor (); - GetModPath (installDir, MAX_PATH); +#ifdef SETUP + StringCbCopyW (installDir, sizeof (installDir), InstallationPath); +#else + GetModPath (installDir, TC_MAX_PATH); +#endif if (strcmp(dest, "donate") == 0) { -- cgit v1.2.3