Compare commits
6 Commits
2025-06-22
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6c9763a0a8 | ||
|
|
3d24b45be7 | ||
|
|
4c976e8ef9 | ||
|
|
be354de86b | ||
|
|
2473ff0808 | ||
|
|
f65d1b8a42 |
@@ -1,13 +0,0 @@
|
||||
FROM mcr.microsoft.com/windows/servercore:ltsc2019
|
||||
|
||||
COPY ./msys2-base-x86_64-latest.sfx.exe /msys2.exe
|
||||
|
||||
RUN powershell -Command \
|
||||
$ErrorActionPreference = 'Stop'; \
|
||||
$ProgressPreference = 'SilentlyContinue'; \
|
||||
/msys2.exe -y -oC:\; \
|
||||
function msys() { C:\msys64\usr\bin\bash.exe @('-lc') + @Args; } \
|
||||
msys ' '; \
|
||||
msys 'pacman --noconfirm -Syuu'; \
|
||||
msys 'pacman --noconfirm -Syuu'; \
|
||||
msys 'pacman --noconfirm -Scc';
|
||||
@@ -1,13 +0,0 @@
|
||||
FROM mcr.microsoft.com/windows/servercore:ltsc2022
|
||||
|
||||
COPY ./msys2-base-x86_64-latest.sfx.exe /msys2.exe
|
||||
|
||||
RUN powershell -Command \
|
||||
$ErrorActionPreference = 'Stop'; \
|
||||
$ProgressPreference = 'SilentlyContinue'; \
|
||||
/msys2.exe -y -oC:\; \
|
||||
function msys() { C:\msys64\usr\bin\bash.exe @('-lc') + @Args; } \
|
||||
msys ' '; \
|
||||
msys 'pacman --noconfirm -Syuu'; \
|
||||
msys 'pacman --noconfirm -Syuu'; \
|
||||
msys 'pacman --noconfirm -Scc';
|
||||
@@ -1,13 +0,0 @@
|
||||
FROM mcr.microsoft.com/windows/servercore:ltsc2025
|
||||
|
||||
COPY ./msys2-base-x86_64-latest.sfx.exe /msys2.exe
|
||||
|
||||
RUN powershell -Command \
|
||||
$ErrorActionPreference = 'Stop'; \
|
||||
$ProgressPreference = 'SilentlyContinue'; \
|
||||
/msys2.exe -y -oC:\; \
|
||||
function msys() { C:\msys64\usr\bin\bash.exe @('-lc') + @Args; } \
|
||||
msys ' '; \
|
||||
msys 'pacman --noconfirm -Syuu'; \
|
||||
msys 'pacman --noconfirm -Syuu'; \
|
||||
msys 'pacman --noconfirm -Scc';
|
||||
216
.github/workflows/build.yml
vendored
216
.github/workflows/build.yml
vendored
@@ -1,216 +0,0 @@
|
||||
name: 'build'
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 3 * * *'
|
||||
|
||||
concurrency: nope
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
zizmor:
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Run zizmor
|
||||
run: pipx run zizmor .
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
build-installer:
|
||||
runs-on: windows-2025
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: setup-msys2
|
||||
uses: msys2/setup-msys2@v2 # zizmor: ignore[unpinned-uses]
|
||||
with:
|
||||
msystem: CLANG64
|
||||
update: true
|
||||
install: >-
|
||||
tar
|
||||
pacboy: >-
|
||||
qt-installer-framework:p
|
||||
7zip:p
|
||||
|
||||
- name: Switch to the main mirror
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
echo 'Server = https://repo.msys2.org/mingw/$repo/' > /etc/pacman.d/mirrorlist.mingw
|
||||
echo 'Server = https://repo.msys2.org/msys/$arch/' > /etc/pacman.d/mirrorlist.msys
|
||||
pacman-conf.exe
|
||||
|
||||
- name: Update using the main mirror & Check install
|
||||
run: |
|
||||
msys2 -c 'pacman --noconfirm -Suuy'
|
||||
msys2 -c 'pacman --noconfirm -Suu'
|
||||
msys2 -c 'pacman -Qkq'
|
||||
|
||||
- name: Build Installer
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
bash make-msys2-installer
|
||||
|
||||
- name: Create 'latest' Variants and Checksums
|
||||
run: |
|
||||
mv msys2-base-x86_64-[0-9]*.sfx.exe msys2-base-x86_64-latest.sfx.exe
|
||||
mv msys2-x86_64-[0-9]*.exe msys2-x86_64-latest.exe
|
||||
mv msys2-*.tar.xz msys2-base-x86_64-latest.tar.xz
|
||||
mv msys2-*.tar.zst msys2-base-x86_64-latest.tar.zst
|
||||
mv msys2-*.packages.txt msys2-base-x86_64-latest.packages.txt
|
||||
sha256sum.exe msys2-*
|
||||
sha256sum.exe msys2-* > msys2-checksums.txt
|
||||
|
||||
- name: Upload Results
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: installer
|
||||
path: msys2-*
|
||||
|
||||
test-installer:
|
||||
name: installer-${{ matrix.image }}
|
||||
runs-on: windows-${{ matrix.image }}
|
||||
needs: build-installer
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
image: [2019, 2022, 2025]
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: installer
|
||||
|
||||
- name: Install
|
||||
run: |
|
||||
./msys2-x86_64-latest.exe in --confirm-command --accept-messages --root C:/msys2-install-test
|
||||
|
||||
- name: Test without Login Shell
|
||||
run: |
|
||||
C:\msys2-install-test\usr\bin\pacman.exe -Syy
|
||||
C:\msys2-install-test\usr\bin\pacman.exe --noconfirm -S vim
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
C:\msys2-install-test\usr\bin\bash.exe -lc "pacman --version"
|
||||
C:\msys2-install-test\usr\bin\bash.exe -lc "pacman -Qkv"
|
||||
C:\msys2-install-test\usr\bin\bash.exe -lc "pacman -Syy"
|
||||
C:\msys2-install-test\usr\bin\bash.exe -lc "pacman --noconfirm -S git"
|
||||
|
||||
- name: Uninstall
|
||||
run: |
|
||||
C:\msys2-install-test\uninstall.exe pr --confirm-command
|
||||
|
||||
test-docker-sfx:
|
||||
name: docker-sfx-${{ matrix.image }}
|
||||
runs-on: windows-${{ matrix.image }}
|
||||
needs: build-installer
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
image: [2019, 2022, 2025]
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: installer
|
||||
|
||||
- name: Build image
|
||||
run: |
|
||||
docker build -t msys2-base -f ./.ci/Dockerfile.${{ matrix.image }} .
|
||||
|
||||
- name: Test without Login Shell
|
||||
run: |
|
||||
docker run msys2-base C:\msys64\usr\bin\pacman.exe -Syy
|
||||
docker run msys2-base C:\msys64\usr\bin\pacman.exe --noconfirm -S vim
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
docker run msys2-base C:\msys64\usr\bin\bash.exe -lc "pacman --version"
|
||||
docker run msys2-base C:\msys64\usr\bin\bash.exe -lc "pacman -Qkv"
|
||||
docker run msys2-base C:\msys64\usr\bin\bash.exe -lc "pacman -Qkk || true"
|
||||
docker run msys2-base C:\msys64\usr\bin\bash.exe -lc "pacman -Syy"
|
||||
docker run msys2-base C:\msys64\usr\bin\bash.exe -lc "pacman -S --noconfirm git"
|
||||
|
||||
test-sfx:
|
||||
name: sfx-${{ matrix.image }}
|
||||
runs-on: windows-${{ matrix.image }}
|
||||
needs: build-installer
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
image: [2019, 2022, 2025, 11-arm]
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: installer
|
||||
|
||||
- name: Install
|
||||
run: |
|
||||
./msys2-base-x86_64-latest.sfx.exe -y -oC:/msys2-install-test
|
||||
|
||||
- name: Test without Login Shell
|
||||
run: |
|
||||
$env:Path = 'C:\msys2-install-test\msys64\usr\bin;' + $env:Path
|
||||
C:\msys2-install-test\msys64\usr\bin\bash.exe -c "pacman-key --init"
|
||||
C:\msys2-install-test\msys64\usr\bin\bash.exe -c "pacman-key --populate"
|
||||
C:\msys2-install-test\msys64\usr\bin\bash.exe -c "pacman -Syy"
|
||||
C:\msys2-install-test\msys64\usr\bin\bash.exe -c "pacman --noconfirm -S vim"
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
C:\msys2-install-test\msys64\usr\bin\bash.exe -lc "pacman --version"
|
||||
C:\msys2-install-test\msys64\usr\bin\bash.exe -lc "pacman -Qkv"
|
||||
C:\msys2-install-test\msys64\usr\bin\bash.exe -lc "pacman -Qkk || true"
|
||||
C:\msys2-install-test\msys64\usr\bin\bash.exe -lc "pacman -Syy"
|
||||
C:\msys2-install-test\msys64\usr\bin\bash.exe -lc "pacman -S --noconfirm git"
|
||||
|
||||
upload-nightly:
|
||||
permissions:
|
||||
contents: write
|
||||
needs:
|
||||
- zizmor
|
||||
- test-docker-sfx
|
||||
- test-installer
|
||||
- test-sfx
|
||||
if: github.ref == 'refs/heads/main'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: installer
|
||||
|
||||
- name: Upload Installers
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
gh release upload nightly-x86_64 msys2-* --clobber -R ${{ github.repository }}
|
||||
@@ -1,9 +1,5 @@
|
||||
# MSYS2 Installer
|
||||
|
||||
## Nightly build
|
||||
|
||||
https://github.com/msys2/msys2-installer/releases/tag/nightly-x86_64
|
||||
|
||||

