From 572a94ca3a32061d48216cc28375ab457b2794cc Mon Sep 17 00:00:00 2001 From: "Van der Boon, Robert GSNL-PTT/SPD" Date: Fri, 30 Nov 2018 12:01:21 +0100 Subject: [PATCH 1/2] Improve LANG env var detection --- vendor/init.bat | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/vendor/init.bat b/vendor/init.bat index 1a5c1bb..af79340 100644 --- a/vendor/init.bat +++ b/vendor/init.bat @@ -243,9 +243,16 @@ if defined GIT_INSTALL_ROOT ( :: define SVN_SSH so we can use git svn with ssh svn repositories if not defined SVN_SSH set "SVN_SSH=%GIT_INSTALL_ROOT:\=\\%\\bin\\ssh.exe" - - for /F "delims=" %%F in ('env /usr/bin/locale -uU 2') do ( - set "LANG=%%F" + + if not defined LANG ( + :: Find locale.exe: From the git install root, from the path, using the git installed env, or fallback using the env from the path. + if not defined git_locale if exist "!GIT_INSTALL_ROOT!\usr\bin\locale.exe" set git_locale="!GIT_INSTALL_ROOT!\usr\bin\locale.exe" + if not defined git_locale for /F "delims=" %%F in ('where locale.exe 2^>nul') do (if not defined git_locale set git_locale="%%F") + if not defined git_locale if exist "!GIT_INSTALL_ROOT!\usr\bin\env.exe" set git_locale="!GIT_INSTALL_ROOT!\usr\bin\env.exe" /usr/bin/locale + if not defined git_locale set git_locale=env /usr/bin/locale + for /F "delims=" %%F in ('!git_locale! -uU 2') do ( + set "LANG=%%F" + ) ) ) From 5c7f4943ad9a1cd1f2183fc003914ba8b9148251 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Fri, 30 Nov 2018 14:56:30 -0500 Subject: [PATCH 2/2] fix initial launch of cmder starting with conemu default cfg --- launcher/src/CmderLauncher.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index 438a6d2..6c281e5 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -319,6 +319,16 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr } } } + else { + if (!CopyFile(defaultCfgPath, cfgPath, FALSE)) + { + MessageBox(NULL, + (GetLastError() == ERROR_ACCESS_DENIED) + ? L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml! Access Denied." + : L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml!", MB_TITLE, MB_ICONSTOP); + exit(1); + } + } } else if (PathFileExists(cfgPath)) // vendor/conemu-maximus5/ConEmu.xml exists, copy vendor/conemu-maximus5/ConEmu.xml to config/user_conemu.xml {