Skip to content

Commit

Permalink
Add a 7zip based sfx archive
Browse files Browse the repository at this point in the history
  • Loading branch information
lazka committed May 20, 2020
1 parent c45d211 commit e5b378f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
Binary file added 7zCon.sfx
Binary file not shown.
3 changes: 2 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ jobs:
set PATH=%CD:~0,2%\$(MSYS_DIR)\usr\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem
%CD:~0,2%\$(MSYS_DIR)\usr\bin\pacman --noconfirm -Syyuu
%CD:~0,2%\$(MSYS_DIR)\usr\bin\pacman --noconfirm -Syuu
%CD:~0,2%\$(MSYS_DIR)\usr\bin\pacman --noconfirm -S p7zip
displayName: Update MSYS2
- script: |
set CHERE_INVOKING=yes
set PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem
%CD:~0,2%\$(MSYS_DIR)\usr\bin\bash -lc "bash make-msys2-installer; cp msys2-*.exe msys2-$(ARCH)-latest.exe; cp msys2-*.tar.xz msys2-base-$(ARCH)-latest.tar.xz"
%CD:~0,2%\$(MSYS_DIR)\usr\bin\bash -lc "bash make-msys2-installer; cp msys2-base-$(ARCH)-[0-9]*.sfx.exe msys2-base-$(ARCH)-latest.sfx.exe; cp msys2-$(ARCH)-[0-9]*.exe msys2-$(ARCH)-latest.exe; cp msys2-*.tar.xz msys2-base-$(ARCH)-latest.tar.xz"
displayName: CI-Build
- task: CopyFiles@2
inputs:
Expand Down
10 changes: 10 additions & 0 deletions fetch-sfx.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

set -e

# Fetch 7zCon.sfx from upstream 7-zip
curl "https://www.7-zip.org/a/7z1900.exe" -o 7z1900.exe
echo "759aa04d5b03ebeee13ba01df554e8c962ca339c74f56627c8bed6984bb7ef80 7z1900.exe" | sha256sum --check
7z x -o7zout 7z1900.exe
cp 7zout/7zCon.sfx .
rm -Rf 7zout 7z1900.exe
6 changes: 6 additions & 0 deletions make-msys2-installer
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ _dateqif=$(date +'%Y-%m-%d')
_version=${_date}
_filename=msys2-${_arch}-${_date}.exe
_filename2=msys2-base-${_arch}-${_date}.tar.xz
_filename3=msys2-base-${_arch}-${_date}.sfx.exe
_log=/tmp/installer-${_arch}-${_date}.log
if [ "${_arch}" = "x86_64" ]; then
_bitness=64
Expand Down Expand Up @@ -88,6 +89,11 @@ create_archives() {
else
die "MSYS2 compressing fail. See ${_log}"
fi

# self extracting cli 7z archive
7z a -mx=9 "${_thisdir}/_temp.7z" "msys${_bitness}"
cat ${_thisdir}/7zCon.sfx "${_thisdir}/_temp.7z" > "${_thisdir}/${_filename3}"
rm "${_thisdir}/_temp.7z"
popd > /dev/null
fi
}
Expand Down

0 comments on commit e5b378f

Please sign in to comment.