Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 15 commits into
base: development
Choose a base branch
from

Conversation

daxgames
Copy link
Member

@daxgames daxgames commented Nov 24, 2023

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 daxgames marked this pull request as draft November 24, 2023 21:17
@daxgames daxgames marked this pull request as ready for review November 24, 2023 21:24
@daxgames daxgames changed the title Cmder for Windows - Add Bash and Powershell Cmder for Windows - Add Bash, Powershell, and run as Admin. Nov 24, 2023
@daxgames
Copy link
Member Author

@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?

@DRSDavidSoft
Copy link
Contributor

@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!

@daxgames
Copy link
Member Author

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]"
}

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

@DRSDavidSoft
Copy link
Contributor

@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!

@daxgames daxgames marked this pull request as draft November 26, 2023 22:47
@daxgames daxgames changed the title Cmder for Windows - Add Bash, Powershell, and run as Admin. Cmder for Windows - Add Bash, Powershell, mintty and run as Admin. Nov 27, 2023
@daxgames daxgames changed the title Cmder for Windows - Add Bash, Powershell, mintty and run as Admin. Cmder for Windows - Add Bash, Powershell and run as Admin. Nov 27, 2023
@daxgames daxgames changed the title Cmder for Windows - Add Bash, Powershell and run as Admin. Cmder for Windows - Add Bash, Powershell, mintty and run as Admin. Nov 27, 2023
@daxgames daxgames marked this pull request as ready for review November 27, 2023 15:12
@daxgames
Copy link
Member Author

@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
Copy link
Member Author

daxgames commented Dec 8, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants