Compare commits

..

18 Commits

Author SHA1 Message Date
Befator
6c9763a0a8 Revert "Remove the MINGW32 shortcut"
This reverts commit cf1e9b4c20.
2025-10-12 00:47:57 +02:00
Befator
3d24b45be7 Initial Befator Inc import 2025-10-12 00:47:47 +02:00
Christoph Reiter
4c976e8ef9 CI: remove arm64 sfx build again
It doesn't add much over the x86_64 one, we can re-enable it easily if needed
2025-08-30 14:08:36 +02:00
Christoph Reiter
be354de86b Build arm64 variants of everything
except tarballs, since they are the same
2025-08-23 21:45:19 +02:00
Christoph Reiter
2473ff0808 Update 7-Zip-zstd
https://github.com/mcmilk/7-Zip-zstd/releases/tag/v25.01-v1.5.7-R1
2025-08-22 11:07:47 +02:00
Christoph Reiter
f65d1b8a42 CI: drop windows-2019 jobs
The images will be removed at the end of the month:
https://github.com/actions/runner-images/issues/12045
2025-06-22 20:16:34 +02:00
Christoph Reiter
65a56be710 zizmor: allow unpinned setup-msys2
we trust our own code
2025-04-28 06:25:35 +02:00
Christoph Reiter
750994a32b CI: test on windows-11-arm
docker doesn't work because:

Step 1/3 : FROM mcr.microsoft.com/windows/servercore:ltsc2025-arm64
ltsc2025-arm64: Pulling from windows/servercore
a Windows version 10.0.26100-based image is incompatible with a 10.0.22631 host

The installer doesn't work because of #96
2025-04-15 09:53:06 +02:00
Christoph Reiter
c30215fef8 Revert "CI: skip 2025 docker job, GHA is broken"
This reverts commit de2a6ca3e7.
2025-04-15 07:43:31 +02:00
Christoph Reiter
1c7eee8426 Update 7-Zip-zstd to v24.09-v1.5.7-R1
https://github.com/mcmilk/7-Zip-zstd/releases/tag/v24.09-v1.5.7-R1
2025-03-03 10:06:31 +01:00
Christoph Reiter
f2c532a889 config: disable AllowRepositoriesForOfflineInstaller
See https://doc.qt.io/qtinstallerframework/ifw-globalconfig.html
and bf5b701b10
and https://bugreports.qt.io/browse/QTIFW-3078

This doesn't look like a feature we need, and it used to be disabled,
so disable it again.

The code it guards seems related to #96, so maybe it helps there.
2025-02-27 06:51:02 +01:00
Christoph Reiter
de2a6ca3e7 CI: skip 2025 docker job, GHA is broken
See https://github.com/actions/runner-images/issues/11582
2025-02-14 07:52:51 +01:00
Christoph Reiter
39996f539c CI: force strict default permissions to make zizmor happy
This doesn't change much as we already set it to read-only in the GUI
settings, but doesn't hurt, an makes zizmor happy.
2025-01-19 09:24:24 +01:00
Christoph Reiter
c286b296d3 CI: add a zizmor job 2025-01-18 10:40:03 +01:00
Christoph Reiter
84dfd74760 CI: build and test with windows-2025 2024-12-19 22:40:10 +01:00
Christoph Reiter
3cf8b7eabe Use WizardStyle=Modern instead of Aero
The later seems to be the default for some reason but does not
support dark mode (or breaks when dark mode is enabled).
Use the "Modern" style instead, and also set a smaller default
width while at it.

Note that the style is a QWizard concept and not QTIFW specific.

The only related upstream issue I found was
https://bugreports.qt.io/browse/QTBUG-123853

Fixes #84
2024-12-07 22:15:24 +01:00
Christoph Reiter
58f6dc63ea CI: use "persist-credentials: false" for actions/checkout
See https://woodruffw.github.io/zizmor/audits/#artipacked
2024-12-06 15:00:34 +01:00
Christoph Reiter
cf1e9b4c20 Remove the MINGW32 shortcut
We are phasing out 32-bit support, so let's not install a shortcut for it by default.
Users can still access it via the mingw32.exe directly if needed.
2024-09-23 06:45:12 +02:00
8 changed files with 36 additions and 235 deletions

View File

@@ -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';

View File

@@ -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';

View File

@@ -1,187 +0,0 @@
name: 'build'
on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: '0 3 * * *'
concurrency: nope
jobs:
build-installer:
runs-on: windows-2022
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: setup-msys2
uses: msys2/setup-msys2@v2
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]
steps:
- name: Checkout code
uses: actions/checkout@v4
- 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]
steps:
- name: Checkout code
uses: actions/checkout@v4
- 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]
steps:
- name: Checkout code
uses: actions/checkout@v4
- 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:
- 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 }}

View File

@@ -1,9 +1,5 @@
# MSYS2 Installer
## Nightly build
https://github.com/msys2/msys2-installer/releases/tag/nightly-x86_64
![screenshot](screenshot.png)
## CLI Usage examples

17
create-sfx.sh Normal file → Executable file
View File

@@ -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="7z22.01-zstd-x64"
CHECKSUM="d542d78397bbed8e77c221f36cad461a0d83f1263b993a7048e81df40f403fb8"
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/v22.01-v1.5.5-R3/$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"

View File

@@ -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

View File

@@ -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>
@@ -11,8 +11,11 @@
<InstallerApplicationIcon>msys2</InstallerApplicationIcon>
<InstallerWindowIcon>msys2.ico</InstallerWindowIcon>
<InstallActionColumnVisible>false</InstallActionColumnVisible>
<WizardStyle>Modern</WizardStyle>
<WizardDefaultWidth>40em</WizardDefaultWidth>
<MaintenanceToolName>uninstall</MaintenanceToolName>
<SupportsModify>false</SupportsModify>
<RepositorySettingsPageVisible>false</RepositorySettingsPageVisible>
<SaveDefaultRepositories>false</SaveDefaultRepositories>
<AllowRepositoriesForOfflineInstaller>false</AllowRepositoriesForOfflineInstaller>
</Installer>

View File

@@ -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>