diff --git a/Telegram/SourceFiles/_other/updater_osx.m b/Telegram/SourceFiles/_other/updater_osx.m index cf471db1e..24bbe3092 100644 --- a/Telegram/SourceFiles/_other/updater_osx.m +++ b/Telegram/SourceFiles/_other/updater_osx.m @@ -90,7 +90,7 @@ int main(int argc, const char * argv[]) { openLog(); pid_t procId = 0; - BOOL update = YES, toSettings = NO, autoStart = NO, startInTray = NO, testMode = NO, externalUpdater = NO; + BOOL update = YES, toSettings = NO, autoStart = NO, startInTray = NO, testMode = NO, freeType = NO, externalUpdater = NO; BOOL customWorkingDir = NO; NSString *key = nil; for (int i = 0; i < argc; ++i) { @@ -116,6 +116,8 @@ int main(int argc, const char * argv[]) { startInTray = YES; } else if ([@"-testmode" isEqualToString:[NSString stringWithUTF8String:argv[i]]]) { testMode = YES; + } else if ([@"-freetype" isEqualToString:[NSString stringWithUTF8String:argv[i]]]) { + freeType = YES; } else if ([@"-externalupdater" isEqualToString:[NSString stringWithUTF8String:argv[i]]]) { externalUpdater = YES; } else if ([@"-workdir_custom" isEqualToString:[NSString stringWithUTF8String:argv[i]]]) { @@ -255,6 +257,7 @@ int main(int argc, const char * argv[]) { if (_debug) [args addObject:@"-debug"]; if (startInTray) [args addObject:@"-startintray"]; if (testMode) [args addObject:@"-testmode"]; + if (freeType) [args addObject:@"-freetype"]; if (externalUpdater) [args addObject:@"-externalupdater"]; if (autoStart) [args addObject:@"-autostart"]; if (key) { diff --git a/Telegram/SourceFiles/_other/updater_win.cpp b/Telegram/SourceFiles/_other/updater_win.cpp index 50779423a..41d23ead6 100644 --- a/Telegram/SourceFiles/_other/updater_win.cpp +++ b/Telegram/SourceFiles/_other/updater_win.cpp @@ -339,7 +339,7 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE prevInstance, LPWSTR cmdPara LPWSTR *args; int argsCount; - bool needupdate = false, autostart = false, debug = false, writeprotected = false, startintray = false, testmode = false, externalupdater = false; + bool needupdate = false, autostart = false, debug = false, writeprotected = false, startintray = false, testmode = false, freetype = false, externalupdater = false; args = CommandLineToArgvW(GetCommandLine(), &argsCount); if (args) { for (int i = 1; i < argsCount; ++i) { @@ -355,6 +355,8 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE prevInstance, LPWSTR cmdPara startintray = true; } else if (equal(args[i], L"-testmode")) { testmode = true; + } else if (equal(args[i], L"-freetype")) { + freetype = true; } else if (equal(args[i], L"-externalupdater")) { externalupdater = true; } else if (equal(args[i], L"-writeprotected") && ++i < argsCount) { @@ -427,6 +429,7 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE prevInstance, LPWSTR cmdPara if (debug) targs += L" -debug"; if (startintray) targs += L" -startintray"; if (testmode) targs += L" -testmode"; + if (freetype) targs += L" -freetype"; if (externalupdater) targs += L" -externalupdater"; if (!customWorkingDir.empty()) { targs += L" -workdir \"" + customWorkingDir + L"\""; diff --git a/Telegram/SourceFiles/platform/mac/launcher_mac.mm b/Telegram/SourceFiles/platform/mac/launcher_mac.mm index 28da1bf59..080f7471b 100644 --- a/Telegram/SourceFiles/platform/mac/launcher_mac.mm +++ b/Telegram/SourceFiles/platform/mac/launcher_mac.mm @@ -64,6 +64,7 @@ bool Launcher::launchUpdater(UpdaterLaunch action) { if (Logs::DebugEnabled()) [args addObject:@"-debug"]; if (cStartInTray()) [args addObject:@"-startintray"]; if (cTestMode()) [args addObject:@"-testmode"]; + if (cUseFreeType()) [args addObject:@"-freetype"]; #ifndef TDESKTOP_DISABLE_AUTOUPDATE if (Core::UpdaterDisabled()) [args addObject:@"-externalupdater"]; #endif // !TDESKTOP_DISABLE_AUTOUPDATE diff --git a/Telegram/SourceFiles/platform/win/launcher_win.cpp b/Telegram/SourceFiles/platform/win/launcher_win.cpp index 176dd041a..b2584cd0c 100644 --- a/Telegram/SourceFiles/platform/win/launcher_win.cpp +++ b/Telegram/SourceFiles/platform/win/launcher_win.cpp @@ -71,6 +71,9 @@ bool Launcher::launchUpdater(UpdaterLaunch action) { if (cTestMode()) { pushArgument(qsl("-testmode")); } + if (cUseFreeType()) { + pushArgument(qsl("-freetype")); + } #ifndef TDESKTOP_DISABLE_AUTOUPDATE if (Core::UpdaterDisabled()) { pushArgument(qsl("-externalupdater"));