Merge pull request #831 from cmderdev/development

1.3 Pre-Release Merge
This commit is contained in:
Martin Kemp 2016-02-19 09:56:47 +00:00
commit e1eed7a0f1
6 changed files with 60 additions and 27 deletions

View File

@ -10,9 +10,6 @@ branches:
except:
- gh-pages
# Do not build on tags
skip_tags: true
#---------------------------------#
# environment configuration #
#---------------------------------#
@ -50,7 +47,7 @@ artifacts:
#---------------------------------#
# notifications #
#---------------------------------#
notifications:
# Webhook
- provider: Webhook

View File

@ -123,14 +123,14 @@
<value name="ColorKeyTransparent" type="hex" data="00"/>
<value name="ColorKeyValue" type="dword" data="00010101"/>
<value name="UseCurrentSizePos" type="hex" data="01"/>
<value name="WindowMode" type="dword" data="00000520"/>
<value name="ConWnd Width" type="dword" data="0000006f"/>
<value name="ConWnd Height" type="dword" data="0000001a"/>
<value name="WindowMode" type="dword" data="0000051f"/>
<value name="ConWnd Width" type="dword" data="00000078"/>
<value name="ConWnd Height" type="dword" data="0000001e"/>
<value name="Cascaded" type="hex" data="01"/>
<value name="ConWnd X" type="dword" data="000000c5"/>
<value name="ConWnd Y" type="dword" data="00000089"/>
<value name="ConWnd X" type="dword" data="000001f4"/>
<value name="ConWnd Y" type="dword" data="000001f4"/>
<value name="16bit Height" type="dword" data="00000000"/>
<value name="AutoSaveSizePos" type="hex" data="00"/>
<value name="AutoSaveSizePos" type="hex" data="01"/>
<value name="IntegralSize" type="hex" data="00"/>
<value name="QuakeStyle" type="hex" data="00"/>
<value name="QuakeAnimation" type="dword" data="0000012c"/>

View File

@ -156,22 +156,21 @@ void StartCmder(std::wstring path, bool is_single_mode)
}
SetEnvironmentVariable(L"CMDER_ROOT", exeDir);
if (!streqi(path.c_str(), L""))
if (streqi(path.c_str(), L""))
{
wchar_t* homeProfile = 0;
SHGetKnownFolderPath(FOLDERID_Profile, 0, NULL, &homeProfile);
if (!SetEnvironmentVariable(L"CMDER_START", homeProfile)) {
MessageBox(NULL, _T("Error trying to set CMDER_START to given path!"), _T("Error"), MB_OK);
}
CoTaskMemFree(static_cast<void*>(homeProfile));
}
else
{
if (!SetEnvironmentVariable(L"CMDER_START", path.c_str())) {
MessageBox(NULL, _T("Error trying to set CMDER_START to given path!"), _T("Error"), MB_OK);
}
}
else
{
wchar_t* homeProfile = 0;
SHGetKnownFolderPath(FOLDERID_Profile, 0, NULL, &homeProfile);
if (!SetEnvironmentVariable(L"CMDER_START", homeProfile)) {
MessageBox(NULL, _T("Error trying to set CMDER_START to USER_PROFILE!"), _T("Error"), MB_OK);
}
CoTaskMemFree(static_cast<void*>(homeProfile));
}
// Ensure EnvironmentVariables are propagated.
SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM)"Environment", SMTO_ABORTIFHUNG, 5000, NULL);
SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM) L"Environment", SMTO_ABORTIFHUNG, 5000, NULL); // For Windows >= 8

39
vendor/clink.lua vendored
View File

@ -71,8 +71,45 @@ local function get_hg_dir(path)
return get_dir_contains(path, '.hg')
end
-- adapted from from clink-completions' git.lua
local function get_git_dir(path)
return get_dir_contains(path, '.git')
-- return parent path for specified entry (either file or directory)
local function pathname(path)
local prefix = ""
local i = path:find("[\\/:][^\\/:]*$")
if i then
prefix = path:sub(1, i-1)
end
return prefix
end
-- Checks if provided directory contains git directory
local function has_git_dir(dir)
return #clink.find_dirs(dir..'/.git') > 0 and dir..'/.git'
end
local function has_git_file(dir)
local gitfile = io.open(dir..'/.git')
if not gitfile then return false end
local git_dir = gitfile:read():match('gitdir: (.*)')
gitfile:close()
return git_dir and dir..'/'..git_dir
end
-- Set default path to current directory
if not path or path == '.' then path = clink.get_cwd() end
-- Calculate parent path now otherwise we won't be
-- able to do that inside of logical operator
local parent_path = pathname(path)
return has_git_dir(path)
or has_git_file(path)
-- Otherwise go up one level and make a recursive call
or (parent_path ~= path and get_git_dir(parent_path) or nil)
end
---

2
vendor/profile.ps1 vendored
View File

@ -53,7 +53,7 @@ try {
}
function checkGit($Path) {
if (Test-Path -Path (Join-Path $Path '.git/') ) {
if (Test-Path -Path (Join-Path $Path '.git') ) {
Write-VcsStatus
return
}

8
vendor/sources.json vendored
View File

@ -1,8 +1,8 @@
[
{
"name": "git-for-windows",
"version": "v2.7.0.windows.2",
"url": "https://github.com/git-for-windows/git/releases/download/v2.7.0.windows.2/PortableGit-2.7.0.2-32-bit.7z.exe"
"version": "v2.7.1.windows.1",
"url": "https://github.com/git-for-windows/git/releases/download/v2.7.1.windows.1/PortableGit-2.7.1-32-bit.7z.exe"
},
{
"name": "clink",
@ -11,8 +11,8 @@
},
{
"name": "conemu-maximus5",
"version": "160202",
"url": "https://github.com/Maximus5/ConEmu/releases/download/v16.02.02/ConEmuPack.160202.7z"
"version": "160207",
"url": "https://github.com/Maximus5/ConEmu/releases/download/v16.02.07/ConEmuPack.160207.7z"
},
{
"name": "clink-completions",