From 274cce1f0085c812ac46d0aac34b312d156182e9 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Fri, 10 Feb 2023 19:19:50 -0800 Subject: [PATCH 001/203] optimize for speed --- vendor/init.bat | 38 ++++++++++++++++++++++++++++++-------- vendor/lib/lib_path.cmd | 38 +++++++++++++++++++++++++------------- 2 files changed, 55 insertions(+), 21 deletions(-) diff --git a/vendor/init.bat b/vendor/init.bat index 027f710af..d9a7bf9b7 100644 --- a/vendor/init.bat +++ b/vendor/init.bat @@ -306,7 +306,9 @@ goto :CONFIGURE_GIT :CONFIGURE_GIT %print_debug% init.bat "Using Git from '%GIT_INSTALL_ROOT%..." :: Add git to the path -if exist "%GIT_INSTALL_ROOT%\cmd\git.exe" %lib_path% enhance_path "%GIT_INSTALL_ROOT%\cmd" "" +if exist "%GIT_INSTALL_ROOT%\cmd\git.exe" ( + set "path=%GIT_INSTALL_ROOT%\cmd;%path%" +) :: Add the unix commands at the end to not shadow windows commands like `more` and `find` if %nix_tools% equ 1 ( @@ -319,12 +321,24 @@ if %nix_tools% equ 1 ( if %nix_tools% geq 1 ( if exist "%GIT_INSTALL_ROOT%\mingw32" ( - %lib_path% enhance_path "%GIT_INSTALL_ROOT%\mingw32\bin" %path_position% + if "%path_position%" == "append" ( + set "path=%path%;%GIT_INSTALL_ROOT%\mingw32\bin" + ) else ( + set "path=%GIT_INSTALL_ROOT%\mingw32\bin;%path%" + ) ) else if exist "%GIT_INSTALL_ROOT%\mingw64" ( - %lib_path% enhance_path "%GIT_INSTALL_ROOT%\mingw64\bin" %path_position% + if "%path_position%" == "append" ( + set "path=%path%;%GIT_INSTALL_ROOT%\mingw64\bin" + ) else ( + set "path=%GIT_INSTALL_ROOT%\mingw64\bin;%path%" + ) ) if exist "%GIT_INSTALL_ROOT%\usr\bin" ( - %lib_path% enhance_path "%GIT_INSTALL_ROOT%\usr\bin" %path_position% + if "%path_position%" == "append" ( + set "path=%path%;%GIT_INSTALL_ROOT%\usr\bin" + ) else ( + set "path=%GIT_INSTALL_ROOT%\usr\bin;%path%" + ) ) ) @@ -368,14 +382,23 @@ goto :PATH_ENHANCE endlocal :PATH_ENHANCE -%lib_path% enhance_path "%CMDER_ROOT%\vendor\bin" +set "path=%CMDER_ROOT%\vendor\bin;%path%" :USER_CONFIG_START -%lib_path% enhance_path_recursive "%CMDER_ROOT%\bin" 0 %max_depth% +if %max_depth% gtr 1 ( + %lib_path% enhance_path_recursive "%CMDER_ROOT%\bin" 0 %max_depth% +) else ( + set "path=%CMDER_ROOT%\bin;%path%" +) + if defined CMDER_USER_BIN ( + if %max_depth% gtr 1 ( %lib_path% enhance_path_recursive "%CMDER_USER_BIN%" 0 %max_depth% + ) else ( + set "path=%CMDER_USER_ROOT%\bin;%path%" + ) ) -%lib_path% enhance_path "%CMDER_ROOT%" append +set "path=%path%;%CMDER_ROOT%" :: Drop *.bat and *.cmd files into "%CMDER_ROOT%\config\profile.d" :: to run them at startup. @@ -489,7 +512,6 @@ if not defined CMDER_CONFIGURED set CMDER_CONFIGURED=1 set CMDER_INIT_END=%time% -if %time_init% gtr 0 ( "%cmder_root%\vendor\bin\timer.cmd" "%CMDER_INIT_START%" "%CMDER_INIT_END%" ) exit /b diff --git a/vendor/lib/lib_path.cmd b/vendor/lib/lib_path.cmd index d9f229bc8..7cfcaa73c 100644 --- a/vendor/lib/lib_path.cmd +++ b/vendor/lib/lib_path.cmd @@ -144,8 +144,12 @@ exit /b exit /b :enhance_path_recursive + call :set_path_recursive "%~1" "%~2" "%~3" + exit /b + +:set_path_recursive :::=============================================================================== -:::enhance_path_recursive - Add a directory and subs to the path env variable if +:::set_path_recursive - Add a directory and subs to the path env variable if ::: required. :::. :::include: @@ -154,7 +158,7 @@ exit /b :::. :::usage: :::. -::: call "%~DP0lib_path" enhance_path_recursive "[dir_path]" [max_depth] [append] +::: call "%~DP0lib_path" set_path_recursive "[dir_path]" [max_depth] [append] :::. :::required: :::. @@ -196,7 +200,11 @@ exit /b if "%fast_init%" == "1" ( if "%add_to_path%" neq "" ( - call :enhance_path "%add_to_path%" %position% + if "%position%" == "append" ( + set "path=%path%;%add_to_path%" + ) else ( + set "path=%add_to_path%;%path%" + ) ) ) @@ -205,15 +213,19 @@ exit /b exit /b ) - %print_debug% :enhance_path_recursive "Env Var - add_path=%add_to_path%" - %print_debug% :enhance_path_recursive "Env Var - position=%position%" - %print_debug% :enhance_path_recursive "Env Var - depth=%depth%" - %print_debug% :enhance_path_recursive "Env Var - max_depth=%max_depth%" + %print_debug% :set_path_recursive "Env Var - add_path=%add_to_path%" + %print_debug% :set_path_recursive "Env Var - position=%position%" + %print_debug% :set_path_recursive "Env Var - depth=%depth%" + %print_debug% :set_path_recursive "Env Var - max_depth=%max_depth%" if %max_depth% gtr %depth% ( if "%add_to_path%" neq "" ( - %print_debug% :enhance_path_recursive "Adding parent directory - '%add_to_path%'" - call :enhance_path "%add_to_path%" %position% + %print_debug% :set_path_recursive "Adding parent directory - '%add_to_path%'" + if "%position%" == "append" ( + set "path=%path%;%add_to_path%" + ) else ( + set "path=%add_to_path%;%path%" + ) ) call :set_depth call :loop_depth @@ -233,10 +245,10 @@ exit /b ) for /d %%i in ("%add_path%\*") do ( - %print_debug% :enhance_path_recursive "Env Var BEFORE - depth=%depth%" - %print_debug% :enhance_path_recursive "Found Subdirectory - '%%~fi'" - call :enhance_path_recursive "%%~fi" %depth% %max_depth% %position% - %print_debug% :enhance_path_recursive "Env Var AFTER- depth=%depth%" + %print_debug% :set_path_recursive "Env Var BEFORE - depth=%depth%" + %print_debug% :set_path_recursive "Found Subdirectory - '%%~fi'" + call :set_path_recursive "%%~fi" %depth% %max_depth% %position% + %print_debug% :set_path_recursive "Env Var AFTER- depth=%depth%" ) exit /b From 56f45a81ca97e32fdd38e12dcf9d3754df0959ff Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sat, 11 Feb 2023 18:57:27 -0800 Subject: [PATCH 002/203] add debugging of path adds --- vendor/init.bat | 41 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/vendor/init.bat b/vendor/init.bat index d9a7bf9b7..51f1eefd3 100644 --- a/vendor/init.bat +++ b/vendor/init.bat @@ -165,9 +165,22 @@ if "%PROCESSOR_ARCHITECTURE%"=="x86" ( set CMDER_CLINK=0 ) +if exist "%CMDER_ROOT%\config\user_init.cmd" if defined CMDER_USER_CONFIG ( + call "%CMDER_ROOT%\config\user_init.cmd" + + if exist "%CMDER_USER_CONFIG%\config\user_init.cmd" ( + call "%CMDER_USER_CONFIG%\config\user_init.cmd" + ) + exit /b +) else if exist "%CMDER_ROOT%\config\user_init.cmd" ( + call "%CMDER_ROOT%\config\user_init.cmd" + exit /b +) + if "%CMDER_CLINK%" == "1" ( - REM TODO: If clink is already injected, goto :CLINK_FINISH goto :INJECT_CLINK +) else if "%CMDER_CLINK%" == "2" ( + goto :CLINK_FINISH ) goto :SKIP_CLINK @@ -204,11 +217,15 @@ goto :SKIP_CLINK ) "%CMDER_ROOT%\vendor\clink\clink_%clink_architecture%.exe" inject --quiet --profile "%CMDER_CONFIG_DIR%" --scripts "%CMDER_ROOT%\vendor" + set CMDER_CLINK=2 if errorlevel 1 ( %print_error% "Clink initialization has failed with error code: %errorlevel%" + goto :CLINK_FINISH ) + set CMDER_CLINK=2 + goto :CLINK_FINISH :SKIP_CLINK @@ -296,19 +313,22 @@ if exist "%CMDER_ROOT%\vendor\git-for-windows" ( ) :SPECIFIED_GIT -%print_debug% init.bat "Using /GIT_INSTALL_ROOT..." +%print_debug% init.bat "Using specified GIT_INSTALL_ROOT=%GIT_INSTALL_ROOT%...." goto :CONFIGURE_GIT :FOUND_GIT -%print_debug% init.bat "Using found Git '%GIT_VERSION_USER%' from '%GIT_INSTALL_ROOT%..." +%print_debug% init.bat "Using found Git '%GIT_VERSION_USER%' from 'v%GIT_INSTALL_ROOT%..." goto :CONFIGURE_GIT :CONFIGURE_GIT %print_debug% init.bat "Using Git from '%GIT_INSTALL_ROOT%..." + :: Add git to the path +%print_debug% init.bat "START - git.exe(prepend): Env Var - PATH=%path%" if exist "%GIT_INSTALL_ROOT%\cmd\git.exe" ( set "path=%GIT_INSTALL_ROOT%\cmd;%path%" ) +%print_debug% init.bat "END - git.exe(prepend): Env Var - PATH=%path%" :: Add the unix commands at the end to not shadow windows commands like `more` and `find` if %nix_tools% equ 1 ( @@ -319,6 +339,7 @@ if %nix_tools% equ 1 ( set "path_position=" ) +%print_debug% init.bat "START - nix_tools(%path_position%): Env Var - PATH=%path%" if %nix_tools% geq 1 ( if exist "%GIT_INSTALL_ROOT%\mingw32" ( if "%path_position%" == "append" ( @@ -341,6 +362,7 @@ if %nix_tools% geq 1 ( ) ) ) +%print_debug% init.bat "END - nix_tools(%path_position%): Env Var - PATH=%path%" :SET_ENV @@ -373,8 +395,7 @@ if defined git_locale ( ) endlocal && set LANG=%LANG% -%print_debug% init.bat "Env Var - GIT_INSTALL_ROOT=%GIT_INSTALL_ROOT%" -%print_debug% init.bat "Found Git in: '%GIT_INSTALL_ROOT%'" +%print_debug% init.bat "Found Git in: 'GIT_INSTALL_ROOT=%GIT_INSTALL_ROOT%'" goto :PATH_ENHANCE :NO_GIT @@ -382,23 +403,33 @@ goto :PATH_ENHANCE endlocal :PATH_ENHANCE +%print_debug% init.bat "START - vendor/bin(prepend): Env Var - PATH=%path%" set "path=%CMDER_ROOT%\vendor\bin;%path%" +%print_debug% init.bat "END - vendor/bin(prepend): Env Var - PATH=%path%" :USER_CONFIG_START +%print_debug% init.bat "START - bin(prepend): Env Var - PATH=%path%" if %max_depth% gtr 1 ( %lib_path% enhance_path_recursive "%CMDER_ROOT%\bin" 0 %max_depth% ) else ( set "path=%CMDER_ROOT%\bin;%path%" ) +%print_debug% init.bat "END - bin(prepend): Env Var - PATH=%path%" + if defined CMDER_USER_BIN ( + %print_debug% init.bat "START - user_bin(prepend): Env Var - PATH=%path%" if %max_depth% gtr 1 ( %lib_path% enhance_path_recursive "%CMDER_USER_BIN%" 0 %max_depth% ) else ( set "path=%CMDER_USER_ROOT%\bin;%path%" ) + %print_debug% init.bat "END - user_bin(prepend): Env Var - PATH=!path!" ) + +%print_debug% init.bat "START - cmder_root(append): Env Var - PATH=%path%" set "path=%path%;%CMDER_ROOT%" +%print_debug% init.bat "END - cmder_root(append): Env Var - PATH=%path%" :: Drop *.bat and *.cmd files into "%CMDER_ROOT%\config\profile.d" :: to run them at startup. From 7e50f50863f57095266d59dc53253c9f093d1b69 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sat, 11 Feb 2023 18:57:50 -0800 Subject: [PATCH 003/203] add vendor/user_init.optional.cmd --- vendor/user_init.optional.cmd | 160 ++++++++++++++++++++++++++++++++++ 1 file changed, 160 insertions(+) create mode 100644 vendor/user_init.optional.cmd diff --git a/vendor/user_init.optional.cmd b/vendor/user_init.optional.cmd new file mode 100644 index 000000000..b086da960 --- /dev/null +++ b/vendor/user_init.optional.cmd @@ -0,0 +1,160 @@ +@echo off + +:: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +:: WARNING: THIS IS UNSUPORTED CODE USE IT IF YOU WANT. SEE BELOW FOR DETAILS! +:: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +:: +:: If you use this file you will be using an unsupported option you assume all +:: and responsibility for troubleshooting any issues! +:: +:: ## What is this? +:: +:: This file initializes the Cmder `cmd.exe` shell with hard coded settings so it is much +:: faster at loading the session config since it does not have to auto discover anything. +:: +:: If you want complete control and responsibility of your Cmder setup copy this file to +:: `%CMDER_ROOT%\config\user_init.cmd` and edit to customize your setup your way. +:: +:: ## Shared Cmder Installs +:: +:: If using in a shared Cmder install copy to `%CMDER_ROOT%\config\user_init.cmd` or +:: `%CMDER_USER_ROOT%\config\user_init.cmd` whichever acieves the goal of the shared +:: install. +:: + +if "%CMDER_CLINK%" == "1" ( + goto :INJECT_CLINK +) else if "%CMDER_CLINK%" == "2" ( + goto :CLINK_FINISH +) + +goto :SKIP_CLINK + +:INJECT_CLINK + %print_verbose% "Injecting Clink!" + + :: Check if Clink is not present + if not exist "%CMDER_ROOT%\vendor\clink\clink_%clink_architecture%.exe" ( + goto :SKIP_CLINK + ) + + :: Run Clink + if not exist "%CMDER_CONFIG_DIR%\settings" if not exist "%CMDER_CONFIG_DIR%\clink_settings" ( + echo Generating Clink initial settings in "%CMDER_CONFIG_DIR%\clink_settings" + copy "%CMDER_ROOT%\vendor\clink_settings.default" "%CMDER_CONFIG_DIR%\clink_settings" + echo Additional *.lua files in "%CMDER_CONFIG_DIR%" are loaded on startup. + ) + + if not exist "%CMDER_CONFIG_DIR%\cmder_prompt_config.lua" ( + echo Creating Cmder prompt config file: "%CMDER_CONFIG_DIR%\cmder_prompt_config.lua" + copy "%CMDER_ROOT%\vendor\cmder_prompt_config.lua.default" "%CMDER_CONFIG_DIR%\cmder_prompt_config.lua" + ) + + "%CMDER_ROOT%\vendor\clink\clink_%clink_architecture%.exe" inject --quiet --profile "%CMDER_CONFIG_DIR%" --scripts "%CMDER_ROOT%\vendor" + + if errorlevel 1 ( + %print_error% "Clink initialization has failed with error code: %errorlevel%" + goto :CLINK_FINISH + ) + + set CMDER_CLINK=2 + goto :CLINK_FINISH + +:SKIP_CLINK + %print_warning% "Skipping Clink Injection!" + + for /f "tokens=2 delims=:." %%x in ('chcp') do set cp=%%x + chcp 65001>nul + + :: Revert back to plain cmd.exe prompt without clink + prompt $E[1;32;49m$P$S$_$E[1;30;49mĪ»$S$E[0m + + chcp %cp%>nul +:CLINK_FINISH + +if not defined GIT_INSTALL_ROOT set "GIT_INSTALL_ROOT=%CMDER_ROOT%\vendor\git-for-windows" +if not defined SVN_SSH set "SVN_SSH=%GIT_INSTALL_ROOT:\=\\%\\bin\\ssh.exe" +if not defined git_locale set git_locale="%GIT_INSTALL_ROOT%\usr\bin\locale.exe" +if not defined LANG set LANG=en_US.UTF-8 +if not defined user_aliases set "user_aliases=%CMDER_ROOT%\config\user_aliases.cmd" +if not defined aliases set "aliases=%user_aliases%" +if not defined HOME set "HOME=%USERPROFILE%" + +set PLINK_PROTOCOL=ssh + +set "path=%GIT_INSTALL_ROOT%\cmd;%path%" + +set path_position=append +if %nix_tools% equ 1 ( + set "path_position=append" +) else ( + set "path_position=" +) + +if %nix_tools% geq 1 ( + if exist "%GIT_INSTALL_ROOT%\mingw32" ( + if "%path_position%" == "append" ( + set "path=%path%;%GIT_INSTALL_ROOT%\mingw32\bin" + ) else ( + set "path=%GIT_INSTALL_ROOT%\mingw32\bin;%path%" + ) + ) else if exist "%GIT_INSTALL_ROOT%\mingw64" ( + if "%path_position%" == "append" ( + set "path=%path%;%GIT_INSTALL_ROOT%\mingw64\bin" + ) else ( + set "path=%GIT_INSTALL_ROOT%\mingw64\bin;%path%" + ) + ) + if exist "%GIT_INSTALL_ROOT%\usr\bin" ( + if "%path_position%" == "append" ( + set "path=%path%;%GIT_INSTALL_ROOT%\usr\bin" + ) else ( + set "path=%GIT_INSTALL_ROOT%\usr\bin;%path%" + ) + ) +) + +set "path=%CMDER_ROOT%\vendor\bin;%path%" + +:USER_CONFIG_START +if %max_depth% gtr 1 ( + %lib_path% enhance_path_recursive "%CMDER_ROOT%\bin" 0 %max_depth% +) else ( + set "path=%CMDER_ROOT%\bin;%path%" +) + +setlocal enabledelayedexpansion +if defined CMDER_USER_BIN ( + if %max_depth% gtr 1 ( + %lib_path% enhance_path_recursive "%CMDER_USER_BIN%" 0 %max_depth% + ) else ( + set "path=%CMDER_USER_ROOT%\bin;%path%" + ) +) +endlocal && set "path=%path%" + +set "path=%path%;%CMDER_ROOT%" + +call "%user_aliases%" + +%lib_profile% run_profile_d "%CMDER_ROOT%\config\profile.d" +if defined CMDER_USER_CONFIG ( + %lib_profile% run_profile_d "%CMDER_USER_CONFIG%\profile.d" +) + +call "%CMDER_ROOT%\config\user_profile.cmd" +if defined CMDER_USER_CONFIG ( + if exist "%CMDER_USER_CONFIG%\user_profile.cmd" ( + call "%CMDER_USER_CONFIG%\user_profile.cmd" + ) +) + +set "path=%path:;;=;% + +:CMDER_CONFIGURED +if not defined CMDER_CONFIGURED set CMDER_CONFIGURED=1 + +set CMDER_INIT_END=%time% + +"%cmder_root%\vendor\bin\timer.cmd" "%CMDER_INIT_START%" "%CMDER_INIT_END%" +exit /b From 727a99b479d57e9125e4c2c816881e9f459994b7 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sat, 11 Feb 2023 19:27:15 -0800 Subject: [PATCH 004/203] shared or user user_init.cmd --- vendor/init.bat | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vendor/init.bat b/vendor/init.bat index 51f1eefd3..09ff7541e 100644 --- a/vendor/init.bat +++ b/vendor/init.bat @@ -165,10 +165,10 @@ if "%PROCESSOR_ARCHITECTURE%"=="x86" ( set CMDER_CLINK=0 ) -if exist "%CMDER_ROOT%\config\user_init.cmd" if defined CMDER_USER_CONFIG ( - call "%CMDER_ROOT%\config\user_init.cmd" - - if exist "%CMDER_USER_CONFIG%\config\user_init.cmd" ( +if defined CMDER_USER_CONFIG ( + if exist "%CMDER_ROOT%\config\user_init.cmd" ( + call "%CMDER_ROOT%\config\user_init.cmd" + ) else if exist "%CMDER_USER_CONFIG%\config\user_init.cmd" ( call "%CMDER_USER_CONFIG%\config\user_init.cmd" ) exit /b From 02154a8f8853e7f46e8daddf2e71cff55363a0fd Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sun, 12 Feb 2023 09:46:16 -0800 Subject: [PATCH 005/203] Update to only collext cmder env vars --- vendor/bin/cmder_diag.cmd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vendor/bin/cmder_diag.cmd b/vendor/bin/cmder_diag.cmd index f526cff62..d806ee6b2 100644 --- a/vendor/bin/cmder_diag.cmd +++ b/vendor/bin/cmder_diag.cmd @@ -2,9 +2,9 @@ (echo. echo ------------------------------------ -echo set +echo Get Cmder env variables... echo ------------------------------------ -set +set | findstr -i -r "^aliases= architecture_bits ccall= cexec= ^clink_ ^cmder ^debug_output= fast_init= ^GIT_INSTALL_ROOT= ^git_locale= ^HOME= ^max_depth= ^nix_tools= ^path_position= ^path= ^PLINK_PROTOCOL= ^print_ ^SVN_SSH= ^time_init= ^user_aliases= ^verbose_output=" echo. echo ------------------------------------ From 1e623ecab4a1b114c20e04906bfafbfbe9334e8b Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sun, 12 Feb 2023 09:48:27 -0800 Subject: [PATCH 006/203] auto generate cmd user_init.cmd --- vendor/bin/create-cmdercfg.ps1 | 19 ++++ vendor/init.bat | 22 ++++- vendor/psmodules/Cmder.ps1 | 25 +++++ vendor/user_init.cmd.template | 168 +++++++++++++++++++++++++++++++++ 4 files changed, 233 insertions(+), 1 deletion(-) create mode 100644 vendor/bin/create-cmdercfg.ps1 create mode 100644 vendor/user_init.cmd.template diff --git a/vendor/bin/create-cmdercfg.ps1 b/vendor/bin/create-cmdercfg.ps1 new file mode 100644 index 000000000..5fb23a080 --- /dev/null +++ b/vendor/bin/create-cmdercfg.ps1 @@ -0,0 +1,19 @@ +[CmdletBinding()] +param( + [Parameter()] + [string]$shell = 'cmd', + [string]$outfile = "$env:cmder_root\config\user_init.cmd" +) + +$CmderModulePath = Join-path $env:cmder_root "vendor/psmodules/" +$CmderFunctions = Join-Path $CmderModulePath "Cmder.ps1" +. $CmderFunctions + +if ($shell -match 'cmd') { + write-host "Generating Cmder Config for '$shell' shell in '$outfile'..." + templateExpand "$env:cmder_root\vendor\user_init.cmd.template" "$outfile" +} elseif ($shell -match 'powershell') { + write-host "'$shell' is not supported at this time!" +} elseif ($shell -match 'bash') { + write-host "'$shell' is not supported at this time!" +} diff --git a/vendor/init.bat b/vendor/init.bat index 09ff7541e..d1ca555a6 100644 --- a/vendor/init.bat +++ b/vendor/init.bat @@ -417,7 +417,7 @@ if %max_depth% gtr 1 ( %print_debug% init.bat "END - bin(prepend): Env Var - PATH=%path%" -if defined CMDER_USER_BIN ( +if defined CMDER_USER_BIN if defined CMDER_USER_ROOT ( %print_debug% init.bat "START - user_bin(prepend): Env Var - PATH=%path%" if %max_depth% gtr 1 ( %lib_path% enhance_path_recursive "%CMDER_USER_BIN%" 0 %max_depth% @@ -538,6 +538,26 @@ if "%CMDER_ALIASES%" == "1" if exist "%CMDER_ROOT%\bin\alias.bat" if exist "%CMD set initialConfig= +if defined CMDER_USER_CONFIG ( + if not exist "%CMDER_ROOT%\config\user_init.cmd" if not exist "%CMDER_USER_ROOT%\config\user_init.cmd" ( + powershell -f %cmder_root%\vendor\bin\create-cmdercfg.ps1 -shell cmd -outfile "%CMDER_ROOT%\config\user_init.cmd" + ) + + if not exist "%CMDER_ROOT%\config\user_init.cmd" if not exist "%CMDER_USER_ROOT%\config\user_init.cmd" ( + powershell -f %cmder_root%\vendor\bin\create-cmdercfg.ps1 -shell cmd -outfile "%CMDER_iUSER_ROOT%\config\user_init.cmd" + ) + + if not exist "%CMDER_ROOT%\config\user_init.cmd" if not exist "%CMDER_USER_ROOT%\config\user_init.cmd" ( + %print_error% "Failed to generate Cmder config" + ) +) else if not exist "%CMDER_ROOT%\config\user_init.cmd" ( + powershell -f %cmder_root%\vendor\bin\create-cmdercfg.ps1 -shell cmd -outfile "%CMDER_ROOT%\config\user_init.cmd" + + if not exist "%CMDER_ROOT%\config\user_init.cmd" ( + %print_error% "Failed to generate Cmder config" + ) +) + :CMDER_CONFIGURED if not defined CMDER_CONFIGURED set CMDER_CONFIGURED=1 diff --git a/vendor/psmodules/Cmder.ps1 b/vendor/psmodules/Cmder.ps1 index a42e40c95..ace3679f7 100644 --- a/vendor/psmodules/Cmder.ps1 +++ b/vendor/psmodules/Cmder.ps1 @@ -176,3 +176,28 @@ function getGitStatusSetting() { return $true } + +function yOrn( $question ) { + Do { + $Answer = Read-Host -Prompt "`n${question}? (y/n) " + } + Until ($Answer -eq 'y' -or $Answer -eq 'n' -or $Answer -eq 'yes' -or $Answer -eq 'no') + + return $Answer +} + +function templateExpand($template, $outfile) { + $template = Get-Content $template -Raw + $expanded = Invoke-Expression "@`"`r`n$template`r`n`"@" + + $overwrite = 'y' + if ((test-path "$outfile")) { + $overwrite = yOrn "'$outfile' already exists do you want to overwrite it" + } + + if ($overwrite -match 'y') { + $expanded | out-file -ErrorAction silentlycontinue -encoding ascii "$outfile" + } else { + write-host "Skipping Cmder '$shell' config generation at user request!" + } +} diff --git a/vendor/user_init.cmd.template b/vendor/user_init.cmd.template new file mode 100644 index 000000000..9f19502b9 --- /dev/null +++ b/vendor/user_init.cmd.template @@ -0,0 +1,168 @@ +@echo off + +:: This file was autogenerated by Cmder init.bat +:: +:: It is yours to edit and will not be touched again by Cmder. +:: +:: If you wish to recreate this file simply rename it and Cmder will re-create it the next time it is run +:: or run the followin command from a Cmder shell: +:: +:: powershell -f %cmder_root%\vendor\bin\create-cmdercfg.ps1 -shell cmd [-outfile "[filename]"] +:: + +if "%CMDER_CLINK%" == "1" ( + goto :INJECT_CLINK +) else if "%CMDER_CLINK%" == "2" ( + goto :CLINK_FINISH +) + +goto :SKIP_CLINK + +:INJECT_CLINK + %print_verbose% "Injecting Clink!" + + :: Check if Clink is not present + if not exist "%CMDER_ROOT%\vendor\clink\clink_%clink_architecture%.exe" ( + goto :SKIP_CLINK + ) + + :: Run Clink + if not exist "%CMDER_CONFIG_DIR%\settings" if not exist "%CMDER_CONFIG_DIR%\clink_settings" ( + echo Generating Clink initial settings in "%CMDER_CONFIG_DIR%\clink_settings" + copy "%CMDER_ROOT%\vendor\clink_settings.default" "%CMDER_CONFIG_DIR%\clink_settings" + echo Additional *.lua files in "%CMDER_CONFIG_DIR%" are loaded on startup. + ) + + if not exist "%CMDER_CONFIG_DIR%\cmder_prompt_config.lua" ( + echo Creating Cmder prompt config file: "%CMDER_CONFIG_DIR%\cmder_prompt_config.lua" + copy "%CMDER_ROOT%\vendor\cmder_prompt_config.lua.default" "%CMDER_CONFIG_DIR%\cmder_prompt_config.lua" + ) + + "%CMDER_ROOT%\vendor\clink\clink_%clink_architecture%.exe" inject --quiet --profile "%CMDER_CONFIG_DIR%" --scripts "%CMDER_ROOT%\vendor" + + if errorlevel 1 ( + %print_error% "Clink initialization has failed with error code: %errorlevel%" + goto :CLINK_FINISH + ) + + set CMDER_CLINK=2 + goto :CLINK_FINISH + +:SKIP_CLINK + %print_warning% "Skipping Clink Injection!" + + for /f "tokens=2 delims=:." %%x in ('chcp') do set cp=%%x + chcp 65001>nul + + :: Revert back to plain cmd.exe prompt without clink + prompt `$E[1;32;49m`$P`$S`$_`$E[1;30;49mĪ»`$S`$E[0m + + chcp %cp%>nul +:CLINK_FINISH + +if not defined GIT_INSTALL_ROOT set "GIT_INSTALL_ROOT=$env:GIT_INSTALL_ROOT" +if not defined SVN_SSH set "SVN_SSH=$env:SVN_SSH" +if not defined git_locale set git_locale=$env:git_locale +if not defined LANG set LANG=$env:lang +if not defined user_aliases set "user_aliases=$env:user_aliases" +if not defined aliases set "aliases=%user_aliases%" +if not defined HOME set "HOME=%USERPROFILE%" + +set PLINK_PROTOCOL=$env:PLINK_PROTOCOL + +set "path=%GIT_INSTALL_ROOT%\cmd;%path%" + +set path_position=append +if %nix_tools% equ 1 ( + set "path_position=append" +) else ( + set "path_position=" +) + +if %nix_tools% geq 1 ( + if exist "%GIT_INSTALL_ROOT%\mingw32" ( + if "%path_position%" == "append" ( + set "path=%path%;%GIT_INSTALL_ROOT%\mingw32\bin" + ) else ( + set "path=%GIT_INSTALL_ROOT%\mingw32\bin;%path%" + ) + ) else if exist "%GIT_INSTALL_ROOT%\mingw64" ( + if "%path_position%" == "append" ( + set "path=%path%;%GIT_INSTALL_ROOT%\mingw64\bin" + ) else ( + set "path=%GIT_INSTALL_ROOT%\mingw64\bin;%path%" + ) + ) + if exist "%GIT_INSTALL_ROOT%\usr\bin" ( + if "%path_position%" == "append" ( + set "path=%path%;%GIT_INSTALL_ROOT%\usr\bin" + ) else ( + set "path=%GIT_INSTALL_ROOT%\usr\bin;%path%" + ) + ) +) + +set "path=%CMDER_ROOT%\vendor\bin;%path%" + +:USER_CONFIG_START +if %max_depth% gtr 1 ( + %lib_path% enhance_path_recursive "%CMDER_ROOT%\bin" 0 %max_depth% +) else ( + set "path=%CMDER_ROOT%\bin;%path%" +) + +setlocal enabledelayedexpansion +if defined CMDER_USER_BIN ( + if %max_depth% gtr 1 ( + %lib_path% enhance_path_recursive "%CMDER_USER_BIN%" 0 %max_depth% + ) else ( + set "path=%CMDER_USER_ROOT%\bin;%path%" + ) +) +endlocal && set "path=%path%" + +set "path=%path%;%CMDER_ROOT%" + +call "%user_aliases%" + +%lib_profile% run_profile_d "%CMDER_ROOT%\config\profile.d" +if defined CMDER_USER_CONFIG ( + %lib_profile% run_profile_d "%CMDER_USER_CONFIG%\profile.d" +) + +call "%CMDER_ROOT%\config\user_profile.cmd" +if defined CMDER_USER_CONFIG ( + if exist "%CMDER_USER_CONFIG%\user_profile.cmd" ( + call "%CMDER_USER_CONFIG%\user_profile.cmd" + ) +) + +set "path=%path:;;=;% + +:CMDER_CONFIGURED +if not defined CMDER_CONFIGURED set CMDER_CONFIGURED=1 + +set CMDER_INIT_END=%time% + +if "%CMDER_INIT_END%" neq "" if "%CMDER_INIT_START%" neq "" ( + "%cmder_root%\vendor\bin\timer.cmd" "%CMDER_INIT_START%" "%CMDER_INIT_END%" +) + +:: Cleanup +set architecture_bits="" +set CMDER_ALIASES="" +set CMDER_INIT_END="" +set CMDER_INIT_START="" +set debug_output="" +set fast_init="" +set max_depth="" +set nix_tools="" +set path_position="" +set print_debug="" +set print_error="" +set print_verbose="" +set print_warning="" +set time_init="" +set verbose_output="" + +exit /b From 3a2e747d22435492c3ffed67ed6c65cf83e82f9e Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sat, 18 Feb 2023 05:40:46 -0800 Subject: [PATCH 007/203] add cleanup of unused env vars --- vendor/bin/timer.cmd | 24 +++++++++++++++++++++++ vendor/init.bat | 27 +++++++++++++++++++++----- vendor/user_init.cmd.template | 36 +++++++++++++++++++---------------- 3 files changed, 66 insertions(+), 21 deletions(-) diff --git a/vendor/bin/timer.cmd b/vendor/bin/timer.cmd index e0b84249d..68a5bc328 100644 --- a/vendor/bin/timer.cmd +++ b/vendor/bin/timer.cmd @@ -11,6 +11,7 @@ set /a hours=%end_h%-%start_h% set /a mins=%end_m%-%start_m% set /a secs=%end_s%-%start_s% set /a ms=%end_ms%-%start_ms% + if %ms% lss 0 set /a secs = %secs% - 1 & set /a ms = 100%ms% if %secs% lss 0 set /a mins = %mins% - 1 & set /a secs = 60%secs% if %mins% lss 0 set /a hours = %hours% - 1 & set /a mins = 60%mins% @@ -20,3 +21,26 @@ if 1%ms% lss 100 set ms=0%ms% :: Mission accomplished set /a totalsecs = %hours%*3600 + %mins%*60 + %secs% echo Elapsed Time: %hours%:%mins%:%secs%.%ms% (%totalsecs%.%ms%s total) + +:: cleanup +set start= +set end= +set options= + +set start_h= +set start_m= +set start_s= +set start_ms= + +set end_h= +set end_m= +set end_s= +set end_ms= + +set hours= +set mins= +set secs= +set ms= + +set totalsecs= + diff --git a/vendor/init.bat b/vendor/init.bat index d1ca555a6..8f459d8fe 100644 --- a/vendor/init.bat +++ b/vendor/init.bat @@ -559,10 +559,27 @@ if defined CMDER_USER_CONFIG ( ) :CMDER_CONFIGURED -if not defined CMDER_CONFIGURED set CMDER_CONFIGURED=1 + if not defined CMDER_CONFIGURED set CMDER_CONFIGURED=1 + set CMDER_INIT_END=%time% + call "%cmder_root%\vendor\bin\timer.cmd" "%CMDER_INIT_START%" "%CMDER_INIT_END%" + +:: Cleanup +set architecture_bits= +set CMDER_ALIASES= +set CMDER_INIT_END= +set CMDER_INIT_START= +set CMDER_USER_FLAGS= +set debug_output= +set fast_init= +set max_depth= +set nix_tools= +set path_position= +set print_debug= +set print_error= +set print_verbose= +set print_warning= +set time_init= +set verbose_output= +set user_aliases= -set CMDER_INIT_END=%time% - - "%cmder_root%\vendor\bin\timer.cmd" "%CMDER_INIT_START%" "%CMDER_INIT_END%" -) exit /b diff --git a/vendor/user_init.cmd.template b/vendor/user_init.cmd.template index 9f19502b9..eedf299dd 100644 --- a/vendor/user_init.cmd.template +++ b/vendor/user_init.cmd.template @@ -145,24 +145,28 @@ if not defined CMDER_CONFIGURED set CMDER_CONFIGURED=1 set CMDER_INIT_END=%time% if "%CMDER_INIT_END%" neq "" if "%CMDER_INIT_START%" neq "" ( - "%cmder_root%\vendor\bin\timer.cmd" "%CMDER_INIT_START%" "%CMDER_INIT_END%" + call "%cmder_root%\vendor\bin\timer.cmd" "%CMDER_INIT_START%" "%CMDER_INIT_END%" ) :: Cleanup -set architecture_bits="" -set CMDER_ALIASES="" -set CMDER_INIT_END="" -set CMDER_INIT_START="" -set debug_output="" -set fast_init="" -set max_depth="" -set nix_tools="" -set path_position="" -set print_debug="" -set print_error="" -set print_verbose="" -set print_warning="" -set time_init="" -set verbose_output="" +set architecture_bits= +set CMDER_ALIASES= +set CMDER_INIT_END= +set CMDER_INIT_START= +set CMDER_USER_FLAGS= +set debug_output= +set fast_init= +set max_depth= +set nix_tools= +set path_position= +set print_debug= +set print_error= +set print_verbose= +set print_warning= +set time_init= +set verbose_output= +set user_aliases= exit /b + + From 9cbc1845fb3b165b6e8f9486c52138da4dc53728 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sat, 18 Feb 2023 05:56:09 -0800 Subject: [PATCH 008/203] cleanup --- vendor/init.bat | 43 ++++---- vendor/user_init.cmd.template | 196 +++++++++++++++++----------------- 2 files changed, 121 insertions(+), 118 deletions(-) diff --git a/vendor/init.bat b/vendor/init.bat index 8f459d8fe..97694e6b3 100644 --- a/vendor/init.bat +++ b/vendor/init.bat @@ -561,25 +561,28 @@ if defined CMDER_USER_CONFIG ( :CMDER_CONFIGURED if not defined CMDER_CONFIGURED set CMDER_CONFIGURED=1 set CMDER_INIT_END=%time% - call "%cmder_root%\vendor\bin\timer.cmd" "%CMDER_INIT_START%" "%CMDER_INIT_END%" - -:: Cleanup -set architecture_bits= -set CMDER_ALIASES= -set CMDER_INIT_END= -set CMDER_INIT_START= -set CMDER_USER_FLAGS= -set debug_output= -set fast_init= -set max_depth= -set nix_tools= -set path_position= -set print_debug= -set print_error= -set print_verbose= -set print_warning= -set time_init= -set verbose_output= -set user_aliases= + + if "%CMDER_INIT_END%" neq "" if "%CMDER_INIT_START%" neq "" ( + call "%cmder_root%\vendor\bin\timer.cmd" "%CMDER_INIT_START%" "%CMDER_INIT_END%" + ) + +:CLEANUP + set architecture_bits= + set CMDER_ALIASES= + set CMDER_INIT_END= + set CMDER_INIT_START= + set CMDER_USER_FLAGS= + set debug_output= + set fast_init= + set max_depth= + set nix_tools= + set path_position= + set print_debug= + set print_error= + set print_verbose= + set print_warning= + set time_init= + set verbose_output= + set user_aliases= exit /b diff --git a/vendor/user_init.cmd.template b/vendor/user_init.cmd.template index eedf299dd..acc36f90a 100644 --- a/vendor/user_init.cmd.template +++ b/vendor/user_init.cmd.template @@ -58,114 +58,114 @@ goto :SKIP_CLINK prompt `$E[1;32;49m`$P`$S`$_`$E[1;30;49mĪ»`$S`$E[0m chcp %cp%>nul -:CLINK_FINISH - -if not defined GIT_INSTALL_ROOT set "GIT_INSTALL_ROOT=$env:GIT_INSTALL_ROOT" -if not defined SVN_SSH set "SVN_SSH=$env:SVN_SSH" -if not defined git_locale set git_locale=$env:git_locale -if not defined LANG set LANG=$env:lang -if not defined user_aliases set "user_aliases=$env:user_aliases" -if not defined aliases set "aliases=%user_aliases%" -if not defined HOME set "HOME=%USERPROFILE%" - -set PLINK_PROTOCOL=$env:PLINK_PROTOCOL - -set "path=%GIT_INSTALL_ROOT%\cmd;%path%" - -set path_position=append -if %nix_tools% equ 1 ( - set "path_position=append" -) else ( - set "path_position=" -) - -if %nix_tools% geq 1 ( - if exist "%GIT_INSTALL_ROOT%\mingw32" ( - if "%path_position%" == "append" ( - set "path=%path%;%GIT_INSTALL_ROOT%\mingw32\bin" - ) else ( - set "path=%GIT_INSTALL_ROOT%\mingw32\bin;%path%" - ) - ) else if exist "%GIT_INSTALL_ROOT%\mingw64" ( - if "%path_position%" == "append" ( - set "path=%path%;%GIT_INSTALL_ROOT%\mingw64\bin" - ) else ( - set "path=%GIT_INSTALL_ROOT%\mingw64\bin;%path%" - ) - ) - if exist "%GIT_INSTALL_ROOT%\usr\bin" ( - if "%path_position%" == "append" ( - set "path=%path%;%GIT_INSTALL_ROOT%\usr\bin" - ) else ( - set "path=%GIT_INSTALL_ROOT%\usr\bin;%path%" - ) - ) -) -set "path=%CMDER_ROOT%\vendor\bin;%path%" +:CLINK_FINISH + if not defined GIT_INSTALL_ROOT set "GIT_INSTALL_ROOT=$env:GIT_INSTALL_ROOT" + if not defined SVN_SSH set "SVN_SSH=$env:SVN_SSH" + if not defined git_locale set git_locale=$env:git_locale + if not defined LANG set LANG=$env:lang + if not defined user_aliases set "user_aliases=$env:user_aliases" + if not defined aliases set "aliases=%user_aliases%" + if not defined HOME set "HOME=%USERPROFILE%" + + set PLINK_PROTOCOL=$env:PLINK_PROTOCOL + + set "path=%GIT_INSTALL_ROOT%\cmd;%path%" + + set path_position=append + if %nix_tools% equ 1 ( + set "path_position=append" + ) else ( + set "path_position=" + ) + + if %nix_tools% geq 1 ( + if exist "%GIT_INSTALL_ROOT%\mingw32" ( + if "%path_position%" == "append" ( + set "path=%path%;%GIT_INSTALL_ROOT%\mingw32\bin" + ) else ( + set "path=%GIT_INSTALL_ROOT%\mingw32\bin;%path%" + ) + ) else if exist "%GIT_INSTALL_ROOT%\mingw64" ( + if "%path_position%" == "append" ( + set "path=%path%;%GIT_INSTALL_ROOT%\mingw64\bin" + ) else ( + set "path=%GIT_INSTALL_ROOT%\mingw64\bin;%path%" + ) + ) + if exist "%GIT_INSTALL_ROOT%\usr\bin" ( + if "%path_position%" == "append" ( + set "path=%path%;%GIT_INSTALL_ROOT%\usr\bin" + ) else ( + set "path=%GIT_INSTALL_ROOT%\usr\bin;%path%" + ) + ) + ) + + set "path=%CMDER_ROOT%\vendor\bin;%path%" :USER_CONFIG_START -if %max_depth% gtr 1 ( - %lib_path% enhance_path_recursive "%CMDER_ROOT%\bin" 0 %max_depth% -) else ( - set "path=%CMDER_ROOT%\bin;%path%" -) - -setlocal enabledelayedexpansion -if defined CMDER_USER_BIN ( if %max_depth% gtr 1 ( - %lib_path% enhance_path_recursive "%CMDER_USER_BIN%" 0 %max_depth% + %lib_path% enhance_path_recursive "%CMDER_ROOT%\bin" 0 %max_depth% ) else ( - set "path=%CMDER_USER_ROOT%\bin;%path%" + set "path=%CMDER_ROOT%\bin;%path%" ) -) -endlocal && set "path=%path%" - -set "path=%path%;%CMDER_ROOT%" - -call "%user_aliases%" - -%lib_profile% run_profile_d "%CMDER_ROOT%\config\profile.d" -if defined CMDER_USER_CONFIG ( - %lib_profile% run_profile_d "%CMDER_USER_CONFIG%\profile.d" -) - -call "%CMDER_ROOT%\config\user_profile.cmd" -if defined CMDER_USER_CONFIG ( - if exist "%CMDER_USER_CONFIG%\user_profile.cmd" ( - call "%CMDER_USER_CONFIG%\user_profile.cmd" + + setlocal enabledelayedexpansion + if defined CMDER_USER_BIN ( + if %max_depth% gtr 1 ( + %lib_path% enhance_path_recursive "%CMDER_USER_BIN%" 0 %max_depth% + ) else ( + set "path=%CMDER_USER_ROOT%\bin;%path%" + ) ) -) - -set "path=%path:;;=;% + endlocal && set "path=%path%" + + set "path=%path%;%CMDER_ROOT%" + + call "%user_aliases%" + + %lib_profile% run_profile_d "%CMDER_ROOT%\config\profile.d" + if defined CMDER_USER_CONFIG ( + %lib_profile% run_profile_d "%CMDER_USER_CONFIG%\profile.d" + ) + + call "%CMDER_ROOT%\config\user_profile.cmd" + if defined CMDER_USER_CONFIG ( + if exist "%CMDER_USER_CONFIG%\user_profile.cmd" ( + call "%CMDER_USER_CONFIG%\user_profile.cmd" + ) + ) + + set "path=%path:;;=;% :CMDER_CONFIGURED -if not defined CMDER_CONFIGURED set CMDER_CONFIGURED=1 - -set CMDER_INIT_END=%time% - -if "%CMDER_INIT_END%" neq "" if "%CMDER_INIT_START%" neq "" ( - call "%cmder_root%\vendor\bin\timer.cmd" "%CMDER_INIT_START%" "%CMDER_INIT_END%" -) + if not defined CMDER_CONFIGURED set CMDER_CONFIGURED=1 + + set CMDER_INIT_END=%time% + + if "%CMDER_INIT_END%" neq "" if "%CMDER_INIT_START%" neq "" ( + call "%cmder_root%\vendor\bin\timer.cmd" "%CMDER_INIT_START%" "%CMDER_INIT_END%" + ) -:: Cleanup -set architecture_bits= -set CMDER_ALIASES= -set CMDER_INIT_END= -set CMDER_INIT_START= -set CMDER_USER_FLAGS= -set debug_output= -set fast_init= -set max_depth= -set nix_tools= -set path_position= -set print_debug= -set print_error= -set print_verbose= -set print_warning= -set time_init= -set verbose_output= -set user_aliases= +:CLEANUP + set architecture_bits= + set CMDER_ALIASES= + set CMDER_INIT_END= + set CMDER_INIT_START= + set CMDER_USER_FLAGS= + set debug_output= + set fast_init= + set max_depth= + set nix_tools= + set path_position= + set print_debug= + set print_error= + set print_verbose= + set print_warning= + set time_init= + set verbose_output= + set user_aliases= exit /b From 615ba5f81642b70161cb56f2cf055e4f0431c29e Mon Sep 17 00:00:00 2001 From: Dax T Games Date: Sat, 18 Feb 2023 05:57:12 -0800 Subject: [PATCH 009/203] Delete user_init.optional.cmd --- vendor/user_init.optional.cmd | 160 ---------------------------------- 1 file changed, 160 deletions(-) delete mode 100644 vendor/user_init.optional.cmd diff --git a/vendor/user_init.optional.cmd b/vendor/user_init.optional.cmd deleted file mode 100644 index b086da960..000000000 --- a/vendor/user_init.optional.cmd +++ /dev/null @@ -1,160 +0,0 @@ -@echo off - -:: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -:: WARNING: THIS IS UNSUPORTED CODE USE IT IF YOU WANT. SEE BELOW FOR DETAILS! -:: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -:: -:: If you use this file you will be using an unsupported option you assume all -:: and responsibility for troubleshooting any issues! -:: -:: ## What is this? -:: -:: This file initializes the Cmder `cmd.exe` shell with hard coded settings so it is much -:: faster at loading the session config since it does not have to auto discover anything. -:: -:: If you want complete control and responsibility of your Cmder setup copy this file to -:: `%CMDER_ROOT%\config\user_init.cmd` and edit to customize your setup your way. -:: -:: ## Shared Cmder Installs -:: -:: If using in a shared Cmder install copy to `%CMDER_ROOT%\config\user_init.cmd` or -:: `%CMDER_USER_ROOT%\config\user_init.cmd` whichever acieves the goal of the shared -:: install. -:: - -if "%CMDER_CLINK%" == "1" ( - goto :INJECT_CLINK -) else if "%CMDER_CLINK%" == "2" ( - goto :CLINK_FINISH -) - -goto :SKIP_CLINK - -:INJECT_CLINK - %print_verbose% "Injecting Clink!" - - :: Check if Clink is not present - if not exist "%CMDER_ROOT%\vendor\clink\clink_%clink_architecture%.exe" ( - goto :SKIP_CLINK - ) - - :: Run Clink - if not exist "%CMDER_CONFIG_DIR%\settings" if not exist "%CMDER_CONFIG_DIR%\clink_settings" ( - echo Generating Clink initial settings in "%CMDER_CONFIG_DIR%\clink_settings" - copy "%CMDER_ROOT%\vendor\clink_settings.default" "%CMDER_CONFIG_DIR%\clink_settings" - echo Additional *.lua files in "%CMDER_CONFIG_DIR%" are loaded on startup. - ) - - if not exist "%CMDER_CONFIG_DIR%\cmder_prompt_config.lua" ( - echo Creating Cmder prompt config file: "%CMDER_CONFIG_DIR%\cmder_prompt_config.lua" - copy "%CMDER_ROOT%\vendor\cmder_prompt_config.lua.default" "%CMDER_CONFIG_DIR%\cmder_prompt_config.lua" - ) - - "%CMDER_ROOT%\vendor\clink\clink_%clink_architecture%.exe" inject --quiet --profile "%CMDER_CONFIG_DIR%" --scripts "%CMDER_ROOT%\vendor" - - if errorlevel 1 ( - %print_error% "Clink initialization has failed with error code: %errorlevel%" - goto :CLINK_FINISH - ) - - set CMDER_CLINK=2 - goto :CLINK_FINISH - -:SKIP_CLINK - %print_warning% "Skipping Clink Injection!" - - for /f "tokens=2 delims=:." %%x in ('chcp') do set cp=%%x - chcp 65001>nul - - :: Revert back to plain cmd.exe prompt without clink - prompt $E[1;32;49m$P$S$_$E[1;30;49mĪ»$S$E[0m - - chcp %cp%>nul -:CLINK_FINISH - -if not defined GIT_INSTALL_ROOT set "GIT_INSTALL_ROOT=%CMDER_ROOT%\vendor\git-for-windows" -if not defined SVN_SSH set "SVN_SSH=%GIT_INSTALL_ROOT:\=\\%\\bin\\ssh.exe" -if not defined git_locale set git_locale="%GIT_INSTALL_ROOT%\usr\bin\locale.exe" -if not defined LANG set LANG=en_US.UTF-8 -if not defined user_aliases set "user_aliases=%CMDER_ROOT%\config\user_aliases.cmd" -if not defined aliases set "aliases=%user_aliases%" -if not defined HOME set "HOME=%USERPROFILE%" - -set PLINK_PROTOCOL=ssh - -set "path=%GIT_INSTALL_ROOT%\cmd;%path%" - -set path_position=append -if %nix_tools% equ 1 ( - set "path_position=append" -) else ( - set "path_position=" -) - -if %nix_tools% geq 1 ( - if exist "%GIT_INSTALL_ROOT%\mingw32" ( - if "%path_position%" == "append" ( - set "path=%path%;%GIT_INSTALL_ROOT%\mingw32\bin" - ) else ( - set "path=%GIT_INSTALL_ROOT%\mingw32\bin;%path%" - ) - ) else if exist "%GIT_INSTALL_ROOT%\mingw64" ( - if "%path_position%" == "append" ( - set "path=%path%;%GIT_INSTALL_ROOT%\mingw64\bin" - ) else ( - set "path=%GIT_INSTALL_ROOT%\mingw64\bin;%path%" - ) - ) - if exist "%GIT_INSTALL_ROOT%\usr\bin" ( - if "%path_position%" == "append" ( - set "path=%path%;%GIT_INSTALL_ROOT%\usr\bin" - ) else ( - set "path=%GIT_INSTALL_ROOT%\usr\bin;%path%" - ) - ) -) - -set "path=%CMDER_ROOT%\vendor\bin;%path%" - -:USER_CONFIG_START -if %max_depth% gtr 1 ( - %lib_path% enhance_path_recursive "%CMDER_ROOT%\bin" 0 %max_depth% -) else ( - set "path=%CMDER_ROOT%\bin;%path%" -) - -setlocal enabledelayedexpansion -if defined CMDER_USER_BIN ( - if %max_depth% gtr 1 ( - %lib_path% enhance_path_recursive "%CMDER_USER_BIN%" 0 %max_depth% - ) else ( - set "path=%CMDER_USER_ROOT%\bin;%path%" - ) -) -endlocal && set "path=%path%" - -set "path=%path%;%CMDER_ROOT%" - -call "%user_aliases%" - -%lib_profile% run_profile_d "%CMDER_ROOT%\config\profile.d" -if defined CMDER_USER_CONFIG ( - %lib_profile% run_profile_d "%CMDER_USER_CONFIG%\profile.d" -) - -call "%CMDER_ROOT%\config\user_profile.cmd" -if defined CMDER_USER_CONFIG ( - if exist "%CMDER_USER_CONFIG%\user_profile.cmd" ( - call "%CMDER_USER_CONFIG%\user_profile.cmd" - ) -) - -set "path=%path:;;=;% - -:CMDER_CONFIGURED -if not defined CMDER_CONFIGURED set CMDER_CONFIGURED=1 - -set CMDER_INIT_END=%time% - -"%cmder_root%\vendor\bin\timer.cmd" "%CMDER_INIT_START%" "%CMDER_INIT_END%" -exit /b From f1e2fb569792d0ab70727688c1c91f7e8dfc8b8c Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sun, 26 Feb 2023 18:00:26 -0800 Subject: [PATCH 010/203] prevent timer results every time. --- vendor/bin/create-cmdercfg.ps1 | 2 +- vendor/init.bat | 2 +- vendor/{user_init.cmd.template => user_init.template.cmd} | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename vendor/{user_init.cmd.template => user_init.template.cmd} (98%) diff --git a/vendor/bin/create-cmdercfg.ps1 b/vendor/bin/create-cmdercfg.ps1 index 5fb23a080..16c83fa21 100644 --- a/vendor/bin/create-cmdercfg.ps1 +++ b/vendor/bin/create-cmdercfg.ps1 @@ -11,7 +11,7 @@ $CmderFunctions = Join-Path $CmderModulePath "Cmder.ps1" if ($shell -match 'cmd') { write-host "Generating Cmder Config for '$shell' shell in '$outfile'..." - templateExpand "$env:cmder_root\vendor\user_init.cmd.template" "$outfile" + templateExpand "$env:cmder_root\vendor\user_init.template.cmd" "$outfile" } elseif ($shell -match 'powershell') { write-host "'$shell' is not supported at this time!" } elseif ($shell -match 'bash') { diff --git a/vendor/init.bat b/vendor/init.bat index 97694e6b3..88df30511 100644 --- a/vendor/init.bat +++ b/vendor/init.bat @@ -562,7 +562,7 @@ if defined CMDER_USER_CONFIG ( if not defined CMDER_CONFIGURED set CMDER_CONFIGURED=1 set CMDER_INIT_END=%time% - if "%CMDER_INIT_END%" neq "" if "%CMDER_INIT_START%" neq "" ( + if "%time_init%" == "1" if "%CMDER_INIT_END%" neq "" if "%CMDER_INIT_START%" neq "" ( call "%cmder_root%\vendor\bin\timer.cmd" "%CMDER_INIT_START%" "%CMDER_INIT_END%" ) diff --git a/vendor/user_init.cmd.template b/vendor/user_init.template.cmd similarity index 98% rename from vendor/user_init.cmd.template rename to vendor/user_init.template.cmd index acc36f90a..ebfaf8570 100644 --- a/vendor/user_init.cmd.template +++ b/vendor/user_init.template.cmd @@ -144,7 +144,7 @@ goto :SKIP_CLINK set CMDER_INIT_END=%time% - if "%CMDER_INIT_END%" neq "" if "%CMDER_INIT_START%" neq "" ( + if "%time_init%" == "1" if "%CMDER_INIT_END%" neq "" if "%CMDER_INIT_START%" neq "" ( call "%cmder_root%\vendor\bin\timer.cmd" "%CMDER_INIT_START%" "%CMDER_INIT_END%" ) From e0b694324ca0248bcb6b2035b26390ea242a8b91 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sun, 5 Mar 2023 15:00:11 -0800 Subject: [PATCH 011/203] add bypass --- vendor/init.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/init.bat b/vendor/init.bat index 88df30511..ae4e51819 100644 --- a/vendor/init.bat +++ b/vendor/init.bat @@ -551,7 +551,7 @@ if defined CMDER_USER_CONFIG ( %print_error% "Failed to generate Cmder config" ) ) else if not exist "%CMDER_ROOT%\config\user_init.cmd" ( - powershell -f %cmder_root%\vendor\bin\create-cmdercfg.ps1 -shell cmd -outfile "%CMDER_ROOT%\config\user_init.cmd" + powershell -executionpolicy bypass -f %cmder_root%\vendor\bin\create-cmdercfg.ps1 -shell cmd -outfile "%CMDER_ROOT%\config\user_init.cmd" if not exist "%CMDER_ROOT%\config\user_init.cmd" ( %print_error% "Failed to generate Cmder config" From c4d93655841773e6d8b34a2dbfbc607c0af09f2f Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sat, 11 Mar 2023 14:59:12 -0800 Subject: [PATCH 012/203] x --- vendor/init.bat | 1 + 1 file changed, 1 insertion(+) diff --git a/vendor/init.bat b/vendor/init.bat index ae4e51819..97c1b0752 100644 --- a/vendor/init.bat +++ b/vendor/init.bat @@ -572,6 +572,7 @@ if defined CMDER_USER_CONFIG ( set CMDER_INIT_END= set CMDER_INIT_START= set CMDER_USER_FLAGS= + set CMDER_CLINK= set debug_output= set fast_init= set max_depth= From 42568b7316f2e28b5ca4c6518912b5b4edf85bfa Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sun, 12 Mar 2023 13:02:08 -0700 Subject: [PATCH 013/203] Document '--' command line argument --- README.md | 2 +- launcher/src/strings.rc2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 735fd1e88..cda18e966 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ The Cmder's user interface is also designed to be more eye pleasing, and you can | `/SINGLE` | Start Cmder in single mode. | | `/START [start_path]` | Folder path to start in. | | `/TASK [task_name]` | Task to start after launch. | -| `/X [ConEmu extras pars]` | Forwards parameters to ConEmu | +| `-- [ConEmu extras pars]` | Forwards ALL remaining parameters to ConEmu. | ## Context Menu Integration diff --git a/launcher/src/strings.rc2 b/launcher/src/strings.rc2 index 088730753..67866de56 100644 --- a/launcher/src/strings.rc2 +++ b/launcher/src/strings.rc2 @@ -6,7 +6,7 @@ STRINGTABLE { IDS_TITLE "Cmder Launcher" - IDS_SWITCHES L"Valid options:\n\n /c [CMDER User Root Path]\n /task [ConEmu Task Name]\n /icon [CMDER Icon Path]\n [/start [Start in Path] | [Start in Path]]\n /single\n /m\n /x [ConEmu extra arguments]\n\nor, either:\n /register [USER | ALL]\n /unregister [USER | ALL]" + IDS_SWITCHES L"Valid options:\n\n /c [CMDER User Root Path]\n /task [ConEmu Task Name]\n /icon [CMDER Icon Path]\n [/start [Start in Path] | [Start in Path]]\n /single\n /m\n -- [ConEmu extra arguments]\n\nNote: '-- [...]' must be the last argument!\n\nor, either:\n /register [USER | ALL]\n /unregister [USER | ALL]" } ///////////////////////////////////////////////////////////////////////////// From b2135cd0a93d8c62d20e95ea69748cc5969e34ef Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Tue, 30 May 2023 11:15:04 -0400 Subject: [PATCH 014/203] don't error if vim slias exists --- vendor/profile.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/profile.ps1 b/vendor/profile.ps1 index d1087b1ad..4123bfdc2 100644 --- a/vendor/profile.ps1 +++ b/vendor/profile.ps1 @@ -87,7 +87,7 @@ if ($null -ne $ENV:GIT_INSTALL_ROOT) { } if (Get-Command -Name "vim" -ErrorAction SilentlyContinue) { - New-Alias -name "vi" -value vim + New-Alias -name "vi" -value vim -errorAction SilentlyContinue } if (Get-Module PSReadline -ErrorAction "SilentlyContinue") { From 86b9fb25ab6329438c3307f24cd09802d1baf888 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Mon, 5 Jun 2023 13:22:28 -0400 Subject: [PATCH 015/203] Add ability to launch git bash from external Installed git whwen using Cmder - Mini --- vendor/ConEmu.xml.default | 131 +++++++++++++++++++++++--------------- vendor/cmder_exinit | 7 +- vendor/git-prompt.sh | 15 ++++- vendor/start_git_bash.cmd | 47 ++++++++++++++ 4 files changed, 142 insertions(+), 58 deletions(-) create mode 100644 vendor/start_git_bash.cmd diff --git a/vendor/ConEmu.xml.default b/vendor/ConEmu.xml.default index a4e5cc1fb..47b53d430 100644 --- a/vendor/ConEmu.xml.default +++ b/vendor/ConEmu.xml.default @@ -1,7 +1,7 @@ - + @@ -42,8 +42,8 @@ - - + + @@ -58,7 +58,7 @@ - + @@ -78,7 +78,6 @@ - @@ -113,13 +112,13 @@ - + - + - + @@ -128,8 +127,8 @@ - - + + @@ -166,19 +165,19 @@ - + - + - + - + @@ -413,15 +412,15 @@ - + - + - + @@ -484,12 +483,12 @@ - - + + - - + + @@ -497,8 +496,8 @@ - - + + @@ -507,8 +506,8 @@ - - + + @@ -516,61 +515,78 @@ - - - + + + - + + + + + + + + + + + + + + + + + + + + - - + + - + - - + + - - + - + + - - + - - + + - + - + - @@ -676,7 +692,7 @@ - + @@ -845,13 +861,13 @@ - - + + - + - + @@ -869,10 +885,16 @@ + + + + + + - + @@ -902,6 +924,15 @@ + + + + + + + + + diff --git a/vendor/cmder_exinit b/vendor/cmder_exinit index 4ec3351af..6c29dfddd 100644 --- a/vendor/cmder_exinit +++ b/vendor/cmder_exinit @@ -34,7 +34,6 @@ function runProfiled { if [ ! "x${profile_d_scripts}" = "x" ] ; then for x in ${profile_d_scripts} ; do - echo Sourcing "${1}/${x}"... . "${1}/${x}" done fi @@ -46,10 +45,8 @@ function runProfiled { # We do this for bash as admin sessions since $CMDER_ROOT is not being set if [ "$CMDER_ROOT" = "" -a "$ConEmuDir" != "" ] ; then - if [ -d "${ConEmuDir}../../vendor" ] ; then + if [ -d "${ConEmuDir}/../../vendor" ] ; then case "$ConEmuDir" in *\\*) CMDER_ROOT=$( cd "$(cygpath -u "$ConEmuDir")/../.." ; pwd );; esac - else - echo "Running in ConEmu without Cmder, skipping Cmder integration." fi elif [ "$CMDER_ROOT" != "" ] ; then case "$CMDER_ROOT" in *\\*) CMDER_ROOT="$(cygpath -u "$CMDER_ROOT")";; esac @@ -59,8 +56,6 @@ if [ ! "$CMDER_ROOT" = "" ] ; then # Remove any trailing '/' CMDER_ROOT=$(echo $CMDER_ROOT | sed 's:/*$::') - echo "Using \"CMDER_ROOT\" at \"${CMDER_ROOT}\"." - export CMDER_ROOT PATH=${CMDER_ROOT}/bin:${CMDER_ROOT}/vendor/bin:$PATH:${CMDER_ROOT} diff --git a/vendor/git-prompt.sh b/vendor/git-prompt.sh index a02af6224..189e3dc6a 100644 --- a/vendor/git-prompt.sh +++ b/vendor/git-prompt.sh @@ -38,7 +38,7 @@ then . ~/.config/git/git-prompt.sh fi else - PS1='\[\033]0;$MSYSTEM:${PWD//[^[:ascii:]]/?}\007\]' # set window title + PS1='\[\033]0;$TITLEPREFIX:$PWD\007\]' # set window title # PS1="$PS1"'\n' # new line PS1="$PS1"'\[\033[32m\]' # change to green PS1="$PS1"'\u@\h ' # user@host @@ -71,4 +71,15 @@ else PS1="$PS1"'Ī» ' # prompt: always Ī» fi -MSYS2_PS1="$PS1" # for detection by MSYS2 SDK's bash.basrc \ No newline at end of file +MSYS2_PS1="$PS1" # for detection by MSYS2 SDK's bash.basrc + +# Evaluate all user-specific Bash completion scripts (if any) +if test -z "$WINELOADERNOEXEC" +then + for c in "$HOME"/bash_completion.d/*.bash + do + # Handle absence of any scripts (or the folder) gracefully + test ! -f "$c" || + . "$c" + done +fi diff --git a/vendor/start_git_bash.cmd b/vendor/start_git_bash.cmd new file mode 100644 index 000000000..136feabc4 --- /dev/null +++ b/vendor/start_git_bash.cmd @@ -0,0 +1,47 @@ +@echo off + +if not defined CMDER_ROOT ( + if defined ConEmuDir ( + for /f "delims=" %%i in ("%ConEmuDir%\..\..") do ( + set "CMDER_ROOT=%%~fi" + ) + ) else ( + for /f "delims=" %%i in ("%~dp0\..") do ( + set "CMDER_ROOT=%%~fi" + ) + ) +) + +if defined ConEmuDir ( + set "gitCommand=--command=%ConEmuBaseDirShort%\conemu-msys2-64.exe" +) + +if exist "%CMDER_ROOT%\vendor\git-for-windows" ( + set "PATH=%CMDER_ROOT%\vendor\git-for-windows\usr\bin;%PATH%" + set "gitCmd=%CMDER_ROOT%\vendor\git-for-windows\git-cmd.exe" + set "bashCmd=%CMDER_ROOT%\vendor\git-for-windows\usr\bin\bash.exe" +) else if exist "%ProgramFiles%\git" ( + set "PATH=%ProgramFiles%\git\usr\bin;%PATH%" + set "gitCmd=%ProgramFiles%\git\git-cmd.exe" + set "bashCmd=%ProgramFiles%\git\usr\bin\bash.exe" + if not exist "%ProgramFiles%\git\etc\profile.d\cmder_exinit.sh" ( + echo Run 'mklink "%ProgramFiles%\git\etc\profile.d\cmder_exinit.sh" "%CMDER_ROOT%\vendor\cmder_exinit"' in 'cmd::Cmder as Admin' to use Cmder with external Git Bash + echo. + echo or + echo. + echo Run 'echo "" ^> "%ProgramFiles%\git\etc\profile.d\cmder_exinit.sh"' in 'cmd::Cmder as Admin' to disable this message. + ) +) else if exist "%ProgramFiles(x86)%\git" ( + set "PATH=%ProgramFiles(x86)%\git\usr\bin;%PATH%" + set "gitCmd=%ProgramFiles(x86)%\git\git-cmd.exe" + set "bashCmd=%ProgramFiles(x86)%\git\usr\bin\bash.exe" + if not exist "%ProgramFiles(x86)%\git\etc\profile.d\cmder_exinit.sh" ( + echo Run 'mklink "%ProgramFiles^(x86^)%\git\etc\profile.d\cmder_exinit.sh" "%CMDER_ROOT%\vendor\cmder_exinit"' in 'cmd::Cmder as Admin' to use Cmder with external Git Bash + echo. + echo or + echo. + echo Run 'echo "" ^> "%ProgramFiles^(x86^)%\git\etc\profile.d\cmder_exinit.sh"' in 'cmd::Cmder as Admin' to disable this message. + ) +) + +"%gitCmd%" --no-cd %gitCommand% "%bashCmd%" --login -i From 4bf659833ca8b5c32d6d1303e87fe33d106fcfaa Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Mon, 3 Jul 2023 16:19:07 -0400 Subject: [PATCH 016/203] fix multiuser user_init.cmd creation --- vendor/bin/create-cmdercfg.ps1 | 15 ++++++++++----- vendor/init.bat | 19 ++++--------------- vendor/psmodules/Cmder.ps1 | 5 +++-- 3 files changed, 17 insertions(+), 22 deletions(-) diff --git a/vendor/bin/create-cmdercfg.ps1 b/vendor/bin/create-cmdercfg.ps1 index 5fb23a080..e909a91ed 100644 --- a/vendor/bin/create-cmdercfg.ps1 +++ b/vendor/bin/create-cmdercfg.ps1 @@ -2,18 +2,23 @@ param( [Parameter()] [string]$shell = 'cmd', - [string]$outfile = "$env:cmder_root\config\user_init.cmd" + [string]$outfile = "$env:cmder_config_dir\user_init.cmd" ) +if ($shell -match 'powershell') { + write-host "'$shell' is not supported at this time!" + exit 0 +} elseif ($shell -match 'bash') { + write-host "'$shell' is not supported at this time!" + exit 0 +} + $CmderModulePath = Join-path $env:cmder_root "vendor/psmodules/" $CmderFunctions = Join-Path $CmderModulePath "Cmder.ps1" + . $CmderFunctions if ($shell -match 'cmd') { write-host "Generating Cmder Config for '$shell' shell in '$outfile'..." templateExpand "$env:cmder_root\vendor\user_init.cmd.template" "$outfile" -} elseif ($shell -match 'powershell') { - write-host "'$shell' is not supported at this time!" -} elseif ($shell -match 'bash') { - write-host "'$shell' is not supported at this time!" } diff --git a/vendor/init.bat b/vendor/init.bat index 97694e6b3..80d816938 100644 --- a/vendor/init.bat +++ b/vendor/init.bat @@ -168,10 +168,11 @@ if "%PROCESSOR_ARCHITECTURE%"=="x86" ( if defined CMDER_USER_CONFIG ( if exist "%CMDER_ROOT%\config\user_init.cmd" ( call "%CMDER_ROOT%\config\user_init.cmd" + exit /b ) else if exist "%CMDER_USER_CONFIG%\config\user_init.cmd" ( call "%CMDER_USER_CONFIG%\config\user_init.cmd" + exit /b ) - exit /b ) else if exist "%CMDER_ROOT%\config\user_init.cmd" ( call "%CMDER_ROOT%\config\user_init.cmd" exit /b @@ -538,20 +539,8 @@ if "%CMDER_ALIASES%" == "1" if exist "%CMDER_ROOT%\bin\alias.bat" if exist "%CMD set initialConfig= -if defined CMDER_USER_CONFIG ( - if not exist "%CMDER_ROOT%\config\user_init.cmd" if not exist "%CMDER_USER_ROOT%\config\user_init.cmd" ( - powershell -f %cmder_root%\vendor\bin\create-cmdercfg.ps1 -shell cmd -outfile "%CMDER_ROOT%\config\user_init.cmd" - ) - - if not exist "%CMDER_ROOT%\config\user_init.cmd" if not exist "%CMDER_USER_ROOT%\config\user_init.cmd" ( - powershell -f %cmder_root%\vendor\bin\create-cmdercfg.ps1 -shell cmd -outfile "%CMDER_iUSER_ROOT%\config\user_init.cmd" - ) - - if not exist "%CMDER_ROOT%\config\user_init.cmd" if not exist "%CMDER_USER_ROOT%\config\user_init.cmd" ( - %print_error% "Failed to generate Cmder config" - ) -) else if not exist "%CMDER_ROOT%\config\user_init.cmd" ( - powershell -f %cmder_root%\vendor\bin\create-cmdercfg.ps1 -shell cmd -outfile "%CMDER_ROOT%\config\user_init.cmd" +if not exist "%CMDER_CONFIG_DIR%\user_init.cmd" ( + powershell -f "%cmder_root%\vendor\bin\create-cmdercfg.ps1" -shell cmd -outfile "%CMDER_CONFIG_DIR%\user_init.cmd" if not exist "%CMDER_ROOT%\config\user_init.cmd" ( %print_error% "Failed to generate Cmder config" diff --git a/vendor/psmodules/Cmder.ps1 b/vendor/psmodules/Cmder.ps1 index ace3679f7..79a053fce 100644 --- a/vendor/psmodules/Cmder.ps1 +++ b/vendor/psmodules/Cmder.ps1 @@ -186,8 +186,9 @@ function yOrn( $question ) { return $Answer } -function templateExpand($template, $outfile) { - $template = Get-Content $template -Raw +function templateExpand($template_filename, $outfile) { + $template = Get-Content "$template_filename" -Raw + $expanded = Invoke-Expression "@`"`r`n$template`r`n`"@" $overwrite = 'y' From 294f85e33ce749d7b9f04669aa860609da4f6fc4 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Mon, 3 Jul 2023 16:23:45 -0400 Subject: [PATCH 017/203] fixes --- vendor/bin/create-cmdercfg.ps1 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vendor/bin/create-cmdercfg.ps1 b/vendor/bin/create-cmdercfg.ps1 index e909a91ed..05aeaa467 100644 --- a/vendor/bin/create-cmdercfg.ps1 +++ b/vendor/bin/create-cmdercfg.ps1 @@ -11,6 +11,8 @@ if ($shell -match 'powershell') { } elseif ($shell -match 'bash') { write-host "'$shell' is not supported at this time!" exit 0 +} else { + exit 0 } $CmderModulePath = Join-path $env:cmder_root "vendor/psmodules/" From cd92c9fa74487636187af9cfd34bc99a84583ff0 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Mon, 3 Jul 2023 17:51:02 -0400 Subject: [PATCH 018/203] cleanup --- vendor/init.bat | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vendor/init.bat b/vendor/init.bat index 2bf8839be..e391f2694 100644 --- a/vendor/init.bat +++ b/vendor/init.bat @@ -220,10 +220,10 @@ goto :SKIP_CLINK "%CMDER_ROOT%\vendor\clink\clink_%clink_architecture%.exe" inject --quiet --profile "%CMDER_CONFIG_DIR%" --scripts "%CMDER_ROOT%\vendor" set CMDER_CLINK=2 - if errorlevel 1 ( - %print_error% "Clink initialization has failed with error code: %errorlevel%" - goto :CLINK_FINISH - ) + REM if errorlevel 1 ( + REM %print_error% "Clink initialization has failed with error code: %errorlevel%" + REM goto :CLINK_FINISH + REM ) set CMDER_CLINK=2 From 3ced7a2a1be06f4ddfdd9f892ca34de1cdf82234 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Tue, 4 Jul 2023 11:07:33 -0400 Subject: [PATCH 019/203] '.gitignore --- .gitignore | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitignore b/.gitignore index 71475ec9e..3ca812444 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,10 @@ launcher/src/version.rc2 .vs/* .vscode .idea +.vagrant/ +scripts/packer/iso/*.iso +!scripts/packer/floppy/*.exe +scripts/packer/packer_cache +scripts/packer/output-* +*.box + From 4129084494344be140c13ce8c8e784108f0e3e6b Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sat, 8 Jul 2023 13:09:10 -0700 Subject: [PATCH 020/203] add comment to clink.lua explaining /c [folderpath] --- vendor/clink.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vendor/clink.lua b/vendor/clink.lua index 83ef0c042..b05daad75 100644 --- a/vendor/clink.lua +++ b/vendor/clink.lua @@ -666,6 +666,10 @@ for _,lua_module in ipairs(clink.find_files(completions_dir..'*.lua')) do end end +-- If Cmder is launched with '/c [folderPath]', indicating Cmder is installed globally and +-- each user has a private '[folderPath]\config' folder, Clink won't know about the global +-- '%cmder_root%\config dir, so we need to load scripts from there before . Clink loads lua +-- scripts from the profile directory given to it when it was injected. if clink.get_env('CMDER_USER_CONFIG') then local cmder_config_dir = clink.get_env('CMDER_ROOT')..'/config/' for _,lua_module in ipairs(clink.find_files(cmder_config_dir..'*.lua')) do From 6b330b81f2a7e179f7e2d27870d2a40017b060fd Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Fri, 11 Aug 2023 10:44:33 -0400 Subject: [PATCH 021/203] allow launching windows terminal w/cmder from cmder --- vendor/user_init.cmd.template | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vendor/user_init.cmd.template b/vendor/user_init.cmd.template index ebfaf8570..82fc90b87 100644 --- a/vendor/user_init.cmd.template +++ b/vendor/user_init.cmd.template @@ -12,6 +12,8 @@ if "%CMDER_CLINK%" == "1" ( goto :INJECT_CLINK +) else if "%CMDER_CLINK%" == "2" if defined WT_PROFILE_ID ( + goto :INJECT_CLINK ) else if "%CMDER_CLINK%" == "2" ( goto :CLINK_FINISH ) From 94ea2da567941116f8c2d6f50b51c2d806c9b057 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Fri, 22 Sep 2023 17:07:56 -0400 Subject: [PATCH 022/203] make it work with windows terminal --- vendor/start_git_bash.cmd | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vendor/start_git_bash.cmd b/vendor/start_git_bash.cmd index 136feabc4..679c5af9e 100644 --- a/vendor/start_git_bash.cmd +++ b/vendor/start_git_bash.cmd @@ -44,4 +44,8 @@ if exist "%CMDER_ROOT%\vendor\git-for-windows" ( ) ) -"%gitCmd%" --no-cd %gitCommand% "%bashCmd%" --login -i +if defined ConEmuDir ( + "%gitCmd%" --no-cd %gitCommand% "%bashCmd%" --login -i +) else ( + "%bashCmd%" --login -i +) From 7c04ee9f6a3f3500a9ee87e9bf09d7708bf1240d Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Fri, 22 Sep 2023 17:15:23 -0400 Subject: [PATCH 023/203] fixes --- vendor/cmder_exinit | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vendor/cmder_exinit b/vendor/cmder_exinit index 6c29dfddd..68022a4c9 100644 --- a/vendor/cmder_exinit +++ b/vendor/cmder_exinit @@ -26,13 +26,13 @@ function runProfiled { unset profile_d_scripts pushd "${1}" >/dev/null - if [ ! "x${ZSH_VERSION}" = "x" ]; then + if [ -n "${ZSH_VERSION}" ]; then profile_d_scripts=$(ls *.zsh 2>/dev/null) - elif [ ! "x${BASH_VERSION}" = "x" ]; then + elif [ -n "${BASH_VERSION}" ]; then profile_d_scripts=$(ls *.sh 2>/dev/null) fi - if [ ! "x${profile_d_scripts}" = "x" ] ; then + if [ -n "${profile_d_scripts}" ] ; then for x in ${profile_d_scripts} ; do . "${1}/${x}" done @@ -52,7 +52,7 @@ elif [ "$CMDER_ROOT" != "" ] ; then case "$CMDER_ROOT" in *\\*) CMDER_ROOT="$(cygpath -u "$CMDER_ROOT")";; esac fi -if [ ! "$CMDER_ROOT" = "" ] ; then +if [ -n "$CMDER_ROOT" ] ; then # Remove any trailing '/' CMDER_ROOT=$(echo $CMDER_ROOT | sed 's:/*$::') From 968beb8a270692f0daa6652063258a7fbf104bf4 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Mon, 25 Sep 2023 11:14:54 -0400 Subject: [PATCH 024/203] Add initial Windows Terminal support --- Cmder.bat | 74 +++- launcher/src/CmderLauncher.cpp | 286 +++++++++---- scripts/build.ps1 | 35 +- vendor/windows_terminal_default_settings.json | 388 ++++++++++++++++++ 4 files changed, 677 insertions(+), 106 deletions(-) create mode 100644 vendor/windows_terminal_default_settings.json diff --git a/Cmder.bat b/Cmder.bat index d48b0eefb..987d33ff0 100644 --- a/Cmder.bat +++ b/Cmder.bat @@ -1,20 +1,66 @@ @echo off + SET CMDER_ROOT=%~dp0 -:: Remove Trailing '\' -@if "%CMDER_ROOT:~-1%" == "\" SET CMDER_ROOT=%CMDER_ROOT:~0,-1% - -if not exist "%CMDER_ROOT%\config\user_ConEmu.xml" ( - if not exist "%CMDER_ROOT%\config" mkdir "%CMDER_ROOT%\config" 2>nul - copy "%CMDER_ROOT%\vendor\ConEmu.xml.default" "%CMDER_ROOT%\config\user_ConEmu.xml" 1>nul - if %errorlevel% neq 0 ( - echo ERROR: CMDER Initialization has Failed - exit /b 1 - ) +set CMDER_TERMINAl=conemu +if exist "%CMDER_ROOT%\vendor\windows-terminal\windowsterminal.exe" ( + SET CMDER_TERMINAL=windows-terminal ) -if exist "%~1" ( - start %~dp0/vendor/conemu-maximus5/ConEmu.exe /Icon "%CMDER_ROOT%\icons\cmder.ico" /Title Cmder /LoadCfgFile "%~1" -) else ( - start %~dp0/vendor/conemu-maximus5/ConEmu.exe /Icon "%CMDER_ROOT%\icons\cmder.ico" /Title Cmder /LoadCfgFile "%CMDER_ROOT%\config\user_ConEmu.xml" +if NOT "%~1" == "" ( + SET CMDER_TERMINAL=%~1 + shift ) + +:: Remove Trailing '\' +if "%CMDER_ROOT:~-1%" == "\" SET CMDER_ROOT=%CMDER_ROOT:~0,-1% + +if not exist "%CMDER_ROOT%\config" md "%CMDER_ROOT%\config" 2>nul + +call :%CMDER_TERMINAL% +exit /b + +:conemu + if not exist "%CMDER_ROOT%\config\user_ConEmu.xml" ( + copy "%CMDER_ROOT%\vendor\ConEmu.xml.default" "%CMDER_ROOT%\config\user_ConEmu.xml" 1>nul + if %errorlevel% neq 0 ( + echo ERROR: CMDER Initialization has Failed + exit /b 1 + ) + ) + + if exist "%~1" ( + start %cmder_root%\vendor\conemu-maximus5\ConEmu.exe /Icon "%CMDER_ROOT%\icons\cmder.ico" /Title Cmder /LoadCfgFile "%~1" + ) else ( + start %cmder_root%\vendor\conemu-maximus5\ConEmu.exe /Icon "%CMDER_ROOT%\icons\cmder.ico" /Title Cmder /LoadCfgFile "%CMDER_ROOT%\config\user_ConEmu.xml" + ) + exit /b + +:windows-terminal + if not exist "%CMDER_ROOT%\vendor\windows-terminal\settings" md "%CMDER_ROOT%\vendor\windows-terminal\settings" 2>nul + if not exist "%CMDER_ROOT%\vendor\windows-terminal\.portable" echo "This make this installation of Windows Terminal portable" >"%CMDER_ROOT%\vendor\windows-terminal\.portable" 2>nul + + if exist "%CMDER_ROOT%\config\user_windows_terminal_settings.json" ( + if not exist "%CMDER_ROOT%\vendor\windows-terminal\settings\settings.json" ( + echo "Copying user Windows Terminal settings to '%CMDER_ROOT%\vendor\windows-terminal\settings\settings.json'..." + copy "%CMDER_ROOT%\config\user_windows_terminal_settings.json" "%CMDER_ROOT%\vendor\windows-terminal\settings\settings.json" 1>nul + ) + ) else if not exist "%CMDER_ROOT%\config\user_windows_terminal_settings.json" ( + if not exist "%CMDER_ROOT%\config" mkdir "%CMDER_ROOT%\config" 2>nul + echo "Copying default Windows Terminal settings to '%CMDER_ROOT%\config'..." + copy "%CMDER_ROOT%\vendor\windows_terminal_default_settings.json" "%CMDER_ROOT%\config\user_windows_terminal_settings.json" 1>nul + echo "Copying default Windows Terminal settings to '%CMDER_ROOT%\vendor\windows-terminal\settings\settings.json'..." + copy "%CMDER_ROOT%\vendor\windows_terminal_default_settings.json" "%CMDER_ROOT%\vendor\windows-terminal\settings\settings.json" 1>nul + + if %errorlevel% neq 0 ( + echo ERROR: CMDER Initialization has Failed + exit /b 1 + ) + ) else if exist "%cmder_root%\vendor\windows-terminal\settings\settings.json" ( + copy "%cmder_root%\vendor\windows-terminal\settings\settings.json" "%CMDER_ROOT%\config\user_windows_terminal_settings.json" + ) + + start %cmder_root%\vendor\windows-terminal\windowsterminal.exe + exit /b + + diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index 9f033c38b..eb04b49d0 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -117,7 +117,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr wchar_t cpuCfgPath[MAX_PATH] = { 0 }; wchar_t userCfgPath[MAX_PATH] = { 0 }; wchar_t defaultCfgPath[MAX_PATH] = { 0 }; - wchar_t conEmuPath[MAX_PATH] = { 0 }; + wchar_t terminalPath[MAX_PATH] = { 0 }; wchar_t configDirPath[MAX_PATH] = { 0 }; wchar_t userConfigDirPath[MAX_PATH] = { 0 }; wchar_t userBinDirPath[MAX_PATH] = { 0 }; @@ -128,12 +128,15 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr wchar_t legacyUserAliasesPath[MAX_PATH] = { 0 }; wchar_t args[MAX_PATH * 2 + 256] = { 0 }; wchar_t userConEmuCfgPath[MAX_PATH] = { 0 }; + wchar_t windowsTerminalDir[MAX_PATH] = { 0 }; + wchar_t conEmuDir[MAX_PATH] = { 0 }; + wchar_t emulatorPath[MAX_PATH] = { 0 }; std::wstring cmderStart = path; std::wstring cmderTask = taskName; std::wstring cmderTitle = title; - std::wstring cmderConEmuArgs = conemu_args; + std::wstring cmderTerminalArgs = conemu_args; std::copy(cfgRoot.begin(), cfgRoot.end(), userConfigDirPath); userConfigDirPath[cfgRoot.length()] = 0; @@ -166,8 +169,8 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr { PathCombine(userProfilePath, configDirPath, L"user_profile.cmd"); - char *lPr = (char *)malloc(MAX_PATH); - char *pR = (char *)malloc(MAX_PATH); + char* lPr = (char*)malloc(MAX_PATH); + char* pR = (char*)malloc(MAX_PATH); size_t i; wcstombs_s(&i, lPr, (size_t)MAX_PATH, legacyUserProfilePath, (size_t)MAX_PATH); @@ -184,8 +187,8 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr { PathCombine(userAliasesPath, configDirPath, L"user_aliases.cmd"); - char *lPr = (char *)malloc(MAX_PATH); - char *pR = (char *)malloc(MAX_PATH); + char* lPr = (char*)malloc(MAX_PATH); + char* pR = (char*)malloc(MAX_PATH); size_t i; wcstombs_s(&i, lPr, (size_t)MAX_PATH, legacyUserAliasesPath, (size_t)MAX_PATH); @@ -222,8 +225,8 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr { PathCombine(userProfilePath, userConfigDirPath, L"user_profile.cmd"); - char *lPr = (char *)malloc(MAX_PATH); - char *pR = (char *)malloc(MAX_PATH); + char* lPr = (char*)malloc(MAX_PATH); + char* pR = (char*)malloc(MAX_PATH); size_t i; wcstombs_s(&i, lPr, (size_t)MAX_PATH, legacyUserProfilePath, (size_t)MAX_PATH); @@ -240,8 +243,8 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr { PathCombine(userAliasesPath, userConfigDirPath, L"user_aliases.cmd"); - char *lPr = (char *)malloc(MAX_PATH); - char *pR = (char *)malloc(MAX_PATH); + char* lPr = (char*)malloc(MAX_PATH); + char* pR = (char*)malloc(MAX_PATH); size_t i; wcstombs_s(&i, lPr, (size_t)MAX_PATH, legacyUserAliasesPath, (size_t)MAX_PATH); @@ -251,62 +254,81 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr } } - // Set path to vendored ConEmu config file - PathCombine(cfgPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu.xml"); + PathCombine(windowsTerminalDir, exeDir, L"vendor\\windows-terminal"); + PathCombine(conEmuDir, exeDir, L"vendor\\conemu-maximus5"); - // Set path to Cmder default ConEmu config file - PathCombine(defaultCfgPath, exeDir, L"vendor\\ConEmu.xml.default"); + if (PathFileExists(windowsTerminalDir)) + { + // Set path to vendored ConEmu config file + PathCombine(cfgPath, windowsTerminalDir, L"settings\\settings.json"); - // Check for machine-specific then user config source file. - PathCombine(cpuCfgPath, userConfigDirPath, L"ConEmu-%COMPUTERNAME%.xml"); - ExpandEnvironmentStrings(cpuCfgPath, cpuCfgPath, sizeof(cpuCfgPath) / sizeof(cpuCfgPath[0])); + // Set path to Cmder default ConEmu config file + PathCombine(defaultCfgPath, exeDir, L"vendor\\windows_terminal_default_settings.json"); - // Set path to Cmder user ConEmu config file - PathCombine(userCfgPath, userConfigDirPath, L"user-ConEmu.xml"); + // Check for machine-specific then user config source file. + PathCombine(cpuCfgPath, userConfigDirPath, L"windows_terminal_%COMPUTERNAME%_settings.json"); + ExpandEnvironmentStrings(cpuCfgPath, cpuCfgPath, sizeof(cpuCfgPath) / sizeof(cpuCfgPath[0])); - if ( PathFileExists(cpuCfgPath) || use_user_cfg == false ) // config/ConEmu-%COMPUTERNAME%.xml file exists or /m was specified on command line, use machine specific config. + // Set path to Cmder user ConEmu config file + PathCombine(userCfgPath, userConfigDirPath, L"user_windows_terminal_settings.json"); + } + else + { + // Set path to vendored ConEmu config file + PathCombine(cfgPath, conEmuDir, L"ConEmu.xml"); + + // Set path to Cmder default ConEmu config file + PathCombine(defaultCfgPath, exeDir, L"vendor\\ConEmu.xml.default"); + + // Check for machine-specific then user config source file. + PathCombine(cpuCfgPath, userConfigDirPath, L"ConEmu-%COMPUTERNAME%.xml"); + ExpandEnvironmentStrings(cpuCfgPath, cpuCfgPath, sizeof(cpuCfgPath) / sizeof(cpuCfgPath[0])); + + // Set path to Cmder user ConEmu config file + PathCombine(userCfgPath, userConfigDirPath, L"user-ConEmu.xml"); + } + + if (PathFileExists(cpuCfgPath) || use_user_cfg == false) // config/ConEmu-%COMPUTERNAME%.xml file exists or /m was specified on command line, use machine specific config. { if (cfgRoot.length() == 0) // '/c [path]' was NOT specified { - if (PathFileExists(cfgPath)) // vendor/conemu-maximus5/ConEmu.xml file exists, copy vendor/conemu-maximus5/ConEmu.xml to config/ConEmu-%COMPUTERNAME%.xml. + if (!CopyFile(cfgPath, cpuCfgPath, FALSE)) { - if (!CopyFile(cfgPath, cpuCfgPath, FALSE)) - { + if (PathFileExists(windowsTerminalDir)) { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) - ? L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/ConEmu-%COMPUTERNAME%.xml! Access Denied." - : L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/ConEmu-%COMPUTERNAME%.xml!", MB_TITLE, MB_ICONSTOP); + ? L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/windows_terminal_%COMPUTERNAME%_settings.json! Access Denied." + : L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/windows_teerminal_%COMPUTERNAME%_settigns.json!", MB_TITLE, MB_ICONSTOP); exit(1); } - } - else // vendor/conemu-maximus5/ConEmu.xml config file does not exist, copy config/ConEmu-%COMPUTERNAME%.xml to vendor/conemu-maximus5/ConEmu.xml file - { - if (!CopyFile(cpuCfgPath, cfgPath, FALSE)) - { + else { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) - ? L"Failed to copy config/ConEmu-%COMPUTERNAME%.xml file to vendor/conemu-maximus5/ConEmu.xml! Access Denied." - : L"Failed to copy config/ConEmu-%COMPUTERNAME%.xml file to vendor/conemu-maximus5/ConEmu.xml!", MB_TITLE, MB_ICONSTOP); + ? L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/ConEmu-%COMPUTERNAME%.xml! Access Denied." + : L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/ConEmu-%COMPUTERNAME%.xml!", MB_TITLE, MB_ICONSTOP); exit(1); } } } - else // '/c [path]' was specified, don't copy anything and use existing conemu-%COMPUTERNAME%.xml to start comemu. + else // vendor/conemu-maximus5/ConEmu.xml config file does not exist, copy config/ConEmu-%COMPUTERNAME%.xml to vendor/conemu-maximus5/ConEmu.xml file { - if (use_user_cfg == false && PathFileExists(cfgPath) && !PathFileExists(cpuCfgPath)) // vendor/conemu-maximus5/ConEmu.xml file exists, copy vendor/conemu-maximus5/ConEmu.xml to config/ConEmu-%COMPUTERNAME%.xml. + if (!CopyFile(cpuCfgPath, cfgPath, FALSE)) { - if (!CopyFile(cfgPath, cpuCfgPath, FALSE)) - { + if (PathFileExists(windowsTerminalDir)) { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) - ? L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/ConEmu-%COMPUTERNAME%.xml! Access Denied." - : L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/ConEmu-%COMPUTERNAME%.xml!", MB_TITLE, MB_ICONSTOP); + ? L"Failed to copy config/windows_terminal_%COMPUTERNAME%_settings.json file to vendor/windows-terminal/settings/settings.json! Access Denied." + : L"Failed to copy config/windows_terminal_%COMPUTERNAME%_settings.json file to vendor/windows-terminal/settings/settings.json!", MB_TITLE, MB_ICONSTOP); + exit(1); + } + else { + MessageBox(NULL, + (GetLastError() == ERROR_ACCESS_DENIED) + ? L"Failed to copy config/ConEmu-%COMPUTERNAME%.xml file to vendor/conemu-maximus5/ConEmu.xml! Access Denied." + : L"Failed to copy config/ConEmu-%COMPUTERNAME%.xml file to vendor/conemu-maximus5/ConEmu.xml!", MB_TITLE, MB_ICONSTOP); exit(1); } } - - PathCombine(userConEmuCfgPath, userConfigDirPath, L"ConEmu-%COMPUTERNAME%.xml"); - ExpandEnvironmentStrings(userConEmuCfgPath, userConEmuCfgPath, sizeof(userConEmuCfgPath) / sizeof(userConEmuCfgPath[0])); } } else if (PathFileExists(userCfgPath)) // config/user_conemu.xml exists, use it. @@ -317,27 +339,46 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr { if (!CopyFile(cfgPath, userCfgPath, FALSE)) { - MessageBox(NULL, - (GetLastError() == ERROR_ACCESS_DENIED) - ? L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/user-conemu.xml! Access Denied." - : L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/user-conemu.xml!", MB_TITLE, MB_ICONSTOP); - exit(1); + if (PathFileExists(windowsTerminalDir)) { + MessageBox(NULL, + (GetLastError() == ERROR_ACCESS_DENIED) + ? L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/windows_terminal_settings.json! Access Denied." + : L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/windows_teerminal_settigns.json!", MB_TITLE, MB_ICONSTOP); + exit(1); + } + else + { + MessageBox(NULL, + (GetLastError() == ERROR_ACCESS_DENIED) + ? L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/user-conemu.xml! Access Denied." + : L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/user-conemu.xml!", MB_TITLE, MB_ICONSTOP); + exit(1); + } } } else // vendor/conemu-maximus5/ConEmu.xml does not exist, copy config/user-conemu.xml to vendor/conemu-maximus5/ConEmu.xml { if (!CopyFile(userCfgPath, cfgPath, FALSE)) { - MessageBox(NULL, - (GetLastError() == ERROR_ACCESS_DENIED) - ? L"Failed to copy config/user-conemu.xml file to vendor/conemu-maximus5/ConEmu.xml! Access Denied." - : L"Failed to copy config/user-conemu.xml file to vendor/conemu-maximus5/ConEmu.xml!", MB_TITLE, MB_ICONSTOP); - exit(1); + if (PathFileExists(windowsTerminalDir)) { + MessageBox(NULL, + (GetLastError() == ERROR_ACCESS_DENIED) + ? L"Failed to copy config/user_windows_terminal_settings.json file to vendor/windows-terminal/settings/settings.json! Access Denied." + : L"Failed to copy config/user_windows_terminal_settings.json file to vendor/windows-terminal/settings/settings.json!", MB_TITLE, MB_ICONSTOP); + exit(1); + } + else + { + MessageBox(NULL, + (GetLastError() == ERROR_ACCESS_DENIED) + ? L"Failed to copy config/user-conemu.xml file to vendor/conemu-maximus5/ConEmu.xml! Access Denied." + : L"Failed to copy config/user-conemu.xml file to vendor/conemu-maximus5/ConEmu.xml!", MB_TITLE, MB_ICONSTOP); + exit(1); + } } } } - else // '/c [path]' was specified, don't copy anything and use existing user_conemu.xml to start comemu. - { + else if (!PathFileExists(windowsTerminalDir)) { // '/c [path]' was specified, don't copy anything and use existing user_conemu.xml to start comemu. PathCombine(userConEmuCfgPath, userConfigDirPath, L"user-ConEmu.xml"); } } @@ -347,21 +388,41 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr { if (!CopyFile(cfgPath, userCfgPath, FALSE)) { - MessageBox(NULL, - (GetLastError() == ERROR_ACCESS_DENIED) - ? L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/user-conemu.xml! Access Denied." - : L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/user-conemu.xml!", MB_TITLE, MB_ICONSTOP); - exit(1); + if (PathFileExists(windowsTerminalDir)) { + MessageBox(NULL, + (GetLastError() == ERROR_ACCESS_DENIED) + ? L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/user_windows_terminal_settings.json! Access Denied." + : L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/user_windows_terminal_settigns.json!", MB_TITLE, MB_ICONSTOP); + exit(1); + } + else + { + MessageBox(NULL, + (GetLastError() == ERROR_ACCESS_DENIED) + ? L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/user-conemu.xml! Access Denied." + : L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/user-conemu.xml!", MB_TITLE, MB_ICONSTOP); + exit(1); + } } else // vendor/ConEmu.xml.default config exists, copy Cmder vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml. { if (!CopyFile(defaultCfgPath, cfgPath, FALSE)) { - MessageBox(NULL, - (GetLastError() == ERROR_ACCESS_DENIED) - ? L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml! Access Denied." - : L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml!", MB_TITLE, MB_ICONSTOP); - exit(1); + if (PathFileExists(windowsTerminalDir)) { + MessageBox(NULL, + (GetLastError() == ERROR_ACCESS_DENIED) + ? L"Failed to copy vendor/windows-terminal_default_settings_settings.json file to vendor/windows-terminal/settings/settings.json! Access Denied." + : L"Failed to copy vendor/windows-terminal_default_settings_settings.json file to vendor/windows-terminal/settings/settigns.json!", MB_TITLE, MB_ICONSTOP); + exit(1); + } + else + { + MessageBox(NULL, + (GetLastError() == ERROR_ACCESS_DENIED) + ? L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml! Access Denied." + : L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml!", MB_TITLE, MB_ICONSTOP); + exit(1); + } } } } @@ -380,11 +441,21 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr { if (!CopyFile(cfgPath, userCfgPath, FALSE)) { - MessageBox(NULL, - (GetLastError() == ERROR_ACCESS_DENIED) - ? L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/user-conemu.xml! Access Denied." - : L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/user-conemu.xml!", MB_TITLE, MB_ICONSTOP); - exit(1); + if (PathFileExists(windowsTerminalDir)) { + MessageBox(NULL, + (GetLastError() == ERROR_ACCESS_DENIED) + ? L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/user_windows_terminal_settings_settings.json! Access Denied." + : L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/user_windows_terminal_settings_settigns.json!", MB_TITLE, MB_ICONSTOP); + exit(1); + } + else + { + MessageBox(NULL, + (GetLastError() == ERROR_ACCESS_DENIED) + ? L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/user-conemu.xml! Access Denied." + : L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/user-conemu.xml!", MB_TITLE, MB_ICONSTOP); + exit(1); + } } PathCombine(userConEmuCfgPath, userConfigDirPath, L"user-ConEmu.xml"); @@ -393,51 +464,78 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr { if ( ! CopyFile(defaultCfgPath, userCfgPath, FALSE)) { - MessageBox(NULL, - (GetLastError() == ERROR_ACCESS_DENIED) - ? L"Failed to copy vendor/ConEmu.xml.default file to [user specified path]/config/user_ConEmu.xml! Access Denied." - : L"Failed to copy vendor/ConEmu.xml.default file to [user specified path]/config/user_ConEmu.xml!", MB_TITLE, MB_ICONSTOP); - exit(1); + if (PathFileExists(windowsTerminalDir)) { + MessageBox(NULL, + (GetLastError() == ERROR_ACCESS_DENIED) + ? L"Failed to copy vendor/windows-terminal_default_settings_settings.json file to [user specified path]/config/user_windows_terminal_settings.json! Access Denied." + : L"Failed to copy vendor/windows-terminal_default_settings_settings.json file to [user specified path]/config/user_windows_terminal_settings.json!", MB_TITLE, MB_ICONSTOP); + exit(1); + } + else + { + MessageBox(NULL, + (GetLastError() == ERROR_ACCESS_DENIED) + ? L"Failed to copy vendor/ConEmu.xml.default file to [user specified path]/config/user_ConEmu.xml! Access Denied." + : L"Failed to copy vendor/ConEmu.xml.default file to [user specified path]/config/user_ConEmu.xml!", MB_TITLE, MB_ICONSTOP); + exit(1); + } } PathCombine(userConEmuCfgPath, userConfigDirPath, L"user-ConEmu.xml"); } SYSTEM_INFO sysInfo; GetNativeSystemInfo(&sysInfo); - if (sysInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) - { - PathCombine(conEmuPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu64.exe"); + if (PathFileExists(windowsTerminalDir)) { + PathCombine(terminalPath, exeDir, L"vendor\\windows-terminal\\WindowsTerminal.exe"); } else { - PathCombine(conEmuPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu.exe"); + PathCombine(terminalPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu64.exe"); } - swprintf_s(args, L"%s /Icon \"%s\"", args, icoPath); + if (!PathFileExists(windowsTerminalDir)) { + swprintf_s(args, L"%s /Icon \"%s\"", args, icoPath); + } if (!streqi(cmderStart.c_str(), L"")) { - swprintf_s(args, L"%s /dir \"%s\"", args, cmderStart.c_str()); + if (PathFileExists(windowsTerminalDir)) { + swprintf_s(args, L"%s -d \"%s\"", args, cmderStart.c_str()); + } + else + { + swprintf_s(args, L"%s /dir \"%s\"", args, cmderStart.c_str()); + } } if (is_single_mode) { - swprintf_s(args, L"%s /single", args); + if (PathFileExists(windowsTerminalDir)) { + swprintf_s(args, L"%s -w 0 nt", args); + } + else + { + swprintf_s(args, L"%s /single", args); + } } if (!streqi(cmderTitle.c_str(), L"")) { - swprintf_s(args, L"%s /title \"%s\"", args, cmderTitle.c_str()); + if (!PathFileExists(windowsTerminalDir)) { + swprintf_s(args, L"%s /title \"%s\"", args, cmderTitle.c_str()); + } } if (cfgRoot.length() != 0) { - swprintf_s(args, L"%s -loadcfgfile \"%s\"", args, userConEmuCfgPath); + if (!PathFileExists(windowsTerminalDir)) { + swprintf_s(args, L"%s -loadcfgfile \"%s\"", args, userConEmuCfgPath); + } } - if (!streqi(cmderConEmuArgs.c_str(), L"")) + if (!streqi(cmderTerminalArgs.c_str(), L"")) { - swprintf_s(args, L"%s %s", args, cmderConEmuArgs.c_str()); + swprintf_s(args, L"%s %s", args, cmderTerminalArgs.c_str()); } // The `/run` arg and its value MUST be the last arg of ConEmu @@ -445,7 +543,13 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr // > This must be the last used switch (excepting -new_console and -cur_console) if (!streqi(cmderTask.c_str(), L"")) { - swprintf_s(args, L"%s /run {%s}", args, cmderTask.c_str()); + if (PathFileExists(windowsTerminalDir)) { + swprintf_s(args, L"%s -p \"%s\"", args, cmderTask.c_str()); + } + else + { + swprintf_s(args, L"%s /run {%s}", args, cmderTask.c_str()); + } } SetEnvironmentVariable(L"CMDER_ROOT", exeDir); @@ -465,8 +569,8 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr si.dwFlags = STARTF_TITLEISAPPID; #endif PROCESS_INFORMATION pi; - if (!CreateProcess(conEmuPath, args, NULL, NULL, false, 0, NULL, NULL, &si, &pi)) { - MessageBox(NULL, _T("Unable to create the ConEmu process!"), _T("Error"), MB_OK); + if (!CreateProcess(terminalPath, args, NULL, NULL, false, 0, NULL, NULL, &si, &pi)) { + MessageBox(NULL, _T("Unable to create the terminal process!"), _T("Error"), MB_OK); return; } @@ -586,7 +690,7 @@ struct cmderOptions std::wstring cmderTitle = L"Cmder"; std::wstring cmderIcon = L""; std::wstring cmderRegScope = L"USER"; - std::wstring cmderConEmuArgs = L""; + std::wstring cmderTerminalArgs = L""; bool cmderSingle = false; bool cmderUserCfg = true; bool registerApp = false; @@ -693,7 +797,7 @@ cmderOptions GetOption() /* Used for passing arguments to conemu prog */ else if (_wcsicmp(L"/x", szArgList[i]) == 0) { - cmderOptions.cmderConEmuArgs = szArgList[i + 1]; + cmderOptions.cmderTerminalArgs = szArgList[i + 1]; i++; } /* Bare double dash, remaining commandline is for conemu */ @@ -703,7 +807,7 @@ cmderOptions GetOption() auto doubledash = cmdline.find(L" -- "); if (doubledash != std::string::npos) { - cmderOptions.cmderConEmuArgs = cmdline.substr(doubledash + 4); + cmderOptions.cmderTerminalArgs = cmdline.substr(doubledash + 4); } break; } @@ -779,7 +883,7 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance, } else { - StartCmder(cmderOptions.cmderStart, cmderOptions.cmderSingle, cmderOptions.cmderTask, cmderOptions.cmderTitle, cmderOptions.cmderIcon, cmderOptions.cmderCfgRoot, cmderOptions.cmderUserCfg, cmderOptions.cmderConEmuArgs); + StartCmder(cmderOptions.cmderStart, cmderOptions.cmderSingle, cmderOptions.cmderTask, cmderOptions.cmderTitle, cmderOptions.cmderIcon, cmderOptions.cmderCfgRoot, cmderOptions.cmderUserCfg, cmderOptions.cmderTerminalArgs); } return 0; diff --git a/scripts/build.ps1 b/scripts/build.ps1 index cab884948..739bc4f2d 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -55,13 +55,16 @@ Param( # Using this option will skip all downloads, if you only need to build launcher [switch]$noVendor, + + # Using this option will specify the emulator to use [conemu-maximus5, or windows-terminal] + [string]$emulator = 'conemu-maximus5', # Build launcher if you have MSBuild tools installed [switch]$Compile ) # Get the scripts and cmder root dirs we are building in. -$cmder_root = Resolve-Path "$PSScriptRoot\.." +$cmder_root = [string](Resolve-Path "$PSScriptRoot\..") # Dot source util functions into this scope . "$PSScriptRoot\utils.ps1" @@ -113,6 +116,18 @@ if (-not $noVendor) { } else { $ConEmuXml = "" } + # Preserve modified (by user) Windows Terminal setting file + if ($config -ne "") { + $WinTermSettingsJson = Join-Path $saveTo "windows-terminal\settings\settings.json" + if (Test-Path $WinTermSettingsJson -pathType leaf) { + $WinTermSettingsJsonSave = Join-Path $config "windows_terminal_settings.json" + Write-Verbose "Backup '$WinTermSettingsJson' to '$WinTermSettingsJsonSave'" + Copy-Item $WinTermSettingsJson $WinTermSettingsJsonSave + } + else { $WinTermSettingsJson = "" } + } + else { $WinTermSettingsJson = "" } + # Kill ssh-agent.exe if it is running from the $env:cmder_root we are building foreach ($ssh_agent in $(Get-Process ssh-agent -ErrorAction SilentlyContinue)) { if ([string]$($ssh_agent.path) -Match [string]$cmder_root.replace('\', '\\')) { @@ -122,6 +137,12 @@ if (-not $noVendor) { } foreach ($s in $sources) { + if ($s.name -eq "conemu-maximus5" -and $emulator -eq "windows-terminal") { + return + } elseif ($s.name -eq "windows-terminal" -and $emulator -eq "conemu-maximus5") { + return + } + Write-Verbose "Getting vendored $($s.name) $($s.version)..." # We do not care about the extensions/type of archive @@ -146,6 +167,18 @@ if (-not $noVendor) { Copy-Item $ConEmuXmlSave $ConEmuXml } + # Restore Windows Terminal user configuration + if ($WinTermSettingsJson -ne "") { + Write-Verbose "Restore '$WinTermSettingsJsonSave' to '$WinTermSettingsJson'" + Copy-Item $WinTermSettingsJsonSave $WinTermSettingsJson + } + + # Make Embedded Windows Terminal Portable + if ($emulator -eq "windows-terminal") { + New-Item -Type Directory -Path (Join-Path $saveTo "/windows-terminal/settings") -ErrorAction SilentlyContinue >$null + New-Item -Type leaf -Path (Join-Path $saveTo "/windows-terminal/.portable") -ErrorAction SilentlyContinue >$null + } + # Put vendor\cmder.sh in /etc/profile.d so it runs when we start bash or mintty if ( (Test-Path $($saveTo + "git-for-windows/etc/profile.d") ) ) { Write-Verbose "Adding cmder.sh /etc/profile.d" diff --git a/vendor/windows_terminal_default_settings.json b/vendor/windows_terminal_default_settings.json new file mode 100644 index 000000000..85bf79b41 --- /dev/null +++ b/vendor/windows_terminal_default_settings.json @@ -0,0 +1,388 @@ +{ + "$help": "https://aka.ms/terminal-documentation", + "$schema": "https://aka.ms/terminal-profiles-schema", + "actions": + [ + { + "command": + { + "action": "copy", + "singleLine": false + }, + "keys": "ctrl+shift+c" + }, + { + "command": "paste" + }, + { + "command": "find", + "keys": "ctrl+shift+f" + }, + { + "command": "unbound", + "keys": "ctrl+v" + }, + { + "command": "unbound", + "keys": "ctrl+c" + }, + { + "command": + { + "action": "splitPane", + "split": "auto", + "splitMode": "duplicate" + }, + "keys": "alt+shift+d" + } + ], + "copyFormatting": "none", + "copyOnSelect": true, + "defaultProfile": "{48946353-ebe8-4571-a591-7d609f31327a}", + "newTabMenu": + [ + { + "type": "remainingProfiles" + } + ], + "profiles": + { + "defaults": {}, + "list": + [ + { + "colorScheme": "Campbell", + "commandline": "cmd /k \"%CMDER_ROOT%\\vendor\\init.bat\" /t", + "guid": "{48946353-ebe8-4571-a591-7d609f31327a}", + "hidden": false, + "icon": "%CMDER_ROOT%\\icons\\cmder.ico", + "name": "Cmder", + "startingDirectory": "", + "tabTitle": "Cmder", + "useAtlasEngine": false + }, + { + "commandline": "%SystemRoot%\\System32\\cmd.exe /k \"%CMDER_ROOT%\\vendor\\init.bat\"", + "elevate": true, + "guid": "{bdd957d0-c15a-49e6-9816-14b02351a071}", + "hidden": false, + "icon": "%CMDER_ROOT%\\icons\\cmder_red.ico", + "name": "Cmder as Admin", + "startingDirectory": "", + "tabTitle": "Cmder as Admin" + }, + { + "colorScheme": "Campbell", + "commandline": "PowerShell -ExecutionPolicy Bypass -NoLogo -NoProfile -NoExit -Command \"Invoke-Expression 'Import-Module ''%CMDER_ROOT%\\vendor.\\profile.ps1'''\"", + "guid": "{eb1f6578-ce9d-47a9-a8c7-9b3fdd22302d}", + "hidden": false, + "icon": "%CMDER_ROOT%\\icons\\cmder_orange.ico", + "name": "Cmder - Powershell", + "startingDirectory": "", + "tabTitle": "Cmder", + "useAtlasEngine": false + }, + { + "colorScheme": "Campbell", + "commandline": "PowerShell -ExecutionPolicy Bypass -NoLogo -NoProfile -NoExit -Command \"Invoke-Expression 'Import-Module ''%CMDER_ROOT%\\vendor.\\profile.ps1'''\"", + "elevate": true, + "guid": "{c5225c3e-8619-4145-8182-2800814eeb17}", + "hidden": false, + "icon": "%CMDER_ROOT%\\icons\\cmder_purple.ico", + "name": "Cmder - Powershell as Admin", + "startingDirectory": "", + "tabTitle": "Cmder - PowerShell as Admin", + "useAtlasEngine": false + }, + { + "commandline": "%CMDER_ROOT%\\vendor\\start_git_bash.cmd", + "guid": "{c5c298e9-010e-4b8c-bc55-e3df81846b4c}", + "hidden": false, + "icon": "%CMDER_ROOT%\\icons\\cmder_blue.ico", + "name": "Cmder - Bash", + "startingDirectory": "", + "tabTitle": "Cmder - Bash" + }, + { + "commandline": "%CMDER_ROOT%\\vendor\\start_git_bash.cmd", + "elevate": true, + "guid": "{545eb9ed-4c1c-49b3-8cc6-7eb41bd280ff}", + "hidden": false, + "icon": "%CMDER_ROOT%\\icons\\cmder_yellow.ico", + "name": "Cmder - Bash as Admin", + "startingDirectory": "", + "tabTitle": "Cmder - Bash as Admin" + }, + { + "commandline": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe", + "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", + "hidden": false, + "name": "Windows PowerShell" + }, + { + "commandline": "%SystemRoot%\\System32\\cmd.exe", + "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}", + "hidden": false, + "name": "Command Prompt" + } + + ] + }, + "schemes": + [ + { + "background": "#0C0C0C", + "black": "#0C0C0C", + "blue": "#0037DA", + "brightBlack": "#767676", + "brightBlue": "#3B78FF", + "brightCyan": "#61D6D6", + "brightGreen": "#16C60C", + "brightPurple": "#B4009E", + "brightRed": "#E74856", + "brightWhite": "#F2F2F2", + "brightYellow": "#F9F1A5", + "cursorColor": "#FFFFFF", + "cyan": "#3A96DD", + "foreground": "#CCCCCC", + "green": "#13A10E", + "name": "Campbell", + "purple": "#881798", + "red": "#C50F1F", + "selectionBackground": "#FFFFFF", + "white": "#CCCCCC", + "yellow": "#C19C00" + }, + { + "background": "#012456", + "black": "#0C0C0C", + "blue": "#0037DA", + "brightBlack": "#767676", + "brightBlue": "#3B78FF", + "brightCyan": "#61D6D6", + "brightGreen": "#16C60C", + "brightPurple": "#B4009E", + "brightRed": "#E74856", + "brightWhite": "#F2F2F2", + "brightYellow": "#F9F1A5", + "cursorColor": "#FFFFFF", + "cyan": "#3A96DD", + "foreground": "#CCCCCC", + "green": "#13A10E", + "name": "Campbell Powershell", + "purple": "#881798", + "red": "#C50F1F", + "selectionBackground": "#FFFFFF", + "white": "#CCCCCC", + "yellow": "#C19C00" + }, + { + "background": "#282C34", + "black": "#282C34", + "blue": "#61AFEF", + "brightBlack": "#5A6374", + "brightBlue": "#61AFEF", + "brightCyan": "#56B6C2", + "brightGreen": "#98C379", + "brightPurple": "#C678DD", + "brightRed": "#E06C75", + "brightWhite": "#DCDFE4", + "brightYellow": "#E5C07B", + "cursorColor": "#FFFFFF", + "cyan": "#56B6C2", + "foreground": "#DCDFE4", + "green": "#98C379", + "name": "One Half Dark", + "purple": "#C678DD", + "red": "#E06C75", + "selectionBackground": "#FFFFFF", + "white": "#DCDFE4", + "yellow": "#E5C07B" + }, + { + "background": "#FAFAFA", + "black": "#383A42", + "blue": "#0184BC", + "brightBlack": "#4F525D", + "brightBlue": "#61AFEF", + "brightCyan": "#56B5C1", + "brightGreen": "#98C379", + "brightPurple": "#C577DD", + "brightRed": "#DF6C75", + "brightWhite": "#FFFFFF", + "brightYellow": "#E4C07A", + "cursorColor": "#4F525D", + "cyan": "#0997B3", + "foreground": "#383A42", + "green": "#50A14F", + "name": "One Half Light", + "purple": "#A626A4", + "red": "#E45649", + "selectionBackground": "#FFFFFF", + "white": "#FAFAFA", + "yellow": "#C18301" + }, + { + "background": "#002B36", + "black": "#002B36", + "blue": "#268BD2", + "brightBlack": "#073642", + "brightBlue": "#839496", + "brightCyan": "#93A1A1", + "brightGreen": "#586E75", + "brightPurple": "#6C71C4", + "brightRed": "#CB4B16", + "brightWhite": "#FDF6E3", + "brightYellow": "#657B83", + "cursorColor": "#FFFFFF", + "cyan": "#2AA198", + "foreground": "#839496", + "green": "#859900", + "name": "Solarized Dark", + "purple": "#D33682", + "red": "#DC322F", + "selectionBackground": "#FFFFFF", + "white": "#EEE8D5", + "yellow": "#B58900" + }, + { + "background": "#FDF6E3", + "black": "#002B36", + "blue": "#268BD2", + "brightBlack": "#073642", + "brightBlue": "#839496", + "brightCyan": "#93A1A1", + "brightGreen": "#586E75", + "brightPurple": "#6C71C4", + "brightRed": "#CB4B16", + "brightWhite": "#FDF6E3", + "brightYellow": "#657B83", + "cursorColor": "#002B36", + "cyan": "#2AA198", + "foreground": "#657B83", + "green": "#859900", + "name": "Solarized Light", + "purple": "#D33682", + "red": "#DC322F", + "selectionBackground": "#FFFFFF", + "white": "#EEE8D5", + "yellow": "#B58900" + }, + { + "background": "#000000", + "black": "#000000", + "blue": "#3465A4", + "brightBlack": "#555753", + "brightBlue": "#729FCF", + "brightCyan": "#34E2E2", + "brightGreen": "#8AE234", + "brightPurple": "#AD7FA8", + "brightRed": "#EF2929", + "brightWhite": "#EEEEEC", + "brightYellow": "#FCE94F", + "cursorColor": "#FFFFFF", + "cyan": "#06989A", + "foreground": "#D3D7CF", + "green": "#4E9A06", + "name": "Tango Dark", + "purple": "#75507B", + "red": "#CC0000", + "selectionBackground": "#FFFFFF", + "white": "#D3D7CF", + "yellow": "#C4A000" + }, + { + "background": "#FFFFFF", + "black": "#000000", + "blue": "#3465A4", + "brightBlack": "#555753", + "brightBlue": "#729FCF", + "brightCyan": "#34E2E2", + "brightGreen": "#8AE234", + "brightPurple": "#AD7FA8", + "brightRed": "#EF2929", + "brightWhite": "#EEEEEC", + "brightYellow": "#FCE94F", + "cursorColor": "#000000", + "cyan": "#06989A", + "foreground": "#555753", + "green": "#4E9A06", + "name": "Tango Light", + "purple": "#75507B", + "red": "#CC0000", + "selectionBackground": "#FFFFFF", + "white": "#D3D7CF", + "yellow": "#C4A000" + }, + { + "background": "#000000", + "black": "#000000", + "blue": "#000080", + "brightBlack": "#808080", + "brightBlue": "#0000FF", + "brightCyan": "#00FFFF", + "brightGreen": "#00FF00", + "brightPurple": "#FF00FF", + "brightRed": "#FF0000", + "brightWhite": "#FFFFFF", + "brightYellow": "#FFFF00", + "cursorColor": "#FFFFFF", + "cyan": "#008080", + "foreground": "#C0C0C0", + "green": "#008000", + "name": "Vintage", + "purple": "#800080", + "red": "#800000", + "selectionBackground": "#FFFFFF", + "white": "#C0C0C0", + "yellow": "#808000" + } + ], + "themes": + [ + { + "name": "legacyDark", + "tab": + { + "background": null, + "showCloseButton": "always", + "unfocusedBackground": null + }, + "window": + { + "applicationTheme": "dark", + "useMica": false + } + }, + { + "name": "legacyLight", + "tab": + { + "background": null, + "showCloseButton": "always", + "unfocusedBackground": null + }, + "window": + { + "applicationTheme": "light", + "useMica": false + } + }, + { + "name": "legacySystem", + "tab": + { + "background": null, + "showCloseButton": "always", + "unfocusedBackground": null + }, + "window": + { + "applicationTheme": "system", + "useMica": false + } + } + ], + "useAcrylicInTabRow": true, + "wordDelimiters": " ()\"',;<>!@#$%^&*|+=[]{}~?\u2502" +} From 74c183c2a7fcc980948454d9e9d0c1a449fe7be5 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Mon, 25 Sep 2023 11:26:42 -0400 Subject: [PATCH 025/203] Add initial Windows Terminal support --- launcher/src/CmderLauncher.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index eb04b49d0..ea8ccc00f 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -510,11 +510,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr if (is_single_mode) { - if (PathFileExists(windowsTerminalDir)) { - swprintf_s(args, L"%s -w 0 nt", args); - } - else - { + if (!PathFileExists(windowsTerminalDir)) { swprintf_s(args, L"%s /single", args); } } @@ -750,21 +746,21 @@ cmderOptions GetOption() cmderOptions.cmderTask = szArgList[i + 1]; i++; } - else if (_wcsicmp(L"/title", szArgList[i]) == 0) + else if (_wcsicmp(L"/title", szArgList[i]) == 0 && !PathFileExists(windowsTerminalDir)) { cmderOptions.cmderTitle = szArgList[i + 1]; i++; } - else if (_wcsicmp(L"/icon", szArgList[i]) == 0) + else if (_wcsicmp(L"/icon", szArgList[i]) == 0 && !PathFileExists(windowsTerminalDir)) { cmderOptions.cmderIcon = szArgList[i + 1]; i++; } - else if (_wcsicmp(L"/single", szArgList[i]) == 0) + else if (_wcsicmp(L"/single", szArgList[i]) == 0 && !PathFileExists(windowsTerminalDir)) { { cmderOptions.cmderSingle = true; } - else if (_wcsicmp(L"/m", szArgList[i]) == 0) + else if (_wcsicmp(L"/m", szArgList[i]) == 0 && !PathFileExists(windowsTerminalDir)) { cmderOptions.cmderUserCfg = false; } From 2728f363024187ad03d0bb525bbc37a8e6bb31cd Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Mon, 25 Sep 2023 11:44:09 -0400 Subject: [PATCH 026/203] fix --- launcher/src/CmderLauncher.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index ea8ccc00f..1db17916a 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -624,11 +624,11 @@ void RegisterShellMenu(std::wstring opt, wchar_t* keyBaseName, std::wstring cfgR wchar_t commandStr[MAX_PATH + 20] = { 0 }; wchar_t baseCommandStr[MAX_PATH + 20] = { 0 }; - if (!single) { - swprintf_s(baseCommandStr, L"\"%s\"", exePath); + if (single && !PathFileExists(windowsTerminalDir)) { + swprintf_s(baseCommandStr, L"\"%s\" /single", exePath); } else { - swprintf_s(baseCommandStr, L"\"%s\" /single", exePath); + swprintf_s(baseCommandStr, L"\"%s\"", exePath); } if (cfgRoot.length() == 0) // '/c [path]' was NOT specified @@ -756,7 +756,7 @@ cmderOptions GetOption() cmderOptions.cmderIcon = szArgList[i + 1]; i++; } - else if (_wcsicmp(L"/single", szArgList[i]) == 0 && !PathFileExists(windowsTerminalDir)) { + else if (_wcsicmp(L"/single", szArgList[i]) == 0 && !PathFileExists(windowsTerminalDir)) { cmderOptions.cmderSingle = true; } From 7db6297347a94a747f382b6b260840d8204c1793 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Mon, 25 Sep 2023 11:57:33 -0400 Subject: [PATCH 027/203] fix --- launcher/src/CmderLauncher.cpp | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index 1db17916a..95b74320d 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -624,7 +624,7 @@ void RegisterShellMenu(std::wstring opt, wchar_t* keyBaseName, std::wstring cfgR wchar_t commandStr[MAX_PATH + 20] = { 0 }; wchar_t baseCommandStr[MAX_PATH + 20] = { 0 }; - if (single && !PathFileExists(windowsTerminalDir)) { + if (single) { swprintf_s(baseCommandStr, L"\"%s\" /single", exePath); } else { @@ -700,6 +700,9 @@ cmderOptions GetOption() LPWSTR *szArgList; int argCount; + wchar_t windowsTerminalDir[MAX_PATH] = { 0 }; + PathCombine(windowsTerminalDir, exeDir, L"vendor\\windows-terminal"); + szArgList = CommandLineToArgvW(GetCommandLine(), &argCount); for (int i = 1; i < argCount; i++) @@ -859,12 +862,24 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance, cmderOptions cmderOptions = GetOption(); + wchar_t windowsTerminalDir[MAX_PATH] = { 0 }; + PathCombine(windowsTerminalDir, exeDir, L"vendor\\windows-terminal"); + if (cmderOptions.registerApp == true) { - RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_PATH_BACKGROUND, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle); - RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_PATH_LISTITEM, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle); - RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_DRIVE_PATH_BACKGROUND, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle); - RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_DRIVE_PATH_LISTITEM, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle); + if (PathFileExists(windowsTerminalDir) { + RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_PATH_BACKGROUND, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle); + RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_PATH_LISTITEM, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle); + RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_DRIVE_PATH_BACKGROUND, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle); + RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_DRIVE_PATH_LISTITEM, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle); + { + else + { + RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_PATH_BACKGROUND, cmderOptions.cmderCfgRoot, false); + RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_PATH_LISTITEM, cmderOptions.cmderCfgRoot, false); + RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_DRIVE_PATH_BACKGROUND, cmderOptions.cmderCfgRoot, false); + RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_DRIVE_PATH_LISTITEM, cmderOptions.cmderCfgRoot, false); + } } else if (cmderOptions.unRegisterApp == true) { From 759d0edd812ec07b35bb1f2310cd685f59cb4317 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Mon, 25 Sep 2023 12:02:57 -0400 Subject: [PATCH 028/203] fix --- launcher/src/CmderLauncher.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index 95b74320d..73e006a13 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -701,6 +701,11 @@ cmderOptions GetOption() int argCount; wchar_t windowsTerminalDir[MAX_PATH] = { 0 }; + wchar_t exeDir[MAX_PATH] = { 0 }; + + GetModuleFileName(NULL, exeDir, sizeof(exeDir)); + PathRemoveFileSpec(exeDir); + PathCombine(windowsTerminalDir, exeDir, L"vendor\\windows-terminal"); szArgList = CommandLineToArgvW(GetCommandLine(), &argCount); @@ -863,7 +868,12 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance, cmderOptions cmderOptions = GetOption(); wchar_t windowsTerminalDir[MAX_PATH] = { 0 }; - PathCombine(windowsTerminalDir, exeDir, L"vendor\\windows-terminal"); + wchar_t exeDir[MAX_PATH] = { 0 }; + + GetModuleFileName(NULL, exeDir, sizeof(exeDir)); + PathRemoveFileSpec(exeDir); + + PathCombine(windowsTerminalDir, exeDir, L"vendor\\windows-terminal"); if (cmderOptions.registerApp == true) { From 63bab369cfea59f8ada0eedd225a79dda9a1f728 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Mon, 25 Sep 2023 12:06:24 -0400 Subject: [PATCH 029/203] fix --- launcher/src/CmderLauncher.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index 73e006a13..623494570 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -882,7 +882,7 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance, RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_PATH_LISTITEM, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle); RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_DRIVE_PATH_BACKGROUND, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle); RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_DRIVE_PATH_LISTITEM, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle); - { + } else { RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_PATH_BACKGROUND, cmderOptions.cmderCfgRoot, false); From 7fa041dd7f29340dfe92a4379e1ae64a6908d1f8 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Mon, 25 Sep 2023 12:13:42 -0400 Subject: [PATCH 030/203] fix --- launcher/src/CmderLauncher.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index 623494570..8fe3b7e66 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -877,7 +877,8 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance, if (cmderOptions.registerApp == true) { - if (PathFileExists(windowsTerminalDir) { + if (PathFileExists(windowsTerminalDir)) + { RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_PATH_BACKGROUND, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle); RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_PATH_LISTITEM, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle); RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_DRIVE_PATH_BACKGROUND, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle); From 7d3e691a69a2131c3eca563051520256ce32b8e5 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Mon, 25 Sep 2023 14:04:12 -0400 Subject: [PATCH 031/203] add start_git_bash.cmd --- vendor/start_git_bash.cmd | 51 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 vendor/start_git_bash.cmd diff --git a/vendor/start_git_bash.cmd b/vendor/start_git_bash.cmd new file mode 100644 index 000000000..679c5af9e --- /dev/null +++ b/vendor/start_git_bash.cmd @@ -0,0 +1,51 @@ +@echo off + +if not defined CMDER_ROOT ( + if defined ConEmuDir ( + for /f "delims=" %%i in ("%ConEmuDir%\..\..") do ( + set "CMDER_ROOT=%%~fi" + ) + ) else ( + for /f "delims=" %%i in ("%~dp0\..") do ( + set "CMDER_ROOT=%%~fi" + ) + ) +) + +if defined ConEmuDir ( + set "gitCommand=--command=%ConEmuBaseDirShort%\conemu-msys2-64.exe" +) + +if exist "%CMDER_ROOT%\vendor\git-for-windows" ( + set "PATH=%CMDER_ROOT%\vendor\git-for-windows\usr\bin;%PATH%" + set "gitCmd=%CMDER_ROOT%\vendor\git-for-windows\git-cmd.exe" + set "bashCmd=%CMDER_ROOT%\vendor\git-for-windows\usr\bin\bash.exe" +) else if exist "%ProgramFiles%\git" ( + set "PATH=%ProgramFiles%\git\usr\bin;%PATH%" + set "gitCmd=%ProgramFiles%\git\git-cmd.exe" + set "bashCmd=%ProgramFiles%\git\usr\bin\bash.exe" + if not exist "%ProgramFiles%\git\etc\profile.d\cmder_exinit.sh" ( + echo Run 'mklink "%ProgramFiles%\git\etc\profile.d\cmder_exinit.sh" "%CMDER_ROOT%\vendor\cmder_exinit"' in 'cmd::Cmder as Admin' to use Cmder with external Git Bash + echo. + echo or + echo. + echo Run 'echo "" ^> "%ProgramFiles%\git\etc\profile.d\cmder_exinit.sh"' in 'cmd::Cmder as Admin' to disable this message. + ) +) else if exist "%ProgramFiles(x86)%\git" ( + set "PATH=%ProgramFiles(x86)%\git\usr\bin;%PATH%" + set "gitCmd=%ProgramFiles(x86)%\git\git-cmd.exe" + set "bashCmd=%ProgramFiles(x86)%\git\usr\bin\bash.exe" + if not exist "%ProgramFiles(x86)%\git\etc\profile.d\cmder_exinit.sh" ( + echo Run 'mklink "%ProgramFiles^(x86^)%\git\etc\profile.d\cmder_exinit.sh" "%CMDER_ROOT%\vendor\cmder_exinit"' in 'cmd::Cmder as Admin' to use Cmder with external Git Bash + echo. + echo or + echo. + echo Run 'echo "" ^> "%ProgramFiles^(x86^)%\git\etc\profile.d\cmder_exinit.sh"' in 'cmd::Cmder as Admin' to disable this message. + ) +) + +if defined ConEmuDir ( + "%gitCmd%" --no-cd %gitCommand% "%bashCmd%" --login -i +) else ( + "%bashCmd%" --login -i +) From 8bb2c5d5871dfc927ffc44c5e621a832c0431db0 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Mon, 25 Sep 2023 14:10:05 -0400 Subject: [PATCH 032/203] Update Cmder command line help --- launcher/src/strings.rc2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launcher/src/strings.rc2 b/launcher/src/strings.rc2 index 088730753..ebf3f360f 100644 --- a/launcher/src/strings.rc2 +++ b/launcher/src/strings.rc2 @@ -6,7 +6,7 @@ STRINGTABLE { IDS_TITLE "Cmder Launcher" - IDS_SWITCHES L"Valid options:\n\n /c [CMDER User Root Path]\n /task [ConEmu Task Name]\n /icon [CMDER Icon Path]\n [/start [Start in Path] | [Start in Path]]\n /single\n /m\n /x [ConEmu extra arguments]\n\nor, either:\n /register [USER | ALL]\n /unregister [USER | ALL]" + IDS_SWITCHES L"Valid options:\n\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\nor, either:\n /register [USER | ALL]\n /unregister [USER | ALL]" } ///////////////////////////////////////////////////////////////////////////// From e24f653d244c74255796b627ca2e6e1ab28ce2a3 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Mon, 25 Sep 2023 14:26:53 -0400 Subject: [PATCH 033/203] add pack code for windows terminal releases --- scripts/pack.ps1 | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/scripts/pack.ps1 b/scripts/pack.ps1 index 418fdcd22..3a2236d66 100644 --- a/scripts/pack.ps1 +++ b/scripts/pack.ps1 @@ -31,6 +31,9 @@ Param( # Path to the vendor configuration source file [string]$cmderRoot = "$PSScriptRoot\..", + # Using this option will pack artifacts for a specific included terminal emulator [conemu-maximus5, or windows-terminal] + [string]$emulator = 'conemu-maximus5', + # Vendor folder locaton [string]$saveTo = "$PSScriptRoot\..\build" ) @@ -41,10 +44,16 @@ $cmderRoot = Resolve-Path $cmderRoot $ErrorActionPreference = "Stop" Ensure-Executable "7z" -$targets = @{ - "cmder.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on"; - "cmder.zip" = "-mm=Deflate -mfb=128 -mpass=3"; - "cmder_mini.zip" = "-xr!`"vendor\git-for-windows`""; +if ($emulator -eq "windows-terminal") { + $targets = @{ + "cmder_wt.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on"; + "cmder_wt.zip" = "-mm=Deflate -mfb=128 -mpass=3"; + "cmder_wt_mini.zip" = "-xr!`"vendor\git-for-windows`""; +} else { + $targets = @{ + "cmder.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on"; + "cmder.zip" = "-mm=Deflate -mfb=128 -mpass=3"; + "cmder_mini.zip" = "-xr!`"vendor\git-for-windows`""; } Push-Location -Path $cmderRoot From ab10e83d958ce5fa8187883c17f1425d3ae8a113 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Mon, 25 Sep 2023 14:47:20 -0400 Subject: [PATCH 034/203] sync and add windows terminal to sources. --- vendor/sources.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vendor/sources.json b/vendor/sources.json index c015d7860..892190687 100644 --- a/vendor/sources.json +++ b/vendor/sources.json @@ -1,4 +1,9 @@ [ + { + "name": "windows-terminal", + "version": "1.17.11461.0", + "url": "https://github.com/microsoft/terminal/releases/download/v1.17.11461.0/Microsoft.WindowsTerminal_1.17.11461.0_x64.zip" + }, { "name": "git-for-windows", "version": "2.42.0.windows.2", From ad219159191292eb6e805768cb029af1711c8fae Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Mon, 25 Sep 2023 15:59:10 -0400 Subject: [PATCH 035/203] Add pack code for windows terminal --- .github/workflows/build.yml | 31 +++++++++++++++++++++++++++++-- packignore | 1 + scripts/build.ps1 | 20 ++++++++++++-------- scripts/pack.ps1 | 14 ++++++++------ 4 files changed, 50 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 148ad6190..bc3075ff7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -47,10 +47,34 @@ jobs: working-directory: scripts run: .\build.ps1 -Compile -verbose - - name: Pack the built files + - name: Pack the built files with Windows Terminal shell: pwsh working-directory: scripts - run: .\pack.ps1 -verbose + run: .\pack.ps1 -verbose -emulator windows-terminal + + - name: Pack the built files with ConEmu + shell: pwsh + working-directory: scripts + run: .\pack.ps1 -verbose -emulator conemu + + - name: Upload artifact (cmder_wt.zip) + uses: actions/upload-artifact@v3 + with: + path: build/cmder_wt.zip + name: cmder_wt.zip + if-no-files-found: error + + - name: Upload artifact (cmder_wt.7z) + uses: actions/upload-artifact@v3 + with: + path: build/cmder_wt.7z + name: cmder_wt.7z + + - name: Upload artifact (cmder_wt_mini.zip) + uses: actions/upload-artifact@v3 + with: + path: build/cmder_wt_mini.zip + name: cmder_wt_mini.zip - name: Upload artifact (cmder.zip) uses: actions/upload-artifact@v3 @@ -82,8 +106,11 @@ jobs: with: files: | build/cmder.zip + build/cmder_wt.zip build/cmder.7z + build/cmder_wt.7z build/cmder_mini.zip + build/cmder_wt_mini.zip build/hashes.txt draft: true generate_release_notes: true diff --git a/packignore b/packignore index 1fd4315d4..7059f3cc3 100644 --- a/packignore +++ b/packignore @@ -23,5 +23,6 @@ appveyor.yml vendor\cmder.sh vendor\git-prompt.sh config\user-* +config\user_* clink_history* *.log diff --git a/scripts/build.ps1 b/scripts/build.ps1 index 739bc4f2d..e82193eca 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -56,8 +56,8 @@ Param( # Using this option will skip all downloads, if you only need to build launcher [switch]$noVendor, - # Using this option will specify the emulator to use [conemu-maximus5, or windows-terminal] - [string]$emulator = 'conemu-maximus5', + # Using this option will specify the emulator to use [all, conemu-maximus5, or windows-terminal] + [string]$emulator = 'all', # Build launcher if you have MSBuild tools installed [switch]$Compile @@ -153,6 +153,16 @@ if (-not $noVendor) { Download-File -Url $s.url -File $vend\$tempArchive -ErrorAction Stop Extract-Archive $tempArchive $s.name + # Make Embedded Windows Terminal Portable + if ($s.name -eq "windows-terminal") { + $windowTerminalFiles = resolve-path ($saveTo + "\" + $s.name + "\terminal*") + move-item -ErrorAction SilentlyContinue $windowTerminalFiles\* $s.name >$null + remove-item -ErrorAction SilentlyContinue $windowTerminalFiles >$null + write-verbose "Making Windows Terminal Portable..." + New-Item -Type Directory -Path (Join-Path $saveTo "/windows-terminal/settings") -ErrorAction SilentlyContinue >$null + New-Item -Type File -Path (Join-Path $saveTo "/windows-terminal/.portable") -ErrorAction SilentlyContinue >$null + } + if ((Get-ChildItem $s.name).Count -eq 1) { Flatten-Directory($s.name) } @@ -173,12 +183,6 @@ if (-not $noVendor) { Copy-Item $WinTermSettingsJsonSave $WinTermSettingsJson } - # Make Embedded Windows Terminal Portable - if ($emulator -eq "windows-terminal") { - New-Item -Type Directory -Path (Join-Path $saveTo "/windows-terminal/settings") -ErrorAction SilentlyContinue >$null - New-Item -Type leaf -Path (Join-Path $saveTo "/windows-terminal/.portable") -ErrorAction SilentlyContinue >$null - } - # Put vendor\cmder.sh in /etc/profile.d so it runs when we start bash or mintty if ( (Test-Path $($saveTo + "git-for-windows/etc/profile.d") ) ) { Write-Verbose "Adding cmder.sh /etc/profile.d" diff --git a/scripts/pack.ps1 b/scripts/pack.ps1 index 3a2236d66..9cd2cb768 100644 --- a/scripts/pack.ps1 +++ b/scripts/pack.ps1 @@ -46,14 +46,16 @@ Ensure-Executable "7z" if ($emulator -eq "windows-terminal") { $targets = @{ - "cmder_wt.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on"; - "cmder_wt.zip" = "-mm=Deflate -mfb=128 -mpass=3"; - "cmder_wt_mini.zip" = "-xr!`"vendor\git-for-windows`""; + "cmder_wt.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on -xr!`"vendor\conemu-maximus5`""; + "cmder_wt.zip" = "-mm=Deflate -mfb=128 -mpass=3 -xr!`"vendor\conemu-maximus5`""; + "cmder_wt_mini.zip" = "-xr!`"vendor\git-for-windows`" -xr!`"vendor\conemu-maximus5`""; + } } else { $targets = @{ - "cmder.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on"; - "cmder.zip" = "-mm=Deflate -mfb=128 -mpass=3"; - "cmder_mini.zip" = "-xr!`"vendor\git-for-windows`""; + "cmder.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on -xr!`"vendor\windows-terminal`""; + "cmder.zip" = "-mm=Deflate -mfb=128 -mpass=3 -xr!`"vendor\windows-terminal`""; + "cmder_mini.zip" = "-xr!`"vendor\git-for-windows`" -xr!`"vendor\windows-terminal`""; + } } Push-Location -Path $cmderRoot From 3671a6e13c50c946926f8d02762885676af419ec Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Mon, 25 Sep 2023 16:09:47 -0400 Subject: [PATCH 036/203] pack and build all --- scripts/pack.ps1 | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/scripts/pack.ps1 b/scripts/pack.ps1 index 9cd2cb768..b41e8ca32 100644 --- a/scripts/pack.ps1 +++ b/scripts/pack.ps1 @@ -31,8 +31,8 @@ Param( # Path to the vendor configuration source file [string]$cmderRoot = "$PSScriptRoot\..", - # Using this option will pack artifacts for a specific included terminal emulator [conemu-maximus5, or windows-terminal] - [string]$emulator = 'conemu-maximus5', + # Using this option will pack artifacts for a specific included terminal emulator [all, conemu-maximus5, or windows-terminal] + [string]$emulator = 'all', # Vendor folder locaton [string]$saveTo = "$PSScriptRoot\..\build" @@ -50,8 +50,17 @@ if ($emulator -eq "windows-terminal") { "cmder_wt.zip" = "-mm=Deflate -mfb=128 -mpass=3 -xr!`"vendor\conemu-maximus5`""; "cmder_wt_mini.zip" = "-xr!`"vendor\git-for-windows`" -xr!`"vendor\conemu-maximus5`""; } +} else if ($emulator -eq "windows-terminal") { + $targets = @{ + "cmder.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on -xr!`"vendor\windows-terminal`""; + "cmder.zip" = "-mm=Deflate -mfb=128 -mpass=3 -xr!`"vendor\windows-terminal`""; + "cmder_mini.zip" = "-xr!`"vendor\git-for-windows`" -xr!`"vendor\windows-terminal`""; + } } else { $targets = @{ + "cmder_wt.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on -xr!`"vendor\conemu-maximus5`""; + "cmder_wt.zip" = "-mm=Deflate -mfb=128 -mpass=3 -xr!`"vendor\conemu-maximus5`""; + "cmder_wt_mini.zip" = "-xr!`"vendor\git-for-windows`" -xr!`"vendor\conemu-maximus5`""; "cmder.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on -xr!`"vendor\windows-terminal`""; "cmder.zip" = "-mm=Deflate -mfb=128 -mpass=3 -xr!`"vendor\windows-terminal`""; "cmder_mini.zip" = "-xr!`"vendor\git-for-windows`" -xr!`"vendor\windows-terminal`""; From 3cc22ca76425484fd42dfa675eb9a6e7757d20ce Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Mon, 25 Sep 2023 16:12:52 -0400 Subject: [PATCH 037/203] pack and build all --- .github/workflows/build.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bc3075ff7..1dc62b458 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -47,15 +47,10 @@ jobs: working-directory: scripts run: .\build.ps1 -Compile -verbose - - name: Pack the built files with Windows Terminal + - name: Pack the built files shell: pwsh working-directory: scripts - run: .\pack.ps1 -verbose -emulator windows-terminal - - - name: Pack the built files with ConEmu - shell: pwsh - working-directory: scripts - run: .\pack.ps1 -verbose -emulator conemu + run: .\pack.ps1 -verbose -emulator all - name: Upload artifact (cmder_wt.zip) uses: actions/upload-artifact@v3 From 58db4e3419bf1e5cc1bb61fcd7ce2ebbca89243a Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Mon, 25 Sep 2023 16:13:38 -0400 Subject: [PATCH 038/203] pack and build all --- scripts/pack.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pack.ps1 b/scripts/pack.ps1 index b41e8ca32..45e0a63d1 100644 --- a/scripts/pack.ps1 +++ b/scripts/pack.ps1 @@ -50,7 +50,7 @@ if ($emulator -eq "windows-terminal") { "cmder_wt.zip" = "-mm=Deflate -mfb=128 -mpass=3 -xr!`"vendor\conemu-maximus5`""; "cmder_wt_mini.zip" = "-xr!`"vendor\git-for-windows`" -xr!`"vendor\conemu-maximus5`""; } -} else if ($emulator -eq "windows-terminal") { +} elseif ($emulator -eq "windows-terminal") { $targets = @{ "cmder.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on -xr!`"vendor\windows-terminal`""; "cmder.zip" = "-mm=Deflate -mfb=128 -mpass=3 -xr!`"vendor\windows-terminal`""; From 01da2fe638c0dac28909fbb1bd6bcd625c246929 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Mon, 25 Sep 2023 16:30:41 -0400 Subject: [PATCH 039/203] turn off /t in windows terminal defaults --- vendor/windows_terminal_default_settings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/windows_terminal_default_settings.json b/vendor/windows_terminal_default_settings.json index 85bf79b41..da60c8900 100644 --- a/vendor/windows_terminal_default_settings.json +++ b/vendor/windows_terminal_default_settings.json @@ -52,7 +52,7 @@ [ { "colorScheme": "Campbell", - "commandline": "cmd /k \"%CMDER_ROOT%\\vendor\\init.bat\" /t", + "commandline": "cmd /k \"%CMDER_ROOT%\\vendor\\init.bat\"", "guid": "{48946353-ebe8-4571-a591-7d609f31327a}", "hidden": false, "icon": "%CMDER_ROOT%\\icons\\cmder.ico", From ddad83c70f5e626d83ec2dff9658478db545c475 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Tue, 26 Sep 2023 11:17:16 -0400 Subject: [PATCH 040/203] PR Review requested changes --- launcher/src/CmderLauncher.cpp | 8 +++++++- vendor/windows_terminal_default_settings.json | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index 8fe3b7e66..855cd9c6a 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -566,7 +566,13 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr #endif PROCESS_INFORMATION pi; if (!CreateProcess(terminalPath, args, NULL, NULL, false, 0, NULL, NULL, &si, &pi)) { - MessageBox(NULL, _T("Unable to create the terminal process!"), _T("Error"), MB_OK); + if (PathFileExists(windowsTerminalDir)) { + MessageBox(NULL, _T("Unable to create the Windows Terminal process!"), _T("Error"), MB_OK); + } + else + { + MessageBox(NULL, _T("Unable to create the ConEmu process!"), _T("Error"), MB_OK); + } return; } diff --git a/vendor/windows_terminal_default_settings.json b/vendor/windows_terminal_default_settings.json index da60c8900..59ee82a48 100644 --- a/vendor/windows_terminal_default_settings.json +++ b/vendor/windows_terminal_default_settings.json @@ -77,7 +77,7 @@ "guid": "{eb1f6578-ce9d-47a9-a8c7-9b3fdd22302d}", "hidden": false, "icon": "%CMDER_ROOT%\\icons\\cmder_orange.ico", - "name": "Cmder - Powershell", + "name": "Cmder - PowerShell", "startingDirectory": "", "tabTitle": "Cmder", "useAtlasEngine": false @@ -89,7 +89,7 @@ "guid": "{c5225c3e-8619-4145-8182-2800814eeb17}", "hidden": false, "icon": "%CMDER_ROOT%\\icons\\cmder_purple.ico", - "name": "Cmder - Powershell as Admin", + "name": "Cmder - PowerShell as Admin", "startingDirectory": "", "tabTitle": "Cmder - PowerShell as Admin", "useAtlasEngine": false From 43a5e7e0b15584b9f128a56b39b3b1f21e1dba4f Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Tue, 26 Sep 2023 11:24:34 -0400 Subject: [PATCH 041/203] PR Review requested changes --- Cmder.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cmder.bat b/Cmder.bat index 987d33ff0..cc2e25b25 100644 --- a/Cmder.bat +++ b/Cmder.bat @@ -38,7 +38,7 @@ exit /b :windows-terminal if not exist "%CMDER_ROOT%\vendor\windows-terminal\settings" md "%CMDER_ROOT%\vendor\windows-terminal\settings" 2>nul - if not exist "%CMDER_ROOT%\vendor\windows-terminal\.portable" echo "This make this installation of Windows Terminal portable" >"%CMDER_ROOT%\vendor\windows-terminal\.portable" 2>nul + if not exist "%CMDER_ROOT%\vendor\windows-terminal\.portable" echo "This makes this installation of Windows Terminal portable" >"%CMDER_ROOT%\vendor\windows-terminal\.portable" 2>nul if exist "%CMDER_ROOT%\config\user_windows_terminal_settings.json" ( if not exist "%CMDER_ROOT%\vendor\windows-terminal\settings\settings.json" ( From 90d86a7e5e471311675354088518820a24e6b5c3 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Mon, 6 Nov 2023 09:55:49 -0500 Subject: [PATCH 042/203] add vendor/bin/create-cmdercfg.cmd --- vendor/bin/create-cmdercfg.cmd | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 vendor/bin/create-cmdercfg.cmd diff --git a/vendor/bin/create-cmdercfg.cmd b/vendor/bin/create-cmdercfg.cmd new file mode 100644 index 000000000..cc8c7116b --- /dev/null +++ b/vendor/bin/create-cmdercfg.cmd @@ -0,0 +1,3 @@ +@echo off + +powershell -executionpolicy bypass -f "%cmder_root%\vendor\bin\create-cmdercfg.ps1" -shell cmd -outfile "%CMDER_CONFIG_DIR%\user_init.cmd" From 2ab6bcd72c4d57a6a2fd77c7a5e9de9b84ba8dc8 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Fri, 10 Nov 2023 17:57:46 -0800 Subject: [PATCH 043/203] cleanup --- Cmder.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cmder.bat b/Cmder.bat index cc2e25b25..e50a44f63 100644 --- a/Cmder.bat +++ b/Cmder.bat @@ -28,7 +28,7 @@ exit /b exit /b 1 ) ) - + if exist "%~1" ( start %cmder_root%\vendor\conemu-maximus5\ConEmu.exe /Icon "%CMDER_ROOT%\icons\cmder.ico" /Title Cmder /LoadCfgFile "%~1" ) else ( From 86091b74e9fb16008ac6469a161bf6a433db4732 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sat, 11 Nov 2023 17:29:28 -0800 Subject: [PATCH 044/203] properly set CMDER_ROOT for windows terminal bash --- vendor/cmder.sh | 6 +++++- vendor/cmder_exinit | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/vendor/cmder.sh b/vendor/cmder.sh index 8467593b3..dfbf91c71 100644 --- a/vendor/cmder.sh +++ b/vendor/cmder.sh @@ -22,7 +22,11 @@ function runProfiled { } # We do this for bash as admin sessions since $CMDER_ROOT is not being set -if [ "$CMDER_ROOT" == "" ] ; then +if [ -z "$CMDER_ROOT" ] && [ -n "$cmder_root" ] ; then + export CMDER_ROOT=$(cygpath -u $cmder_root) +fi + +if [ -z "$CMDER_ROOT" ] ; then case "$ConEmuDir" in *\\*) CMDER_ROOT=$( cd "$(cygpath -u "$ConEmuDir")/../.." ; pwd );; esac else case "$CMDER_ROOT" in *\\*) CMDER_ROOT="$(cygpath -u "$CMDER_ROOT")";; esac diff --git a/vendor/cmder_exinit b/vendor/cmder_exinit index 4ec3351af..8e1b604e0 100644 --- a/vendor/cmder_exinit +++ b/vendor/cmder_exinit @@ -44,6 +44,10 @@ function runProfiled { # Check that we haven't already been sourced. [[ -z ${CMDER_EXINIT} ]] && CMDER_EXINIT="1" || return +if [ -z "$CMDER_ROOT" ] && [ -n "$cmder_root" ] ; then + export CMDER_ROOT=$(cygpath -u $cmder_root) +fi + # We do this for bash as admin sessions since $CMDER_ROOT is not being set if [ "$CMDER_ROOT" = "" -a "$ConEmuDir" != "" ] ; then if [ -d "${ConEmuDir}../../vendor" ] ; then From f0c18f1fc63647b0746dad2ee4cfd4f365e8f2cd Mon Sep 17 00:00:00 2001 From: Dax T Games Date: Thu, 23 Nov 2023 06:50:12 -0500 Subject: [PATCH 045/203] Update Cmder.bat --- Cmder.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cmder.bat b/Cmder.bat index e50a44f63..423b2c8d6 100644 --- a/Cmder.bat +++ b/Cmder.bat @@ -2,7 +2,7 @@ SET CMDER_ROOT=%~dp0 -set CMDER_TERMINAl=conemu +set CMDER_TERMINAL=conemu if exist "%CMDER_ROOT%\vendor\windows-terminal\windowsterminal.exe" ( SET CMDER_TERMINAL=windows-terminal ) From f8aa7feb1f4c8d84922c9c98d38c35177e4e26c6 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Thu, 23 Nov 2023 07:10:59 -0500 Subject: [PATCH 046/203] PR - Requested Changes --- .github/workflows/build.yml | 4 ++-- scripts/build.ps1 | 12 ++++++------ scripts/pack.ps1 | 6 +++--- vendor/init.bat | 3 +-- 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1dc62b458..6e803e63c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,12 +45,12 @@ jobs: - name: Build Cmder Launcher shell: pwsh working-directory: scripts - run: .\build.ps1 -Compile -verbose + run: .\build.ps1 -Compile -verbose -terminal all - name: Pack the built files shell: pwsh working-directory: scripts - run: .\pack.ps1 -verbose -emulator all + run: .\pack.ps1 -verbose -terminal all - name: Upload artifact (cmder_wt.zip) uses: actions/upload-artifact@v3 diff --git a/scripts/build.ps1 b/scripts/build.ps1 index e82193eca..b30812455 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -57,14 +57,14 @@ Param( [switch]$noVendor, # Using this option will specify the emulator to use [all, conemu-maximus5, or windows-terminal] - [string]$emulator = 'all', + [string]$terminal = 'all', # Build launcher if you have MSBuild tools installed [switch]$Compile ) # Get the scripts and cmder root dirs we are building in. -$cmder_root = [string](Resolve-Path "$PSScriptRoot\..") +$cmder_root = Resolve-Path "$PSScriptRoot\.." # Dot source util functions into this scope . "$PSScriptRoot\utils.ps1" @@ -137,9 +137,9 @@ if (-not $noVendor) { } foreach ($s in $sources) { - if ($s.name -eq "conemu-maximus5" -and $emulator -eq "windows-terminal") { + if ($s.name -eq "conemu-maximus5" -and $terminal -eq "windows-terminal") { return - } elseif ($s.name -eq "windows-terminal" -and $emulator -eq "conemu-maximus5") { + } elseif ($s.name -eq "windows-terminal" -and $terminal -eq "conemu-maximus5") { return } @@ -156,8 +156,8 @@ if (-not $noVendor) { # Make Embedded Windows Terminal Portable if ($s.name -eq "windows-terminal") { $windowTerminalFiles = resolve-path ($saveTo + "\" + $s.name + "\terminal*") - move-item -ErrorAction SilentlyContinue $windowTerminalFiles\* $s.name >$null - remove-item -ErrorAction SilentlyContinue $windowTerminalFiles >$null + move-item -ErrorAction SilentlyContinue $windowTerminalFiles\* $s.name >$null + remove-item -ErrorAction SilentlyContinue $windowTerminalFiles >$null write-verbose "Making Windows Terminal Portable..." New-Item -Type Directory -Path (Join-Path $saveTo "/windows-terminal/settings") -ErrorAction SilentlyContinue >$null New-Item -Type File -Path (Join-Path $saveTo "/windows-terminal/.portable") -ErrorAction SilentlyContinue >$null diff --git a/scripts/pack.ps1 b/scripts/pack.ps1 index 45e0a63d1..27e3fb694 100644 --- a/scripts/pack.ps1 +++ b/scripts/pack.ps1 @@ -32,7 +32,7 @@ Param( [string]$cmderRoot = "$PSScriptRoot\..", # Using this option will pack artifacts for a specific included terminal emulator [all, conemu-maximus5, or windows-terminal] - [string]$emulator = 'all', + [string]$terminal = 'all', # Vendor folder locaton [string]$saveTo = "$PSScriptRoot\..\build" @@ -44,13 +44,13 @@ $cmderRoot = Resolve-Path $cmderRoot $ErrorActionPreference = "Stop" Ensure-Executable "7z" -if ($emulator -eq "windows-terminal") { +if ($terminal -eq "windows-terminal") { $targets = @{ "cmder_wt.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on -xr!`"vendor\conemu-maximus5`""; "cmder_wt.zip" = "-mm=Deflate -mfb=128 -mpass=3 -xr!`"vendor\conemu-maximus5`""; "cmder_wt_mini.zip" = "-xr!`"vendor\git-for-windows`" -xr!`"vendor\conemu-maximus5`""; } -} elseif ($emulator -eq "windows-terminal") { +} elseif ($terminal -eq "windows-terminal") { $targets = @{ "cmder.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on -xr!`"vendor\windows-terminal`""; "cmder.zip" = "-mm=Deflate -mfb=128 -mpass=3 -xr!`"vendor\windows-terminal`""; diff --git a/vendor/init.bat b/vendor/init.bat index 08c85ea2c..2de5c81ec 100644 --- a/vendor/init.bat +++ b/vendor/init.bat @@ -319,7 +319,7 @@ if exist "%CMDER_ROOT%\vendor\git-for-windows" ( goto :CONFIGURE_GIT :FOUND_GIT -%print_debug% init.bat "Using found Git '%GIT_VERSION_USER%' from 'v%GIT_INSTALL_ROOT%..." +%print_debug% init.bat "Using found Git '%GIT_VERSION_USER%' from '%GIT_INSTALL_ROOT%..." goto :CONFIGURE_GIT :CONFIGURE_GIT @@ -418,7 +418,6 @@ if %max_depth% gtr 1 ( ) %print_debug% init.bat "END - bin(prepend): Env Var - PATH=%path%" - if defined CMDER_USER_BIN if defined CMDER_USER_ROOT ( %print_debug% init.bat "START - user_bin(prepend): Env Var - PATH=%path%" if %max_depth% gtr 1 ( From 08fd69bdef876f04494fe79adde34cd491e88e71 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Thu, 23 Nov 2023 07:16:42 -0500 Subject: [PATCH 047/203] PR - Requested Changes --- .github/workflows/build.yml | 4 ++-- scripts/build.ps1 | 12 ++++++------ scripts/pack.ps1 | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1dc62b458..6e803e63c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,12 +45,12 @@ jobs: - name: Build Cmder Launcher shell: pwsh working-directory: scripts - run: .\build.ps1 -Compile -verbose + run: .\build.ps1 -Compile -verbose -terminal all - name: Pack the built files shell: pwsh working-directory: scripts - run: .\pack.ps1 -verbose -emulator all + run: .\pack.ps1 -verbose -terminal all - name: Upload artifact (cmder_wt.zip) uses: actions/upload-artifact@v3 diff --git a/scripts/build.ps1 b/scripts/build.ps1 index e82193eca..b30812455 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -57,14 +57,14 @@ Param( [switch]$noVendor, # Using this option will specify the emulator to use [all, conemu-maximus5, or windows-terminal] - [string]$emulator = 'all', + [string]$terminal = 'all', # Build launcher if you have MSBuild tools installed [switch]$Compile ) # Get the scripts and cmder root dirs we are building in. -$cmder_root = [string](Resolve-Path "$PSScriptRoot\..") +$cmder_root = Resolve-Path "$PSScriptRoot\.." # Dot source util functions into this scope . "$PSScriptRoot\utils.ps1" @@ -137,9 +137,9 @@ if (-not $noVendor) { } foreach ($s in $sources) { - if ($s.name -eq "conemu-maximus5" -and $emulator -eq "windows-terminal") { + if ($s.name -eq "conemu-maximus5" -and $terminal -eq "windows-terminal") { return - } elseif ($s.name -eq "windows-terminal" -and $emulator -eq "conemu-maximus5") { + } elseif ($s.name -eq "windows-terminal" -and $terminal -eq "conemu-maximus5") { return } @@ -156,8 +156,8 @@ if (-not $noVendor) { # Make Embedded Windows Terminal Portable if ($s.name -eq "windows-terminal") { $windowTerminalFiles = resolve-path ($saveTo + "\" + $s.name + "\terminal*") - move-item -ErrorAction SilentlyContinue $windowTerminalFiles\* $s.name >$null - remove-item -ErrorAction SilentlyContinue $windowTerminalFiles >$null + move-item -ErrorAction SilentlyContinue $windowTerminalFiles\* $s.name >$null + remove-item -ErrorAction SilentlyContinue $windowTerminalFiles >$null write-verbose "Making Windows Terminal Portable..." New-Item -Type Directory -Path (Join-Path $saveTo "/windows-terminal/settings") -ErrorAction SilentlyContinue >$null New-Item -Type File -Path (Join-Path $saveTo "/windows-terminal/.portable") -ErrorAction SilentlyContinue >$null diff --git a/scripts/pack.ps1 b/scripts/pack.ps1 index 45e0a63d1..27e3fb694 100644 --- a/scripts/pack.ps1 +++ b/scripts/pack.ps1 @@ -32,7 +32,7 @@ Param( [string]$cmderRoot = "$PSScriptRoot\..", # Using this option will pack artifacts for a specific included terminal emulator [all, conemu-maximus5, or windows-terminal] - [string]$emulator = 'all', + [string]$terminal = 'all', # Vendor folder locaton [string]$saveTo = "$PSScriptRoot\..\build" @@ -44,13 +44,13 @@ $cmderRoot = Resolve-Path $cmderRoot $ErrorActionPreference = "Stop" Ensure-Executable "7z" -if ($emulator -eq "windows-terminal") { +if ($terminal -eq "windows-terminal") { $targets = @{ "cmder_wt.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on -xr!`"vendor\conemu-maximus5`""; "cmder_wt.zip" = "-mm=Deflate -mfb=128 -mpass=3 -xr!`"vendor\conemu-maximus5`""; "cmder_wt_mini.zip" = "-xr!`"vendor\git-for-windows`" -xr!`"vendor\conemu-maximus5`""; } -} elseif ($emulator -eq "windows-terminal") { +} elseif ($terminal -eq "windows-terminal") { $targets = @{ "cmder.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on -xr!`"vendor\windows-terminal`""; "cmder.zip" = "-mm=Deflate -mfb=128 -mpass=3 -xr!`"vendor\windows-terminal`""; From 26e684fb38e905f4ecd9b868d15914269b72d82c Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Thu, 23 Nov 2023 07:20:26 -0500 Subject: [PATCH 048/203] PR - Requested Changes --- Cmder.bat | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cmder.bat b/Cmder.bat index e50a44f63..423b2c8d6 100644 --- a/Cmder.bat +++ b/Cmder.bat @@ -2,7 +2,7 @@ SET CMDER_ROOT=%~dp0 -set CMDER_TERMINAl=conemu +set CMDER_TERMINAL=conemu if exist "%CMDER_ROOT%\vendor\windows-terminal\windowsterminal.exe" ( SET CMDER_TERMINAL=windows-terminal ) diff --git a/README.md b/README.md index 735fd1e88..cda18e966 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ The Cmder's user interface is also designed to be more eye pleasing, and you can | `/SINGLE` | Start Cmder in single mode. | | `/START [start_path]` | Folder path to start in. | | `/TASK [task_name]` | Task to start after launch. | -| `/X [ConEmu extras pars]` | Forwards parameters to ConEmu | +| `-- [ConEmu extras pars]` | Forwards ALL remaining parameters to ConEmu. | ## Context Menu Integration From 67b62784c8ed952e7880f253d06d6de486ff968d Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Thu, 23 Nov 2023 09:07:32 -0500 Subject: [PATCH 049/203] add cmder slim --- scripts/build.ps1 | 6 ++++-- scripts/pack.ps1 | 13 +++++++++++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/scripts/build.ps1 b/scripts/build.ps1 index b30812455..71b955a82 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -56,7 +56,7 @@ Param( # Using this option will skip all downloads, if you only need to build launcher [switch]$noVendor, - # Using this option will specify the emulator to use [all, conemu-maximus5, or windows-terminal] + # Using this option will specify the emulator to use [none, all, conemu-maximus5, or windows-terminal] [string]$terminal = 'all', # Build launcher if you have MSBuild tools installed @@ -137,7 +137,9 @@ if (-not $noVendor) { } foreach ($s in $sources) { - if ($s.name -eq "conemu-maximus5" -and $terminal -eq "windows-terminal") { + if ($terminal -eq "none") { + return + } elseif ($s.name -eq "conemu-maximus5" -and $terminal -eq "windows-terminal") { return } elseif ($s.name -eq "windows-terminal" -and $terminal -eq "conemu-maximus5") { return diff --git a/scripts/pack.ps1 b/scripts/pack.ps1 index 27e3fb694..b5de419c4 100644 --- a/scripts/pack.ps1 +++ b/scripts/pack.ps1 @@ -31,7 +31,7 @@ Param( # Path to the vendor configuration source file [string]$cmderRoot = "$PSScriptRoot\..", - # Using this option will pack artifacts for a specific included terminal emulator [all, conemu-maximus5, or windows-terminal] + # Using this option will pack artifacts for a specific included terminal emulator [none, all, conemu-maximus5, or windows-terminal] [string]$terminal = 'all', # Vendor folder locaton @@ -44,7 +44,13 @@ $cmderRoot = Resolve-Path $cmderRoot $ErrorActionPreference = "Stop" Ensure-Executable "7z" -if ($terminal -eq "windows-terminal") { +if ($terminal -eq "none") { + $targets = @{ + "cmder_slim.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on -xr!`"vendor\conemu-maximus5`" -xr!`"vendor\windows-terminal`""; + "cmder_slim.zip" = "-mm=Deflate -mfb=128 -mpass=3 -xr!`"vendor\conemu-maximus5`" -xr!`"vendor\windows-terminal`""; + "cmder_slim_mini.zip" = "-xr!`"vendor\git-for-windows`" -xr!`"vendor\conemu-maximus5`" -xr!`"vendor\windows-terminal`""; + } +} elseif ($terminal -eq "windows-terminal") { $targets = @{ "cmder_wt.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on -xr!`"vendor\conemu-maximus5`""; "cmder_wt.zip" = "-mm=Deflate -mfb=128 -mpass=3 -xr!`"vendor\conemu-maximus5`""; @@ -58,6 +64,9 @@ if ($terminal -eq "windows-terminal") { } } else { $targets = @{ + "cmder_slim.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on -xr!`"vendor\conemu-maximus5`" -xr!`"vendor\windows-terminal`""; + "cmder_slim.zip" = "-mm=Deflate -mfb=128 -mpass=3 -xr!`"vendor\conemu-maximus5`" -xr!`"vendor\windows-terminal`""; + "cmder_slim_mini.zip" = "-xr!`"vendor\git-for-windows`" -xr!`"vendor\conemu-maximus5`" -xr!`"vendor\windows-terminal`""; "cmder_wt.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on -xr!`"vendor\conemu-maximus5`""; "cmder_wt.zip" = "-mm=Deflate -mfb=128 -mpass=3 -xr!`"vendor\conemu-maximus5`""; "cmder_wt_mini.zip" = "-xr!`"vendor\git-for-windows`" -xr!`"vendor\conemu-maximus5`""; From 99b4e66c478a9f1f28a1c3783c4039b7b18c544f Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Fri, 24 Nov 2023 11:35:24 -0500 Subject: [PATCH 050/203] add Cmder for win --- launcher/src/CmderLauncher.cpp | 95 ++++++++++++++++++++++------------ scripts/pack.ps1 | 12 ++--- 2 files changed, 69 insertions(+), 38 deletions(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index c44516a8e..0ff43d68f 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -1,4 +1,4 @@ -#include +#include / #include #include #include "resource.h" @@ -130,6 +130,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr wchar_t userConEmuCfgPath[MAX_PATH] = { 0 }; wchar_t windowsTerminalDir[MAX_PATH] = { 0 }; wchar_t conEmuDir[MAX_PATH] = { 0 }; + wchar_t winDir[MAX_PATH] = { 0 }; wchar_t emulatorPath[MAX_PATH] = { 0 }; @@ -256,6 +257,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr PathCombine(windowsTerminalDir, exeDir, L"vendor\\windows-terminal"); PathCombine(conEmuDir, exeDir, L"vendor\\conemu-maximus5"); + GetEnvironmentVariable(L"WINDIR", winDir, MAX_PATH); if (PathFileExists(windowsTerminalDir)) { @@ -272,7 +274,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr // Set path to Cmder user ConEmu config file PathCombine(userCfgPath, userConfigDirPath, L"user_windows_terminal_settings.json"); } - else + else if (PathFileExists(conEmuDir)) { // Set path to vendored ConEmu config file PathCombine(cfgPath, conEmuDir, L"ConEmu.xml"); @@ -288,7 +290,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr PathCombine(userCfgPath, userConfigDirPath, L"user-ConEmu.xml"); } - if (PathFileExists(cpuCfgPath) || use_user_cfg == false) // config/ConEmu-%COMPUTERNAME%.xml file exists or /m was specified on command line, use machine specific config. + if (wcscmp(cpuCfgPath, L"") == 0 && (PathFileExists(cpuCfgPath) || use_user_cfg == false)) // config/ConEmu-%COMPUTERNAME%.xml file exists or /m was specified on command line, use machine specific config. { if (cfgRoot.length() == 0) // '/c [path]' was NOT specified { @@ -301,7 +303,8 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr : L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/windows_teerminal_%COMPUTERNAME%_settigns.json!", MB_TITLE, MB_ICONSTOP); exit(1); } - else { + else if (PathFileExists(conEmuDir)) + { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) ? L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/ConEmu-%COMPUTERNAME%.xml! Access Denied." @@ -321,7 +324,8 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr : L"Failed to copy config/windows_terminal_%COMPUTERNAME%_settings.json file to vendor/windows-terminal/settings/settings.json!", MB_TITLE, MB_ICONSTOP); exit(1); } - else { + else if (PathFileExists(conEmuDir)) + { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) ? L"Failed to copy config/ConEmu-%COMPUTERNAME%.xml file to vendor/conemu-maximus5/ConEmu.xml! Access Denied." @@ -331,7 +335,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr } } } - else if (PathFileExists(userCfgPath)) // config/user_conemu.xml exists, use it. + else if (wcscmp(userCfgPath, L"") == 0 && PathFileExists(userCfgPath)) // config/user_conemu.xml exists, use it. { if (cfgRoot.length() == 0) // '/c [path]' was NOT specified { @@ -346,7 +350,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr : L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/windows_teerminal_settigns.json!", MB_TITLE, MB_ICONSTOP); exit(1); } - else + else if (PathFileExists(conEmuDir)) { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) @@ -367,7 +371,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr : L"Failed to copy config/user_windows_terminal_settings.json file to vendor/windows-terminal/settings/settings.json!", MB_TITLE, MB_ICONSTOP); exit(1); } - else + else if (PathFileExists(conEmuDir)) { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) @@ -395,14 +399,14 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr : L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/user_windows_terminal_settigns.json!", MB_TITLE, MB_ICONSTOP); exit(1); } - else + else if (PathFileExists(conEmuDir)) { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) ? L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/user-conemu.xml! Access Denied." : L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/user-conemu.xml!", MB_TITLE, MB_ICONSTOP); exit(1); - } + } } else // vendor/ConEmu.xml.default config exists, copy Cmder vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml. { @@ -415,7 +419,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr : L"Failed to copy vendor/windows-terminal_default_settings_settings.json file to vendor/windows-terminal/settings/settigns.json!", MB_TITLE, MB_ICONSTOP); exit(1); } - else + else if (PathFileExists(conEmuDir)) { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) @@ -426,18 +430,16 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr } } } - else { - if (!CopyFile(defaultCfgPath, cfgPath, FALSE)) - { - MessageBox(NULL, - (GetLastError() == ERROR_ACCESS_DENIED) - ? L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml! Access Denied." - : L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml!", MB_TITLE, MB_ICONSTOP); + else if (!CopyFile(defaultCfgPath, cfgPath, FALSE) && PathFileExists(conEmuDir)) + { + MessageBox(NULL, + (GetLastError() == ERROR_ACCESS_DENIED) + ? L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml! Access Denied." + : L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml!", MB_TITLE, MB_ICONSTOP); exit(1); - } } } - else if (PathFileExists(cfgPath)) // vendor/conemu-maximus5/ConEmu.xml exists, copy vendor/conemu-maximus5/ConEmu.xml to config/user_conemu.xml + else if (wcscmp(cfgPath, L"") == 0 && PathFileExists(cfgPath)) // vendor/conemu-maximus5/ConEmu.xml exists, copy vendor/conemu-maximus5/ConEmu.xml to config/user_conemu.xml { if (!CopyFile(cfgPath, userCfgPath, FALSE)) { @@ -460,7 +462,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr PathCombine(userConEmuCfgPath, userConfigDirPath, L"user-ConEmu.xml"); } - else // '/c [path]' was specified and 'vendor/ConEmu.xml.default' config exists, copy Cmder 'vendor/ConEmu.xml.default' file to '[user specified path]/config/user_ConEmu.xml'. + else if (wcscmp(defaultCfgPath, L"") == 0) // '/c [path]' was specified and 'vendor/ConEmu.xml.default' config exists, copy Cmder 'vendor/ConEmu.xml.default' file to '[user specified path]/config/user_ConEmu.xml'. { if ( ! CopyFile(defaultCfgPath, userCfgPath, FALSE)) { @@ -488,10 +490,14 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr if (PathFileExists(windowsTerminalDir)) { PathCombine(terminalPath, exeDir, L"vendor\\windows-terminal\\WindowsTerminal.exe"); } - else + else if (PathFileExists(conEmuDir)) { PathCombine(terminalPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu64.exe"); } + else + { + PathCombine(terminalPath, winDir, L"system32\\cmd.exe"); + } if (!PathFileExists(windowsTerminalDir)) { swprintf_s(args, L"%s /Icon \"%s\"", args, icoPath); @@ -542,10 +548,14 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr if (PathFileExists(windowsTerminalDir)) { swprintf_s(args, L"%s -p \"%s\"", args, cmderTask.c_str()); } - else + else if (PathFileExists(conEmuDir)) { swprintf_s(args, L"%s /run {%s}", args, cmderTask.c_str()); } + else + { + swprintf_s(args, L"%s %s", args, cmderTask.c_str()); + } } SetEnvironmentVariable(L"CMDER_ROOT", exeDir); @@ -565,14 +575,23 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr si.dwFlags = STARTF_TITLEISAPPID; #endif PROCESS_INFORMATION pi; - if (!CreateProcess(terminalPath, args, NULL, NULL, false, 0, NULL, NULL, &si, &pi)) { + + // MessageBox(NULL, terminalPath, _T("Error"), MB_OK); + // MessageBox(NULL, args, _T("Error"), MB_OK); + + if (!CreateProcess(terminalPath, args, NULL, NULL, false, 0, NULL, NULL, &si, &pi)) + { if (PathFileExists(windowsTerminalDir)) { MessageBox(NULL, _T("Unable to create the Windows Terminal process!"), _T("Error"), MB_OK); } - else + else if (PathFileExists(conEmuDir)) { MessageBox(NULL, _T("Unable to create the ConEmu process!"), _T("Error"), MB_OK); } + else + { + MessageBox(NULL, _T("Unable to create the Cmd process!"), _T("Error"), MB_OK); + } return; } } @@ -704,18 +723,23 @@ cmderOptions GetOption() int argCount; wchar_t windowsTerminalDir[MAX_PATH] = { 0 }; + wchar_t conEmuDir[MAX_PATH] = { 0 }; + wchar_t vendorDir[MAX_PATH] = { 0 }; wchar_t exeDir[MAX_PATH] = { 0 }; + wchar_t cmdInit[MAX_PATH] = { 0 }; GetModuleFileName(NULL, exeDir, sizeof(exeDir)); PathRemoveFileSpec(exeDir); - PathCombine(windowsTerminalDir, exeDir, L"vendor\\windows-terminal"); + PathCombine(vendorDir, exeDir, L"vendor"); + PathCombine(windowsTerminalDir, vendorDir, L"windows-terminal"); + PathCombine(conEmuDir, vendorDir, L"ConEmu-Maximus5"); + PathCombine(cmdInit, vendorDir, L"init.bat"); szArgList = CommandLineToArgvW(GetCommandLine(), &argCount); for (int i = 1; i < argCount; i++) { - // MessageBox(NULL, szArgList[i], L"Arglist contents", MB_OK); if (cmderOptions.error == false) { if (_wcsicmp(L"/c", szArgList[i]) == 0) @@ -752,26 +776,26 @@ cmderOptions GetOption() MessageBox(NULL, szArgList[i + 1], L"/START - Folder does not exist!", MB_OK); } } - else if (_wcsicmp(L"/task", szArgList[i]) == 0) + else if (_wcsicmp(L"/task", szArgList[i]) == 0 || PathFileExists(windowsTerminalDir) || PathFileExists(conEmuDir)) { cmderOptions.cmderTask = szArgList[i + 1]; i++; } - else if (_wcsicmp(L"/title", szArgList[i]) == 0 && !PathFileExists(windowsTerminalDir)) + else if (_wcsicmp(L"/title", szArgList[i]) == 0 && !PathFileExists(windowsTerminalDir) && PathFileExists(conEmuDir)) { cmderOptions.cmderTitle = szArgList[i + 1]; i++; } - else if (_wcsicmp(L"/icon", szArgList[i]) == 0 && !PathFileExists(windowsTerminalDir)) + else if (_wcsicmp(L"/icon", szArgList[i]) == 0 && !PathFileExists(windowsTerminalDir) && PathFileExists(conEmuDir)) { cmderOptions.cmderIcon = szArgList[i + 1]; i++; } - else if (_wcsicmp(L"/single", szArgList[i]) == 0 && !PathFileExists(windowsTerminalDir)) + else if (_wcsicmp(L"/single", szArgList[i]) == 0 && !PathFileExists(windowsTerminalDir) && PathFileExists(conEmuDir)) { cmderOptions.cmderSingle = true; } - else if (_wcsicmp(L"/m", szArgList[i]) == 0 && !PathFileExists(windowsTerminalDir)) + else if (_wcsicmp(L"/m", szArgList[i]) == 0 && !PathFileExists(windowsTerminalDir) && PathFileExists(conEmuDir)) { cmderOptions.cmderUserCfg = false; } @@ -844,6 +868,13 @@ cmderOptions GetOption() } + if (!PathFileExists(windowsTerminalDir) && !PathFileExists(conEmuDir)) + { + cmderOptions.cmderTask = L"/k \""; + cmderOptions.cmderTask += cmdInit; + cmderOptions.cmderTask += L"\""; + } + if (cmderOptions.error == true) { wchar_t validOptions[512]; diff --git a/scripts/pack.ps1 b/scripts/pack.ps1 index b5de419c4..2b2a7042e 100644 --- a/scripts/pack.ps1 +++ b/scripts/pack.ps1 @@ -46,9 +46,9 @@ Ensure-Executable "7z" if ($terminal -eq "none") { $targets = @{ - "cmder_slim.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on -xr!`"vendor\conemu-maximus5`" -xr!`"vendor\windows-terminal`""; - "cmder_slim.zip" = "-mm=Deflate -mfb=128 -mpass=3 -xr!`"vendor\conemu-maximus5`" -xr!`"vendor\windows-terminal`""; - "cmder_slim_mini.zip" = "-xr!`"vendor\git-for-windows`" -xr!`"vendor\conemu-maximus5`" -xr!`"vendor\windows-terminal`""; + "cmder_win.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on -xr!`"vendor\conemu-maximus5`" -xr!`"vendor\windows-terminal`""; + "cmder_win.zip" = "-mm=Deflate -mfb=128 -mpass=3 -xr!`"vendor\conemu-maximus5`" -xr!`"vendor\windows-terminal`""; + "cmder_win.mini.zip" = "-xr!`"vendor\git-for-windows`" -xr!`"vendor\conemu-maximus5`" -xr!`"vendor\windows-terminal`""; } } elseif ($terminal -eq "windows-terminal") { $targets = @{ @@ -64,9 +64,9 @@ if ($terminal -eq "none") { } } else { $targets = @{ - "cmder_slim.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on -xr!`"vendor\conemu-maximus5`" -xr!`"vendor\windows-terminal`""; - "cmder_slim.zip" = "-mm=Deflate -mfb=128 -mpass=3 -xr!`"vendor\conemu-maximus5`" -xr!`"vendor\windows-terminal`""; - "cmder_slim_mini.zip" = "-xr!`"vendor\git-for-windows`" -xr!`"vendor\conemu-maximus5`" -xr!`"vendor\windows-terminal`""; + "cmder_win.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on -xr!`"vendor\conemu-maximus5`" -xr!`"vendor\windows-terminal`""; + "cmder_win.zip" = "-mm=Deflate -mfb=128 -mpass=3 -xr!`"vendor\conemu-maximus5`" -xr!`"vendor\windows-terminal`""; + "cmder_win.mini.zip" = "-xr!`"vendor\git-for-windows`" -xr!`"vendor\conemu-maximus5`" -xr!`"vendor\windows-terminal`""; "cmder_wt.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on -xr!`"vendor\conemu-maximus5`""; "cmder_wt.zip" = "-mm=Deflate -mfb=128 -mpass=3 -xr!`"vendor\conemu-maximus5`""; "cmder_wt_mini.zip" = "-xr!`"vendor\git-for-windows`" -xr!`"vendor\conemu-maximus5`""; From 3c2a25af9f496c5a8516465e835600432c509b76 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Fri, 24 Nov 2023 12:04:03 -0500 Subject: [PATCH 051/203] cleanup --- scripts/pack.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pack.ps1 b/scripts/pack.ps1 index 2b2a7042e..a96ea049e 100644 --- a/scripts/pack.ps1 +++ b/scripts/pack.ps1 @@ -66,7 +66,7 @@ if ($terminal -eq "none") { $targets = @{ "cmder_win.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on -xr!`"vendor\conemu-maximus5`" -xr!`"vendor\windows-terminal`""; "cmder_win.zip" = "-mm=Deflate -mfb=128 -mpass=3 -xr!`"vendor\conemu-maximus5`" -xr!`"vendor\windows-terminal`""; - "cmder_win.mini.zip" = "-xr!`"vendor\git-for-windows`" -xr!`"vendor\conemu-maximus5`" -xr!`"vendor\windows-terminal`""; + "cmder_win_mini.zip" = "-xr!`"vendor\git-for-windows`" -xr!`"vendor\conemu-maximus5`" -xr!`"vendor\windows-terminal`""; "cmder_wt.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on -xr!`"vendor\conemu-maximus5`""; "cmder_wt.zip" = "-mm=Deflate -mfb=128 -mpass=3 -xr!`"vendor\conemu-maximus5`""; "cmder_wt_mini.zip" = "-xr!`"vendor\git-for-windows`" -xr!`"vendor\conemu-maximus5`""; From 5c101a0306be0452076c51eb5247899ce3984bda Mon Sep 17 00:00:00 2001 From: David Refoua Date: Fri, 24 Nov 2023 21:04:16 +0330 Subject: [PATCH 052/203] remove small typo --- launcher/src/CmderLauncher.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index 0ff43d68f..b0e8c91ce 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -1,4 +1,4 @@ -#include / +#include #include #include #include "resource.h" From 9ce6911b49264d14e406d37d8c58a6d235bd5d95 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Fri, 24 Nov 2023 15:14:09 -0500 Subject: [PATCH 053/203] add bash and powershell to Cmder for Windows --- launcher/src/CmderLauncher.cpp | 111 +++++++++++++++++++-------------- 1 file changed, 65 insertions(+), 46 deletions(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index 0ff43d68f..d423c4483 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -131,8 +131,10 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr wchar_t windowsTerminalDir[MAX_PATH] = { 0 }; wchar_t conEmuDir[MAX_PATH] = { 0 }; wchar_t winDir[MAX_PATH] = { 0 }; - wchar_t emulatorPath[MAX_PATH] = { 0 }; - + wchar_t vendorDir[MAX_PATH] = { 0 }; + wchar_t initCmd[MAX_PATH] = { 0 }; + wchar_t initPowerShell[MAX_PATH] = { 0 }; + wchar_t initBash[MAX_PATH] = { 0 }; std::wstring cmderStart = path; std::wstring cmderTask = taskName; @@ -255,8 +257,9 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr } } - PathCombine(windowsTerminalDir, exeDir, L"vendor\\windows-terminal"); - PathCombine(conEmuDir, exeDir, L"vendor\\conemu-maximus5"); + PathCombine(vendorDir, exeDir, L"vendor"); + PathCombine(windowsTerminalDir, vendorDir, L"windows-terminal"); + PathCombine(conEmuDir, vendorDir, L"conemu-maximus5"); GetEnvironmentVariable(L"WINDIR", winDir, MAX_PATH); if (PathFileExists(windowsTerminalDir)) @@ -317,7 +320,8 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr { if (!CopyFile(cpuCfgPath, cfgPath, FALSE)) { - if (PathFileExists(windowsTerminalDir)) { + if (PathFileExists(windowsTerminalDir)) + { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) ? L"Failed to copy config/windows_terminal_%COMPUTERNAME%_settings.json file to vendor/windows-terminal/settings/settings.json! Access Denied." @@ -343,7 +347,8 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr { if (!CopyFile(cfgPath, userCfgPath, FALSE)) { - if (PathFileExists(windowsTerminalDir)) { + if (PathFileExists(windowsTerminalDir)) + { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) ? L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/windows_terminal_settings.json! Access Denied." @@ -364,7 +369,8 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr { if (!CopyFile(userCfgPath, cfgPath, FALSE)) { - if (PathFileExists(windowsTerminalDir)) { + if (PathFileExists(windowsTerminalDir)) + { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) ? L"Failed to copy config/user_windows_terminal_settings.json file to vendor/windows-terminal/settings/settings.json! Access Denied." @@ -392,7 +398,8 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr { if (!CopyFile(cfgPath, userCfgPath, FALSE)) { - if (PathFileExists(windowsTerminalDir)) { + if (PathFileExists(windowsTerminalDir)) + { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) ? L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/user_windows_terminal_settings.json! Access Denied." @@ -412,7 +419,8 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr { if (!CopyFile(defaultCfgPath, cfgPath, FALSE)) { - if (PathFileExists(windowsTerminalDir)) { + if (PathFileExists(windowsTerminalDir)) + { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) ? L"Failed to copy vendor/windows-terminal_default_settings_settings.json file to vendor/windows-terminal/settings/settings.json! Access Denied." @@ -428,7 +436,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr exit(1); } } - } + } } else if (!CopyFile(defaultCfgPath, cfgPath, FALSE) && PathFileExists(conEmuDir)) { @@ -436,14 +444,15 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr (GetLastError() == ERROR_ACCESS_DENIED) ? L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml! Access Denied." : L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml!", MB_TITLE, MB_ICONSTOP); - exit(1); + exit(1); } } else if (wcscmp(cfgPath, L"") == 0 && PathFileExists(cfgPath)) // vendor/conemu-maximus5/ConEmu.xml exists, copy vendor/conemu-maximus5/ConEmu.xml to config/user_conemu.xml { if (!CopyFile(cfgPath, userCfgPath, FALSE)) { - if (PathFileExists(windowsTerminalDir)) { + if (PathFileExists(windowsTerminalDir)) + { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) ? L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/user_windows_terminal_settings_settings.json! Access Denied." @@ -464,9 +473,10 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr } else if (wcscmp(defaultCfgPath, L"") == 0) // '/c [path]' was specified and 'vendor/ConEmu.xml.default' config exists, copy Cmder 'vendor/ConEmu.xml.default' file to '[user specified path]/config/user_ConEmu.xml'. { - if ( ! CopyFile(defaultCfgPath, userCfgPath, FALSE)) + if (!CopyFile(defaultCfgPath, userCfgPath, FALSE)) { - if (PathFileExists(windowsTerminalDir)) { + if (PathFileExists(windowsTerminalDir)) + { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) ? L"Failed to copy vendor/windows-terminal_default_settings_settings.json file to [user specified path]/config/user_windows_terminal_settings.json! Access Denied." @@ -487,21 +497,27 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr SYSTEM_INFO sysInfo; GetNativeSystemInfo(&sysInfo); - if (PathFileExists(windowsTerminalDir)) { + if (PathFileExists(windowsTerminalDir)) + { PathCombine(terminalPath, exeDir, L"vendor\\windows-terminal\\WindowsTerminal.exe"); } else if (PathFileExists(conEmuDir)) { + swprintf_s(args, L"%s /Icon \"%s\"", args, icoPath); + swprintf_s(args, L"%s /title \"%s\"", args, cmderTitle.c_str()); PathCombine(terminalPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu64.exe"); } else { - PathCombine(terminalPath, winDir, L"system32\\cmd.exe"); - } - - if (!PathFileExists(windowsTerminalDir)) { - swprintf_s(args, L"%s /Icon \"%s\"", args, icoPath); - } + if (streqi(cmderTask.c_str(), L"powershell")) + { + PathCombine(terminalPath, winDir, L"System32\\WindowsPowerShell\\v1.0\\powershell.exe"); + } + else + { + PathCombine(terminalPath, winDir, L"system32\\cmd.exe"); + } + } if (!streqi(cmderStart.c_str(), L"")) { @@ -521,13 +537,6 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr } } - if (!streqi(cmderTitle.c_str(), L"")) - { - if (!PathFileExists(windowsTerminalDir)) { - swprintf_s(args, L"%s /title \"%s\"", args, cmderTitle.c_str()); - } - } - if (cfgRoot.length() != 0) { if (!PathFileExists(windowsTerminalDir)) { @@ -543,6 +552,10 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr // The `/run` arg and its value MUST be the last arg of ConEmu // see : https://conemu.github.io/en/ConEmuArgs.html // > This must be the last used switch (excepting -new_console and -cur_console) + PathCombine(initCmd, vendorDir, L"init.bat"); + PathCombine(initPowerShell, vendorDir, L"profile.ps1"); + PathCombine(initBash, vendorDir, L"start_git_bash.cmd"); + if (!streqi(cmderTask.c_str(), L"")) { if (PathFileExists(windowsTerminalDir)) { @@ -554,7 +567,18 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr } else { - swprintf_s(args, L"%s %s", args, cmderTask.c_str()); + if (streqi(cmderTask.c_str(), L"powershell")) + { + swprintf_s(args, L"%s -ExecutionPolicy Bypass -NoLogo -NoProfile -NoExit -Command \"Invoke-Expression 'Import-Module ''%s'''\"", args, initPowerShell); + } + else if (streqi(cmderTask.c_str(), L"bash")) + { + swprintf_s(args, L"%s /k \"%s\"", args, initBash); + } + else + { + swprintf_s(args, L"%s /k \"%s\"", args, initCmd); + } } } @@ -581,7 +605,8 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr if (!CreateProcess(terminalPath, args, NULL, NULL, false, 0, NULL, NULL, &si, &pi)) { - if (PathFileExists(windowsTerminalDir)) { + if (PathFileExists(windowsTerminalDir)) + { MessageBox(NULL, _T("Unable to create the Windows Terminal process!"), _T("Error"), MB_OK); } else if (PathFileExists(conEmuDir)) @@ -726,7 +751,6 @@ cmderOptions GetOption() wchar_t conEmuDir[MAX_PATH] = { 0 }; wchar_t vendorDir[MAX_PATH] = { 0 }; wchar_t exeDir[MAX_PATH] = { 0 }; - wchar_t cmdInit[MAX_PATH] = { 0 }; GetModuleFileName(NULL, exeDir, sizeof(exeDir)); PathRemoveFileSpec(exeDir); @@ -734,7 +758,6 @@ cmderOptions GetOption() PathCombine(vendorDir, exeDir, L"vendor"); PathCombine(windowsTerminalDir, vendorDir, L"windows-terminal"); PathCombine(conEmuDir, vendorDir, L"ConEmu-Maximus5"); - PathCombine(cmdInit, vendorDir, L"init.bat"); szArgList = CommandLineToArgvW(GetCommandLine(), &argCount); @@ -849,7 +872,7 @@ cmderOptions GetOption() { szArgList[i][len - 1] = '\0'; } - + if (PathFileExists(szArgList[i])) { cmderOptions.cmderStart = szArgList[i]; @@ -865,14 +888,11 @@ cmderOptions GetOption() cmderOptions.error = true; } } - } - if (!PathFileExists(windowsTerminalDir) && !PathFileExists(conEmuDir)) + if (!PathFileExists(windowsTerminalDir) && !PathFileExists(conEmuDir) && streqi(cmderOptions.cmderTask.c_str(), L"")) { - cmderOptions.cmderTask = L"/k \""; - cmderOptions.cmderTask += cmdInit; - cmderOptions.cmderTask += L"\""; + cmderOptions.cmderTask = L"cmder"; } if (cmderOptions.error == true) @@ -906,17 +926,16 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance, GetModuleFileName(NULL, exeDir, sizeof(exeDir)); PathRemoveFileSpec(exeDir); - - PathCombine(windowsTerminalDir, exeDir, L"vendor\\windows-terminal"); + PathCombine(windowsTerminalDir, exeDir, L"vendor\\windows-terminal"); if (cmderOptions.registerApp == true) { - if (PathFileExists(windowsTerminalDir)) - { - RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_PATH_BACKGROUND, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle); - RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_PATH_LISTITEM, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle); - RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_DRIVE_PATH_BACKGROUND, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle); - RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_DRIVE_PATH_LISTITEM, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle); + if (PathFileExists(windowsTerminalDir)) + { + RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_PATH_BACKGROUND, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle); + RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_PATH_LISTITEM, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle); + RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_DRIVE_PATH_BACKGROUND, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle); + RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_DRIVE_PATH_LISTITEM, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle); } else { From 467d564a7b75e35d6bc9604747cb4643dd479e7e Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Fri, 24 Nov 2023 15:19:49 -0500 Subject: [PATCH 054/203] cleanup --- launcher/src/CmderLauncher.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index d423c4483..a57a7651c 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -1,4 +1,4 @@ -#include / +#include #include #include #include "resource.h" From a7f19f56e8396b0e7a41fb75f2d1b23aa8b4473e Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Fri, 24 Nov 2023 15:25:46 -0500 Subject: [PATCH 055/203] cleanup --- launcher/src/CmderLauncher.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index a57a7651c..51f5e1aa1 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -516,8 +516,8 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr else { PathCombine(terminalPath, winDir, L"system32\\cmd.exe"); - } - } + } + } if (!streqi(cmderStart.c_str(), L"")) { From 2beb27d490b7398f86e5c6e641a0b357a859f6f6 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Fri, 24 Nov 2023 15:27:19 -0500 Subject: [PATCH 056/203] cleanup --- launcher/src/CmderLauncher.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index 51f5e1aa1..edc4e50f6 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -599,7 +599,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr si.dwFlags = STARTF_TITLEISAPPID; #endif PROCESS_INFORMATION pi; - + // MessageBox(NULL, terminalPath, _T("Error"), MB_OK); // MessageBox(NULL, args, _T("Error"), MB_OK); @@ -872,7 +872,7 @@ cmderOptions GetOption() { szArgList[i][len - 1] = '\0'; } - + if (PathFileExists(szArgList[i])) { cmderOptions.cmderStart = szArgList[i]; From 0f6c91d03a3dd99b18cd3b88049b548ba447e15b Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Fri, 24 Nov 2023 16:22:49 -0500 Subject: [PATCH 057/203] cleanup --- launcher/src/CmderLauncher.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index edc4e50f6..dec8da79c 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -573,7 +573,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr } else if (streqi(cmderTask.c_str(), L"bash")) { - swprintf_s(args, L"%s /k \"%s\"", args, initBash); + swprintf_s(args, L"%s /c \"%s\"", args, initBash); } else { From 7a385ebf751e88348e8664750a7bc27fdab50e9e Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Fri, 24 Nov 2023 16:28:44 -0500 Subject: [PATCH 058/203] cleanup --- launcher/src/CmderLauncher.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index dec8da79c..f117d2be2 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -932,10 +932,10 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance, { if (PathFileExists(windowsTerminalDir)) { - RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_PATH_BACKGROUND, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle); - RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_PATH_LISTITEM, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle); - RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_DRIVE_PATH_BACKGROUND, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle); - RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_DRIVE_PATH_LISTITEM, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle); + RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_PATH_BACKGROUND, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle); + RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_PATH_LISTITEM, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle); + RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_DRIVE_PATH_BACKGROUND, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle); + RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_DRIVE_PATH_LISTITEM, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle); } else { From d8238b0230d1ff3200955b6741864c8c5c9c0576 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Fri, 24 Nov 2023 18:18:16 -0500 Subject: [PATCH 059/203] cleanup --- launcher/src/CmderLauncher.cpp | 40 ++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index f117d2be2..a57e65a62 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -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 title = 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::wstring title = L"", std::wstring iconPath = L"", std::wstring cfgRoot = L"", bool use_user_cfg = true, std::wstring conemu_args = L"", bool admin = false) { #if USE_TASKBAR_API wchar_t appId[MAX_PATH] = { 0 }; @@ -602,8 +602,36 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr // MessageBox(NULL, terminalPath, _T("Error"), MB_OK); // MessageBox(NULL, args, _T("Error"), MB_OK); + // Let's try to rerun as Administrator + SHELLEXECUTEINFO sei = { sizeof(sei) }; + sei.fMask = SEE_MASK_NOASYNC | SEE_MASK_NOCLOSEPROCESS; + sei.lpVerb = L"runas"; + sei.lpFile = terminalPath; + sei.lpParameters = args; + sei.nShow = SW_SHOWNORMAL; + + if (admin && ShellExecuteEx(&sei)) + { + if (!sei.hProcess) + { + Sleep(500); + _ASSERTE(sei.hProcess != nullptr); + } + + if (sei.hProcess) + { + WaitForSingleObject(sei.hProcess, INFINITE); + } - if (!CreateProcess(terminalPath, args, NULL, NULL, false, 0, NULL, NULL, &si, &pi)) + // int nZone = 0; + // if (!HasZoneIdentifier(lsFile, nZone) + // || (nZone != 0 /*LocalComputer*/)) + // { + // // Assuming that elevated copy has fixed all zone problems + // break; + // } + } + else if (!CreateProcess(terminalPath, args, NULL, NULL, false, 0, NULL, NULL, &si, &pi)) { if (PathFileExists(windowsTerminalDir)) { @@ -734,6 +762,7 @@ struct cmderOptions std::wstring cmderIcon = L""; std::wstring cmderRegScope = L"USER"; std::wstring cmderTerminalArgs = L""; + bool cmderAdmin = false; bool cmderSingle = false; bool cmderUserCfg = true; bool registerApp = false; @@ -822,6 +851,10 @@ cmderOptions GetOption() { cmderOptions.cmderUserCfg = false; } + else if (_wcsicmp(L"/a", szArgList[i]) == 0 && !PathFileExists(windowsTerminalDir) && !PathFileExists(conEmuDir)) + { + cmderOptions.cmderAdmin = true; + } else if (_wcsicmp(L"/register", szArgList[i]) == 0) { cmderOptions.registerApp = true; @@ -958,8 +991,7 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance, } else { - StartCmder(cmderOptions.cmderStart, cmderOptions.cmderSingle, cmderOptions.cmderTask, cmderOptions.cmderTitle, cmderOptions.cmderIcon, cmderOptions.cmderCfgRoot, cmderOptions.cmderUserCfg, cmderOptions.cmderTerminalArgs); - } + StartCmder(cmderOptions.cmderStart, cmderOptions.cmderSingle, cmderOptions.cmderTask, cmderOptions.cmderTitle, cmderOptions.cmderIcon, cmderOptions.cmderCfgRoot, cmderOptions.cmderUserCfg, cmderOptions.cmderTerminalArgs, cmderOptions.cmderAdmin); } return 0; } From 47292038efcfa55507425f8741a6810e1690d453 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sun, 26 Nov 2023 21:35:30 -0500 Subject: [PATCH 060/203] add mintty --- launcher/src/CmderLauncher.cpp | 55 +++++++++++++++++++++++++++++++--- launcher/src/strings.rc2 | 2 +- 2 files changed, 52 insertions(+), 5 deletions(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index a57e65a62..1181db057 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -135,6 +135,12 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr wchar_t initCmd[MAX_PATH] = { 0 }; wchar_t initPowerShell[MAX_PATH] = { 0 }; wchar_t initBash[MAX_PATH] = { 0 }; + wchar_t vendoredGit[MAX_PATH] = { 0 }; + wchar_t amdx64Git[MAX_PATH] = { 0 }; + wchar_t x86Git[MAX_PATH] = { 0 }; + wchar_t programFiles[MAX_PATH] = { 0 }; + wchar_t programFilesX86[MAX_PATH] = { 0 }; + wchar_t minTTYPath[MAX_PATH] = { 0 }; std::wstring cmderStart = path; std::wstring cmderTask = taskName; @@ -495,6 +501,13 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr PathCombine(userConEmuCfgPath, userConfigDirPath, L"user-ConEmu.xml"); } + GetEnvironmentVariable(L"ProgramFiles", programFiles, MAX_PATH); + GetEnvironmentVariable(L"ProgramFiles(x86)", programFilesX86, MAX_PATH); + + PathCombine(vendoredGit, vendorDir, L"git-for-windows"); + PathCombine(amdx64Git, programFiles, L"Git"); + PathCombine(x86Git, programFilesX86, L"Git"); + SYSTEM_INFO sysInfo; GetNativeSystemInfo(&sysInfo); if (PathFileExists(windowsTerminalDir)) @@ -509,13 +522,26 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr } else { + PathCombine(terminalPath, winDir, L"system32\\cmd.exe"); + if (streqi(cmderTask.c_str(), L"powershell")) { PathCombine(terminalPath, winDir, L"System32\\WindowsPowerShell\\v1.0\\powershell.exe"); } - else + else if (streqi(cmderTask.c_str(), L"mintty")) { - PathCombine(terminalPath, winDir, L"system32\\cmd.exe"); + if (PathFileExists(vendoredGit)) + { + PathCombine(terminalPath, vendoredGit, L"git-bash.exe"); + } + else if (PathFileExists(amdx64Git)) + { + PathCombine(terminalPath, amdx64Git, L"git-bash.exe"); + } + else if (PathFileExists(x86Git)) + { + PathCombine(terminalPath, x86Git, L"git-bash.exe"); + } } } @@ -575,7 +601,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr { swprintf_s(args, L"%s /c \"%s\"", args, initBash); } - else + else if (streqi(cmderTask.c_str(), L"cmder")) { swprintf_s(args, L"%s /k \"%s\"", args, initCmd); } @@ -589,6 +615,27 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr SetEnvironmentVariable(L"CMDER_USER_BIN", userBinDirPath); } + // Try to find m'intty.exe' so ConEmu can launch using %MINTTY_EXE% in external Git for Cmder Mini. + // See: https://github.com/Maximus5/ConEmu/issues/2559 for why this is commented. + + /* + if (PathFileExists(vendoredGit)) + { + PathCombine(minTTYPath, vendoredGit, L"usr\\bin\\mintty.exe"); + SetEnvironmentVariable(L"MINTTY_EXE", minTTYPath); + } + else if (PathFileExists(amdx64Git)) + { + PathCombine(minTTYPath, amdx64Git, L"usr\\bin\\mintty.exe"); + SetEnvironmentVariable(L"MINTTY_EXE", minTTYPath); + } + else if (PathFileExists(x86Git)) + { + PathCombine(minTTYPath, x86Git, L"usr\\bin\\mintty.exe"); + SetEnvironmentVariable(L"MINTTY_EXE", minTTYPath); + } + */ + // Ensure EnvironmentVariables are propagated. STARTUPINFO si = { 0 }; @@ -994,4 +1041,4 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance, StartCmder(cmderOptions.cmderStart, cmderOptions.cmderSingle, cmderOptions.cmderTask, cmderOptions.cmderTitle, cmderOptions.cmderIcon, cmderOptions.cmderCfgRoot, cmderOptions.cmderUserCfg, cmderOptions.cmderTerminalArgs, cmderOptions.cmderAdmin); } return 0; -} +} \ No newline at end of file diff --git a/launcher/src/strings.rc2 b/launcher/src/strings.rc2 index d8feb4d8b..494cbfeec 100644 --- a/launcher/src/strings.rc2 +++ b/launcher/src/strings.rc2 @@ -6,7 +6,7 @@ STRINGTABLE { IDS_TITLE "Cmder Launcher" - IDS_SWITCHES L"Valid options:\n\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]" + 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]" } ///////////////////////////////////////////////////////////////////////////// From 38a91ded0294975829d06c408bc4bfeaa59eaab1 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sun, 26 Nov 2023 22:28:16 -0500 Subject: [PATCH 061/203] cleanup --- launcher/src/CmderLauncher.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index 1181db057..e8a13e489 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -442,7 +442,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr exit(1); } } - } + } } else if (!CopyFile(defaultCfgPath, cfgPath, FALSE) && PathFileExists(conEmuDir)) { From 28e9018ce0673398e9ca4d2102843e4a5c06cb27 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Mon, 27 Nov 2023 10:00:28 -0500 Subject: [PATCH 062/203] make mintty /a work --- launcher/src/CmderLauncher.cpp | 8 +++++++ vendor/start_git_mintty.cmd | 40 ++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 vendor/start_git_mintty.cmd diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index e8a13e489..782095d7e 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -135,6 +135,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr wchar_t initCmd[MAX_PATH] = { 0 }; wchar_t initPowerShell[MAX_PATH] = { 0 }; wchar_t initBash[MAX_PATH] = { 0 }; + wchar_t initMintty[MAX_PATH] = { 0 }; wchar_t vendoredGit[MAX_PATH] = { 0 }; wchar_t amdx64Git[MAX_PATH] = { 0 }; wchar_t x86Git[MAX_PATH] = { 0 }; @@ -528,6 +529,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr { PathCombine(terminalPath, winDir, L"System32\\WindowsPowerShell\\v1.0\\powershell.exe"); } + /* else if (streqi(cmderTask.c_str(), L"mintty")) { if (PathFileExists(vendoredGit)) @@ -543,6 +545,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr PathCombine(terminalPath, x86Git, L"git-bash.exe"); } } + */ } if (!streqi(cmderStart.c_str(), L"")) @@ -581,6 +584,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr PathCombine(initCmd, vendorDir, L"init.bat"); PathCombine(initPowerShell, vendorDir, L"profile.ps1"); PathCombine(initBash, vendorDir, L"start_git_bash.cmd"); + PathCombine(initMintty, vendorDir, L"start_git_mintty.cmd"); if (!streqi(cmderTask.c_str(), L"")) { @@ -601,6 +605,10 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr { swprintf_s(args, L"%s /c \"%s\"", args, initBash); } + else if (streqi(cmderTask.c_str(), L"mintty")) + { + swprintf_s(args, L"%s /c \"%s\"", args, initMintty); + } else if (streqi(cmderTask.c_str(), L"cmder")) { swprintf_s(args, L"%s /k \"%s\"", args, initCmd); diff --git a/vendor/start_git_mintty.cmd b/vendor/start_git_mintty.cmd new file mode 100644 index 000000000..ea4f09a9f --- /dev/null +++ b/vendor/start_git_mintty.cmd @@ -0,0 +1,40 @@ +@echo off + +if not defined CMDER_ROOT ( + if defined ConEmuDir ( + for /f "delims=" %%i in ("%ConEmuDir%\..\..") do ( + set "CMDER_ROOT=%%~fi" + ) + ) else ( + for /f "delims=" %%i in ("%~dp0\..") do ( + set "CMDER_ROOT=%%~fi" + ) + ) +) + +if exist "%CMDER_ROOT%\vendor\git-for-windows" ( + set "PATH=%CMDER_ROOT%\vendor\git-for-windows\usr\bin;%PATH%" + set "gitCmd=%CMDER_ROOT%\vendor\git-for-windows\usr\bin\mintty.exe" +) else if exist "%ProgramFiles%\git" ( + set "PATH=%ProgramFiles%\git\usr\bin;%PATH%" + set "gitCmd=%ProgramFiles%\git\usr\bin\mintty.exe" + if not exist "%ProgramFiles%\git\etc\profile.d\cmder_exinit.sh" ( + echo Run 'mklink "%ProgramFiles%\git\etc\profile.d\cmder_exinit.sh" "%CMDER_ROOT%\vendor\cmder_exinit"' in 'cmd::Cmder as Admin' to use Cmder with external Git Bash + echo. + echo or + echo. + echo Run 'echo "" ^> "%ProgramFiles%\git\etc\profile.d\cmder_exinit.sh"' in 'cmd::Cmder as Admin' to disable this message. + ) +) else if exist "%ProgramFiles(x86)%\git" ( + set "PATH=%ProgramFiles(x86)%\git\usr\bin;%PATH%" + set "gitCmd=%ProgramFiles(x86)%\git\usr\bin\mintty.exe" + if not exist "%ProgramFiles(x86)%\git\etc\profile.d\cmder_exinit.sh" ( + echo Run 'mklink "%ProgramFiles^(x86^)%\git\etc\profile.d\cmder_exinit.sh" "%CMDER_ROOT%\vendor\cmder_exinit"' in 'cmd::Cmder as Admin' to use Cmder with external Git Bash + echo. + echo or + echo. + echo Run 'echo "" ^> "%ProgramFiles^(x86^)%\git\etc\profile.d\cmder_exinit.sh"' in 'cmd::Cmder as Admin' to disable this message. + ) +) + +"%gitCmd%" /bin/bash -l From c5579d2cab83828ac3756429c6290918e12bf03d Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Tue, 2 Jan 2024 11:20:20 -0500 Subject: [PATCH 063/203] Add Monokai, Default to One Half Dark --- vendor/windows_terminal_default_settings.json | 78 ++++++++++++++++--- 1 file changed, 67 insertions(+), 11 deletions(-) diff --git a/vendor/windows_terminal_default_settings.json b/vendor/windows_terminal_default_settings.json index 59ee82a48..f630811ed 100644 --- a/vendor/windows_terminal_default_settings.json +++ b/vendor/windows_terminal_default_settings.json @@ -47,70 +47,80 @@ ], "profiles": { - "defaults": {}, + "defaults": + { + "colorScheme": "One Half Dark", + "font": + { + "face": "Cascadia Code" + } + }, "list": [ { - "colorScheme": "Campbell", + "colorScheme": "One Half Dark", "commandline": "cmd /k \"%CMDER_ROOT%\\vendor\\init.bat\"", "guid": "{48946353-ebe8-4571-a591-7d609f31327a}", "hidden": false, "icon": "%CMDER_ROOT%\\icons\\cmder.ico", "name": "Cmder", - "startingDirectory": "", + "startingDirectory": null, "tabTitle": "Cmder", "useAtlasEngine": false }, { + "colorScheme": "One Half Dark", "commandline": "%SystemRoot%\\System32\\cmd.exe /k \"%CMDER_ROOT%\\vendor\\init.bat\"", "elevate": true, "guid": "{bdd957d0-c15a-49e6-9816-14b02351a071}", "hidden": false, "icon": "%CMDER_ROOT%\\icons\\cmder_red.ico", "name": "Cmder as Admin", - "startingDirectory": "", + "startingDirectory": null, "tabTitle": "Cmder as Admin" }, { - "colorScheme": "Campbell", + "colorScheme": "One Half Dark", "commandline": "PowerShell -ExecutionPolicy Bypass -NoLogo -NoProfile -NoExit -Command \"Invoke-Expression 'Import-Module ''%CMDER_ROOT%\\vendor.\\profile.ps1'''\"", "guid": "{eb1f6578-ce9d-47a9-a8c7-9b3fdd22302d}", "hidden": false, "icon": "%CMDER_ROOT%\\icons\\cmder_orange.ico", "name": "Cmder - PowerShell", - "startingDirectory": "", + "startingDirectory": null, "tabTitle": "Cmder", "useAtlasEngine": false }, { - "colorScheme": "Campbell", + "colorScheme": "One Half Dark", "commandline": "PowerShell -ExecutionPolicy Bypass -NoLogo -NoProfile -NoExit -Command \"Invoke-Expression 'Import-Module ''%CMDER_ROOT%\\vendor.\\profile.ps1'''\"", "elevate": true, "guid": "{c5225c3e-8619-4145-8182-2800814eeb17}", "hidden": false, "icon": "%CMDER_ROOT%\\icons\\cmder_purple.ico", "name": "Cmder - PowerShell as Admin", - "startingDirectory": "", + "startingDirectory": null, "tabTitle": "Cmder - PowerShell as Admin", "useAtlasEngine": false }, { + "colorScheme": "One Half Dark", "commandline": "%CMDER_ROOT%\\vendor\\start_git_bash.cmd", "guid": "{c5c298e9-010e-4b8c-bc55-e3df81846b4c}", "hidden": false, "icon": "%CMDER_ROOT%\\icons\\cmder_blue.ico", "name": "Cmder - Bash", - "startingDirectory": "", + "startingDirectory": null, "tabTitle": "Cmder - Bash" }, { + "colorScheme": "One Half Dark", "commandline": "%CMDER_ROOT%\\vendor\\start_git_bash.cmd", "elevate": true, "guid": "{545eb9ed-4c1c-49b3-8cc6-7eb41bd280ff}", "hidden": false, "icon": "%CMDER_ROOT%\\icons\\cmder_yellow.ico", "name": "Cmder - Bash as Admin", - "startingDirectory": "", + "startingDirectory": null, "tabTitle": "Cmder - Bash as Admin" }, { @@ -176,6 +186,52 @@ "white": "#CCCCCC", "yellow": "#C19C00" }, + { + "background": "#282828", + "black": "#282828", + "blue": "#458588", + "brightBlack": "#928374", + "brightBlue": "#83A598", + "brightCyan": "#8EC07C", + "brightGreen": "#B8BB26", + "brightPurple": "#D3869B", + "brightRed": "#FB4934", + "brightWhite": "#EBDBB2", + "brightYellow": "#FABD2F", + "cursorColor": "#FFFFFF", + "cyan": "#689D6A", + "foreground": "#EBDBB2", + "green": "#98971A", + "name": "Gruvbox Dark", + "purple": "#B16286", + "red": "#CC241D", + "selectionBackground": "#FFFFFF", + "white": "#A89984", + "yellow": "#D79921" + }, + { + "background": "#272822", + "black": "#3E3D32", + "blue": "#03395C", + "brightBlack": "#272822", + "brightBlue": "#66D9EF", + "brightCyan": "#66D9EF", + "brightGreen": "#A6E22E", + "brightPurple": "#AE81FF", + "brightRed": "#F92672", + "brightWhite": "#F8F8F2", + "brightYellow": "#FD971F", + "cursorColor": "#FFFFFF", + "cyan": "#66D9EF", + "foreground": "#F8F8F2", + "green": "#A6E22E", + "name": "Monokai", + "purple": "#AE81FF", + "red": "#F92672", + "selectionBackground": "#FFFFFF", + "white": "#F8F8F2", + "yellow": "#FFE792" + }, { "background": "#282C34", "black": "#282C34", @@ -215,7 +271,7 @@ "cyan": "#0997B3", "foreground": "#383A42", "green": "#50A14F", - "name": "One Half Light", + "name": "One Half Dark", "purple": "#A626A4", "red": "#E45649", "selectionBackground": "#FFFFFF", From 1ed3a3681267ad61189e5681196353844f6a4914 Mon Sep 17 00:00:00 2001 From: Dax T Games Date: Tue, 2 Jan 2024 11:41:21 -0500 Subject: [PATCH 064/203] Update windows_terminal_default_settings.json --- vendor/windows_terminal_default_settings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/windows_terminal_default_settings.json b/vendor/windows_terminal_default_settings.json index f630811ed..94d9bddc1 100644 --- a/vendor/windows_terminal_default_settings.json +++ b/vendor/windows_terminal_default_settings.json @@ -271,7 +271,7 @@ "cyan": "#0997B3", "foreground": "#383A42", "green": "#50A14F", - "name": "One Half Dark", + "name": "One Half Light", "purple": "#A626A4", "red": "#E45649", "selectionBackground": "#FFFFFF", From 9ce82383e2eee2ae754deefdbf83c25eb70c17d1 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Wed, 22 May 2024 15:00:36 -0400 Subject: [PATCH 065/203] Update Windows Terminal to 1.20.11271.0 --- vendor/sources.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/sources.json b/vendor/sources.json index 9094ca5a6..2276bb216 100644 --- a/vendor/sources.json +++ b/vendor/sources.json @@ -2,7 +2,7 @@ { "name": "windows-terminal", "version": "1.17.11461.0", - "url": "https://github.com/microsoft/terminal/releases/download/v1.17.11461.0/Microsoft.WindowsTerminal_1.17.11461.0_x64.zip" + "url": "https://github.com/microsoft/terminal/releases/download/v1.20.11271.0/Microsoft.WindowsTerminal_1.20.11271.0_x64.zip" }, { "name": "git-for-windows", From 41ac7612bca3d3191ff18f540ac092c39ae7aa15 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Tue, 28 May 2024 17:35:47 -0400 Subject: [PATCH 066/203] Update Windows Terminal --- vendor/sources.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/sources.json b/vendor/sources.json index 2276bb216..4ca7b3257 100644 --- a/vendor/sources.json +++ b/vendor/sources.json @@ -1,7 +1,7 @@ [ { "name": "windows-terminal", - "version": "1.17.11461.0", + "version": "1.20.11271.0", "url": "https://github.com/microsoft/terminal/releases/download/v1.20.11271.0/Microsoft.WindowsTerminal_1.20.11271.0_x64.zip" }, { From 2b05b3a7aab2b94d501272f9dda17846294a9be3 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Thu, 30 May 2024 09:13:16 -0400 Subject: [PATCH 067/203] Update Windows Terminal default settings --- vendor/windows_terminal_default_settings.json | 828 ++++++++---------- 1 file changed, 387 insertions(+), 441 deletions(-) diff --git a/vendor/windows_terminal_default_settings.json b/vendor/windows_terminal_default_settings.json index 94d9bddc1..0053f5b44 100644 --- a/vendor/windows_terminal_default_settings.json +++ b/vendor/windows_terminal_default_settings.json @@ -1,444 +1,390 @@ { - "$help": "https://aka.ms/terminal-documentation", - "$schema": "https://aka.ms/terminal-profiles-schema", - "actions": - [ - { - "command": - { - "action": "copy", - "singleLine": false - }, - "keys": "ctrl+shift+c" - }, - { - "command": "paste" - }, - { - "command": "find", - "keys": "ctrl+shift+f" - }, - { - "command": "unbound", - "keys": "ctrl+v" - }, - { - "command": "unbound", - "keys": "ctrl+c" - }, - { - "command": - { - "action": "splitPane", - "split": "auto", - "splitMode": "duplicate" - }, - "keys": "alt+shift+d" - } - ], - "copyFormatting": "none", - "copyOnSelect": true, - "defaultProfile": "{48946353-ebe8-4571-a591-7d609f31327a}", - "newTabMenu": - [ - { - "type": "remainingProfiles" - } - ], - "profiles": + "$help": "https://aka.ms/terminal-documentation", + "$schema": "https://aka.ms/terminal-profiles-schema", + "actions": [ { - "defaults": - { - "colorScheme": "One Half Dark", - "font": - { - "face": "Cascadia Code" - } - }, - "list": - [ - { - "colorScheme": "One Half Dark", - "commandline": "cmd /k \"%CMDER_ROOT%\\vendor\\init.bat\"", - "guid": "{48946353-ebe8-4571-a591-7d609f31327a}", - "hidden": false, - "icon": "%CMDER_ROOT%\\icons\\cmder.ico", - "name": "Cmder", - "startingDirectory": null, - "tabTitle": "Cmder", - "useAtlasEngine": false - }, - { - "colorScheme": "One Half Dark", - "commandline": "%SystemRoot%\\System32\\cmd.exe /k \"%CMDER_ROOT%\\vendor\\init.bat\"", - "elevate": true, - "guid": "{bdd957d0-c15a-49e6-9816-14b02351a071}", - "hidden": false, - "icon": "%CMDER_ROOT%\\icons\\cmder_red.ico", - "name": "Cmder as Admin", - "startingDirectory": null, - "tabTitle": "Cmder as Admin" - }, - { - "colorScheme": "One Half Dark", - "commandline": "PowerShell -ExecutionPolicy Bypass -NoLogo -NoProfile -NoExit -Command \"Invoke-Expression 'Import-Module ''%CMDER_ROOT%\\vendor.\\profile.ps1'''\"", - "guid": "{eb1f6578-ce9d-47a9-a8c7-9b3fdd22302d}", - "hidden": false, - "icon": "%CMDER_ROOT%\\icons\\cmder_orange.ico", - "name": "Cmder - PowerShell", - "startingDirectory": null, - "tabTitle": "Cmder", - "useAtlasEngine": false - }, - { - "colorScheme": "One Half Dark", - "commandline": "PowerShell -ExecutionPolicy Bypass -NoLogo -NoProfile -NoExit -Command \"Invoke-Expression 'Import-Module ''%CMDER_ROOT%\\vendor.\\profile.ps1'''\"", - "elevate": true, - "guid": "{c5225c3e-8619-4145-8182-2800814eeb17}", - "hidden": false, - "icon": "%CMDER_ROOT%\\icons\\cmder_purple.ico", - "name": "Cmder - PowerShell as Admin", - "startingDirectory": null, - "tabTitle": "Cmder - PowerShell as Admin", - "useAtlasEngine": false - }, - { - "colorScheme": "One Half Dark", - "commandline": "%CMDER_ROOT%\\vendor\\start_git_bash.cmd", - "guid": "{c5c298e9-010e-4b8c-bc55-e3df81846b4c}", - "hidden": false, - "icon": "%CMDER_ROOT%\\icons\\cmder_blue.ico", - "name": "Cmder - Bash", - "startingDirectory": null, - "tabTitle": "Cmder - Bash" - }, - { - "colorScheme": "One Half Dark", - "commandline": "%CMDER_ROOT%\\vendor\\start_git_bash.cmd", - "elevate": true, - "guid": "{545eb9ed-4c1c-49b3-8cc6-7eb41bd280ff}", - "hidden": false, - "icon": "%CMDER_ROOT%\\icons\\cmder_yellow.ico", - "name": "Cmder - Bash as Admin", - "startingDirectory": null, - "tabTitle": "Cmder - Bash as Admin" - }, - { - "commandline": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe", - "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", - "hidden": false, - "name": "Windows PowerShell" - }, - { - "commandline": "%SystemRoot%\\System32\\cmd.exe", - "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}", - "hidden": false, - "name": "Command Prompt" - } - - ] + "command": { + "action": "copy", + "singleLine": false + }, + "keys": "ctrl+shift+c" }, - "schemes": - [ - { - "background": "#0C0C0C", - "black": "#0C0C0C", - "blue": "#0037DA", - "brightBlack": "#767676", - "brightBlue": "#3B78FF", - "brightCyan": "#61D6D6", - "brightGreen": "#16C60C", - "brightPurple": "#B4009E", - "brightRed": "#E74856", - "brightWhite": "#F2F2F2", - "brightYellow": "#F9F1A5", - "cursorColor": "#FFFFFF", - "cyan": "#3A96DD", - "foreground": "#CCCCCC", - "green": "#13A10E", - "name": "Campbell", - "purple": "#881798", - "red": "#C50F1F", - "selectionBackground": "#FFFFFF", - "white": "#CCCCCC", - "yellow": "#C19C00" - }, - { - "background": "#012456", - "black": "#0C0C0C", - "blue": "#0037DA", - "brightBlack": "#767676", - "brightBlue": "#3B78FF", - "brightCyan": "#61D6D6", - "brightGreen": "#16C60C", - "brightPurple": "#B4009E", - "brightRed": "#E74856", - "brightWhite": "#F2F2F2", - "brightYellow": "#F9F1A5", - "cursorColor": "#FFFFFF", - "cyan": "#3A96DD", - "foreground": "#CCCCCC", - "green": "#13A10E", - "name": "Campbell Powershell", - "purple": "#881798", - "red": "#C50F1F", - "selectionBackground": "#FFFFFF", - "white": "#CCCCCC", - "yellow": "#C19C00" - }, - { - "background": "#282828", - "black": "#282828", - "blue": "#458588", - "brightBlack": "#928374", - "brightBlue": "#83A598", - "brightCyan": "#8EC07C", - "brightGreen": "#B8BB26", - "brightPurple": "#D3869B", - "brightRed": "#FB4934", - "brightWhite": "#EBDBB2", - "brightYellow": "#FABD2F", - "cursorColor": "#FFFFFF", - "cyan": "#689D6A", - "foreground": "#EBDBB2", - "green": "#98971A", - "name": "Gruvbox Dark", - "purple": "#B16286", - "red": "#CC241D", - "selectionBackground": "#FFFFFF", - "white": "#A89984", - "yellow": "#D79921" - }, - { - "background": "#272822", - "black": "#3E3D32", - "blue": "#03395C", - "brightBlack": "#272822", - "brightBlue": "#66D9EF", - "brightCyan": "#66D9EF", - "brightGreen": "#A6E22E", - "brightPurple": "#AE81FF", - "brightRed": "#F92672", - "brightWhite": "#F8F8F2", - "brightYellow": "#FD971F", - "cursorColor": "#FFFFFF", - "cyan": "#66D9EF", - "foreground": "#F8F8F2", - "green": "#A6E22E", - "name": "Monokai", - "purple": "#AE81FF", - "red": "#F92672", - "selectionBackground": "#FFFFFF", - "white": "#F8F8F2", - "yellow": "#FFE792" - }, - { - "background": "#282C34", - "black": "#282C34", - "blue": "#61AFEF", - "brightBlack": "#5A6374", - "brightBlue": "#61AFEF", - "brightCyan": "#56B6C2", - "brightGreen": "#98C379", - "brightPurple": "#C678DD", - "brightRed": "#E06C75", - "brightWhite": "#DCDFE4", - "brightYellow": "#E5C07B", - "cursorColor": "#FFFFFF", - "cyan": "#56B6C2", - "foreground": "#DCDFE4", - "green": "#98C379", - "name": "One Half Dark", - "purple": "#C678DD", - "red": "#E06C75", - "selectionBackground": "#FFFFFF", - "white": "#DCDFE4", - "yellow": "#E5C07B" - }, - { - "background": "#FAFAFA", - "black": "#383A42", - "blue": "#0184BC", - "brightBlack": "#4F525D", - "brightBlue": "#61AFEF", - "brightCyan": "#56B5C1", - "brightGreen": "#98C379", - "brightPurple": "#C577DD", - "brightRed": "#DF6C75", - "brightWhite": "#FFFFFF", - "brightYellow": "#E4C07A", - "cursorColor": "#4F525D", - "cyan": "#0997B3", - "foreground": "#383A42", - "green": "#50A14F", - "name": "One Half Light", - "purple": "#A626A4", - "red": "#E45649", - "selectionBackground": "#FFFFFF", - "white": "#FAFAFA", - "yellow": "#C18301" - }, - { - "background": "#002B36", - "black": "#002B36", - "blue": "#268BD2", - "brightBlack": "#073642", - "brightBlue": "#839496", - "brightCyan": "#93A1A1", - "brightGreen": "#586E75", - "brightPurple": "#6C71C4", - "brightRed": "#CB4B16", - "brightWhite": "#FDF6E3", - "brightYellow": "#657B83", - "cursorColor": "#FFFFFF", - "cyan": "#2AA198", - "foreground": "#839496", - "green": "#859900", - "name": "Solarized Dark", - "purple": "#D33682", - "red": "#DC322F", - "selectionBackground": "#FFFFFF", - "white": "#EEE8D5", - "yellow": "#B58900" - }, - { - "background": "#FDF6E3", - "black": "#002B36", - "blue": "#268BD2", - "brightBlack": "#073642", - "brightBlue": "#839496", - "brightCyan": "#93A1A1", - "brightGreen": "#586E75", - "brightPurple": "#6C71C4", - "brightRed": "#CB4B16", - "brightWhite": "#FDF6E3", - "brightYellow": "#657B83", - "cursorColor": "#002B36", - "cyan": "#2AA198", - "foreground": "#657B83", - "green": "#859900", - "name": "Solarized Light", - "purple": "#D33682", - "red": "#DC322F", - "selectionBackground": "#FFFFFF", - "white": "#EEE8D5", - "yellow": "#B58900" - }, - { - "background": "#000000", - "black": "#000000", - "blue": "#3465A4", - "brightBlack": "#555753", - "brightBlue": "#729FCF", - "brightCyan": "#34E2E2", - "brightGreen": "#8AE234", - "brightPurple": "#AD7FA8", - "brightRed": "#EF2929", - "brightWhite": "#EEEEEC", - "brightYellow": "#FCE94F", - "cursorColor": "#FFFFFF", - "cyan": "#06989A", - "foreground": "#D3D7CF", - "green": "#4E9A06", - "name": "Tango Dark", - "purple": "#75507B", - "red": "#CC0000", - "selectionBackground": "#FFFFFF", - "white": "#D3D7CF", - "yellow": "#C4A000" - }, - { - "background": "#FFFFFF", - "black": "#000000", - "blue": "#3465A4", - "brightBlack": "#555753", - "brightBlue": "#729FCF", - "brightCyan": "#34E2E2", - "brightGreen": "#8AE234", - "brightPurple": "#AD7FA8", - "brightRed": "#EF2929", - "brightWhite": "#EEEEEC", - "brightYellow": "#FCE94F", - "cursorColor": "#000000", - "cyan": "#06989A", - "foreground": "#555753", - "green": "#4E9A06", - "name": "Tango Light", - "purple": "#75507B", - "red": "#CC0000", - "selectionBackground": "#FFFFFF", - "white": "#D3D7CF", - "yellow": "#C4A000" - }, - { - "background": "#000000", - "black": "#000000", - "blue": "#000080", - "brightBlack": "#808080", - "brightBlue": "#0000FF", - "brightCyan": "#00FFFF", - "brightGreen": "#00FF00", - "brightPurple": "#FF00FF", - "brightRed": "#FF0000", - "brightWhite": "#FFFFFF", - "brightYellow": "#FFFF00", - "cursorColor": "#FFFFFF", - "cyan": "#008080", - "foreground": "#C0C0C0", - "green": "#008000", - "name": "Vintage", - "purple": "#800080", - "red": "#800000", - "selectionBackground": "#FFFFFF", - "white": "#C0C0C0", - "yellow": "#808000" - } - ], - "themes": - [ - { - "name": "legacyDark", - "tab": - { - "background": null, - "showCloseButton": "always", - "unfocusedBackground": null - }, - "window": - { - "applicationTheme": "dark", - "useMica": false - } - }, - { - "name": "legacyLight", - "tab": - { - "background": null, - "showCloseButton": "always", - "unfocusedBackground": null - }, - "window": - { - "applicationTheme": "light", - "useMica": false - } - }, - { - "name": "legacySystem", - "tab": - { - "background": null, - "showCloseButton": "always", - "unfocusedBackground": null - }, - "window": - { - "applicationTheme": "system", - "useMica": false - } - } - ], - "useAcrylicInTabRow": true, - "wordDelimiters": " ()\"',;<>!@#$%^&*|+=[]{}~?\u2502" -} + { + "command": "unbound", + "keys": "ctrl+v" + }, + { + "command": "unbound", + "keys": "ctrl+c" + }, + { + "command": "paste" + }, + { + "command": "find", + "keys": "ctrl+shift+f" + }, + { + "command": { + "action": "splitPane", + "split": "auto", + "splitMode": "duplicate" + }, + "keys": "alt+shift+d" + } + ], + "copyFormatting": "none", + "copyOnSelect": true, + "defaultProfile": "{48946353-ebe8-4571-a591-7d609f31327a}", + "newTabMenu": [ + { + "type": "remainingProfiles" + } + ], + "profiles": { + "defaults": { + "colorScheme": "One Half Dark", + "font": { + "face": "Cascadia Code" + } + }, + "list": [ + { + "colorScheme": "One Half Dark", + "commandline": "cmd /k \"%WT_SETTINGS_DIR%\\..\\..\\init.bat\"", + "guid": "{48946353-ebe8-4571-a591-7d609f31327a}", + "hidden": false, + "icon": "%WT_SETTINGS_DIR%\\..\\..\\..\\icons\\cmder.ico", + "name": "Cmder", + "startingDirectory": null, + "tabTitle": "Cmder", + "useAtlasEngine": false + }, + { + "colorScheme": "One Half Dark", + "commandline": "%SystemRoot%\\System32\\cmd.exe /k \"%WT_SETTINGS_DIR%\\..\\..\\init.bat\"", + "elevate": true, + "guid": "{bdd957d0-c15a-49e6-9816-14b02351a071}", + "hidden": false, + "icon": "%WT_SETTINGS_DIR%\\..\\..\\..\\icons\\cmder_red.ico", + "name": "Cmder as Admin", + "startingDirectory": null, + "tabTitle": "Cmder as Admin" + }, + { + "colorScheme": "One Half Dark", + "commandline": "PowerShell -ExecutionPolicy Bypass -NoLogo -NoProfile -NoExit -Command \"Invoke-Expression 'Import-Module ''%WT_SETTINGS_DIR%\\..\\...\\profile.ps1'''\"", + "guid": "{eb1f6578-ce9d-47a9-a8c7-9b3fdd22302d}", + "hidden": false, + "icon": "%WT_SETTINGS_DIR%\\..\\..\\..\\icons\\cmder_orange.ico", + "name": "Cmder - PowerShell", + "startingDirectory": null, + "tabTitle": "Cmder", + "useAtlasEngine": false + }, + { + "colorScheme": "One Half Dark", + "commandline": "PowerShell -ExecutionPolicy Bypass -NoLogo -NoProfile -NoExit -Command \"Invoke-Expression 'Import-Module ''%WT_SETTINGS_DIR%\\..\\..\\profile.ps1'''\"", + "elevate": true, + "guid": "{c5225c3e-8619-4145-8182-2800814eeb17}", + "hidden": false, + "icon": "%WT_SETTINGS_DIR%\\..\\..\\..\\icons\\cmder_purple.ico", + "name": "Cmder - PowerShell as Admin", + "startingDirectory": null, + "tabTitle": "Cmder - PowerShell as Admin", + "useAtlasEngine": false + }, + { + "colorScheme": "One Half Dark", + "commandline": "%WT_SETTINGS_DIR%\\..\\..\\start_git_bash.cmd", + "guid": "{c5c298e9-010e-4b8c-bc55-e3df81846b4c}", + "hidden": false, + "icon": "%WT_SETTINGS_DIR%\\..\\..\\..\\icons\\cmder_blue.ico", + "name": "Cmder - Bash", + "startingDirectory": null, + "tabTitle": "Cmder - Bash" + }, + { + "colorScheme": "One Half Dark", + "commandline": "%WT_SETTINGS_DIR%\\..\\..\\start_git_bash.cmd", + "elevate": true, + "guid": "{545eb9ed-4c1c-49b3-8cc6-7eb41bd280ff}", + "hidden": false, + "icon": "%WT_SETTINGS_DIR%\\..\\..\\..\\icons\\cmder_yellow.ico", + "name": "Cmder - Bash as Admin", + "startingDirectory": null, + "tabTitle": "Cmder - Bash as Admin" + }, + { + "commandline": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe", + "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", + "hidden": false, + "name": "Windows PowerShell" + }, + { + "commandline": "%SystemRoot%\\System32\\cmd.exe", + "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}", + "hidden": false, + "name": "Command Prompt" + } + ] + }, + "schemes": [ + { + "background": "#0C0C0C", + "black": "#0C0C0C", + "blue": "#0037DA", + "brightBlack": "#767676", + "brightBlue": "#3B78FF", + "brightCyan": "#61D6D6", + "brightGreen": "#16C60C", + "brightPurple": "#B4009E", + "brightRed": "#E74856", + "brightWhite": "#F2F2F2", + "brightYellow": "#F9F1A5", + "cursorColor": "#FFFFFF", + "cyan": "#3A96DD", + "foreground": "#CCCCCC", + "green": "#13A10E", + "name": "Campbell", + "purple": "#881798", + "red": "#C50F1F", + "selectionBackground": "#FFFFFF", + "white": "#CCCCCC", + "yellow": "#C19C00" + }, + { + "background": "#012456", + "black": "#0C0C0C", + "blue": "#0037DA", + "brightBlack": "#767676", + "brightBlue": "#3B78FF", + "brightCyan": "#61D6D6", + "brightGreen": "#16C60C", + "brightPurple": "#B4009E", + "brightRed": "#E74856", + "brightWhite": "#F2F2F2", + "brightYellow": "#F9F1A5", + "cursorColor": "#FFFFFF", + "cyan": "#3A96DD", + "foreground": "#CCCCCC", + "green": "#13A10E", + "name": "Campbell Powershell", + "purple": "#881798", + "red": "#C50F1F", + "selectionBackground": "#FFFFFF", + "white": "#CCCCCC", + "yellow": "#C19C00" + }, + { + "background": "#282828", + "black": "#282828", + "blue": "#458588", + "brightBlack": "#928374", + "brightBlue": "#83A598", + "brightCyan": "#8EC07C", + "brightGreen": "#B8BB26", + "brightPurple": "#D3869B", + "brightRed": "#FB4934", + "brightWhite": "#EBDBB2", + "brightYellow": "#FABD2F", + "cursorColor": "#FFFFFF", + "cyan": "#689D6A", + "foreground": "#EBDBB2", + "green": "#98971A", + "name": "Gruvbox Dark", + "purple": "#B16286", + "red": "#CC241D", + "selectionBackground": "#FFFFFF", + "white": "#A89984", + "yellow": "#D79921" + }, + { + "background": "#272822", + "black": "#3E3D32", + "blue": "#03395C", + "brightBlack": "#272822", + "brightBlue": "#66D9EF", + "brightCyan": "#66D9EF", + "brightGreen": "#A6E22E", + "brightPurple": "#AE81FF", + "brightRed": "#F92672", + "brightWhite": "#F8F8F2", + "brightYellow": "#FD971F", + "cursorColor": "#FFFFFF", + "cyan": "#66D9EF", + "foreground": "#F8F8F2", + "green": "#A6E22E", + "name": "Monokai", + "purple": "#AE81FF", + "red": "#F92672", + "selectionBackground": "#FFFFFF", + "white": "#F8F8F2", + "yellow": "#FFE792" + }, + { + "background": "#282C34", + "black": "#282C34", + "blue": "#61AFEF", + "brightBlack": "#5A6374", + "brightBlue": "#61AFEF", + "brightCyan": "#56B6C2", + "brightGreen": "#98C379", + "brightPurple": "#C678DD", + "brightRed": "#E06C75", + "brightWhite": "#DCDFE4", + "brightYellow": "#E5C07B", + "cursorColor": "#FFFFFF", + "cyan": "#56B6C2", + "foreground": "#DCDFE4", + "green": "#98C379", + "name": "One Half Dark", + "purple": "#C678DD", + "red": "#E06C75", + "selectionBackground": "#FFFFFF", + "white": "#DCDFE4", + "yellow": "#E5C07B" + }, + { + "background": "#FAFAFA", + "black": "#383A42", + "blue": "#0184BC", + "brightBlack": "#4F525D", + "brightBlue": "#61AFEF", + "brightCyan": "#56B5C1", + "brightGreen": "#98C379", + "brightPurple": "#C577DD", + "brightRed": "#DF6C75", + "brightWhite": "#FFFFFF", + "brightYellow": "#E4C07A", + "cursorColor": "#4F525D", + "cyan": "#0997B3", + "foreground": "#383A42", + "green": "#50A14F", + "name": "One Half Light", + "purple": "#A626A4", + "red": "#E45649", + "selectionBackground": "#FFFFFF", + "white": "#FAFAFA", + "yellow": "#C18301" + }, + { + "background": "#002B36", + "black": "#002B36", + "blue": "#268BD2", + "brightBlack": "#073642", + "brightBlue": "#839496", + "brightCyan": "#93A1A1", + "brightGreen": "#586E75", + "brightPurple": "#6C71C4", + "brightRed": "#CB4B16", + "brightWhite": "#FDF6E3", + "brightYellow": "#657B83", + "cursorColor": "#FFFFFF", + "cyan": "#2AA198", + "foreground": "#839496", + "green": "#859900", + "name": "Solarized Dark", + "purple": "#D33682", + "red": "#DC322F", + "selectionBackground": "#FFFFFF", + "white": "#EEE8D5", + "yellow": "#B58900" + }, + { + "background": "#FDF6E3", + "black": "#002B36", + "blue": "#268BD2", + "brightBlack": "#073642", + "brightBlue": "#839496", + "brightCyan": "#93A1A1", + "brightGreen": "#586E75", + "brightPurple": "#6C71C4", + "brightRed": "#CB4B16", + "brightWhite": "#FDF6E3", + "brightYellow": "#657B83", + "cursorColor": "#002B36", + "cyan": "#2AA198", + "foreground": "#657B83", + "green": "#859900", + "name": "Solarized Light", + "purple": "#D33682", + "red": "#DC322F", + "selectionBackground": "#FFFFFF", + "white": "#EEE8D5", + "yellow": "#B58900" + }, + { + "background": "#000000", + "black": "#000000", + "blue": "#3465A4", + "brightBlack": "#555753", + "brightBlue": "#729FCF", + "brightCyan": "#34E2E2", + "brightGreen": "#8AE234", + "brightPurple": "#AD7FA8", + "brightRed": "#EF2929", + "brightWhite": "#EEEEEC", + "brightYellow": "#FCE94F", + "cursorColor": "#FFFFFF", + "cyan": "#06989A", + "foreground": "#D3D7CF", + "green": "#4E9A06", + "name": "Tango Dark", + "purple": "#75507B", + "red": "#CC0000", + "selectionBackground": "#FFFFFF", + "white": "#D3D7CF", + "yellow": "#C4A000" + }, + { + "background": "#FFFFFF", + "black": "#000000", + "blue": "#3465A4", + "brightBlack": "#555753", + "brightBlue": "#729FCF", + "brightCyan": "#34E2E2", + "brightGreen": "#8AE234", + "brightPurple": "#AD7FA8", + "brightRed": "#EF2929", + "brightWhite": "#EEEEEC", + "brightYellow": "#FCE94F", + "cursorColor": "#000000", + "cyan": "#06989A", + "foreground": "#555753", + "green": "#4E9A06", + "name": "Tango Light", + "purple": "#75507B", + "red": "#CC0000", + "selectionBackground": "#FFFFFF", + "white": "#D3D7CF", + "yellow": "#C4A000" + }, + { + "background": "#000000", + "black": "#000000", + "blue": "#000080", + "brightBlack": "#808080", + "brightBlue": "#0000FF", + "brightCyan": "#00FFFF", + "brightGreen": "#00FF00", + "brightPurple": "#FF00FF", + "brightRed": "#FF0000", + "brightWhite": "#FFFFFF", + "brightYellow": "#FFFF00", + "cursorColor": "#FFFFFF", + "cyan": "#008080", + "foreground": "#C0C0C0", + "green": "#008000", + "name": "Vintage", + "purple": "#800080", + "red": "#800000", + "selectionBackground": "#FFFFFF", + "white": "#C0C0C0", + "yellow": "#808000" + } + ], + "themes": [], + "useAcrylicInTabRow": true, + "wordDelimiters": " ()\"',;<>!@#$%^&*|+=[]{}~?\u2502" +} \ No newline at end of file From 23b2a8646ed90ebca3824ba4a8803894dbc9b2e2 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Thu, 30 May 2024 12:16:18 -0400 Subject: [PATCH 068/203] Update Windows terminal default settings --- vendor/windows_terminal_default_settings.json | 828 ++++++++---------- 1 file changed, 387 insertions(+), 441 deletions(-) diff --git a/vendor/windows_terminal_default_settings.json b/vendor/windows_terminal_default_settings.json index 94d9bddc1..d4100753e 100644 --- a/vendor/windows_terminal_default_settings.json +++ b/vendor/windows_terminal_default_settings.json @@ -1,444 +1,390 @@ { - "$help": "https://aka.ms/terminal-documentation", - "$schema": "https://aka.ms/terminal-profiles-schema", - "actions": - [ - { - "command": - { - "action": "copy", - "singleLine": false - }, - "keys": "ctrl+shift+c" - }, - { - "command": "paste" - }, - { - "command": "find", - "keys": "ctrl+shift+f" - }, - { - "command": "unbound", - "keys": "ctrl+v" - }, - { - "command": "unbound", - "keys": "ctrl+c" - }, - { - "command": - { - "action": "splitPane", - "split": "auto", - "splitMode": "duplicate" - }, - "keys": "alt+shift+d" - } - ], - "copyFormatting": "none", - "copyOnSelect": true, - "defaultProfile": "{48946353-ebe8-4571-a591-7d609f31327a}", - "newTabMenu": - [ - { - "type": "remainingProfiles" - } - ], - "profiles": + "$help": "https://aka.ms/terminal-documentation", + "$schema": "https://aka.ms/terminal-profiles-schema", + "actions": [ { - "defaults": - { - "colorScheme": "One Half Dark", - "font": - { - "face": "Cascadia Code" - } - }, - "list": - [ - { - "colorScheme": "One Half Dark", - "commandline": "cmd /k \"%CMDER_ROOT%\\vendor\\init.bat\"", - "guid": "{48946353-ebe8-4571-a591-7d609f31327a}", - "hidden": false, - "icon": "%CMDER_ROOT%\\icons\\cmder.ico", - "name": "Cmder", - "startingDirectory": null, - "tabTitle": "Cmder", - "useAtlasEngine": false - }, - { - "colorScheme": "One Half Dark", - "commandline": "%SystemRoot%\\System32\\cmd.exe /k \"%CMDER_ROOT%\\vendor\\init.bat\"", - "elevate": true, - "guid": "{bdd957d0-c15a-49e6-9816-14b02351a071}", - "hidden": false, - "icon": "%CMDER_ROOT%\\icons\\cmder_red.ico", - "name": "Cmder as Admin", - "startingDirectory": null, - "tabTitle": "Cmder as Admin" - }, - { - "colorScheme": "One Half Dark", - "commandline": "PowerShell -ExecutionPolicy Bypass -NoLogo -NoProfile -NoExit -Command \"Invoke-Expression 'Import-Module ''%CMDER_ROOT%\\vendor.\\profile.ps1'''\"", - "guid": "{eb1f6578-ce9d-47a9-a8c7-9b3fdd22302d}", - "hidden": false, - "icon": "%CMDER_ROOT%\\icons\\cmder_orange.ico", - "name": "Cmder - PowerShell", - "startingDirectory": null, - "tabTitle": "Cmder", - "useAtlasEngine": false - }, - { - "colorScheme": "One Half Dark", - "commandline": "PowerShell -ExecutionPolicy Bypass -NoLogo -NoProfile -NoExit -Command \"Invoke-Expression 'Import-Module ''%CMDER_ROOT%\\vendor.\\profile.ps1'''\"", - "elevate": true, - "guid": "{c5225c3e-8619-4145-8182-2800814eeb17}", - "hidden": false, - "icon": "%CMDER_ROOT%\\icons\\cmder_purple.ico", - "name": "Cmder - PowerShell as Admin", - "startingDirectory": null, - "tabTitle": "Cmder - PowerShell as Admin", - "useAtlasEngine": false - }, - { - "colorScheme": "One Half Dark", - "commandline": "%CMDER_ROOT%\\vendor\\start_git_bash.cmd", - "guid": "{c5c298e9-010e-4b8c-bc55-e3df81846b4c}", - "hidden": false, - "icon": "%CMDER_ROOT%\\icons\\cmder_blue.ico", - "name": "Cmder - Bash", - "startingDirectory": null, - "tabTitle": "Cmder - Bash" - }, - { - "colorScheme": "One Half Dark", - "commandline": "%CMDER_ROOT%\\vendor\\start_git_bash.cmd", - "elevate": true, - "guid": "{545eb9ed-4c1c-49b3-8cc6-7eb41bd280ff}", - "hidden": false, - "icon": "%CMDER_ROOT%\\icons\\cmder_yellow.ico", - "name": "Cmder - Bash as Admin", - "startingDirectory": null, - "tabTitle": "Cmder - Bash as Admin" - }, - { - "commandline": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe", - "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", - "hidden": false, - "name": "Windows PowerShell" - }, - { - "commandline": "%SystemRoot%\\System32\\cmd.exe", - "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}", - "hidden": false, - "name": "Command Prompt" - } - - ] + "command": { + "action": "copy", + "singleLine": false + }, + "keys": "ctrl+shift+c" }, - "schemes": - [ - { - "background": "#0C0C0C", - "black": "#0C0C0C", - "blue": "#0037DA", - "brightBlack": "#767676", - "brightBlue": "#3B78FF", - "brightCyan": "#61D6D6", - "brightGreen": "#16C60C", - "brightPurple": "#B4009E", - "brightRed": "#E74856", - "brightWhite": "#F2F2F2", - "brightYellow": "#F9F1A5", - "cursorColor": "#FFFFFF", - "cyan": "#3A96DD", - "foreground": "#CCCCCC", - "green": "#13A10E", - "name": "Campbell", - "purple": "#881798", - "red": "#C50F1F", - "selectionBackground": "#FFFFFF", - "white": "#CCCCCC", - "yellow": "#C19C00" - }, - { - "background": "#012456", - "black": "#0C0C0C", - "blue": "#0037DA", - "brightBlack": "#767676", - "brightBlue": "#3B78FF", - "brightCyan": "#61D6D6", - "brightGreen": "#16C60C", - "brightPurple": "#B4009E", - "brightRed": "#E74856", - "brightWhite": "#F2F2F2", - "brightYellow": "#F9F1A5", - "cursorColor": "#FFFFFF", - "cyan": "#3A96DD", - "foreground": "#CCCCCC", - "green": "#13A10E", - "name": "Campbell Powershell", - "purple": "#881798", - "red": "#C50F1F", - "selectionBackground": "#FFFFFF", - "white": "#CCCCCC", - "yellow": "#C19C00" - }, - { - "background": "#282828", - "black": "#282828", - "blue": "#458588", - "brightBlack": "#928374", - "brightBlue": "#83A598", - "brightCyan": "#8EC07C", - "brightGreen": "#B8BB26", - "brightPurple": "#D3869B", - "brightRed": "#FB4934", - "brightWhite": "#EBDBB2", - "brightYellow": "#FABD2F", - "cursorColor": "#FFFFFF", - "cyan": "#689D6A", - "foreground": "#EBDBB2", - "green": "#98971A", - "name": "Gruvbox Dark", - "purple": "#B16286", - "red": "#CC241D", - "selectionBackground": "#FFFFFF", - "white": "#A89984", - "yellow": "#D79921" - }, - { - "background": "#272822", - "black": "#3E3D32", - "blue": "#03395C", - "brightBlack": "#272822", - "brightBlue": "#66D9EF", - "brightCyan": "#66D9EF", - "brightGreen": "#A6E22E", - "brightPurple": "#AE81FF", - "brightRed": "#F92672", - "brightWhite": "#F8F8F2", - "brightYellow": "#FD971F", - "cursorColor": "#FFFFFF", - "cyan": "#66D9EF", - "foreground": "#F8F8F2", - "green": "#A6E22E", - "name": "Monokai", - "purple": "#AE81FF", - "red": "#F92672", - "selectionBackground": "#FFFFFF", - "white": "#F8F8F2", - "yellow": "#FFE792" - }, - { - "background": "#282C34", - "black": "#282C34", - "blue": "#61AFEF", - "brightBlack": "#5A6374", - "brightBlue": "#61AFEF", - "brightCyan": "#56B6C2", - "brightGreen": "#98C379", - "brightPurple": "#C678DD", - "brightRed": "#E06C75", - "brightWhite": "#DCDFE4", - "brightYellow": "#E5C07B", - "cursorColor": "#FFFFFF", - "cyan": "#56B6C2", - "foreground": "#DCDFE4", - "green": "#98C379", - "name": "One Half Dark", - "purple": "#C678DD", - "red": "#E06C75", - "selectionBackground": "#FFFFFF", - "white": "#DCDFE4", - "yellow": "#E5C07B" - }, - { - "background": "#FAFAFA", - "black": "#383A42", - "blue": "#0184BC", - "brightBlack": "#4F525D", - "brightBlue": "#61AFEF", - "brightCyan": "#56B5C1", - "brightGreen": "#98C379", - "brightPurple": "#C577DD", - "brightRed": "#DF6C75", - "brightWhite": "#FFFFFF", - "brightYellow": "#E4C07A", - "cursorColor": "#4F525D", - "cyan": "#0997B3", - "foreground": "#383A42", - "green": "#50A14F", - "name": "One Half Light", - "purple": "#A626A4", - "red": "#E45649", - "selectionBackground": "#FFFFFF", - "white": "#FAFAFA", - "yellow": "#C18301" - }, - { - "background": "#002B36", - "black": "#002B36", - "blue": "#268BD2", - "brightBlack": "#073642", - "brightBlue": "#839496", - "brightCyan": "#93A1A1", - "brightGreen": "#586E75", - "brightPurple": "#6C71C4", - "brightRed": "#CB4B16", - "brightWhite": "#FDF6E3", - "brightYellow": "#657B83", - "cursorColor": "#FFFFFF", - "cyan": "#2AA198", - "foreground": "#839496", - "green": "#859900", - "name": "Solarized Dark", - "purple": "#D33682", - "red": "#DC322F", - "selectionBackground": "#FFFFFF", - "white": "#EEE8D5", - "yellow": "#B58900" - }, - { - "background": "#FDF6E3", - "black": "#002B36", - "blue": "#268BD2", - "brightBlack": "#073642", - "brightBlue": "#839496", - "brightCyan": "#93A1A1", - "brightGreen": "#586E75", - "brightPurple": "#6C71C4", - "brightRed": "#CB4B16", - "brightWhite": "#FDF6E3", - "brightYellow": "#657B83", - "cursorColor": "#002B36", - "cyan": "#2AA198", - "foreground": "#657B83", - "green": "#859900", - "name": "Solarized Light", - "purple": "#D33682", - "red": "#DC322F", - "selectionBackground": "#FFFFFF", - "white": "#EEE8D5", - "yellow": "#B58900" - }, - { - "background": "#000000", - "black": "#000000", - "blue": "#3465A4", - "brightBlack": "#555753", - "brightBlue": "#729FCF", - "brightCyan": "#34E2E2", - "brightGreen": "#8AE234", - "brightPurple": "#AD7FA8", - "brightRed": "#EF2929", - "brightWhite": "#EEEEEC", - "brightYellow": "#FCE94F", - "cursorColor": "#FFFFFF", - "cyan": "#06989A", - "foreground": "#D3D7CF", - "green": "#4E9A06", - "name": "Tango Dark", - "purple": "#75507B", - "red": "#CC0000", - "selectionBackground": "#FFFFFF", - "white": "#D3D7CF", - "yellow": "#C4A000" - }, - { - "background": "#FFFFFF", - "black": "#000000", - "blue": "#3465A4", - "brightBlack": "#555753", - "brightBlue": "#729FCF", - "brightCyan": "#34E2E2", - "brightGreen": "#8AE234", - "brightPurple": "#AD7FA8", - "brightRed": "#EF2929", - "brightWhite": "#EEEEEC", - "brightYellow": "#FCE94F", - "cursorColor": "#000000", - "cyan": "#06989A", - "foreground": "#555753", - "green": "#4E9A06", - "name": "Tango Light", - "purple": "#75507B", - "red": "#CC0000", - "selectionBackground": "#FFFFFF", - "white": "#D3D7CF", - "yellow": "#C4A000" - }, - { - "background": "#000000", - "black": "#000000", - "blue": "#000080", - "brightBlack": "#808080", - "brightBlue": "#0000FF", - "brightCyan": "#00FFFF", - "brightGreen": "#00FF00", - "brightPurple": "#FF00FF", - "brightRed": "#FF0000", - "brightWhite": "#FFFFFF", - "brightYellow": "#FFFF00", - "cursorColor": "#FFFFFF", - "cyan": "#008080", - "foreground": "#C0C0C0", - "green": "#008000", - "name": "Vintage", - "purple": "#800080", - "red": "#800000", - "selectionBackground": "#FFFFFF", - "white": "#C0C0C0", - "yellow": "#808000" - } - ], - "themes": - [ - { - "name": "legacyDark", - "tab": - { - "background": null, - "showCloseButton": "always", - "unfocusedBackground": null - }, - "window": - { - "applicationTheme": "dark", - "useMica": false - } - }, - { - "name": "legacyLight", - "tab": - { - "background": null, - "showCloseButton": "always", - "unfocusedBackground": null - }, - "window": - { - "applicationTheme": "light", - "useMica": false - } - }, - { - "name": "legacySystem", - "tab": - { - "background": null, - "showCloseButton": "always", - "unfocusedBackground": null - }, - "window": - { - "applicationTheme": "system", - "useMica": false - } - } - ], - "useAcrylicInTabRow": true, - "wordDelimiters": " ()\"',;<>!@#$%^&*|+=[]{}~?\u2502" -} + { + "command": "unbound", + "keys": "ctrl+v" + }, + { + "command": "unbound", + "keys": "ctrl+c" + }, + { + "command": "paste" + }, + { + "command": "find", + "keys": "ctrl+shift+f" + }, + { + "command": { + "action": "splitPane", + "split": "auto", + "splitMode": "duplicate" + }, + "keys": "alt+shift+d" + } + ], + "copyFormatting": "none", + "copyOnSelect": true, + "defaultProfile": "{48946353-ebe8-4571-a591-7d609f31327a}", + "newTabMenu": [ + { + "type": "remainingProfiles" + } + ], + "profiles": { + "defaults": { + "colorScheme": "One Half Dark", + "font": { + "face": "Cascadia Code" + } + }, + "list": [ + { + "colorScheme": "One Half Dark", + "commandline": "cmd /k \"%WT_SETTINGS_DIR%\\..\\..\\init.bat\"", + "guid": "{48946353-ebe8-4571-a591-7d609f31327a}", + "hidden": false, + "icon": "%WT_SETTINGS_DIR%\\..\\..\\..\\icons\\cmder.ico", + "name": "Cmder", + "startingDirectory": null, + "tabTitle": "Cmder", + "useAtlasEngine": false + }, + { + "colorScheme": "One Half Dark", + "commandline": "%SystemRoot%\\System32\\cmd.exe /k \"%WT_SETTINGS_DIR%\\..\\..\\init.bat\"", + "elevate": true, + "guid": "{bdd957d0-c15a-49e6-9816-14b02351a071}", + "hidden": false, + "icon": "%WT_SETTINGS_DIR%\\..\\..\\..\\icons\\cmder_red.ico", + "name": "Cmder as Admin", + "startingDirectory": null, + "tabTitle": "Cmder as Admin" + }, + { + "colorScheme": "One Half Dark", + "commandline": "PowerShell -ExecutionPolicy Bypass -NoLogo -NoProfile -NoExit -Command \"Invoke-Expression 'Import-Module ''%WT_SETTINGS_DIR%\\..\\..\\profile.ps1'''\"", + "guid": "{eb1f6578-ce9d-47a9-a8c7-9b3fdd22302d}", + "hidden": false, + "icon": "%WT_SETTINGS_DIR%\\..\\..\\..\\icons\\cmder_orange.ico", + "name": "Cmder - PowerShell", + "startingDirectory": null, + "tabTitle": "Cmder", + "useAtlasEngine": false + }, + { + "colorScheme": "One Half Dark", + "commandline": "PowerShell -ExecutionPolicy Bypass -NoLogo -NoProfile -NoExit -Command \"Invoke-Expression 'Import-Module ''%WT_SETTINGS_DIR%\\..\\..\\profile.ps1'''\"", + "elevate": true, + "guid": "{c5225c3e-8619-4145-8182-2800814eeb17}", + "hidden": false, + "icon": "%WT_SETTINGS_DIR%\\..\\..\\..\\icons\\cmder_purple.ico", + "name": "Cmder - PowerShell as Admin", + "startingDirectory": null, + "tabTitle": "Cmder - PowerShell as Admin", + "useAtlasEngine": false + }, + { + "colorScheme": "One Half Dark", + "commandline": "%WT_SETTINGS_DIR%\\..\\..\\start_git_bash.cmd", + "guid": "{c5c298e9-010e-4b8c-bc55-e3df81846b4c}", + "hidden": false, + "icon": "%WT_SETTINGS_DIR%\\..\\..\\..\\icons\\cmder_blue.ico", + "name": "Cmder - Bash", + "startingDirectory": null, + "tabTitle": "Cmder - Bash" + }, + { + "colorScheme": "One Half Dark", + "commandline": "%WT_SETTINGS_DIR%\\..\\..\\start_git_bash.cmd", + "elevate": true, + "guid": "{545eb9ed-4c1c-49b3-8cc6-7eb41bd280ff}", + "hidden": false, + "icon": "%WT_SETTINGS_DIR%\\..\\..\\..\\icons\\cmder_yellow.ico", + "name": "Cmder - Bash as Admin", + "startingDirectory": null, + "tabTitle": "Cmder - Bash as Admin" + }, + { + "commandline": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe", + "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", + "hidden": false, + "name": "Windows PowerShell" + }, + { + "commandline": "%SystemRoot%\\System32\\cmd.exe", + "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}", + "hidden": false, + "name": "Command Prompt" + } + ] + }, + "schemes": [ + { + "background": "#0C0C0C", + "black": "#0C0C0C", + "blue": "#0037DA", + "brightBlack": "#767676", + "brightBlue": "#3B78FF", + "brightCyan": "#61D6D6", + "brightGreen": "#16C60C", + "brightPurple": "#B4009E", + "brightRed": "#E74856", + "brightWhite": "#F2F2F2", + "brightYellow": "#F9F1A5", + "cursorColor": "#FFFFFF", + "cyan": "#3A96DD", + "foreground": "#CCCCCC", + "green": "#13A10E", + "name": "Campbell", + "purple": "#881798", + "red": "#C50F1F", + "selectionBackground": "#FFFFFF", + "white": "#CCCCCC", + "yellow": "#C19C00" + }, + { + "background": "#012456", + "black": "#0C0C0C", + "blue": "#0037DA", + "brightBlack": "#767676", + "brightBlue": "#3B78FF", + "brightCyan": "#61D6D6", + "brightGreen": "#16C60C", + "brightPurple": "#B4009E", + "brightRed": "#E74856", + "brightWhite": "#F2F2F2", + "brightYellow": "#F9F1A5", + "cursorColor": "#FFFFFF", + "cyan": "#3A96DD", + "foreground": "#CCCCCC", + "green": "#13A10E", + "name": "Campbell Powershell", + "purple": "#881798", + "red": "#C50F1F", + "selectionBackground": "#FFFFFF", + "white": "#CCCCCC", + "yellow": "#C19C00" + }, + { + "background": "#282828", + "black": "#282828", + "blue": "#458588", + "brightBlack": "#928374", + "brightBlue": "#83A598", + "brightCyan": "#8EC07C", + "brightGreen": "#B8BB26", + "brightPurple": "#D3869B", + "brightRed": "#FB4934", + "brightWhite": "#EBDBB2", + "brightYellow": "#FABD2F", + "cursorColor": "#FFFFFF", + "cyan": "#689D6A", + "foreground": "#EBDBB2", + "green": "#98971A", + "name": "Gruvbox Dark", + "purple": "#B16286", + "red": "#CC241D", + "selectionBackground": "#FFFFFF", + "white": "#A89984", + "yellow": "#D79921" + }, + { + "background": "#272822", + "black": "#3E3D32", + "blue": "#03395C", + "brightBlack": "#272822", + "brightBlue": "#66D9EF", + "brightCyan": "#66D9EF", + "brightGreen": "#A6E22E", + "brightPurple": "#AE81FF", + "brightRed": "#F92672", + "brightWhite": "#F8F8F2", + "brightYellow": "#FD971F", + "cursorColor": "#FFFFFF", + "cyan": "#66D9EF", + "foreground": "#F8F8F2", + "green": "#A6E22E", + "name": "Monokai", + "purple": "#AE81FF", + "red": "#F92672", + "selectionBackground": "#FFFFFF", + "white": "#F8F8F2", + "yellow": "#FFE792" + }, + { + "background": "#282C34", + "black": "#282C34", + "blue": "#61AFEF", + "brightBlack": "#5A6374", + "brightBlue": "#61AFEF", + "brightCyan": "#56B6C2", + "brightGreen": "#98C379", + "brightPurple": "#C678DD", + "brightRed": "#E06C75", + "brightWhite": "#DCDFE4", + "brightYellow": "#E5C07B", + "cursorColor": "#FFFFFF", + "cyan": "#56B6C2", + "foreground": "#DCDFE4", + "green": "#98C379", + "name": "One Half Dark", + "purple": "#C678DD", + "red": "#E06C75", + "selectionBackground": "#FFFFFF", + "white": "#DCDFE4", + "yellow": "#E5C07B" + }, + { + "background": "#FAFAFA", + "black": "#383A42", + "blue": "#0184BC", + "brightBlack": "#4F525D", + "brightBlue": "#61AFEF", + "brightCyan": "#56B5C1", + "brightGreen": "#98C379", + "brightPurple": "#C577DD", + "brightRed": "#DF6C75", + "brightWhite": "#FFFFFF", + "brightYellow": "#E4C07A", + "cursorColor": "#4F525D", + "cyan": "#0997B3", + "foreground": "#383A42", + "green": "#50A14F", + "name": "One Half Light", + "purple": "#A626A4", + "red": "#E45649", + "selectionBackground": "#FFFFFF", + "white": "#FAFAFA", + "yellow": "#C18301" + }, + { + "background": "#002B36", + "black": "#002B36", + "blue": "#268BD2", + "brightBlack": "#073642", + "brightBlue": "#839496", + "brightCyan": "#93A1A1", + "brightGreen": "#586E75", + "brightPurple": "#6C71C4", + "brightRed": "#CB4B16", + "brightWhite": "#FDF6E3", + "brightYellow": "#657B83", + "cursorColor": "#FFFFFF", + "cyan": "#2AA198", + "foreground": "#839496", + "green": "#859900", + "name": "Solarized Dark", + "purple": "#D33682", + "red": "#DC322F", + "selectionBackground": "#FFFFFF", + "white": "#EEE8D5", + "yellow": "#B58900" + }, + { + "background": "#FDF6E3", + "black": "#002B36", + "blue": "#268BD2", + "brightBlack": "#073642", + "brightBlue": "#839496", + "brightCyan": "#93A1A1", + "brightGreen": "#586E75", + "brightPurple": "#6C71C4", + "brightRed": "#CB4B16", + "brightWhite": "#FDF6E3", + "brightYellow": "#657B83", + "cursorColor": "#002B36", + "cyan": "#2AA198", + "foreground": "#657B83", + "green": "#859900", + "name": "Solarized Light", + "purple": "#D33682", + "red": "#DC322F", + "selectionBackground": "#FFFFFF", + "white": "#EEE8D5", + "yellow": "#B58900" + }, + { + "background": "#000000", + "black": "#000000", + "blue": "#3465A4", + "brightBlack": "#555753", + "brightBlue": "#729FCF", + "brightCyan": "#34E2E2", + "brightGreen": "#8AE234", + "brightPurple": "#AD7FA8", + "brightRed": "#EF2929", + "brightWhite": "#EEEEEC", + "brightYellow": "#FCE94F", + "cursorColor": "#FFFFFF", + "cyan": "#06989A", + "foreground": "#D3D7CF", + "green": "#4E9A06", + "name": "Tango Dark", + "purple": "#75507B", + "red": "#CC0000", + "selectionBackground": "#FFFFFF", + "white": "#D3D7CF", + "yellow": "#C4A000" + }, + { + "background": "#FFFFFF", + "black": "#000000", + "blue": "#3465A4", + "brightBlack": "#555753", + "brightBlue": "#729FCF", + "brightCyan": "#34E2E2", + "brightGreen": "#8AE234", + "brightPurple": "#AD7FA8", + "brightRed": "#EF2929", + "brightWhite": "#EEEEEC", + "brightYellow": "#FCE94F", + "cursorColor": "#000000", + "cyan": "#06989A", + "foreground": "#555753", + "green": "#4E9A06", + "name": "Tango Light", + "purple": "#75507B", + "red": "#CC0000", + "selectionBackground": "#FFFFFF", + "white": "#D3D7CF", + "yellow": "#C4A000" + }, + { + "background": "#000000", + "black": "#000000", + "blue": "#000080", + "brightBlack": "#808080", + "brightBlue": "#0000FF", + "brightCyan": "#00FFFF", + "brightGreen": "#00FF00", + "brightPurple": "#FF00FF", + "brightRed": "#FF0000", + "brightWhite": "#FFFFFF", + "brightYellow": "#FFFF00", + "cursorColor": "#FFFFFF", + "cyan": "#008080", + "foreground": "#C0C0C0", + "green": "#008000", + "name": "Vintage", + "purple": "#800080", + "red": "#800000", + "selectionBackground": "#FFFFFF", + "white": "#C0C0C0", + "yellow": "#808000" + } + ], + "themes": [], + "useAcrylicInTabRow": true, + "wordDelimiters": " ()\"',;<>!@#$%^&*|+=[]{}~?\u2502" +} \ No newline at end of file From 881938ed18f8d70524196ea5c6b62ee7752c6443 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Thu, 30 May 2024 16:23:51 -0400 Subject: [PATCH 069/203] Update Windows Terminal default settings and version --- vendor/sources.json | 4 +- vendor/start_git_mintty.cmd | 40 + vendor/windows_terminal_default_settings.json | 770 +++++++++--------- 3 files changed, 428 insertions(+), 386 deletions(-) create mode 100644 vendor/start_git_mintty.cmd diff --git a/vendor/sources.json b/vendor/sources.json index 9094ca5a6..4ca7b3257 100644 --- a/vendor/sources.json +++ b/vendor/sources.json @@ -1,8 +1,8 @@ [ { "name": "windows-terminal", - "version": "1.17.11461.0", - "url": "https://github.com/microsoft/terminal/releases/download/v1.17.11461.0/Microsoft.WindowsTerminal_1.17.11461.0_x64.zip" + "version": "1.20.11271.0", + "url": "https://github.com/microsoft/terminal/releases/download/v1.20.11271.0/Microsoft.WindowsTerminal_1.20.11271.0_x64.zip" }, { "name": "git-for-windows", diff --git a/vendor/start_git_mintty.cmd b/vendor/start_git_mintty.cmd new file mode 100644 index 000000000..ea4f09a9f --- /dev/null +++ b/vendor/start_git_mintty.cmd @@ -0,0 +1,40 @@ +@echo off + +if not defined CMDER_ROOT ( + if defined ConEmuDir ( + for /f "delims=" %%i in ("%ConEmuDir%\..\..") do ( + set "CMDER_ROOT=%%~fi" + ) + ) else ( + for /f "delims=" %%i in ("%~dp0\..") do ( + set "CMDER_ROOT=%%~fi" + ) + ) +) + +if exist "%CMDER_ROOT%\vendor\git-for-windows" ( + set "PATH=%CMDER_ROOT%\vendor\git-for-windows\usr\bin;%PATH%" + set "gitCmd=%CMDER_ROOT%\vendor\git-for-windows\usr\bin\mintty.exe" +) else if exist "%ProgramFiles%\git" ( + set "PATH=%ProgramFiles%\git\usr\bin;%PATH%" + set "gitCmd=%ProgramFiles%\git\usr\bin\mintty.exe" + if not exist "%ProgramFiles%\git\etc\profile.d\cmder_exinit.sh" ( + echo Run 'mklink "%ProgramFiles%\git\etc\profile.d\cmder_exinit.sh" "%CMDER_ROOT%\vendor\cmder_exinit"' in 'cmd::Cmder as Admin' to use Cmder with external Git Bash + echo. + echo or + echo. + echo Run 'echo "" ^> "%ProgramFiles%\git\etc\profile.d\cmder_exinit.sh"' in 'cmd::Cmder as Admin' to disable this message. + ) +) else if exist "%ProgramFiles(x86)%\git" ( + set "PATH=%ProgramFiles(x86)%\git\usr\bin;%PATH%" + set "gitCmd=%ProgramFiles(x86)%\git\usr\bin\mintty.exe" + if not exist "%ProgramFiles(x86)%\git\etc\profile.d\cmder_exinit.sh" ( + echo Run 'mklink "%ProgramFiles^(x86^)%\git\etc\profile.d\cmder_exinit.sh" "%CMDER_ROOT%\vendor\cmder_exinit"' in 'cmd::Cmder as Admin' to use Cmder with external Git Bash + echo. + echo or + echo. + echo Run 'echo "" ^> "%ProgramFiles^(x86^)%\git\etc\profile.d\cmder_exinit.sh"' in 'cmd::Cmder as Admin' to disable this message. + ) +) + +"%gitCmd%" /bin/bash -l diff --git a/vendor/windows_terminal_default_settings.json b/vendor/windows_terminal_default_settings.json index 59ee82a48..908d25453 100644 --- a/vendor/windows_terminal_default_settings.json +++ b/vendor/windows_terminal_default_settings.json @@ -1,388 +1,390 @@ { - "$help": "https://aka.ms/terminal-documentation", - "$schema": "https://aka.ms/terminal-profiles-schema", - "actions": - [ - { - "command": - { - "action": "copy", - "singleLine": false - }, - "keys": "ctrl+shift+c" - }, - { - "command": "paste" - }, - { - "command": "find", - "keys": "ctrl+shift+f" - }, - { - "command": "unbound", - "keys": "ctrl+v" - }, - { - "command": "unbound", - "keys": "ctrl+c" - }, - { - "command": - { - "action": "splitPane", - "split": "auto", - "splitMode": "duplicate" - }, - "keys": "alt+shift+d" - } - ], - "copyFormatting": "none", - "copyOnSelect": true, - "defaultProfile": "{48946353-ebe8-4571-a591-7d609f31327a}", - "newTabMenu": - [ - { - "type": "remainingProfiles" - } - ], - "profiles": + "$help": "https://aka.ms/terminal-documentation", + "$schema": "https://aka.ms/terminal-profiles-schema", + "actions": [ { - "defaults": {}, - "list": - [ - { - "colorScheme": "Campbell", - "commandline": "cmd /k \"%CMDER_ROOT%\\vendor\\init.bat\"", - "guid": "{48946353-ebe8-4571-a591-7d609f31327a}", - "hidden": false, - "icon": "%CMDER_ROOT%\\icons\\cmder.ico", - "name": "Cmder", - "startingDirectory": "", - "tabTitle": "Cmder", - "useAtlasEngine": false - }, - { - "commandline": "%SystemRoot%\\System32\\cmd.exe /k \"%CMDER_ROOT%\\vendor\\init.bat\"", - "elevate": true, - "guid": "{bdd957d0-c15a-49e6-9816-14b02351a071}", - "hidden": false, - "icon": "%CMDER_ROOT%\\icons\\cmder_red.ico", - "name": "Cmder as Admin", - "startingDirectory": "", - "tabTitle": "Cmder as Admin" - }, - { - "colorScheme": "Campbell", - "commandline": "PowerShell -ExecutionPolicy Bypass -NoLogo -NoProfile -NoExit -Command \"Invoke-Expression 'Import-Module ''%CMDER_ROOT%\\vendor.\\profile.ps1'''\"", - "guid": "{eb1f6578-ce9d-47a9-a8c7-9b3fdd22302d}", - "hidden": false, - "icon": "%CMDER_ROOT%\\icons\\cmder_orange.ico", - "name": "Cmder - PowerShell", - "startingDirectory": "", - "tabTitle": "Cmder", - "useAtlasEngine": false - }, - { - "colorScheme": "Campbell", - "commandline": "PowerShell -ExecutionPolicy Bypass -NoLogo -NoProfile -NoExit -Command \"Invoke-Expression 'Import-Module ''%CMDER_ROOT%\\vendor.\\profile.ps1'''\"", - "elevate": true, - "guid": "{c5225c3e-8619-4145-8182-2800814eeb17}", - "hidden": false, - "icon": "%CMDER_ROOT%\\icons\\cmder_purple.ico", - "name": "Cmder - PowerShell as Admin", - "startingDirectory": "", - "tabTitle": "Cmder - PowerShell as Admin", - "useAtlasEngine": false - }, - { - "commandline": "%CMDER_ROOT%\\vendor\\start_git_bash.cmd", - "guid": "{c5c298e9-010e-4b8c-bc55-e3df81846b4c}", - "hidden": false, - "icon": "%CMDER_ROOT%\\icons\\cmder_blue.ico", - "name": "Cmder - Bash", - "startingDirectory": "", - "tabTitle": "Cmder - Bash" - }, - { - "commandline": "%CMDER_ROOT%\\vendor\\start_git_bash.cmd", - "elevate": true, - "guid": "{545eb9ed-4c1c-49b3-8cc6-7eb41bd280ff}", - "hidden": false, - "icon": "%CMDER_ROOT%\\icons\\cmder_yellow.ico", - "name": "Cmder - Bash as Admin", - "startingDirectory": "", - "tabTitle": "Cmder - Bash as Admin" - }, - { - "commandline": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe", - "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", - "hidden": false, - "name": "Windows PowerShell" - }, - { - "commandline": "%SystemRoot%\\System32\\cmd.exe", - "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}", - "hidden": false, - "name": "Command Prompt" - } - - ] + "command": { + "action": "copy", + "singleLine": false + }, + "keys": "ctrl+shift+c" }, - "schemes": - [ - { - "background": "#0C0C0C", - "black": "#0C0C0C", - "blue": "#0037DA", - "brightBlack": "#767676", - "brightBlue": "#3B78FF", - "brightCyan": "#61D6D6", - "brightGreen": "#16C60C", - "brightPurple": "#B4009E", - "brightRed": "#E74856", - "brightWhite": "#F2F2F2", - "brightYellow": "#F9F1A5", - "cursorColor": "#FFFFFF", - "cyan": "#3A96DD", - "foreground": "#CCCCCC", - "green": "#13A10E", - "name": "Campbell", - "purple": "#881798", - "red": "#C50F1F", - "selectionBackground": "#FFFFFF", - "white": "#CCCCCC", - "yellow": "#C19C00" - }, - { - "background": "#012456", - "black": "#0C0C0C", - "blue": "#0037DA", - "brightBlack": "#767676", - "brightBlue": "#3B78FF", - "brightCyan": "#61D6D6", - "brightGreen": "#16C60C", - "brightPurple": "#B4009E", - "brightRed": "#E74856", - "brightWhite": "#F2F2F2", - "brightYellow": "#F9F1A5", - "cursorColor": "#FFFFFF", - "cyan": "#3A96DD", - "foreground": "#CCCCCC", - "green": "#13A10E", - "name": "Campbell Powershell", - "purple": "#881798", - "red": "#C50F1F", - "selectionBackground": "#FFFFFF", - "white": "#CCCCCC", - "yellow": "#C19C00" - }, - { - "background": "#282C34", - "black": "#282C34", - "blue": "#61AFEF", - "brightBlack": "#5A6374", - "brightBlue": "#61AFEF", - "brightCyan": "#56B6C2", - "brightGreen": "#98C379", - "brightPurple": "#C678DD", - "brightRed": "#E06C75", - "brightWhite": "#DCDFE4", - "brightYellow": "#E5C07B", - "cursorColor": "#FFFFFF", - "cyan": "#56B6C2", - "foreground": "#DCDFE4", - "green": "#98C379", - "name": "One Half Dark", - "purple": "#C678DD", - "red": "#E06C75", - "selectionBackground": "#FFFFFF", - "white": "#DCDFE4", - "yellow": "#E5C07B" - }, - { - "background": "#FAFAFA", - "black": "#383A42", - "blue": "#0184BC", - "brightBlack": "#4F525D", - "brightBlue": "#61AFEF", - "brightCyan": "#56B5C1", - "brightGreen": "#98C379", - "brightPurple": "#C577DD", - "brightRed": "#DF6C75", - "brightWhite": "#FFFFFF", - "brightYellow": "#E4C07A", - "cursorColor": "#4F525D", - "cyan": "#0997B3", - "foreground": "#383A42", - "green": "#50A14F", - "name": "One Half Light", - "purple": "#A626A4", - "red": "#E45649", - "selectionBackground": "#FFFFFF", - "white": "#FAFAFA", - "yellow": "#C18301" - }, - { - "background": "#002B36", - "black": "#002B36", - "blue": "#268BD2", - "brightBlack": "#073642", - "brightBlue": "#839496", - "brightCyan": "#93A1A1", - "brightGreen": "#586E75", - "brightPurple": "#6C71C4", - "brightRed": "#CB4B16", - "brightWhite": "#FDF6E3", - "brightYellow": "#657B83", - "cursorColor": "#FFFFFF", - "cyan": "#2AA198", - "foreground": "#839496", - "green": "#859900", - "name": "Solarized Dark", - "purple": "#D33682", - "red": "#DC322F", - "selectionBackground": "#FFFFFF", - "white": "#EEE8D5", - "yellow": "#B58900" - }, - { - "background": "#FDF6E3", - "black": "#002B36", - "blue": "#268BD2", - "brightBlack": "#073642", - "brightBlue": "#839496", - "brightCyan": "#93A1A1", - "brightGreen": "#586E75", - "brightPurple": "#6C71C4", - "brightRed": "#CB4B16", - "brightWhite": "#FDF6E3", - "brightYellow": "#657B83", - "cursorColor": "#002B36", - "cyan": "#2AA198", - "foreground": "#657B83", - "green": "#859900", - "name": "Solarized Light", - "purple": "#D33682", - "red": "#DC322F", - "selectionBackground": "#FFFFFF", - "white": "#EEE8D5", - "yellow": "#B58900" - }, - { - "background": "#000000", - "black": "#000000", - "blue": "#3465A4", - "brightBlack": "#555753", - "brightBlue": "#729FCF", - "brightCyan": "#34E2E2", - "brightGreen": "#8AE234", - "brightPurple": "#AD7FA8", - "brightRed": "#EF2929", - "brightWhite": "#EEEEEC", - "brightYellow": "#FCE94F", - "cursorColor": "#FFFFFF", - "cyan": "#06989A", - "foreground": "#D3D7CF", - "green": "#4E9A06", - "name": "Tango Dark", - "purple": "#75507B", - "red": "#CC0000", - "selectionBackground": "#FFFFFF", - "white": "#D3D7CF", - "yellow": "#C4A000" - }, - { - "background": "#FFFFFF", - "black": "#000000", - "blue": "#3465A4", - "brightBlack": "#555753", - "brightBlue": "#729FCF", - "brightCyan": "#34E2E2", - "brightGreen": "#8AE234", - "brightPurple": "#AD7FA8", - "brightRed": "#EF2929", - "brightWhite": "#EEEEEC", - "brightYellow": "#FCE94F", - "cursorColor": "#000000", - "cyan": "#06989A", - "foreground": "#555753", - "green": "#4E9A06", - "name": "Tango Light", - "purple": "#75507B", - "red": "#CC0000", - "selectionBackground": "#FFFFFF", - "white": "#D3D7CF", - "yellow": "#C4A000" - }, - { - "background": "#000000", - "black": "#000000", - "blue": "#000080", - "brightBlack": "#808080", - "brightBlue": "#0000FF", - "brightCyan": "#00FFFF", - "brightGreen": "#00FF00", - "brightPurple": "#FF00FF", - "brightRed": "#FF0000", - "brightWhite": "#FFFFFF", - "brightYellow": "#FFFF00", - "cursorColor": "#FFFFFF", - "cyan": "#008080", - "foreground": "#C0C0C0", - "green": "#008000", - "name": "Vintage", - "purple": "#800080", - "red": "#800000", - "selectionBackground": "#FFFFFF", - "white": "#C0C0C0", - "yellow": "#808000" - } - ], - "themes": - [ - { - "name": "legacyDark", - "tab": - { - "background": null, - "showCloseButton": "always", - "unfocusedBackground": null - }, - "window": - { - "applicationTheme": "dark", - "useMica": false - } - }, - { - "name": "legacyLight", - "tab": - { - "background": null, - "showCloseButton": "always", - "unfocusedBackground": null - }, - "window": - { - "applicationTheme": "light", - "useMica": false - } - }, - { - "name": "legacySystem", - "tab": - { - "background": null, - "showCloseButton": "always", - "unfocusedBackground": null - }, - "window": - { - "applicationTheme": "system", - "useMica": false - } - } - ], - "useAcrylicInTabRow": true, - "wordDelimiters": " ()\"',;<>!@#$%^&*|+=[]{}~?\u2502" + { + "command": "unbound", + "keys": "ctrl+v" + }, + { + "command": "unbound", + "keys": "ctrl+c" + }, + { + "command": "paste" + }, + { + "command": "find", + "keys": "ctrl+shift+f" + }, + { + "command": { + "action": "splitPane", + "split": "auto", + "splitMode": "duplicate" + }, + "keys": "alt+shift+d" + } + ], + "copyFormatting": "none", + "copyOnSelect": true, + "defaultProfile": "{48946353-ebe8-4571-a591-7d609f31327a}", + "newTabMenu": [ + { + "type": "remainingProfiles" + } + ], + "profiles": { + "defaults": { + "colorScheme": "One Half Dark", + "font": { + "face": "Cascadia Code" + } + }, + "list": [ + { + "colorScheme": "One Half Dark", + "commandline": "cmd /k \"%WT_SETTINGS_DIR%\\..\\..\\init.bat\"", + "guid": "{48946353-ebe8-4571-a591-7d609f31327a}", + "hidden": false, + "icon": "%WT_SETTINGS_DIR%\\..\\..\\..\\icons\\cmder.ico", + "name": "Cmder", + "startingDirectory": null, + "tabTitle": "Cmder", + "useAtlasEngine": false + }, + { + "colorScheme": "One Half Dark", + "commandline": "%SystemRoot%\\System32\\cmd.exe /k \"%WT_SETTINGS_DIR%\\..\\..\\init.bat\"", + "elevate": true, + "guid": "{bdd957d0-c15a-49e6-9816-14b02351a071}", + "hidden": false, + "icon": "%WT_SETTINGS_DIR%\\..\\..\\..\\icons\\cmder_red.ico", + "name": "Cmder as Admin", + "startingDirectory": null, + "tabTitle": "Cmder as Admin" + }, + { + "colorScheme": "One Half Dark", + "commandline": "PowerShell -ExecutionPolicy Bypass -NoLogo -NoProfile -NoExit -Command \"Invoke-Expression 'Import-Module ''%WT_SETTINGS_DIR%\\..\\..\\profile.ps1'''\"", + "guid": "{eb1f6578-ce9d-47a9-a8c7-9b3fdd22302d}", + "hidden": false, + "icon": "%WT_SETTINGS_DIR%\\..\\..\\..\\icons\\cmder_orange.ico", + "name": "Cmder - PowerShell", + "startingDirectory": null, + "tabTitle": "Cmder", + "useAtlasEngine": false + }, + { + "colorScheme": "One Half Dark", + "commandline": "PowerShell -ExecutionPolicy Bypass -NoLogo -NoProfile -NoExit -Command \"Invoke-Expression 'Import-Module ''%WT_SETTINGS_DIR%\\..\\..\\profile.ps1'''\"", + "elevate": true, + "guid": "{c5225c3e-8619-4145-8182-2800814eeb17}", + "hidden": false, + "icon": "%WT_SETTINGS_DIR%\\..\\..\\..\\icons\\cmder_purple.ico", + "name": "Cmder - PowerShell as Admin", + "startingDirectory": null, + "tabTitle": "Cmder - PowerShell as Admin", + "useAtlasEngine": false + }, + { + "colorScheme": "One Half Dark", + "commandline": "%WT_SETTINGS_DIR%\\..\\..\\start_git_bash.cmd", + "guid": "{c5c298e9-010e-4b8c-bc55-e3df81846b4c}", + "hidden": false, + "icon": "%WT_SETTINGS_DIR%\\..\\..\\..\\icons\\cmder_blue.ico", + "name": "Cmder - Bash", + "startingDirectory": null, + "tabTitle": "Cmder - Bash" + }, + { + "colorScheme": "One Half Dark", + "commandline": "%WT_SETTINGS_DIR%\\..\\..\\start_git_bash.cmd", + "elevate": true, + "guid": "{545eb9ed-4c1c-49b3-8cc6-7eb41bd280ff}", + "hidden": false, + "icon": "%WT_SETTINGS_DIR%\\..\\..\\..\\icons\\cmder_yellow.ico", + "name": "Cmder - Bash as Admin", + "startingDirectory": null, + "tabTitle": "Cmder - Bash as Admin" + }, + { + "commandline": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe", + "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", + "hidden": false, + "name": "Windows PowerShell" + }, + { + "commandline": "%SystemRoot%\\System32\\cmd.exe", + "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}", + "hidden": false, + "name": "Command Prompt" + } + ] + }, + "schemes": [ + { + "background": "#0C0C0C", + "black": "#0C0C0C", + "blue": "#0037DA", + "brightBlack": "#767676", + "brightBlue": "#3B78FF", + "brightCyan": "#61D6D6", + "brightGreen": "#16C60C", + "brightPurple": "#B4009E", + "brightRed": "#E74856", + "brightWhite": "#F2F2F2", + "brightYellow": "#F9F1A5", + "cursorColor": "#FFFFFF", + "cyan": "#3A96DD", + "foreground": "#CCCCCC", + "green": "#13A10E", + "name": "Campbell", + "purple": "#881798", + "red": "#C50F1F", + "selectionBackground": "#FFFFFF", + "white": "#CCCCCC", + "yellow": "#C19C00" + }, + { + "background": "#012456", + "black": "#0C0C0C", + "blue": "#0037DA", + "brightBlack": "#767676", + "brightBlue": "#3B78FF", + "brightCyan": "#61D6D6", + "brightGreen": "#16C60C", + "brightPurple": "#B4009E", + "brightRed": "#E74856", + "brightWhite": "#F2F2F2", + "brightYellow": "#F9F1A5", + "cursorColor": "#FFFFFF", + "cyan": "#3A96DD", + "foreground": "#CCCCCC", + "green": "#13A10E", + "name": "Campbell Powershell", + "purple": "#881798", + "red": "#C50F1F", + "selectionBackground": "#FFFFFF", + "white": "#CCCCCC", + "yellow": "#C19C00" + }, + { + "background": "#282828", + "black": "#282828", + "blue": "#458588", + "brightBlack": "#928374", + "brightBlue": "#83A598", + "brightCyan": "#8EC07C", + "brightGreen": "#B8BB26", + "brightPurple": "#D3869B", + "brightRed": "#FB4934", + "brightWhite": "#EBDBB2", + "brightYellow": "#FABD2F", + "cursorColor": "#FFFFFF", + "cyan": "#689D6A", + "foreground": "#EBDBB2", + "green": "#98971A", + "name": "Gruvbox Dark", + "purple": "#B16286", + "red": "#CC241D", + "selectionBackground": "#FFFFFF", + "white": "#A89984", + "yellow": "#D79921" + }, + { + "background": "#272822", + "black": "#3E3D32", + "blue": "#03395C", + "brightBlack": "#272822", + "brightBlue": "#66D9EF", + "brightCyan": "#66D9EF", + "brightGreen": "#A6E22E", + "brightPurple": "#AE81FF", + "brightRed": "#F92672", + "brightWhite": "#F8F8F2", + "brightYellow": "#FD971F", + "cursorColor": "#FFFFFF", + "cyan": "#66D9EF", + "foreground": "#F8F8F2", + "green": "#A6E22E", + "name": "Monokai", + "purple": "#AE81FF", + "red": "#F92672", + "selectionBackground": "#FFFFFF", + "white": "#F8F8F2", + "yellow": "#FFE792" + }, + { + "background": "#282C34", + "black": "#282C34", + "blue": "#61AFEF", + "brightBlack": "#5A6374", + "brightBlue": "#61AFEF", + "brightCyan": "#56B6C2", + "brightGreen": "#98C379", + "brightPurple": "#C678DD", + "brightRed": "#E06C75", + "brightWhite": "#DCDFE4", + "brightYellow": "#E5C07B", + "cursorColor": "#FFFFFF", + "cyan": "#56B6C2", + "foreground": "#DCDFE4", + "green": "#98C379", + "name": "One Half Dark", + "purple": "#C678DD", + "red": "#E06C75", + "selectionBackground": "#FFFFFF", + "white": "#DCDFE4", + "yellow": "#E5C07B" + }, + { + "background": "#FAFAFA", + "black": "#383A42", + "blue": "#0184BC", + "brightBlack": "#4F525D", + "brightBlue": "#61AFEF", + "brightCyan": "#56B5C1", + "brightGreen": "#98C379", + "brightPurple": "#C577DD", + "brightRed": "#DF6C75", + "brightWhite": "#FFFFFF", + "brightYellow": "#E4C07A", + "cursorColor": "#4F525D", + "cyan": "#0997B3", + "foreground": "#383A42", + "green": "#50A14F", + "name": "One Half Light", + "purple": "#A626A4", + "red": "#E45649", + "selectionBackground": "#FFFFFF", + "white": "#FAFAFA", + "yellow": "#C18301" + }, + { + "background": "#002B36", + "black": "#002B36", + "blue": "#268BD2", + "brightBlack": "#073642", + "brightBlue": "#839496", + "brightCyan": "#93A1A1", + "brightGreen": "#586E75", + "brightPurple": "#6C71C4", + "brightRed": "#CB4B16", + "brightWhite": "#FDF6E3", + "brightYellow": "#657B83", + "cursorColor": "#FFFFFF", + "cyan": "#2AA198", + "foreground": "#839496", + "green": "#859900", + "name": "Solarized Dark", + "purple": "#D33682", + "red": "#DC322F", + "selectionBackground": "#FFFFFF", + "white": "#EEE8D5", + "yellow": "#B58900" + }, + { + "background": "#FDF6E3", + "black": "#002B36", + "blue": "#268BD2", + "brightBlack": "#073642", + "brightBlue": "#839496", + "brightCyan": "#93A1A1", + "brightGreen": "#586E75", + "brightPurple": "#6C71C4", + "brightRed": "#CB4B16", + "brightWhite": "#FDF6E3", + "brightYellow": "#657B83", + "cursorColor": "#002B36", + "cyan": "#2AA198", + "foreground": "#657B83", + "green": "#859900", + "name": "Solarized Light", + "purple": "#D33682", + "red": "#DC322F", + "selectionBackground": "#FFFFFF", + "white": "#EEE8D5", + "yellow": "#B58900" + }, + { + "background": "#000000", + "black": "#000000", + "blue": "#3465A4", + "brightBlack": "#555753", + "brightBlue": "#729FCF", + "brightCyan": "#34E2E2", + "brightGreen": "#8AE234", + "brightPurple": "#AD7FA8", + "brightRed": "#EF2929", + "brightWhite": "#EEEEEC", + "brightYellow": "#FCE94F", + "cursorColor": "#FFFFFF", + "cyan": "#06989A", + "foreground": "#D3D7CF", + "green": "#4E9A06", + "name": "Tango Dark", + "purple": "#75507B", + "red": "#CC0000", + "selectionBackground": "#FFFFFF", + "white": "#D3D7CF", + "yellow": "#C4A000" + }, + { + "background": "#FFFFFF", + "black": "#000000", + "blue": "#3465A4", + "brightBlack": "#555753", + "brightBlue": "#729FCF", + "brightCyan": "#34E2E2", + "brightGreen": "#8AE234", + "brightPurple": "#AD7FA8", + "brightRed": "#EF2929", + "brightWhite": "#EEEEEC", + "brightYellow": "#FCE94F", + "cursorColor": "#000000", + "cyan": "#06989A", + "foreground": "#555753", + "green": "#4E9A06", + "name": "Tango Light", + "purple": "#75507B", + "red": "#CC0000", + "selectionBackground": "#FFFFFF", + "white": "#D3D7CF", + "yellow": "#C4A000" + }, + { + "background": "#000000", + "black": "#000000", + "blue": "#000080", + "brightBlack": "#808080", + "brightBlue": "#0000FF", + "brightCyan": "#00FFFF", + "brightGreen": "#00FF00", + "brightPurple": "#FF00FF", + "brightRed": "#FF0000", + "brightWhite": "#FFFFFF", + "brightYellow": "#FFFF00", + "cursorColor": "#FFFFFF", + "cyan": "#008080", + "foreground": "#C0C0C0", + "green": "#008000", + "name": "Vintage", + "purple": "#800080", + "red": "#800000", + "selectionBackground": "#FFFFFF", + "white": "#C0C0C0", + "yellow": "#808000" + } + ], + "themes": [], + "useAcrylicInTabRow": true, + "wordDelimiters": " ()\"',;<>!@#$%^&*|+=[]{}~?\u2502" } From db3889d5e5e8df85c7ffbcf932941d0955b0b193 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Thu, 30 May 2024 16:27:43 -0400 Subject: [PATCH 070/203] remove vendor/start_git_mintty.cmd --- vendor/start_git_mintty.cmd | 40 ------------------------------------- 1 file changed, 40 deletions(-) delete mode 100644 vendor/start_git_mintty.cmd diff --git a/vendor/start_git_mintty.cmd b/vendor/start_git_mintty.cmd deleted file mode 100644 index ea4f09a9f..000000000 --- a/vendor/start_git_mintty.cmd +++ /dev/null @@ -1,40 +0,0 @@ -@echo off - -if not defined CMDER_ROOT ( - if defined ConEmuDir ( - for /f "delims=" %%i in ("%ConEmuDir%\..\..") do ( - set "CMDER_ROOT=%%~fi" - ) - ) else ( - for /f "delims=" %%i in ("%~dp0\..") do ( - set "CMDER_ROOT=%%~fi" - ) - ) -) - -if exist "%CMDER_ROOT%\vendor\git-for-windows" ( - set "PATH=%CMDER_ROOT%\vendor\git-for-windows\usr\bin;%PATH%" - set "gitCmd=%CMDER_ROOT%\vendor\git-for-windows\usr\bin\mintty.exe" -) else if exist "%ProgramFiles%\git" ( - set "PATH=%ProgramFiles%\git\usr\bin;%PATH%" - set "gitCmd=%ProgramFiles%\git\usr\bin\mintty.exe" - if not exist "%ProgramFiles%\git\etc\profile.d\cmder_exinit.sh" ( - echo Run 'mklink "%ProgramFiles%\git\etc\profile.d\cmder_exinit.sh" "%CMDER_ROOT%\vendor\cmder_exinit"' in 'cmd::Cmder as Admin' to use Cmder with external Git Bash - echo. - echo or - echo. - echo Run 'echo "" ^> "%ProgramFiles%\git\etc\profile.d\cmder_exinit.sh"' in 'cmd::Cmder as Admin' to disable this message. - ) -) else if exist "%ProgramFiles(x86)%\git" ( - set "PATH=%ProgramFiles(x86)%\git\usr\bin;%PATH%" - set "gitCmd=%ProgramFiles(x86)%\git\usr\bin\mintty.exe" - if not exist "%ProgramFiles(x86)%\git\etc\profile.d\cmder_exinit.sh" ( - echo Run 'mklink "%ProgramFiles^(x86^)%\git\etc\profile.d\cmder_exinit.sh" "%CMDER_ROOT%\vendor\cmder_exinit"' in 'cmd::Cmder as Admin' to use Cmder with external Git Bash - echo. - echo or - echo. - echo Run 'echo "" ^> "%ProgramFiles^(x86^)%\git\etc\profile.d\cmder_exinit.sh"' in 'cmd::Cmder as Admin' to disable this message. - ) -) - -"%gitCmd%" /bin/bash -l From e850f8241da92c627428fd85bdf75b74cf095cb9 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Thu, 30 May 2024 16:37:37 -0400 Subject: [PATCH 071/203] add vendor/start_git_mintty.cmd --- vendor/start_git_mintty.cmd | 40 +++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 vendor/start_git_mintty.cmd diff --git a/vendor/start_git_mintty.cmd b/vendor/start_git_mintty.cmd new file mode 100644 index 000000000..ea4f09a9f --- /dev/null +++ b/vendor/start_git_mintty.cmd @@ -0,0 +1,40 @@ +@echo off + +if not defined CMDER_ROOT ( + if defined ConEmuDir ( + for /f "delims=" %%i in ("%ConEmuDir%\..\..") do ( + set "CMDER_ROOT=%%~fi" + ) + ) else ( + for /f "delims=" %%i in ("%~dp0\..") do ( + set "CMDER_ROOT=%%~fi" + ) + ) +) + +if exist "%CMDER_ROOT%\vendor\git-for-windows" ( + set "PATH=%CMDER_ROOT%\vendor\git-for-windows\usr\bin;%PATH%" + set "gitCmd=%CMDER_ROOT%\vendor\git-for-windows\usr\bin\mintty.exe" +) else if exist "%ProgramFiles%\git" ( + set "PATH=%ProgramFiles%\git\usr\bin;%PATH%" + set "gitCmd=%ProgramFiles%\git\usr\bin\mintty.exe" + if not exist "%ProgramFiles%\git\etc\profile.d\cmder_exinit.sh" ( + echo Run 'mklink "%ProgramFiles%\git\etc\profile.d\cmder_exinit.sh" "%CMDER_ROOT%\vendor\cmder_exinit"' in 'cmd::Cmder as Admin' to use Cmder with external Git Bash + echo. + echo or + echo. + echo Run 'echo "" ^> "%ProgramFiles%\git\etc\profile.d\cmder_exinit.sh"' in 'cmd::Cmder as Admin' to disable this message. + ) +) else if exist "%ProgramFiles(x86)%\git" ( + set "PATH=%ProgramFiles(x86)%\git\usr\bin;%PATH%" + set "gitCmd=%ProgramFiles(x86)%\git\usr\bin\mintty.exe" + if not exist "%ProgramFiles(x86)%\git\etc\profile.d\cmder_exinit.sh" ( + echo Run 'mklink "%ProgramFiles^(x86^)%\git\etc\profile.d\cmder_exinit.sh" "%CMDER_ROOT%\vendor\cmder_exinit"' in 'cmd::Cmder as Admin' to use Cmder with external Git Bash + echo. + echo or + echo. + echo Run 'echo "" ^> "%ProgramFiles^(x86^)%\git\etc\profile.d\cmder_exinit.sh"' in 'cmd::Cmder as Admin' to disable this message. + ) +) + +"%gitCmd%" /bin/bash -l From c5946422e7f56589cd8fd31dd2013fe81a4f3309 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Thu, 30 May 2024 16:42:48 -0400 Subject: [PATCH 072/203] update build workflow to upload cmder_win.zip --- .github/workflows/build.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6e803e63c..bec247f8c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -52,6 +52,13 @@ jobs: working-directory: scripts run: .\pack.ps1 -verbose -terminal all + - name: Upload artifact (cmder_win.zip) + uses: actions/upload-artifact@v3 + with: + path: build/cmder_win.zip + name: cmder_win.zip + if-no-files-found: error + - name: Upload artifact (cmder_wt.zip) uses: actions/upload-artifact@v3 with: From 9463d4ebc4a828d8f4af0732ce94006cfb7c9092 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Thu, 30 May 2024 17:03:37 -0400 Subject: [PATCH 073/203] update build workflow to upload cmder_win* --- .github/workflows/build.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bec247f8c..382362db0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -52,6 +52,20 @@ jobs: working-directory: scripts run: .\pack.ps1 -verbose -terminal all + - name: Upload artifact (cmder_win_mini.zip) + uses: actions/upload-artifact@v3 + with: + path: build/cmder_win_mini.zip + name: cmder_win_mini.zip + if-no-files-found: error + + - name: Upload artifact (cmder_win.7z) + uses: actions/upload-artifact@v3 + with: + path: build/cmder_win.7z + name: cmder_win.7z + if-no-files-found: error + - name: Upload artifact (cmder_win.zip) uses: actions/upload-artifact@v3 with: From f38e0b3e03353a60fb184929e21537aa254dd0b3 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Thu, 30 May 2024 17:21:29 -0400 Subject: [PATCH 074/203] sync --- vendor/windows_terminal_default_settings.json | 826 ++++++++---------- 1 file changed, 386 insertions(+), 440 deletions(-) diff --git a/vendor/windows_terminal_default_settings.json b/vendor/windows_terminal_default_settings.json index 94d9bddc1..908d25453 100644 --- a/vendor/windows_terminal_default_settings.json +++ b/vendor/windows_terminal_default_settings.json @@ -1,444 +1,390 @@ { - "$help": "https://aka.ms/terminal-documentation", - "$schema": "https://aka.ms/terminal-profiles-schema", - "actions": - [ - { - "command": - { - "action": "copy", - "singleLine": false - }, - "keys": "ctrl+shift+c" - }, - { - "command": "paste" - }, - { - "command": "find", - "keys": "ctrl+shift+f" - }, - { - "command": "unbound", - "keys": "ctrl+v" - }, - { - "command": "unbound", - "keys": "ctrl+c" - }, - { - "command": - { - "action": "splitPane", - "split": "auto", - "splitMode": "duplicate" - }, - "keys": "alt+shift+d" - } - ], - "copyFormatting": "none", - "copyOnSelect": true, - "defaultProfile": "{48946353-ebe8-4571-a591-7d609f31327a}", - "newTabMenu": - [ - { - "type": "remainingProfiles" - } - ], - "profiles": + "$help": "https://aka.ms/terminal-documentation", + "$schema": "https://aka.ms/terminal-profiles-schema", + "actions": [ { - "defaults": - { - "colorScheme": "One Half Dark", - "font": - { - "face": "Cascadia Code" - } - }, - "list": - [ - { - "colorScheme": "One Half Dark", - "commandline": "cmd /k \"%CMDER_ROOT%\\vendor\\init.bat\"", - "guid": "{48946353-ebe8-4571-a591-7d609f31327a}", - "hidden": false, - "icon": "%CMDER_ROOT%\\icons\\cmder.ico", - "name": "Cmder", - "startingDirectory": null, - "tabTitle": "Cmder", - "useAtlasEngine": false - }, - { - "colorScheme": "One Half Dark", - "commandline": "%SystemRoot%\\System32\\cmd.exe /k \"%CMDER_ROOT%\\vendor\\init.bat\"", - "elevate": true, - "guid": "{bdd957d0-c15a-49e6-9816-14b02351a071}", - "hidden": false, - "icon": "%CMDER_ROOT%\\icons\\cmder_red.ico", - "name": "Cmder as Admin", - "startingDirectory": null, - "tabTitle": "Cmder as Admin" - }, - { - "colorScheme": "One Half Dark", - "commandline": "PowerShell -ExecutionPolicy Bypass -NoLogo -NoProfile -NoExit -Command \"Invoke-Expression 'Import-Module ''%CMDER_ROOT%\\vendor.\\profile.ps1'''\"", - "guid": "{eb1f6578-ce9d-47a9-a8c7-9b3fdd22302d}", - "hidden": false, - "icon": "%CMDER_ROOT%\\icons\\cmder_orange.ico", - "name": "Cmder - PowerShell", - "startingDirectory": null, - "tabTitle": "Cmder", - "useAtlasEngine": false - }, - { - "colorScheme": "One Half Dark", - "commandline": "PowerShell -ExecutionPolicy Bypass -NoLogo -NoProfile -NoExit -Command \"Invoke-Expression 'Import-Module ''%CMDER_ROOT%\\vendor.\\profile.ps1'''\"", - "elevate": true, - "guid": "{c5225c3e-8619-4145-8182-2800814eeb17}", - "hidden": false, - "icon": "%CMDER_ROOT%\\icons\\cmder_purple.ico", - "name": "Cmder - PowerShell as Admin", - "startingDirectory": null, - "tabTitle": "Cmder - PowerShell as Admin", - "useAtlasEngine": false - }, - { - "colorScheme": "One Half Dark", - "commandline": "%CMDER_ROOT%\\vendor\\start_git_bash.cmd", - "guid": "{c5c298e9-010e-4b8c-bc55-e3df81846b4c}", - "hidden": false, - "icon": "%CMDER_ROOT%\\icons\\cmder_blue.ico", - "name": "Cmder - Bash", - "startingDirectory": null, - "tabTitle": "Cmder - Bash" - }, - { - "colorScheme": "One Half Dark", - "commandline": "%CMDER_ROOT%\\vendor\\start_git_bash.cmd", - "elevate": true, - "guid": "{545eb9ed-4c1c-49b3-8cc6-7eb41bd280ff}", - "hidden": false, - "icon": "%CMDER_ROOT%\\icons\\cmder_yellow.ico", - "name": "Cmder - Bash as Admin", - "startingDirectory": null, - "tabTitle": "Cmder - Bash as Admin" - }, - { - "commandline": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe", - "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", - "hidden": false, - "name": "Windows PowerShell" - }, - { - "commandline": "%SystemRoot%\\System32\\cmd.exe", - "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}", - "hidden": false, - "name": "Command Prompt" - } - - ] + "command": { + "action": "copy", + "singleLine": false + }, + "keys": "ctrl+shift+c" }, - "schemes": - [ - { - "background": "#0C0C0C", - "black": "#0C0C0C", - "blue": "#0037DA", - "brightBlack": "#767676", - "brightBlue": "#3B78FF", - "brightCyan": "#61D6D6", - "brightGreen": "#16C60C", - "brightPurple": "#B4009E", - "brightRed": "#E74856", - "brightWhite": "#F2F2F2", - "brightYellow": "#F9F1A5", - "cursorColor": "#FFFFFF", - "cyan": "#3A96DD", - "foreground": "#CCCCCC", - "green": "#13A10E", - "name": "Campbell", - "purple": "#881798", - "red": "#C50F1F", - "selectionBackground": "#FFFFFF", - "white": "#CCCCCC", - "yellow": "#C19C00" - }, - { - "background": "#012456", - "black": "#0C0C0C", - "blue": "#0037DA", - "brightBlack": "#767676", - "brightBlue": "#3B78FF", - "brightCyan": "#61D6D6", - "brightGreen": "#16C60C", - "brightPurple": "#B4009E", - "brightRed": "#E74856", - "brightWhite": "#F2F2F2", - "brightYellow": "#F9F1A5", - "cursorColor": "#FFFFFF", - "cyan": "#3A96DD", - "foreground": "#CCCCCC", - "green": "#13A10E", - "name": "Campbell Powershell", - "purple": "#881798", - "red": "#C50F1F", - "selectionBackground": "#FFFFFF", - "white": "#CCCCCC", - "yellow": "#C19C00" - }, - { - "background": "#282828", - "black": "#282828", - "blue": "#458588", - "brightBlack": "#928374", - "brightBlue": "#83A598", - "brightCyan": "#8EC07C", - "brightGreen": "#B8BB26", - "brightPurple": "#D3869B", - "brightRed": "#FB4934", - "brightWhite": "#EBDBB2", - "brightYellow": "#FABD2F", - "cursorColor": "#FFFFFF", - "cyan": "#689D6A", - "foreground": "#EBDBB2", - "green": "#98971A", - "name": "Gruvbox Dark", - "purple": "#B16286", - "red": "#CC241D", - "selectionBackground": "#FFFFFF", - "white": "#A89984", - "yellow": "#D79921" - }, - { - "background": "#272822", - "black": "#3E3D32", - "blue": "#03395C", - "brightBlack": "#272822", - "brightBlue": "#66D9EF", - "brightCyan": "#66D9EF", - "brightGreen": "#A6E22E", - "brightPurple": "#AE81FF", - "brightRed": "#F92672", - "brightWhite": "#F8F8F2", - "brightYellow": "#FD971F", - "cursorColor": "#FFFFFF", - "cyan": "#66D9EF", - "foreground": "#F8F8F2", - "green": "#A6E22E", - "name": "Monokai", - "purple": "#AE81FF", - "red": "#F92672", - "selectionBackground": "#FFFFFF", - "white": "#F8F8F2", - "yellow": "#FFE792" - }, - { - "background": "#282C34", - "black": "#282C34", - "blue": "#61AFEF", - "brightBlack": "#5A6374", - "brightBlue": "#61AFEF", - "brightCyan": "#56B6C2", - "brightGreen": "#98C379", - "brightPurple": "#C678DD", - "brightRed": "#E06C75", - "brightWhite": "#DCDFE4", - "brightYellow": "#E5C07B", - "cursorColor": "#FFFFFF", - "cyan": "#56B6C2", - "foreground": "#DCDFE4", - "green": "#98C379", - "name": "One Half Dark", - "purple": "#C678DD", - "red": "#E06C75", - "selectionBackground": "#FFFFFF", - "white": "#DCDFE4", - "yellow": "#E5C07B" - }, - { - "background": "#FAFAFA", - "black": "#383A42", - "blue": "#0184BC", - "brightBlack": "#4F525D", - "brightBlue": "#61AFEF", - "brightCyan": "#56B5C1", - "brightGreen": "#98C379", - "brightPurple": "#C577DD", - "brightRed": "#DF6C75", - "brightWhite": "#FFFFFF", - "brightYellow": "#E4C07A", - "cursorColor": "#4F525D", - "cyan": "#0997B3", - "foreground": "#383A42", - "green": "#50A14F", - "name": "One Half Light", - "purple": "#A626A4", - "red": "#E45649", - "selectionBackground": "#FFFFFF", - "white": "#FAFAFA", - "yellow": "#C18301" - }, - { - "background": "#002B36", - "black": "#002B36", - "blue": "#268BD2", - "brightBlack": "#073642", - "brightBlue": "#839496", - "brightCyan": "#93A1A1", - "brightGreen": "#586E75", - "brightPurple": "#6C71C4", - "brightRed": "#CB4B16", - "brightWhite": "#FDF6E3", - "brightYellow": "#657B83", - "cursorColor": "#FFFFFF", - "cyan": "#2AA198", - "foreground": "#839496", - "green": "#859900", - "name": "Solarized Dark", - "purple": "#D33682", - "red": "#DC322F", - "selectionBackground": "#FFFFFF", - "white": "#EEE8D5", - "yellow": "#B58900" - }, - { - "background": "#FDF6E3", - "black": "#002B36", - "blue": "#268BD2", - "brightBlack": "#073642", - "brightBlue": "#839496", - "brightCyan": "#93A1A1", - "brightGreen": "#586E75", - "brightPurple": "#6C71C4", - "brightRed": "#CB4B16", - "brightWhite": "#FDF6E3", - "brightYellow": "#657B83", - "cursorColor": "#002B36", - "cyan": "#2AA198", - "foreground": "#657B83", - "green": "#859900", - "name": "Solarized Light", - "purple": "#D33682", - "red": "#DC322F", - "selectionBackground": "#FFFFFF", - "white": "#EEE8D5", - "yellow": "#B58900" - }, - { - "background": "#000000", - "black": "#000000", - "blue": "#3465A4", - "brightBlack": "#555753", - "brightBlue": "#729FCF", - "brightCyan": "#34E2E2", - "brightGreen": "#8AE234", - "brightPurple": "#AD7FA8", - "brightRed": "#EF2929", - "brightWhite": "#EEEEEC", - "brightYellow": "#FCE94F", - "cursorColor": "#FFFFFF", - "cyan": "#06989A", - "foreground": "#D3D7CF", - "green": "#4E9A06", - "name": "Tango Dark", - "purple": "#75507B", - "red": "#CC0000", - "selectionBackground": "#FFFFFF", - "white": "#D3D7CF", - "yellow": "#C4A000" - }, - { - "background": "#FFFFFF", - "black": "#000000", - "blue": "#3465A4", - "brightBlack": "#555753", - "brightBlue": "#729FCF", - "brightCyan": "#34E2E2", - "brightGreen": "#8AE234", - "brightPurple": "#AD7FA8", - "brightRed": "#EF2929", - "brightWhite": "#EEEEEC", - "brightYellow": "#FCE94F", - "cursorColor": "#000000", - "cyan": "#06989A", - "foreground": "#555753", - "green": "#4E9A06", - "name": "Tango Light", - "purple": "#75507B", - "red": "#CC0000", - "selectionBackground": "#FFFFFF", - "white": "#D3D7CF", - "yellow": "#C4A000" - }, - { - "background": "#000000", - "black": "#000000", - "blue": "#000080", - "brightBlack": "#808080", - "brightBlue": "#0000FF", - "brightCyan": "#00FFFF", - "brightGreen": "#00FF00", - "brightPurple": "#FF00FF", - "brightRed": "#FF0000", - "brightWhite": "#FFFFFF", - "brightYellow": "#FFFF00", - "cursorColor": "#FFFFFF", - "cyan": "#008080", - "foreground": "#C0C0C0", - "green": "#008000", - "name": "Vintage", - "purple": "#800080", - "red": "#800000", - "selectionBackground": "#FFFFFF", - "white": "#C0C0C0", - "yellow": "#808000" - } - ], - "themes": - [ - { - "name": "legacyDark", - "tab": - { - "background": null, - "showCloseButton": "always", - "unfocusedBackground": null - }, - "window": - { - "applicationTheme": "dark", - "useMica": false - } - }, - { - "name": "legacyLight", - "tab": - { - "background": null, - "showCloseButton": "always", - "unfocusedBackground": null - }, - "window": - { - "applicationTheme": "light", - "useMica": false - } - }, - { - "name": "legacySystem", - "tab": - { - "background": null, - "showCloseButton": "always", - "unfocusedBackground": null - }, - "window": - { - "applicationTheme": "system", - "useMica": false - } - } - ], - "useAcrylicInTabRow": true, - "wordDelimiters": " ()\"',;<>!@#$%^&*|+=[]{}~?\u2502" + { + "command": "unbound", + "keys": "ctrl+v" + }, + { + "command": "unbound", + "keys": "ctrl+c" + }, + { + "command": "paste" + }, + { + "command": "find", + "keys": "ctrl+shift+f" + }, + { + "command": { + "action": "splitPane", + "split": "auto", + "splitMode": "duplicate" + }, + "keys": "alt+shift+d" + } + ], + "copyFormatting": "none", + "copyOnSelect": true, + "defaultProfile": "{48946353-ebe8-4571-a591-7d609f31327a}", + "newTabMenu": [ + { + "type": "remainingProfiles" + } + ], + "profiles": { + "defaults": { + "colorScheme": "One Half Dark", + "font": { + "face": "Cascadia Code" + } + }, + "list": [ + { + "colorScheme": "One Half Dark", + "commandline": "cmd /k \"%WT_SETTINGS_DIR%\\..\\..\\init.bat\"", + "guid": "{48946353-ebe8-4571-a591-7d609f31327a}", + "hidden": false, + "icon": "%WT_SETTINGS_DIR%\\..\\..\\..\\icons\\cmder.ico", + "name": "Cmder", + "startingDirectory": null, + "tabTitle": "Cmder", + "useAtlasEngine": false + }, + { + "colorScheme": "One Half Dark", + "commandline": "%SystemRoot%\\System32\\cmd.exe /k \"%WT_SETTINGS_DIR%\\..\\..\\init.bat\"", + "elevate": true, + "guid": "{bdd957d0-c15a-49e6-9816-14b02351a071}", + "hidden": false, + "icon": "%WT_SETTINGS_DIR%\\..\\..\\..\\icons\\cmder_red.ico", + "name": "Cmder as Admin", + "startingDirectory": null, + "tabTitle": "Cmder as Admin" + }, + { + "colorScheme": "One Half Dark", + "commandline": "PowerShell -ExecutionPolicy Bypass -NoLogo -NoProfile -NoExit -Command \"Invoke-Expression 'Import-Module ''%WT_SETTINGS_DIR%\\..\\..\\profile.ps1'''\"", + "guid": "{eb1f6578-ce9d-47a9-a8c7-9b3fdd22302d}", + "hidden": false, + "icon": "%WT_SETTINGS_DIR%\\..\\..\\..\\icons\\cmder_orange.ico", + "name": "Cmder - PowerShell", + "startingDirectory": null, + "tabTitle": "Cmder", + "useAtlasEngine": false + }, + { + "colorScheme": "One Half Dark", + "commandline": "PowerShell -ExecutionPolicy Bypass -NoLogo -NoProfile -NoExit -Command \"Invoke-Expression 'Import-Module ''%WT_SETTINGS_DIR%\\..\\..\\profile.ps1'''\"", + "elevate": true, + "guid": "{c5225c3e-8619-4145-8182-2800814eeb17}", + "hidden": false, + "icon": "%WT_SETTINGS_DIR%\\..\\..\\..\\icons\\cmder_purple.ico", + "name": "Cmder - PowerShell as Admin", + "startingDirectory": null, + "tabTitle": "Cmder - PowerShell as Admin", + "useAtlasEngine": false + }, + { + "colorScheme": "One Half Dark", + "commandline": "%WT_SETTINGS_DIR%\\..\\..\\start_git_bash.cmd", + "guid": "{c5c298e9-010e-4b8c-bc55-e3df81846b4c}", + "hidden": false, + "icon": "%WT_SETTINGS_DIR%\\..\\..\\..\\icons\\cmder_blue.ico", + "name": "Cmder - Bash", + "startingDirectory": null, + "tabTitle": "Cmder - Bash" + }, + { + "colorScheme": "One Half Dark", + "commandline": "%WT_SETTINGS_DIR%\\..\\..\\start_git_bash.cmd", + "elevate": true, + "guid": "{545eb9ed-4c1c-49b3-8cc6-7eb41bd280ff}", + "hidden": false, + "icon": "%WT_SETTINGS_DIR%\\..\\..\\..\\icons\\cmder_yellow.ico", + "name": "Cmder - Bash as Admin", + "startingDirectory": null, + "tabTitle": "Cmder - Bash as Admin" + }, + { + "commandline": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe", + "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", + "hidden": false, + "name": "Windows PowerShell" + }, + { + "commandline": "%SystemRoot%\\System32\\cmd.exe", + "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}", + "hidden": false, + "name": "Command Prompt" + } + ] + }, + "schemes": [ + { + "background": "#0C0C0C", + "black": "#0C0C0C", + "blue": "#0037DA", + "brightBlack": "#767676", + "brightBlue": "#3B78FF", + "brightCyan": "#61D6D6", + "brightGreen": "#16C60C", + "brightPurple": "#B4009E", + "brightRed": "#E74856", + "brightWhite": "#F2F2F2", + "brightYellow": "#F9F1A5", + "cursorColor": "#FFFFFF", + "cyan": "#3A96DD", + "foreground": "#CCCCCC", + "green": "#13A10E", + "name": "Campbell", + "purple": "#881798", + "red": "#C50F1F", + "selectionBackground": "#FFFFFF", + "white": "#CCCCCC", + "yellow": "#C19C00" + }, + { + "background": "#012456", + "black": "#0C0C0C", + "blue": "#0037DA", + "brightBlack": "#767676", + "brightBlue": "#3B78FF", + "brightCyan": "#61D6D6", + "brightGreen": "#16C60C", + "brightPurple": "#B4009E", + "brightRed": "#E74856", + "brightWhite": "#F2F2F2", + "brightYellow": "#F9F1A5", + "cursorColor": "#FFFFFF", + "cyan": "#3A96DD", + "foreground": "#CCCCCC", + "green": "#13A10E", + "name": "Campbell Powershell", + "purple": "#881798", + "red": "#C50F1F", + "selectionBackground": "#FFFFFF", + "white": "#CCCCCC", + "yellow": "#C19C00" + }, + { + "background": "#282828", + "black": "#282828", + "blue": "#458588", + "brightBlack": "#928374", + "brightBlue": "#83A598", + "brightCyan": "#8EC07C", + "brightGreen": "#B8BB26", + "brightPurple": "#D3869B", + "brightRed": "#FB4934", + "brightWhite": "#EBDBB2", + "brightYellow": "#FABD2F", + "cursorColor": "#FFFFFF", + "cyan": "#689D6A", + "foreground": "#EBDBB2", + "green": "#98971A", + "name": "Gruvbox Dark", + "purple": "#B16286", + "red": "#CC241D", + "selectionBackground": "#FFFFFF", + "white": "#A89984", + "yellow": "#D79921" + }, + { + "background": "#272822", + "black": "#3E3D32", + "blue": "#03395C", + "brightBlack": "#272822", + "brightBlue": "#66D9EF", + "brightCyan": "#66D9EF", + "brightGreen": "#A6E22E", + "brightPurple": "#AE81FF", + "brightRed": "#F92672", + "brightWhite": "#F8F8F2", + "brightYellow": "#FD971F", + "cursorColor": "#FFFFFF", + "cyan": "#66D9EF", + "foreground": "#F8F8F2", + "green": "#A6E22E", + "name": "Monokai", + "purple": "#AE81FF", + "red": "#F92672", + "selectionBackground": "#FFFFFF", + "white": "#F8F8F2", + "yellow": "#FFE792" + }, + { + "background": "#282C34", + "black": "#282C34", + "blue": "#61AFEF", + "brightBlack": "#5A6374", + "brightBlue": "#61AFEF", + "brightCyan": "#56B6C2", + "brightGreen": "#98C379", + "brightPurple": "#C678DD", + "brightRed": "#E06C75", + "brightWhite": "#DCDFE4", + "brightYellow": "#E5C07B", + "cursorColor": "#FFFFFF", + "cyan": "#56B6C2", + "foreground": "#DCDFE4", + "green": "#98C379", + "name": "One Half Dark", + "purple": "#C678DD", + "red": "#E06C75", + "selectionBackground": "#FFFFFF", + "white": "#DCDFE4", + "yellow": "#E5C07B" + }, + { + "background": "#FAFAFA", + "black": "#383A42", + "blue": "#0184BC", + "brightBlack": "#4F525D", + "brightBlue": "#61AFEF", + "brightCyan": "#56B5C1", + "brightGreen": "#98C379", + "brightPurple": "#C577DD", + "brightRed": "#DF6C75", + "brightWhite": "#FFFFFF", + "brightYellow": "#E4C07A", + "cursorColor": "#4F525D", + "cyan": "#0997B3", + "foreground": "#383A42", + "green": "#50A14F", + "name": "One Half Light", + "purple": "#A626A4", + "red": "#E45649", + "selectionBackground": "#FFFFFF", + "white": "#FAFAFA", + "yellow": "#C18301" + }, + { + "background": "#002B36", + "black": "#002B36", + "blue": "#268BD2", + "brightBlack": "#073642", + "brightBlue": "#839496", + "brightCyan": "#93A1A1", + "brightGreen": "#586E75", + "brightPurple": "#6C71C4", + "brightRed": "#CB4B16", + "brightWhite": "#FDF6E3", + "brightYellow": "#657B83", + "cursorColor": "#FFFFFF", + "cyan": "#2AA198", + "foreground": "#839496", + "green": "#859900", + "name": "Solarized Dark", + "purple": "#D33682", + "red": "#DC322F", + "selectionBackground": "#FFFFFF", + "white": "#EEE8D5", + "yellow": "#B58900" + }, + { + "background": "#FDF6E3", + "black": "#002B36", + "blue": "#268BD2", + "brightBlack": "#073642", + "brightBlue": "#839496", + "brightCyan": "#93A1A1", + "brightGreen": "#586E75", + "brightPurple": "#6C71C4", + "brightRed": "#CB4B16", + "brightWhite": "#FDF6E3", + "brightYellow": "#657B83", + "cursorColor": "#002B36", + "cyan": "#2AA198", + "foreground": "#657B83", + "green": "#859900", + "name": "Solarized Light", + "purple": "#D33682", + "red": "#DC322F", + "selectionBackground": "#FFFFFF", + "white": "#EEE8D5", + "yellow": "#B58900" + }, + { + "background": "#000000", + "black": "#000000", + "blue": "#3465A4", + "brightBlack": "#555753", + "brightBlue": "#729FCF", + "brightCyan": "#34E2E2", + "brightGreen": "#8AE234", + "brightPurple": "#AD7FA8", + "brightRed": "#EF2929", + "brightWhite": "#EEEEEC", + "brightYellow": "#FCE94F", + "cursorColor": "#FFFFFF", + "cyan": "#06989A", + "foreground": "#D3D7CF", + "green": "#4E9A06", + "name": "Tango Dark", + "purple": "#75507B", + "red": "#CC0000", + "selectionBackground": "#FFFFFF", + "white": "#D3D7CF", + "yellow": "#C4A000" + }, + { + "background": "#FFFFFF", + "black": "#000000", + "blue": "#3465A4", + "brightBlack": "#555753", + "brightBlue": "#729FCF", + "brightCyan": "#34E2E2", + "brightGreen": "#8AE234", + "brightPurple": "#AD7FA8", + "brightRed": "#EF2929", + "brightWhite": "#EEEEEC", + "brightYellow": "#FCE94F", + "cursorColor": "#000000", + "cyan": "#06989A", + "foreground": "#555753", + "green": "#4E9A06", + "name": "Tango Light", + "purple": "#75507B", + "red": "#CC0000", + "selectionBackground": "#FFFFFF", + "white": "#D3D7CF", + "yellow": "#C4A000" + }, + { + "background": "#000000", + "black": "#000000", + "blue": "#000080", + "brightBlack": "#808080", + "brightBlue": "#0000FF", + "brightCyan": "#00FFFF", + "brightGreen": "#00FF00", + "brightPurple": "#FF00FF", + "brightRed": "#FF0000", + "brightWhite": "#FFFFFF", + "brightYellow": "#FFFF00", + "cursorColor": "#FFFFFF", + "cyan": "#008080", + "foreground": "#C0C0C0", + "green": "#008000", + "name": "Vintage", + "purple": "#800080", + "red": "#800000", + "selectionBackground": "#FFFFFF", + "white": "#C0C0C0", + "yellow": "#808000" + } + ], + "themes": [], + "useAcrylicInTabRow": true, + "wordDelimiters": " ()\"',;<>!@#$%^&*|+=[]{}~?\u2502" } From 2e945fb02b59feada837852007f0c678585f46f9 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Fri, 31 May 2024 18:31:16 -0400 Subject: [PATCH 075/203] Fix launcher overwritting/backing up emulator settings --- launcher/src/CmderLauncher.cpp | 119 ++++++++++++++++++--------------- 1 file changed, 66 insertions(+), 53 deletions(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index b0e8c91ce..055f7db1c 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -290,60 +290,66 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr PathCombine(userCfgPath, userConfigDirPath, L"user-ConEmu.xml"); } - if (wcscmp(cpuCfgPath, L"") == 0 && (PathFileExists(cpuCfgPath) || use_user_cfg == false)) // config/ConEmu-%COMPUTERNAME%.xml file exists or /m was specified on command line, use machine specific config. + if ( PathFileExists(cpuCfgPath) || use_user_cfg == false ) // config/[cpu specific terminal emulator config] file exists or /m was specified on command line, use machine specific config. { if (cfgRoot.length() == 0) // '/c [path]' was NOT specified { - if (!CopyFile(cfgPath, cpuCfgPath, FALSE)) + if (PathFileExists(cfgPath)) // [terminal emulator config] file exists, copy [terminal emulator config] to config/user_[terminal emulator config] file to backup any settings changes from previous sessions. { - if (PathFileExists(windowsTerminalDir)) { - MessageBox(NULL, - (GetLastError() == ERROR_ACCESS_DENIED) - ? L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/windows_terminal_%COMPUTERNAME%_settings.json! Access Denied." - : L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/windows_teerminal_%COMPUTERNAME%_settigns.json!", MB_TITLE, MB_ICONSTOP); - exit(1); - } - else if (PathFileExists(conEmuDir)) + if (!CopyFile(cfgPath, cpuCfgPath, FALSE)) { - MessageBox(NULL, - (GetLastError() == ERROR_ACCESS_DENIED) - ? L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/ConEmu-%COMPUTERNAME%.xml! Access Denied." - : L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/ConEmu-%COMPUTERNAME%.xml!", MB_TITLE, MB_ICONSTOP); - exit(1); + if (PathFileExists(windowsTerminalDir)) + { + MessageBox(NULL, + (GetLastError() == ERROR_ACCESS_DENIED) + ? L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/windows_terminal_%COMPUTERNAME%_settings.json! Access Denied." + : L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/windows_teerminal_%COMPUTERNAME%_settigns.json!", MB_TITLE, MB_ICONSTOP); + exit(1); + } + else if (PathFileExists(conEmuDir)) + { + MessageBox(NULL, + (GetLastError() == ERROR_ACCESS_DENIED) + ? L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/ConEmu-%COMPUTERNAME%.xml! Access Denied." + : L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/ConEmu-%COMPUTERNAME%.xml!", MB_TITLE, MB_ICONSTOP); + exit(1); + } } } - } - else // vendor/conemu-maximus5/ConEmu.xml config file does not exist, copy config/ConEmu-%COMPUTERNAME%.xml to vendor/conemu-maximus5/ConEmu.xml file - { - if (!CopyFile(cpuCfgPath, cfgPath, FALSE)) + else // [terminal emulator config] file does not exist, copy config/[cpu specific terminal emulator config] file to [terminal emulator config] file { - if (PathFileExists(windowsTerminalDir)) { - MessageBox(NULL, - (GetLastError() == ERROR_ACCESS_DENIED) - ? L"Failed to copy config/windows_terminal_%COMPUTERNAME%_settings.json file to vendor/windows-terminal/settings/settings.json! Access Denied." - : L"Failed to copy config/windows_terminal_%COMPUTERNAME%_settings.json file to vendor/windows-terminal/settings/settings.json!", MB_TITLE, MB_ICONSTOP); - exit(1); - } - else if (PathFileExists(conEmuDir)) + if (!CopyFile(cpuCfgPath, cfgPath, FALSE)) { - MessageBox(NULL, - (GetLastError() == ERROR_ACCESS_DENIED) - ? L"Failed to copy config/ConEmu-%COMPUTERNAME%.xml file to vendor/conemu-maximus5/ConEmu.xml! Access Denied." - : L"Failed to copy config/ConEmu-%COMPUTERNAME%.xml file to vendor/conemu-maximus5/ConEmu.xml!", MB_TITLE, MB_ICONSTOP); - exit(1); + if (PathFileExists(windowsTerminalDir)) + { + MessageBox(NULL, + (GetLastError() == ERROR_ACCESS_DENIED) + ? L"Failed to copy config/windows_terminal_%COMPUTERNAME%_settings.json file to vendor/windows-terminal/settings/settings.json! Access Denied." + : L"Failed to copy config/windows_terminal_%COMPUTERNAME%_settings.json file to vendor/windows-terminal/settings/settings.json!", MB_TITLE, MB_ICONSTOP); + exit(1); + } + else if (PathFileExists(conEmuDir)) + { + MessageBox(NULL, + (GetLastError() == ERROR_ACCESS_DENIED) + ? L"Failed to copy config/ConEmu-%COMPUTERNAME%.xml file to vendor/conemu-maximus5/ConEmu.xml! Access Denied." + : L"Failed to copy config/ConEmu-%COMPUTERNAME%.xml file to vendor/conemu-maximus5/ConEmu.xml!", MB_TITLE, MB_ICONSTOP); + exit(1); + } } } } } - else if (wcscmp(userCfgPath, L"") == 0 && PathFileExists(userCfgPath)) // config/user_conemu.xml exists, use it. + else if (PathFileExists(userCfgPath)) // config/user[terminal emulator config] file exists, use it. { if (cfgRoot.length() == 0) // '/c [path]' was NOT specified { - if (PathFileExists(cfgPath)) // vendor/conemu-maximus5/ConEmu.xml exists, copy vendor/conemu-maximus5/ConEmu.xml to config/user_conemu.xml. + if (PathFileExists(cfgPath)) // [terminal emulator config] file exists, copy [terminal emulator config] to config/user_[terminal emulator config] file to backup any settings changes from previous sessions. { if (!CopyFile(cfgPath, userCfgPath, FALSE)) { - if (PathFileExists(windowsTerminalDir)) { + if (PathFileExists(windowsTerminalDir)) + { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) ? L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/windows_terminal_settings.json! Access Denied." @@ -360,11 +366,12 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr } } } - else // vendor/conemu-maximus5/ConEmu.xml does not exist, copy config/user-conemu.xml to vendor/conemu-maximus5/ConEmu.xml + else // [terminal emulator config] file does not exist, copy config/user_[terminal emulator config] file to [terminal emulator config] file { if (!CopyFile(userCfgPath, cfgPath, FALSE)) { - if (PathFileExists(windowsTerminalDir)) { + if (PathFileExists(windowsTerminalDir)) + { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) ? L"Failed to copy config/user_windows_terminal_settings.json file to vendor/windows-terminal/settings/settings.json! Access Denied." @@ -382,17 +389,18 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr } } } - else if (!PathFileExists(windowsTerminalDir)) { // '/c [path]' was specified, don't copy anything and use existing user_conemu.xml to start comemu. + else if (!PathFileExists(windowsTerminalDir)) { // '/c [path]' was specified, don't copy anything and use existing user_[terminal emulator config] file. PathCombine(userConEmuCfgPath, userConfigDirPath, L"user-ConEmu.xml"); } } else if (cfgRoot.length() == 0) // '/c [path]' was NOT specified { - if (PathFileExists(cfgPath)) // vendor/conemu-maximus5/ConEmu.xml exists, copy vendor/conemu-maximus5/ConEmu.xml to config/user_conemu.xml + if (PathFileExists(cfgPath)) // [terminal emulator config] file exists, copy [terminal emulator config] file to config/user_[terminal emulator config] file. { if (!CopyFile(cfgPath, userCfgPath, FALSE)) { - if (PathFileExists(windowsTerminalDir)) { + if (PathFileExists(windowsTerminalDir)) + { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) ? L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/user_windows_terminal_settings.json! Access Denied." @@ -408,11 +416,12 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr exit(1); } } - else // vendor/ConEmu.xml.default config exists, copy Cmder vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml. + else // vendor/[terminal emulator config].default config exists, copy Cmder vendor/[terminal emulator config].default file to [terminal emulator config] file. { if (!CopyFile(defaultCfgPath, cfgPath, FALSE)) { - if (PathFileExists(windowsTerminalDir)) { + if (PathFileExists(windowsTerminalDir)) + { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) ? L"Failed to copy vendor/windows-terminal_default_settings_settings.json file to vendor/windows-terminal/settings/settings.json! Access Denied." @@ -430,20 +439,23 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr } } } - else if (!CopyFile(defaultCfgPath, cfgPath, FALSE) && PathFileExists(conEmuDir)) - { - MessageBox(NULL, - (GetLastError() == ERROR_ACCESS_DENIED) - ? L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml! Access Denied." - : L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml!", MB_TITLE, MB_ICONSTOP); - exit(1); + else { + if (!CopyFile(defaultCfgPath, cfgPath, FALSE) && PathFileExists(conEmuDir)) + { + MessageBox(NULL, + (GetLastError() == ERROR_ACCESS_DENIED) + ? L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml! Access Denied." + : L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml!", MB_TITLE, MB_ICONSTOP); + exit(1); + } } } - else if (wcscmp(cfgPath, L"") == 0 && PathFileExists(cfgPath)) // vendor/conemu-maximus5/ConEmu.xml exists, copy vendor/conemu-maximus5/ConEmu.xml to config/user_conemu.xml + else if (PathFileExists(cfgPath)) // This is a first time Cmder.exe run and [terminal emulator config] file exists, copy [terminal emulator config] file to config/user_[terminal emulator config] file. { if (!CopyFile(cfgPath, userCfgPath, FALSE)) { - if (PathFileExists(windowsTerminalDir)) { + if (PathFileExists(windowsTerminalDir)) + { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) ? L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/user_windows_terminal_settings_settings.json! Access Denied." @@ -462,11 +474,12 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr PathCombine(userConEmuCfgPath, userConfigDirPath, L"user-ConEmu.xml"); } - else if (wcscmp(defaultCfgPath, L"") == 0) // '/c [path]' was specified and 'vendor/ConEmu.xml.default' config exists, copy Cmder 'vendor/ConEmu.xml.default' file to '[user specified path]/config/user_ConEmu.xml'. + else if (wcscmp(defaultCfgPath, L"") == 0) // '/c [path]' was specified and 'vendor/[terminal emulator config].default' config exists, copy Cmder 'vendor/[terminal emulator config].default' file to '[user specified path]/config/user_[terminal emulator config]'. { if ( ! CopyFile(defaultCfgPath, userCfgPath, FALSE)) { - if (PathFileExists(windowsTerminalDir)) { + if (PathFileExists(windowsTerminalDir)) + { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) ? L"Failed to copy vendor/windows-terminal_default_settings_settings.json file to [user specified path]/config/user_windows_terminal_settings.json! Access Denied." From 82ab068f12ecf7f020ac8d4365d1f1408c8f2e23 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Thu, 15 Aug 2024 10:24:02 -0400 Subject: [PATCH 076/203] cleanup --- launcher/src/CmderLauncher.cpp | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index 055f7db1c..e1aa2d559 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -298,8 +298,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr { if (!CopyFile(cfgPath, cpuCfgPath, FALSE)) { - if (PathFileExists(windowsTerminalDir)) - { + if (PathFileExists(windowsTerminalDir)) { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) ? L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/windows_terminal_%COMPUTERNAME%_settings.json! Access Denied." @@ -320,8 +319,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr { if (!CopyFile(cpuCfgPath, cfgPath, FALSE)) { - if (PathFileExists(windowsTerminalDir)) - { + if (PathFileExists(windowsTerminalDir)) { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) ? L"Failed to copy config/windows_terminal_%COMPUTERNAME%_settings.json file to vendor/windows-terminal/settings/settings.json! Access Denied." @@ -348,8 +346,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr { if (!CopyFile(cfgPath, userCfgPath, FALSE)) { - if (PathFileExists(windowsTerminalDir)) - { + if (PathFileExists(windowsTerminalDir)) { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) ? L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/windows_terminal_settings.json! Access Denied." @@ -370,8 +367,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr { if (!CopyFile(userCfgPath, cfgPath, FALSE)) { - if (PathFileExists(windowsTerminalDir)) - { + if (PathFileExists(windowsTerminalDir)) { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) ? L"Failed to copy config/user_windows_terminal_settings.json file to vendor/windows-terminal/settings/settings.json! Access Denied." @@ -399,8 +395,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr { if (!CopyFile(cfgPath, userCfgPath, FALSE)) { - if (PathFileExists(windowsTerminalDir)) - { + if (PathFileExists(windowsTerminalDir)) { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) ? L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/user_windows_terminal_settings.json! Access Denied." @@ -420,8 +415,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr { if (!CopyFile(defaultCfgPath, cfgPath, FALSE)) { - if (PathFileExists(windowsTerminalDir)) - { + if (PathFileExists(windowsTerminalDir)) { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) ? L"Failed to copy vendor/windows-terminal_default_settings_settings.json file to vendor/windows-terminal/settings/settings.json! Access Denied." @@ -439,8 +433,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr } } } - else { - if (!CopyFile(defaultCfgPath, cfgPath, FALSE) && PathFileExists(conEmuDir)) + else if (!CopyFile(defaultCfgPath, cfgPath, FALSE) && PathFileExists(conEmuDir)) { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) @@ -454,8 +447,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr { if (!CopyFile(cfgPath, userCfgPath, FALSE)) { - if (PathFileExists(windowsTerminalDir)) - { + if (PathFileExists(windowsTerminalDir)) { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) ? L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/user_windows_terminal_settings_settings.json! Access Denied." @@ -478,8 +470,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr { if ( ! CopyFile(defaultCfgPath, userCfgPath, FALSE)) { - if (PathFileExists(windowsTerminalDir)) - { + if (PathFileExists(windowsTerminalDir)) { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) ? L"Failed to copy vendor/windows-terminal_default_settings_settings.json file to [user specified path]/config/user_windows_terminal_settings.json! Access Denied." From 8e44dafdba05fbd5b794a7a60b7682df6a4afb9b Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Tue, 20 Aug 2024 12:13:07 +0000 Subject: [PATCH 077/203] Sync --- launcher/src/CmderLauncher.cpp | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index e6d0ad10a..b0af69daf 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -308,8 +308,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr { if (!CopyFile(cfgPath, cpuCfgPath, FALSE)) { - if (PathFileExists(windowsTerminalDir)) - { + if (PathFileExists(windowsTerminalDir)) { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) ? L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/windows_terminal_%COMPUTERNAME%_settings.json! Access Denied." @@ -330,8 +329,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr { if (!CopyFile(cpuCfgPath, cfgPath, FALSE)) { - if (PathFileExists(windowsTerminalDir)) - { + if (PathFileExists(windowsTerminalDir)) { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) ? L"Failed to copy config/windows_terminal_%COMPUTERNAME%_settings.json file to vendor/windows-terminal/settings/settings.json! Access Denied." @@ -358,8 +356,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr { if (!CopyFile(cfgPath, userCfgPath, FALSE)) { - if (PathFileExists(windowsTerminalDir)) - { + if (PathFileExists(windowsTerminalDir)) { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) ? L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/windows_terminal_settings.json! Access Denied." @@ -380,8 +377,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr { if (!CopyFile(userCfgPath, cfgPath, FALSE)) { - if (PathFileExists(windowsTerminalDir)) - { + if (PathFileExists(windowsTerminalDir)) { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) ? L"Failed to copy config/user_windows_terminal_settings.json file to vendor/windows-terminal/settings/settings.json! Access Denied." @@ -409,8 +405,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr { if (!CopyFile(cfgPath, userCfgPath, FALSE)) { - if (PathFileExists(windowsTerminalDir)) - { + if (PathFileExists(windowsTerminalDir)) { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) ? L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/user_windows_terminal_settings.json! Access Denied." @@ -430,8 +425,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr { if (!CopyFile(defaultCfgPath, cfgPath, FALSE)) { - if (PathFileExists(windowsTerminalDir)) - { + if (PathFileExists(windowsTerminalDir)) { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) ? L"Failed to copy vendor/windows-terminal_default_settings_settings.json file to vendor/windows-terminal/settings/settings.json! Access Denied." @@ -462,8 +456,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr { if (!CopyFile(cfgPath, userCfgPath, FALSE)) { - if (PathFileExists(windowsTerminalDir)) - { + if (PathFileExists(windowsTerminalDir)) { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) ? L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/user_windows_terminal_settings_settings.json! Access Denied." @@ -486,8 +479,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr { if (!CopyFile(defaultCfgPath, userCfgPath, FALSE)) { - if (PathFileExists(windowsTerminalDir)) - { + if (PathFileExists(windowsTerminalDir)) { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) ? L"Failed to copy vendor/windows-terminal_default_settings_settings.json file to [user specified path]/config/user_windows_terminal_settings.json! Access Denied." From f4f6255c1a9dd16b2e0fa68c469790842e07fe8e Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Tue, 20 Aug 2024 12:25:33 +0000 Subject: [PATCH 078/203] remove extra {} --- launcher/src/CmderLauncher.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index e1aa2d559..1a70b4a09 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -434,13 +434,12 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr } } else if (!CopyFile(defaultCfgPath, cfgPath, FALSE) && PathFileExists(conEmuDir)) - { - MessageBox(NULL, - (GetLastError() == ERROR_ACCESS_DENIED) - ? L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml! Access Denied." - : L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml!", MB_TITLE, MB_ICONSTOP); - exit(1); - } + { + MessageBox(NULL, + (GetLastError() == ERROR_ACCESS_DENIED) + ? L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml! Access Denied." + : L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml!", MB_TITLE, MB_ICONSTOP); + exit(1); } } else if (PathFileExists(cfgPath)) // This is a first time Cmder.exe run and [terminal emulator config] file exists, copy [terminal emulator config] file to config/user_[terminal emulator config] file. @@ -468,7 +467,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr } else if (wcscmp(defaultCfgPath, L"") == 0) // '/c [path]' was specified and 'vendor/[terminal emulator config].default' config exists, copy Cmder 'vendor/[terminal emulator config].default' file to '[user specified path]/config/user_[terminal emulator config]'. { - if ( ! CopyFile(defaultCfgPath, userCfgPath, FALSE)) +if ( ! CopyFile(defaultCfgPath, userCfgPath, FALSE)) { if (PathFileExists(windowsTerminalDir)) { MessageBox(NULL, From d047236d3750a3a23ec12a246f3d831271964785 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Thu, 22 Aug 2024 12:22:39 +0000 Subject: [PATCH 079/203] x --- launcher/src/CmderLauncher.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index 940f19b12..e1807147e 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -452,7 +452,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr exit(1); } } - else if (PathFileExists(cfgPath)) // vendor/conemu-maximus5/ConEmu.xml exists, copy vendor/conemu-maximus5/ConEmu.xml to config/user_conemu.xml + else if (PathFileExists(cfgPath)) // This is a first time Cmder.exe run and [terminal emulator config] file exists, copy [terminal emulator config] file to config/user_[terminal emulator config] file. { if (!CopyFile(cfgPath, userCfgPath, FALSE)) { @@ -1045,4 +1045,4 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance, StartCmder(cmderOptions.cmderStart, cmderOptions.cmderSingle, cmderOptions.cmderTask, cmderOptions.cmderTitle, cmderOptions.cmderIcon, cmderOptions.cmderCfgRoot, cmderOptions.cmderUserCfg, cmderOptions.cmderTerminalArgs, cmderOptions.cmderAdmin); } return 0; -} \ No newline at end of file +} From f11b1cbca5c7f605a8fd37fa56c86e3ecb4ac0f0 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sun, 22 Dec 2024 14:31:05 -0500 Subject: [PATCH 080/203] x --- config/Readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/Readme.md b/config/Readme.md index c8befd282..4729de95f 100644 --- a/config/Readme.md +++ b/config/Readme.md @@ -1,6 +1,6 @@ ## Config -All config files must be in this folder. If there is no option to set this folder +All config files must be in this folder. If there is no option to set this folder directly, it has to be hardlinked. * `user_aliases.cmd`: aliases in cmd; called from vendor\init.bat; autocreated from From ebce8479ef7736b591d81b1c53517f1063706953 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sun, 29 Dec 2024 16:23:59 -0500 Subject: [PATCH 081/203] origin/fix_launcher_overwrite --- launcher/src/CmderLauncher.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index 1a70b4a09..94a719f32 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -290,7 +290,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr PathCombine(userCfgPath, userConfigDirPath, L"user-ConEmu.xml"); } - if ( PathFileExists(cpuCfgPath) || use_user_cfg == false ) // config/[cpu specific terminal emulator config] file exists or /m was specified on command line, use machine specific config. + if ( PathFileExists(cpuCfgPath) || use_user_cfg == false ) // config/[host specific terminal emulator config] file exists or /m was specified on command line, use machine specific config. { if (cfgRoot.length() == 0) // '/c [path]' was NOT specified { @@ -315,7 +315,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr } } } - else // [terminal emulator config] file does not exist, copy config/[cpu specific terminal emulator config] file to [terminal emulator config] file + else // [terminal emulator config] file does not exist, copy config/[host specific terminal emulator config] file to [terminal emulator config] file { if (!CopyFile(cpuCfgPath, cfgPath, FALSE)) { From 8ea276d9bd3ebf1b57c3de1854cb6626d134aeda Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Wed, 1 Jan 2025 22:15:34 -0500 Subject: [PATCH 082/203] not set --- launcher/src/CmderLauncher.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index b0e8c91ce..cc1c3ea47 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -289,8 +289,12 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr // Set path to Cmder user ConEmu config file PathCombine(userCfgPath, userConfigDirPath, L"user-ConEmu.xml"); } + + // Check if the user has specified a config file to use + // If cpuCfgPath is set and exists, use it. + // If userCfgPath is set and exists, use it. - if (wcscmp(cpuCfgPath, L"") == 0 && (PathFileExists(cpuCfgPath) || use_user_cfg == false)) // config/ConEmu-%COMPUTERNAME%.xml file exists or /m was specified on command line, use machine specific config. + if (wcscmp(cpuCfgPath, L"") != 0 && (PathFileExists(cpuCfgPath) || use_user_cfg == false)) // config/ConEmu-%COMPUTERNAME%.xml file exists or /m was specified on command line, use machine specific config. { if (cfgRoot.length() == 0) // '/c [path]' was NOT specified { @@ -335,7 +339,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr } } } - else if (wcscmp(userCfgPath, L"") == 0 && PathFileExists(userCfgPath)) // config/user_conemu.xml exists, use it. + else if (wcscmp(userCfgPath, L"") != 0 && PathFileExists(userCfgPath)) // config/user_conemu.xml exists, use it. { if (cfgRoot.length() == 0) // '/c [path]' was NOT specified { @@ -439,7 +443,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr exit(1); } } - else if (wcscmp(cfgPath, L"") == 0 && PathFileExists(cfgPath)) // vendor/conemu-maximus5/ConEmu.xml exists, copy vendor/conemu-maximus5/ConEmu.xml to config/user_conemu.xml + else if (wcscmp(cfgPath, L"") != 0 && PathFileExists(cfgPath)) // vendor/conemu-maximus5/ConEmu.xml exists, copy vendor/conemu-maximus5/ConEmu.xml to config/user_conemu.xml { if (!CopyFile(cfgPath, userCfgPath, FALSE)) { @@ -462,7 +466,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr PathCombine(userConEmuCfgPath, userConfigDirPath, L"user-ConEmu.xml"); } - else if (wcscmp(defaultCfgPath, L"") == 0) // '/c [path]' was specified and 'vendor/ConEmu.xml.default' config exists, copy Cmder 'vendor/ConEmu.xml.default' file to '[user specified path]/config/user_ConEmu.xml'. + else if (wcscmp(defaultCfgPath, L"") != 0) // '/c [path]' was specified and 'vendor/ConEmu.xml.default' config exists, copy Cmder 'vendor/ConEmu.xml.default' file to '[user specified path]/config/user_ConEmu.xml'. { if ( ! CopyFile(defaultCfgPath, userCfgPath, FALSE)) { From 9b5be7bd53c09c9b4af384a080cb54f0e3784ce9 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Wed, 1 Jan 2025 22:29:41 -0500 Subject: [PATCH 083/203] cleanup --- launcher/src/CmderLauncher.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index 1e15e29f1..2b18ad2ab 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -290,10 +290,6 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr PathCombine(userCfgPath, userConfigDirPath, L"user-ConEmu.xml"); } - // Check if the user has specified a config file to use - // If cpuCfgPath is set and exists, use it. - // If userCfgPath is set and exists, use it. - if (wcscmp(cpuCfgPath, L"") != 0 && (PathFileExists(cpuCfgPath) || use_user_cfg == false)) // config/[host specific terminal emulator config] file exists or /m was specified on command line, use machine specific config. { if (cfgRoot.length() == 0) // '/c [path]' was NOT specified From 05f616fd769fb5874159c9937e83912c478399df Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Wed, 1 Jan 2025 22:32:37 -0500 Subject: [PATCH 084/203] cleanup --- launcher/src/CmderLauncher.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index 2b18ad2ab..f565f4786 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -436,9 +436,9 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr else if (!CopyFile(defaultCfgPath, cfgPath, FALSE) && PathFileExists(conEmuDir)) { MessageBox(NULL, - (GetLastError() == ERROR_ACCESS_DENIED) - ? L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml! Access Denied." - : L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml!", MB_TITLE, MB_ICONSTOP); + (GetLastError() == ERROR_ACCESS_DENIED) + ? L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml! Access Denied." + : L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml!", MB_TITLE, MB_ICONSTOP); exit(1); } } From 74d7dd211f2c204cd00b2d0c4ebdd1e7ca4d0c5a Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Wed, 1 Jan 2025 22:49:02 -0500 Subject: [PATCH 085/203] cleanup --- launcher/src/CmderLauncher.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index f565f4786..8d7864feb 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -437,7 +437,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) - ? L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml! Access Denied." + ? L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml! Access Denied." : L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml!", MB_TITLE, MB_ICONSTOP); exit(1); } From 0c2e5ce1f2379e4bef10845ca1191c1bf96a03b3 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sun, 5 Jan 2025 19:28:51 -0500 Subject: [PATCH 086/203] CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b22a1917..160f91a7f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## Unreleased + +### Adds + +- Cmder for Windows + - Cmder for Windows uses Windows Native Terminals and does not contain ConEmu. + ## [1.3.20](https://github.com/cmderdev/cmder/tree/v1.3.20) (2022-03-18) ### Changes From e0aa20a080fd43ab66d87f8b9d739e60de129892 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sun, 5 Jan 2025 19:38:45 -0500 Subject: [PATCH 087/203] CHANGELOG.md --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 160f91a7f..7bf89cb98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,8 @@ ### Adds - Cmder for Windows - - Cmder for Windows uses Windows Native Terminals and does not contain ConEmu. + - Uses Windows and Git for Windows Native Terminals. + - Does not contain a terminal emulator like COnEmu or Windows Terminal.. ## [1.3.20](https://github.com/cmderdev/cmder/tree/v1.3.20) (2022-03-18) From 06349694f03d88c3b72201fd96784052305be871 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sun, 5 Jan 2025 19:46:59 -0500 Subject: [PATCH 088/203] CHANGELOG.md --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b22a1917..6962c14fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## Unreleased + +### Fixes + +- Fixes [[Bug] development builds cmder.exe always overwrites the terminal emulator settings files.](#2940) + ## [1.3.20](https://github.com/cmderdev/cmder/tree/v1.3.20) (2022-03-18) ### Changes From b4120362621feaf37b786388a3a3a7065dfa35ea Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sun, 5 Jan 2025 19:52:28 -0500 Subject: [PATCH 089/203] CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6962c14fa..c8fd4eae2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ ### Fixes -- Fixes [[Bug] development builds cmder.exe always overwrites the terminal emulator settings files.](#2940) +- Fixes #2940 ## [1.3.20](https://github.com/cmderdev/cmder/tree/v1.3.20) (2022-03-18) From d349f57e78f09cbfbe7be168879d1900e3038cd2 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sun, 5 Jan 2025 20:19:40 -0500 Subject: [PATCH 090/203] add executionpolicy bypass --- vendor/init.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/init.bat b/vendor/init.bat index fafb0ee82..a010ba994 100644 --- a/vendor/init.bat +++ b/vendor/init.bat @@ -540,7 +540,7 @@ if "%CMDER_ALIASES%" == "1" if exist "%CMDER_ROOT%\bin\alias.bat" if exist "%CMD set initialConfig= if not exist "%CMDER_CONFIG_DIR%\user_init.cmd" ( - powershell -f "%cmder_root%\vendor\bin\create-cmdercfg.ps1" -shell cmd -outfile "%CMDER_CONFIG_DIR%\user_init.cmd" + powershell -executionpolicy bypass -f "%cmder_root%\vendor\bin\create-cmdercfg.ps1" -shell cmd -outfile "%CMDER_CONFIG_DIR%\user_init.cmd" if not exist "%CMDER_ROOT%\config\user_init.cmd" ( %print_error% "Failed to generate Cmder config" From 8683dad1118204ae4817cddf617c783ec7a08336 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sun, 5 Jan 2025 22:07:27 -0500 Subject: [PATCH 091/203] Remove /a switch and associated code. --- launcher/CmderLauncher.vcxproj | 3 ++ launcher/src/CmderLauncher.cpp | 63 ++++++------------------ launcher/src/resource.rc | 89 ++++++++++++++++++++-------------- 3 files changed, 70 insertions(+), 85 deletions(-) diff --git a/launcher/CmderLauncher.vcxproj b/launcher/CmderLauncher.vcxproj index 2662957c9..6d49ed943 100644 --- a/launcher/CmderLauncher.vcxproj +++ b/launcher/CmderLauncher.vcxproj @@ -188,6 +188,9 @@ + + + diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index 7f505e1e0..76e22434d 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -105,11 +105,11 @@ 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 title = L"", std::wstring iconPath = L"", std::wstring cfgRoot = L"", bool use_user_cfg = true, std::wstring conemu_args = L"", bool admin = false) +void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstring taskName = L"", std::wstring title = L"", std::wstring iconPath = 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 }; -#endif + #if USE_TASKBAR_API + wchar_t appId[MAX_PATH] = { 0 }; + #endif wchar_t exeDir[MAX_PATH] = { 0 }; wchar_t icoPath[MAX_PATH] = { 0 }; wchar_t cfgPath[MAX_PATH] = { 0 }; @@ -153,9 +153,9 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr GetModuleFileName(NULL, exeDir, sizeof(exeDir)); -#if USE_TASKBAR_API - wcscpy_s(appId, exeDir); -#endif + #if USE_TASKBAR_API + wcscpy_s(appId, exeDir); + #endif PathRemoveFileSpec(exeDir); @@ -651,44 +651,13 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr STARTUPINFO si = { 0 }; si.cb = sizeof(STARTUPINFO); -#if USE_TASKBAR_API - si.lpTitle = appId; - si.dwFlags = STARTF_TITLEISAPPID; -#endif + #if USE_TASKBAR_API + si.lpTitle = appId; + si.dwFlags = STARTF_TITLEISAPPID; + #endif PROCESS_INFORMATION pi; - // MessageBox(NULL, terminalPath, _T("Error"), MB_OK); - // MessageBox(NULL, args, _T("Error"), MB_OK); - // Let's try to rerun as Administrator - SHELLEXECUTEINFO sei = { sizeof(sei) }; - sei.fMask = SEE_MASK_NOASYNC | SEE_MASK_NOCLOSEPROCESS; - sei.lpVerb = L"runas"; - sei.lpFile = terminalPath; - sei.lpParameters = args; - sei.nShow = SW_SHOWNORMAL; - - if (admin && ShellExecuteEx(&sei)) - { - if (!sei.hProcess) - { - Sleep(500); - _ASSERTE(sei.hProcess != nullptr); - } - - if (sei.hProcess) - { - WaitForSingleObject(sei.hProcess, INFINITE); - } - - // int nZone = 0; - // if (!HasZoneIdentifier(lsFile, nZone) - // || (nZone != 0 /*LocalComputer*/)) - // { - // // Assuming that elevated copy has fixed all zone problems - // break; - // } - } - else if (!CreateProcess(terminalPath, args, NULL, NULL, false, 0, NULL, NULL, &si, &pi)) + if (!CreateProcess(terminalPath, args, NULL, NULL, false, 0, NULL, NULL, &si, &pi)) { if (PathFileExists(windowsTerminalDir)) { @@ -819,7 +788,6 @@ struct cmderOptions std::wstring cmderIcon = L""; std::wstring cmderRegScope = L"USER"; std::wstring cmderTerminalArgs = L""; - bool cmderAdmin = false; bool cmderSingle = false; bool cmderUserCfg = true; bool registerApp = false; @@ -908,10 +876,6 @@ cmderOptions GetOption() { cmderOptions.cmderUserCfg = false; } - else if (_wcsicmp(L"/a", szArgList[i]) == 0 && !PathFileExists(windowsTerminalDir) && !PathFileExists(conEmuDir)) - { - cmderOptions.cmderAdmin = true; - } else if (_wcsicmp(L"/register", szArgList[i]) == 0) { cmderOptions.registerApp = true; @@ -1048,7 +1012,8 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance, } else { - StartCmder(cmderOptions.cmderStart, cmderOptions.cmderSingle, cmderOptions.cmderTask, cmderOptions.cmderTitle, cmderOptions.cmderIcon, cmderOptions.cmderCfgRoot, cmderOptions.cmderUserCfg, cmderOptions.cmderTerminalArgs, cmderOptions.cmderAdmin); } + StartCmder(cmderOptions.cmderStart, cmderOptions.cmderSingle, cmderOptions.cmderTask, cmderOptions.cmderTitle, cmderOptions.cmderIcon, cmderOptions.cmderCfgRoot, cmderOptions.cmderUserCfg, cmderOptions.cmderTerminalArgs); + } return 0; } \ No newline at end of file diff --git a/launcher/src/resource.rc b/launcher/src/resource.rc index 5960625a6..3d7b4f714 100644 --- a/launcher/src/resource.rc +++ b/launcher/src/resource.rc @@ -1,15 +1,6 @@ -/* _ - ___ _ __ ___ __| | ___ _ __ - / __| '_ ` _ \ / _` |/ _ \ '__| -| (__| | | | | | (_| | __/ | - \___|_| |_| |_|\__,_|\___|_| -============================================================================= - The Cmder Console Emulator Project -*/ - +// Microsoft Visual C++ generated resource script. +// #include "resource.h" -#include "version.rc2" -#include "strings.rc2" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// @@ -26,6 +17,7 @@ #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// @@ -33,25 +25,26 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // TEXTINCLUDE // -1 TEXTINCLUDE +1 TEXTINCLUDE BEGIN -"resource.h\0" + "resource.h\0" END -2 TEXTINCLUDE +2 TEXTINCLUDE BEGIN -"#include ""winres.h""\r\n" -"\0" + "#include ""winres.h""\r\n" + "\0" END -3 TEXTINCLUDE +3 TEXTINCLUDE BEGIN -"\r\n" -"\0" + "\r\n" + "\0" END #endif // APSTUDIO_INVOKED + ///////////////////////////////////////////////////////////////////////////// // // Icon @@ -60,8 +53,7 @@ END // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. IDI_CMDER ICON "..\\..\\icons\\cmder.ico" -#endif // English (United States) resources -///////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////// // @@ -69,26 +61,30 @@ IDI_CMDER ICON "..\\..\\icons\\cmder.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION CMDER_MAJOR_VERSION,CMDER_MINOR_VERSION,CMDER_REVISION_VERSION,CMDER_BUILD_VERSION - PRODUCTVERSION CMDER_MAJOR_VERSION,CMDER_MINOR_VERSION,CMDER_REVISION_VERSION,CMDER_BUILD_VERSION - FILEFLAGSMASK VS_FFI_FILEFLAGSMASK - FILEFLAGS (CMDER_DEBUGFLAG | CMDER_BUILDFLAGS) - FILEOS VOS_NT_WINDOWS32 - FILETYPE VFT_APP - FILESUBTYPE VFT2_UNKNOWN + FILEVERSION 1,3,6,1 + PRODUCTVERSION 1,3,6,1 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x40004L + FILETYPE 0x1L + FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "100904b0" BEGIN - VALUE "CompanyName", CMDER_COMPANY_NAME_STR "\0" - VALUE "FileDescription", CMDER_FILE_DESCRIPTION_STR "\0" - VALUE "FileVersion", CMDER_VERSION_STR "\0" - VALUE "InternalName", CMDER_INTERNAL_NAME_STR "\0" - VALUE "LegalCopyright", "Copyright (C) " CMDER_COPYRIGHT_YEAR_STR " " CMDER_COMPANY_NAME_STR "\0" - VALUE "OriginalFilename", CMDER_ORIGINAL_FILENAME_STR "\0" - VALUE "ProductName", CMDER_PRODUCT_NAME_STR "\0" - VALUE "ProductVersion", CMDER_VERSION_STR "\0" + VALUE "CompanyName", "Samuel Vasko" + VALUE "FileDescription", "Cmder: Lovely Console Emulator." + VALUE "FileVersion", "1.3.6-pre1" + VALUE "InternalName", "Cmder" + VALUE "LegalCopyright", "Copyright (C) 2016 Samuel Vasko" + VALUE "OriginalFilename", "Cmder.exe" + VALUE "ProductName", "Cmder" + VALUE "ProductVersion", "1.3.6-pre1" END END BLOCK "VarFileInfo" @@ -97,13 +93,34 @@ BEGIN END END + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDS_TITLE "Cmder Launcher" +END + +STRINGTABLE +BEGIN + IDS_SWITCHES "Valid options:\n\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]" +END + +#endif // English (United States) resources ///////////////////////////////////////////////////////////////////////////// + + #ifndef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 3 resource. // + ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED + From f604b06d261fefe9b726baed5c01e015211d4a30 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sat, 8 Mar 2025 15:26:33 -0500 Subject: [PATCH 092/203] update windows terminal, clink, and git --- vendor/sources.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/vendor/sources.json b/vendor/sources.json index 1a6238457..05fb2eaf5 100644 --- a/vendor/sources.json +++ b/vendor/sources.json @@ -1,18 +1,18 @@ [ { "name": "windows-terminal", - "version": "1.20.11271.0", - "url": "https://github.com/microsoft/terminal/releases/download/v1.20.11271.0/Microsoft.WindowsTerminal_1.20.11271.0_x64.zip" + "version": "1.23.10353.0", + "url": "https://github.com/microsoft/terminal/releases/download/v1.23.10353.0/Microsoft.WindowsTerminalPreview_1.23.10353.0_x64.zip" }, { "name": "git-for-windows", - "version": "2.47.0.windows.1", - "url": "https://github.com/git-for-windows/git/releases/download/v2.47.0.windows.1/PortableGit-2.47.0-64-bit.7z.exe" + "version": "2.47.1.windows.1", + "url": "https://github.com/git-for-windows/git/releases/download/v2.47.1.windows.1/PortableGit-2.47.1-64-bit.7z.exe" }, { "name": "clink", - "version": "1.7.3", - "url": "https://github.com/chrisant996/clink/releases/download/v1.7.3/clink.1.7.3.f8fb96.zip" + "version": "1.7.12", + "url": "https://github.com/chrisant996/clink/releases/download/v1.7.12/clink.1.7.12.625e8b.zip" }, { "name": "conemu-maximus5", From 6d82cf897ba7ed0816fec47de06596786e3a8ab5 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Thu, 3 Apr 2025 20:34:34 +0000 Subject: [PATCH 093/203] fix build script --- scripts/build.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/build.ps1 b/scripts/build.ps1 index f577fa130..9d484d38e 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -129,8 +129,9 @@ if (-not $noVendor) { else { $WinTermSettingsJson = "" } # Kill ssh-agent.exe if it is running from the $env:cmder_root we are building + $cmder_folder = $cmder_root.toString() foreach ($ssh_agent in $(Get-Process ssh-agent -ErrorAction SilentlyContinue)) { - if ([string]$($ssh_agent.path) -Match [string]$cmder_root.replace('\', '\\')) { + if ([string]$($ssh_agent.path) -Match $cmder_folder.Replace('\', '\\')) { Write-Verbose $("Stopping " + $ssh_agent.path + "!") Stop-Process $ssh_agent.id } From a44b30c3eb4e5bedabe442784ea326762eeaabf3 Mon Sep 17 00:00:00 2001 From: Dax T Games Date: Thu, 3 Apr 2025 17:17:01 -0400 Subject: [PATCH 094/203] Update build.yml --- .github/workflows/build.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8fb936855..144e31cb1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -53,41 +53,41 @@ jobs: run: .\pack.ps1 -verbose -terminal all - name: Upload artifact (cmder_win_mini.zip) - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: path: build/cmder_win_mini.zip name: cmder_win_mini.zip if-no-files-found: error - name: Upload artifact (cmder_win.7z) - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: path: build/cmder_win.7z name: cmder_win.7z if-no-files-found: error - name: Upload artifact (cmder_win.zip) - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: path: build/cmder_win.zip name: cmder_win.zip if-no-files-found: error - name: Upload artifact (cmder_wt.zip) - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: path: build/cmder_wt.zip name: cmder_wt.zip if-no-files-found: error - name: Upload artifact (cmder_wt.7z) - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: path: build/cmder_wt.7z name: cmder_wt.7z - name: Upload artifact (cmder_wt_mini.zip) - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: path: build/cmder_wt_mini.zip name: cmder_wt_mini.zip From 2868f9ee92718fc300abc0230b03f4ed6aada221 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Tue, 8 Apr 2025 12:11:37 -0400 Subject: [PATCH 095/203] revert inadvertent changes --- launcher/src/resource.rc | 89 ++++++++++++++++------------------------ launcher/src/strings.rc2 | 2 +- 2 files changed, 37 insertions(+), 54 deletions(-) diff --git a/launcher/src/resource.rc b/launcher/src/resource.rc index 3d7b4f714..5960625a6 100644 --- a/launcher/src/resource.rc +++ b/launcher/src/resource.rc @@ -1,6 +1,15 @@ -// Microsoft Visual C++ generated resource script. -// +/* _ + ___ _ __ ___ __| | ___ _ __ + / __| '_ ` _ \ / _` |/ _ \ '__| +| (__| | | | | | (_| | __/ | + \___|_| |_| |_|\__,_|\___|_| +============================================================================= + The Cmder Console Emulator Project +*/ + #include "resource.h" +#include "version.rc2" +#include "strings.rc2" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// @@ -17,7 +26,6 @@ #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// @@ -25,26 +33,25 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // TEXTINCLUDE // -1 TEXTINCLUDE +1 TEXTINCLUDE BEGIN - "resource.h\0" +"resource.h\0" END -2 TEXTINCLUDE +2 TEXTINCLUDE BEGIN - "#include ""winres.h""\r\n" - "\0" +"#include ""winres.h""\r\n" +"\0" END -3 TEXTINCLUDE +3 TEXTINCLUDE BEGIN - "\r\n" - "\0" +"\r\n" +"\0" END #endif // APSTUDIO_INVOKED - ///////////////////////////////////////////////////////////////////////////// // // Icon @@ -53,7 +60,8 @@ END // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. IDI_CMDER ICON "..\\..\\icons\\cmder.ico" - +#endif // English (United States) resources +///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// // @@ -61,30 +69,26 @@ IDI_CMDER ICON "..\\..\\icons\\cmder.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,3,6,1 - PRODUCTVERSION 1,3,6,1 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x40004L - FILETYPE 0x1L - FILESUBTYPE 0x0L + FILEVERSION CMDER_MAJOR_VERSION,CMDER_MINOR_VERSION,CMDER_REVISION_VERSION,CMDER_BUILD_VERSION + PRODUCTVERSION CMDER_MAJOR_VERSION,CMDER_MINOR_VERSION,CMDER_REVISION_VERSION,CMDER_BUILD_VERSION + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK + FILEFLAGS (CMDER_DEBUGFLAG | CMDER_BUILDFLAGS) + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE VFT2_UNKNOWN BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "100904b0" BEGIN - VALUE "CompanyName", "Samuel Vasko" - VALUE "FileDescription", "Cmder: Lovely Console Emulator." - VALUE "FileVersion", "1.3.6-pre1" - VALUE "InternalName", "Cmder" - VALUE "LegalCopyright", "Copyright (C) 2016 Samuel Vasko" - VALUE "OriginalFilename", "Cmder.exe" - VALUE "ProductName", "Cmder" - VALUE "ProductVersion", "1.3.6-pre1" + VALUE "CompanyName", CMDER_COMPANY_NAME_STR "\0" + VALUE "FileDescription", CMDER_FILE_DESCRIPTION_STR "\0" + VALUE "FileVersion", CMDER_VERSION_STR "\0" + VALUE "InternalName", CMDER_INTERNAL_NAME_STR "\0" + VALUE "LegalCopyright", "Copyright (C) " CMDER_COPYRIGHT_YEAR_STR " " CMDER_COMPANY_NAME_STR "\0" + VALUE "OriginalFilename", CMDER_ORIGINAL_FILENAME_STR "\0" + VALUE "ProductName", CMDER_PRODUCT_NAME_STR "\0" + VALUE "ProductVersion", CMDER_VERSION_STR "\0" END END BLOCK "VarFileInfo" @@ -93,34 +97,13 @@ BEGIN END END - -///////////////////////////////////////////////////////////////////////////// -// -// String Table -// - -STRINGTABLE -BEGIN - IDS_TITLE "Cmder Launcher" -END - -STRINGTABLE -BEGIN - IDS_SWITCHES "Valid options:\n\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]" -END - -#endif // English (United States) resources ///////////////////////////////////////////////////////////////////////////// - - #ifndef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 3 resource. // - ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED - diff --git a/launcher/src/strings.rc2 b/launcher/src/strings.rc2 index 494cbfeec..d8feb4d8b 100644 --- a/launcher/src/strings.rc2 +++ b/launcher/src/strings.rc2 @@ -6,7 +6,7 @@ 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]" + IDS_SWITCHES L"Valid options:\n\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]" } ///////////////////////////////////////////////////////////////////////////// From df42ff2d8c000df1c67b157a58f9d652ee2c8367 Mon Sep 17 00:00:00 2001 From: David Refoua Date: Tue, 8 Apr 2025 20:48:47 +0330 Subject: [PATCH 096/203] indentation cleanup and comment fix --- launcher/src/resource.rc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/launcher/src/resource.rc b/launcher/src/resource.rc index 5960625a6..8602089e0 100644 --- a/launcher/src/resource.rc +++ b/launcher/src/resource.rc @@ -35,19 +35,19 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 1 TEXTINCLUDE BEGIN -"resource.h\0" + "resource.h\0" END 2 TEXTINCLUDE BEGIN -"#include ""winres.h""\r\n" -"\0" + "#include ""winres.h""\r\n" + "\0" END 3 TEXTINCLUDE BEGIN -"\r\n" -"\0" + "\r\n" + "\0" END #endif // APSTUDIO_INVOKED @@ -60,7 +60,7 @@ END // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. IDI_CMDER ICON "..\\..\\icons\\cmder.ico" -#endif // English (United States) resources +#endif // not APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// From 76c5b9e116f27c622d462e42756de9d62e94bf8b Mon Sep 17 00:00:00 2001 From: David Refoua Date: Tue, 15 Jul 2025 19:31:41 +0330 Subject: [PATCH 097/203] resolve conflicts --- vendor/git-prompt.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/vendor/git-prompt.sh b/vendor/git-prompt.sh index 189e3dc6a..efbafd734 100644 --- a/vendor/git-prompt.sh +++ b/vendor/git-prompt.sh @@ -20,7 +20,7 @@ function getSimpleGitBranch() { then echo " (${headContent:16})" else - echo " (HEAD detached at ${headContent:0:7})" + echo " (HEAD detached at ${headContent:0:7})" fi } @@ -38,12 +38,12 @@ then . ~/.config/git/git-prompt.sh fi else - PS1='\[\033]0;$TITLEPREFIX:$PWD\007\]' # set window title - # PS1="$PS1"'\n' # new line + # Taken from https://github.com/git-for-windows/build-extra/blob/main/git-extra/git-prompt.sh + PS1='\[\033]0;$TITLEPREFIX:${PWD//[^[:ascii:]]/?}\007\]' # set window title + # PS1="$PS1"'\n' # new line (disabled) PS1="$PS1"'\[\033[32m\]' # change to green PS1="$PS1"'\u@\h ' # user@host - # PS1="$PS1"'\[\033[35m\]' # change to purple - # PS1="$PS1"'$MSYSTEM ' # show MSYSTEM + PS1="$PS1${MSYSTEM:+\[\033[35m\]$MSYSTEM }" # show MSYSTEM in purple (if set) PS1="$PS1"'\[\033[33m\]' # change to brownish yellow PS1="$PS1"'\w' # current working directory if test -z "$WINELOADERNOEXEC" @@ -68,7 +68,7 @@ else fi PS1="$PS1"'\[\033[0m\]' # change color PS1="$PS1"'\n' # new line - PS1="$PS1"'Ī» ' # prompt: always Ī» + PS1="$PS1"'Ī» ' # prompt: Cmder uses Ī» fi MSYS2_PS1="$PS1" # for detection by MSYS2 SDK's bash.basrc @@ -76,10 +76,10 @@ MSYS2_PS1="$PS1" # for detection by MSYS2 SDK's bash.basrc # Evaluate all user-specific Bash completion scripts (if any) if test -z "$WINELOADERNOEXEC" then - for c in "$HOME"/bash_completion.d/*.bash - do - # Handle absence of any scripts (or the folder) gracefully - test ! -f "$c" || - . "$c" - done + for c in "$HOME"/bash_completion.d/*.bash + do + # Handle absence of any scripts (or the folder) gracefully + test ! -f "$c" || + . "$c" + done fi From f6eb7aa4f8d1a2b730e83e38edd99c377abf5a80 Mon Sep 17 00:00:00 2001 From: David Refoua Date: Thu, 6 Nov 2025 18:26:41 +0330 Subject: [PATCH 098/203] Improve path enhancement handling in lib_path.cmd Refactor path enhancement logic for clarity and robustness. --- vendor/lib/lib_path.cmd | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/vendor/lib/lib_path.cmd b/vendor/lib/lib_path.cmd index 4415388b6..6fc7609ec 100644 --- a/vendor/lib/lib_path.cmd +++ b/vendor/lib/lib_path.cmd @@ -91,13 +91,13 @@ exit /b if /i "!position!" == "append" ( if "!found!" == "0" ( - echo "!PATH!"|!WINDIR!\System32\findstr >nul /I /R /C:";!find_query!\"$" + echo "!PATH!"|!WINDIR!\System32\findstr >nul /I /R /C:";!find_query!$" call :set_found ) %print_debug% :enhance_path "Env Var END PATH !find_query! - found=!found!" ) else ( if "!found!" == "0" ( - echo "!PATH!"|!WINDIR!\System32\findstr >nul /I /R /C:"^\"!find_query!;" + echo "!PATH!"|!WINDIR!\System32\findstr >nul /I /R /C:"^!find_query!;" call :set_found ) %print_debug% :enhance_path "Env Var BEGIN PATH !find_query! - found=!found!" @@ -190,13 +190,28 @@ exit /b exit /b 1 ) + rem Parse arguments robustly: + rem Accept either public form: "[dir_path]" [max_depth] [append] + rem or internal recursive form: "[dir_path]" [depth] [max_depth] [append] set "depth=%~2" set "max_depth=%~3" + set "position=" - if "%~4" neq "" if /i "%~4" == "append" ( - set "position=%~4" - ) else ( - set "position=" + if /i "%~4" == "append" set "position=append" + if /i "%~3" == "append" ( + set "position=append" + set "max_depth=" + ) + + if not defined depth set "depth=0" + if not defined max_depth ( + if defined depth ( + rem If only one numeric argument provided, treat it as max_depth + set "max_depth=%depth%" + set "depth=0" + ) else ( + set "max_depth=1" + ) ) dir "%add_path%" 2>NUL | findstr -i -e "%find_pathext%" >NUL @@ -232,8 +247,6 @@ exit /b call :loop_depth ) - set "PATH=%PATH%" - exit /b :set_depth From 278694285c666f963b2060af8a59a5c84dd056a2 Mon Sep 17 00:00:00 2001 From: David Refoua Date: Thu, 6 Nov 2025 18:40:46 +0330 Subject: [PATCH 099/203] fix typo --- launcher/src/CmderLauncher.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index 76e22434d..b285a76a6 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -312,7 +312,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) ? L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/windows_terminal_%COMPUTERNAME%_settings.json! Access Denied." - : L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/windows_teerminal_%COMPUTERNAME%_settigns.json!", MB_TITLE, MB_ICONSTOP); + : L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/windows_terminal_%COMPUTERNAME%_settigns.json!", MB_TITLE, MB_ICONSTOP); exit(1); } else if (PathFileExists(conEmuDir)) @@ -361,7 +361,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) ? L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/windows_terminal_settings.json! Access Denied." - : L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/windows_teerminal_settigns.json!", MB_TITLE, MB_ICONSTOP); + : L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/windows_terminal_settigns.json!", MB_TITLE, MB_ICONSTOP); exit(1); } else if (PathFileExists(conEmuDir)) From 375f63ac7ec17d44e201240f29ce7fe5e0dcd3bc Mon Sep 17 00:00:00 2001 From: David Refoua Date: Thu, 6 Nov 2025 18:41:18 +0330 Subject: [PATCH 100/203] fix indentation --- launcher/src/CmderLauncher.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index b285a76a6..dc4057785 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -329,7 +329,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr { if (!CopyFile(cpuCfgPath, cfgPath, FALSE)) { - if (PathFileExists(windowsTerminalDir)) { + if (PathFileExists(windowsTerminalDir)) { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) ? L"Failed to copy config/windows_terminal_%COMPUTERNAME%_settings.json file to vendor/windows-terminal/settings/settings.json! Access Denied." From 76711b43b420008bc806d67956caf5c33dc85573 Mon Sep 17 00:00:00 2001 From: David Refoua Date: Thu, 6 Nov 2025 18:47:25 +0330 Subject: [PATCH 101/203] improve consistency --- scripts/build.ps1 | 22 +++++++++++----------- vendor/sources.json | 10 +++++----- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/scripts/build.ps1 b/scripts/build.ps1 index 9d484d38e..813ff6ffa 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -55,7 +55,7 @@ Param( # Using this option will skip all downloads, if you only need to build launcher [switch]$noVendor, - + # Using this option will specify the emulator to use [none, all, conemu-maximus5, or windows-terminal] [string]$terminal = 'all', @@ -139,13 +139,13 @@ if (-not $noVendor) { foreach ($s in $sources) { if ($terminal -eq "none") { - return + continue } elseif ($s.name -eq "conemu-maximus5" -and $terminal -eq "windows-terminal") { - return + continue } elseif ($s.name -eq "windows-terminal" -and $terminal -eq "conemu-maximus5") { - return + continue } - + Write-Verbose "Getting vendored $($s.name) $($s.version)..." # We do not care about the extensions/type of archive @@ -158,12 +158,12 @@ if (-not $noVendor) { # Make Embedded Windows Terminal Portable if ($s.name -eq "windows-terminal") { - $windowTerminalFiles = resolve-path ($saveTo + "\" + $s.name + "\terminal*") - move-item -ErrorAction SilentlyContinue $windowTerminalFiles\* $s.name >$null - remove-item -ErrorAction SilentlyContinue $windowTerminalFiles >$null - write-verbose "Making Windows Terminal Portable..." - New-Item -Type Directory -Path (Join-Path $saveTo "/windows-terminal/settings") -ErrorAction SilentlyContinue >$null - New-Item -Type File -Path (Join-Path $saveTo "/windows-terminal/.portable") -ErrorAction SilentlyContinue >$null + $windowTerminalFiles = resolve-path ($saveTo + "\" + $s.name + "\terminal*") + Move-Item -ErrorAction SilentlyContinue $windowTerminalFiles\* $s.name >$null + Remove-Item -ErrorAction SilentlyContinue $windowTerminalFiles >$null + Write-Verbose "Making Windows Terminal Portable..." + New-Item -Type Directory -Path (Join-Path $saveTo "/windows-terminal/settings") -ErrorAction SilentlyContinue >$null + New-Item -Type File -Path (Join-Path $saveTo "/windows-terminal/.portable") -ErrorAction SilentlyContinue >$null } if ((Get-ChildItem $s.name).Count -eq 1) { diff --git a/vendor/sources.json b/vendor/sources.json index dae2c1680..7362cc0e4 100644 --- a/vendor/sources.json +++ b/vendor/sources.json @@ -1,9 +1,4 @@ [ - { - "name": "windows-terminal", - "version": "1.20.11271.0", - "url": "https://github.com/microsoft/terminal/releases/download/v1.20.11271.0/Microsoft.WindowsTerminal_1.20.11271.0_x64.zip" - }, { "name": "git-for-windows", "version": "2.49.0.windows.1", @@ -19,6 +14,11 @@ "version": "23.07.24", "url": "https://github.com/Maximus5/ConEmu/releases/download/v23.07.24/ConEmuPack.230724.7z" }, + { + "name": "windows-terminal", + "version": "1.20.11271.0", + "url": "https://github.com/microsoft/terminal/releases/download/v1.20.11271.0/Microsoft.WindowsTerminal_1.20.11271.0_x64.zip" + }, { "name": "clink-completions", "version": "0.6.2", From b0ab14d29f943b04d82e070e6e182572cce3167f Mon Sep 17 00:00:00 2001 From: David Refoua Date: Sat, 8 Nov 2025 21:06:07 +0330 Subject: [PATCH 102/203] Ignore whitespace-only .ps1 commits in blame --- .git-blame-ignore-revs | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .git-blame-ignore-revs diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 000000000..a0fc1c37f --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,10 @@ +46f6f677dc362c0695607be5f28b8b94114fc4bc +58db4e3419bf1e5cc1bb61fcd7ce2ebbca89243a +efb3338f5cf0eec21e8a75abc62ee14965cb4a7e +efb3338f5cf0eec21e8a75abc62ee14965cb4a7e +3859f6ffc088b2ae78748abc84986f4adcadcd41 +d6569192fc91167f555c3eff58402ff01f1197ea +67de97a492c9389f95499db38f9474a1c20ec585 +a0d085f93eaa69c22449d0217e8daf9eaea2b180 +a0d085f93eaa69c22449d0217e8daf9eaea2b180 +1cfba25beb46c74bb1debca2bcfe7ac470e96172 From 081e818465d904ef3b22eff87b08e22df0d2b3c5 Mon Sep 17 00:00:00 2001 From: David Refoua Date: Sat, 8 Nov 2025 21:07:27 +0330 Subject: [PATCH 103/203] Ignore whitespace-only .cmd commits in blame --- .git-blame-ignore-revs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index a0fc1c37f..6768f0c67 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -8,3 +8,12 @@ d6569192fc91167f555c3eff58402ff01f1197ea a0d085f93eaa69c22449d0217e8daf9eaea2b180 a0d085f93eaa69c22449d0217e8daf9eaea2b180 1cfba25beb46c74bb1debca2bcfe7ac470e96172 +f6bc623284914489e891bbac923feb774c862b99 +abbab3f8b477e917d0a175d0de23cce121096631 +f6bc623284914489e891bbac923feb774c862b99 +e3d9f81e25b6b6062c372e6461dbeb1d19751a03 +f6bc623284914489e891bbac923feb774c862b99 +126347025f9cade241beff182738b2527da7535e +e3d9f81e25b6b6062c372e6461dbeb1d19751a03 +f6bc623284914489e891bbac923feb774c862b99 +e3d9f81e25b6b6062c372e6461dbeb1d19751a03 From f91d0bd5baa606cfe38c733fc26dbc9da295403a Mon Sep 17 00:00:00 2001 From: David Refoua Date: Sat, 8 Nov 2025 21:14:51 +0330 Subject: [PATCH 104/203] Refactor .git-blame-ignore-revs for clarity Updated the .git-blame-ignore-revs file to include comments and remove duplicate entries. --- .git-blame-ignore-revs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index 6768f0c67..0f94249ec 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -1,19 +1,12 @@ -46f6f677dc362c0695607be5f28b8b94114fc4bc +# List of whitespace-only commits to ignore in the Git blame; +# to improve tracking changes and avoid noise 58db4e3419bf1e5cc1bb61fcd7ce2ebbca89243a efb3338f5cf0eec21e8a75abc62ee14965cb4a7e -efb3338f5cf0eec21e8a75abc62ee14965cb4a7e 3859f6ffc088b2ae78748abc84986f4adcadcd41 d6569192fc91167f555c3eff58402ff01f1197ea 67de97a492c9389f95499db38f9474a1c20ec585 a0d085f93eaa69c22449d0217e8daf9eaea2b180 -a0d085f93eaa69c22449d0217e8daf9eaea2b180 1cfba25beb46c74bb1debca2bcfe7ac470e96172 f6bc623284914489e891bbac923feb774c862b99 abbab3f8b477e917d0a175d0de23cce121096631 -f6bc623284914489e891bbac923feb774c862b99 -e3d9f81e25b6b6062c372e6461dbeb1d19751a03 -f6bc623284914489e891bbac923feb774c862b99 126347025f9cade241beff182738b2527da7535e -e3d9f81e25b6b6062c372e6461dbeb1d19751a03 -f6bc623284914489e891bbac923feb774c862b99 -e3d9f81e25b6b6062c372e6461dbeb1d19751a03 From 96f0bc9c6e888493496d24c4e5bfc851b3270b01 Mon Sep 17 00:00:00 2001 From: David Refoua Date: Sat, 8 Nov 2025 21:16:24 +0330 Subject: [PATCH 105/203] ignore commit --- .git-blame-ignore-revs | 1 + 1 file changed, 1 insertion(+) diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index 0f94249ec..eba1853b2 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -10,3 +10,4 @@ a0d085f93eaa69c22449d0217e8daf9eaea2b180 f6bc623284914489e891bbac923feb774c862b99 abbab3f8b477e917d0a175d0de23cce121096631 126347025f9cade241beff182738b2527da7535e +4740b836f300658b27e6ad4d79efac63c9c24c24 From 5536ea20883af7bb9b7aa85c1275eb54072c9419 Mon Sep 17 00:00:00 2001 From: David Refoua Date: Sun, 9 Nov 2025 04:05:08 +0330 Subject: [PATCH 106/203] ignore git commit --- .git-blame-ignore-revs | 1 + 1 file changed, 1 insertion(+) diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index 65220a6ee..0091f768c 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -12,3 +12,4 @@ abbab3f8b477e917d0a175d0de23cce121096631 126347025f9cade241beff182738b2527da7535e 4740b836f300658b27e6ad4d79efac63c9c24c24 be44bac95670b1cbbc91bd657882d985989846f9 +f67e5704eda60526d495be758572181f01a6cac8 From 974f5b0d779f6ba3a8304c052eecb138ad17f09d Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Thu, 27 Nov 2025 14:22:09 +0000 Subject: [PATCH 107/203] spacing --- launcher/src/CmderLauncher.cpp | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index 62383f87d..90ba93cf9 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -299,7 +299,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr // Set path to Cmder user ConEmu config file PathCombine(userCfgPath, userConfigDirPath, L"user-ConEmu.xml"); } - + if (wcscmp(cpuCfgPath, L"") != 0 && (PathFileExists(cpuCfgPath) || use_user_cfg == false)) // config/[host specific terminal emulator config] file exists or /m was specified on command line, use machine specific config. { if (cfgRoot.length() == 0) // '/c [path]' was NOT specified @@ -356,7 +356,8 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr { if (!CopyFile(cfgPath, userCfgPath, FALSE)) { - if (PathFileExists(windowsTerminalDir)) { + if (PathFileExists(windowsTerminalDir)) + { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) ? L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/windows_terminal_settings.json! Access Denied." @@ -377,7 +378,8 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr { if (!CopyFile(userCfgPath, cfgPath, FALSE)) { - if (PathFileExists(windowsTerminalDir)) { + if (PathFileExists(windowsTerminalDir)) + { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) ? L"Failed to copy config/user_windows_terminal_settings.json file to vendor/windows-terminal/settings/settings.json! Access Denied." @@ -405,7 +407,8 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr { if (!CopyFile(cfgPath, userCfgPath, FALSE)) { - if (PathFileExists(windowsTerminalDir)) { + if (PathFileExists(windowsTerminalDir)) + { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) ? L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/user_windows_terminal_settings.json! Access Denied." @@ -425,7 +428,8 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr { if (!CopyFile(defaultCfgPath, cfgPath, FALSE)) { - if (PathFileExists(windowsTerminalDir)) { + if (PathFileExists(windowsTerminalDir)) + { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) ? L"Failed to copy vendor/windows-terminal_default_settings_settings.json file to vendor/windows-terminal/settings/settings.json! Access Denied." @@ -456,7 +460,8 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr { if (!CopyFile(cfgPath, userCfgPath, FALSE)) { - if (PathFileExists(windowsTerminalDir)) { + if (PathFileExists(windowsTerminalDir)) + { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) ? L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/user_windows_terminal_settings_settings.json! Access Denied." @@ -479,7 +484,8 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr { if ( ! CopyFile(defaultCfgPath, userCfgPath, FALSE)) { - if (PathFileExists(windowsTerminalDir)) { + if (PathFileExists(windowsTerminalDir)) + { MessageBox(NULL, (GetLastError() == ERROR_ACCESS_DENIED) ? L"Failed to copy vendor/windows-terminal_default_settings_settings.json file to [user specified path]/config/user_windows_terminal_settings.json! Access Denied." @@ -622,7 +628,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr // Try to find m'intty.exe' so ConEmu can launch using %MINTTY_EXE% in external Git for Cmder Mini. // See: https://github.com/Maximus5/ConEmu/issues/2559 for why this is commented. - /* + /* if (PathFileExists(vendoredGit)) { PathCombine(minTTYPath, vendoredGit, L"usr\\bin\\mintty.exe"); @@ -852,6 +858,11 @@ cmderOptions GetOption() cmderOptions.cmderTask = szArgList[i + 1]; i++; } + else if ((_wcsicmp(L"bash", szArgList[i]) == 0 || _wcsicmp(L"powershell", szArgList[i]) == 0) || PathFileExists(windowsTerminalDir) || PathFileExists(conEmuDir)) + { + cmderOptions.cmderTask = szArgList[i]; + i++; + } else if (_wcsicmp(L"/title", szArgList[i]) == 0 && !PathFileExists(windowsTerminalDir) && PathFileExists(conEmuDir)) { cmderOptions.cmderTitle = szArgList[i + 1]; @@ -1010,4 +1021,4 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance, } return 0; -} +} \ No newline at end of file From f4b8d0852d0ac05caa759326e743dd285d3a3aa6 Mon Sep 17 00:00:00 2001 From: "Dax t. Games" Date: Sat, 6 Dec 2025 18:56:05 +0000 Subject: [PATCH 108/203] update clink --- vendor/sources.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vendor/sources.json b/vendor/sources.json index f86c7fc55..dceb4cf44 100644 --- a/vendor/sources.json +++ b/vendor/sources.json @@ -6,8 +6,8 @@ }, { "name": "clink", - "version": "1.8.8", - "url": "https://github.com/chrisant996/clink/releases/download/v1.8.8/clink.1.8.8.a63364.zip" + "version": "1.9.3", + "url": "https://github.com/chrisant996/clink/releases/download/v1.9.3/clink.1.9.3.0ef759.zip" }, { "name": "conemu-maximus5", From e4a66402a66c9d73e75e006656ee7c47beee87fe Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sun, 14 Dec 2025 11:10:49 -0500 Subject: [PATCH 109/203] update sources --- .gitignore | 2 +- vendor/sources.json | 49 +++++++++++++++++++++++---------------------- 2 files changed, 26 insertions(+), 25 deletions(-) diff --git a/.gitignore b/.gitignore index 3ca812444..8edad6f19 100644 --- a/.gitignore +++ b/.gitignore @@ -37,4 +37,4 @@ scripts/packer/iso/*.iso scripts/packer/packer_cache scripts/packer/output-* *.box - +*.code-workspace diff --git a/vendor/sources.json b/vendor/sources.json index cfb7bd983..b528368ce 100644 --- a/vendor/sources.json +++ b/vendor/sources.json @@ -1,26 +1,27 @@ [ - "name": "git-for-windows", - "version": "2.51.2.windows.1", - "url": "https://github.com/git-for-windows/git/releases/download/v2.51.2.windows.1/PortableGit-2.51.2-64-bit.7z.exe" - }, - { - "name": "clink", - "version": "1.8.8", - "url": "https://github.com/chrisant996/clink/releases/download/v1.8.8/clink.1.8.8.a63364.zip" - }, - { - "name": "conemu-maximus5", - "version": "23.07.24", - "url": "https://github.com/ConEmu/ConEmu/releases/download/v23.07.24/ConEmuPack.230724.7z" - }, - { - "name": "windows-terminal", - "version": "1.23.12811.0", - "url": "https://github.com/microsoft/terminal/releases/download/v1.23.12811.0/Microsoft.WindowsTerminal_1.23.12811.0_x64.zip" - }, - { - "name": "clink-completions", - "version": "0.6.6", - "url": "https://github.com/vladimir-kotikov/clink-completions/archive/v0.6.6.zip" - } + { + "name": "git-for-windows", + "version": "2.52.0.windows.1", + "url": "https://github.com/git-for-windows/git/releases/download/v2.52.0.windows.1/PortableGit-2.52.0-64-bit.7z.exe" + }, + { + "name": "clink", + "version": "1.9.5", + "url": "https://github.com/chrisant996/clink/releases/download/v1.9.5/clink.1.9.5.ee6b4f.zip" + }, + { + "name": "conemu-maximus5", + "version": "23.07.24", + "url": "https://github.com/ConEmu/ConEmu/releases/download/v23.07.24/ConEmuPack.230724.7z" + }, + { + "name": "windows-terminal", + "version": "1.23.12811.0", + "url": "https://github.com/microsoft/terminal/releases/download/v1.23.12811.0/Microsoft.WindowsTerminal_1.23.12811.0_x64.zip" + }, + { + "name": "clink-completions", + "version": "0.6.7", + "url": "https://github.com/vladimir-kotikov/clink-completions/archive/v0.6.7.zip" + } ] From f9d79723a8d6f2a56c261bb868e3f757fffc8b21 Mon Sep 17 00:00:00 2001 From: "Dax t. Games" Date: Sun, 14 Dec 2025 19:10:43 +0000 Subject: [PATCH 110/203] Add install-pacman.sh --- vendor/bin/install_pacman.sh | 115 +++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 vendor/bin/install_pacman.sh diff --git a/vendor/bin/install_pacman.sh b/vendor/bin/install_pacman.sh new file mode 100644 index 000000000..75945189e --- /dev/null +++ b/vendor/bin/install_pacman.sh @@ -0,0 +1,115 @@ +#!/usr/bin/env bash + +# Based on: https://github.com/mcgitty/pacman-for-git +# My Fork: https://github.com/daxgames/pacman-for-git + +export bin_source=${1:-https://github.com/daxgames/pacman-for-git/raw/refs/heads/main} + +if [[ "$HOSTTYPE" == "i686" ]]; then + pacman=( + pacman-6.0.0-4-i686.pkg.tar.zst + pacman-mirrors-20210703-1-any.pkg.tar.zst + msys2-keyring-1~20210213-2-any.pkg.tar.zst + ) + + zstd=zstd-1.5.0-1-i686.pkg.tar.xz + zstd_win=https://github.com/facebook/zstd/releases/download/v1.5.5/zstd-v1.5.5-win32.zip +else + pacman=( + pacman-6.0.1-18-x86_64.pkg.tar.zst + pacman-mirrors-20220205-1-any.pkg.tar.zst + msys2-keyring-1~20220623-1-any.pkg.tar.zst + ) + + zstd=zstd-1.5.2-1-x86_64.pkg.tar.xz + zstd_win=https://github.com/facebook/zstd/releases/download/v1.5.5/zstd-v1.5.5-win64.zip +fi + +echo =-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +echo Downloading pacman files... +echo =-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +for f in "${pacman[@]}"; do + echo "Running: curl -sLkf -o \"$HOME/Downloads/$f\" \"${bin_source}/$f\"" + curl -sLkf -o "$HOME/Downloads/$f" "${bin_source}/$f" || exit 1 +done +echo -e "\n=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n" + +echo =-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +echo Downloading zstd binaries... +echo =-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +echo "Running: curl -sLkf -o \"$HOME/Downloads/$zstd\" \"${bin_source}/$zstd\"" +curl -sLkf -o "$HOME/Downloads/$zstd" "${bin_source}/$zstd" || exit 1 +echo "Running: curl -sLkf -o \"$HOME/Downloads/$(basename \"${zstd_win}\")\" \"$zstd_win\"" +curl -sLkf -o "$HOME/Downloads/$(basename "${zstd_win}")" "$zstd_win" || exit 1 +echo -e "\n=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n" + +echo =-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +echo Downloading pacman.conf... +echo =-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +echo "Running: curl -Lk https://raw.githubusercontent.com/msys2/MSYS2-packages/7858ee9c236402adf569ac7cff6beb1f883ab67c/pacman/pacman.conf" +curl -sLk https://raw.githubusercontent.com/msys2/MSYS2-packages/7858ee9c236402adf569ac7cff6beb1f883ab67c/pacman/pacman.conf -o /etc/pacman.conf || exit 1 + +pushd "$HOME/Downloads" +[[ -d "$(basename "${zstd_win}" | sed 's/\.zip$//')" ]] && \ + rm -rf "$(basename "${zstd_win}" | sed 's/\.zip$//')" +unzip "$HOME/Downloads/$(basename "${zstd_win}")" +export PATH="$PATH:$HOME/Downloads/$(basename "${zstd_win}" | sed 's/\.zip$//')" +popd +echo -e "\n=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n" + +cd / +echo =-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +echo Installing pacman files... +echo =-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +echo "Extracting zstd to /usr..." +tar x --xz -vf "$HOME/Downloads/$zstd" usr + +for f in "${pacman[@]}"; do + echo "Extracting $f to /usr and /etc..." + tar x --zstd -vf "$HOME/Downloads/$f" usr etc 2>/dev/null +done +echo -e "\n=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n" + +echo =-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +echo Initializing pacman... +echo =-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +mkdir -p /var/lib/pacman +ln -sf "$(which gettext)" /usr/bin/ +pacman-key --init +pacman-key --populate msys2 +pacman -Syu --noconfirm +echo -e "\n=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n" + +echo =-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +echo Getting package versions for the installed Git release +echo =-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +t=$(grep -E 'mingw-w64-[ix_0-9]+-git ' /etc/package-versions.txt) +echo "Found package version line: $t" + +curl --help >/dev/null 2>&1 || { echo "ERROR: curl is not installed properly."; exit 1; } + +echo "Getting commit ID that matches '$t' from github pacman-for-git..." +t=$(curl -sLk "${bin_source}/version-tags.txt" | grep "$t") +echo "Full line from version-tags.txt: '$t'" + +[[ "$t" == "" ]] && echo "ERROR: Commit ID not logged in github pacman-for-git." && exit 1 +echo -e "Using commit ID: '${t##* }'" +echo -e "\n=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n" + +echo =-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +echo Downloading package database files for the installed Git release +echo =-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +b=64 && [[ "$t" == *-i686-* ]] && b=32 +URL="https://github.com/git-for-windows/git-sdk-$b/raw/${t##* }" +while read -r p v; do + d="/var/lib/pacman/local/$p-$v" + mkdir -p "$d" + echo "$d" + + for f in desc files mtree; do + curl -fsSL "$URL$d/$f" -o "$d/$f" + done + + [[ ! -f "$d/desc" ]] && rmdir "$d" && echo "Missing $d" +done < /etc/package-versions.txt +echo -e "\n=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n" From df0785d71e00071953a6b8c82fc69a5ccc45dbf6 Mon Sep 17 00:00:00 2001 From: "Dax t. Games" Date: Sun, 14 Dec 2025 19:24:26 +0000 Subject: [PATCH 111/203] Add a disclaimer --- vendor/bin/install_pacman.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/vendor/bin/install_pacman.sh b/vendor/bin/install_pacman.sh index 75945189e..6d72d0714 100644 --- a/vendor/bin/install_pacman.sh +++ b/vendor/bin/install_pacman.sh @@ -1,7 +1,17 @@ #!/usr/bin/env bash # Based on: https://github.com/mcgitty/pacman-for-git -# My Fork: https://github.com/daxgames/pacman-for-git +# Dax T. Games Fork: https://github.com/daxgames/pacman-for-git + +# Disclaimer: Use at your own risk. +# +# This script modifies system files and installs the pacman package manager into your Git for Windows environment. +# +# While it has been tested in various Git for Windows versions, there is always a risk of data loss or system instability when running scripts that alter executable files and shared libraries. +# +# Make sure to back up any important data before proceeding. +# +# Always review and understand scripts from external sources prior to execution. export bin_source=${1:-https://github.com/daxgames/pacman-for-git/raw/refs/heads/main} From 3810b8d258225f9663be444c437a13931ceca1f5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 14 Dec 2025 21:42:23 +0000 Subject: [PATCH 112/203] Initial plan From 1e04711a2111f8da84573946693e394d631cebdf Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 14 Dec 2025 22:08:39 +0000 Subject: [PATCH 113/203] =?UTF-8?q?Change=20test=20emoji=20from=20?= =?UTF-8?q?=F0=9F=A7=AA=20to=20=E2=9C=85=20in=20workflow=20summary?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: DRSDavidSoft <4673812+DRSDavidSoft@users.noreply.github.com> --- .github/workflows/build.yml | 96 +++++++++++++++++++++--------------- .github/workflows/codeql.yml | 50 ++++++++++--------- .github/workflows/tests.yml | 89 +++++++++++++++++++++++---------- 3 files changed, 149 insertions(+), 86 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2b71a75cd..c59f93536 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,17 +42,24 @@ jobs: - name: Summary - Repository checkout shell: pwsh run: | - echo "## šŸ“¦ Build Cmder - Workflow Summary" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "### Repository Information" >> $env:GITHUB_STEP_SUMMARY - echo "| Property | Value |" >> $env:GITHUB_STEP_SUMMARY - echo "| --- | --- |" >> $env:GITHUB_STEP_SUMMARY - echo "| Repository | \`${{ github.repository }}\` |" >> $env:GITHUB_STEP_SUMMARY - echo "| Branch | \`${{ github.ref_name }}\` |" >> $env:GITHUB_STEP_SUMMARY - echo "| Commit | \`${{ github.sha }}\` |" >> $env:GITHUB_STEP_SUMMARY - echo "| Actor | @${{ github.actor }} |" >> $env:GITHUB_STEP_SUMMARY - echo "| Workflow | \`${{ github.workflow }}\` |" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY + # Get Cmder version + . scripts/utils.ps1 + $cmderVersion = Get-VersionStr + + @" + ## šŸ“¦ Build Cmder - Workflow Summary + + ### Repository Information + | Property | Value | + | --- | --- | + | Repository | ``${{ github.repository }}`` | + | Branch | ``${{ github.ref_name }}`` | + | Commit | ``${{ github.sha }}`` | + | Actor | @${{ github.actor }} | + | Workflow | ``${{ github.workflow }}`` | + | Cmder Version | **$cmderVersion** | + + "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Add MSBuild to PATH uses: microsoft/setup-msbuild@v2 @@ -66,10 +73,12 @@ jobs: if: success() shell: pwsh run: | - echo "### āœ… Build Status" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "Cmder launcher successfully compiled." >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY + @" + ### āœ… Build Status + + Cmder launcher successfully compiled. + + "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Pack the built files shell: pwsh @@ -80,10 +89,13 @@ jobs: if: success() shell: pwsh run: | - echo "### šŸ“¦ Artifacts Created" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "| Artifact | Size | Hash (SHA256) |" >> $env:GITHUB_STEP_SUMMARY - echo "| --- | --- | --- |" >> $env:GITHUB_STEP_SUMMARY + $summary = @" + ### šŸ“¦ Artifacts Created + + | Artifact | Size | Hash (SHA256) | + | --- | --- | --- | + "@ + $artifacts = @("cmder.zip", "cmder.7z", "cmder_mini.zip") foreach ($artifact in $artifacts) { $path = "build/$artifact" @@ -91,10 +103,12 @@ jobs: $size = (Get-Item $path).Length / 1MB # Truncate hash to first 16 chars for summary readability (full hash in hashes.txt) $hash = (Get-FileHash $path -Algorithm SHA256).Hash.Substring(0, 16) - echo "| \`$artifact\` | $([math]::Round($size, 2)) MB | \`$hash...\` |" >> $env:GITHUB_STEP_SUMMARY + $summary += "`n| ``$artifact`` | $([math]::Round($size, 2)) MB | ``$hash...`` |" } } - echo "" >> $env:GITHUB_STEP_SUMMARY + $summary += "`n" + + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Upload artifact (cmder.zip) uses: actions/upload-artifact@v5 @@ -125,14 +139,16 @@ jobs: if: success() shell: pwsh run: | - echo "### ā˜ļø Upload Status" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "All artifacts successfully uploaded to GitHub Actions:" >> $env:GITHUB_STEP_SUMMARY - echo "- āœ… \`cmder.zip\`" >> $env:GITHUB_STEP_SUMMARY - echo "- āœ… \`cmder.7z\`" >> $env:GITHUB_STEP_SUMMARY - echo "- āœ… \`cmder_mini.zip\`" >> $env:GITHUB_STEP_SUMMARY - echo "- āœ… \`hashes.txt\`" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY + @" + ### ā˜ļø Upload Status + + All artifacts successfully uploaded to GitHub Actions: + - āœ… ``cmder.zip`` + - āœ… ``cmder.7z`` + - āœ… ``cmder_mini.zip`` + - āœ… ``hashes.txt`` + + "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Create Release uses: softprops/action-gh-release@v2 @@ -150,13 +166,15 @@ jobs: if: startsWith(github.ref, 'refs/tags/') shell: pwsh run: | - echo "### šŸš€ Release Information" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "Draft release created for tag: **\`${{ github.ref_name }}\`**" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "Release includes:" >> $env:GITHUB_STEP_SUMMARY - echo "- Full version (\`cmder.zip\`, \`cmder.7z\`)" >> $env:GITHUB_STEP_SUMMARY - echo "- Mini version (\`cmder_mini.zip\`)" >> $env:GITHUB_STEP_SUMMARY - echo "- File hashes (\`hashes.txt\`)" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "> āš ļø Release is in **draft** mode. Please review and publish manually." >> $env:GITHUB_STEP_SUMMARY + @" + ### šŸš€ Release Information + + Draft release created for tag: **``${{ github.ref_name }}``** + + Release includes: + - Full version (``cmder.zip``, ``cmder.7z``) + - Mini version (``cmder_mini.zip``) + - File hashes (``hashes.txt``) + + > āš ļø Release is in **draft** mode. Please review and publish manually. + "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 16ebd4072..30052d7eb 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -50,17 +50,19 @@ jobs: - name: Summary - CodeQL analysis started shell: pwsh run: | - echo "## šŸ”’ CodeQL Security Analysis - Workflow Summary" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "### Analysis Configuration" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "| Property | Value |" >> $env:GITHUB_STEP_SUMMARY - echo "| --- | --- |" >> $env:GITHUB_STEP_SUMMARY - echo "| Repository | \`${{ github.repository }}\` |" >> $env:GITHUB_STEP_SUMMARY - echo "| Branch | \`${{ github.ref_name }}\` |" >> $env:GITHUB_STEP_SUMMARY - echo "| Language | \`${{ matrix.language }}\` |" >> $env:GITHUB_STEP_SUMMARY - echo "| Commit | \`${{ github.sha }}\` |" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY + @" + ## šŸ”’ CodeQL Security Analysis - Workflow Summary + + ### Analysis Configuration + + | Property | Value | + | --- | --- | + | Repository | ``${{ github.repository }}`` | + | Branch | ``${{ github.ref_name }}`` | + | Language | ``${{ matrix.language }}`` | + | Commit | ``${{ github.sha }}`` | + + "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL @@ -86,10 +88,12 @@ jobs: if: success() shell: pwsh run: | - echo "### āœ… Build Completed" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "Cmder launcher built successfully for CodeQL analysis." >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY + @" + ### āœ… Build Completed + + Cmder launcher built successfully for CodeQL analysis. + + "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v4 @@ -100,10 +104,12 @@ jobs: if: success() shell: pwsh run: | - echo "### šŸ” CodeQL Analysis Results" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "āœ… CodeQL security analysis completed successfully." >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "**Language analyzed:** \`${{ matrix.language }}\`" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "> Check the Security tab for detailed findings and recommendations." >> $env:GITHUB_STEP_SUMMARY + @" + ### šŸ” CodeQL Analysis Results + + āœ… CodeQL security analysis completed successfully. + + **Language analyzed:** ``${{ matrix.language }}`` + + > Check the Security tab for detailed findings and recommendations. + "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5110ab18d..ec295e328 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -43,16 +43,25 @@ jobs: - name: Summary - Test execution started shell: pwsh run: | - echo "## 🧪 Run Tests - Workflow Summary" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "### Test Environment" >> $env:GITHUB_STEP_SUMMARY - echo "| Property | Value |" >> $env:GITHUB_STEP_SUMMARY - echo "| --- | --- |" >> $env:GITHUB_STEP_SUMMARY - echo "| Repository | \`${{ github.repository }}\` |" >> $env:GITHUB_STEP_SUMMARY - echo "| Branch | \`${{ github.ref_name }}\` |" >> $env:GITHUB_STEP_SUMMARY - echo "| Commit | \`${{ github.sha }}\` |" >> $env:GITHUB_STEP_SUMMARY - echo "| Runner OS | \`${{ runner.os }}\` |" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY + # Get Cmder version + . scripts/utils.ps1 + $cmderVersion = Get-VersionStr + + @" + ## āœ… Run Tests - Workflow Summary + + ### Test Environment + | Property | Value | + | --- | --- | + | Repository | ``${{ github.repository }}`` | + | Branch | ``${{ github.ref_name }}`` | + | Commit | ``${{ github.sha }}`` | + | Runner OS | ``${{ runner.os }}`` | + | Cmder Version | **$cmderVersion** | + | PowerShell Version | **$($PSVersionTable.PSVersion)** | + | Event | ``${{ github.event_name }}`` | + + "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Initialize vendors shell: pwsh @@ -63,21 +72,42 @@ jobs: if: success() shell: pwsh run: | - echo "### āš™ļø Vendor Initialization" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "āœ… Vendor dependencies initialized successfully." >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY + # Get vendor versions + $vendorInfo = @() + $vendorDirs = @("conemu-maximus5", "clink", "git-for-windows") + foreach ($dir in $vendorDirs) { + $versionFile = "vendor/$dir/.cmderver" + if (Test-Path $versionFile) { + $version = Get-Content $versionFile -Raw + $vendorInfo += "- **$dir**: $($version.Trim())" + } + } + + $summary = @" + ### āš™ļø Vendor Initialization + + āœ… Vendor dependencies initialized successfully. + + **Vendor Versions:** + $($vendorInfo -join "`n") + + "@ + + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Summary - Test results table header if: success() shell: pwsh run: | - echo "### šŸ“‹ Test Results" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "| Test | Status |" >> $env:GITHUB_STEP_SUMMARY - echo "| --- | --- |" >> $env:GITHUB_STEP_SUMMARY + @" + ### šŸ“‹ Test Results + + | Test | Status | Duration | + | --- | --- | --- | + "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Testing Clink Shell + id: test-clink run: | cmd /c vendor\init.bat /v /d /t @@ -85,8 +115,9 @@ jobs: if: success() shell: pwsh run: | - echo "| Clink Shell | āœ… Passed |" >> $env:GITHUB_STEP_SUMMARY + "| Clink Shell | āœ… Passed | Cmd shell initialization |" | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Testing PowerShell + id: test-powershell run: | PowerShell.exe -ExecutionPolicy Bypass -NoLogo -NoProfile -Command "$env:CMDER_DEBUG='1'; . 'vendor\profile.ps1'" @@ -94,8 +125,9 @@ jobs: if: success() shell: pwsh run: | - echo "| PowerShell | āœ… Passed |" >> $env:GITHUB_STEP_SUMMARY + "| PowerShell | āœ… Passed | Profile script execution |" | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Testing Bash + id: test-bash run: | bash vendor/cmder.sh @@ -103,13 +135,20 @@ jobs: if: success() shell: pwsh run: | - echo "| Bash | āœ… Passed |" >> $env:GITHUB_STEP_SUMMARY + "| Bash | āœ… Passed | Bash environment initialization |" | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Summary - All tests completed if: success() shell: pwsh run: | - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "### āœ… All Tests Completed" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "All shell environments tested successfully!" >> $env:GITHUB_STEP_SUMMARY + @" + + ### āœ… All Tests Completed + + All shell environments tested successfully! + + **Test Coverage:** + - āœ… Clink shell environment (Windows cmd.exe with Clink) + - āœ… PowerShell environment (with Cmder profile) + - āœ… Bash environment (Git Bash integration) + "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 From 0bc7fd3aaa01feb5bf62e4503ba18b9b644f7fad Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 14 Dec 2025 22:30:03 +0000 Subject: [PATCH 114/203] Improve build workflow summary: add links, vendor packages, full hashes, and merge artifact sections Co-authored-by: DRSDavidSoft <4673812+DRSDavidSoft@users.noreply.github.com> --- .github/workflows/build.yml | 93 +++++++++++++++++++++---------------- 1 file changed, 52 insertions(+), 41 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c59f93536..df6579be8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,21 +45,38 @@ jobs: # Get Cmder version . scripts/utils.ps1 $cmderVersion = Get-VersionStr + $buildTime = (Get-Date).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ") @" ## šŸ“¦ Build Cmder - Workflow Summary + Build started: $buildTime + ### Repository Information | Property | Value | | --- | --- | - | Repository | ``${{ github.repository }}`` | - | Branch | ``${{ github.ref_name }}`` | - | Commit | ``${{ github.sha }}`` | - | Actor | @${{ github.actor }} | + | Repository | [${{ github.repository }}](https://github.com/${{ github.repository }}) | + | Branch | [${{ github.ref_name }}](https://github.com/${{ github.repository }}/tree/${{ github.ref_name }}) | + | Commit | [${{ github.sha }}](https://github.com/${{ github.repository }}/commit/${{ github.sha }}) | + | Actor | [@${{ github.actor }}](https://github.com/${{ github.actor }}) | | Workflow | ``${{ github.workflow }}`` | | Cmder Version | **$cmderVersion** | - "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 + --- + + ### Vendor Packages + | Package | Version | + | --- | --- | + "@ + + # Read vendor sources.json and add to summary + $vendorSources = Get-Content "vendor/sources.json" | ConvertFrom-Json + foreach ($vendor in $vendorSources) { + $summary += "`n| ``$($vendor.name)`` | $($vendor.version) |" + } + $summary += "`n" + + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Add MSBuild to PATH uses: microsoft/setup-msbuild@v2 @@ -74,9 +91,12 @@ jobs: shell: pwsh run: | @" - ### āœ… Build Status - Cmder launcher successfully compiled. + --- + + ### Build Status + + āœ… Cmder launcher successfully compiled. "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 @@ -85,31 +105,6 @@ jobs: working-directory: scripts run: .\pack.ps1 -verbose - - name: Summary - Package artifacts - if: success() - shell: pwsh - run: | - $summary = @" - ### šŸ“¦ Artifacts Created - - | Artifact | Size | Hash (SHA256) | - | --- | --- | --- | - "@ - - $artifacts = @("cmder.zip", "cmder.7z", "cmder_mini.zip") - foreach ($artifact in $artifacts) { - $path = "build/$artifact" - if (Test-Path $path) { - $size = (Get-Item $path).Length / 1MB - # Truncate hash to first 16 chars for summary readability (full hash in hashes.txt) - $hash = (Get-FileHash $path -Algorithm SHA256).Hash.Substring(0, 16) - $summary += "`n| ``$artifact`` | $([math]::Round($size, 2)) MB | ``$hash...`` |" - } - } - $summary += "`n" - - $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - - name: Upload artifact (cmder.zip) uses: actions/upload-artifact@v5 with: @@ -140,15 +135,28 @@ jobs: shell: pwsh run: | @" - ### ā˜ļø Upload Status - All artifacts successfully uploaded to GitHub Actions: - - āœ… ``cmder.zip`` - - āœ… ``cmder.7z`` - - āœ… ``cmder_mini.zip`` - - āœ… ``hashes.txt`` + --- - "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 + ### Artifacts + + | Artifact | Size | Hash (SHA256) | Download | + | --- | --- | --- | --- | + "@ + + $artifacts = @("cmder.zip", "cmder.7z", "cmder_mini.zip", "hashes.txt") + foreach ($artifact in $artifacts) { + $path = "build/$artifact" + if (Test-Path $path) { + $size = (Get-Item $path).Length / 1MB + $hash = (Get-FileHash $path -Algorithm SHA256).Hash + $downloadUrl = "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" + $summary += "`n| ``$artifact`` | $([math]::Round($size, 2)) MB | ``$hash`` | [Download]($downloadUrl) |" + } + } + $summary += "`n" + + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Create Release uses: softprops/action-gh-release@v2 @@ -167,9 +175,12 @@ jobs: shell: pwsh run: | @" - ### šŸš€ Release Information - Draft release created for tag: **``${{ github.ref_name }}``** + --- + + ### Release Information + + šŸš€ Draft release created for tag: **``${{ github.ref_name }}``** Release includes: - Full version (``cmder.zip``, ``cmder.7z``) From 2057ee58b03d87728594e7542f19326e2b2bc99a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 15 Dec 2025 01:13:19 +0000 Subject: [PATCH 115/203] Fix incomplete summary by initializing $summary variable before appending Co-authored-by: DRSDavidSoft <4673812+DRSDavidSoft@users.noreply.github.com> --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index df6579be8..9cf6788a9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -47,7 +47,7 @@ jobs: $cmderVersion = Get-VersionStr $buildTime = (Get-Date).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ") - @" + $summary = @" ## šŸ“¦ Build Cmder - Workflow Summary Build started: $buildTime @@ -134,7 +134,7 @@ jobs: if: success() shell: pwsh run: | - @" + $summary = @" --- From bff3862ad4c2939c0821676683dc7dc6d0817642 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 15 Dec 2025 01:41:42 +0000 Subject: [PATCH 116/203] =?UTF-8?q?Use=20=F0=9F=97=83=EF=B8=8F=20emoji=20f?= =?UTF-8?q?or=20Vendor=20Packages=20and=20Artifacts=20sections?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: DRSDavidSoft <4673812+DRSDavidSoft@users.noreply.github.com> --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9cf6788a9..859002725 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -64,7 +64,7 @@ jobs: --- - ### Vendor Packages + ### šŸ—ƒļø Vendor Packages | Package | Version | | --- | --- | "@ @@ -138,7 +138,7 @@ jobs: --- - ### Artifacts + ### šŸ—ƒļø Artifacts | Artifact | Size | Hash (SHA256) | Download | | --- | --- | --- | --- | From 838c1cfaa3cc0140f8bddd428a69225ac0d184c9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 15 Dec 2025 01:56:14 +0000 Subject: [PATCH 117/203] Add backticks to clickable links for code formatting in Repository Information Co-authored-by: DRSDavidSoft <4673812+DRSDavidSoft@users.noreply.github.com> --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 859002725..7441c5b02 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -55,9 +55,9 @@ jobs: ### Repository Information | Property | Value | | --- | --- | - | Repository | [${{ github.repository }}](https://github.com/${{ github.repository }}) | - | Branch | [${{ github.ref_name }}](https://github.com/${{ github.repository }}/tree/${{ github.ref_name }}) | - | Commit | [${{ github.sha }}](https://github.com/${{ github.repository }}/commit/${{ github.sha }}) | + | Repository | [``${{ github.repository }}``](https://github.com/${{ github.repository }}) | + | Branch | [``${{ github.ref_name }}``](https://github.com/${{ github.repository }}/tree/${{ github.ref_name }}) | + | Commit | [``${{ github.sha }}``](https://github.com/${{ github.repository }}/commit/${{ github.sha }}) | | Actor | [@${{ github.actor }}](https://github.com/${{ github.actor }}) | | Workflow | ``${{ github.workflow }}`` | | Cmder Version | **$cmderVersion** | From 27c7a0cdc6c6b4224a2715236adde5a2dd1cc7d7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 15 Dec 2025 01:59:35 +0000 Subject: [PATCH 118/203] Improve build summary: simplify message, reorder columns, add file type emojis Co-authored-by: DRSDavidSoft <4673812+DRSDavidSoft@users.noreply.github.com> --- .github/workflows/build.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7441c5b02..6583450f7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -96,7 +96,7 @@ jobs: ### Build Status - āœ… Cmder launcher successfully compiled. + āœ… Cmder built successfully. "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 @@ -140,7 +140,7 @@ jobs: ### šŸ—ƒļø Artifacts - | Artifact | Size | Hash (SHA256) | Download | + | Artifact | Size | Download | Hash (SHA256) | | --- | --- | --- | --- | "@ @@ -151,7 +151,17 @@ jobs: $size = (Get-Item $path).Length / 1MB $hash = (Get-FileHash $path -Algorithm SHA256).Hash $downloadUrl = "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" - $summary += "`n| ``$artifact`` | $([math]::Round($size, 2)) MB | ``$hash`` | [Download]($downloadUrl) |" + + # Determine emoji based on file type + if ($artifact -match '\.txt$') { + $emoji = "šŸ“„" + } elseif ($artifact -match '\.(zip|7z)$') { + $emoji = "šŸ—„ļø" + } else { + $emoji = "šŸ“¦" + } + + $summary += "`n| $emoji ``$artifact`` | $([math]::Round($size, 2)) MB | [šŸ“„ Download]($downloadUrl) | ``$hash`` |" } } $summary += "`n" From a937901e822eb19c527f368f0e7056a1ab9172ad Mon Sep 17 00:00:00 2001 From: David Refoua Date: Mon, 15 Dec 2025 06:06:08 +0330 Subject: [PATCH 119/203] Change emoji for Vendor Packages section --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6583450f7..3bd7ff39f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -64,7 +64,7 @@ jobs: --- - ### šŸ—ƒļø Vendor Packages + ### šŸ“ Vendor Packages | Package | Version | | --- | --- | "@ From 825df3aace44502da0bad0934c2a4f02411ce641 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 15 Dec 2025 02:48:18 +0000 Subject: [PATCH 120/203] Fix branch link for PR merge refs to point to PR instead of invalid tree URL Co-authored-by: DRSDavidSoft <4673812+DRSDavidSoft@users.noreply.github.com> --- .github/workflows/build.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3bd7ff39f..29d09d1f6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -47,6 +47,21 @@ jobs: $cmderVersion = Get-VersionStr $buildTime = (Get-Date).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ") + # Determine branch link (handle PR merge refs) + $branchName = "${{ github.ref_name }}" + $branchLink = "" + if ($branchName -match '^(\d+)/(merge|head)$') { + # This is a PR merge/head ref, link to the PR + $prNumber = $Matches[1] + $branchLink = "https://github.com/${{ github.repository }}/pull/$prNumber" + } elseif ("${{ github.event_name }}" -eq "pull_request") { + # This is a pull request event, link to the PR + $branchLink = "https://github.com/${{ github.repository }}/pull/${{ github.event.pull_request.number }}" + } else { + # Regular branch, link to the branch tree + $branchLink = "https://github.com/${{ github.repository }}/tree/${{ github.ref_name }}" + } + $summary = @" ## šŸ“¦ Build Cmder - Workflow Summary @@ -56,7 +71,7 @@ jobs: | Property | Value | | --- | --- | | Repository | [``${{ github.repository }}``](https://github.com/${{ github.repository }}) | - | Branch | [``${{ github.ref_name }}``](https://github.com/${{ github.repository }}/tree/${{ github.ref_name }}) | + | Branch | [``$branchName``]($branchLink) | | Commit | [``${{ github.sha }}``](https://github.com/${{ github.repository }}/commit/${{ github.sha }}) | | Actor | [@${{ github.actor }}](https://github.com/${{ github.actor }}) | | Workflow | ``${{ github.workflow }}`` | From a52b0b9e1011779ab14c92b042d874b76e098186 Mon Sep 17 00:00:00 2001 From: David Refoua Date: Mon, 15 Dec 2025 06:20:35 +0330 Subject: [PATCH 121/203] Update .github/workflows/tests.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/tests.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ec295e328..916b678af 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -72,9 +72,10 @@ jobs: if: success() shell: pwsh run: | - # Get vendor versions + # Get vendor versions from sources.json $vendorInfo = @() - $vendorDirs = @("conemu-maximus5", "clink", "git-for-windows") + $sources = Get-Content "sources.json" -Raw | ConvertFrom-Json + $vendorDirs = $sources.PSObject.Properties | ForEach-Object { $_.Name } foreach ($dir in $vendorDirs) { $versionFile = "vendor/$dir/.cmderver" if (Test-Path $versionFile) { From 641ce7b1e811063fda12a62a3d84de7063c314e9 Mon Sep 17 00:00:00 2001 From: David Refoua Date: Mon, 15 Dec 2025 06:23:04 +0330 Subject: [PATCH 122/203] Update .github/workflows/build.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/build.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 29d09d1f6..caf5e0664 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -86,8 +86,12 @@ jobs: # Read vendor sources.json and add to summary $vendorSources = Get-Content "vendor/sources.json" | ConvertFrom-Json - foreach ($vendor in $vendorSources) { - $summary += "`n| ``$($vendor.name)`` | $($vendor.version) |" + if ($vendorSources.Count -eq 0) { + $summary += "`n| _No vendor packages found_ | |" + } else { + foreach ($vendor in $vendorSources) { + $summary += "`n| ``$($vendor.name)`` | $($vendor.version) |" + } } $summary += "`n" From 2780a433237172ff0ce3156b85f7f897b8119e77 Mon Sep 17 00:00:00 2001 From: David Refoua Date: Mon, 15 Dec 2025 06:33:39 +0330 Subject: [PATCH 123/203] Update .github/workflows/tests.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/tests.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 916b678af..043b15860 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -90,7 +90,13 @@ jobs: āœ… Vendor dependencies initialized successfully. **Vendor Versions:** - $($vendorInfo -join "`n") + $( + if ($vendorInfo.Count -eq 0) { + "_No vendor version information available._" + } else { + $vendorInfo -join "`n" + } + ) "@ From 83df88d5a32dedc8234f42fa925dcbf89524654e Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Mon, 22 Dec 2025 09:42:30 -0500 Subject: [PATCH 124/203] fixes for windows 10 --- vendor/bin/install_pacman.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vendor/bin/install_pacman.sh b/vendor/bin/install_pacman.sh index 6d72d0714..dd725ca4a 100644 --- a/vendor/bin/install_pacman.sh +++ b/vendor/bin/install_pacman.sh @@ -14,6 +14,9 @@ # Always review and understand scripts from external sources prior to execution. export bin_source=${1:-https://github.com/daxgames/pacman-for-git/raw/refs/heads/main} +export HOME=$(cygpath -u "$USERPROFILE") +echo "Using binary source: $bin_source" +echo "Using HOME directory: $HOME" if [[ "$HOSTTYPE" == "i686" ]]; then pacman=( @@ -87,7 +90,7 @@ mkdir -p /var/lib/pacman ln -sf "$(which gettext)" /usr/bin/ pacman-key --init pacman-key --populate msys2 -pacman -Syu --noconfirm +pacman -Syu --noconfirm --disable-download-timeout echo -e "\n=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n" echo =-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- From 684185ca8a252887f51d883222a86993308799cd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 25 Dec 2025 05:37:09 +0000 Subject: [PATCH 125/203] Fix vendor workflow Unicode escape error by converting echo to PowerShell here-strings Co-authored-by: DRSDavidSoft <4673812+DRSDavidSoft@users.noreply.github.com> --- .github/workflows/vendor.yml | 52 +++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 22 deletions(-) diff --git a/.github/workflows/vendor.yml b/.github/workflows/vendor.yml index 717e543db..6bdf80496 100644 --- a/.github/workflows/vendor.yml +++ b/.github/workflows/vendor.yml @@ -31,10 +31,12 @@ jobs: - name: Summary - Workflow started shell: pwsh run: | - echo "## šŸ“¦ Update Vendor - Workflow Summary" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "Checking for vendor dependency updates..." >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY + @" + ## šŸ“¦ Update Vendor - Workflow Summary + + Checking for vendor dependency updates... + + "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - id: make-changes name: Checking for updates @@ -64,17 +66,21 @@ jobs: run: | $count = $env:COUNT_UPDATED if ($count -eq 0) { - echo "### āœ… No Updates Available" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "All vendor dependencies are up to date." >> $env:GITHUB_STEP_SUMMARY + @" + ### āœ… No Updates Available + + All vendor dependencies are up to date. + "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 } else { $word = if ($count -eq 1) { 'dependency' } else { 'dependencies' } - echo "### šŸ”„ Updates Found" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "**$count** vendor $word updated:" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "$env:UPDATE_MESSAGE" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY + @" + ### šŸ”„ Updates Found + + **$count** vendor $word updated: + + $env:UPDATE_MESSAGE + + "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 } - uses: peter-evans/create-pull-request@v7 @@ -94,12 +100,14 @@ jobs: if: env.COUNT_UPDATED > 0 shell: pwsh run: | - echo "### šŸŽ‰ Pull Request Created" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "A pull request has been created to update the vendor dependencies." >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "**Branch:** \`update-vendor\`" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "**Updated dependencies:** $env:LIST_UPDATED" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "> Please review and merge the pull request to apply the updates." >> $env:GITHUB_STEP_SUMMARY + @" + ### šŸŽ‰ Pull Request Created + + A pull request has been created to update the vendor dependencies. + + **Branch:** ``update-vendor`` + + **Updated dependencies:** $env:LIST_UPDATED + + > Please review and merge the pull request to apply the updates. + "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 From dc93fa5d1bbe783d39147c387b68bfb78b2ff457 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 25 Dec 2025 05:40:39 +0000 Subject: [PATCH 126/203] Add real artifact download URLs with retry logic and fallback to run page Co-authored-by: DRSDavidSoft <4673812+DRSDavidSoft@users.noreply.github.com> --- .github/workflows/build.yml | 46 +++++++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index caf5e0664..40ca5baf8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -152,6 +152,8 @@ jobs: - name: Summary - Artifacts uploaded if: success() shell: pwsh + env: + GH_TOKEN: ${{ github.token }} run: | $summary = @" @@ -163,13 +165,53 @@ jobs: | --- | --- | --- | --- | "@ + # Function to get artifact download URL with retry logic + function Get-ArtifactDownloadUrl { + param( + [string]$ArtifactName, + [int]$MaxRetries = 3, + [int]$DelaySeconds = 2 + ) + + for ($i = 0; $i -lt $MaxRetries; $i++) { + try { + # Use GitHub CLI to get artifact information + $artifactsJson = gh api "repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts" --jq ".artifacts[] | select(.name == `"$ArtifactName`")" + + if ($artifactsJson) { + $artifact = $artifactsJson | ConvertFrom-Json + if ($artifact.archive_download_url) { + return $artifact.archive_download_url + } + } + } catch { + Write-Host "Attempt $($i + 1) failed to get artifact URL for $ArtifactName : $_" + } + + if ($i -lt ($MaxRetries - 1)) { + Start-Sleep -Seconds $DelaySeconds + } + } + + return $null + } + $artifacts = @("cmder.zip", "cmder.7z", "cmder_mini.zip", "hashes.txt") foreach ($artifact in $artifacts) { $path = "build/$artifact" if (Test-Path $path) { $size = (Get-Item $path).Length / 1MB $hash = (Get-FileHash $path -Algorithm SHA256).Hash - $downloadUrl = "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" + + # Try to get the actual artifact download URL + $downloadUrl = Get-ArtifactDownloadUrl -ArtifactName $artifact + $warning = "" + + if (-not $downloadUrl) { + # Fallback to workflow run page if artifact URL fetch fails + $downloadUrl = "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" + $warning = " āš ļø" + } # Determine emoji based on file type if ($artifact -match '\.txt$') { @@ -180,7 +222,7 @@ jobs: $emoji = "šŸ“¦" } - $summary += "`n| $emoji ``$artifact`` | $([math]::Round($size, 2)) MB | [šŸ“„ Download]($downloadUrl) | ``$hash`` |" + $summary += "`n| $emoji ``$artifact`` | $([math]::Round($size, 2)) MB | [šŸ“„ Download$warning]($downloadUrl) | ``$hash`` |" } } $summary += "`n" From 64316333eea0ae85150a0e28e16fbeb8018c950f Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Thu, 25 Dec 2025 15:59:09 -0500 Subject: [PATCH 127/203] x --- vendor/bin/install_pacman.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vendor/bin/install_pacman.sh b/vendor/bin/install_pacman.sh index 6d72d0714..dd725ca4a 100644 --- a/vendor/bin/install_pacman.sh +++ b/vendor/bin/install_pacman.sh @@ -14,6 +14,9 @@ # Always review and understand scripts from external sources prior to execution. export bin_source=${1:-https://github.com/daxgames/pacman-for-git/raw/refs/heads/main} +export HOME=$(cygpath -u "$USERPROFILE") +echo "Using binary source: $bin_source" +echo "Using HOME directory: $HOME" if [[ "$HOSTTYPE" == "i686" ]]; then pacman=( @@ -87,7 +90,7 @@ mkdir -p /var/lib/pacman ln -sf "$(which gettext)" /usr/bin/ pacman-key --init pacman-key --populate msys2 -pacman -Syu --noconfirm +pacman -Syu --noconfirm --disable-download-timeout echo -e "\n=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n" echo =-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- From be5b64122cd55a62061ca18c45874e87c47503e4 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Fri, 16 Jan 2026 16:55:16 -0500 Subject: [PATCH 128/203] add installPacman switch to build.sh --- scripts/build.ps1 | 9 ++++++++- {vendor/bin => scripts}/install_pacman.sh | 0 2 files changed, 8 insertions(+), 1 deletion(-) rename {vendor/bin => scripts}/install_pacman.sh (100%) diff --git a/scripts/build.ps1 b/scripts/build.ps1 index 634d2467c..9a0be078a 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -60,7 +60,10 @@ Param( [string]$terminal = 'all', # Build launcher if you have MSBuild tools installed - [switch]$Compile + [switch]$Compile, + + # Install pacman if not present + [switch]$InstallPacman ) # Get the scripts and cmder root dirs we are building in. @@ -199,6 +202,10 @@ if (-not $noVendor) { Copy-Item $($saveTo + "git-prompt.sh") $($saveTo + "git-for-windows/etc/profile.d/git-prompt.sh") } + if ( $InstallPacman -and !(Test-Path $($saveTo + "git-for-windows/usr/bin/pacman.exe") ) ) { + Write-Verbose "Installing pacman..." + & $($saveTo + "git-for-windows/bin/bash.exe") $($saveTo + "../scripts/install_pacman.sh") + } Pop-Location } diff --git a/vendor/bin/install_pacman.sh b/scripts/install_pacman.sh similarity index 100% rename from vendor/bin/install_pacman.sh rename to scripts/install_pacman.sh From c5e103fbddf93ba150058ab8f97407b5d5abc5cf Mon Sep 17 00:00:00 2001 From: DRSDavidSoft <4673812+DRSDavidSoft@users.noreply.github.com> Date: Fri, 20 Feb 2026 13:58:43 +0000 Subject: [PATCH 129/203] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20Update=20dependenc?= =?UTF-8?q?ies=20(git-for-windows=20v2.53.0.windows.1,=20clink=20v1.9.15,?= =?UTF-8?q?=20windows-terminal=20v1.23.20211.0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vendor/sources.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/vendor/sources.json b/vendor/sources.json index df1ae3e5f..563e0f971 100644 --- a/vendor/sources.json +++ b/vendor/sources.json @@ -1,13 +1,13 @@ [ { "name": "git-for-windows", - "version": "2.52.0.windows.1", - "url": "https://github.com/git-for-windows/git/releases/download/v2.52.0.windows.1/PortableGit-2.52.0-64-bit.7z.exe" + "version": "2.53.0.windows.1", + "url": "https://github.com/git-for-windows/git/releases/download/v2.53.0.windows.1/PortableGit-2.53.0-64-bit.7z.exe" }, { "name": "clink", - "version": "1.9.5", - "url": "https://github.com/chrisant996/clink/releases/download/v1.9.5/clink.1.9.5.ee6b4f.zip" + "version": "1.9.15", + "url": "https://github.com/chrisant996/clink/releases/download/v1.9.15/clink.1.9.15.41e80a.zip" }, { "name": "conemu-maximus5", @@ -16,8 +16,8 @@ }, { "name": "windows-terminal", - "version": "1.23.12811.0", - "url": "https://github.com/microsoft/terminal/releases/download/v1.23.12811.0/Microsoft.WindowsTerminal_1.23.12811.0_x64.zip" + "version": "1.23.20211.0", + "url": "https://github.com/microsoft/terminal/releases/download/v1.23.20211.0/Microsoft.WindowsTerminal_1.23.20211.0_x64.zip" }, { "name": "clink-completions", From 3ea6067d1dc7e3a4b0a0f9cf44e1b3c46f73e502 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sat, 21 Feb 2026 07:40:32 -0500 Subject: [PATCH 130/203] rehome to daxgames/cmder --- .github/ISSUE_TEMPLATE/bug-report.yml | 14 +++++++------- .github/ISSUE_TEMPLATE/config.yml | 4 ++-- .github/ISSUE_TEMPLATE/feature-request.yml | 4 ++-- .github/ISSUE_TEMPLATE/question.yml | 6 +++--- .github/workflows/branches.yml | 14 +++++++------- .github/workflows/build.yml | 4 ++-- .github/workflows/codeql.yml | 4 ++-- .github/workflows/tests.yml | 8 ++++---- .github/workflows/vendor.yml | 2 +- scripts/rehome.sh | 12 ++++++++++++ 10 files changed, 42 insertions(+), 30 deletions(-) create mode 100644 scripts/rehome.sh diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index e303633ff..15803553f 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -20,7 +20,7 @@ body: label: Version Information description: | Please write your Cmder and ConEmu version below. If applicable, write down your Windows edition too. - **šŸ‘‰ See:** [How to find out which Cmder version I'm using](https://github.com/cmderdev/cmder/wiki/Cmder-troubleshooting) + **šŸ‘‰ See:** [How to find out which Cmder version I'm using](https://github.com/daxgames/cmder/wiki/Cmder-troubleshooting) placeholder: | Cmder version: Operating system: @@ -52,13 +52,13 @@ body: | **README.md** | **Wiki** | | ------------- | -------- | - | 🌐 [Open Link](https://github.com/cmderdev/cmder/blob/master/README.md) | 🌐 [Open Link](https://github.com/cmderdev/cmder/wiki) | + | 🌐 [Open Link](https://github.com/daxgames/cmder/blob/main/README.md) | 🌐 [Open Link](https://github.com/daxgames/cmder/wiki) | (What you may be asking here could already be explained there!) - Searched for existing issues (including the **closed** ones) for similar problems here: - šŸ—ƒ https://github.com/cmderdev/cmder/issues?q=is:issue + šŸ—ƒ https://github.com/daxgames/cmder/issues?q=is:issue - Please understand that Cmder uses ConEmu as the default underlying Terminal Emulator. @@ -91,10 +91,10 @@ body: #### Prerequisites before submitting an issue - We do not support any versions older than the current release series, if you are using an older Cmder please update to the latest version first. - - Verify that the issue is not already fixed and is reproducible in the **[latest official Cmder version](https://github.com/cmderdev/cmder/releases).** - - Check the **[current issues list](https://github.com/cmderdev/cmder/issues?q=is%3Aissue)** and perform a **search of the issue tracker (including closed ones)** to avoid posting a duplicate bug report. - - Make sure this is not a support request or question, both of which are better suited for either the **[discussions section](https://github.com/cmderdev/cmder/discussions)**, or the **[questions section](https://github.com/cmderdev/cmder/issues/new?template=question.yml)**. - - Verify that the **[wiki](https://github.com/cmderdev/cmder/wiki)** did not contain a suitable solution either. + - Verify that the issue is not already fixed and is reproducible in the **[latest official Cmder version](https://github.com/daxgames/cmder/releases).** + - Check the **[current issues list](https://github.com/daxgames/cmder/issues?q=is%3Aissue)** and perform a **search of the issue tracker (including closed ones)** to avoid posting a duplicate bug report. + - Make sure this is not a support request or question, both of which are better suited for either the **[discussions section](https://github.com/daxgames/cmder/discussions)**, or the **[questions section](https://github.com/daxgames/cmder/issues/new?template=question.yml)**. + - Verify that the **[wiki](https://github.com/daxgames/cmder/wiki)** did not contain a suitable solution either. Thank you for making sure you are opening a new valid issue! ♄ diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 0dd068b08..4f424ec57 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,9 +1,9 @@ blank_issues_enabled: false contact_links: - name: šŸ“„ Wiki - url: "https://github.com/cmderdev/cmder/wiki" + url: "https://github.com/daxgames/cmder/wiki" about: "Consult the wiki first, it might already contain the information you are looking for" - name: šŸ’¬ Discussions - url: "https://github.com/cmderdev/cmder/discussions" + url: "https://github.com/daxgames/cmder/discussions" about: "Please ask questions related to usage/setup/support/non-issue development discussion in the Discussions section" diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml index b80fe0b60..ff5470364 100644 --- a/.github/ISSUE_TEMPLATE/feature-request.yml +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -16,7 +16,7 @@ body: - Searched for existing issues (including the **closed** ones) for similar feature requests here: - šŸ—ƒ https://github.com/cmderdev/cmder/issues?q=is:issue + šŸ—ƒ https://github.com/daxgames/cmder/issues?q=is:issue - If you are opening the feature request regarding any of the **upstream technologies** that are used by Cmder, please open the feature request at the corresponding upstream repos instead: - **[Clink](https://github.com/chrisant996/clink)**, the default shell in Cmder @@ -28,7 +28,7 @@ body: You may already have an answer under the Guides or Questions section. - For a list of labels, visit **[🌐 Labels](https://github.com/cmderdev/cmder/labels)**. + For a list of labels, visit **[🌐 Labels](https://github.com/daxgames/cmder/labels)**. (Be sure to also check ā€œClosedā€ issues in the labels section!) diff --git a/.github/ISSUE_TEMPLATE/question.yml b/.github/ISSUE_TEMPLATE/question.yml index de27b37c0..3091f8473 100644 --- a/.github/ISSUE_TEMPLATE/question.yml +++ b/.github/ISSUE_TEMPLATE/question.yml @@ -13,15 +13,15 @@ body: | **README.md** | **Wiki** | **Issues** | | ------------- | -------- | ---------- | - | 🌐 [Open Link](https://github.com/cmderdev/cmder/blob/master/README.md) | 🌐 [Open Link](https://github.com/cmderdev/cmder/wiki) | šŸ—ƒ [Open Link](https://github.com/cmderdev/cmder/issues?q=is:issue) | + | 🌐 [Open Link](https://github.com/daxgames/cmder/blob/main/README.md) | 🌐 [Open Link](https://github.com/daxgames/cmder/wiki) | šŸ—ƒ [Open Link](https://github.com/daxgames/cmder/issues?q=is:issue) | (What you may be asking here could already be explained there!) - If you would like to ask for guides on how to integrate Cmder with your favorite IDE of choice, or how to perform a specific task with Cmder, make sure you visit our label section first. - You may already have an answer under the [šŸ’¬ Guides](https://github.com/cmderdev/cmder/issues?q=label%3A%22%F0%9F%92%AC+Type%3A+Guide%22), [šŸ“– Documentation](https://github.com/cmderdev/cmder/issues?q=label%3A%22%F0%9F%93%96+Documentation%22) or [ā” Questions](https://github.com/cmderdev/cmder/issues?q=is%3Aissue+label%3A%22%E2%9D%94+Type%3A+Question%22) section. + You may already have an answer under the [šŸ’¬ Guides](https://github.com/daxgames/cmder/issues?q=label%3A%22%F0%9F%92%AC+Type%3A+Guide%22), [šŸ“– Documentation](https://github.com/daxgames/cmder/issues?q=label%3A%22%F0%9F%93%96+Documentation%22) or [ā” Questions](https://github.com/daxgames/cmder/issues?q=is%3Aissue+label%3A%22%E2%9D%94+Type%3A+Question%22) section. - For a list of labels, visit **[Labels](https://github.com/cmderdev/cmder/labels)**. + For a list of labels, visit **[Labels](https://github.com/daxgames/cmder/labels)**. (Be sure to also check ā€œClosedā€ issues in the labels section!) diff --git a/.github/workflows/branches.yml b/.github/workflows/branches.yml index ff65db165..647296b86 100644 --- a/.github/workflows/branches.yml +++ b/.github/workflows/branches.yml @@ -4,14 +4,14 @@ name: Update branches on: # Triggers the workflow on push events for the development branch push: - branches: [ master ] + branches: [ main ] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - # This job updates the development branch with the master branch + # This job updates the development branch with the main branch update-development: # The type of runner that the job will run on runs-on: ubuntu-latest @@ -32,19 +32,19 @@ jobs: echo "" >> $GITHUB_STEP_SUMMARY echo "| Property | Value |" >> $GITHUB_STEP_SUMMARY echo "| --- | --- |" >> $GITHUB_STEP_SUMMARY - echo "| Source Branch | \`master\` |" >> $GITHUB_STEP_SUMMARY + echo "| Source Branch | \`main\` |" >> $GITHUB_STEP_SUMMARY echo "| Target Branch | \`development\` |" >> $GITHUB_STEP_SUMMARY echo "| Triggered by | @${{ github.actor }} |" >> $GITHUB_STEP_SUMMARY echo "| Commit | \`${{ github.sha }}\` |" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY # Runs a single command using the runners shell - - name: Merge master into development + - name: Merge main into development run: | git config user.name "${{ github.actor }}" git config user.email "${{ github.actor }}@users.noreply.github.com" git checkout development - git merge --no-ff master + git merge --no-ff main git push origin development - name: Summary - Merge completed @@ -53,8 +53,8 @@ jobs: run: | echo "### āœ… Merge Successful" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY - echo "The \`master\` branch has been successfully merged into \`development\`." >> $GITHUB_STEP_SUMMARY + echo "The \`main\` branch has been successfully merged into \`development\`." >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY echo "**Merge type:** No fast-forward merge" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY - echo "> The development branch is now synchronized with the latest changes from master." >> $GITHUB_STEP_SUMMARY + echo "> The development branch is now synchronized with the latest changes from main." >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 18f6b469b..be4bddf50 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,11 +7,11 @@ name: Build Cmder # Controls when the action will run. Triggers the workflow on push or pull request events but only for the main branch on: push: - branches: [ "master" ] + branches: [ "main" ] tags: - "v*" pull_request: - branches: [ "master", "development" ] + branches: [ "main" ] #---------------------------------# # environment configuration # diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 16ebd4072..ed07c1fac 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -8,7 +8,7 @@ name: "CodeQL" on: push: - branches: [ "master", "development" ] + branches: [ "main" ] paths-ignore: - '**/*.md' - '**/*.txt' @@ -16,7 +16,7 @@ on: - '**/.gitignore' pull_request: # The branches below must be a subset of the branches above - branches: [ "master", "development" ] + branches: [ "main" ] paths-ignore: - '**/*.md' - '**/*.txt' diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5110ab18d..2eda8de1a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -3,8 +3,8 @@ name: Run Tests on: push: branches: - - master - - development + - main + paths-ignore: - '**/*.md' - '**/*.txt' @@ -12,8 +12,8 @@ on: - '**/.gitignore' pull_request: branches: - - master - - development + - main + paths-ignore: - '**/*.md' - '**/*.txt' diff --git a/.github/workflows/vendor.yml b/.github/workflows/vendor.yml index ee76b336c..c7703cb72 100644 --- a/.github/workflows/vendor.yml +++ b/.github/workflows/vendor.yml @@ -88,7 +88,7 @@ jobs: Please verify and then **Merge** the pull request to update. commit-message: 'ā¬†ļø Update dependencies (${{ env.LIST_UPDATED }})' branch: update-vendor - base: master + base: main - name: Summary - Pull request created if: env.COUNT_UPDATED > 0 diff --git a/scripts/rehome.sh b/scripts/rehome.sh new file mode 100644 index 000000000..4903c6331 --- /dev/null +++ b/scripts/rehome.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +branches=$1 +orgs=$2 + +source_branch=$(echo ${branches} | awk -F: '{print $1}') +dest_branch=$(echo ${branches} | awk -F: '{print $2}') + +source_org=$(echo ${orgs} | awk -F: '{print $1}') +dest_org=$(echo ${orgs} | awk -F: '{print $2}') + +sed -i "s/${source_branch}/${dest_branch}/g;s/${source_org}/${dest_org}/g;s/, \"development\"//;s/^\s\+- development//" $(grep -R "${source_branch}\|${source_org}\|development" ./.github | awk -F: '{print $1}') From 6faf5c814148749100f114400c2f9eca78468b44 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sat, 21 Feb 2026 08:09:42 -0500 Subject: [PATCH 131/203] Install Pacman and remove conemu packages --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index be4bddf50..c1c7ea466 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -60,7 +60,7 @@ jobs: - name: Build Cmder Launcher shell: pwsh working-directory: scripts - run: .\build.ps1 -Compile -verbose -terminal all + run: .\build.ps1 -Compile -verbose -terminal windows-terminal -InstallPacman - name: Summary - Build completed if: success() @@ -74,7 +74,7 @@ jobs: - name: Pack the built files shell: pwsh working-directory: scripts - run: .\pack.ps1 -verbose -terminal all + run: .\pack.ps1 -verbose -terminal windows-terminal - name: Upload artifact (cmder_win_mini.zip) uses: actions/upload-artifact@v4 From 6e3efa25ea1fd5b8caca2d79d7c5cca0229e7802 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sat, 21 Feb 2026 10:18:20 -0500 Subject: [PATCH 132/203] Update build.yml to exclude conemu. --- .github/workflows/branches.yml | 2 +- .github/workflows/build.yml | 36 ++++++++++------------------------ 2 files changed, 11 insertions(+), 27 deletions(-) diff --git a/.github/workflows/branches.yml b/.github/workflows/branches.yml index 647296b86..fafa88009 100644 --- a/.github/workflows/branches.yml +++ b/.github/workflows/branches.yml @@ -4,7 +4,7 @@ name: Update branches on: # Triggers the workflow on push events for the development branch push: - branches: [ main ] + branches: [ master ] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c1c7ea466..50e707e7d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -124,7 +124,7 @@ jobs: echo "" >> $env:GITHUB_STEP_SUMMARY echo "| Artifact | Size | Hash (SHA256) |" >> $env:GITHUB_STEP_SUMMARY echo "| --- | --- | --- |" >> $env:GITHUB_STEP_SUMMARY - $artifacts = @("cmder.zip", "cmder.7z", "cmder_mini.zip") + $artifacts = @("cmder_win.zip", "cmder_win.7z", "cmder_win_mini.zip", "cmder_wt.zip", "cmder_wt.7z", "cmder_wt_mini.zip") foreach ($artifact in $artifacts) { $path = "build/$artifact" if (Test-Path $path) { @@ -136,25 +136,6 @@ jobs: } echo "" >> $env:GITHUB_STEP_SUMMARY - - name: Upload artifact (cmder.zip) - uses: actions/upload-artifact@v6 - with: - path: build/cmder.zip - name: cmder.zip - if-no-files-found: error - - - name: Upload artifact (cmder.7z) - uses: actions/upload-artifact@v6 - with: - path: build/cmder.7z - name: cmder.7z - - - name: Upload artifact (cmder_mini.zip) - uses: actions/upload-artifact@v6 - with: - path: build/cmder_mini.zip - name: cmder_mini.zip - - name: Upload artifact (hashes.txt) uses: actions/upload-artifact@v6 with: @@ -168,9 +149,12 @@ jobs: echo "### ā˜ļø Upload Status" >> $env:GITHUB_STEP_SUMMARY echo "" >> $env:GITHUB_STEP_SUMMARY echo "All artifacts successfully uploaded to GitHub Actions:" >> $env:GITHUB_STEP_SUMMARY - echo "- āœ… \`cmder.zip\`" >> $env:GITHUB_STEP_SUMMARY - echo "- āœ… \`cmder.7z\`" >> $env:GITHUB_STEP_SUMMARY - echo "- āœ… \`cmder_mini.zip\`" >> $env:GITHUB_STEP_SUMMARY + echo "- āœ… \`cmder_win.zip\`" >> $env:GITHUB_STEP_SUMMARY + echo "- āœ… \`cmder_win.7z\`" >> $env:GITHUB_STEP_SUMMARY + echo "- āœ… \`cmder_win_mini.zip\`" >> $env:GITHUB_STEP_SUMMARY + echo "- āœ… \`cmder_wt.zip\`" >> $env:GITHUB_STEP_SUMMARY + echo "- āœ… \`cmder_wt.7z\`" >> $env:GITHUB_STEP_SUMMARY + echo "- āœ… \`cmder_wt_mini.zip\`" >> $env:GITHUB_STEP_SUMMARY echo "- āœ… \`hashes.txt\`" >> $env:GITHUB_STEP_SUMMARY echo "" >> $env:GITHUB_STEP_SUMMARY @@ -178,11 +162,11 @@ jobs: uses: softprops/action-gh-release@v2 with: files: | - build/cmder.zip + build/cmder_win.zip + build/cmder_win.7z + build/cmder_win_mini.zip build/cmder_wt.zip - build/cmder.7z build/cmder_wt.7z - build/cmder_mini.zip build/cmder_wt_mini.zip build/hashes.txt draft: true From eaffa39491ed79bf12e0989724d946a2f331c99e Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sat, 21 Feb 2026 10:22:04 -0500 Subject: [PATCH 133/203] update help and windows-terminal pack section --- CHANGELOG.md | 69 +++++++++++++++++++++++++++++++++++++++++++++++- scripts/pack.ps1 | 32 ++++++++++++++++++++-- 2 files changed, 98 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9919a4752..a1fe938a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,22 @@ # Change Log -## Unreleased +## 1.4.0 - Unreleased + +> [!IMPORTANT] +> Pre-built packages that include Conemu are no longer included. + +### Changes + +- Add Windows Terminal integration (defaults, packaging, and launch helpers). +- Refresh vendored sources and defaults via `sources.json` updates. +- Update build/pack scripts and GitHub Actions workflows. ### Fixes +- Improve `lib_path.cmd` path enhancement handling. +- Fix launcher overwrite/backup behavior for emulator settings. +- Add `.git-blame-ignore-revs` entries for whitespace-only changes. + - Fixes #2940 ### Adds @@ -11,6 +24,60 @@ - Cmder for Windows - Uses Windows and Git for Windows Native Terminals. - Does not contain a terminal emulator like ConEmu or Windows Terminal. +- Add Pacman install support for build scripts. +- Add Git Bash/Mintty launch helpers and user init template. +- Add `create-cmdercfg.ps1` and `timer.cmd` helpers. + +## [1.3.25](https://github.com/cmderdev/cmder/tree/v1.3.25) (2024-05-31) + +### Changes + +- Update Git for Windows to 2.45.1.windows.1, Clink to 1.6.14, and clink-completions to 0.5.2. +- Add `SECURITY.md` and refresh CI workflows and actions. +- Enable `match.expand_envvars` and improve git diagnostics for improper versions. + +### Fixes + +- Fix #2944. +- Fix script error when the working directory contains `%`. +- Remove environment refresh race condition. + +## [1.3.24](https://github.com/cmderdev/cmder/tree/v1.3.24) (2023-07-24) + +### Changes + +- Update `build.yml` workflow. + +## [1.3.23](https://github.com/cmderdev/cmder/tree/v1.3.23) (2023-07-24) + +### Changes + +- Update ConEmu (conemu-maximus5) to 23.07.24. + +## [1.3.22](https://github.com/cmderdev/cmder/tree/v1.3.22) (2023-07-24) + +### Changes + +- Update Git for Windows to 2.41.0.windows.3, Clink to 1.5.1, ConEmu to 23.07.23, and clink-completions to 0.4.10. +- Remove AppVeyor configuration and add CodeQL scanning and Dependabot updates. + +### Fixes + +- Fix `/task ""` handling. +- Skip clink injection when initialization fails fatally. +- Fix errors when git/svn/hg are not installed and in profile.d PowerShell scripts. + +## [1.3.21](https://github.com/cmderdev/cmder/tree/v1.3.21) (2022-12-19) + +### Changes + +- Update ConEmu to mitigate CVE-2022-46387. +- Update Git for Windows to 2.39.0.windows.1 and Clink to 1.4.4. + +### Fixes + +- Fix #2789. +- Fix Git Bash `GIT_INSTALL_ROOT` handling. ## [1.3.20](https://github.com/cmderdev/cmder/tree/v1.3.20) (2022-03-18) diff --git a/scripts/pack.ps1 b/scripts/pack.ps1 index 00e862592..c04045f0d 100644 --- a/scripts/pack.ps1 +++ b/scripts/pack.ps1 @@ -6,14 +6,36 @@ You will need to make this script executable by setting your Powershell Execution Policy to Remote signed Then unblock the script for execution with UnblockFile .\pack.ps1 +.PARAMETER cmderRoot + Path to the Cmder root folder to package. Defaults to the repo root. +.PARAMETER terminal + Select which terminal packages to include: `none`, `all`, `conemu-maximus5`, or `windows-terminal`. +.PARAMETER saveTo + Path to the output build folder where archives and `hashes.txt` are written. .EXAMPLE .\pack.ps1 Creates default archives for Cmder .EXAMPLE - .\pack.ps1 -verbose + .\pack.ps1 -Verbose Creates default archives for Cmder with plenty of information +.EXAMPLE + .\pack.ps1 -Terminal windows-terminal + + Creates only Windows Terminal archives (cmder_wt* and cmder_win*). +.EXAMPLE + .\pack.ps1 -Terminal conemu-maximus5 + + Creates only ConEmu archives (cmder* and cmder_win*). +.EXAMPLE + .\pack.ps1 -Terminal none + + Creates only Cmder for Windows archives (cmder_win*). +.EXAMPLE + .\pack.ps1 -SaveTo .\artifacts + + Writes archives and `hashes.txt` to the specified output folder. .NOTES AUTHORS Samuel Vasko, Jack Bennett, Martin Kemp @@ -52,12 +74,18 @@ if ($terminal -eq "none") { } } elseif ($terminal -eq "windows-terminal") { $targets = @{ + "cmder_win.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on -xr!`"vendor\conemu-maximus5`" -xr!`"vendor\windows-terminal`""; + "cmder_win.zip" = "-mm=Deflate -mfb=128 -mpass=3 -xr!`"vendor\conemu-maximus5`" -xr!`"vendor\windows-terminal`""; + "cmder_win_mini.zip" = "-xr!`"vendor\git-for-windows`" -xr!`"vendor\conemu-maximus5`" -xr!`"vendor\windows-terminal`""; "cmder_wt.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on -xr!`"vendor\conemu-maximus5`""; "cmder_wt.zip" = "-mm=Deflate -mfb=128 -mpass=3 -xr!`"vendor\conemu-maximus5`""; "cmder_wt_mini.zip" = "-xr!`"vendor\git-for-windows`" -xr!`"vendor\conemu-maximus5`""; } -} elseif ($terminal -eq "windows-terminal") { +} elseif ($terminal -eq "conemu-maximus5") { $targets = @{ + "cmder_win.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on -xr!`"vendor\conemu-maximus5`" -xr!`"vendor\windows-terminal`""; + "cmder_win.zip" = "-mm=Deflate -mfb=128 -mpass=3 -xr!`"vendor\conemu-maximus5`" -xr!`"vendor\windows-terminal`""; + "cmder_win_mini.zip" = "-xr!`"vendor\git-for-windows`" -xr!`"vendor\conemu-maximus5`" -xr!`"vendor\windows-terminal`""; "cmder.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on -xr!`"vendor\windows-terminal`""; "cmder.zip" = "-mm=Deflate -mfb=128 -mpass=3 -xr!`"vendor\windows-terminal`""; "cmder_mini.zip" = "-xr!`"vendor\git-for-windows`" -xr!`"vendor\windows-terminal`""; From 6d62043ff1e3167e3992bae1327e8bf43a3e2f8c Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sat, 21 Feb 2026 10:22:39 -0500 Subject: [PATCH 134/203] add scripts/rehome.sh --- scripts/rehome.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/rehome.sh b/scripts/rehome.sh index 4903c6331..c1977e94b 100644 --- a/scripts/rehome.sh +++ b/scripts/rehome.sh @@ -1,5 +1,10 @@ #!/usr/bin/env bash +if [ "$#" -ne 2 ]; then + echo "Usage: $0 : :" + exit 1 +fi + branches=$1 orgs=$2 @@ -9,4 +14,4 @@ dest_branch=$(echo ${branches} | awk -F: '{print $2}') source_org=$(echo ${orgs} | awk -F: '{print $1}') dest_org=$(echo ${orgs} | awk -F: '{print $2}') -sed -i "s/${source_branch}/${dest_branch}/g;s/${source_org}/${dest_org}/g;s/, \"development\"//;s/^\s\+- development//" $(grep -R "${source_branch}\|${source_org}\|development" ./.github | awk -F: '{print $1}') +sed -i "s/${source_branch}/${dest_branch}/g;s/${source_org}/${dest_org}/g;s/, \"development\"//;s/^\s\+- development//" $(grep -R "${source_branch}\|${source_org}\|development" ./.github | awk -F: '{print $1}' | grep -v workflows/branches.yml) From be7b1c4a145c0dd1440128bbbc8548faffb2f619 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sat, 21 Feb 2026 10:23:47 -0500 Subject: [PATCH 135/203] Update help --- scripts/build.ps1 | 34 +++++++++++++++++++++++++++++++++- scripts/update.ps1 | 16 ++++++++++++---- scripts/utils.ps1 | 5 +++++ 3 files changed, 50 insertions(+), 5 deletions(-) diff --git a/scripts/build.ps1 b/scripts/build.ps1 index 9a0be078a..9a848e7f1 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -8,6 +8,22 @@ You will need to make this script executable by setting your Powershell Execution Policy to Remote signed Then unblock the script for execution with UnblockFile .\build.ps1 +.PARAMETER sourcesPath + Path to the vendor sources JSON file. Defaults to `vendor\sources.json`. +.PARAMETER saveTo + Path to the vendor folder where downloads are extracted. +.PARAMETER launcher + Path to the launcher project folder used when `-Compile` is set. +.PARAMETER config + Path to the config folder where user settings are backed up and restored. +.PARAMETER noVendor + Skip all vendor downloads and extraction. Useful when only building the launcher. +.PARAMETER terminal + Select which terminal packages to include: `none`, `all`, `conemu-maximus5`, or `windows-terminal`. +.PARAMETER Compile + Build the Cmder launcher using MSBuild. Requires C++ build tools. +.PARAMETER InstallPacman + Install pacman into the embedded Git for Windows if it is not already present. .EXAMPLE .\build.ps1 @@ -21,13 +37,29 @@ Skip all downloads and only build launcher. .EXAMPLE - .\build -verbose + .\build.ps1 -Verbose Execute the build and see what's going on. .EXAMPLE .\build.ps1 -SourcesPath '~/custom/vendors.json' Build Cmder with your own packages. See vendor/sources.json for the syntax you need to copy. +.EXAMPLE + .\build.ps1 -Terminal windows-terminal + + Build only the Windows Terminal package and dependencies. +.EXAMPLE + .\build.ps1 -Terminal conemu-maximus5 + + Build only the ConEmu package and dependencies. +.EXAMPLE + .\build.ps1 -Terminal none -Compile + + Compile the launcher without downloading any terminal packages. +.EXAMPLE + .\build.ps1 -InstallPacman + + Install pacman into the embedded Git for Windows during the build. .NOTES AUTHORS Samuel Vasko, Jack Bennett diff --git a/scripts/update.ps1 b/scripts/update.ps1 index c6b982d7c..17350b52f 100644 --- a/scripts/update.ps1 +++ b/scripts/update.ps1 @@ -5,19 +5,27 @@ This script updates dependencies to the latest version in vendor/sources.json file. You will need to make this script executable by setting your Powershell Execution Policy to Remote signed - Then unblock the script for execution with UnblockFile .\build.ps1 + Then unblock the script for execution with UnblockFile .\update.ps1 +.PARAMETER sourcesPath + Path to the vendor sources JSON file to update. Defaults to `vendor\sources.json`. +.PARAMETER IncludePrerelease + Include pre-release versions (RC, beta, alpha, preview, etc.). By default, only stable releases are considered. .EXAMPLE - .\build.ps1 + .\update.ps1 Updates the dependency sources in the default location, the vendor/sources.json file. .EXAMPLE - .\build -verbose + .\update.ps1 -Verbose Updates the dependency sources and see what's going on. .EXAMPLE - .\build.ps1 -SourcesPath '~/custom/vendors.json' + .\update.ps1 -SourcesPath '~/custom/vendors.json' Specify the path to update dependency sources file at. +.EXAMPLE + .\update.ps1 -IncludePrerelease + + Updates dependencies including pre-release versions. .NOTES AUTHORS David Refoua diff --git a/scripts/utils.ps1 b/scripts/utils.ps1 index 58955407c..27ce6d733 100644 --- a/scripts/utils.ps1 +++ b/scripts/utils.ps1 @@ -105,6 +105,7 @@ function Get-VersionStr { if ( $GitPresent -eq 'true' ) { $string = Invoke-Expression "git describe --abbrev=0 --tags" + write-Verbose "Version string from git describe: $string" } } @@ -124,6 +125,8 @@ function Get-VersionStr { # Remove starting 'v' characters $string = $string -replace '^v+','' # normalize version string + write-Verbose "Determined version string: $string" + return $string } @@ -134,6 +137,8 @@ function Parse-Changelog($file) { # Find the first match of the version string which means the latest version $version = Select-String -Path $file -Pattern $regex | Select-Object -First 1 | ForEach-Object { $_.Matches.Groups[1].Value } + write-Verbose "Parsed version string from changelog: $version" + return $version } From 08f66ba34335b3da70626cf3024c3a1533da7515 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sat, 21 Feb 2026 10:25:02 -0500 Subject: [PATCH 136/203] add 2.0.0 unreleased to changelog. --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a1fe938a6..252e56b53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Change Log -## 1.4.0 - Unreleased +## [2.0.0](https://github.com/cmderdev/cmder/tree/v2.0.0) (Unreleased) > [!IMPORTANT] > Pre-built packages that include Conemu are no longer included. From c9462d5bb17f0f2e54bdb305888e6d0206f11552 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sat, 21 Feb 2026 10:56:27 -0500 Subject: [PATCH 137/203] x --- .github/workflows/build.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 50e707e7d..9fbe99d42 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -124,7 +124,12 @@ jobs: echo "" >> $env:GITHUB_STEP_SUMMARY echo "| Artifact | Size | Hash (SHA256) |" >> $env:GITHUB_STEP_SUMMARY echo "| --- | --- | --- |" >> $env:GITHUB_STEP_SUMMARY - $artifacts = @("cmder_win.zip", "cmder_win.7z", "cmder_win_mini.zip", "cmder_wt.zip", "cmder_wt.7z", "cmder_wt_mini.zip") + $artifacts = @("cmder_win.zip", + "cmder_win.7z", + "cmder_win_mini.zip", + "cmder_wt.zip", + "cmder_wt.7z", + "cmder_wt_mini.zip") foreach ($artifact in $artifacts) { $path = "build/$artifact" if (Test-Path $path) { From 7486039f46aef13acbbebe645028737c01fddf96 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sat, 21 Feb 2026 13:17:40 -0500 Subject: [PATCH 138/203] fix spacing --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9fbe99d42..3ff684766 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -125,10 +125,10 @@ jobs: echo "| Artifact | Size | Hash (SHA256) |" >> $env:GITHUB_STEP_SUMMARY echo "| --- | --- | --- |" >> $env:GITHUB_STEP_SUMMARY $artifacts = @("cmder_win.zip", - "cmder_win.7z", - "cmder_win_mini.zip", - "cmder_wt.zip", - "cmder_wt.7z", + "cmder_win.7z", + "cmder_win_mini.zip", + "cmder_wt.zip", + "cmder_wt.7z", "cmder_wt_mini.zip") foreach ($artifact in $artifacts) { $path = "build/$artifact" From a5cc17194d871c40cc16c62f8c0e54b1c521b211 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sat, 21 Feb 2026 13:20:29 -0500 Subject: [PATCH 139/203] fix spacing --- .github/workflows/build.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3ff684766..50e707e7d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -124,12 +124,7 @@ jobs: echo "" >> $env:GITHUB_STEP_SUMMARY echo "| Artifact | Size | Hash (SHA256) |" >> $env:GITHUB_STEP_SUMMARY echo "| --- | --- | --- |" >> $env:GITHUB_STEP_SUMMARY - $artifacts = @("cmder_win.zip", - "cmder_win.7z", - "cmder_win_mini.zip", - "cmder_wt.zip", - "cmder_wt.7z", - "cmder_wt_mini.zip") + $artifacts = @("cmder_win.zip", "cmder_win.7z", "cmder_win_mini.zip", "cmder_wt.zip", "cmder_wt.7z", "cmder_wt_mini.zip") foreach ($artifact in $artifacts) { $path = "build/$artifact" if (Test-Path $path) { From 43ff028642f7de6abbe7c0bd1d4ca66f405c93c2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 21 Feb 2026 19:53:44 +0000 Subject: [PATCH 140/203] Initial plan From 3bd2d4c4fcec0b2fa1d2016539078d69b90ac886 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 21 Feb 2026 20:02:09 +0000 Subject: [PATCH 141/203] Fix PowerShell parser error in Summary - Artifacts uploaded step Co-authored-by: daxgames <7318053+daxgames@users.noreply.github.com> --- .github/workflows/build.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 50e707e7d..9c452deb8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -149,13 +149,13 @@ jobs: echo "### ā˜ļø Upload Status" >> $env:GITHUB_STEP_SUMMARY echo "" >> $env:GITHUB_STEP_SUMMARY echo "All artifacts successfully uploaded to GitHub Actions:" >> $env:GITHUB_STEP_SUMMARY - echo "- āœ… \`cmder_win.zip\`" >> $env:GITHUB_STEP_SUMMARY - echo "- āœ… \`cmder_win.7z\`" >> $env:GITHUB_STEP_SUMMARY - echo "- āœ… \`cmder_win_mini.zip\`" >> $env:GITHUB_STEP_SUMMARY - echo "- āœ… \`cmder_wt.zip\`" >> $env:GITHUB_STEP_SUMMARY - echo "- āœ… \`cmder_wt.7z\`" >> $env:GITHUB_STEP_SUMMARY - echo "- āœ… \`cmder_wt_mini.zip\`" >> $env:GITHUB_STEP_SUMMARY - echo "- āœ… \`hashes.txt\`" >> $env:GITHUB_STEP_SUMMARY + echo '- āœ… `cmder_win.zip`' >> $env:GITHUB_STEP_SUMMARY + echo '- āœ… `cmder_win.7z`' >> $env:GITHUB_STEP_SUMMARY + echo '- āœ… `cmder_win_mini.zip`' >> $env:GITHUB_STEP_SUMMARY + echo '- āœ… `cmder_wt.zip`' >> $env:GITHUB_STEP_SUMMARY + echo '- āœ… `cmder_wt.7z`' >> $env:GITHUB_STEP_SUMMARY + echo '- āœ… `cmder_wt_mini.zip`' >> $env:GITHUB_STEP_SUMMARY + echo '- āœ… `hashes.txt`' >> $env:GITHUB_STEP_SUMMARY echo "" >> $env:GITHUB_STEP_SUMMARY - name: Create Release From e4c7d9e61f2b824eb4853dfaa4c7df12fb3ab050 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sat, 21 Feb 2026 11:18:37 -0500 Subject: [PATCH 142/203] x --- .github/workflows/build.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9c452deb8..0f5eb26e0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -77,41 +77,41 @@ jobs: run: .\pack.ps1 -verbose -terminal windows-terminal - name: Upload artifact (cmder_win_mini.zip) - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 with: path: build/cmder_win_mini.zip name: cmder_win_mini.zip if-no-files-found: error - name: Upload artifact (cmder_win.7z) - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 with: path: build/cmder_win.7z name: cmder_win.7z if-no-files-found: error - name: Upload artifact (cmder_win.zip) - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 with: path: build/cmder_win.zip name: cmder_win.zip if-no-files-found: error - name: Upload artifact (cmder_wt.zip) - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 with: path: build/cmder_wt.zip name: cmder_wt.zip if-no-files-found: error - name: Upload artifact (cmder_wt.7z) - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 with: path: build/cmder_wt.7z name: cmder_wt.7z - name: Upload artifact (cmder_wt_mini.zip) - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 with: path: build/cmder_wt_mini.zip name: cmder_wt_mini.zip From 1ed3a382dd2d0d128c26771a8130bdeff62bdb3c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 21 Feb 2026 23:53:30 +0000 Subject: [PATCH 143/203] Initial plan From 8bf01a159f7a756d3c395d35dda41f36f312745e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 21 Feb 2026 23:57:47 +0000 Subject: [PATCH 144/203] Fix PowerShell backtick escaping in CodeQL workflow summary step Co-authored-by: daxgames <7318053+daxgames@users.noreply.github.com> --- .github/workflows/codeql.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 0020cdfdb..ec0de9a5c 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -104,7 +104,7 @@ jobs: echo "" >> $env:GITHUB_STEP_SUMMARY echo "āœ… CodeQL security analysis completed successfully." >> $env:GITHUB_STEP_SUMMARY echo "" >> $env:GITHUB_STEP_SUMMARY - echo "**Language analyzed:** `${{ matrix.language }}`" >> $env:GITHUB_STEP_SUMMARY + echo "**Language analyzed:** ``${{ matrix.language }}``" >> $env:GITHUB_STEP_SUMMARY echo "" >> $env:GITHUB_STEP_SUMMARY echo "> Check the Security tab for detailed findings and recommendations." >> $env:GITHUB_STEP_SUMMARY From ba15c2cd455403eae55c1960f25d7ded2c29c01c Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sat, 21 Feb 2026 23:21:15 -0500 Subject: [PATCH 145/203] 2.0.0-rc.1 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 252e56b53..802fd3156 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Change Log -## [2.0.0](https://github.com/cmderdev/cmder/tree/v2.0.0) (Unreleased) +## [2.0.0-rc.1](https://github.com/cmderdev/cmder/tree/v2.0.0-rc.1) (2026-02-21) > [!IMPORTANT] > Pre-built packages that include Conemu are no longer included. From 45aebd85d30ca9e3a826f3d691400508063da336 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sat, 21 Feb 2026 23:32:07 -0500 Subject: [PATCH 146/203] fixes --- .github/workflows/codeql.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index ed07c1fac..e9100aa39 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -104,6 +104,6 @@ jobs: echo "" >> $env:GITHUB_STEP_SUMMARY echo "āœ… CodeQL security analysis completed successfully." >> $env:GITHUB_STEP_SUMMARY echo "" >> $env:GITHUB_STEP_SUMMARY - echo "**Language analyzed:** \`${{ matrix.language }}\`" >> $env:GITHUB_STEP_SUMMARY + echo "**Language analyzed:** `${{ matrix.language }}`" >> $env:GITHUB_STEP_SUMMARY echo "" >> $env:GITHUB_STEP_SUMMARY echo "> Check the Security tab for detailed findings and recommendations." >> $env:GITHUB_STEP_SUMMARY From 1dfe74fa3aebb4d54144f89d7233fdedf0346951 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sat, 21 Feb 2026 23:42:35 -0500 Subject: [PATCH 147/203] x --- .github/workflows/codeql.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index e9100aa39..0020cdfdb 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -107,3 +107,4 @@ jobs: echo "**Language analyzed:** `${{ matrix.language }}`" >> $env:GITHUB_STEP_SUMMARY echo "" >> $env:GITHUB_STEP_SUMMARY echo "> Check the Security tab for detailed findings and recommendations." >> $env:GITHUB_STEP_SUMMARY + From 7bf26f10dc8da9064c55cd65314cf75e0bbb7545 Mon Sep 17 00:00:00 2001 From: Dax T Games Date: Sat, 21 Feb 2026 19:25:58 -0500 Subject: [PATCH 148/203] Fix formatting of branch name in vendor.yml --- .github/workflows/vendor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/vendor.yml b/.github/workflows/vendor.yml index c7703cb72..8c9aac9e5 100644 --- a/.github/workflows/vendor.yml +++ b/.github/workflows/vendor.yml @@ -98,7 +98,7 @@ jobs: echo "" >> $env:GITHUB_STEP_SUMMARY echo "A pull request has been created to update the vendor dependencies." >> $env:GITHUB_STEP_SUMMARY echo "" >> $env:GITHUB_STEP_SUMMARY - echo "**Branch:** \`update-vendor\`" >> $env:GITHUB_STEP_SUMMARY + echo "**Branch:** `update-vendor`" >> $env:GITHUB_STEP_SUMMARY echo "" >> $env:GITHUB_STEP_SUMMARY echo "**Updated dependencies:** $env:LIST_UPDATED" >> $env:GITHUB_STEP_SUMMARY echo "" >> $env:GITHUB_STEP_SUMMARY From 40ab0ef0c33dd4454739be5d32130b27403fc92c Mon Sep 17 00:00:00 2001 From: Dax T Games Date: Sat, 21 Feb 2026 19:33:05 -0500 Subject: [PATCH 149/203] Fix formatting for branch name in PR summary --- .github/workflows/vendor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/vendor.yml b/.github/workflows/vendor.yml index 8c9aac9e5..86ebaf0a9 100644 --- a/.github/workflows/vendor.yml +++ b/.github/workflows/vendor.yml @@ -98,7 +98,7 @@ jobs: echo "" >> $env:GITHUB_STEP_SUMMARY echo "A pull request has been created to update the vendor dependencies." >> $env:GITHUB_STEP_SUMMARY echo "" >> $env:GITHUB_STEP_SUMMARY - echo "**Branch:** `update-vendor`" >> $env:GITHUB_STEP_SUMMARY + echo "**Branch:** ``update-vendor``" >> $env:GITHUB_STEP_SUMMARY echo "" >> $env:GITHUB_STEP_SUMMARY echo "**Updated dependencies:** $env:LIST_UPDATED" >> $env:GITHUB_STEP_SUMMARY echo "" >> $env:GITHUB_STEP_SUMMARY From 330f35464f91f9e69f245d13922e56bacbe39065 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sun, 22 Feb 2026 00:49:51 -0500 Subject: [PATCH 150/203] fix vendor --- .github/workflows/vendor.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/vendor.yml b/.github/workflows/vendor.yml index 86ebaf0a9..dcfa091e4 100644 --- a/.github/workflows/vendor.yml +++ b/.github/workflows/vendor.yml @@ -94,12 +94,12 @@ jobs: if: env.COUNT_UPDATED > 0 shell: pwsh run: | - echo "### šŸŽ‰ Pull Request Created" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "A pull request has been created to update the vendor dependencies." >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "**Branch:** ``update-vendor``" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "**Updated dependencies:** $env:LIST_UPDATED" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "> Please review and merge the pull request to apply the updates." >> $env:GITHUB_STEP_SUMMARY + echo '### šŸŽ‰ Pull Request Created' >> $env:GITHUB_STEP_SUMMARY + echo '' >> $env:GITHUB_STEP_SUMMARY + echo 'A pull request has been created to update the vendor dependencies.' >> $env:GITHUB_STEP_SUMMARY + echo '' >> $env:GITHUB_STEP_SUMMARY + echo '**Branch:** `update-vendor`' >> $env:GITHUB_STEP_SUMMARY + echo '' >> $env:GITHUB_STEP_SUMMARY + echo "**Updated dependencies:** '$env:LIST_UPDATED'" >> $env:GITHUB_STEP_SUMMARY + echo '' >> $env:GITHUB_STEP_SUMMARY + echo '> Please review and merge the pull request to apply the updates.' >> $env:GITHUB_STEP_SUMMARY From 6944cf5e5e81e87a25ed9834f3d570058a1e2865 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sun, 22 Feb 2026 01:08:35 -0500 Subject: [PATCH 151/203] update workflows from pr --- .github/dependabot.yml | 11 +- .github/workflows/branches.yml | 12 +- .github/workflows/build.yml | 265 +++++++++++++++++++++------------ .github/workflows/codeql.yml | 51 ++++--- .github/workflows/tests.yml | 96 ++++++++---- .github/workflows/vendor.yml | 54 ++++--- 6 files changed, 311 insertions(+), 178 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 9ef6c2af7..90e05c40d 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,10 +1,11 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + version: 2 updates: - # Enable version updates for GitHub Actions - - package-ecosystem: "github-actions" + - package-ecosystem: "github-actions" # See documentation for possible values directory: "/" # Location of package manifests schedule: interval: "weekly" - labels: - - "šŸ‘† Dependencies" - - "šŸ”„ļø GitHub Actions" diff --git a/.github/workflows/branches.yml b/.github/workflows/branches.yml index fafa88009..ff65db165 100644 --- a/.github/workflows/branches.yml +++ b/.github/workflows/branches.yml @@ -11,7 +11,7 @@ on: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - # This job updates the development branch with the main branch + # This job updates the development branch with the master branch update-development: # The type of runner that the job will run on runs-on: ubuntu-latest @@ -32,19 +32,19 @@ jobs: echo "" >> $GITHUB_STEP_SUMMARY echo "| Property | Value |" >> $GITHUB_STEP_SUMMARY echo "| --- | --- |" >> $GITHUB_STEP_SUMMARY - echo "| Source Branch | \`main\` |" >> $GITHUB_STEP_SUMMARY + echo "| Source Branch | \`master\` |" >> $GITHUB_STEP_SUMMARY echo "| Target Branch | \`development\` |" >> $GITHUB_STEP_SUMMARY echo "| Triggered by | @${{ github.actor }} |" >> $GITHUB_STEP_SUMMARY echo "| Commit | \`${{ github.sha }}\` |" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY # Runs a single command using the runners shell - - name: Merge main into development + - name: Merge master into development run: | git config user.name "${{ github.actor }}" git config user.email "${{ github.actor }}@users.noreply.github.com" git checkout development - git merge --no-ff main + git merge --no-ff master git push origin development - name: Summary - Merge completed @@ -53,8 +53,8 @@ jobs: run: | echo "### āœ… Merge Successful" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY - echo "The \`main\` branch has been successfully merged into \`development\`." >> $GITHUB_STEP_SUMMARY + echo "The \`master\` branch has been successfully merged into \`development\`." >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY echo "**Merge type:** No fast-forward merge" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY - echo "> The development branch is now synchronized with the latest changes from main." >> $GITHUB_STEP_SUMMARY + echo "> The development branch is now synchronized with the latest changes from master." >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0f5eb26e0..b4ddc1fe5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,17 +42,60 @@ jobs: - name: Summary - Repository checkout shell: pwsh run: | - echo "## šŸ“¦ Build Cmder - Workflow Summary" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "### Repository Information" >> $env:GITHUB_STEP_SUMMARY - echo "| Property | Value |" >> $env:GITHUB_STEP_SUMMARY - echo "| --- | --- |" >> $env:GITHUB_STEP_SUMMARY - echo "| Repository | \`${{ github.repository }}\` |" >> $env:GITHUB_STEP_SUMMARY - echo "| Branch | \`${{ github.ref_name }}\` |" >> $env:GITHUB_STEP_SUMMARY - echo "| Commit | \`${{ github.sha }}\` |" >> $env:GITHUB_STEP_SUMMARY - echo "| Actor | @${{ github.actor }} |" >> $env:GITHUB_STEP_SUMMARY - echo "| Workflow | \`${{ github.workflow }}\` |" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY + # Get Cmder version + . scripts/utils.ps1 + $cmderVersion = Get-VersionStr + $buildTime = (Get-Date).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ") + + # Determine branch link (handle PR merge refs) + $branchName = "${{ github.ref_name }}" + $branchLink = "" + if ($branchName -match '^(\d+)/(merge|head)$') { + # This is a PR merge/head ref, link to the PR + $prNumber = $Matches[1] + $branchLink = "https://github.com/${{ github.repository }}/pull/$prNumber" + } elseif ("${{ github.event_name }}" -eq "pull_request") { + # This is a pull request event, link to the PR + $branchLink = "https://github.com/${{ github.repository }}/pull/${{ github.event.pull_request.number }}" + } else { + # Regular branch, link to the branch tree + $branchLink = "https://github.com/${{ github.repository }}/tree/${{ github.ref_name }}" + } + + $summary = @" + ## šŸ“¦ Build Cmder - Workflow Summary + + Build started: $buildTime + + ### Repository Information + | Property | Value | + | --- | --- | + | Repository | [``${{ github.repository }}``](https://github.com/${{ github.repository }}) | + | Branch | [``$branchName``]($branchLink) | + | Commit | [``${{ github.sha }}``](https://github.com/${{ github.repository }}/commit/${{ github.sha }}) | + | Actor | [@${{ github.actor }}](https://github.com/${{ github.actor }}) | + | Workflow | ``${{ github.workflow }}`` | + | Cmder Version | **$cmderVersion** | + + --- + + ### šŸ“ Vendor Packages + | Package | Version | + | --- | --- | + "@ + + # Read vendor sources.json and add to summary + $vendorSources = Get-Content "vendor/sources.json" | ConvertFrom-Json + if ($vendorSources.Count -eq 0) { + $summary += "`n| _No vendor packages found_ | |" + } else { + foreach ($vendor in $vendorSources) { + $summary += "`n| ``$($vendor.name)`` | $($vendor.version) |" + } + } + $summary += "`n" + + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Add MSBuild to PATH uses: microsoft/setup-msbuild@v2 @@ -60,114 +103,139 @@ jobs: - name: Build Cmder Launcher shell: pwsh working-directory: scripts - run: .\build.ps1 -Compile -verbose -terminal windows-terminal -InstallPacman + run: .\build.ps1 -Compile -verbose - name: Summary - Build completed if: success() shell: pwsh run: | - echo "### āœ… Build Status" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "Cmder launcher successfully compiled." >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY + @" + + --- + + ### Build Status + + āœ… Cmder built successfully. + + "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Pack the built files shell: pwsh working-directory: scripts - run: .\pack.ps1 -verbose -terminal windows-terminal + run: .\pack.ps1 -verbose - - name: Upload artifact (cmder_win_mini.zip) - uses: actions/upload-artifact@v6 + - name: Upload artifact (cmder.zip) + uses: actions/upload-artifact@v5 with: - path: build/cmder_win_mini.zip - name: cmder_win_mini.zip + path: build/cmder.zip + name: cmder.zip if-no-files-found: error - - name: Upload artifact (cmder_win.7z) - uses: actions/upload-artifact@v6 + - name: Upload artifact (cmder.7z) + uses: actions/upload-artifact@v5 with: - path: build/cmder_win.7z - name: cmder_win.7z - if-no-files-found: error + path: build/cmder.7z + name: cmder.7z - - name: Upload artifact (cmder_win.zip) - uses: actions/upload-artifact@v6 + - name: Upload artifact (cmder_mini.zip) + uses: actions/upload-artifact@v5 with: - path: build/cmder_win.zip - name: cmder_win.zip - if-no-files-found: error + path: build/cmder_mini.zip + name: cmder_mini.zip - - name: Upload artifact (cmder_wt.zip) - uses: actions/upload-artifact@v6 - with: - path: build/cmder_wt.zip - name: cmder_wt.zip - if-no-files-found: error - - - name: Upload artifact (cmder_wt.7z) - uses: actions/upload-artifact@v6 - with: - path: build/cmder_wt.7z - name: cmder_wt.7z - - - name: Upload artifact (cmder_wt_mini.zip) - uses: actions/upload-artifact@v6 + - name: Upload artifact (hashes.txt) + uses: actions/upload-artifact@v5 with: - path: build/cmder_wt_mini.zip - name: cmder_wt_mini.zip + path: build/hashes.txt + name: hashes.txt - - name: Summary - Package artifacts + - name: Summary - Artifacts uploaded if: success() shell: pwsh + env: + GH_TOKEN: ${{ github.token }} run: | - echo "### šŸ“¦ Artifacts Created" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "| Artifact | Size | Hash (SHA256) |" >> $env:GITHUB_STEP_SUMMARY - echo "| --- | --- | --- |" >> $env:GITHUB_STEP_SUMMARY - $artifacts = @("cmder_win.zip", "cmder_win.7z", "cmder_win_mini.zip", "cmder_wt.zip", "cmder_wt.7z", "cmder_wt_mini.zip") + $summary = @" + + --- + + ### šŸ—ƒļø Artifacts + + | Artifact | Size | Download | Hash (SHA256) | + | --- | --- | --- | --- | + "@ + + # Function to get artifact download URL with retry logic + function Get-ArtifactDownloadUrl { + param( + [string]$ArtifactName, + [int]$MaxRetries = 3, + [int]$DelaySeconds = 2 + ) + + for ($i = 0; $i -lt $MaxRetries; $i++) { + try { + # Use GitHub CLI to get artifact information + $artifactsJson = gh api "repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts" --jq ".artifacts[] | select(.name == `"$ArtifactName`")" + + if ($artifactsJson) { + $artifact = $artifactsJson | ConvertFrom-Json + if ($artifact.archive_download_url) { + return $artifact.archive_download_url + } + } + } catch { + Write-Host "Attempt $($i + 1) failed to get artifact URL for $ArtifactName : $_" + } + + if ($i -lt ($MaxRetries - 1)) { + Start-Sleep -Seconds $DelaySeconds + } + } + + return $null + } + + $artifacts = @("cmder.zip", "cmder.7z", "cmder_mini.zip", "hashes.txt") foreach ($artifact in $artifacts) { $path = "build/$artifact" if (Test-Path $path) { $size = (Get-Item $path).Length / 1MB - # Truncate hash to first 16 chars for summary readability (full hash in hashes.txt) - $hash = (Get-FileHash $path -Algorithm SHA256).Hash.Substring(0, 16) - echo "| \`$artifact\` | $([math]::Round($size, 2)) MB | \`$hash...\` |" >> $env:GITHUB_STEP_SUMMARY + $hash = (Get-FileHash $path -Algorithm SHA256).Hash + + # Try to get the actual artifact download URL + $downloadUrl = Get-ArtifactDownloadUrl -ArtifactName $artifact + $warning = "" + + if (-not $downloadUrl) { + # Fallback to workflow run page if artifact URL fetch fails + $downloadUrl = "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" + $warning = " āš ļø" + } + + # Determine emoji based on file type + if ($artifact -match '\.txt$') { + $emoji = "šŸ“„" + } elseif ($artifact -match '\.(zip|7z)$') { + $emoji = "šŸ—„ļø" + } else { + $emoji = "šŸ“¦" + } + + $summary += "`n| $emoji ``$artifact`` | $([math]::Round($size, 2)) MB | [šŸ“„ Download$warning]($downloadUrl) | ``$hash`` |" } } - echo "" >> $env:GITHUB_STEP_SUMMARY - - - name: Upload artifact (hashes.txt) - uses: actions/upload-artifact@v6 - with: - path: build/hashes.txt - name: hashes.txt - - - name: Summary - Artifacts uploaded - if: success() - shell: pwsh - run: | - echo "### ā˜ļø Upload Status" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "All artifacts successfully uploaded to GitHub Actions:" >> $env:GITHUB_STEP_SUMMARY - echo '- āœ… `cmder_win.zip`' >> $env:GITHUB_STEP_SUMMARY - echo '- āœ… `cmder_win.7z`' >> $env:GITHUB_STEP_SUMMARY - echo '- āœ… `cmder_win_mini.zip`' >> $env:GITHUB_STEP_SUMMARY - echo '- āœ… `cmder_wt.zip`' >> $env:GITHUB_STEP_SUMMARY - echo '- āœ… `cmder_wt.7z`' >> $env:GITHUB_STEP_SUMMARY - echo '- āœ… `cmder_wt_mini.zip`' >> $env:GITHUB_STEP_SUMMARY - echo '- āœ… `hashes.txt`' >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY + $summary += "`n" + + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Create Release uses: softprops/action-gh-release@v2 with: files: | - build/cmder_win.zip - build/cmder_win.7z - build/cmder_win_mini.zip - build/cmder_wt.zip - build/cmder_wt.7z - build/cmder_wt_mini.zip + build/cmder.zip + build/cmder.7z + build/cmder_mini.zip build/hashes.txt draft: true generate_release_notes: true @@ -177,13 +245,18 @@ jobs: if: startsWith(github.ref, 'refs/tags/') shell: pwsh run: | - echo "### šŸš€ Release Information" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "Draft release created for tag: **\`${{ github.ref_name }}\`**" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "Release includes:" >> $env:GITHUB_STEP_SUMMARY - echo "- Full version (\`cmder.zip\`, \`cmder.7z\`)" >> $env:GITHUB_STEP_SUMMARY - echo "- Mini version (\`cmder_mini.zip\`)" >> $env:GITHUB_STEP_SUMMARY - echo "- File hashes (\`hashes.txt\`)" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "> āš ļø Release is in **draft** mode. Please review and publish manually." >> $env:GITHUB_STEP_SUMMARY + @" + + --- + + ### Release Information + + šŸš€ Draft release created for tag: **``${{ github.ref_name }}``** + + Release includes: + - Full version (``cmder.zip``, ``cmder.7z``) + - Mini version (``cmder_mini.zip``) + - File hashes (``hashes.txt``) + + > āš ļø Release is in **draft** mode. Please review and publish manually. + "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index ec0de9a5c..d40f79791 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -50,17 +50,19 @@ jobs: - name: Summary - CodeQL analysis started shell: pwsh run: | - echo "## šŸ”’ CodeQL Security Analysis - Workflow Summary" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "### Analysis Configuration" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "| Property | Value |" >> $env:GITHUB_STEP_SUMMARY - echo "| --- | --- |" >> $env:GITHUB_STEP_SUMMARY - echo "| Repository | \`${{ github.repository }}\` |" >> $env:GITHUB_STEP_SUMMARY - echo "| Branch | \`${{ github.ref_name }}\` |" >> $env:GITHUB_STEP_SUMMARY - echo "| Language | \`${{ matrix.language }}\` |" >> $env:GITHUB_STEP_SUMMARY - echo "| Commit | \`${{ github.sha }}\` |" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY + @" + ## šŸ”’ CodeQL Security Analysis - Workflow Summary + + ### Analysis Configuration + + | Property | Value | + | --- | --- | + | Repository | ``${{ github.repository }}`` | + | Branch | ``${{ github.ref_name }}`` | + | Language | ``${{ matrix.language }}`` | + | Commit | ``${{ github.sha }}`` | + + "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL @@ -86,10 +88,12 @@ jobs: if: success() shell: pwsh run: | - echo "### āœ… Build Completed" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "Cmder launcher built successfully for CodeQL analysis." >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY + @" + ### āœ… Build Completed + + Cmder launcher built successfully for CodeQL analysis. + + "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v4 @@ -100,11 +104,12 @@ jobs: if: success() shell: pwsh run: | - echo "### šŸ” CodeQL Analysis Results" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "āœ… CodeQL security analysis completed successfully." >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "**Language analyzed:** ``${{ matrix.language }}``" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "> Check the Security tab for detailed findings and recommendations." >> $env:GITHUB_STEP_SUMMARY - + @" + ### šŸ” CodeQL Analysis Results + + āœ… CodeQL security analysis completed successfully. + + **Language analyzed:** ``${{ matrix.language }}`` + + > Check the Security tab for detailed findings and recommendations. + "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2eda8de1a..4db9a8a93 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -43,16 +43,25 @@ jobs: - name: Summary - Test execution started shell: pwsh run: | - echo "## 🧪 Run Tests - Workflow Summary" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "### Test Environment" >> $env:GITHUB_STEP_SUMMARY - echo "| Property | Value |" >> $env:GITHUB_STEP_SUMMARY - echo "| --- | --- |" >> $env:GITHUB_STEP_SUMMARY - echo "| Repository | \`${{ github.repository }}\` |" >> $env:GITHUB_STEP_SUMMARY - echo "| Branch | \`${{ github.ref_name }}\` |" >> $env:GITHUB_STEP_SUMMARY - echo "| Commit | \`${{ github.sha }}\` |" >> $env:GITHUB_STEP_SUMMARY - echo "| Runner OS | \`${{ runner.os }}\` |" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY + # Get Cmder version + . scripts/utils.ps1 + $cmderVersion = Get-VersionStr + + @" + ## āœ… Run Tests - Workflow Summary + + ### Test Environment + | Property | Value | + | --- | --- | + | Repository | ``${{ github.repository }}`` | + | Branch | ``${{ github.ref_name }}`` | + | Commit | ``${{ github.sha }}`` | + | Runner OS | ``${{ runner.os }}`` | + | Cmder Version | **$cmderVersion** | + | PowerShell Version | **$($PSVersionTable.PSVersion)** | + | Event | ``${{ github.event_name }}`` | + + "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Initialize vendors shell: pwsh @@ -63,21 +72,49 @@ jobs: if: success() shell: pwsh run: | - echo "### āš™ļø Vendor Initialization" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "āœ… Vendor dependencies initialized successfully." >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY + # Get vendor versions from sources.json + $vendorInfo = @() + $sources = Get-Content "sources.json" -Raw | ConvertFrom-Json + $vendorDirs = $sources.PSObject.Properties | ForEach-Object { $_.Name } + foreach ($dir in $vendorDirs) { + $versionFile = "vendor/$dir/.cmderver" + if (Test-Path $versionFile) { + $version = Get-Content $versionFile -Raw + $vendorInfo += "- **$dir**: $($version.Trim())" + } + } + + $summary = @" + ### āš™ļø Vendor Initialization + + āœ… Vendor dependencies initialized successfully. + + **Vendor Versions:** + $( + if ($vendorInfo.Count -eq 0) { + "_No vendor version information available._" + } else { + $vendorInfo -join "`n" + } + ) + + "@ + + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Summary - Test results table header if: success() shell: pwsh run: | - echo "### šŸ“‹ Test Results" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "| Test | Status |" >> $env:GITHUB_STEP_SUMMARY - echo "| --- | --- |" >> $env:GITHUB_STEP_SUMMARY + @" + ### šŸ“‹ Test Results + + | Test | Status | Duration | + | --- | --- | --- | + "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Testing Clink Shell + id: test-clink run: | cmd /c vendor\init.bat /v /d /t @@ -85,8 +122,9 @@ jobs: if: success() shell: pwsh run: | - echo "| Clink Shell | āœ… Passed |" >> $env:GITHUB_STEP_SUMMARY + "| Clink Shell | āœ… Passed | Cmd shell initialization |" | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Testing PowerShell + id: test-powershell run: | PowerShell.exe -ExecutionPolicy Bypass -NoLogo -NoProfile -Command "$env:CMDER_DEBUG='1'; . 'vendor\profile.ps1'" @@ -94,8 +132,9 @@ jobs: if: success() shell: pwsh run: | - echo "| PowerShell | āœ… Passed |" >> $env:GITHUB_STEP_SUMMARY + "| PowerShell | āœ… Passed | Profile script execution |" | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Testing Bash + id: test-bash run: | bash vendor/cmder.sh @@ -103,13 +142,20 @@ jobs: if: success() shell: pwsh run: | - echo "| Bash | āœ… Passed |" >> $env:GITHUB_STEP_SUMMARY + "| Bash | āœ… Passed | Bash environment initialization |" | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Summary - All tests completed if: success() shell: pwsh run: | - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "### āœ… All Tests Completed" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "All shell environments tested successfully!" >> $env:GITHUB_STEP_SUMMARY + @" + + ### āœ… All Tests Completed + + All shell environments tested successfully! + + **Test Coverage:** + - āœ… Clink shell environment (Windows cmd.exe with Clink) + - āœ… PowerShell environment (with Cmder profile) + - āœ… Bash environment (Git Bash integration) + "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 diff --git a/.github/workflows/vendor.yml b/.github/workflows/vendor.yml index dcfa091e4..be587ef8f 100644 --- a/.github/workflows/vendor.yml +++ b/.github/workflows/vendor.yml @@ -31,10 +31,12 @@ jobs: - name: Summary - Workflow started shell: pwsh run: | - echo "## šŸ“¦ Update Vendor - Workflow Summary" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "Checking for vendor dependency updates..." >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY + @" + ## šŸ“¦ Update Vendor - Workflow Summary + + Checking for vendor dependency updates... + + "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - id: make-changes name: Checking for updates @@ -64,20 +66,24 @@ jobs: run: | $count = $env:COUNT_UPDATED if ($count -eq 0) { - echo "### āœ… No Updates Available" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "All vendor dependencies are up to date." >> $env:GITHUB_STEP_SUMMARY + @" + ### āœ… No Updates Available + + All vendor dependencies are up to date. + "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 } else { $word = if ($count -eq 1) { 'dependency' } else { 'dependencies' } - echo "### šŸ”„ Updates Found" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "**$count** vendor $word updated:" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "$env:UPDATE_MESSAGE" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY + @" + ### šŸ”„ Updates Found + + **$count** vendor $word updated: + + $env:UPDATE_MESSAGE + + "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 } - - uses: peter-evans/create-pull-request@v8 + - uses: peter-evans/create-pull-request@v7 if: env.COUNT_UPDATED > 0 with: title: 'Updates to `${{ env.COUNT_UPDATED }}` vendored dependencies' @@ -94,12 +100,14 @@ jobs: if: env.COUNT_UPDATED > 0 shell: pwsh run: | - echo '### šŸŽ‰ Pull Request Created' >> $env:GITHUB_STEP_SUMMARY - echo '' >> $env:GITHUB_STEP_SUMMARY - echo 'A pull request has been created to update the vendor dependencies.' >> $env:GITHUB_STEP_SUMMARY - echo '' >> $env:GITHUB_STEP_SUMMARY - echo '**Branch:** `update-vendor`' >> $env:GITHUB_STEP_SUMMARY - echo '' >> $env:GITHUB_STEP_SUMMARY - echo "**Updated dependencies:** '$env:LIST_UPDATED'" >> $env:GITHUB_STEP_SUMMARY - echo '' >> $env:GITHUB_STEP_SUMMARY - echo '> Please review and merge the pull request to apply the updates.' >> $env:GITHUB_STEP_SUMMARY + @" + ### šŸŽ‰ Pull Request Created + + A pull request has been created to update the vendor dependencies. + + **Branch:** ``update-vendor`` + + **Updated dependencies:** $env:LIST_UPDATED + + > Please review and merge the pull request to apply the updates. + "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 From 752d576f2c537652d73723f438bca91fbe3908ae Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sun, 22 Feb 2026 01:22:51 -0500 Subject: [PATCH 152/203] install pacman again --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b4ddc1fe5..1da4e27f7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -103,7 +103,7 @@ jobs: - name: Build Cmder Launcher shell: pwsh working-directory: scripts - run: .\build.ps1 -Compile -verbose + run: .\build.ps1 -Compile -verbose -InstallPacman - name: Summary - Build completed if: success() From 5d9fe09cd88fd4870e5555daed27d58039d286e2 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sun, 22 Feb 2026 01:35:44 -0500 Subject: [PATCH 153/203] whitespace --- .github/workflows/build.yml | 62 ++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1da4e27f7..46f3e57aa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,7 +46,7 @@ jobs: . scripts/utils.ps1 $cmderVersion = Get-VersionStr $buildTime = (Get-Date).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ") - + # Determine branch link (handle PR merge refs) $branchName = "${{ github.ref_name }}" $branchLink = "" @@ -61,12 +61,12 @@ jobs: # Regular branch, link to the branch tree $branchLink = "https://github.com/${{ github.repository }}/tree/${{ github.ref_name }}" } - + $summary = @" ## šŸ“¦ Build Cmder - Workflow Summary - + Build started: $buildTime - + ### Repository Information | Property | Value | | --- | --- | @@ -76,14 +76,14 @@ jobs: | Actor | [@${{ github.actor }}](https://github.com/${{ github.actor }}) | | Workflow | ``${{ github.workflow }}`` | | Cmder Version | **$cmderVersion** | - + --- - + ### šŸ“ Vendor Packages | Package | Version | | --- | --- | "@ - + # Read vendor sources.json and add to summary $vendorSources = Get-Content "vendor/sources.json" | ConvertFrom-Json if ($vendorSources.Count -eq 0) { @@ -94,7 +94,7 @@ jobs: } } $summary += "`n" - + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Add MSBuild to PATH @@ -110,13 +110,13 @@ jobs: shell: pwsh run: | @" - + --- - + ### Build Status - + āœ… Cmder built successfully. - + "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Pack the built files @@ -156,15 +156,15 @@ jobs: GH_TOKEN: ${{ github.token }} run: | $summary = @" - + --- - + ### šŸ—ƒļø Artifacts - + | Artifact | Size | Download | Hash (SHA256) | | --- | --- | --- | --- | "@ - + # Function to get artifact download URL with retry logic function Get-ArtifactDownloadUrl { param( @@ -172,12 +172,12 @@ jobs: [int]$MaxRetries = 3, [int]$DelaySeconds = 2 ) - + for ($i = 0; $i -lt $MaxRetries; $i++) { try { # Use GitHub CLI to get artifact information $artifactsJson = gh api "repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts" --jq ".artifacts[] | select(.name == `"$ArtifactName`")" - + if ($artifactsJson) { $artifact = $artifactsJson | ConvertFrom-Json if ($artifact.archive_download_url) { @@ -187,32 +187,32 @@ jobs: } catch { Write-Host "Attempt $($i + 1) failed to get artifact URL for $ArtifactName : $_" } - + if ($i -lt ($MaxRetries - 1)) { Start-Sleep -Seconds $DelaySeconds } } - + return $null } - + $artifacts = @("cmder.zip", "cmder.7z", "cmder_mini.zip", "hashes.txt") foreach ($artifact in $artifacts) { $path = "build/$artifact" if (Test-Path $path) { $size = (Get-Item $path).Length / 1MB $hash = (Get-FileHash $path -Algorithm SHA256).Hash - + # Try to get the actual artifact download URL $downloadUrl = Get-ArtifactDownloadUrl -ArtifactName $artifact $warning = "" - + if (-not $downloadUrl) { # Fallback to workflow run page if artifact URL fetch fails $downloadUrl = "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" $warning = " āš ļø" } - + # Determine emoji based on file type if ($artifact -match '\.txt$') { $emoji = "šŸ“„" @@ -221,12 +221,12 @@ jobs: } else { $emoji = "šŸ“¦" } - + $summary += "`n| $emoji ``$artifact`` | $([math]::Round($size, 2)) MB | [šŸ“„ Download$warning]($downloadUrl) | ``$hash`` |" } } $summary += "`n" - + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Create Release @@ -246,17 +246,17 @@ jobs: shell: pwsh run: | @" - + --- - + ### Release Information - + šŸš€ Draft release created for tag: **``${{ github.ref_name }}``** - + Release includes: - Full version (``cmder.zip``, ``cmder.7z``) - Mini version (``cmder_mini.zip``) - File hashes (``hashes.txt``) - + > āš ļø Release is in **draft** mode. Please review and publish manually. "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 From e71c7679f60c50a6454ee44b2c1c6762fa3b5529 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sun, 22 Feb 2026 16:22:17 -0500 Subject: [PATCH 154/203] Fixes and Cleanup --- .github/dependabot.yml | 4 ++ .github/workflows/build.yml | 21 ++++--- .github/workflows/codeql.yml | 18 ++++-- .github/workflows/tests.yml | 18 ++++-- .github/workflows/vendor.yml | 24 +++++--- CHANGELOG.md | 79 ++++++++++++++++++++++++ vendor/clink.lua | 116 ++++++++++++++++++++++++++++++++--- 7 files changed, 242 insertions(+), 38 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 90e05c40d..b05586197 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,7 +5,11 @@ version: 2 updates: + # Enable version updates for GitHub Actions - package-ecosystem: "github-actions" # See documentation for possible values directory: "/" # Location of package manifests schedule: interval: "weekly" + labels: + - "šŸ‘† Dependencies" + - "šŸ”„ļø GitHub Actions" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 40ca5baf8..d3886ec5d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -93,6 +93,7 @@ jobs: $summary += "`n| ``$($vendor.name)`` | $($vendor.version) |" } } + $summary += "`n" $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 @@ -109,7 +110,7 @@ jobs: if: success() shell: pwsh run: | - @" + $summary = @" --- @@ -117,7 +118,9 @@ jobs: āœ… Cmder built successfully. - "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 + "@ + + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Pack the built files shell: pwsh @@ -125,26 +128,26 @@ jobs: run: .\pack.ps1 -verbose - name: Upload artifact (cmder.zip) - uses: actions/upload-artifact@v5 + uses: actions/upload-artifact@v6 with: path: build/cmder.zip name: cmder.zip if-no-files-found: error - name: Upload artifact (cmder.7z) - uses: actions/upload-artifact@v5 + uses: actions/upload-artifact@v6 with: path: build/cmder.7z name: cmder.7z - name: Upload artifact (cmder_mini.zip) - uses: actions/upload-artifact@v5 + uses: actions/upload-artifact@v6 with: path: build/cmder_mini.zip name: cmder_mini.zip - name: Upload artifact (hashes.txt) - uses: actions/upload-artifact@v5 + uses: actions/upload-artifact@v6 with: path: build/hashes.txt name: hashes.txt @@ -245,7 +248,7 @@ jobs: if: startsWith(github.ref, 'refs/tags/') shell: pwsh run: | - @" + $summary = @" --- @@ -259,4 +262,6 @@ jobs: - File hashes (``hashes.txt``) > āš ļø Release is in **draft** mode. Please review and publish manually. - "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 + "@ + + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 30052d7eb..bc9503671 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -50,7 +50,7 @@ jobs: - name: Summary - CodeQL analysis started shell: pwsh run: | - @" + $summary = @" ## šŸ”’ CodeQL Security Analysis - Workflow Summary ### Analysis Configuration @@ -62,7 +62,9 @@ jobs: | Language | ``${{ matrix.language }}`` | | Commit | ``${{ github.sha }}`` | - "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 + "@ + + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL @@ -88,12 +90,14 @@ jobs: if: success() shell: pwsh run: | - @" + $summary = @" ### āœ… Build Completed Cmder launcher built successfully for CodeQL analysis. - "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 + "@ + + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v4 @@ -104,7 +108,7 @@ jobs: if: success() shell: pwsh run: | - @" + $summary = @" ### šŸ” CodeQL Analysis Results āœ… CodeQL security analysis completed successfully. @@ -112,4 +116,6 @@ jobs: **Language analyzed:** ``${{ matrix.language }}`` > Check the Security tab for detailed findings and recommendations. - "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 + "@ + + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 043b15860..c025e427c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -47,7 +47,7 @@ jobs: . scripts/utils.ps1 $cmderVersion = Get-VersionStr - @" + $summary = @" ## āœ… Run Tests - Workflow Summary ### Test Environment @@ -61,7 +61,9 @@ jobs: | PowerShell Version | **$($PSVersionTable.PSVersion)** | | Event | ``${{ github.event_name }}`` | - "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 + "@ + + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Initialize vendors shell: pwsh @@ -106,12 +108,14 @@ jobs: if: success() shell: pwsh run: | - @" + $summary = @" ### šŸ“‹ Test Results | Test | Status | Duration | | --- | --- | --- | - "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 + "@ + + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Testing Clink Shell id: test-clink @@ -148,7 +152,7 @@ jobs: if: success() shell: pwsh run: | - @" + $summary = @" ### āœ… All Tests Completed @@ -158,4 +162,6 @@ jobs: - āœ… Clink shell environment (Windows cmd.exe with Clink) - āœ… PowerShell environment (with Cmder profile) - āœ… Bash environment (Git Bash integration) - "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 + "@ + + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 diff --git a/.github/workflows/vendor.yml b/.github/workflows/vendor.yml index 6bdf80496..3b1ab50e6 100644 --- a/.github/workflows/vendor.yml +++ b/.github/workflows/vendor.yml @@ -31,12 +31,14 @@ jobs: - name: Summary - Workflow started shell: pwsh run: | - @" + $summary = @" ## šŸ“¦ Update Vendor - Workflow Summary Checking for vendor dependency updates... - "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 + "@ + + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - id: make-changes name: Checking for updates @@ -66,22 +68,24 @@ jobs: run: | $count = $env:COUNT_UPDATED if ($count -eq 0) { - @" + $summary = @" ### āœ… No Updates Available All vendor dependencies are up to date. - "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 + "@ } else { $word = if ($count -eq 1) { 'dependency' } else { 'dependencies' } - @" + $summary = @" ### šŸ”„ Updates Found **$count** vendor $word updated: $env:UPDATE_MESSAGE - "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 + "@ } + + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - uses: peter-evans/create-pull-request@v7 if: env.COUNT_UPDATED > 0 @@ -100,9 +104,9 @@ jobs: if: env.COUNT_UPDATED > 0 shell: pwsh run: | - @" + $Summary = @" ### šŸŽ‰ Pull Request Created - + A pull request has been created to update the vendor dependencies. **Branch:** ``update-vendor`` @@ -110,4 +114,6 @@ jobs: **Updated dependencies:** $env:LIST_UPDATED > Please review and merge the pull request to apply the updates. - "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 + "@ + + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b22a1917..eca18db4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,84 @@ # Change Log +## [1.3.25](https://github.com/cmderdev/cmder/tree/v1.3.25) (2024-05-31) + +### Changes + +- Component Updates + - Update Git for Windows to 2.45.1.windows.1. + - Update ConEmu to 24.05.31. + - Clink 1.6.14. + - clink-completions 0.5.2. + +- Add `SECURITY.md` and refresh CI workflows and actions. +- Enable `match.expand_envvars` and improve git diagnostics for improper versions. + +### Fixes + +- Fix #2944. +- Fix script error when the working directory contains `%`. +- Remove environment refresh race condition. + +## [1.3.24](https://github.com/cmderdev/cmder/tree/v1.3.24) (2023-07-24) + +### Changes + +- Update `build.yml` workflow. + +## [1.3.23](https://github.com/cmderdev/cmder/tree/v1.3.23) (2023-07-24) + +### Changes + +- Update ConEmu (conemu-maximus5) to 23.07.24. + +## [1.3.22](https://github.com/cmderdev/cmder/tree/v1.3.22) (2023-07-24) + +### Changes + +- Handle Clink injction differently in `init.bat`. +- Changes to `clink_settings.lua.default`. + - Do not add commands to Clink Command Line History that begin with whitespace as a default. + - This can be changed to the old behavior by setting `history_ignore_space` to `0` in `config\clink_settings.lua`. + - `history.max_lines` is now defaults to `25000` instead of `10000`. + - This can be changed back to the old behavior by setting `history_max_lines` to `10000` in `config\clink_settings.lua`. + - `history.shared` now defaults to `False` instead of `True`. + - The previous default of `True` was causing issues with some users when using Cmder in multiple sessions. + - This can be changed back to the old behavior by setting `history_shared` to `1` in `config\clink_settings.lua`. + +- Component Updates + - Git for Windows to 2.41.0.windows.3 + - Clink to 1.5.1 + - ConEmu to 23.07.23 + - clink-completions to 0.4.10 + +- Remove AppVeyor configuration and add CodeQL scanning and Dependabot updates. + +### Fixes + +- Fix `/task ""` handling. +- Skip clink injection when initialization fails fatally. +- Fix errors when git/svn/hg are not installed and in profile.d PowerShell scripts. + +## [1.3.21](https://github.com/cmderdev/cmder/tree/v1.3.21) (2022-12-19) + +### Fixes + +- Fix #2789. +- Fix Git Bash `GIT_INSTALL_ROOT` handling. + +### Changes + +- Refactor `clink.lua` to speed up the prompt. +- Refactor and Cleanup `init.bat` and related scripts. +- Refactor and Cleanup `profile.ps1` and related scripts. +- Remove handling of `clink` and `tcc` incompatibility. +- Update ConEmu to mitigate CVE-2022-46387. +- Update Git for Windows to 2.39.0.windows.1 and Clink to 1.4.4. + +### Adds + +- Add `show_warning` function to `vendor\lib\lib_console.cmd` for showing warning messages in yellow. + ## [1.3.20](https://github.com/cmderdev/cmder/tree/v1.3.20) (2022-03-18) ### Changes diff --git a/vendor/clink.lua b/vendor/clink.lua index 81b4d1eef..804f9c649 100644 --- a/vendor/clink.lua +++ b/vendor/clink.lua @@ -324,7 +324,7 @@ end -- Find out current branch -- @return {nil|git branch name} --- -local function get_git_branch(git_dir) +local function get_git_branch(git_dir, fast) git_dir = git_dir or get_git_dir() -- If git directory not found then we're probably outside of repo @@ -341,8 +341,90 @@ local function get_git_branch(git_dir) -- if HEAD matches branch expression, then we're on named branch -- otherwise it is a detached commit local branch_name = HEAD:match('ref: refs/heads/(.+)') + if os.getenv("CLINK_DEBUG_GIT_REFTABLE") then + branch_name = '.invalid' + end + + -- If the branch name is ".invalid" and the fast method wasn't requested, + -- then invoke git.exe to get accurate current branch info (slow method). + if branch_name == ".invalid" and not fast then + local file + branch_name = nil + + -- Handle the most common case first. + if not branch_name then + file = io_popenyield("git --no-optional-locks branch 2>nul") + if file then + for line in file:lines() do + local b = line:match("^%*%s+(.*)") + if b then + b = b:match("^%((HEAD detached at .*)%)") or b + branch_name = b + break + end + end + file:close() + end + end + + -- Handle the cases where "git branch" output is empty, but "git + -- branch --show-current" shows the branch name (e.g. a new repo). + if not branch_name then + file = io_popenyield("git --no-optional-locks branch --show-current 2>nul") + if file then + for line in file:lines() do -- luacheck: ignore 512 + branch_name = line + break + end + file:close() + end + end + else + branch_name = branch_name or 'HEAD detached at '..HEAD:sub(1, 7) + end + + return branch_name +end + +local function get_git_remote(git_dir, branch) + if not git_dir then return nil end + if not branch then return nil end + + local file = io.open(git_dir.."/config", 'r') + if not file then return nil end + + local git_config = {} + + local function get_git_config_value(section, param) + return git_config[section] and git_config[section][param] or nil + end - return branch_name or 'HEAD detached at '..HEAD:sub(1, 7) + local section + for line in file:lines() do + if (line:sub(1,1) == "[" and line:sub(-1) == "]") then + if (line:sub(2,5) == "lfs ") then + section = nil -- skip LFS entries as there can be many and we never use them + else + section = line:sub(2,-2) + git_config[section] = git_config[section] or {} + end + elseif section then + local param, value = line:match('^%s-([%w|_]+)%s-=%s+(.+)$') + if (param and value ~= nil) then + git_config[section][param] = value + end + end + end + file:close() + + local remote_to_push = get_git_config_value('branch "'..branch..'"', 'remote') or '' + local remote_ref = get_git_config_value('remote "'..remote_to_push..'"', 'push') or + get_git_config_value('push', 'default') + + local text = remote_to_push + if remote_ref then text = text..'/'..remote_ref end + + return text ~= '' and text or nil end --- @@ -394,7 +476,7 @@ end -- Get the status and conflict status of working dir -- @return {bool , bool } --- -local function get_git_status() +local function get_git_status(git_dir) local file = io_popenyield("git --no-optional-locks status --porcelain 2>nul") if not file then return {} @@ -416,7 +498,10 @@ local function get_git_status() end file:close() - return { status = is_status, conflict = conflict_found } + local branch = get_git_branch(git_dir, false--[[fast]]) + local remote = get_git_remote(git_dir, branch) + + return { status = is_status, branch = branch, remote = remote, conflict = conflict_found } end --- @@ -515,11 +600,11 @@ end -- Use a prompt coroutine to get git status in the background. -- Cache the info so we can reuse it next time to reduce flicker. --- -local function get_git_info_table() +local function get_git_info_table(git_dir) local info = clink_promptcoroutine(function () -- Use git status if allowed. local cmderGitStatusOptIn = get_git_status_setting() - return cmderGitStatusOptIn and get_git_status() or {} + return cmderGitStatusOptIn and get_git_status(git_dir) or {} end) if not info then info = cached_info.git_info or {} @@ -539,10 +624,11 @@ local function git_prompt_filter() local git_dir = get_git_dir() local color if git_dir then - local branch = get_git_branch(git_dir) + local branch = get_git_branch(git_dir, true--[[fast]]) if branch then -- If in a different repo or branch than last time, discard cached info. - if cached_info.git_dir ~= git_dir or cached_info.git_branch ~= branch then + if cached_info.git_dir ~= git_dir or + (branch ~= ".invalid" and cached_info.git_branch ~= branch) then cached_info.git_info = nil cached_info.git_dir = git_dir cached_info.git_branch = branch @@ -550,10 +636,22 @@ local function git_prompt_filter() -- If we're inside of git repo then try to detect current branch -- Has branch => therefore it is a git folder, now figure out status - local gitInfo = get_git_info_table() + local gitInfo = get_git_info_table(git_dir) local gitStatus = gitInfo.status local gitConflict = gitInfo.conflict + -- Compensate for git reftables. + branch = gitInfo.branch or branch + if branch == ".invalid" then + branch = "Loading..." + elseif gitInfo.remote then + branch = branch.." -> "..gitInfo.remote + end + + -- Prevent an older clink-completions git_prompt.lua scripts from + -- modifying the prompt. + branch = "\x1b[10m"..branch + if gitStatus == nil then color = get_unknown_color() elseif gitStatus then From 48cc28a634bbf6508927fdfc4913b8a72a01d042 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sun, 22 Feb 2026 17:27:45 -0500 Subject: [PATCH 155/203] Fix yaml errors --- .github/workflows/build.yml | 72 ++--- .github/workflows/codeql.yml | 30 +- .github/workflows/tests.yml | 42 +-- .github/workflows/vendor.yml | 65 ++-- package-lock.json | 554 +++++++++++++++++++++++++++++++++++ package.json | 5 + 6 files changed, 664 insertions(+), 104 deletions(-) create mode 100644 package-lock.json create mode 100644 package.json diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d3886ec5d..c0e0a3865 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,7 +46,7 @@ jobs: . scripts/utils.ps1 $cmderVersion = Get-VersionStr $buildTime = (Get-Date).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ") - + # Determine branch link (handle PR merge refs) $branchName = "${{ github.ref_name }}" $branchLink = "" @@ -61,12 +61,12 @@ jobs: # Regular branch, link to the branch tree $branchLink = "https://github.com/${{ github.repository }}/tree/${{ github.ref_name }}" } - + $summary = @" ## šŸ“¦ Build Cmder - Workflow Summary - + Build started: $buildTime - + ### Repository Information | Property | Value | | --- | --- | @@ -76,14 +76,14 @@ jobs: | Actor | [@${{ github.actor }}](https://github.com/${{ github.actor }}) | | Workflow | ``${{ github.workflow }}`` | | Cmder Version | **$cmderVersion** | - + --- - + ### šŸ“ Vendor Packages | Package | Version | | --- | --- | "@ - + # Read vendor sources.json and add to summary $vendorSources = Get-Content "vendor/sources.json" | ConvertFrom-Json if ($vendorSources.Count -eq 0) { @@ -93,9 +93,9 @@ jobs: $summary += "`n| ``$($vendor.name)`` | $($vendor.version) |" } } - + $summary += "`n" - + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Add MSBuild to PATH @@ -111,16 +111,16 @@ jobs: shell: pwsh run: | $summary = @" - + --- - + ### Build Status - + āœ… Cmder built successfully. - + "@ - - $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 + + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Pack the built files shell: pwsh @@ -159,15 +159,15 @@ jobs: GH_TOKEN: ${{ github.token }} run: | $summary = @" - + --- - + ### šŸ—ƒļø Artifacts - + | Artifact | Size | Download | Hash (SHA256) | | --- | --- | --- | --- | "@ - + # Function to get artifact download URL with retry logic function Get-ArtifactDownloadUrl { param( @@ -175,12 +175,12 @@ jobs: [int]$MaxRetries = 3, [int]$DelaySeconds = 2 ) - + for ($i = 0; $i -lt $MaxRetries; $i++) { try { # Use GitHub CLI to get artifact information $artifactsJson = gh api "repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts" --jq ".artifacts[] | select(.name == `"$ArtifactName`")" - + if ($artifactsJson) { $artifact = $artifactsJson | ConvertFrom-Json if ($artifact.archive_download_url) { @@ -190,32 +190,32 @@ jobs: } catch { Write-Host "Attempt $($i + 1) failed to get artifact URL for $ArtifactName : $_" } - + if ($i -lt ($MaxRetries - 1)) { Start-Sleep -Seconds $DelaySeconds } } - + return $null } - + $artifacts = @("cmder.zip", "cmder.7z", "cmder_mini.zip", "hashes.txt") foreach ($artifact in $artifacts) { $path = "build/$artifact" if (Test-Path $path) { $size = (Get-Item $path).Length / 1MB $hash = (Get-FileHash $path -Algorithm SHA256).Hash - + # Try to get the actual artifact download URL $downloadUrl = Get-ArtifactDownloadUrl -ArtifactName $artifact $warning = "" - + if (-not $downloadUrl) { # Fallback to workflow run page if artifact URL fetch fails $downloadUrl = "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" $warning = " āš ļø" } - + # Determine emoji based on file type if ($artifact -match '\.txt$') { $emoji = "šŸ“„" @@ -224,12 +224,12 @@ jobs: } else { $emoji = "šŸ“¦" } - + $summary += "`n| $emoji ``$artifact`` | $([math]::Round($size, 2)) MB | [šŸ“„ Download$warning]($downloadUrl) | ``$hash`` |" } } $summary += "`n" - + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Create Release @@ -249,19 +249,19 @@ jobs: shell: pwsh run: | $summary = @" - + --- - + ### Release Information - + šŸš€ Draft release created for tag: **``${{ github.ref_name }}``** - + Release includes: - Full version (``cmder.zip``, ``cmder.7z``) - Mini version (``cmder_mini.zip``) - File hashes (``hashes.txt``) - + > āš ļø Release is in **draft** mode. Please review and publish manually. "@ - - $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 + + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index bc9503671..c0202c1fc 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -52,19 +52,19 @@ jobs: run: | $summary = @" ## šŸ”’ CodeQL Security Analysis - Workflow Summary - + ### Analysis Configuration - + | Property | Value | | --- | --- | | Repository | ``${{ github.repository }}`` | | Branch | ``${{ github.ref_name }}`` | | Language | ``${{ matrix.language }}`` | | Commit | ``${{ github.sha }}`` | - - "@ - - $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 + + "@ + + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL @@ -92,12 +92,12 @@ jobs: run: | $summary = @" ### āœ… Build Completed - + Cmder launcher built successfully for CodeQL analysis. - + "@ - - $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 + + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v4 @@ -110,12 +110,12 @@ jobs: run: | $summary = @" ### šŸ” CodeQL Analysis Results - + āœ… CodeQL security analysis completed successfully. - + **Language analyzed:** ``${{ matrix.language }}`` - + > Check the Security tab for detailed findings and recommendations. "@ - - $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 + + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c025e427c..1e1edd163 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -46,10 +46,10 @@ jobs: # Get Cmder version . scripts/utils.ps1 $cmderVersion = Get-VersionStr - + $summary = @" ## āœ… Run Tests - Workflow Summary - + ### Test Environment | Property | Value | | --- | --- | @@ -60,10 +60,10 @@ jobs: | Cmder Version | **$cmderVersion** | | PowerShell Version | **$($PSVersionTable.PSVersion)** | | Event | ``${{ github.event_name }}`` | - + "@ - - $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 + + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Initialize vendors shell: pwsh @@ -85,23 +85,23 @@ jobs: $vendorInfo += "- **$dir**: $($version.Trim())" } } - + $summary = @" ### āš™ļø Vendor Initialization - + āœ… Vendor dependencies initialized successfully. - + **Vendor Versions:** + "@ + $( if ($vendorInfo.Count -eq 0) { - "_No vendor version information available._" + $summary += "_No vendor version information available._" } else { - $vendorInfo -join "`n" + $summary += $vendorInfo -join '`n' } ) - - "@ - + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Summary - Test results table header @@ -110,12 +110,12 @@ jobs: run: | $summary = @" ### šŸ“‹ Test Results - + | Test | Status | Duration | | --- | --- | --- | "@ - - $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 + + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Testing Clink Shell id: test-clink @@ -153,15 +153,15 @@ jobs: shell: pwsh run: | $summary = @" - + ### āœ… All Tests Completed - + All shell environments tested successfully! - + **Test Coverage:** - āœ… Clink shell environment (Windows cmd.exe with Clink) - āœ… PowerShell environment (with Cmder profile) - āœ… Bash environment (Git Bash integration) "@ - - $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 + + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 diff --git a/.github/workflows/vendor.yml b/.github/workflows/vendor.yml index 3b1ab50e6..96c78fe9c 100644 --- a/.github/workflows/vendor.yml +++ b/.github/workflows/vendor.yml @@ -33,35 +33,36 @@ jobs: run: | $summary = @" ## šŸ“¦ Update Vendor - Workflow Summary - + Checking for vendor dependency updates... - + "@ - - $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 + + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - id: make-changes name: Checking for updates env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - $currentVersion = (Get-Content .\vendor\sources.json | ConvertFrom-Json) - . .\scripts\update.ps1 -verbose - Set-GHVariable -Name COUNT_UPDATED -Value $count - $newVersion = (Get-Content .\vendor\sources.json | ConvertFrom-Json) - $listUpdated = "" - $updateMessage = "| Name | Old Version | New Version |`n| :--- | ---- | ---- |`n" - foreach ($s in $newVersion) { - $oldVersion = ($currentVersion | Where-Object {$_.name -eq $s.name}).version - if ($s.version -ne $oldVersion) { - $repoUrl = ($repoUrl = $s.Url.Replace("/archive/", "/releases/")).Substring(0, $repoUrl.IndexOf("/releases/")) + "/releases" - $listUpdated += "$($s.name) v$($s.version), " - $updateMessage += "| **[$($s.name)]($repoUrl)** | $oldVersion | **$($s.version)** |`n" - } + $currentVersion = (Get-Content .\vendor\sources.json | ConvertFrom-Json) + . .\scripts\update.ps1 -verbose + Set-GHVariable -Name COUNT_UPDATED -Value $count + $newVersion = (Get-Content .\vendor\sources.json | ConvertFrom-Json) + $listUpdated = "" + $updateMessage = "| Name | Old Version | New Version |`n| :--- | ---- | ---- |`n" + foreach ($s in $newVersion) { + $oldVersion = ($currentVersion | Where-Object {$_.name -eq $s.name}).version + if ($s.version -ne $oldVersion) { + $repoUrl = ($repoUrl = $s.Url.Replace("/archive/", "/releases/")).Substring(0, $repoUrl.IndexOf("/releases/")) + "/releases" + $listUpdated += "$($s.name) v$($s.version), " + $updateMessage += "| **[$($s.name)]($repoUrl)** | $oldVersion | **$($s.version)** |`n" } - if ($count -eq 0) { return } - Set-GHVariable -Name LIST_UPDATED -Value $listUpdated.Trim(', ') - echo "UPDATE_MESSAGE<< 0 @@ -106,14 +107,14 @@ jobs: run: | $Summary = @" ### šŸŽ‰ Pull Request Created - + A pull request has been created to update the vendor dependencies. - + **Branch:** ``update-vendor`` - + **Updated dependencies:** $env:LIST_UPDATED - + > Please review and merge the pull request to apply the updates. "@ - - $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 + + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 000000000..d7af3183e --- /dev/null +++ b/package-lock.json @@ -0,0 +1,554 @@ +{ + "name": "fix-github-step-summary", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "dependencies": { + "yaml-lint": "^1.7.0" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "license": "Python-2.0" + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/async": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", + "license": "MIT" + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT" + }, + "node_modules/consola": { + "version": "2.15.3", + "resolved": "https://registry.npmjs.org/consola/-/consola-2.15.3.tgz", + "integrity": "sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==", + "license": "MIT" + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "license": "MIT", + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT" + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fastq": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.1.tgz", + "integrity": "sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==", + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "license": "MIT", + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/ini": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", + "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/js-yaml": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/nconf": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/nconf/-/nconf-0.12.1.tgz", + "integrity": "sha512-p2cfF+B3XXacQdswUYWZ0w6Vld0832A/tuqjLBu3H1sfUcby4N2oVbGhyuCkZv+t3iY3aiFEj7gZGqax9Q2c1w==", + "license": "MIT", + "dependencies": { + "async": "^3.0.0", + "ini": "^2.0.0", + "secure-keys": "^1.0.0", + "yargs": "^16.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/secure-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/secure-keys/-/secure-keys-1.0.0.tgz", + "integrity": "sha512-nZi59hW3Sl5P3+wOO89eHBAAGwmCPd2aE1+dLZV5MO+ItQctIvAqihzaAXIQhvtH4KJPxM080HsnqltR2y8cWg==", + "license": "MIT" + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yaml-lint": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/yaml-lint/-/yaml-lint-1.7.0.tgz", + "integrity": "sha512-zeBC/kskKQo4zuoGQ+IYjw6C9a/YILr2SXoEZA9jM0COrSwvwVbfTiFegT8qYBSBgOwLMWGL8sY137tOmFXGnQ==", + "license": "MIT", + "dependencies": { + "consola": "^2.15.3", + "globby": "^11.1.0", + "js-yaml": "^4.1.0", + "nconf": "^0.12.0" + }, + "bin": { + "yamllint": "dist/cli.js" + } + }, + "node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "license": "MIT", + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "license": "ISC", + "engines": { + "node": ">=10" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 000000000..352dad848 --- /dev/null +++ b/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "yaml-lint": "^1.7.0" + } +} From a46c8e850b002620b9fa90638323bd2d5f834667 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sun, 22 Feb 2026 13:09:12 -0500 Subject: [PATCH 156/203] fix vendor.yml --- .github/workflows/vendor.yml | 64 +++++++++++++++++++----------------- 1 file changed, 34 insertions(+), 30 deletions(-) diff --git a/.github/workflows/vendor.yml b/.github/workflows/vendor.yml index be587ef8f..e317d6157 100644 --- a/.github/workflows/vendor.yml +++ b/.github/workflows/vendor.yml @@ -31,12 +31,13 @@ jobs: - name: Summary - Workflow started shell: pwsh run: | - @" - ## šŸ“¦ Update Vendor - Workflow Summary - - Checking for vendor dependency updates... - - "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 + $summary = @( + "## šŸ“¦ Update Vendor - Workflow Summary", + "", + "Checking for vendor dependency updates...", + "" + ) -join "`n" + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - id: make-changes name: Checking for updates @@ -66,21 +67,23 @@ jobs: run: | $count = $env:COUNT_UPDATED if ($count -eq 0) { - @" - ### āœ… No Updates Available - - All vendor dependencies are up to date. - "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 + $summary = @( + "### āœ… No Updates Available", + "", + "All vendor dependencies are up to date." + ) -join "`n" + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 } else { $word = if ($count -eq 1) { 'dependency' } else { 'dependencies' } - @" - ### šŸ”„ Updates Found - - **$count** vendor $word updated: - - $env:UPDATE_MESSAGE - - "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 + $summary = @( + "### šŸ”„ Updates Found", + "", + "**$count** vendor $word updated:", + "", + "$env:UPDATE_MESSAGE", + "" + ) -join "`n" + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 } - uses: peter-evans/create-pull-request@v7 @@ -100,14 +103,15 @@ jobs: if: env.COUNT_UPDATED > 0 shell: pwsh run: | - @" - ### šŸŽ‰ Pull Request Created - - A pull request has been created to update the vendor dependencies. - - **Branch:** ``update-vendor`` - - **Updated dependencies:** $env:LIST_UPDATED - - > Please review and merge the pull request to apply the updates. - "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 + $summary = @( + "### šŸŽ‰ Pull Request Created", + "", + "A pull request has been created to update the vendor dependencies.", + "", + "**Branch:** ``update-vendor``", + "", + "**Updated dependencies:** $env:LIST_UPDATED", + "", + "> Please review and merge the pull request to apply the updates." + ) -join "`n" + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 From 68586196149bd3a6d9f08da87866bbb180034133 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sun, 22 Feb 2026 17:56:27 -0500 Subject: [PATCH 157/203] x --- .github/workflows/tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1e1edd163..8f85d9d25 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -39,6 +39,8 @@ jobs: steps: - uses: actions/checkout@v6 + with: + fetch-depth: 0 - name: Summary - Test execution started shell: pwsh From 6137073ba35ef8ee946184f510817652adb19e61 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sun, 22 Feb 2026 17:58:59 -0500 Subject: [PATCH 158/203] fix path to sources.json --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8f85d9d25..8a079a6ce 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -78,7 +78,7 @@ jobs: run: | # Get vendor versions from sources.json $vendorInfo = @() - $sources = Get-Content "sources.json" -Raw | ConvertFrom-Json + $sources = Get-Content "vendor\sources.json" -Raw | ConvertFrom-Json $vendorDirs = $sources.PSObject.Properties | ForEach-Object { $_.Name } foreach ($dir in $vendorDirs) { $versionFile = "vendor/$dir/.cmderver" From 66ab9ad6f7bbf918f977b09cb81efc373a14ffa4 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sun, 22 Feb 2026 18:11:34 -0500 Subject: [PATCH 159/203] remove nodejs files --- package-lock.json | 554 ---------------------------------------------- package.json | 5 - 2 files changed, 559 deletions(-) delete mode 100644 package-lock.json delete mode 100644 package.json diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index d7af3183e..000000000 --- a/package-lock.json +++ /dev/null @@ -1,554 +0,0 @@ -{ - "name": "fix-github-step-summary", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "dependencies": { - "yaml-lint": "^1.7.0" - } - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "license": "Python-2.0" - }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/async": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", - "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", - "license": "MIT" - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "license": "MIT", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "license": "MIT" - }, - "node_modules/consola": { - "version": "2.15.3", - "resolved": "https://registry.npmjs.org/consola/-/consola-2.15.3.tgz", - "integrity": "sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==", - "license": "MIT" - }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "license": "MIT", - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "license": "MIT" - }, - "node_modules/escalade": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/fast-glob": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", - "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.8" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fastq": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.1.tgz", - "integrity": "sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==", - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "license": "MIT", - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ignore": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/ini": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", - "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/js-yaml": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", - "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "license": "MIT", - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/nconf": { - "version": "0.12.1", - "resolved": "https://registry.npmjs.org/nconf/-/nconf-0.12.1.tgz", - "integrity": "sha512-p2cfF+B3XXacQdswUYWZ0w6Vld0832A/tuqjLBu3H1sfUcby4N2oVbGhyuCkZv+t3iY3aiFEj7gZGqax9Q2c1w==", - "license": "MIT", - "dependencies": { - "async": "^3.0.0", - "ini": "^2.0.0", - "secure-keys": "^1.0.0", - "yargs": "^16.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/reusify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", - "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/secure-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/secure-keys/-/secure-keys-1.0.0.tgz", - "integrity": "sha512-nZi59hW3Sl5P3+wOO89eHBAAGwmCPd2aE1+dLZV5MO+ItQctIvAqihzaAXIQhvtH4KJPxM080HsnqltR2y8cWg==", - "license": "MIT" - }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "node_modules/yaml-lint": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/yaml-lint/-/yaml-lint-1.7.0.tgz", - "integrity": "sha512-zeBC/kskKQo4zuoGQ+IYjw6C9a/YILr2SXoEZA9jM0COrSwvwVbfTiFegT8qYBSBgOwLMWGL8sY137tOmFXGnQ==", - "license": "MIT", - "dependencies": { - "consola": "^2.15.3", - "globby": "^11.1.0", - "js-yaml": "^4.1.0", - "nconf": "^0.12.0" - }, - "bin": { - "yamllint": "dist/cli.js" - } - }, - "node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "license": "MIT", - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "license": "ISC", - "engines": { - "node": ">=10" - } - } - } -} diff --git a/package.json b/package.json deleted file mode 100644 index 352dad848..000000000 --- a/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "yaml-lint": "^1.7.0" - } -} From 0c6b2d9900da906cf87b08af97430ff67e93c5df Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sun, 22 Feb 2026 13:45:47 -0500 Subject: [PATCH 160/203] Add back comments --- .github/dependabot.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index d08569dfe..b05586197 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,3 +1,8 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + version: 2 updates: # Enable version updates for GitHub Actions From 6edcfee40b83890c11a20b2a2cd0e8fc6903f924 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sun, 22 Feb 2026 13:55:56 -0500 Subject: [PATCH 161/203] workflow updates --- .github/dependabot.yml | 4 + .github/workflows/build.yml | 23 ++-- .github/workflows/codeql.yml | 66 ++++----- .github/workflows/tests.yml | 56 ++++---- .github/workflows/vendor.yml | 251 +++++++++++++++++++++++++++++------ 5 files changed, 296 insertions(+), 104 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 90e05c40d..b05586197 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,7 +5,11 @@ version: 2 updates: + # Enable version updates for GitHub Actions - package-ecosystem: "github-actions" # See documentation for possible values directory: "/" # Location of package manifests schedule: interval: "weekly" + labels: + - "šŸ‘† Dependencies" + - "šŸ”„ļø GitHub Actions" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 46f3e57aa..8f7f501de 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,7 +11,7 @@ on: tags: - "v*" pull_request: - branches: [ "main" ] + branches: [ "main", "dev" ] #---------------------------------# # environment configuration # @@ -93,6 +93,7 @@ jobs: $summary += "`n| ``$($vendor.name)`` | $($vendor.version) |" } } + $summary += "`n" $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 @@ -109,7 +110,7 @@ jobs: if: success() shell: pwsh run: | - @" + $summary = @" --- @@ -117,7 +118,9 @@ jobs: āœ… Cmder built successfully. - "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 + "@ + + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Pack the built files shell: pwsh @@ -125,26 +128,26 @@ jobs: run: .\pack.ps1 -verbose - name: Upload artifact (cmder.zip) - uses: actions/upload-artifact@v5 + uses: actions/upload-artifact@v6 with: path: build/cmder.zip name: cmder.zip if-no-files-found: error - name: Upload artifact (cmder.7z) - uses: actions/upload-artifact@v5 + uses: actions/upload-artifact@v6 with: path: build/cmder.7z name: cmder.7z - name: Upload artifact (cmder_mini.zip) - uses: actions/upload-artifact@v5 + uses: actions/upload-artifact@v6 with: path: build/cmder_mini.zip name: cmder_mini.zip - name: Upload artifact (hashes.txt) - uses: actions/upload-artifact@v5 + uses: actions/upload-artifact@v6 with: path: build/hashes.txt name: hashes.txt @@ -245,7 +248,7 @@ jobs: if: startsWith(github.ref, 'refs/tags/') shell: pwsh run: | - @" + $summary = @" --- @@ -259,4 +262,6 @@ jobs: - File hashes (``hashes.txt``) > āš ļø Release is in **draft** mode. Please review and publish manually. - "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 + "@ + + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index d40f79791..452cccb6b 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -8,7 +8,7 @@ name: "CodeQL" on: push: - branches: [ "main" ] + branches: [ "main", "dev" ] paths-ignore: - '**/*.md' - '**/*.txt' @@ -16,7 +16,7 @@ on: - '**/.gitignore' pull_request: # The branches below must be a subset of the branches above - branches: [ "main" ] + branches: [ "main", "dev" ] paths-ignore: - '**/*.md' - '**/*.txt' @@ -50,19 +50,21 @@ jobs: - name: Summary - CodeQL analysis started shell: pwsh run: | - @" - ## šŸ”’ CodeQL Security Analysis - Workflow Summary - - ### Analysis Configuration - - | Property | Value | - | --- | --- | - | Repository | ``${{ github.repository }}`` | - | Branch | ``${{ github.ref_name }}`` | - | Language | ``${{ matrix.language }}`` | - | Commit | ``${{ github.sha }}`` | - - "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 + $summary = @" + ## šŸ”’ CodeQL Security Analysis - Workflow Summary + + ### Analysis Configuration + + | Property | Value | + | --- | --- | + | Repository | ``${{ github.repository }}`` | + | Branch | ``${{ github.ref_name }}`` | + | Language | ``${{ matrix.language }}`` | + | Commit | ``${{ github.sha }}`` | + + "@ + + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL @@ -88,12 +90,14 @@ jobs: if: success() shell: pwsh run: | - @" - ### āœ… Build Completed - - Cmder launcher built successfully for CodeQL analysis. - - "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 + $summary = @" + ### āœ… Build Completed + + Cmder launcher built successfully for CodeQL analysis. + + "@ + + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v4 @@ -104,12 +108,14 @@ jobs: if: success() shell: pwsh run: | - @" - ### šŸ” CodeQL Analysis Results - - āœ… CodeQL security analysis completed successfully. - - **Language analyzed:** ``${{ matrix.language }}`` - - > Check the Security tab for detailed findings and recommendations. - "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 + $summary = @" + ### šŸ” CodeQL Analysis Results + + āœ… CodeQL security analysis completed successfully. + + **Language analyzed:** ``${{ matrix.language }}`` + + > Check the Security tab for detailed findings and recommendations. + "@ + + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4db9a8a93..e935f9e1b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -4,7 +4,7 @@ on: push: branches: - main - + - dev paths-ignore: - '**/*.md' - '**/*.txt' @@ -13,7 +13,7 @@ on: pull_request: branches: - main - + - dev paths-ignore: - '**/*.md' - '**/*.txt' @@ -39,6 +39,8 @@ jobs: steps: - uses: actions/checkout@v6 + with: + fetch-depth: 0 - name: Summary - Test execution started shell: pwsh @@ -46,10 +48,10 @@ jobs: # Get Cmder version . scripts/utils.ps1 $cmderVersion = Get-VersionStr - - @" + + $summary = @" ## āœ… Run Tests - Workflow Summary - + ### Test Environment | Property | Value | | --- | --- | @@ -60,8 +62,10 @@ jobs: | Cmder Version | **$cmderVersion** | | PowerShell Version | **$($PSVersionTable.PSVersion)** | | Event | ``${{ github.event_name }}`` | - - "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 + + "@ + + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Initialize vendors shell: pwsh @@ -74,7 +78,7 @@ jobs: run: | # Get vendor versions from sources.json $vendorInfo = @() - $sources = Get-Content "sources.json" -Raw | ConvertFrom-Json + $sources = Get-Content "vendor\sources.json" -Raw | ConvertFrom-Json $vendorDirs = $sources.PSObject.Properties | ForEach-Object { $_.Name } foreach ($dir in $vendorDirs) { $versionFile = "vendor/$dir/.cmderver" @@ -83,35 +87,37 @@ jobs: $vendorInfo += "- **$dir**: $($version.Trim())" } } - + $summary = @" ### āš™ļø Vendor Initialization - + āœ… Vendor dependencies initialized successfully. - + **Vendor Versions:** + "@ + $( if ($vendorInfo.Count -eq 0) { - "_No vendor version information available._" + $summary += "_No vendor version information available._" } else { - $vendorInfo -join "`n" + $summary += $vendorInfo -join '`n' } ) - - "@ - + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Summary - Test results table header if: success() shell: pwsh run: | - @" + $summary = @" ### šŸ“‹ Test Results - + | Test | Status | Duration | | --- | --- | --- | - "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 + "@ + + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Testing Clink Shell id: test-clink @@ -148,14 +154,16 @@ jobs: if: success() shell: pwsh run: | - @" - + $summary = @" + ### āœ… All Tests Completed - + All shell environments tested successfully! - + **Test Coverage:** - āœ… Clink shell environment (Windows cmd.exe with Clink) - āœ… PowerShell environment (with Cmder profile) - āœ… Bash environment (Git Bash integration) - "@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 + "@ + + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 diff --git a/.github/workflows/vendor.yml b/.github/workflows/vendor.yml index e317d6157..32e9b2915 100644 --- a/.github/workflows/vendor.yml +++ b/.github/workflows/vendor.yml @@ -31,12 +31,13 @@ jobs: - name: Summary - Workflow started shell: pwsh run: | - $summary = @( - "## šŸ“¦ Update Vendor - Workflow Summary", - "", - "Checking for vendor dependency updates...", - "" - ) -join "`n" + $summary = @" + ## šŸ“¦ Update Vendor - Workflow Summary + + šŸ” Checking for vendor dependency updates... + + "@ + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - id: make-changes @@ -49,69 +50,237 @@ jobs: Set-GHVariable -Name COUNT_UPDATED -Value $count $newVersion = (Get-Content .\vendor\sources.json | ConvertFrom-Json) $listUpdated = "" - $updateMessage = "| Name | Old Version | New Version |`n| :--- | ---- | ---- |`n" + $updateMessage = "| Name | Old Version | New Version |`n| :--- | :---: | :---: |`n" + $majorUpdates = @() + $singleDepName = "" + $singleDepOldVersion = "" + $singleDepNewVersion = "" foreach ($s in $newVersion) { $oldVersion = ($currentVersion | Where-Object {$_.name -eq $s.name}).version if ($s.version -ne $oldVersion) { $repoUrl = ($repoUrl = $s.Url.Replace("/archive/", "/releases/")).Substring(0, $repoUrl.IndexOf("/releases/")) + "/releases" + + # Store single dependency info for messages (only if this is the only update) + if ($count -eq 1) { + $singleDepName = $s.name + $singleDepOldVersion = $oldVersion + $singleDepNewVersion = $s.version + } + + # Determine change type and emoji + $changeType = "unknown" + $emoji = "šŸ”„" + $isMajor = $false + try { + # Handle versions with more than 4 parts + $oldVerStr = $oldVersion.Split('-')[0] + $newVerStr = $s.version.Split('-')[0] + + # Split by dots and take only numeric parts, first 4 max + $oldParts = $oldVerStr.Split('.') | Where-Object { $_ -match '^\d+$' } | Select-Object -First 4 + $newParts = $newVerStr.Split('.') | Where-Object { $_ -match '^\d+$' } | Select-Object -First 4 + + # Ensure we have at least 2 parts (major.minor) + if ($oldParts.Count -ge 2 -and $newParts.Count -ge 2) { + $oldVerParseable = $oldParts -join '.' + $newVerParseable = $newParts -join '.' + + $oldVer = [System.Version]::Parse($oldVerParseable) + $newVer = [System.Version]::Parse($newVerParseable) + + if ($newVer.Major -gt $oldVer.Major) { + $changeType = "major" + $emoji = "šŸ”„" + $isMajor = $true + } elseif ($newVer.Minor -gt $oldVer.Minor) { + $changeType = "minor" + $emoji = "šŸš€" + } else { + $changeType = "patch" + $emoji = "ā¬†ļø" + } + } + } catch { + $changeType = "unknown" + $emoji = "šŸ”„" + } + + # Track major updates for changelog section + if ($isMajor) { + $compareUrl = "$repoUrl/compare/v$oldVersion...v$($s.version)" + $majorUpdates += @{ + name = $s.name + oldVersion = $oldVersion + newVersion = $s.version + compareUrl = $compareUrl + repoUrl = $repoUrl + } + } + $listUpdated += "$($s.name) v$($s.version), " - $updateMessage += "| **[$($s.name)]($repoUrl)** | $oldVersion | **$($s.version)** |`n" + $updateMessage += "| $emoji **[$($s.name)]($repoUrl)** | \`$oldVersion\` | **\`$($s.version)\`** |`n" } } if ($count -eq 0) { return } Set-GHVariable -Name LIST_UPDATED -Value $listUpdated.Trim(', ') + # Set single dependency variables (they will only be used if COUNT_UPDATED is 1) + # Use safe fallback values in case variables weren't set (shouldn't happen but prevents errors) + if ([string]::IsNullOrEmpty($singleDepName) -and $count -eq 1) { + # This shouldn't happen, but if it does, log a warning + Write-Warning "Single dependency name not set despite count being 1" + $singleDepName = "unknown-package" + $singleDepOldVersion = "unknown" + $singleDepNewVersion = "unknown" + } elseif ([string]::IsNullOrEmpty($singleDepName)) { + # For multiple dependencies, set placeholder values (won't be used) + $singleDepName = "" + $singleDepOldVersion = "" + $singleDepNewVersion = "" + } + Set-GHVariable -Name SINGLE_DEP_NAME -Value $singleDepName + Set-GHVariable -Name SINGLE_DEP_OLD_VERSION -Value $singleDepOldVersion + Set-GHVariable -Name SINGLE_DEP_NEW_VERSION -Value $singleDepNewVersion echo "UPDATE_MESSAGE<< 0 + $summary += "$env:UPDATE_MESSAGE" + + # Check if we can auto-merge (only minor/patch changes) + $hasBreaking = $env:HAS_BREAKING_CHANGES -eq 'True' + if ($hasBreaking) { + $summary += "> āš ļø **Note:** This update contains major version changes that may include breaking changes." + } else { + $summary += "> ā„¹ļø **Note:** This update only contains minor or patch changes." + } + + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY + + - name: Auto-merge minor updates + if: env.COUNT_UPDATED > 0 && env.HAS_BREAKING_CHANGES != 'True' + shell: pwsh + run: | + try { + echo "### šŸš€ Auto-merging Updates" >> $env:GITHUB_STEP_SUMMARY + echo "" >> $env:GITHUB_STEP_SUMMARY + echo "Attempting to automatically merge non-breaking changes to main..." >> $env:GITHUB_STEP_SUMMARY + + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + + # Commit the changes + git add vendor/sources.json + $commitResult = git commit -m "ā¬†ļø Update dependencies ($env:LIST_UPDATED)" + + # Push directly to main + git push origin HEAD:main + + echo "" >> $env:GITHUB_STEP_SUMMARY + echo "āœ… **Success!** Updates have been automatically merged to main." >> $env:GITHUB_STEP_SUMMARY + echo "" >> $env:GITHUB_STEP_SUMMARY + echo "**Updated dependencies:** $env:LIST_UPDATED" >> $env:GITHUB_STEP_SUMMARY + + # Set a flag to skip PR creation + echo "AUTO_MERGED=true" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8 + } catch { + echo "" >> $env:GITHUB_STEP_SUMMARY + echo "āš ļø **Warning:** Unable to automatically merge updates." >> $env:GITHUB_STEP_SUMMARY + echo "" >> $env:GITHUB_STEP_SUMMARY + echo "**Error:** $($_.Exception.Message)" >> $env:GITHUB_STEP_SUMMARY + echo "" >> $env:GITHUB_STEP_SUMMARY + echo "Falling back to creating a pull request..." >> $env:GITHUB_STEP_SUMMARY + + Write-Warning "Failed to auto-merge: $($_.Exception.Message)" + + # Reset the commit if one was made + if ($commitResult) { + git reset --hard HEAD~1 + } + + # Set flag to create PR instead + echo "AUTO_MERGED=false" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8 + } + + - uses: peter-evans/create-pull-request@v8 + if: env.COUNT_UPDATED > 0 && (env.HAS_BREAKING_CHANGES == 'True' || env.AUTO_MERGED == 'false') with: - title: 'Updates to `${{ env.COUNT_UPDATED }}` vendored dependencies' + title: ${{ env.COUNT_UPDATED == '1' && format('ā¬†ļø Update {0}', env.LIST_UPDATED) || format('ā¬†ļø Update {0} vendored dependencies', env.COUNT_UPDATED) }} body: | - ### Automatically updated `${{ env.COUNT_UPDATED }}` dependencies: + ### ${{ env.COUNT_UPDATED == 1 && format('šŸ“¦ Updated {0} from `{1}` to `{2}`', env.SINGLE_DEP_NAME, env.SINGLE_DEP_OLD_VERSION, env.SINGLE_DEP_NEW_VERSION) || format('šŸ“¦ Automatically updated `{0}` dependencies', env.COUNT_UPDATED) }} + ${{ env.UPDATE_MESSAGE }} + + ${{ env.CHANGELOG_SECTION }} + --- - Please verify and then **Merge** the pull request to update. + + ${{ env.HAS_BREAKING_CHANGES == 'True' && 'āš ļø **This update contains major version changes that may include breaking changes.**' || 'ā„¹ļø This update only contains minor or patch changes.' }} + + Please verify and then **Merge** the pull request to apply the updates. commit-message: 'ā¬†ļø Update dependencies (${{ env.LIST_UPDATED }})' branch: update-vendor base: main - name: Summary - Pull request created - if: env.COUNT_UPDATED > 0 + if: env.COUNT_UPDATED > 0 && (env.HAS_BREAKING_CHANGES == 'True' || env.AUTO_MERGED == 'false') shell: pwsh run: | - $summary = @( - "### šŸŽ‰ Pull Request Created", - "", - "A pull request has been created to update the vendor dependencies.", - "", - "**Branch:** ``update-vendor``", - "", - "**Updated dependencies:** $env:LIST_UPDATED", - "", - "> Please review and merge the pull request to apply the updates." - ) -join "`n" + $summary = @" + ### šŸŽ‰ Pull Request Created + + A pull request has been created to update the vendor dependencies. + + **Branch:** `update-vendor` + + $env:LIST_UPDATED -and "**Updated dependencies:** $env:LIST_UPDATED" -or "**Updated dependencies:** + + "@ + + if ($env:HAS_BREAKING_CHANGES -eq 'True') { + $summary += "> āš ļø **Manual review required:** This update contains major version changes." + } else { + $summary += "> ā„¹ļø **Note:** Auto-merge failed, manual review required." + } + + $summary += @" + > Please review and merge the pull request to apply the updates. + + "@ + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 From 26827ae04b51000a1ab65bbc5e0bfb7da0de8221 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sun, 22 Feb 2026 14:03:52 -0500 Subject: [PATCH 162/203] workflow updates --- .github/workflows/vendor.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/vendor.yml b/.github/workflows/vendor.yml index 32e9b2915..2b81be495 100644 --- a/.github/workflows/vendor.yml +++ b/.github/workflows/vendor.yml @@ -35,7 +35,6 @@ jobs: ## šŸ“¦ Update Vendor - Workflow Summary šŸ” Checking for vendor dependency updates... - "@ $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 @@ -176,7 +175,6 @@ jobs: šŸ“¦ **$env:SINGLE_DEP_NAME** updated from ``$env:SINGLE_DEP_OLD_VERSION`` to ``$env:SINGLE_DEP_NEW_VERSION`` šŸ“¦ **$count** vendor $word updated: - "@ } @@ -269,7 +267,6 @@ jobs: **Branch:** `update-vendor` $env:LIST_UPDATED -and "**Updated dependencies:** $env:LIST_UPDATED" -or "**Updated dependencies:** - "@ if ($env:HAS_BREAKING_CHANGES -eq 'True') { @@ -280,7 +277,6 @@ jobs: $summary += @" > Please review and merge the pull request to apply the updates. - "@ $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 From 896a394817bc0d540d80a74321ab663bd8a8315e Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sun, 22 Feb 2026 14:14:45 -0500 Subject: [PATCH 163/203] workflow updates --- .github/workflows/vendor.yml | 48 +++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/.github/workflows/vendor.yml b/.github/workflows/vendor.yml index 2b81be495..f2f5772a2 100644 --- a/.github/workflows/vendor.yml +++ b/.github/workflows/vendor.yml @@ -31,12 +31,12 @@ jobs: - name: Summary - Workflow started shell: pwsh run: | - $summary = @" - ## šŸ“¦ Update Vendor - Workflow Summary - - šŸ” Checking for vendor dependency updates... - "@ - + $summary = @( + '## šŸ“¦ Update Vendor - Workflow Summary' + '' + 'šŸ” Checking for vendor dependency updates...' + '' + ) $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - id: make-changes @@ -162,33 +162,32 @@ jobs: $count = [int]$env:COUNT_UPDATED if ($count -eq 0) { - $summary = @" + $summary = @' ### āœ… No Updates Available All vendor dependencies are up to date! šŸŽ‰ - "@ - } else { - $word = if ($count -eq 1) { 'dependency' } else { 'dependencies' } - $summary = @" + '@ + } else { + $word = if ($count -eq 1) { 'dependency' } else { 'dependencies' } + $summary = @' ### šŸ”„ Updates Found - šŸ“¦ **$env:SINGLE_DEP_NAME** updated from ``$env:SINGLE_DEP_OLD_VERSION`` to ``$env:SINGLE_DEP_NEW_VERSION`` - - šŸ“¦ **$count** vendor $word updated: - "@ + '@ + $summary += 'šŸ“¦ **' + $env:SINGLE_DEP_NAME + '** updated from `' + $env:SINGLE_DEP_OLD_VERSION + '` to `' + $env:SINGLE_DEP_NEW_VERSION + '`' + [Environment]::NewLine + [Environment]::NewLine + $summary += 'šŸ“¦ **' + $count + '** vendor ' + $word + ' updated:' + [Environment]::NewLine + [Environment]::NewLine } - $summary += "$env:UPDATE_MESSAGE" + $summary += $env:UPDATE_MESSAGE + [Environment]::NewLine # Check if we can auto-merge (only minor/patch changes) $hasBreaking = $env:HAS_BREAKING_CHANGES -eq 'True' if ($hasBreaking) { - $summary += "> āš ļø **Note:** This update contains major version changes that may include breaking changes." + $summary += '> āš ļø **Note:** This update contains major version changes that may include breaking changes.' } else { - $summary += "> ā„¹ļø **Note:** This update only contains minor or patch changes." + $summary += '> ā„¹ļø **Note:** This update only contains minor or patch changes.' } - $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Auto-merge minor updates if: env.COUNT_UPDATED > 0 && env.HAS_BREAKING_CHANGES != 'True' @@ -259,14 +258,16 @@ jobs: if: env.COUNT_UPDATED > 0 && (env.HAS_BREAKING_CHANGES == 'True' || env.AUTO_MERGED == 'false') shell: pwsh run: | + $updatedLine = if (-not [string]::IsNullOrEmpty($env:LIST_UPDATED)) { "**Updated dependencies:** $env:LIST_UPDATED" } else { "**Updated dependencies:** " } $summary = @" - ### šŸŽ‰ Pull Request Created + ### šŸŽ‰ Pull Request Created - A pull request has been created to update the vendor dependencies. + A pull request has been created to update the vendor dependencies. - **Branch:** `update-vendor` + **Branch:** `update-vendor` + + $updatedLine - $env:LIST_UPDATED -and "**Updated dependencies:** $env:LIST_UPDATED" -or "**Updated dependencies:** "@ if ($env:HAS_BREAKING_CHANGES -eq 'True') { @@ -277,6 +278,7 @@ jobs: $summary += @" > Please review and merge the pull request to apply the updates. + "@ $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 From 205cc147aeb0f7ead46ce4d0df7db135aff67b37 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sun, 22 Feb 2026 14:17:55 -0500 Subject: [PATCH 164/203] workflow updates --- .github/workflows/vendor.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/vendor.yml b/.github/workflows/vendor.yml index f2f5772a2..a5623f078 100644 --- a/.github/workflows/vendor.yml +++ b/.github/workflows/vendor.yml @@ -162,17 +162,18 @@ jobs: $count = [int]$env:COUNT_UPDATED if ($count -eq 0) { - $summary = @' + $summary = @" ### āœ… No Updates Available All vendor dependencies are up to date! šŸŽ‰ - '@ - } else { - $word = if ($count -eq 1) { 'dependency' } else { 'dependencies' } - $summary = @' + + "@ + } else { + $word = if ($count -eq 1) { 'dependency' } else { 'dependencies' } + $summary = @" ### šŸ”„ Updates Found - '@ + "@ $summary += 'šŸ“¦ **' + $env:SINGLE_DEP_NAME + '** updated from `' + $env:SINGLE_DEP_OLD_VERSION + '` to `' + $env:SINGLE_DEP_NEW_VERSION + '`' + [Environment]::NewLine + [Environment]::NewLine $summary += 'šŸ“¦ **' + $count + '** vendor ' + $word + ' updated:' + [Environment]::NewLine + [Environment]::NewLine } From 979168af42a81e5fdf7bf57602c3446ede98e14a Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sun, 22 Feb 2026 14:22:04 -0500 Subject: [PATCH 165/203] workflow updates --- .github/workflows/vendor.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/vendor.yml b/.github/workflows/vendor.yml index a5623f078..eb322cd2c 100644 --- a/.github/workflows/vendor.yml +++ b/.github/workflows/vendor.yml @@ -162,18 +162,18 @@ jobs: $count = [int]$env:COUNT_UPDATED if ($count -eq 0) { - $summary = @" - ### āœ… No Updates Available - - All vendor dependencies are up to date! šŸŽ‰ - - "@ + $summary = @( + '### āœ… No Updates Available' + '' + 'All vendor dependencies are up to date! šŸŽ‰' + '' + ) } else { $word = if ($count -eq 1) { 'dependency' } else { 'dependencies' } - $summary = @" - ### šŸ”„ Updates Found - - "@ + $summary = @( + '### šŸ”„ Updates Found' + '' + ) $summary += 'šŸ“¦ **' + $env:SINGLE_DEP_NAME + '** updated from `' + $env:SINGLE_DEP_OLD_VERSION + '` to `' + $env:SINGLE_DEP_NEW_VERSION + '`' + [Environment]::NewLine + [Environment]::NewLine $summary += 'šŸ“¦ **' + $count + '** vendor ' + $word + ' updated:' + [Environment]::NewLine + [Environment]::NewLine } From abe2dba303eacef373cd886c266f4719879e732b Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sun, 22 Feb 2026 14:36:59 -0500 Subject: [PATCH 166/203] sync --- .github/workflows/build.yml | 9 ++-- .github/workflows/codeql.yml | 53 ++++++++++++++---------- .github/workflows/vendor.yml | 58 +++++++++++++++----------- CHANGELOG.md | 79 ++++++++++++++++++++++++++++++++++++ 4 files changed, 150 insertions(+), 49 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 76d0298fd..37b7b8ad0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -128,10 +128,10 @@ jobs: echo "### ā˜ļø Upload Status" >> $env:GITHUB_STEP_SUMMARY echo "" >> $env:GITHUB_STEP_SUMMARY echo "All artifacts successfully uploaded to GitHub Actions:" >> $env:GITHUB_STEP_SUMMARY - echo "- āœ… \`cmder.zip\`" >> $env:GITHUB_STEP_SUMMARY - echo "- āœ… \`cmder.7z\`" >> $env:GITHUB_STEP_SUMMARY - echo "- āœ… \`cmder_mini.zip\`" >> $env:GITHUB_STEP_SUMMARY - echo "- āœ… \`hashes.txt\`" >> $env:GITHUB_STEP_SUMMARY + echo '- āœ… `cmder.zip`' >> $env:GITHUB_STEP_SUMMARY + echo '- āœ… `cmder.7z`' >> $env:GITHUB_STEP_SUMMARY + echo '- āœ… `cmder_mini.zip`' >> $env:GITHUB_STEP_SUMMARY + echo '- āœ… `hashes.txt`' >> $env:GITHUB_STEP_SUMMARY echo "" >> $env:GITHUB_STEP_SUMMARY - name: Create Release @@ -160,3 +160,4 @@ jobs: echo "- File hashes (\`hashes.txt\`)" >> $env:GITHUB_STEP_SUMMARY echo "" >> $env:GITHUB_STEP_SUMMARY echo "> āš ļø Release is in **draft** mode. Please review and publish manually." >> $env:GITHUB_STEP_SUMMARY + diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 16ebd4072..1497bf9ac 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -50,17 +50,20 @@ jobs: - name: Summary - CodeQL analysis started shell: pwsh run: | - echo "## šŸ”’ CodeQL Security Analysis - Workflow Summary" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "### Analysis Configuration" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "| Property | Value |" >> $env:GITHUB_STEP_SUMMARY - echo "| --- | --- |" >> $env:GITHUB_STEP_SUMMARY - echo "| Repository | \`${{ github.repository }}\` |" >> $env:GITHUB_STEP_SUMMARY - echo "| Branch | \`${{ github.ref_name }}\` |" >> $env:GITHUB_STEP_SUMMARY - echo "| Language | \`${{ matrix.language }}\` |" >> $env:GITHUB_STEP_SUMMARY - echo "| Commit | \`${{ github.sha }}\` |" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY + $summary = @( + '## šŸ”’ CodeQL Security Analysis - Workflow Summary' + '' + '### Analysis Configuration' + '' + '| Property | Value |' + '| --- | --- |' + '| Repository | `${{ github.repository }}` |' + '| Branch | `${{ github.ref_name }}` |' + '| Language | `${{ matrix.language }}` |' + '| Commit | `${{ github.sha }}` |' + '' + ) + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL @@ -86,10 +89,13 @@ jobs: if: success() shell: pwsh run: | - echo "### āœ… Build Completed" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "Cmder launcher built successfully for CodeQL analysis." >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY + $summary = @( + '### āœ… Build Completed' + '' + 'Cmder launcher built successfully for CodeQL analysis.' + '' + ) + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v4 @@ -100,10 +106,13 @@ jobs: if: success() shell: pwsh run: | - echo "### šŸ” CodeQL Analysis Results" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "āœ… CodeQL security analysis completed successfully." >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "**Language analyzed:** \`${{ matrix.language }}\`" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "> Check the Security tab for detailed findings and recommendations." >> $env:GITHUB_STEP_SUMMARY + $summary = @( + '### šŸ” CodeQL Analysis Results' + '' + 'āœ… CodeQL security analysis completed successfully.' + '' + '**Language analyzed:** `${{ matrix.language }}`' + '' + '> Check the Security tab for detailed findings and recommendations.' + ) + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY diff --git a/.github/workflows/vendor.yml b/.github/workflows/vendor.yml index ee76b336c..ab254aedf 100644 --- a/.github/workflows/vendor.yml +++ b/.github/workflows/vendor.yml @@ -31,10 +31,13 @@ jobs: - name: Summary - Workflow started shell: pwsh run: | - echo "## šŸ“¦ Update Vendor - Workflow Summary" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "Checking for vendor dependency updates..." >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY + $summary = @( + '## šŸ“¦ Update Vendor - Workflow Summary' + '' + 'Checking for vendor dependency updates...' + '' + ) + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY - id: make-changes name: Checking for updates @@ -62,19 +65,25 @@ jobs: - name: Summary - Update check results shell: pwsh run: | - $count = $env:COUNT_UPDATED + $count = [int]$env:COUNT_UPDATED if ($count -eq 0) { - echo "### āœ… No Updates Available" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "All vendor dependencies are up to date." >> $env:GITHUB_STEP_SUMMARY + $summary = @( + '### āœ… No Updates Available' + '' + 'All vendor dependencies are up to date.' + ) + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY } else { $word = if ($count -eq 1) { 'dependency' } else { 'dependencies' } - echo "### šŸ”„ Updates Found" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "**$count** vendor $word updated:" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "$env:UPDATE_MESSAGE" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY + $summary = @( + '### šŸ”„ Updates Found' + '' + "**$count** vendor $word updated:" + '' + $env:UPDATE_MESSAGE + '' + ) + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY } - uses: peter-evans/create-pull-request@v8 @@ -94,12 +103,15 @@ jobs: if: env.COUNT_UPDATED > 0 shell: pwsh run: | - echo "### šŸŽ‰ Pull Request Created" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "A pull request has been created to update the vendor dependencies." >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "**Branch:** \`update-vendor\`" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "**Updated dependencies:** $env:LIST_UPDATED" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "> Please review and merge the pull request to apply the updates." >> $env:GITHUB_STEP_SUMMARY + $summary = @( + '### šŸŽ‰ Pull Request Created' + '' + 'A pull request has been created to update the vendor dependencies.' + '' + '**Branch:** `update-vendor`' + '' + $env:LIST_UPDATED -and "**Updated dependencies:** $env:LIST_UPDATED" -or "**Updated dependencies:** " + '' + '> Please review and merge the pull request to apply the updates.' + ) + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b22a1917..eca18db4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,84 @@ # Change Log +## [1.3.25](https://github.com/cmderdev/cmder/tree/v1.3.25) (2024-05-31) + +### Changes + +- Component Updates + - Update Git for Windows to 2.45.1.windows.1. + - Update ConEmu to 24.05.31. + - Clink 1.6.14. + - clink-completions 0.5.2. + +- Add `SECURITY.md` and refresh CI workflows and actions. +- Enable `match.expand_envvars` and improve git diagnostics for improper versions. + +### Fixes + +- Fix #2944. +- Fix script error when the working directory contains `%`. +- Remove environment refresh race condition. + +## [1.3.24](https://github.com/cmderdev/cmder/tree/v1.3.24) (2023-07-24) + +### Changes + +- Update `build.yml` workflow. + +## [1.3.23](https://github.com/cmderdev/cmder/tree/v1.3.23) (2023-07-24) + +### Changes + +- Update ConEmu (conemu-maximus5) to 23.07.24. + +## [1.3.22](https://github.com/cmderdev/cmder/tree/v1.3.22) (2023-07-24) + +### Changes + +- Handle Clink injction differently in `init.bat`. +- Changes to `clink_settings.lua.default`. + - Do not add commands to Clink Command Line History that begin with whitespace as a default. + - This can be changed to the old behavior by setting `history_ignore_space` to `0` in `config\clink_settings.lua`. + - `history.max_lines` is now defaults to `25000` instead of `10000`. + - This can be changed back to the old behavior by setting `history_max_lines` to `10000` in `config\clink_settings.lua`. + - `history.shared` now defaults to `False` instead of `True`. + - The previous default of `True` was causing issues with some users when using Cmder in multiple sessions. + - This can be changed back to the old behavior by setting `history_shared` to `1` in `config\clink_settings.lua`. + +- Component Updates + - Git for Windows to 2.41.0.windows.3 + - Clink to 1.5.1 + - ConEmu to 23.07.23 + - clink-completions to 0.4.10 + +- Remove AppVeyor configuration and add CodeQL scanning and Dependabot updates. + +### Fixes + +- Fix `/task ""` handling. +- Skip clink injection when initialization fails fatally. +- Fix errors when git/svn/hg are not installed and in profile.d PowerShell scripts. + +## [1.3.21](https://github.com/cmderdev/cmder/tree/v1.3.21) (2022-12-19) + +### Fixes + +- Fix #2789. +- Fix Git Bash `GIT_INSTALL_ROOT` handling. + +### Changes + +- Refactor `clink.lua` to speed up the prompt. +- Refactor and Cleanup `init.bat` and related scripts. +- Refactor and Cleanup `profile.ps1` and related scripts. +- Remove handling of `clink` and `tcc` incompatibility. +- Update ConEmu to mitigate CVE-2022-46387. +- Update Git for Windows to 2.39.0.windows.1 and Clink to 1.4.4. + +### Adds + +- Add `show_warning` function to `vendor\lib\lib_console.cmd` for showing warning messages in yellow. + ## [1.3.20](https://github.com/cmderdev/cmder/tree/v1.3.20) (2022-03-18) ### Changes From 0dd8459eac0349b36778f6b7e116f15d30d708b7 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sun, 22 Feb 2026 14:44:42 -0500 Subject: [PATCH 167/203] cleanup --- vendor/sources.json | 50 ++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/vendor/sources.json b/vendor/sources.json index b528368ce..df1ae3e5f 100644 --- a/vendor/sources.json +++ b/vendor/sources.json @@ -1,27 +1,27 @@ [ - { - "name": "git-for-windows", - "version": "2.52.0.windows.1", - "url": "https://github.com/git-for-windows/git/releases/download/v2.52.0.windows.1/PortableGit-2.52.0-64-bit.7z.exe" - }, - { - "name": "clink", - "version": "1.9.5", - "url": "https://github.com/chrisant996/clink/releases/download/v1.9.5/clink.1.9.5.ee6b4f.zip" - }, - { - "name": "conemu-maximus5", - "version": "23.07.24", - "url": "https://github.com/ConEmu/ConEmu/releases/download/v23.07.24/ConEmuPack.230724.7z" - }, - { - "name": "windows-terminal", - "version": "1.23.12811.0", - "url": "https://github.com/microsoft/terminal/releases/download/v1.23.12811.0/Microsoft.WindowsTerminal_1.23.12811.0_x64.zip" - }, - { - "name": "clink-completions", - "version": "0.6.7", - "url": "https://github.com/vladimir-kotikov/clink-completions/archive/v0.6.7.zip" - } + { + "name": "git-for-windows", + "version": "2.52.0.windows.1", + "url": "https://github.com/git-for-windows/git/releases/download/v2.52.0.windows.1/PortableGit-2.52.0-64-bit.7z.exe" + }, + { + "name": "clink", + "version": "1.9.5", + "url": "https://github.com/chrisant996/clink/releases/download/v1.9.5/clink.1.9.5.ee6b4f.zip" + }, + { + "name": "conemu-maximus5", + "version": "23.07.24", + "url": "https://github.com/ConEmu/ConEmu/releases/download/v23.07.24/ConEmuPack.230724.7z" + }, + { + "name": "windows-terminal", + "version": "1.23.12811.0", + "url": "https://github.com/microsoft/terminal/releases/download/v1.23.12811.0/Microsoft.WindowsTerminal_1.23.12811.0_x64.zip" + }, + { + "name": "clink-completions", + "version": "0.6.7", + "url": "https://github.com/vladimir-kotikov/clink-completions/archive/v0.6.7.zip" + } ] From a0aecb6b65023fca90a86aee989431281c3e2445 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sun, 22 Feb 2026 14:54:45 -0500 Subject: [PATCH 168/203] Fix CodeQL --- .github/workflows/codeql.yml | 44 ++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 16ebd4072..b153f4a34 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -50,17 +50,17 @@ jobs: - name: Summary - CodeQL analysis started shell: pwsh run: | - echo "## šŸ”’ CodeQL Security Analysis - Workflow Summary" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "### Analysis Configuration" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "| Property | Value |" >> $env:GITHUB_STEP_SUMMARY - echo "| --- | --- |" >> $env:GITHUB_STEP_SUMMARY - echo "| Repository | \`${{ github.repository }}\` |" >> $env:GITHUB_STEP_SUMMARY - echo "| Branch | \`${{ github.ref_name }}\` |" >> $env:GITHUB_STEP_SUMMARY - echo "| Language | \`${{ matrix.language }}\` |" >> $env:GITHUB_STEP_SUMMARY - echo "| Commit | \`${{ github.sha }}\` |" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY + Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '## šŸ”’ CodeQL Security Analysis - Workflow Summary' + Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '' + Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '### Analysis Configuration' + Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '' + Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '| Property | Value |' + Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '| --- | --- |' + Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value "| Repository | `${{ github.repository }}` |" + Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value "| Branch | `${{ github.ref_name }}` |" + Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value "| Language | `${{ matrix.language }}` |" + Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value "| Commit | `${{ github.sha }}` |" + Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '' # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL @@ -86,10 +86,10 @@ jobs: if: success() shell: pwsh run: | - echo "### āœ… Build Completed" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "Cmder launcher built successfully for CodeQL analysis." >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY + Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '### āœ… Build Completed' + Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '' + Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value 'Cmder launcher built successfully for CodeQL analysis.' + Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '' - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v4 @@ -100,10 +100,10 @@ jobs: if: success() shell: pwsh run: | - echo "### šŸ” CodeQL Analysis Results" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "āœ… CodeQL security analysis completed successfully." >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "**Language analyzed:** \`${{ matrix.language }}\`" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "> Check the Security tab for detailed findings and recommendations." >> $env:GITHUB_STEP_SUMMARY + Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '### šŸ” CodeQL Analysis Results' + Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '' + Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value 'āœ… CodeQL security analysis completed successfully.' + Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '' + Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value "**Language analyzed:** `${{ matrix.language }}`" + Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '' + Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '> Check the Security tab for detailed findings and recommendations.' From 9b1e7a24f7f764c20047fdcfefde089061a34692 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sun, 22 Feb 2026 15:00:15 -0500 Subject: [PATCH 169/203] Fix CodeQL --- .github/workflows/codeql.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index b153f4a34..a66665784 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -56,10 +56,10 @@ jobs: Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '' Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '| Property | Value |' Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '| --- | --- |' - Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value "| Repository | `${{ github.repository }}` |" - Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value "| Branch | `${{ github.ref_name }}` |" - Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value "| Language | `${{ matrix.language }}` |" - Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value "| Commit | `${{ github.sha }}` |" + Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '| Repository | `${{ github.repository }}` |' + Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '| Branch | `${{ github.ref_name }}` |' + Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '| Language | `${{ matrix.language }}` |' + Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '| Commit | `${{ github.sha }}` |' Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '' # Initializes the CodeQL tools for scanning. @@ -104,6 +104,6 @@ jobs: Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '' Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value 'āœ… CodeQL security analysis completed successfully.' Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '' - Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value "**Language analyzed:** `${{ matrix.language }}`" + Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '**Language analyzed:** `${{ matrix.language }}`' Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '' Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '> Check the Security tab for detailed findings and recommendations.' From 7da225a3b94c8a79664f655ba5b1dd39ffbf5f87 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sun, 22 Feb 2026 15:04:18 -0500 Subject: [PATCH 170/203] Fix CodeQl --- .github/workflows/codeql.yml | 53 +++++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 22 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index a66665784..1497bf9ac 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -50,17 +50,20 @@ jobs: - name: Summary - CodeQL analysis started shell: pwsh run: | - Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '## šŸ”’ CodeQL Security Analysis - Workflow Summary' - Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '' - Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '### Analysis Configuration' - Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '' - Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '| Property | Value |' - Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '| --- | --- |' - Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '| Repository | `${{ github.repository }}` |' - Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '| Branch | `${{ github.ref_name }}` |' - Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '| Language | `${{ matrix.language }}` |' - Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '| Commit | `${{ github.sha }}` |' - Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '' + $summary = @( + '## šŸ”’ CodeQL Security Analysis - Workflow Summary' + '' + '### Analysis Configuration' + '' + '| Property | Value |' + '| --- | --- |' + '| Repository | `${{ github.repository }}` |' + '| Branch | `${{ github.ref_name }}` |' + '| Language | `${{ matrix.language }}` |' + '| Commit | `${{ github.sha }}` |' + '' + ) + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL @@ -86,10 +89,13 @@ jobs: if: success() shell: pwsh run: | - Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '### āœ… Build Completed' - Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '' - Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value 'Cmder launcher built successfully for CodeQL analysis.' - Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '' + $summary = @( + '### āœ… Build Completed' + '' + 'Cmder launcher built successfully for CodeQL analysis.' + '' + ) + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v4 @@ -100,10 +106,13 @@ jobs: if: success() shell: pwsh run: | - Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '### šŸ” CodeQL Analysis Results' - Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '' - Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value 'āœ… CodeQL security analysis completed successfully.' - Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '' - Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '**Language analyzed:** `${{ matrix.language }}`' - Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '' - Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '> Check the Security tab for detailed findings and recommendations.' + $summary = @( + '### šŸ” CodeQL Analysis Results' + '' + 'āœ… CodeQL security analysis completed successfully.' + '' + '**Language analyzed:** `${{ matrix.language }}`' + '' + '> Check the Security tab for detailed findings and recommendations.' + ) + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY From af4b6af998de4c30085b0561b3e6e9a2ceb83b93 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sun, 22 Feb 2026 16:17:37 -0500 Subject: [PATCH 171/203] sync --- .github/workflows/branches.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/branches.yml b/.github/workflows/branches.yml index ff65db165..2fe2994a2 100644 --- a/.github/workflows/branches.yml +++ b/.github/workflows/branches.yml @@ -2,7 +2,7 @@ name: Update branches # Controls when the action will run. on: - # Triggers the workflow on push events for the development branch + # Triggers the workflow on push events for the dev branch push: branches: [ master ] @@ -11,8 +11,8 @@ on: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - # This job updates the development branch with the master branch - update-development: + # This job updates the dev branch with the master branch + update-dev: # The type of runner that the job will run on runs-on: ubuntu-latest @@ -33,19 +33,19 @@ jobs: echo "| Property | Value |" >> $GITHUB_STEP_SUMMARY echo "| --- | --- |" >> $GITHUB_STEP_SUMMARY echo "| Source Branch | \`master\` |" >> $GITHUB_STEP_SUMMARY - echo "| Target Branch | \`development\` |" >> $GITHUB_STEP_SUMMARY + echo "| Target Branch | \`dev\` |" >> $GITHUB_STEP_SUMMARY echo "| Triggered by | @${{ github.actor }} |" >> $GITHUB_STEP_SUMMARY echo "| Commit | \`${{ github.sha }}\` |" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY # Runs a single command using the runners shell - - name: Merge master into development + - name: Merge master into dev run: | git config user.name "${{ github.actor }}" git config user.email "${{ github.actor }}@users.noreply.github.com" - git checkout development + git checkout dev git merge --no-ff master - git push origin development + git push origin dev - name: Summary - Merge completed if: success() @@ -53,8 +53,8 @@ jobs: run: | echo "### āœ… Merge Successful" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY - echo "The \`master\` branch has been successfully merged into \`development\`." >> $GITHUB_STEP_SUMMARY + echo "The \`master\` branch has been successfully merged into \`dev\`." >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY echo "**Merge type:** No fast-forward merge" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY - echo "> The development branch is now synchronized with the latest changes from master." >> $GITHUB_STEP_SUMMARY + echo "> The dev branch is now synchronized with the latest changes from master." >> $GITHUB_STEP_SUMMARY From 05029b7c59e1043ba54774152c38d0ffd3efca1f Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sat, 28 Feb 2026 08:29:03 -0500 Subject: [PATCH 172/203] Fixes --- .github/workflows/vendor.yml | 47 ++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/.github/workflows/vendor.yml b/.github/workflows/vendor.yml index eb322cd2c..86cd7284a 100644 --- a/.github/workflows/vendor.yml +++ b/.github/workflows/vendor.yml @@ -46,7 +46,11 @@ jobs: run: | $currentVersion = (Get-Content .\vendor\sources.json | ConvertFrom-Json) . .\scripts\update.ps1 -verbose - Set-GHVariable -Name COUNT_UPDATED -Value $count + + # Export count of updated packages (update.ps1 is expected to set $count) + if (-not ($count)) { $count = 0 } + Add-Content -Path $env:GITHUB_ENV -Value ("COUNT_UPDATED=$count") + $newVersion = (Get-Content .\vendor\sources.json | ConvertFrom-Json) $listUpdated = "" $updateMessage = "| Name | Old Version | New Version |`n| :--- | :---: | :---: |`n" @@ -59,31 +63,24 @@ jobs: if ($s.version -ne $oldVersion) { $repoUrl = ($repoUrl = $s.Url.Replace("/archive/", "/releases/")).Substring(0, $repoUrl.IndexOf("/releases/")) + "/releases" - # Store single dependency info for messages (only if this is the only update) if ($count -eq 1) { $singleDepName = $s.name $singleDepOldVersion = $oldVersion $singleDepNewVersion = $s.version } - # Determine change type and emoji $changeType = "unknown" $emoji = "šŸ”„" $isMajor = $false try { - # Handle versions with more than 4 parts $oldVerStr = $oldVersion.Split('-')[0] $newVerStr = $s.version.Split('-')[0] - - # Split by dots and take only numeric parts, first 4 max $oldParts = $oldVerStr.Split('.') | Where-Object { $_ -match '^\d+$' } | Select-Object -First 4 $newParts = $newVerStr.Split('.') | Where-Object { $_ -match '^\d+$' } | Select-Object -First 4 - # Ensure we have at least 2 parts (major.minor) if ($oldParts.Count -ge 2 -and $newParts.Count -ge 2) { $oldVerParseable = $oldParts -join '.' $newVerParseable = $newParts -join '.' - $oldVer = [System.Version]::Parse($oldVerParseable) $newVer = [System.Version]::Parse($newVerParseable) @@ -104,7 +101,6 @@ jobs: $emoji = "šŸ”„" } - # Track major updates for changelog section if ($isMajor) { $compareUrl = "$repoUrl/compare/v$oldVersion...v$($s.version)" $majorUpdates += @{ @@ -120,28 +116,32 @@ jobs: $updateMessage += "| $emoji **[$($s.name)]($repoUrl)** | \`$oldVersion\` | **\`$($s.version)\`** |`n" } } + if ($count -eq 0) { return } - Set-GHVariable -Name LIST_UPDATED -Value $listUpdated.Trim(', ') - # Set single dependency variables (they will only be used if COUNT_UPDATED is 1) - # Use safe fallback values in case variables weren't set (shouldn't happen but prevents errors) + + Add-Content -Path $env:GITHUB_ENV -Value ("LIST_UPDATED=" + $listUpdated.Trim(', ')) + if ([string]::IsNullOrEmpty($singleDepName) -and $count -eq 1) { - # This shouldn't happen, but if it does, log a warning Write-Warning "Single dependency name not set despite count being 1" $singleDepName = "unknown-package" $singleDepOldVersion = "unknown" $singleDepNewVersion = "unknown" } elseif ([string]::IsNullOrEmpty($singleDepName)) { - # For multiple dependencies, set placeholder values (won't be used) $singleDepName = "" $singleDepOldVersion = "" $singleDepNewVersion = "" } - Set-GHVariable -Name SINGLE_DEP_NAME -Value $singleDepName - Set-GHVariable -Name SINGLE_DEP_OLD_VERSION -Value $singleDepOldVersion - Set-GHVariable -Name SINGLE_DEP_NEW_VERSION -Value $singleDepNewVersion - echo "UPDATE_MESSAGE<< Date: Sat, 28 Feb 2026 13:30:09 +0000 Subject: [PATCH 173/203] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20Update=20dependenc?= =?UTF-8?q?ies=20(git-for-windows=20v2.53.0.windows.1,=20clink=20v1.9.17)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vendor/sources.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vendor/sources.json b/vendor/sources.json index e6426d9a5..6f06085d0 100644 --- a/vendor/sources.json +++ b/vendor/sources.json @@ -1,13 +1,13 @@ [ { "name": "git-for-windows", - "version": "2.52.0.windows.1", - "url": "https://github.com/git-for-windows/git/releases/download/v2.52.0.windows.1/PortableGit-2.52.0-64-bit.7z.exe" + "version": "2.53.0.windows.1", + "url": "https://github.com/git-for-windows/git/releases/download/v2.53.0.windows.1/PortableGit-2.53.0-64-bit.7z.exe" }, { "name": "clink", - "version": "1.9.15", - "url": "https://github.com/chrisant996/clink/releases/download/v1.9.15/clink.1.9.15.41e80a.zip" + "version": "1.9.17", + "url": "https://github.com/chrisant996/clink/releases/download/v1.9.17/clink.1.9.17.36e2ca.zip" }, { "name": "conemu-maximus5", From 832e8a964626436124e06891921873c19ff1e08e Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sat, 28 Feb 2026 08:41:19 -0500 Subject: [PATCH 174/203] comments --- .github/workflows/vendor.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/vendor.yml b/.github/workflows/vendor.yml index 86cd7284a..6575bda6e 100644 --- a/.github/workflows/vendor.yml +++ b/.github/workflows/vendor.yml @@ -37,6 +37,7 @@ jobs: 'šŸ” Checking for vendor dependency updates...' '' ) + $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - id: make-changes @@ -63,24 +64,31 @@ jobs: if ($s.version -ne $oldVersion) { $repoUrl = ($repoUrl = $s.Url.Replace("/archive/", "/releases/")).Substring(0, $repoUrl.IndexOf("/releases/")) + "/releases" + # Store single dependency info for messages (only if this is the only update) if ($count -eq 1) { $singleDepName = $s.name $singleDepOldVersion = $oldVersion $singleDepNewVersion = $s.version } + # Determine change type and emoji $changeType = "unknown" $emoji = "šŸ”„" $isMajor = $false try { + # Handle versions with more than 4 parts $oldVerStr = $oldVersion.Split('-')[0] $newVerStr = $s.version.Split('-')[0] + + # Split by dots and take only numeric parts, first 4 max $oldParts = $oldVerStr.Split('.') | Where-Object { $_ -match '^\d+$' } | Select-Object -First 4 $newParts = $newVerStr.Split('.') | Where-Object { $_ -match '^\d+$' } | Select-Object -First 4 + # Ensure we have at least 2 parts (major.minor) if ($oldParts.Count -ge 2 -and $newParts.Count -ge 2) { $oldVerParseable = $oldParts -join '.' $newVerParseable = $newParts -join '.' + $oldVer = [System.Version]::Parse($oldVerParseable) $newVer = [System.Version]::Parse($newVerParseable) @@ -101,6 +109,7 @@ jobs: $emoji = "šŸ”„" } + # Track major updates for changelog section if ($isMajor) { $compareUrl = "$repoUrl/compare/v$oldVersion...v$($s.version)" $majorUpdates += @{ @@ -120,13 +129,16 @@ jobs: if ($count -eq 0) { return } Add-Content -Path $env:GITHUB_ENV -Value ("LIST_UPDATED=" + $listUpdated.Trim(', ')) - + # Set single dependency variables (they will only be used if COUNT_UPDATED is 1) + # Use safe fallback values in case variables weren't set (shouldn't happen but prevents errors) if ([string]::IsNullOrEmpty($singleDepName) -and $count -eq 1) { + # This shouldn't happen, but if it does, log a warning Write-Warning "Single dependency name not set despite count being 1" $singleDepName = "unknown-package" $singleDepOldVersion = "unknown" $singleDepNewVersion = "unknown" } elseif ([string]::IsNullOrEmpty($singleDepName)) { + # For multiple dependencies, set placeholder values (won't be used) $singleDepName = "" $singleDepOldVersion = "" $singleDepNewVersion = "" From bef9365c2f88b8fb47c087732b065e5a8dbcf56d Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sat, 28 Feb 2026 08:50:58 -0500 Subject: [PATCH 175/203] use set-ghvariable --- .github/workflows/vendor.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/vendor.yml b/.github/workflows/vendor.yml index 6575bda6e..31b43f856 100644 --- a/.github/workflows/vendor.yml +++ b/.github/workflows/vendor.yml @@ -50,7 +50,7 @@ jobs: # Export count of updated packages (update.ps1 is expected to set $count) if (-not ($count)) { $count = 0 } - Add-Content -Path $env:GITHUB_ENV -Value ("COUNT_UPDATED=$count") + Set-GHVariable -Name COUNT_UPDATED -Value $count $newVersion = (Get-Content .\vendor\sources.json | ConvertFrom-Json) $listUpdated = "" @@ -128,7 +128,7 @@ jobs: if ($count -eq 0) { return } - Add-Content -Path $env:GITHUB_ENV -Value ("LIST_UPDATED=" + $listUpdated.Trim(', ')) + Set-GHVariable -Name LIST_UPDATED -Value $listUpdated.Trim(', ') # Set single dependency variables (they will only be used if COUNT_UPDATED is 1) # Use safe fallback values in case variables weren't set (shouldn't happen but prevents errors) if ([string]::IsNullOrEmpty($singleDepName) -and $count -eq 1) { @@ -144,9 +144,9 @@ jobs: $singleDepNewVersion = "" } - Add-Content -Path $env:GITHUB_ENV -Value ("SINGLE_DEP_NAME=" + $singleDepName) - Add-Content -Path $env:GITHUB_ENV -Value ("SINGLE_DEP_OLD_VERSION=" + $singleDepOldVersion) - Add-Content -Path $env:GITHUB_ENV -Value ("SINGLE_DEP_NEW_VERSION=" + $singleDepNewVersion) + Set-GHVariable -Name SINGLE_DEP_NAME -Value $singleDepName + Set-GHVariable -Name SINGLE_DEP_OLD_VERSION -Value $singleDepOldVersion + Set-GHVariable -Name SINGLE_DEP_NEW_VERSION -Value $singleDepNewVersion # Write multiline UPDATE_MESSAGE to GITHUB_ENV Add-Content -Path $env:GITHUB_ENV -Value "UPDATE_MESSAGE< Date: Mon, 2 Mar 2026 17:43:22 +0000 Subject: [PATCH 176/203] Bump actions/upload-artifact from 6 to 7 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 6 to 7. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v6...v7) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 37b7b8ad0..9f0abe347 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -97,26 +97,26 @@ jobs: echo "" >> $env:GITHUB_STEP_SUMMARY - name: Upload artifact (cmder.zip) - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: path: build/cmder.zip name: cmder.zip if-no-files-found: error - name: Upload artifact (cmder.7z) - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: path: build/cmder.7z name: cmder.7z - name: Upload artifact (cmder_mini.zip) - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: path: build/cmder_mini.zip name: cmder_mini.zip - name: Upload artifact (hashes.txt) - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: path: build/hashes.txt name: hashes.txt From ed5ebfe5ba3ef8784a8ada6a82c8491645bc2a68 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Mar 2026 16:19:05 +0000 Subject: [PATCH 177/203] Bump microsoft/setup-msbuild from 2 to 3 Bumps [microsoft/setup-msbuild](https://github.com/microsoft/setup-msbuild) from 2 to 3. - [Release notes](https://github.com/microsoft/setup-msbuild/releases) - [Commits](https://github.com/microsoft/setup-msbuild/compare/v2...v3) --- updated-dependencies: - dependency-name: microsoft/setup-msbuild dependency-version: '3' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/build.yml | 2 +- .github/workflows/codeql.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 37b7b8ad0..4c94d6a06 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -55,7 +55,7 @@ jobs: echo "" >> $env:GITHUB_STEP_SUMMARY - name: Add MSBuild to PATH - uses: microsoft/setup-msbuild@v2 + uses: microsoft/setup-msbuild@v3 - name: Build Cmder Launcher shell: pwsh diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 1497bf9ac..fb1d49e8b 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -78,7 +78,7 @@ jobs: # queries: security-extended,security-and-quality - name: Add MSBuild to PATH - uses: microsoft/setup-msbuild@v2 + uses: microsoft/setup-msbuild@v3 - name: Build Cmder Launcher shell: pwsh From 07a2c6e5cddad8718fc51530f2e28fd67c08fdca Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 11 Apr 2026 20:17:05 +0000 Subject: [PATCH 178/203] fix: correct checkout to v4 and add archive: false to fix double-zip - actions/checkout@v6 does not exist; correct to @v4 - Add archive: false to all actions/upload-artifact@v7 steps so .zip and .7z files are uploaded directly without being wrapped in an extra zip container (fixes the double-zip problem described in #2725 and #2805) Agent-Logs-Url: https://github.com/cmderdev/cmder/sessions/1d806690-a6f7-49d1-bef5-cefe50fc371e Co-authored-by: DRSDavidSoft <4673812+DRSDavidSoft@users.noreply.github.com> --- .github/workflows/build.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ea7d2bac7..d2164f88b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,7 +35,7 @@ jobs: discussions: write steps: - name: Check out repository code (Action from GitHub) - uses: actions/checkout@v6 + uses: actions/checkout@v4 with: fetch-depth: 0 @@ -101,6 +101,7 @@ jobs: with: path: build/cmder.zip name: cmder.zip + archive: false if-no-files-found: error - name: Upload artifact (cmder.7z) @@ -108,18 +109,21 @@ jobs: with: path: build/cmder.7z name: cmder.7z + archive: false - name: Upload artifact (cmder_mini.zip) uses: actions/upload-artifact@v7 with: path: build/cmder_mini.zip name: cmder_mini.zip + archive: false - name: Upload artifact (hashes.txt) uses: actions/upload-artifact@v7 with: path: build/hashes.txt name: hashes.txt + archive: false - name: Summary - Artifacts uploaded if: success() From 35c1cd6f42da0cbd616f54b5658d202aaa17f26a Mon Sep 17 00:00:00 2001 From: David Refoua Date: Sun, 12 Apr 2026 00:04:19 +0330 Subject: [PATCH 179/203] Revert GitHub Actions checkout action version to v6 (latest) --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d2164f88b..98c50c19e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,7 +35,7 @@ jobs: discussions: write steps: - name: Check out repository code (Action from GitHub) - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 From f69c1db2059cc6b8c65fd204b7670ea45c1c7dec Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 11 Apr 2026 20:52:47 +0000 Subject: [PATCH 180/203] Remove separator before artifacts, add sources.json link, and link vendor versions to releases Agent-Logs-Url: https://github.com/cmderdev/cmder/sessions/6ed72053-91c6-4e75-8317-ac54af872629 Co-authored-by: DRSDavidSoft <4673812+DRSDavidSoft@users.noreply.github.com> --- .github/workflows/build.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index df92945d3..636aa58a8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -79,7 +79,7 @@ jobs: --- - ### šŸ“ Vendor Packages + ### šŸ—ƒļø Vendor Packages ([sources.json](vendor/sources.json)) | Package | Version | | --- | --- | "@ @@ -90,7 +90,17 @@ jobs: $summary += "`n| _No vendor packages found_ | |" } else { foreach ($vendor in $vendorSources) { - $summary += "`n| ``$($vendor.name)`` | $($vendor.version) |" + # Create release link based on vendor package + $versionLink = "$($vendor.version)" + if ($vendor.url) { + # Extract owner/repo from the URL and create release link + if ($vendor.url -match 'github\.com/([^/]+)/([^/]+)') { + $owner = $Matches[1] + $repo = $Matches[2] -replace '\.git$', '' + $versionLink = "[$($vendor.version)](https://github.com/$owner/$repo/releases/tag/$($vendor.version))" + } + } + $summary += "`n| ``$($vendor.name)`` | $versionLink |" } } @@ -114,8 +124,6 @@ jobs: --- - ### Build Status - āœ… Cmder built successfully. "@ @@ -164,8 +172,6 @@ jobs: run: | $summary = @" - --- - ### šŸ—ƒļø Artifacts | Artifact | Size | Download | Hash (SHA256) | From 05b24c2173184a7e393b7220b0d5321eb1ee6583 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 11 Apr 2026 21:03:52 +0000 Subject: [PATCH 181/203] Wrap buildTime in code formatting backticks while keeping small tag Agent-Logs-Url: https://github.com/cmderdev/cmder/sessions/915ff38b-d73d-4ed8-bc2d-1fd1efa26f9b Co-authored-by: DRSDavidSoft <4673812+DRSDavidSoft@users.noreply.github.com> --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 636aa58a8..f6cb34dc0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -65,7 +65,7 @@ jobs: $summary = @" ## šŸ“¦ Build Cmder - Workflow Summary - Build started: $buildTime + Build started: ``$buildTime`` ### Repository Information | Property | Value | From 1418da1c188c8da6e19b55cda7df12f74ba9ac32 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 11 Apr 2026 21:30:51 +0000 Subject: [PATCH 182/203] Dynamically discover all build artifacts instead of hardcoding filenames Agent-Logs-Url: https://github.com/cmderdev/cmder/sessions/8667c9a1-2ae6-4286-bcf4-f58735eb094e Co-authored-by: DRSDavidSoft <4673812+DRSDavidSoft@users.noreply.github.com> --- .github/workflows/build.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f6cb34dc0..6bd4d1106 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -209,11 +209,14 @@ jobs: return $null } - $artifacts = @("cmder.zip", "cmder.7z", "cmder_mini.zip", "hashes.txt") - foreach ($artifact in $artifacts) { - $path = "build/$artifact" - if (Test-Path $path) { - $size = (Get-Item $path).Length / 1MB + # Get all files from the build directory (excluding directories and hidden files) + if (Test-Path "build") { + $buildFiles = Get-ChildItem -Path "build" -File | Where-Object { -not $_.Name.StartsWith('.') } | Sort-Object Name + + foreach ($file in $buildFiles) { + $artifact = $file.Name + $path = $file.FullName + $size = $file.Length / 1MB $hash = (Get-FileHash $path -Algorithm SHA256).Hash # Try to get the actual artifact download URL From aa801c2c17d212181b3260b5273d602e4396b3d8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 11 Apr 2026 21:35:15 +0000 Subject: [PATCH 183/203] Make artifact names clickable, use human-readable file sizes, and add rar to compression formats Agent-Logs-Url: https://github.com/cmderdev/cmder/sessions/ce43a069-b966-4141-b4e1-3d201bc3ddbf Co-authored-by: DRSDavidSoft <4673812+DRSDavidSoft@users.noreply.github.com> --- .github/workflows/build.yml | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6bd4d1106..3fed9d4a6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -174,10 +174,25 @@ jobs: ### šŸ—ƒļø Artifacts - | Artifact | Size | Download | Hash (SHA256) | - | --- | --- | --- | --- | + | Artifact | Size | Hash (SHA256) | + | --- | --- | --- | "@ + # Function to format file size in human-readable format + function Format-FileSize { + param([double]$Bytes) + + if ($Bytes -ge 1GB) { + return "{0:N2} GiB" -f ($Bytes / 1GB) + } elseif ($Bytes -ge 1MB) { + return "{0:N2} MiB" -f ($Bytes / 1MB) + } elseif ($Bytes -ge 1KB) { + return "{0:N2} KiB" -f ($Bytes / 1KB) + } else { + return "{0:N0} B" -f $Bytes + } + } + # Function to get artifact download URL with retry logic function Get-ArtifactDownloadUrl { param( @@ -216,7 +231,7 @@ jobs: foreach ($file in $buildFiles) { $artifact = $file.Name $path = $file.FullName - $size = $file.Length / 1MB + $sizeFormatted = Format-FileSize -Bytes $file.Length $hash = (Get-FileHash $path -Algorithm SHA256).Hash # Try to get the actual artifact download URL @@ -232,13 +247,13 @@ jobs: # Determine emoji based on file type if ($artifact -match '\.txt$') { $emoji = "šŸ“„" - } elseif ($artifact -match '\.(zip|7z)$') { + } elseif ($artifact -match '\.(zip|rar|7z)$') { $emoji = "šŸ—„ļø" } else { $emoji = "šŸ“¦" } - $summary += "`n| $emoji ``$artifact`` | $([math]::Round($size, 2)) MB | [šŸ“„ Download$warning]($downloadUrl) | ``$hash`` |" + $summary += "`n| $emoji [``$artifact``$warning]($downloadUrl) | $sizeFormatted | ``$hash`` |" } } $summary += "`n" From 2de93d1d55c1b5433220931277fbe6fe5e79885c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 11 Apr 2026 21:41:27 +0000 Subject: [PATCH 184/203] Move Format-FileSize and Get-ArtifactDownloadUrl functions to utils.ps1 Agent-Logs-Url: https://github.com/cmderdev/cmder/sessions/9334534b-9a07-4053-a214-f394e6e92aaa Co-authored-by: DRSDavidSoft <4673812+DRSDavidSoft@users.noreply.github.com> --- .github/workflows/build.yml | 48 +---------------- scripts/utils.ps1 | 102 ++++++++++++++++++++++++++++++++++++ 2 files changed, 103 insertions(+), 47 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3fed9d4a6..c65c157be 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -178,52 +178,6 @@ jobs: | --- | --- | --- | "@ - # Function to format file size in human-readable format - function Format-FileSize { - param([double]$Bytes) - - if ($Bytes -ge 1GB) { - return "{0:N2} GiB" -f ($Bytes / 1GB) - } elseif ($Bytes -ge 1MB) { - return "{0:N2} MiB" -f ($Bytes / 1MB) - } elseif ($Bytes -ge 1KB) { - return "{0:N2} KiB" -f ($Bytes / 1KB) - } else { - return "{0:N0} B" -f $Bytes - } - } - - # Function to get artifact download URL with retry logic - function Get-ArtifactDownloadUrl { - param( - [string]$ArtifactName, - [int]$MaxRetries = 3, - [int]$DelaySeconds = 2 - ) - - for ($i = 0; $i -lt $MaxRetries; $i++) { - try { - # Use GitHub CLI to get artifact information - $artifactsJson = gh api "repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts" --jq ".artifacts[] | select(.name == `"$ArtifactName`")" - - if ($artifactsJson) { - $artifact = $artifactsJson | ConvertFrom-Json - if ($artifact.archive_download_url) { - return $artifact.archive_download_url - } - } - } catch { - Write-Host "Attempt $($i + 1) failed to get artifact URL for $ArtifactName : $_" - } - - if ($i -lt ($MaxRetries - 1)) { - Start-Sleep -Seconds $DelaySeconds - } - } - - return $null - } - # Get all files from the build directory (excluding directories and hidden files) if (Test-Path "build") { $buildFiles = Get-ChildItem -Path "build" -File | Where-Object { -not $_.Name.StartsWith('.') } | Sort-Object Name @@ -235,7 +189,7 @@ jobs: $hash = (Get-FileHash $path -Algorithm SHA256).Hash # Try to get the actual artifact download URL - $downloadUrl = Get-ArtifactDownloadUrl -ArtifactName $artifact + $downloadUrl = Get-ArtifactDownloadUrl -ArtifactName $artifact -Repository "${{ github.repository }}" -RunId "${{ github.run_id }}" $warning = "" if (-not $downloadUrl) { diff --git a/scripts/utils.ps1 b/scripts/utils.ps1 index 58955407c..ccabce6bf 100644 --- a/scripts/utils.ps1 +++ b/scripts/utils.ps1 @@ -249,3 +249,105 @@ function Download-File { $wc.Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials; $wc.DownloadFile($Url, $File) } + +function Format-FileSize { + <# + .SYNOPSIS + Formats a file size in bytes to a human-readable string using binary units. + + .DESCRIPTION + Converts file sizes to appropriate binary units (B, KiB, MiB, GiB) for better readability. + + .PARAMETER Bytes + The file size in bytes to format. + + .EXAMPLE + Format-FileSize -Bytes 1024 + Returns "1.00 KiB" + + .EXAMPLE + Format-FileSize -Bytes 15728640 + Returns "15.00 MiB" + #> + param( + [Parameter(Mandatory = $true)] + [double]$Bytes + ) + + if ($Bytes -ge 1GB) { + return "{0:N2} GiB" -f ($Bytes / 1GB) + } elseif ($Bytes -ge 1MB) { + return "{0:N2} MiB" -f ($Bytes / 1MB) + } elseif ($Bytes -ge 1KB) { + return "{0:N2} KiB" -f ($Bytes / 1KB) + } else { + return "{0:N0} B" -f $Bytes + } +} + +function Get-ArtifactDownloadUrl { + <# + .SYNOPSIS + Retrieves the download URL for a GitHub Actions artifact with retry logic. + + .DESCRIPTION + Uses the GitHub CLI to fetch artifact information from the GitHub API with automatic retries. + Falls back to returning $null if all attempts fail. + + .PARAMETER ArtifactName + The name of the artifact to retrieve the download URL for. + + .PARAMETER Repository + The GitHub repository in the format "owner/repo". + + .PARAMETER RunId + The GitHub Actions workflow run ID. + + .PARAMETER MaxRetries + Maximum number of retry attempts. Default is 3. + + .PARAMETER DelaySeconds + Delay in seconds between retry attempts. Default is 2. + + .EXAMPLE + Get-ArtifactDownloadUrl -ArtifactName "cmder.zip" -Repository "cmderdev/cmder" -RunId "123456789" + + .EXAMPLE + Get-ArtifactDownloadUrl -ArtifactName "build-output" -Repository "owner/repo" -RunId "987654321" -MaxRetries 5 -DelaySeconds 3 + #> + param( + [Parameter(Mandatory = $true)] + [string]$ArtifactName, + + [Parameter(Mandatory = $true)] + [string]$Repository, + + [Parameter(Mandatory = $true)] + [string]$RunId, + + [int]$MaxRetries = 3, + [int]$DelaySeconds = 2 + ) + + for ($i = 0; $i -lt $MaxRetries; $i++) { + try { + # Use GitHub CLI to get artifact information + $artifactsJson = gh api "repos/$Repository/actions/runs/$RunId/artifacts" --jq ".artifacts[] | select(.name == `"$ArtifactName`")" + + if ($artifactsJson) { + $artifact = $artifactsJson | ConvertFrom-Json + if ($artifact.archive_download_url) { + return $artifact.archive_download_url + } + } + } catch { + Write-Host "Attempt $($i + 1) failed to get artifact URL for $ArtifactName : $_" + } + + if ($i -lt ($MaxRetries - 1)) { + Start-Sleep -Seconds $DelaySeconds + } + } + + return $null +} From 31e73cce5958306a1a0565eeef7f6a9ca7d1d92a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 11 Apr 2026 22:16:56 +0000 Subject: [PATCH 185/203] Fix vendor package release links and artifact download URLs Agent-Logs-Url: https://github.com/cmderdev/cmder/sessions/ff648493-d8fd-4117-9a78-2933758d2280 Co-authored-by: DRSDavidSoft <4673812+DRSDavidSoft@users.noreply.github.com> --- .github/workflows/build.yml | 10 ++++++---- scripts/utils.ps1 | 6 ++++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c65c157be..cfd1915d2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -93,11 +93,13 @@ jobs: # Create release link based on vendor package $versionLink = "$($vendor.version)" if ($vendor.url) { - # Extract owner/repo from the URL and create release link - if ($vendor.url -match 'github\.com/([^/]+)/([^/]+)') { + # Extract owner/repo/tag from the URL and create release link + # Handle both /releases/download/ and /archive/ URLs + if ($vendor.url -match 'github\.com/([^/]+)/([^/]+)/(releases/download|archive)/([^/]+)') { $owner = $Matches[1] - $repo = $Matches[2] -replace '\.git$', '' - $versionLink = "[$($vendor.version)](https://github.com/$owner/$repo/releases/tag/$($vendor.version))" + $repo = $Matches[2] + $tag = $Matches[4] + $versionLink = "[$($vendor.version)](https://github.com/$owner/$repo/releases/tag/$tag)" } } $summary += "`n| ``$($vendor.name)`` | $versionLink |" diff --git a/scripts/utils.ps1 b/scripts/utils.ps1 index ccabce6bf..f1a175221 100644 --- a/scripts/utils.ps1 +++ b/scripts/utils.ps1 @@ -336,8 +336,10 @@ function Get-ArtifactDownloadUrl { if ($artifactsJson) { $artifact = $artifactsJson | ConvertFrom-Json - if ($artifact.archive_download_url) { - return $artifact.archive_download_url + if ($artifact.id) { + # Construct browser-accessible GitHub Actions artifact download URL + # Format: https://github.com/owner/repo/actions/runs/{run_id}/artifacts/{artifact_id} + return "https://github.com/$Repository/actions/runs/$RunId/artifacts/$($artifact.id)" } } } catch { From cbc7f53cd303c4788682ce65ef15d756f8c8a2bb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 11 Apr 2026 22:27:24 +0000 Subject: [PATCH 186/203] Add workflow_dispatch to enable manual build workflow runs Agent-Logs-Url: https://github.com/cmderdev/cmder/sessions/49b3cbe7-8c16-4e18-a4c4-e0587448245e Co-authored-by: DRSDavidSoft <4673812+DRSDavidSoft@users.noreply.github.com> --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cfd1915d2..b447c899d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,6 +12,7 @@ on: - "v*" pull_request: branches: [ "master", "development" ] + workflow_dispatch: #---------------------------------# # environment configuration # From 25ea72533805ff0ce6f0de2a517f82b14af15352 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 11 Apr 2026 22:33:42 +0000 Subject: [PATCH 187/203] Fix Format-FileSize undefined error by sourcing utils.ps1 in artifacts upload step Agent-Logs-Url: https://github.com/cmderdev/cmder/sessions/bf167f7e-397b-4635-a7d2-2c2680207e67 Co-authored-by: DRSDavidSoft <4673812+DRSDavidSoft@users.noreply.github.com> --- .github/workflows/build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b447c899d..ae3d8b8a1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -173,6 +173,9 @@ jobs: env: GH_TOKEN: ${{ github.token }} run: | + # Source utility functions + . scripts/utils.ps1 + $summary = @" ### šŸ—ƒļø Artifacts From 01d01c6a57e9331150d0a01e5fc1c4e03ae19b28 Mon Sep 17 00:00:00 2001 From: David Refoua Date: Sun, 12 Apr 2026 03:42:33 +0330 Subject: [PATCH 188/203] parse entire JSON string at once Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ae3d8b8a1..2434f6c01 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -86,7 +86,7 @@ jobs: "@ # Read vendor sources.json and add to summary - $vendorSources = Get-Content "vendor/sources.json" | ConvertFrom-Json + $vendorSources = Get-Content -Raw "vendor/sources.json" | ConvertFrom-Json if ($vendorSources.Count -eq 0) { $summary += "`n| _No vendor packages found_ | |" } else { From 03deb9d859241202e1337dd19f3c51bbde0688d2 Mon Sep 17 00:00:00 2001 From: David Refoua Date: Sun, 12 Apr 2026 03:43:54 +0330 Subject: [PATCH 189/203] fix: handle links to vendor repo archive URL Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2434f6c01..47e8761c5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -99,7 +99,11 @@ jobs: if ($vendor.url -match 'github\.com/([^/]+)/([^/]+)/(releases/download|archive)/([^/]+)') { $owner = $Matches[1] $repo = $Matches[2] + $pathType = $Matches[3] $tag = $Matches[4] + if ($pathType -eq 'archive') { + $tag = $tag -replace '\.(?:tar\.gz|tgz|zip)$', '' + } $versionLink = "[$($vendor.version)](https://github.com/$owner/$repo/releases/tag/$tag)" } } From 32cf8767f5868365182ab248829610dd2c297f88 Mon Sep 17 00:00:00 2001 From: David Refoua Date: Sun, 12 Apr 2026 03:44:49 +0330 Subject: [PATCH 190/203] fix: Derive directories from the array entries Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/tests.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8a079a6ce..ef5709f2c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -79,8 +79,11 @@ jobs: # Get vendor versions from sources.json $vendorInfo = @() $sources = Get-Content "vendor\sources.json" -Raw | ConvertFrom-Json - $vendorDirs = $sources.PSObject.Properties | ForEach-Object { $_.Name } - foreach ($dir in $vendorDirs) { + foreach ($source in $sources) { + $dir = $source.name + if (-not $dir) { + continue + } $versionFile = "vendor/$dir/.cmderver" if (Test-Path $versionFile) { $version = Get-Content $versionFile -Raw From f3fa589ac379e910a8b8a55a82914867ccd9d006 Mon Sep 17 00:00:00 2001 From: David Refoua Date: Sun, 12 Apr 2026 03:45:54 +0330 Subject: [PATCH 191/203] use double-quote for "`n" Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ef5709f2c..af94d1e4f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -103,7 +103,7 @@ jobs: if ($vendorInfo.Count -eq 0) { $summary += "_No vendor version information available._" } else { - $summary += $vendorInfo -join '`n' + $summary += $vendorInfo -join "`n" } ) From dcbb0e9203af90715359d2307a0db41bbc65a4eb Mon Sep 17 00:00:00 2001 From: David Refoua Date: Sun, 12 Apr 2026 03:46:47 +0330 Subject: [PATCH 192/203] fix: Handle multi-line JSON Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/vendor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/vendor.yml b/.github/workflows/vendor.yml index 9db037805..fdfbf04fc 100644 --- a/.github/workflows/vendor.yml +++ b/.github/workflows/vendor.yml @@ -45,10 +45,10 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - $currentVersion = (Get-Content .\vendor\sources.json | ConvertFrom-Json) + $currentVersion = (Get-Content -Raw .\vendor\sources.json | ConvertFrom-Json) . .\scripts\update.ps1 -verbose Set-GHVariable -Name COUNT_UPDATED -Value $count - $newVersion = (Get-Content .\vendor\sources.json | ConvertFrom-Json) + $newVersion = (Get-Content -Raw .\vendor\sources.json | ConvertFrom-Json) $listUpdated = "" $updateMessage = "| Name | Old Version | New Version |`n| :--- | ---- | ---- |`n" foreach ($s in $newVersion) { From c882ade42d03c92ed346be40d1c6323231c6f74b Mon Sep 17 00:00:00 2001 From: David Refoua Date: Sun, 12 Apr 2026 03:47:52 +0330 Subject: [PATCH 193/203] fix multi-line EOF syntax according to GitHub Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/vendor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/vendor.yml b/.github/workflows/vendor.yml index fdfbf04fc..90810072a 100644 --- a/.github/workflows/vendor.yml +++ b/.github/workflows/vendor.yml @@ -62,7 +62,7 @@ jobs: if ($count -eq 0) { return } Set-GHVariable -Name LIST_UPDATED -Value $listUpdated.Trim(', ') - echo "UPDATE_MESSAGE<< Date: Sun, 12 Apr 2026 00:20:53 +0000 Subject: [PATCH 194/203] Fix variable name casing inconsistency in vendor.yml (Summary -> summary) Agent-Logs-Url: https://github.com/cmderdev/cmder/sessions/7c117654-3cc9-428c-846a-01931a2f9b5b Co-authored-by: DRSDavidSoft <4673812+DRSDavidSoft@users.noreply.github.com> --- .github/workflows/vendor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/vendor.yml b/.github/workflows/vendor.yml index 90810072a..947a04686 100644 --- a/.github/workflows/vendor.yml +++ b/.github/workflows/vendor.yml @@ -105,7 +105,7 @@ jobs: if: env.COUNT_UPDATED > 0 shell: pwsh run: | - $Summary = @" + $summary = @" ### šŸŽ‰ Pull Request Created A pull request has been created to update the vendor dependencies. From 0983e9b763e9129ccecc9b177d88bffdf5d1a648 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 12 Apr 2026 00:24:53 +0000 Subject: [PATCH 195/203] Add duration tracking to test results and change hashes.txt separator to tab Agent-Logs-Url: https://github.com/cmderdev/cmder/sessions/48204621-5da0-4649-9715-ac9df45f1153 Co-authored-by: DRSDavidSoft <4673812+DRSDavidSoft@users.noreply.github.com> --- .github/workflows/tests.yml | 36 +++++++++++++++++++++++++++++++++--- scripts/pack.ps1 | 2 +- 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index af94d1e4f..2e14fe4ee 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -124,34 +124,64 @@ jobs: - name: Testing Clink Shell id: test-clink + shell: pwsh run: | + $startTime = Get-Date cmd /c vendor\init.bat /v /d /t + $duration = [math]::Round(((Get-Date) - $startTime).TotalSeconds, 2) + echo "duration=$duration" >> $env:GITHUB_OUTPUT - name: Summary - Clink Shell test if: success() shell: pwsh run: | - "| Clink Shell | āœ… Passed | Cmd shell initialization |" | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 + $duration = "${{ steps.test-clink.outputs.duration }}" + if ($duration) { + $duration = "$duration s" + } else { + $duration = "N/A" + } + "| Clink Shell | āœ… Passed | $duration |" | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Testing PowerShell id: test-powershell + shell: pwsh run: | + $startTime = Get-Date PowerShell.exe -ExecutionPolicy Bypass -NoLogo -NoProfile -Command "$env:CMDER_DEBUG='1'; . 'vendor\profile.ps1'" + $duration = [math]::Round(((Get-Date) - $startTime).TotalSeconds, 2) + echo "duration=$duration" >> $env:GITHUB_OUTPUT - name: Summary - PowerShell test if: success() shell: pwsh run: | - "| PowerShell | āœ… Passed | Profile script execution |" | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 + $duration = "${{ steps.test-powershell.outputs.duration }}" + if ($duration) { + $duration = "$duration s" + } else { + $duration = "N/A" + } + "| PowerShell | āœ… Passed | $duration |" | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Testing Bash id: test-bash + shell: pwsh run: | + $startTime = Get-Date bash vendor/cmder.sh + $duration = [math]::Round(((Get-Date) - $startTime).TotalSeconds, 2) + echo "duration=$duration" >> $env:GITHUB_OUTPUT - name: Summary - Bash test if: success() shell: pwsh run: | - "| Bash | āœ… Passed | Bash environment initialization |" | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 + $duration = "${{ steps.test-bash.outputs.duration }}" + if ($duration) { + $duration = "$duration s" + } else { + $duration = "N/A" + } + "| Bash | āœ… Passed | $duration |" | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Summary - All tests completed if: success() diff --git a/scripts/pack.ps1 b/scripts/pack.ps1 index 8dccc5eb1..da6fc6e0d 100644 --- a/scripts/pack.ps1 +++ b/scripts/pack.ps1 @@ -70,7 +70,7 @@ if ($PSCmdlet.MyInvocation.BoundParameters["Verbose"].IsPresent) { foreach ($t in $targets.GetEnumerator()) { Create-Archive "$cmderRoot" "$saveTo\$($t.Name)" $t.Value $hash = (Digest-Hash "$saveTo\$($t.Name)") - Add-Content -path "$saveTo\hashes.txt" -value ($t.Name + ' ' + $hash) + Add-Content -path "$saveTo\hashes.txt" -value ($t.Name + "`t" + $hash) } Pop-Location From 55251f7cc3593815dc2f5eba9fd86b7b03ae39de Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 12 Apr 2026 00:29:30 +0000 Subject: [PATCH 196/203] Show actual branch name and separate PR row in repository information Agent-Logs-Url: https://github.com/cmderdev/cmder/sessions/7ac9b75c-de48-4c0b-98db-108cc3423c0e Co-authored-by: DRSDavidSoft <4673812+DRSDavidSoft@users.noreply.github.com> --- .github/workflows/build.yml | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 47e8761c5..57feccffd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -48,19 +48,35 @@ jobs: $cmderVersion = Get-VersionStr $buildTime = (Get-Date).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ") - # Determine branch link (handle PR merge refs) - $branchName = "${{ github.ref_name }}" + # Determine branch and PR information + $refName = "${{ github.ref_name }}" + $headRef = "${{ github.head_ref }}" + $eventName = "${{ github.event_name }}" + $prNumber = $null + $actualBranchName = $refName $branchLink = "" - if ($branchName -match '^(\d+)/(merge|head)$') { - # This is a PR merge/head ref, link to the PR + $prLink = "" + + # Check if this is a PR merge ref (e.g., "3061/merge") + if ($refName -match '^(\d+)/(merge|head)$') { $prNumber = $Matches[1] - $branchLink = "https://github.com/${{ github.repository }}/pull/$prNumber" - } elseif ("${{ github.event_name }}" -eq "pull_request") { - # This is a pull request event, link to the PR - $branchLink = "https://github.com/${{ github.repository }}/pull/${{ github.event.pull_request.number }}" + # Use head_ref for the actual branch name if available + if ($headRef) { + $actualBranchName = $headRef + } + $branchLink = "https://github.com/${{ github.repository }}/tree/$actualBranchName" + $prLink = "https://github.com/${{ github.repository }}/pull/$prNumber" + } elseif ($eventName -eq "pull_request") { + # This is a pull request event + $prNumber = "${{ github.event.pull_request.number }}" + if ($headRef) { + $actualBranchName = $headRef + } + $branchLink = "https://github.com/${{ github.repository }}/tree/$actualBranchName" + $prLink = "https://github.com/${{ github.repository }}/pull/$prNumber" } else { # Regular branch, link to the branch tree - $branchLink = "https://github.com/${{ github.repository }}/tree/${{ github.ref_name }}" + $branchLink = "https://github.com/${{ github.repository }}/tree/$refName" } $summary = @" @@ -72,7 +88,8 @@ jobs: | Property | Value | | --- | --- | | Repository | [``${{ github.repository }}``](https://github.com/${{ github.repository }}) | - | Branch | [``$branchName``]($branchLink) | + | Branch | [``$actualBranchName``]($branchLink) | + $(if ($prNumber) { "| Pull Request | [#$prNumber]($prLink) |" }) | Commit | [``${{ github.sha }}``](https://github.com/${{ github.repository }}/commit/${{ github.sha }}) | | Actor | [@${{ github.actor }}](https://github.com/${{ github.actor }}) | | Workflow | ``${{ github.workflow }}`` | From 75cd20b7ff79ba3b77bc58b895c248278b6cd979 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 12 Apr 2026 00:43:41 +0000 Subject: [PATCH 197/203] Bump peter-evans/create-pull-request from 7 to 8 Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 7 to 8. - [Release notes](https://github.com/peter-evans/create-pull-request/releases) - [Commits](https://github.com/peter-evans/create-pull-request/compare/v7...v8) --- updated-dependencies: - dependency-name: peter-evans/create-pull-request dependency-version: '8' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/vendor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/vendor.yml b/.github/workflows/vendor.yml index 947a04686..b464a5370 100644 --- a/.github/workflows/vendor.yml +++ b/.github/workflows/vendor.yml @@ -88,7 +88,7 @@ jobs: $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - - uses: peter-evans/create-pull-request@v7 + - uses: peter-evans/create-pull-request@v8 if: env.COUNT_UPDATED > 0 with: title: 'Updates to `${{ env.COUNT_UPDATED }}` vendored dependencies' From ddaa2f1c4e995f2730111571a24072e6396b14dd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Apr 2026 17:07:56 +0000 Subject: [PATCH 198/203] Bump softprops/action-gh-release from 2 to 3 Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2 to 3. - [Release notes](https://github.com/softprops/action-gh-release/releases) - [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md) - [Commits](https://github.com/softprops/action-gh-release/compare/v2...v3) --- updated-dependencies: - dependency-name: softprops/action-gh-release dependency-version: '3' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 57feccffd..cc502aa6b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -242,7 +242,7 @@ jobs: $summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8 - name: Create Release - uses: softprops/action-gh-release@v2 + uses: softprops/action-gh-release@v3 with: files: | build/cmder.zip From d842064622402ec6d92259fd0e8c776d2419a502 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Wed, 22 Apr 2026 11:45:55 -0400 Subject: [PATCH 199/203] update Git --- scripts/install_pacman.sh | 21 +++++++++++++-------- vendor/sources.json | 12 ++++++------ 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/scripts/install_pacman.sh b/scripts/install_pacman.sh index dd725ca4a..fa9c1f079 100644 --- a/scripts/install_pacman.sh +++ b/scripts/install_pacman.sh @@ -12,11 +12,10 @@ # Make sure to back up any important data before proceeding. # # Always review and understand scripts from external sources prior to execution. - export bin_source=${1:-https://github.com/daxgames/pacman-for-git/raw/refs/heads/main} -export HOME=$(cygpath -u "$USERPROFILE") echo "Using binary source: $bin_source" echo "Using HOME directory: $HOME" +read -rp "Press [Enter] to continue..." if [[ "$HOSTTYPE" == "i686" ]]; then pacman=( @@ -25,8 +24,8 @@ if [[ "$HOSTTYPE" == "i686" ]]; then msys2-keyring-1~20210213-2-any.pkg.tar.zst ) - zstd=zstd-1.5.0-1-i686.pkg.tar.xz - zstd_win=https://github.com/facebook/zstd/releases/download/v1.5.5/zstd-v1.5.5-win32.zip + zstd=zstd-1.5.0-1-i686.pkg.tar.xz + zstd_win=https://github.com/facebook/zstd/releases/download/v1.5.5/zstd-v1.5.5-win32.zip else pacman=( pacman-6.0.1-18-x86_64.pkg.tar.zst @@ -42,6 +41,7 @@ echo =-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- echo Downloading pacman files... echo =-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- for f in "${pacman[@]}"; do + [[ -f "$HOME/Downloads/$f" ]] && continue echo "Running: curl -sLkf -o \"$HOME/Downloads/$f\" \"${bin_source}/$f\"" curl -sLkf -o "$HOME/Downloads/$f" "${bin_source}/$f" || exit 1 done @@ -50,10 +50,15 @@ echo -e "\n=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- echo =-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- echo Downloading zstd binaries... echo =-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -echo "Running: curl -sLkf -o \"$HOME/Downloads/$zstd\" \"${bin_source}/$zstd\"" -curl -sLkf -o "$HOME/Downloads/$zstd" "${bin_source}/$zstd" || exit 1 -echo "Running: curl -sLkf -o \"$HOME/Downloads/$(basename \"${zstd_win}\")\" \"$zstd_win\"" -curl -sLkf -o "$HOME/Downloads/$(basename "${zstd_win}")" "$zstd_win" || exit 1 +if [[ ! -f "$HOME/Downloads/$zstd" ]] ; then + echo "Running: curl -sLkf -o \"$HOME/Downloads/$zstd\" \"${bin_source}/$zstd\"" + curl -sLkf -o "$HOME/Downloads/$zstd" "${bin_source}/$zstd" || exit 1 +fi + +if [[ ! -f "$HOME/Downloads/$(basename${zstd_win})" ]] ; then + echo "Running: curl -sLkf -o \"$HOME/Downloads/$(basename \"${zstd_win}\")\" \"$zstd_win\"" + curl -sLkf -o "$HOME/Downloads/$(basename "${zstd_win}")" "$zstd_win" || exit 1 +fi echo -e "\n=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n" echo =-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- diff --git a/vendor/sources.json b/vendor/sources.json index df1ae3e5f..3f6118fc1 100644 --- a/vendor/sources.json +++ b/vendor/sources.json @@ -1,13 +1,13 @@ [ { "name": "git-for-windows", - "version": "2.52.0.windows.1", - "url": "https://github.com/git-for-windows/git/releases/download/v2.52.0.windows.1/PortableGit-2.52.0-64-bit.7z.exe" + "version": "2.54.0.windows.1", + "url": "https://github.com/git-for-windows/git/releases/download/v2.54.0.windows.1/PortableGit-2.54.0-64-bit.7z.exe" }, { "name": "clink", - "version": "1.9.5", - "url": "https://github.com/chrisant996/clink/releases/download/v1.9.5/clink.1.9.5.ee6b4f.zip" + "version": "1.9.17", + "url": "https://github.com/chrisant996/clink/releases/download/v1.9.17/clink.1.9.17.36e2ca.zip" }, { "name": "conemu-maximus5", @@ -16,8 +16,8 @@ }, { "name": "windows-terminal", - "version": "1.23.12811.0", - "url": "https://github.com/microsoft/terminal/releases/download/v1.23.12811.0/Microsoft.WindowsTerminal_1.23.12811.0_x64.zip" + "version": "1.23.20211.0", + "url": "https://github.com/microsoft/terminal/releases/download/v1.23.20211.0/Microsoft.WindowsTerminal_1.23.20211.0_x64.zip" }, { "name": "clink-completions", From 4b80f517d0a393c6288f406544e6eedf8d39e074 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sat, 9 May 2026 09:47:11 -0400 Subject: [PATCH 200/203] Update help Co-authored-by: Copilot --- scripts/build.ps1 | 79 ++++++++++++++++++++++++++++++++++++++++++++--- scripts/pack.ps1 | 54 +++++++++++++++++++++++++++----- 2 files changed, 122 insertions(+), 11 deletions(-) diff --git a/scripts/build.ps1 b/scripts/build.ps1 index 9a0be078a..d80fe03a6 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -8,6 +8,47 @@ You will need to make this script executable by setting your Powershell Execution Policy to Remote signed Then unblock the script for execution with UnblockFile .\build.ps1 +.PARAMETER sourcesPath + Path to the vendor sources JSON file. Defaults to vendor/sources.json. + + Use this to point to a custom package manifest. +.PARAMETER saveTo + Destination directory for downloaded and extracted vendor dependencies. + + Defaults to the repository vendor directory. +.PARAMETER launcher + Path to the launcher project directory used when -Compile is set. + + Defaults to the repository launcher directory. +.PARAMETER config + Path to the configuration directory used to back up and restore user-modified + terminal settings during vendor refresh. + + Defaults to the repository config directory. +.PARAMETER noVendor + Skip downloading and extracting all vendors. + + Useful with -Compile when only rebuilding the launcher. +.PARAMETER terminal + Select which terminal packages to include from sources: + - all: include all supported terminal packages (default) + - none: skip terminal vendor downloads + - conemu-maximus5: include only ConEmu package + - windows-terminal: include only Windows Terminal package +.PARAMETER Compile + Build the launcher executable using MSBuild. + + Requires Visual C++ build tools and msbuild in PATH. +.PARAMETER InstallPacman + Install pacman in the bundled Git for Windows environment if it is not present. +.PARAMETER Verbose + Built-in common parameter from CmdletBinding. + + Prints detailed progress output for troubleshooting. +.PARAMETER WhatIf + Built-in common parameter from CmdletBinding (SupportsShouldProcess). + + Does a dry-run of the build process, showing what actions would be taken without making changes. .EXAMPLE .\build.ps1 @@ -21,20 +62,41 @@ Skip all downloads and only build launcher. .EXAMPLE - .\build -verbose + .\build.ps1 -Verbose Execute the build and see what's going on. .EXAMPLE - .\build.ps1 -SourcesPath '~/custom/vendors.json' + .\build.ps1 -SourcesPath 'C:\custom\sources.json' Build Cmder with your own packages. See vendor/sources.json for the syntax you need to copy. +.EXAMPLE + .\build.ps1 -Terminal conemu-maximus5 + + Build Cmder including only ConEmu (skips Windows Terminal). +.EXAMPLE + .\build.ps1 -Terminal windows-terminal + + Build Cmder including only Windows Terminal (skips ConEmu). +.EXAMPLE + .\build.ps1 -Terminal none -Compile + + Build launcher only and skip all terminal vendor downloads. +.EXAMPLE + .\build.ps1 -InstallPacman + + Build vendors and install pacman into the bundled Git for Windows environment if missing. +.EXAMPLE + .\build.ps1 -WhatIf + + Shows what actions would be taken without applying changes. .NOTES AUTHORS - Samuel Vasko, Jack Bennett + Samuel Vasko, Jack Bennett, Dax Games Part of the Cmder project. .LINK http://cmder.app/ - Project Home #> + [CmdletBinding(SupportsShouldProcess = $true)] Param( # CmdletBinding will give us; @@ -202,10 +264,19 @@ if (-not $noVendor) { Copy-Item $($saveTo + "git-prompt.sh") $($saveTo + "git-for-windows/etc/profile.d/git-prompt.sh") } - if ( $InstallPacman -and !(Test-Path $($saveTo + "git-for-windows/usr/bin/pacman.exe") ) ) { + $gitForWindowsPath = $saveTo + "git-for-windows" + $pacmanPath = $saveTo + "git-for-windows/usr/bin/pacman.exe" + + $shouldInstallPacman = + $InstallPacman -and + (Test-Path $gitForWindowsPath) -and + -not (Test-Path $pacmanPath) + + if ($shouldInstallPacman) { Write-Verbose "Installing pacman..." & $($saveTo + "git-for-windows/bin/bash.exe") $($saveTo + "../scripts/install_pacman.sh") } + Pop-Location } diff --git a/scripts/pack.ps1 b/scripts/pack.ps1 index 00e862592..6147695ba 100644 --- a/scripts/pack.ps1 +++ b/scripts/pack.ps1 @@ -6,14 +6,60 @@ You will need to make this script executable by setting your Powershell Execution Policy to Remote signed Then unblock the script for execution with UnblockFile .\pack.ps1 +.PARAMETER cmderRoot + Path to the Cmder repository root that should be packaged. + + Defaults to the parent directory of this script. +.PARAMETER terminal + Select which terminal package set is included in generated archives: + - all: create all archive variants (default) + - none: exclude both ConEmu and Windows Terminal packages + - conemu-maximus5: include only ConEmu package + - windows-terminal: include only Windows Terminal package +.PARAMETER saveTo + Output directory where archives and hashes.txt are written. + + Defaults to the repository build directory. +.PARAMETER Verbose + Built-in common parameter from CmdletBinding. + + Prints detailed packaging progress and included files. +.PARAMETER WhatIf + Built-in common parameter from CmdletBinding (SupportsShouldProcess). + + Shows what actions would run without making changes. .EXAMPLE .\pack.ps1 Creates default archives for Cmder .EXAMPLE - .\pack.ps1 -verbose + .\pack.ps1 -Verbose Creates default archives for Cmder with plenty of information +.EXAMPLE + .\pack.ps1 -Terminal none + + Create archives without bundled terminal emulator packages. +.EXAMPLE + .\pack.ps1 -Terminal conemu-maximus5 + + Create archives that include ConEmu and exclude Windows Terminal. +.EXAMPLE + .\pack.ps1 -Terminal windows-terminal + + Create archives that include Windows Terminal and exclude ConEmu. +.EXAMPLE + .\pack.ps1 -SaveTo 'C:\temp\cmder-artifacts' + + Write release archives and hashes.txt to a custom output directory. +.EXAMPLE + .\pack.ps1 -CmderRoot 'C:\src\cmder' + + Package a Cmder checkout from a custom repository path. +.EXAMPLE + .\pack.ps1 -WhatIf + + Preview packaging actions without creating or deleting files. .NOTES AUTHORS Samuel Vasko, Jack Bennett, Martin Kemp @@ -56,12 +102,6 @@ if ($terminal -eq "none") { "cmder_wt.zip" = "-mm=Deflate -mfb=128 -mpass=3 -xr!`"vendor\conemu-maximus5`""; "cmder_wt_mini.zip" = "-xr!`"vendor\git-for-windows`" -xr!`"vendor\conemu-maximus5`""; } -} elseif ($terminal -eq "windows-terminal") { - $targets = @{ - "cmder.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on -xr!`"vendor\windows-terminal`""; - "cmder.zip" = "-mm=Deflate -mfb=128 -mpass=3 -xr!`"vendor\windows-terminal`""; - "cmder_mini.zip" = "-xr!`"vendor\git-for-windows`" -xr!`"vendor\windows-terminal`""; - } } else { $targets = @{ "cmder_win.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on -xr!`"vendor\conemu-maximus5`" -xr!`"vendor\windows-terminal`""; From b03052a4324977d110579e505f7189aad532a941 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sat, 9 May 2026 09:51:52 -0400 Subject: [PATCH 201/203] include pacman in archives --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 37f533274..d1d03fd65 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -60,7 +60,7 @@ jobs: - name: Build Cmder Launcher shell: pwsh working-directory: scripts - run: .\build.ps1 -Compile -verbose -terminal all + run: .\build.ps1 -Compile -verbose -terminal -all -installPacman - name: Summary - Build completed if: success() From 1551f4e0f1738cd3172ca0a80086a2275f9578dc Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sat, 9 May 2026 09:58:35 -0400 Subject: [PATCH 202/203] Build on commit or PR to main --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d1d03fd65..10827b958 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,11 +7,11 @@ name: Build Cmder # Controls when the action will run. Triggers the workflow on push or pull request events but only for the main branch on: push: - branches: [ "master" ] + branches: [ "master", "main" ] tags: - "v*" pull_request: - branches: [ "master", "development" ] + branches: [ "master", "main", "development" ] #---------------------------------# # environment configuration # From 6218d1da10d26e7653693924c55eee884923f0ee Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sat, 16 May 2026 10:21:14 -0400 Subject: [PATCH 203/203] Add a main branch to some workflows for my own personal fork.