Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyd2019 committed May 7, 2024
2 parents 72804e0 + 477a2f5 commit 8814a31
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 14 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ jobs:
- name: setup-msys2
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
msystem: CLANG64
update: true
install: >-
tar
mingw-w64-x86_64-qt-installer-framework
mingw-w64-x86_64-7zip
pacboy: >-
qt-installer-framework:p
7zip:p
- name: Switch to the main mirror
shell: msys2 {0}
Expand All @@ -49,12 +50,13 @@ jobs:
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@v3
uses: actions/upload-artifact@v4
with:
name: installer
path: msys2-*
Expand All @@ -71,7 +73,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: installer

Expand Down Expand Up @@ -107,7 +109,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: installer

Expand Down Expand Up @@ -140,7 +142,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: installer

Expand Down Expand Up @@ -174,7 +176,7 @@ jobs:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: installer

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
_cache
*.exe
*.xz
*.zst
_build
22 changes: 16 additions & 6 deletions make-msys2-installer
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,21 @@ 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-${_arch}-${_date}.tar.xz" msys${_bitness}
/usr/bin/tar --transform='s/:/_/g' --dereference --hard-dereference -cf "${_thisdir}/msys2-base-${_arch}-${_date}.tar" msys${_bitness}
popd > /dev/null

echo "[Creating xz archive...]"
xz -9 --keep --verbose --force --compress --threads=0 "${_thisdir}/msys2-base-${_arch}-${_date}.tar"
xz --test "${_thisdir}/msys2-base-${_arch}-${_date}.tar.xz"

echo "[Creating zstd archive...]"
zstd -T0 -22 --ultra --force "${_thisdir}/msys2-base-${_arch}-${_date}.tar" -o "${_thisdir}/msys2-base-${_arch}-${_date}.tar.zst"
zstd --test "${_thisdir}/msys2-base-${_arch}-${_date}.tar.zst"

rm "${_thisdir}/msys2-base-${_arch}-${_date}.tar"
}

create_sfx() {
Expand Down Expand Up @@ -88,6 +96,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
Expand All @@ -96,7 +106,7 @@ main() {
create_installer_archive
create_installer

create_archive
create_archives
create_sfx
}

Expand Down

0 comments on commit 8814a31

Please sign in to comment.