mirror of
https://github.com/cmderdev/cmder.git
synced 2025-07-16 12:39:38 +08:00
Compare commits
4 Commits
integratio
...
v1.3.24
Author | SHA1 | Date | |
---|---|---|---|
5e219fe34e | |||
9be28807cb | |||
e2168a361c | |||
7542376213 |
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@ -30,7 +30,9 @@ jobs:
|
||||
build:
|
||||
name: Build Project
|
||||
runs-on: windows-latest
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
discussions: write
|
||||
steps:
|
||||
- name: Check out repository code (Action from GitHub)
|
||||
uses: actions/checkout@v3
|
||||
|
60
appveyor.yml
60
appveyor.yml
@ -1,60 +0,0 @@
|
||||
#---------------------------------#
|
||||
# general configuration #
|
||||
#---------------------------------#
|
||||
|
||||
version: 1.0.{build}-{branch}
|
||||
|
||||
# branches to build
|
||||
branches:
|
||||
# blacklist
|
||||
except:
|
||||
- gh-pages
|
||||
|
||||
#---------------------------------#
|
||||
# environment configuration #
|
||||
#---------------------------------#
|
||||
|
||||
# Operating system (build VM template)
|
||||
os: Visual Studio 2022
|
||||
|
||||
#---------------------------------#
|
||||
# build configuration #
|
||||
#---------------------------------#
|
||||
|
||||
build_script:
|
||||
- ps: cd scripts; .\build.ps1 -Compile -verbose
|
||||
|
||||
after_build:
|
||||
- ps: .\pack.ps1 -verbose
|
||||
|
||||
# Disable test search, since we don't have any.
|
||||
test: off
|
||||
|
||||
#---------------------------------#
|
||||
# artifacts #
|
||||
#---------------------------------#
|
||||
|
||||
artifacts:
|
||||
- path: build\cmder.zip
|
||||
name: cmderzip
|
||||
|
||||
- path: build\cmder.7z
|
||||
name: cmder7z
|
||||
|
||||
- path: build\cmder_mini.zip
|
||||
name: cmdermini
|
||||
|
||||
- path: build\hashes.txt
|
||||
name: hashes
|
||||
|
||||
#---------------------------------#
|
||||
# notifications #
|
||||
#---------------------------------#
|
||||
|
||||
notifications:
|
||||
# Webhook
|
||||
- provider: Webhook
|
||||
url: https://webhooks.gitter.im/e/d673abb1b2e659dcd625
|
||||
on_build_success: true
|
||||
on_build_failure: true
|
||||
on_build_status_changed: true
|
1
vendor/bin/add-cmderrootenvar.ps1
vendored
1
vendor/bin/add-cmderrootenvar.ps1
vendored
@ -1 +0,0 @@
|
||||
setx cmder_root "${env:cmder_root}"
|
36
vendor/bin/add-cmdertodesktop.ps1
vendored
36
vendor/bin/add-cmdertodesktop.ps1
vendored
@ -1,36 +0,0 @@
|
||||
if (test-path "c:\windows\set-shortcut.ps1") {
|
||||
$setShortcut = "c:\windows\set-shortcut.ps1"
|
||||
}
|
||||
|
||||
if (test-path "${env:USERPROFILE}\cmderdev") {
|
||||
$env:cmder_root = "${env:USERPROFILE}\cmderdev"
|
||||
write-host "Creating '${env:USERPROFILE}\Desktop\Cmderdev.lnk'..."
|
||||
|
||||
if (test-path "${env:USERPROFILE}\cmderdev\vendor\bin\set-shortcut.ps1") {
|
||||
$setShortcut = "$env:cmder_root\vendor\bin\set-shortcut.ps1"
|
||||
}
|
||||
|
||||
start-process -NoNewWindow -filePath "powershell.exe" -ArgumentList "-file `"${setShortcut}`" -sourceexe `"${env:cmder_root}\Cmder.exe`" -DestinationPath `"${env:USERPROFILE}\Desktop\Cmderdev.lnk`" -WorkingDirectory `"${env:cmder_root}`""
|
||||
}
|
||||
|
||||
if (test-path "${env:USERPROFILE}\cmder") {
|
||||
$env:cmder_root = "${env:USERPROFILE}\cmder"
|
||||
|
||||
if (test-path "${cmder_root}\vendor\bin\set-shortcut.ps1") {
|
||||
$setShortcut = "$env:cmder_root\vendor\bin\set-shortcut.ps1"
|
||||
}
|
||||
|
||||
write-host "Creating '${env:USERPROFILE}\Desktop\Cmder.lnk'..."
|
||||
start-process -NoNewWindow -filePath "powershell.exe" -ArgumentList "-file `"${setShortcut}`" -sourceexe `"$env:cmder_root\Cmder.exe`" -DestinationPath `"${env:USERPROFILE}\Desktop\Cmder.lnk`" -WorkingDirectory `"${env:USERPROFILE}`""
|
||||
} elseif (test-path "C:\tools\cmder") {
|
||||
$env:cmder_root = "C:\tools\cmder"
|
||||
|
||||
if (test-path "${cmder_root}\vendor\bin\set-shortcut.ps1") {
|
||||
$setShortcut = "$env:cmder_root\vendor\bin\set-shortcut.ps1"
|
||||
}
|
||||
|
||||
write-host "Creating '${env:USERPROFILE}\Desktop\Cmder.lnk'..."
|
||||
start-process -NoNewWindow -filePath "powershell.exe" -ArgumentList "-file `"${setShortcut}`" -sourceexe `"$env:cmder_root\Cmder.exe`" -DestinationPath `"${env:USERPROFILE}\Desktop\Cmder.lnk`" -WorkingDirectory `"${env:USERPROFILE}`""
|
||||
}
|
||||
|
||||
|
39
vendor/bin/add-vscodeprofile.ps1
vendored
39
vendor/bin/add-vscodeprofile.ps1
vendored
@ -1,39 +0,0 @@
|
||||
# VSCode
|
||||
$VSCodeUserSettings = "$env:APPDATA/Code/User"
|
||||
$VSCodeSettings = "$VSCodeUserSettings/settings.json";
|
||||
$VSCodeSettingsNew = $VSCodeSettings.replace('.json', '-new.json')
|
||||
|
||||
if (test-path $VSCodeSettings) {
|
||||
$data = get-content -path $VSCodeSettings -ErrorAction silentlycontinue | out-string | ConvertFrom-Json
|
||||
}
|
||||
else {
|
||||
New-Item -ItemType directory $VSCodeUserSettings -force
|
||||
$data = @{}
|
||||
}
|
||||
|
||||
write-host $data
|
||||
|
||||
$data | Add-Member -force -Name 'terminal.integrated.defaultProfile.windows' -MemberType NoteProperty -Value "Cmder"
|
||||
|
||||
if ($null -eq $data.'terminal.integrated.profiles.windows') {
|
||||
write-host "Adding 'terminal.integrated.profiles.windows'..."
|
||||
$data | Add-Member -force -Name 'terminal.integrated.profiles.windows' -MemberType NoteProperty -Value @{}
|
||||
}
|
||||
|
||||
write-host "Adding 'terminal.integrated.profiles.windows.Cmder' profile..."
|
||||
$data.'terminal.integrated.profiles.windows'.'Cmder' = @{
|
||||
"name" = "Cmder";
|
||||
"path" = @(
|
||||
"`${env:windir}/Sysnative/cmd.exe";
|
||||
"`${env:windir}/System32/cmd.exe";
|
||||
);
|
||||
"args" = @(
|
||||
"/k";
|
||||
"`${env:USERPROFILE}/cmderdev/vendor/bin/vscode_init.cmd");
|
||||
"icon" = "terminal-cmd";
|
||||
"color" = "terminal.ansiGreen";
|
||||
};
|
||||
|
||||
$data | ConvertTo-Json -depth 100 | set-content $VSCodeSettings
|
||||
|
||||
|
74
vendor/bin/add-windowsterminalprofiles.ps1
vendored
74
vendor/bin/add-windowsterminalprofiles.ps1
vendored
@ -1,74 +0,0 @@
|
||||
# Windows Terminal
|
||||
$windowsTerminalFolder = (dir "$env:userprofile/AppData/Local/Packages/Microsoft.WindowsTerminal_*").name
|
||||
$windowsTerminalPath = "$env:userprofile/AppData/Local/Packages/$windowsTerminalFolder"
|
||||
$windowsTerminalSettings = $windowsTerminalPath + '/localState/settings.json'
|
||||
$windowsTerminalSettingsNew = $windowsTerminalPath + '/localState/settings-new.json'
|
||||
|
||||
if (test-path "$env:userprofile/Documents/windows_terminal_settings.json.default") {
|
||||
if (test-path "$windowsTerminalPath/LocalState/settings.json") {
|
||||
del "$env:userprofile/Documents/windows_terminal_settings.json.default"
|
||||
} else {
|
||||
move-item -path $env:userprofile/Documents/windows_terminal_settings.json.default -destination $windowsTerminalPath/LocalState/settings.json
|
||||
}
|
||||
}
|
||||
|
||||
if (test-path "$env:userprofile/Documents/windows_terminal_state.json.default") {
|
||||
if (test-path "$windowsTerminalPath/LocalState/state.json") {
|
||||
del "$env:userprofile/Documents/windows_terminal_state.json.default"
|
||||
} else {
|
||||
move-item -path $env:userprofile/Documents/windows_terminal_state.json.default -destination $windowsTerminalPath/LocalState/state.json
|
||||
}
|
||||
}
|
||||
|
||||
if (test-path "$windowsTerminalPath/LocalState/state.json") {
|
||||
$json = get-content $windowsTerminalSettings | ConvertFrom-Json
|
||||
|
||||
$json.defaultProfile="{00000000-0000-0000-ba54-000000000132}"
|
||||
|
||||
$cmderFound = $false
|
||||
$cmderAsAdminFound = $false
|
||||
|
||||
foreach ($profile in $json.profiles.list) {
|
||||
if ($profile.Name -eq "Cmder") {
|
||||
$cmderFound = $true
|
||||
}
|
||||
elseIf ($profile.Name -eq "Cmder as Admin") {
|
||||
$cmderAsAdminFound = $true
|
||||
}
|
||||
}
|
||||
|
||||
if (-not $cmderFound) {
|
||||
write-host "Adding 'Cmder' to Windows Terminal..."
|
||||
|
||||
$json.profiles.list += @{
|
||||
commandline="cmd.exe /k `"%USERPROFILE%/cmderdev/vendor/init.bat`"";
|
||||
startingDirectory="%USERPROFILE%/cmderdev";
|
||||
icon="%USERPROFILE%/cmderdev/icons/cmder.ico";
|
||||
closeOnExit="graceful";
|
||||
guid="{00000000-0000-0000-ba54-000000000132}";
|
||||
hidden=$false;
|
||||
name="Cmder"
|
||||
}
|
||||
}
|
||||
|
||||
if (-not $cmderAsAdminFound) {
|
||||
write-host "Adding 'Cmder as Admin' to Windows Terminal..."
|
||||
|
||||
$json.profiles.list += @{
|
||||
commandline="cmd.exe /k `"%USERPROFILE%/cmderdev/vendor/init.bat`"";
|
||||
startingDirectory="%USERPROFILE%/cmderdev";
|
||||
icon="%USERPROFILE%/cmderdev/icons/cmder_red.ico";
|
||||
closeOnExit="graceful";
|
||||
guid="{00000000-0000-0000-ba54-000000000133}";
|
||||
hidden=$false;
|
||||
elevate=$true;
|
||||
name="Cmder as Admin"
|
||||
}
|
||||
}
|
||||
|
||||
$json | ConvertTo-Json -depth 100 | set-content $windowsTerminalSettings
|
||||
}
|
||||
else {
|
||||
write-host "Cannot add profiles for Windows Terminal. The Windows Terminal settings file does not exist!"
|
||||
}
|
||||
|
21
vendor/bin/set-shortcut.ps1
vendored
21
vendor/bin/set-shortcut.ps1
vendored
@ -1,21 +0,0 @@
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter()]
|
||||
[string]$SourceExe,
|
||||
[string]$Arguments,
|
||||
[string]$DestinationPath,
|
||||
[string]$WorkingDirectory,
|
||||
[String]$IconLocation
|
||||
)
|
||||
|
||||
if ($IconLocation -eq '') {
|
||||
$IconLocation = $SourceExe
|
||||
}
|
||||
|
||||
$WshShell = New-Object -comObject WScript.Shell
|
||||
$Shortcut = $WshShell.CreateShortcut($destinationPath)
|
||||
$Shortcut.TargetPath = $SourceExe
|
||||
$Shortcut.Arguments = $Arguments
|
||||
$shortcut.WorkingDirectory = $WorkingDirectory
|
||||
$shortcut.IconLocation = $IconLocation
|
||||
$Shortcut.Save()
|
16
vendor/sources.json
vendored
16
vendor/sources.json
vendored
@ -1,22 +1,22 @@
|
||||
[
|
||||
{
|
||||
"name": "git-for-windows",
|
||||
"version": "2.40.1.windows.1",
|
||||
"url": "https://github.com/git-for-windows/git/releases/download/v2.40.1.windows.1/PortableGit-2.40.1-64-bit.7z.exe"
|
||||
"version": "2.41.0.windows.3",
|
||||
"url": "https://github.com/git-for-windows/git/releases/download/v2.41.0.windows.3/PortableGit-2.41.0.3-64-bit.7z.exe"
|
||||
},
|
||||
{
|
||||
"name": "clink",
|
||||
"version": "1.4.24",
|
||||
"url": "https://github.com/chrisant996/clink/releases/download/v1.4.24/clink.1.4.24.688975.zip"
|
||||
"version": "1.5.1",
|
||||
"url": "https://github.com/chrisant996/clink/releases/download/v1.5.1/clink.1.5.1.1e9e51.zip"
|
||||
},
|
||||
{
|
||||
"name": "conemu-maximus5",
|
||||
"version": "22.12.18",
|
||||
"url": "https://github.com/Maximus5/ConEmu/releases/download/v22.12.18/ConEmuPack.221218.7z"
|
||||
"version": "23.07.24",
|
||||
"url": "https://github.com/Maximus5/ConEmu/releases/download/v23.07.24/ConEmuPack.230724.7z"
|
||||
},
|
||||
{
|
||||
"name": "clink-completions",
|
||||
"version": "0.4.8",
|
||||
"url": "https://github.com/vladimir-kotikov/clink-completions/archive/v0.4.8.zip"
|
||||
"version": "0.4.10",
|
||||
"url": "https://github.com/vladimir-kotikov/clink-completions/archive/v0.4.10.zip"
|
||||
}
|
||||
]
|
||||
|
Reference in New Issue
Block a user