Skip to content

Commit

Permalink
Merge pull request #4869 from maron2000/temp_fix_slirp
Browse files Browse the repository at this point in the history
Restore libslirp for MinGW 32bit builds, and fix Windows installer Release builds
  • Loading branch information
joncampbell123 authored Mar 5, 2024
2 parents 14a5511 + e46b0a8 commit 4a76a38
Show file tree
Hide file tree
Showing 4 changed files with 125 additions and 25 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/mingw32.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,24 @@ jobs:
with:
msystem: MINGW32
update: true
install: git make base-devel mingw-w64-i686-toolchain mingw-w64-i686-libtool mingw-w64-i686-nasm autoconf automake mingw-w64-i686-ncurses mingw-w64-i686-binutils mingw-w64-i686-glib2
install: git make base-devel mingw-w64-i686-toolchain mingw-w64-i686-libtool mingw-w64-i686-nasm autoconf automake mingw-w64-i686-ncurses mingw-w64-i686-binutils mingw-w64-i686-libslirp
- name: Install libslirp
if: false
run: |
# Run this job when MinGW drops 32-bit library support (Other libraries can be built as well)
top=`pwd`
mkdir pkg
cd pkg
git clone https://github.com/msys2/MINGW-packages.git
pwd
cd MINGW-packages
ls -lg
#ls -lg
cd mingw-w64-libslirp
ls -lg
#ls -lg
sed -i -e "s/^mingw_arch=\(.*\)/mingw_arch=(\'mingw32\')/" PKGBUILD
MINGW_ARCH=MINGW32 makepkg-mingw -sCLf --noconfirm
ls -lg
# pacman --noconfirm -U mingw-w64-*-any.pkg.tar.zst
#ls -lg
pacman --noconfirm -U mingw-w64-*-any.pkg.tar.zst
- name: Update build info
shell: bash
run: |
Expand Down
62 changes: 51 additions & 11 deletions .github/workflows/vsbuild_xp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,18 @@ jobs:
if: startsWith(github.ref, 'refs/tags/')
with:
files: dosbox-x-vsbuild-XP-${{ env.timestamp }}.zip
- name: Cache Visual Studio builds
- name: Cache Visual Studio builds (nightly)
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: actions/cache/save@v4
with:
path: ${{ github.workspace }}/vs-bin
key: vs-bin-${{ github.sha }}
key: vs-xp-bin-${{ github.sha }}
- name: Cache Visual Studio builds (release)
if: ${{ startsWith(github.ref, 'refs/tags/') }}
uses: actions/cache/save@v4
with:
path: ${{ github.workspace }}/vs-bin
key: vs-xp-bin-r-${{ github.sha }}
MinGW32_lowend_CI_build:
permissions:
actions: write # for styfle/cancel-workflow-action to cancel/stop running workflows
Expand Down Expand Up @@ -174,11 +181,18 @@ jobs:
./build-mingw
strip -s src/dosbox-x.exe
cp src/dosbox-x.exe mingw-bin/dosbox-x_mingw_lowend_SDL1.exe
- name: Cache MinGW32 lowend builds
- name: Cache MinGW32 lowend builds (nightly)
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: actions/cache/save@v4
with:
path: ${{ github.workspace }}/mingw-bin
key: mingw-xp-bin-${{ github.sha }}
- name: Cache MinGW32 lowend builds (release)
if: ${{ startsWith(github.ref, 'refs/tags/') }}
uses: actions/cache/save@v4
with:
path: ${{ github.workspace }}/mingw-bin
key: mingw-bin-${{ github.sha }}
key: mingw-xp-bin-r-${{ github.sha }}
build-XP-installer:
permissions:
actions: write # for styfle/cancel-workflow-action to cancel/stop running workflows
Expand All @@ -192,16 +206,30 @@ jobs:
shell: bash
steps:
- uses: actions/checkout@v4
- name: Restore Visual Studio builds
- name: Restore Visual Studio builds (nightly)
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: actions/cache/restore@v4
with:
path: ${{ github.workspace }}/vs-bin
key: vs-bin-${{ github.sha }}
- name: Restore MinGW builds
key: vs-xp-bin-${{ github.sha }}
- name: Restore Visual Studio builds (release)
if: ${{ startsWith(github.ref, 'refs/tags/') }}
uses: actions/cache/restore@v4
with:
path: ${{ github.workspace }}/vs-bin
key: vs-xp-bin-r-${{ github.sha }}
- name: Restore MinGW builds (nightly)
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: actions/cache/restore@v4
with:
path: ${{ github.workspace }}/mingw-bin
key: mingw-bin-${{ github.sha }}
key: mingw-xp-bin-${{ github.sha }}
- name: Restore MinGW builds (release)
if: ${{ startsWith(github.ref, 'refs/tags/') }}
uses: actions/cache/restore@v4
with:
path: ${{ github.workspace }}/mingw-bin
key: mingw-xp-bin-r-${{ github.sha }}
- name: Prepare files
shell: bash
run: |
Expand All @@ -226,13 +254,25 @@ jobs:
with:
files: |
contrib/windows/installer/dosbox-x-winXP-*.exe
- name: Clean cache
- name: Clean cache (nightly)
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
run: |
gh extension install actions/gh-actions-cache
## need permission? disable the following lines if error occurs when deleting cache
set +e
gh actions-cache delete mingw-xp-bin-${{ github.sha }} --confirm
gh actions-cache delete vs-xp-bin-${{ github.sha }} --confirm
gh actions-cache list
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Clean cache (release)
if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: |
gh extension install actions/gh-actions-cache
## need permission? disable the following lines if error occurs when deleting cache
set +e
gh actions-cache delete mingw-bin-${{ github.sha }} --confirm
gh actions-cache delete vs-bin-${{ github.sha }} --confirm
gh actions-cache delete mingw-xp-bin-r-${{ github.sha }} --confirm
gh actions-cache delete vs-xp-bin-r-${{ github.sha }} --confirm
gh actions-cache list
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
71 changes: 63 additions & 8 deletions .github/workflows/windows-installers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,18 @@ jobs:
with:
name: dosbox-x-vsbuild-ARM32_64-${{ env.timestamp }}
path: ${{ github.workspace }}/package/
- name: Cache Visual Studio builds
- name: Cache Visual Studio builds (nightly)
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: actions/cache/save@v4
with:
path: ${{ github.workspace }}/vs-bin
key: vs-${{ github.sha }}
- name: Cache Visual Studio builds (release)
if: ${{ startsWith(github.ref, 'refs/tags/') }}
uses: actions/cache/save@v4
with:
path: ${{ github.workspace }}/vs-bin
key: vs-r-${{ github.sha }}
MinGW32_CI_build:
permissions:
actions: write # for styfle/cancel-workflow-action to cancel/stop running workflows
Expand All @@ -172,7 +179,7 @@ jobs:
with:
msystem: MINGW32
update: true
install: git mingw-w64-i686-toolchain mingw-w64-i686-libtool mingw-w64-i686-nasm autoconf automake
install: git mingw-w64-i686-toolchain mingw-w64-i686-libtool mingw-w64-i686-nasm autoconf automake mingw-w64-i686-libslirp
- name: Update build info
shell: bash
run: |
Expand Down Expand Up @@ -202,11 +209,18 @@ jobs:
strip -s $top/src/dosbox-x.exe
cp $top/src/dosbox-x.exe $top/package/dosbox-x_MinGWx86_SDL2.exe
cp $top/src/dosbox-x.exe $top/mingw-x86-bin/dosbox-x_MinGWx86_SDL2.exe
- name: Cache MinGW x86 builds
- name: Cache MinGW x86 builds (nightly)
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: actions/cache/save@v4
with:
path: ${{ github.workspace }}/mingw-x86-bin
key: mingw-x86-bin-${{ github.sha }}
- name: Cache MinGW x86 builds (release)
if: ${{ startsWith(github.ref, 'refs/tags/') }}
uses: actions/cache/save@v4
with:
path: ${{ github.workspace }}/vs-bin
key: mingw-x86-bin-r-${{ github.sha }}
MinGW64_CI_build:
permissions:
actions: write # for styfle/cancel-workflow-action to cancel/stop running workflows
Expand Down Expand Up @@ -255,11 +269,18 @@ jobs:
strip -s $top/src/dosbox-x.exe
cp $top/src/dosbox-x.exe $top/package/dosbox-x_MinGWx64_SDL2.exe
cp $top/src/dosbox-x.exe $top/mingw-x64-bin/dosbox-x_MinGWx64_SDL2.exe
- name: Cache MinGW x64 builds
- name: Cache MinGW x64 builds (nightly)
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: actions/cache/save@v4
with:
path: ${{ github.workspace }}/mingw-x64-bin
key: mingw-x64-bin-${{ github.sha }}
- name: Cache MinGW x64 builds (release)
if: ${{ startsWith(github.ref, 'refs/tags/') }}
uses: actions/cache/save@v4
with:
path: ${{ github.workspace }}/vs-bin
key: mingw-x64-bin-r-${{ github.sha }}
Build_Windows_Installer:
permissions:
actions: write # for styfle/cancel-workflow-action to cancel/stop running workflows
Expand All @@ -273,21 +294,42 @@ jobs:
shell: bash
steps:
- uses: actions/checkout@v4
- name: Restore MinGW x86 builds
- name: Restore MinGW x86 builds (nightly)
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: actions/cache/restore@v4
with:
path: ${{ github.workspace }}/mingw-x86-bin
key: mingw-x86-bin-${{ github.sha }}
- name: Restore MinGW x64 builds
- name: Restore MinGW x64 builds (nightly)
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: actions/cache/restore@v4
with:
path: ${{ github.workspace }}/mingw-x64-bin
key: mingw-x64-bin-${{ github.sha }}
- name: Restore Visual Studio builds
- name: Restore Visual Studio builds (nightly)
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: actions/cache/restore@v4
with:
path: ${{ github.workspace }}/vs-bin
key: vs-${{ github.sha }}
- name: Restore MinGW x86 builds (release)
if: ${{ startsWith(github.ref, 'refs/tags/') }}
uses: actions/cache/restore@v4
with:
path: ${{ github.workspace }}/mingw-x86-bin
key: mingw-x86-bin-r-${{ github.sha }}
- name: Restore MinGW x64 builds (release)
if: ${{ startsWith(github.ref, 'refs/tags/') }}
uses: actions/cache/restore@v4
with:
path: ${{ github.workspace }}/mingw-x64-bin
key: mingw-x64-bin-r-${{ github.sha }}
- name: Restore Visual Studio builds (release)
if: ${{ startsWith(github.ref, 'refs/tags/') }}
uses: actions/cache/restore@v4
with:
path: ${{ github.workspace }}/vs-bin
key: vs-r-${{ github.sha }}
- name: Package MinGW builds
run: |
set +e
Expand Down Expand Up @@ -356,7 +398,8 @@ jobs:
with:
files: |
contrib/windows/installer/dosbox-x-windows*.exe
- name: Clean cache
- name: Clean cache (nightly)
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
run: |
gh extension install actions/gh-actions-cache
## need permission? disable the following lines if error occurs when deleting cache
Expand All @@ -367,3 +410,15 @@ jobs:
gh actions-cache list
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Clean cache (release)
if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: |
gh extension install actions/gh-actions-cache
## need permission? disable the following lines if error occurs when deleting cache
set +e
gh actions-cache delete mingw-x86-bin-r-${{ github.sha }} --confirm
gh actions-cache delete mingw-x64-bin-r-${{ github.sha }} --confirm
gh actions-cache delete vs-r-${{ github.sha }} --confirm
gh actions-cache list
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5 changes: 4 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Next:
-
- Restore libslirp support for 32-bit MinGW CI builds which was temporarily
dropped in 2024.03.01 release. Also since MinGW plans to gradually phase
out 32-bit support, added code to manually build on our own. (maron2000)
- Fix build errors of Windows installers (maron2000)

2024.03.01
- If an empty CD-ROM drive is attached to IDE emulation, return "Medium Not
Expand Down

0 comments on commit 4a76a38

Please sign in to comment.