Compare commits

...

35 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
Christoph Reiter
477a2f5603 Provide a .tar.zst in addition to the .tar.xz
So people can stop using xz if they want.
2024-04-05 12:04:27 +02:00
Christoph Reiter
97d7bf58b4 Switch to CLANG64 instead
installerbase.exe is a bit smaller there
2024-02-23 13:01:51 +01:00
مهدي شينون (Mehdi Chinoune)
759168a89b generate installer on UCRT64 environment 2024-02-23 13:01:51 +01:00
Christoph Reiter
3b935b9f61 Revert "Downgrade GH actions"
This reverts commit 4d83cc210c.
2024-01-20 13:24:38 +01:00
Christoph Reiter
4d83cc210c Downgrade GH actions
they are broken: https://github.com/actions/download-artifact/issues/249
2024-01-05 17:59:39 +01:00
Christoph Reiter
6eaa6d49cd CI: update actions 2023-12-28 18:18:00 +01:00
Christoph Reiter
a3839b22e2 Generate a list of all included packages and their versions
might be useful to know what changed between installers
2023-10-26 10:31:33 +02:00
Christoph Reiter
224d05263c Update 7-Zip-zstd to v22.01-v1.5.5-R3 2023-07-17 20:06:39 +02:00
Christoph Reiter
59a34503fe Update 7-Zip-zstd to v22.01-v1.5.5-R2 2023-05-26 14:31:36 +02:00
Christoph Reiter
741fb309a2 Update 7-Zip-zstd to v22.01-v1.5.4-R4
https://github.com/mcmilk/7-Zip-zstd/releases/tag/v22.01-v1.5.4-R4
2023-03-18 11:12:57 +01:00
Christoph Reiter
e73e164c3c Revert "CI: add a workflow dispatch option to build from staging"
This reverts commit cdda721492.

Despite it defaulting to false it somehow is true when starting via the github UI.
Not sure why right now, so reverting.
2023-01-19 00:43:23 +01:00
Christoph Reiter
56d39282b5 Revert "CI: another try at skipping upload with staging"
This reverts commit b5fb298387.
2023-01-19 00:43:06 +01:00
Christoph Reiter
68a5ee8f33 Revert "add note that building from staging will not upload the installer"
This reverts commit cfd23616d2.
2023-01-19 00:43:04 +01:00
Christoph Reiter
cfd23616d2 add note that building from staging will not upload the installer 2023-01-14 15:27:45 +01:00
Christoph Reiter
b5fb298387 CI: another try at skipping upload with staging 2023-01-14 14:13:36 +01:00
Christoph Reiter
cdda721492 CI: add a workflow dispatch option to build from staging
If active it includes the staging repo, but doesn't upload
the build in the end.
2023-01-14 13:24:03 +01:00
Christoph Reiter
81f081a283 Add a clangarm64 shortcut
We enable the repo by default now, so we can stop hiding it by default.
2023-01-01 10:21:39 +01:00
10 changed files with 47 additions and 230 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,184 +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@v3
- name: setup-msys2
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: >-
tar
mingw-w64-x86_64-qt-installer-framework
mingw-w64-x86_64-7zip
- 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
sha256sum.exe msys2-*
sha256sum.exe msys2-* > msys2-checksums.txt
- name: Upload Results
uses: actions/upload-artifact@v3
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@v3
- uses: actions/download-artifact@v3
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@v3
- uses: actions/download-artifact@v3
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@v3
- uses: actions/download-artifact@v3
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@v3
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
.gitignore vendored
View File

@@ -1,4 +1,5 @@
_cache
*.exe
*.xz
*.zst
_build

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="7z21.03-zstd-x64"
CHECKSUM="531b20dfb03d8f30f61ae56a181610bbb6f3cf7cc71dac1d8f95511289de76f3"
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/v21.03-v1.5.0-R2/$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...]"
@@ -21,20 +27,28 @@ create_installer_archive() {
popd > /dev/null
}
create_archive() {
echo "[Creating archive...]"
create_archives() {
echo "[Creating tarball...]"
pushd "${_newmsysbase}" > /dev/null
export XZ_OPT="-9T0"
/usr/bin/tar --transform='s/:/_/g' --dereference --hard-dereference -cJf "${_thisdir}/msys2-base-x86_64-${_date}.tar.xz" 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-${_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-${_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-${_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
}
@@ -55,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
}
@@ -72,6 +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-${_arch_name}-${_date}.packages.txt"
popd > /dev/null
}
@@ -79,6 +94,8 @@ main() {
pacman -S --noconfirm --needed \
"${MINGW_PACKAGE_PREFIX}-qt-installer-framework" \
"${MINGW_PACKAGE_PREFIX}-7zip" \
"${MINGW_PACKAGE_PREFIX}-xz" \
"${MINGW_PACKAGE_PREFIX}-zstd" \
"tar"
create_chroot_system
@@ -87,8 +104,10 @@ main() {
create_installer_archive
create_installer
create_archive
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

@@ -38,6 +38,7 @@ function createShortcuts()
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");
component.addOperation("CreateShortcut", "@TargetDir@/clangarm64.exe", "@StartMenuDir@/MSYS2 CLANGARM64.lnk", "iconPath=@TargetDir@/clangarm64.exe");
component.addOperation("CreateShortcut", "@TargetDir@/msys2.exe", "@StartMenuDir@/MSYS2 MSYS.lnk", "iconPath=@TargetDir@/msys2.exe");
component.addOperation( "Execute",

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>