Skip to content

Commit

Permalink
Merge pull request #427 from kodybrown/development
Browse files Browse the repository at this point in the history
Added code to check for the existence of a customized ini file..
  • Loading branch information
MartiUK committed Dec 4, 2015
2 parents 30dbfa6 + 6e3b834 commit 9a1d49b
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions launcher/src/CmderLauncher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,21 @@ void StartCmder(std::wstring path, bool is_single_mode)
PathRemoveFileSpec(exeDir);

PathCombine(icoPath, exeDir, L"icons\\cmder.ico");
PathCombine(oldCfgPath, exeDir, L"config\\ConEmu.xml");
PathCombine(cfgPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu.xml");

// Check for machine-specific config file.
PathCombine(oldCfgPath, exeDir, L"config\\ConEmu-%COMPUTERNAME%.xml");
ExpandEnvironmentStrings(oldCfgPath, oldCfgPath, sizeof(oldCfgPath) / sizeof(oldCfgPath[0]));
if (!PathFileExists(oldCfgPath)) {
PathCombine(oldCfgPath, exeDir, L"config\\ConEmu.xml");
}

// Check for machine-specific config file.
PathCombine(cfgPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu-%COMPUTERNAME%.xml");
ExpandEnvironmentStrings(cfgPath, cfgPath, sizeof(cfgPath) / sizeof(cfgPath[0]));
if (!PathFileExists(cfgPath)) {
PathCombine(cfgPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu.xml");
}

PathCombine(conEmuPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu.exe");

if (FileExists(oldCfgPath) && !FileExists(cfgPath))
Expand Down

0 comments on commit 9a1d49b

Please sign in to comment.