|
||||
|
||||
## CLI Usage examples
|
||||
|
||||
@@ -3,21 +3,28 @@
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$MSYSTEM" = "CLANGARM64" ]; then
|
||||
ARCH="arm64"
|
||||
CHECKSUM="c526e8c6cb5dc0d175778f1b6b67bd1571ba8a2cf6f6b36b7c8a8d3197ad2bac"
|
||||
else
|
||||
ARCH="x64"
|
||||
CHECKSUM="d140094f0277b49a4e895159bd734da03cd2b60fb73a65e4151edfedc612981e"
|
||||
fi
|
||||
|
||||
# Download and extract https://github.com/mcmilk/7-Zip-zstd
|
||||
NAME="7z24.09-zstd-x64"
|
||||
CHECKSUM="2378901c99005aed525971e6d308a3a80807efc6bb21075df53bbb7cd697572b"
|
||||
NAME="7z25.01-zstd-${ARCH}"
|
||||
DIR="$( cd "$( dirname "$0" )" && pwd )"
|
||||
mkdir -p "$DIR/_cache"
|
||||
BASE="$DIR/_cache/$NAME"
|
||||
if [ ! -f "$BASE.exe" ]; then
|
||||
curl --fail -L "https://github.com/mcmilk/7-Zip-zstd/releases/download/v24.09-v1.5.7-R1/$NAME.exe" -o "$BASE.exe"
|
||||
curl --fail -L "https://github.com/mcmilk/7-Zip-zstd/releases/download/v25.01-v1.5.7-R1/$NAME.exe" -o "$BASE.exe"
|
||||
fi
|
||||
echo "$CHECKSUM $BASE.exe" | sha256sum --quiet --check
|
||||
if [ ! -d "$BASE" ]; then
|
||||
7z e -o"$BASE" "$DIR/_cache/$NAME.exe"
|
||||
fi
|
||||
|
||||
# Creat SFX installer
|
||||
# Create SFX installer
|
||||
INPUT="$1"
|
||||
OUTPUT="$2"
|
||||
TEMP="$OUTPUT.payload"
|
||||
@@ -25,4 +32,4 @@ TEMP="$OUTPUT.payload"
|
||||
rm -f "$TEMP"
|
||||
"$BASE/7z" a "$TEMP" -ms1T -m0=zstd -mx22 "$INPUT"
|
||||
cat "$BASE/7zCon.sfx" "$TEMP" > "$OUTPUT"
|
||||
rm "$TEMP"
|
||||
rm "$TEMP"
|
||||
@@ -11,6 +11,12 @@ _version="${_date}"
|
||||
_newmsysbase="${_build}/newmsys"
|
||||
_newmsys="${_newmsysbase}/msys64"
|
||||
|
||||
if [ "$MSYSTEM" = "CLANGARM64" ]; then
|
||||
_arch_name="arm64"
|
||||
else
|
||||
_arch_name="x86_64"
|
||||
fi
|
||||
|
||||
create_installer_archive() {
|
||||
echo "[Creating installer archive...]"
|
||||
|
||||
@@ -24,25 +30,25 @@ create_installer_archive() {
|
||||
create_archives() {
|
||||
echo "[Creating tarball...]"
|
||||
pushd "${_newmsysbase}" > /dev/null
|
||||
/usr/bin/tar --transform='s/:/_/g' --dereference --hard-dereference -cf "${_thisdir}/msys2-base-x86_64-${_date}.tar" msys64
|
||||
/usr/bin/tar --transform='s/:/_/g' --dereference --hard-dereference -cf "${_thisdir}/msys2-base-${_arch_name}-${_date}.tar" msys64
|
||||
popd > /dev/null
|
||||
|
||||
echo "[Creating xz archive...]"
|
||||
xz -9 --keep --verbose --force --compress --threads=0 "${_thisdir}/msys2-base-x86_64-${_date}.tar"
|
||||
xz --test "${_thisdir}/msys2-base-x86_64-${_date}.tar.xz"
|
||||
xz -9 --keep --verbose --force --compress --threads=0 "${_thisdir}/msys2-base-${_arch_name}-${_date}.tar"
|
||||
xz --test "${_thisdir}/msys2-base-${_arch_name}-${_date}.tar.xz"
|
||||
|
||||
echo "[Creating zstd archive...]"
|
||||
zstd -T0 -22 --ultra --force "${_thisdir}/msys2-base-x86_64-${_date}.tar" -o "${_thisdir}/msys2-base-x86_64-${_date}.tar.zst"
|
||||
zstd --test "${_thisdir}/msys2-base-x86_64-${_date}.tar.zst"
|
||||
zstd -T0 -22 --ultra --force "${_thisdir}/msys2-base-${_arch_name}-${_date}.tar" -o "${_thisdir}/msys2-base-${_arch_name}-${_date}.tar.zst"
|
||||
zstd --test "${_thisdir}/msys2-base-${_arch_name}-${_date}.tar.zst"
|
||||
|
||||
rm "${_thisdir}/msys2-base-x86_64-${_date}.tar"
|
||||
rm "${_thisdir}/msys2-base-${_arch_name}-${_date}.tar"
|
||||
}
|
||||
|
||||
create_sfx() {
|
||||
echo "[Creating SFX...]"
|
||||
|
||||
pushd "${_newmsysbase}" > /dev/null
|
||||
"${_thisdir}/create-sfx.sh" "msys64" "${_thisdir}/msys2-base-x86_64-${_date}.sfx.exe"
|
||||
"${_thisdir}/create-sfx.sh" "msys64" "${_thisdir}/msys2-base-${_arch_name}-${_date}.sfx.exe"
|
||||
popd > /dev/null
|
||||
}
|
||||
|
||||
@@ -63,7 +69,7 @@ create_installer() {
|
||||
-p "${_ifwroot}/packages" \
|
||||
-c "${_ifwroot}/config/config.xml" \
|
||||
--offline-only \
|
||||
"${_thisdir}/msys2-x86_64-${_date}.exe" \
|
||||
"${_thisdir}/msys2-${_arch_name}-${_date}.exe" \
|
||||
-v
|
||||
popd > /dev/null
|
||||
}
|
||||
@@ -80,7 +86,7 @@ create_chroot_system() {
|
||||
pacman -Syu --root "${_newmsys}"
|
||||
pacman -S filesystem msys2-runtime --noconfirm --root "${_newmsys}"
|
||||
pacman -S base --noconfirm --root "${_newmsys}"
|
||||
pacman -Q --root "${_newmsys}" > "${_thisdir}/msys2-base-x86_64-${_date}.packages.txt"
|
||||
pacman -Q --root "${_newmsys}" > "${_thisdir}/msys2-base-${_arch_name}-${_date}.packages.txt"
|
||||
popd > /dev/null
|
||||
}
|
||||
|
||||
@@ -98,8 +104,10 @@ main() {
|
||||
create_installer_archive
|
||||
create_installer
|
||||
|
||||
create_archives
|
||||
create_sfx
|
||||
if [ "$_arch_name" != "arm64" ]; then
|
||||
create_archives
|
||||
create_sfx
|
||||
fi
|
||||
}
|
||||
|
||||
main
|
||||
@@ -3,7 +3,7 @@
|
||||
<Name>MSYS2</Name>
|
||||
<Version>@VERSION@</Version>
|
||||
<Title>MSYS2</Title>
|
||||
<Publisher>The MSYS2 Developers</Publisher>
|
||||
<Publisher>Befator Inc.</Publisher>
|
||||
<ControlScript>control.js</ControlScript>
|
||||
<StartMenuDir>MSYS2</StartMenuDir>
|
||||
<RunProgram>@TargetDir@/ucrt64.exe</RunProgram>
|
||||
|
||||
@@ -34,6 +34,7 @@ function createShortcuts()
|
||||
return;
|
||||
}
|
||||
|
||||
component.addOperation("CreateShortcut", "@TargetDir@/mingw32.exe", "@StartMenuDir@/MSYS2 MINGW32.lnk", "iconPath=@TargetDir@/mingw32.exe");
|
||||
component.addOperation("CreateShortcut", "@TargetDir@/mingw64.exe", "@StartMenuDir@/MSYS2 MINGW64.lnk", "iconPath=@TargetDir@/mingw64.exe");
|
||||
component.addOperation("CreateShortcut", "@TargetDir@/ucrt64.exe", "@StartMenuDir@/MSYS2 UCRT64.lnk", "iconPath=@TargetDir@/ucrt64.exe");
|
||||
component.addOperation("CreateShortcut", "@TargetDir@/clang64.exe", "@StartMenuDir@/MSYS2 CLANG64.lnk", "iconPath=@TargetDir@/clang64.exe");
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<Package>
|
||||
<DisplayName>MSYS2</DisplayName>
|
||||
<DisplayName>Befator Inc. MSYS2</DisplayName>
|
||||
<Description>Cygwin-derived Posix-like env. for Windows with Arch Linux's Pacman</Description>
|
||||
<Version>@VERSION@</Version>
|
||||
<ReleaseDate>@DATE@</ReleaseDate>
|
||||
|
||||
Reference in New Issue
Block a user