cmder icon indicating copy to clipboard operation
cmder copied to clipboard

Cmder for Windows - Add `Bash`, `Powershell`, `mintty` and run as Admin.

Open daxgames opened this issue 1 year ago • 6 comments

Adds

  • When no external terminal emulator is available.
    • Add Cmder.exe /task cmder [/a].
    • Add Cmder.exe /task bash [/a].
    • Add Cmder.exe /task mintty [/a].
    • Add Cmder.exe /task powershell [/a].
    • New Cmder.exe command line argument /a used to start native terminal sessions as Administrator

image

  • Running as Admin

image

daxgames avatar Nov 24 '23 20:11 daxgames

@DRSDavidSoft I have no idea how to get thecommand line argument help screen updated since it started using an external resource file. Can you help?

daxgames avatar Nov 24 '23 23:11 daxgames

@daxgames Thanks for the great additions!

By the help screen, do you mean the /help switch argument that reads from the strings.rc2 file? If so, is this a recent issue? Since the changes you have been applying seems to be working fine.

Quick note, since it's basically a C-style header file, we can put the message lines into separate lines like so for better readability:

L"First Line\n"
"Second Line\n"
"Third Line"

This will basically get appended to form a single line by the compiler. The reason I didn't do it when I moved the help message to the resource file was due to it being also written in a single line in the original code.

If you're talking about something else please let me know, I might be wrong about what you're asking about.

Thank you once again for this great addition!

DRSDavidSoft avatar Nov 25 '23 07:11 DRSDavidSoft

I JUST compiled this using the scripts and from the IDE.

image

Content of strings.rc2:


/////////////////////////////////////////////////////////////////////////////
// Corresponding ids should be defined in `resource.h` file.

STRINGTABLE
{
	IDS_TITLE             "Cmder Launcher"

	IDS_SWITCHES          L"Valid options:\n\n    /a Admin - Native Terminals ONLY!\n    /c [CMDER User Root Path]\n    /task [Windows Terminal Profile/ConEmu Task Name]\n    /icon [CMDER Icon Path] - ConEmu ONLY!\n    [/start [Start in Path] | [Start in Path]]\n    /single - ConEmu ONLY!\n    /m\n    -- [ConEmu/Windows Terminal extra arguments]\n\nNote: '-- [...]' must be the last argument!\n\nor, either:\n    /register [USER | ALL]\n    /unregister [USER | ALL]"
}

/////////////////////////////////////////////////////////////////////////////

daxgames avatar Nov 25 '23 14:11 daxgames

@daxgames If you're building locally, can you please Clean the project and try again? This seems to be a "cache invalidation" issue to me. If this persist please open a new issue so I can investigate and resolve the issue. Sorry for any inconveniences that using an external resource file might have caused, thank you dax!

DRSDavidSoft avatar Nov 26 '23 00:11 DRSDavidSoft

@DRSDavidSoft This is ready.

I have done a clean and a build with intermittent results. I cannp=ot ID a pattern but all day yesterday I was getting the old help screen. Today I got this:

image

No idea what changed.

daxgames avatar Nov 27 '23 15:11 daxgames

@DRSDavidSoft do you know how to get PRs into development to build artifacts?

daxgames avatar Dec 08 '23 15:12 daxgames