Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
f604b06
update windows terminal, clink, and git
daxgames Mar 8, 2025
f4b8d08
update clink
daxgames Dec 6, 2025
de9402a
Merge remote-tracking branch 'origin/development-dax' into sources-up…
daxgames Dec 14, 2025
e4a6640
update sources
daxgames Dec 14, 2025
58bbe78
x
daxgames Dec 14, 2025
f9d7972
Add install-pacman.sh
daxgames Dec 14, 2025
df0785d
Add a disclaimer
daxgames Dec 14, 2025
83df88d
fixes for windows 10
daxgames Dec 22, 2025
6431633
x
daxgames Dec 25, 2025
c2cdcfc
Merge remote-tracking branch 'origin/install-pacman' into install-pacman
daxgames Dec 25, 2025
be5b641
add installPacman switch to build.sh
daxgames Jan 16, 2026
ffe4700
Merge branch 'upstream-development' into install-pacman
daxgames Feb 22, 2026
de291de
Merge branch 'upstream-development' into install-pacman
daxgames Feb 22, 2026
0dd8459
cleanup
daxgames Feb 22, 2026
a0aecb6
Fix CodeQL
daxgames Feb 22, 2026
9b1e7a2
Fix CodeQL
daxgames Feb 22, 2026
7da225a
Fix CodeQl
daxgames Feb 22, 2026
2ffe72c
Merge remote-tracking branch 'upstream/development' into install-pacman
daxgames Feb 22, 2026
d842064
update Git
daxgames Apr 22, 2026
79c0d6f
Merge remote-tracking branch 'upstream/development' into install-pacman
daxgames Apr 22, 2026
4b80f51
Update help
daxgames May 9, 2026
7dbe665
Merge remote-tracking branch 'upstream/development' into install-pacman
daxgames Jun 19, 2026
983764b
Merge remote-tracking branch 'origin/install-pacman' into install-pacman
daxgames Jun 19, 2026
7bda24a
Merge branch 'upstream-development' into install-pacman
daxgames Jul 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ scripts/packer/iso/*.iso
scripts/packer/packer_cache
scripts/packer/output-*
*.box

*.code-workspace
9 changes: 8 additions & 1 deletion scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -215,6 +218,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
}

Expand Down
133 changes: 133 additions & 0 deletions scripts/install_pacman.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
#!/usr/bin/env bash

# Based on: https://github.com/mcgitty/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}
echo "Using binary source: $bin_source"
echo "Using HOME directory: $HOME"
read -rp "Press [Enter] to continue..."

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@daxgames

Added invalid indentation here accidentally, please remove

To avoid keeping track of a random version such as v1.5.5, I'm considering to apply some minor improvements

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
[[ -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
echo -e "\n=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n"

echo =-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
echo Downloading zstd binaries...
echo =-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
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 =-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
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 --disable-download-timeout
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"
46 changes: 46 additions & 0 deletions scripts/pack.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,28 @@

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

Expand All @@ -14,6 +36,30 @@
.\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
Expand Down
12 changes: 6 additions & 6 deletions vendor/sources.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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",
Expand Down
Loading