Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Custom option for launcher title#2752

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
DRSDavidSoft merged 10 commits intocmderdev:masterfromDRSDavidSoft:master
Oct 14, 2022
Merged
Changes from3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletionslauncher/src/CmderLauncher.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -105,7 +105,7 @@ bool FileExists(const wchar_t * filePath)
return false;
}

void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstring taskName = L"", std::wstring iconPath = L"", std::wstring cfgRoot = L"", bool use_user_cfg = true, std::wstring conemu_args = L"")
void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstring taskName = L"", std::wstringtitle = L"", std::wstringiconPath = L"", std::wstring cfgRoot = L"", bool use_user_cfg = true, std::wstring conemu_args = L"")
{
#if USE_TASKBAR_API
wchar_t appId[MAX_PATH] = { 0 };
Expand All@@ -132,6 +132,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr

std::wstring cmderStart = path;
std::wstring cmderTask = taskName;
std::wstring cmderTitle = title;
std::wstring cmderConEmuArgs = conemu_args;

std::copy(cfgRoot.begin(), cfgRoot.end(), userConfigDirPath);
Expand DownExpand Up@@ -412,7 +413,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr
PathCombine(conEmuPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu.exe");
}

swprintf_s(args, L"%s /Icon \"%s\" /Title Cmder", args, icoPath);
swprintf_s(args, L"%s /Icon \"%s\"", args, icoPath);

if (!streqi(cmderStart.c_str(), L""))
{
Expand All@@ -429,6 +430,11 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr
swprintf_s(args, L"%s /run {%s}", args, cmderTask.c_str());
}

if (!streqi(cmderTitle.c_str(), L""))
{
swprintf_s(args, L"%s /title \"%s\"", args, cmderTitle.c_str());
}

if (cfgRoot.length() != 0)
{
swprintf_s(args, L"%s -loadcfgfile \"%s\"", args, userConEmuCfgPath);
Expand DownExpand Up@@ -574,6 +580,7 @@ struct cmderOptions
std::wstring cmderCfgRoot = L"";
std::wstring cmderStart = L"";
std::wstring cmderTask = L"";
std::wstring cmderTitle = L"Cmder";
std::wstring cmderIcon = L"";
std::wstring cmderRegScope = L"USER";
std::wstring cmderConEmuArgs = L"";
Expand DownExpand Up@@ -636,6 +643,11 @@ cmderOptions GetOption()
cmderOptions.cmderTask = szArgList[i + 1];
i++;
}
else if (_wcsicmp(L"/title", szArgList[i]) == 0)
{
cmderOptions.cmderTitle = szArgList[i + 1];
i++;
}
else if (_wcsicmp(L"/icon", szArgList[i]) == 0)
{
cmderOptions.cmderIcon = szArgList[i + 1];
Expand DownExpand Up@@ -764,8 +776,8 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
}
else
{
StartCmder(cmderOptions.cmderStart, cmderOptions.cmderSingle, cmderOptions.cmderTask, cmderOptions.cmderIcon, cmderOptions.cmderCfgRoot, cmderOptions.cmderUserCfg, cmderOptions.cmderConEmuArgs);
StartCmder(cmderOptions.cmderStart, cmderOptions.cmderSingle, cmderOptions.cmderTask, cmderOptions.cmderTitle, cmderOptions.cmderIcon, cmderOptions.cmderCfgRoot, cmderOptions.cmderUserCfg, cmderOptions.cmderConEmuArgs);
}

return 0;
}
}

[8]ページ先頭

©2009-2025 Movatter.jp