From 6a474dd6241f78e8df0d0af2b9df18a1ed048281 Mon Sep 17 00:00:00 2001 From: Benjamin Staneck Date: Thu, 30 Jun 2016 01:55:13 +0200 Subject: [PATCH] make launcher run ConEmu64 on 64-bit Windows It will now run ConEmu64.exe on 64-bit Windows and ConEmu.exe on 32-bit Windows. fixes #191 --- launcher/src/CmderLauncher.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index b2b0ffa..24f35c8 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -131,7 +131,14 @@ void StartCmder(std::wstring path, bool is_single_mode) PathCombine(cfgPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu.xml"); } - PathCombine(conEmuPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu.exe"); + SYSTEM_INFO sysInfo; + GetNativeSystemInfo(&sysInfo); + if (sysInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) { + PathCombine(conEmuPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu64.exe"); + } + else { + PathCombine(conEmuPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu.exe"); + } if (FileExists(oldCfgPath) && !FileExists(cfgPath)) {