-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'Eugeny:master' into ssh-default-profile
- Loading branch information
Showing
10 changed files
with
520 additions
and
920 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,64 @@ | ||
:: Copyright (c) 2012 Martin Ridgers | ||
:: License: http://opensource.org/licenses/MIT | ||
|
||
@echo off | ||
rem -- Copyright (c) 2012 Martin Ridgers | ||
rem -- Portions Copyright (c) 2020-2024 Christopher Antos | ||
rem -- License: http://opensource.org/licenses/MIT | ||
|
||
setlocal enableextensions | ||
set clink_profile_arg= | ||
set clink_quiet_arg= | ||
|
||
:: Mimic cmd.exe's behaviour when starting from the start menu. | ||
if /i "%1"=="startmenu" ( | ||
rem -- Mimic cmd.exe's behaviour when starting from the start menu. | ||
if /i "%~1"=="startmenu" ( | ||
cd /d "%userprofile%" | ||
shift | ||
) | ||
|
||
:: Check for the --profile option. | ||
if /i "%1"=="--profile" ( | ||
rem -- Check for the --profile option. | ||
if /i "%~1"=="--profile" ( | ||
set clink_profile_arg=--profile "%~2" | ||
shift | ||
shift | ||
) | ||
|
||
:: Check for the --quiet option. | ||
if /i "%1"=="--quiet" ( | ||
rem -- Check for the --quiet option. | ||
if /i "%~1"=="--quiet" ( | ||
set clink_quiet_arg= --quiet | ||
shift | ||
) | ||
|
||
:: If the .bat is run without any arguments, then start a cmd.exe instance. | ||
if "%1"=="" ( | ||
rem -- If the .bat is run without any arguments, then start a cmd.exe instance. | ||
if _%1==_ ( | ||
call :launch | ||
goto :end | ||
) | ||
|
||
:: Test for autorun. | ||
if defined CLINK_NOAUTORUN if /i "%1"=="inject" if /i "%2"=="--autorun" goto :end | ||
|
||
:: Endlocal before inject tags the prompt. | ||
endlocal | ||
rem -- Test for autorun. | ||
if defined CLINK_NOAUTORUN if /i "%~1"=="inject" if /i "%~2"=="--autorun" goto :end | ||
|
||
:: Pass through to appropriate loader. | ||
rem -- Forward to appropriate loader, and endlocal before inject tags the prompt. | ||
if /i "%processor_architecture%"=="x86" ( | ||
endlocal | ||
"%~dp0\clink_x86.exe" %* | ||
) else if /i "%processor_architecture%"=="arm64" ( | ||
endlocal | ||
"%~dp0\clink_arm64.exe" %* | ||
) else if /i "%processor_architecture%"=="amd64" ( | ||
if defined processor_architew6432 ( | ||
endlocal | ||
"%~dp0\clink_x86.exe" %* | ||
) else ( | ||
endlocal | ||
"%~dp0\clink_x64.exe" %* | ||
) | ||
) | ||
|
||
:end | ||
goto :eof | ||
goto :end | ||
|
||
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: | ||
:launch | ||
setlocal | ||
setlocal enableextensions | ||
set WT_PROFILE_ID= | ||
set WT_SESSION= | ||
start "Clink" cmd.exe /s /k ""%~dpnx0" inject %clink_profile_arg%%clink_quiet_arg%" | ||
endlocal | ||
exit /b 0 | ||
|
||
:end |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters