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
This commit is contained in:
Benjamin Staneck 2016-06-30 01:55:13 +02:00
parent 14a6e5953c
commit 6a474dd624

View File

@ -131,7 +131,14 @@ void StartCmder(std::wstring path, bool is_single_mode)
PathCombine(cfgPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu.xml"); 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)) if (FileExists(oldCfgPath) && !FileExists(cfgPath))
{ {