Tue, 06 Apr 2021 03:35:20 -0500
Port the updates from 2.14.2 and the upcoming 2.14.3 to 3.0.0
* Use the unicode version of the System and UserInfo plugins to fix
non-english languages in the Windows installer.
* Update the installer to use the inetc plugin so that https downloads will
work. This became necessary because Sourceforge now redirects http to
https.
* Standardize everything in pidgin/win32/winpidgin.c to use `wprintf`.
Testing Done:
Compiled and ran on windows 10.
Reviewed at https://reviews.imfreedom.org/r/595/
| pidgin/win32/nsis/pidgin-installer.nsi | file | annotate | diff | comparison | revisions | |
| pidgin/win32/winpidgin.c | file | annotate | diff | comparison | revisions |
--- a/pidgin/win32/nsis/pidgin-installer.nsi Tue Apr 06 03:33:39 2021 -0500 +++ b/pidgin/win32/nsis/pidgin-installer.nsi Tue Apr 06 03:35:20 2021 -0500 @@ -89,8 +89,8 @@ ;-------------------------------- ;Reserve files used in .onInit ;for faster start-up -ReserveFile "${NSISDIR}\Plugins\System.dll" -ReserveFile "${NSISDIR}\Plugins\UserInfo.dll" +ReserveFile "${NSISDIR}\Plugins\unicode\System.dll" +ReserveFile "${NSISDIR}\Plugins\unicode\UserInfo.dll" !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS !insertmacro MUI_RESERVEFILE_LANGDLL @@ -256,10 +256,9 @@ retry: StrCpy $R2 "${DOWNLOADER_URL}>k_version=${GTK_INSTALL_VERSION}&dl_pkg=gtk" DetailPrint "Downloading GTK+ Runtime ... ($R2)" - NSISdl::download /TIMEOUT=10000 "$R2" "$R1" + inetc::get /TIMEOUT=10000 "$R2" "$R1" Pop $R0 - ;StrCmp $R0 "cancel" done - StrCmp $R0 "success" 0 prompt_retry + StrCmp $R0 "OK" 0 prompt_retry Push "${GTK_SHA1SUM}" Push "$R1" ; Filename
--- a/pidgin/win32/winpidgin.c Tue Apr 06 03:33:39 2021 -0500 +++ b/pidgin/win32/winpidgin.c Tue Apr 06 03:35:20 2021 -0500 @@ -75,7 +75,7 @@ if (fail_if_running) { HWND msg_win; - printf("An instance of Pidgin is already running.\n"); + wprintf(L"An instance of Pidgin is already running.\n"); if((msg_win = FindWindowExW(NULL, NULL, L"WinpidginMsgWinCls", NULL))) if(SendMessage(msg_win, PIDGIN_WM_FOCUS_REQUEST, (WPARAM) NULL, (LPARAM) NULL)) @@ -90,7 +90,7 @@ return FALSE; } } else if (err != ERROR_SUCCESS) - printf("Error (%u) accessing \"pidgin_is_running\" mutex.\n", (UINT) err); + wprintf(L"Error (%u) accessing \"pidgin_is_running\" mutex.\n", (UINT) err); } return TRUE; } @@ -116,12 +116,12 @@ wlen = wcslen(tmp1); if (wlen == 0) { - printf("No protocol message specified.\n"); + wprintf(L"No protocol message specified.\n"); return; } if (!(msg_win = FindWindowExW(NULL, NULL, L"WinpidginMsgWinCls", NULL))) { - printf("Unable to find an instance of Pidgin to handle protocol message.\n"); + wprintf(L"Unable to find an instance of Pidgin to handle protocol message.\n"); return; } @@ -134,7 +134,7 @@ } if (len == 0) { - printf("No protocol message specified.\n"); + wprintf(L"No protocol message specified.\n"); return; } @@ -270,7 +270,7 @@ LPFNSETLOGFILE MySetLogFile; /* exchndl.dll is built without UNICODE */ char debug_dir[MAX_PATH]; - printf("Loaded exchndl.dll\n"); + wprintf(L"Loaded exchndl.dll\n"); /* Temporarily override exchndl.dll's logfile * to something sane (Pidgin will override it * again when it initializes) */ @@ -278,7 +278,7 @@ if (MySetLogFile) { if (GetTempPathA(sizeof(debug_dir), debug_dir) != 0) { strcat(debug_dir, "pidgin.RPT"); - printf(" Setting exchndl.dll LogFile to %s\n", + wprintf(L" Setting exchndl.dll LogFile to %s\n", debug_dir); MySetLogFile(debug_dir); } @@ -306,7 +306,7 @@ "%s\\pidgin-%s-dbgsym", pidgin_dir_ansi, VERSION); debug_dir[sizeof(debug_dir) - 1] = '\0'; - printf(" Setting exchndl.dll DebugInfoDir to %s\n", + wprintf(L" Setting exchndl.dll DebugInfoDir to %s\n", debug_dir); MySetLogFile(debug_dir); free(pidgin_dir_ansi);