Skip to content

Merge pull request #6197 from maron2000/fix_mscdex #3571

Merge pull request #6197 from maron2000/fix_mscdex

Merge pull request #6197 from maron2000/fix_mscdex #3571

Workflow file for this run

name: 32-bit Visual Studio builds
on:
push:
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
MSBuild32_CI_build:
permissions:
actions: write # for styfle/cancel-workflow-action to cancel/stop running workflows
contents: write # for actions/checkout to fetch code and softprops/action-gh-release
if: github.event_name == 'push' || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
runs-on: windows-latest
defaults:
run:
shell: pwsh
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.13.1
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v6
- uses: microsoft/setup-msbuild@v3
- name: Prepare Visual Studio Win32
shell: bash
run: |
echo "timestamp=`git show -s --format=%at | xargs -I# date -d @# +%Y%m%d%H%M%S`" >> $GITHUB_ENV
export shortsha=`echo ${GITHUB_SHA} | cut -c1-7`
export copyrightyear=`git show -s --format=%at | xargs -I# date -d @# +'%Y'`
export updatestr=`git show -s --format=%at | xargs -I# date -d @# +'%b %d, %Y %I:%M:%S%P'`
echo '/* auto generated */' > include/build_timestamp.h
echo "#define UPDATED_STR \"${updatestr}\"" >> include/build_timestamp.h
echo "#define GIT_COMMIT_HASH \"${shortsha}\"" >> include/build_timestamp.h
echo "#define COPYRIGHT_END_YEAR \"${copyrightyear}\"" >> include/build_timestamp.h
cat include/build_timestamp.h
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
VERSION=$(echo "${GITHUB_REF##*/}" | sed -E 's/^dosbox-x-v([0-9]+\.[0-9]+\.[0-9]+)$/\1/' || echo "unknown")
echo "VERSION=$VERSION" >> $GITHUB_ENV
fi
- name: Build Visual Studio Win32 SDL1
shell: pwsh
run: |
msbuild -m vs/dosbox-x.sln -t:dosbox-x:Rebuild -p:Configuration=Release -p:Platform=Win32
if (-not(Test-Path -Path bin\Win32\Release\dosbox-x.exe -PathType Leaf)) {exit 1}
contrib\windows\installer\PatchPE.exe bin\Win32\Release\dosbox-x.exe
- name: Package Visual Studio Win32 SDL1
shell: bash
run: |
top=`pwd`
$top/bin/Win32/Release/dosbox-x.exe -tests -set waitonerror=false -set logfile=tests.log || (echo Unit test completed: failure && exit 1)
cat tests.log
mkdir -p $top/package/bin/Win32/Release/drivez
mkdir -p $top/package/bin/Win32/Release/scripts
mkdir -p $top/package/bin/Win32/Release/shaders
mkdir -p $top/package/bin/Win32/Release/glshaders
mkdir -p $top/package/bin/Win32/Release/languages
sed -e 's/^\(output[ ]*=[ ]*\)default$/\1ttf/;s/^\(windowposition[ ]*=\)[ ]*-/\1 /;s/^\(file access tries[ ]*=[ ]*\)0$/\13/;s/^\(printoutput[ ]*=[ ]*\)png$/\1printer/;s/\(drive data rate limit[ ]*=[ ]*\)-1$/\10/' $top/dosbox-x.reference.conf>$top/package/bin/Win32/Release/dosbox-x.conf
cp $top/bin/Win32/Release/dosbox-x.exe $top/package/bin/Win32/Release/dosbox-x.exe
cp $top/CHANGELOG $top/package/bin/Win32/Release/CHANGELOG.txt
cp $top/dosbox-x.reference.conf $top/package/bin/Win32/Release/dosbox-x.reference.conf
cp $top/dosbox-x.reference.full.conf $top/package/bin/Win32/Release/dosbox-x.reference.full.conf
cp $top/contrib/windows/installer/readme.txt $top/package/bin/Win32/Release/README.txt
cp $top/contrib/windows/installer/inpout32.dll $top/package/bin/Win32/Release/inpout32.dll
cp $top/contrib/fonts/FREECG98.BMP $top/package/bin/Win32/Release/FREECG98.BMP
cp $top/contrib/fonts/wqy_1?pt.bdf $top/package/bin/Win32/Release/
cp $top/contrib/fonts/Nouveau_IBM.ttf $top/package/bin/Win32/Release/Nouveau_IBM.ttf
cp $top/contrib/fonts/SarasaGothicFixed.ttf $top/package/bin/Win32/Release/SarasaGothicFixed.ttf
cp $top/contrib/windows/installer/drivez_readme.txt $top/package/bin/Win32/Release/drivez/readme.txt
cp $top/contrib/windows/installer/windows_explorer_context_menu*.bat $top/package/bin/Win32/Release/scripts/
cp $top/contrib/windows/shaders/* $top/package/bin/Win32/Release/shaders/
cp $top/contrib/glshaders/* $top/package/bin/Win32/Release/glshaders/
cp $top/contrib/translations/*/*.lng $top/package/bin/Win32/Release/languages/
- name: Build Visual Studio Win32 SDL2
shell: pwsh
run: |
msbuild -m vs/dosbox-x.sln -t:dosbox-x:Rebuild -p:Configuration="Release SDL2" -p:Platform=Win32
if (-not(Test-Path -Path bin\Win32\"Release SDL2"\dosbox-x.exe -PathType Leaf)) {exit 1}
contrib\windows\installer\PatchPE.exe bin\Win32\"Release SDL2"\dosbox-x.exe
- name: Package Visual Studio Win32 SDL2
shell: bash
run: |
top=`pwd`
$top/bin/Win32/"Release SDL2"/dosbox-x.exe -tests -set waitonerror=false -set logfile=tests.log || (echo Unit test completed: failure && exit 1)
cat tests.log
mkdir -p $top/package/bin/Win32/"Release SDL2"/drivez
mkdir -p $top/package/bin/Win32/"Release SDL2"/scripts
mkdir -p $top/package/bin/Win32/"Release SDL2"/shaders
mkdir -p $top/package/bin/Win32/"Release SDL2"/glshaders
mkdir -p $top/package/bin/Win32/"Release SDL2"/languages
sed -e 's/^\(output[ ]*=[ ]*\)default$/\1ttf/;s/^\(windowposition[ ]*=\)[ ]*-/\1 /;s/^\(file access tries[ ]*=[ ]*\)0$/\13/;s/^\(printoutput[ ]*=[ ]*\)png$/\1printer/;s/\(drive data rate limit[ ]*=[ ]*\)-1$/\10/' $top/dosbox-x.reference.conf>$top/package/bin/Win32/"Release SDL2"/dosbox-x.conf
cp $top/bin/Win32/"Release SDL2"/dosbox-x.exe $top/package/bin/Win32/"Release SDL2"/dosbox-x.exe
cp $top/CHANGELOG $top/package/bin/Win32/"Release SDL2"/CHANGELOG.txt
cp $top/dosbox-x.reference.conf $top/package/bin/Win32/"Release SDL2"/dosbox-x.reference.conf
cp $top/dosbox-x.reference.full.conf $top/package/bin/Win32/"Release SDL2"/dosbox-x.reference.full.conf
cp $top/contrib/windows/installer/readme.txt $top/package/bin/Win32/"Release SDL2"/README.txt
cp $top/contrib/windows/installer/inpout32.dll $top/package/bin/Win32/"Release SDL2"/inpout32.dll
cp $top/contrib/fonts/FREECG98.BMP $top/package/bin/Win32/"Release SDL2"/FREECG98.BMP
cp $top/contrib/fonts/wqy_1?pt.bdf $top/package/bin/Win32/"Release SDL2"/
cp $top/contrib/fonts/Nouveau_IBM.ttf $top/package/bin/Win32/"Release SDL2"/Nouveau_IBM.ttf
cp $top/contrib/fonts/SarasaGothicFixed.ttf $top/package/bin/Win32/"Release SDL2"/SarasaGothicFixed.ttf
cp $top/contrib/windows/installer/drivez_readme.txt $top/package/bin/Win32/"Release SDL2"/drivez/readme.txt
cp $top/contrib/windows/installer/windows_explorer_context_menu*.bat $top/package/bin/Win32/"Release SDL2"/scripts/
cp $top/contrib/windows/shaders/* $top/package/bin/Win32/"Release SDL2"/shaders/
cp $top/contrib/glshaders/* $top/package/bin/Win32/"Release SDL2"/glshaders/
cp $top/contrib/translations/*/*.lng $top/package/bin/Win32/"Release SDL2"/languages/
cp $top/COPYING $top/package/COPYING
cd $top/package/
TIMESTAMP="${{ env.timestamp }}"
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
ZIPNAME="dosbox-x-vsbuild-win32-${VERSION}-portable.zip"
$top/vs/tool/zip.exe -r -9 "$top/$ZIPNAME" *
else
ZIPNAME="dosbox-x-vsbuild-win32-${TIMESTAMP}-nightly"
fi
echo "ZIPNAME=$ZIPNAME" >> $GITHUB_ENV
cd $top
- name: Upload preview package
uses: actions/upload-artifact@v7.0.0
with:
name: ${{ env.ZIPNAME }}
path: ${{ github.workspace }}/package/
- name: Upload release package
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{ env.ZIPNAME }}
MSBuild_ARM32_CI_build:
permissions:
actions: write # for styfle/cancel-workflow-action to cancel/stop running workflows
contents: write # for actions/checkout to fetch code and softprops/action-gh-release
if: github.event_name == 'push' || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
runs-on: windows-2022
defaults:
run:
shell: pwsh
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.13.1
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v6
- uses: microsoft/setup-msbuild@v3
- name: Prepare Visual Studio ARM32
shell: bash
run: |
echo "timestamp=`git show -s --format=%at | xargs -I# date -d @# +%Y%m%d%H%M%S`" >> $GITHUB_ENV
export shortsha=`echo ${GITHUB_SHA} | cut -c1-7`
export copyrightyear=`git show -s --format=%at | xargs -I# date -d @# +'%Y'`
export updatestr=`git show -s --format=%at | xargs -I# date -d @# +'%b %d, %Y %I:%M:%S%P'`
echo '/* auto generated */' > include/build_timestamp.h
echo "#define UPDATED_STR \"${updatestr}\"" >> include/build_timestamp.h
echo "#define GIT_COMMIT_HASH \"${shortsha}\"" >> include/build_timestamp.h
echo "#define COPYRIGHT_END_YEAR \"${copyrightyear}\"" >> include/build_timestamp.h
cat include/build_timestamp.h
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
VERSION=$(echo "${GITHUB_REF##*/}" | sed -E 's/^dosbox-x-v([0-9]+\.[0-9]+\.[0-9]+)$/\1/' || echo "unknown")
echo "VERSION=$VERSION" >> $GITHUB_ENV
fi
- name: Build Visual Studio ARM32 SDL1
shell: pwsh
run: |
msbuild -m vs/dosbox-x.sln -t:dosbox-x:Rebuild -p:Configuration=Release -p:Platform=ARM -p:PostBuildEventUseInBuild=false -p:PlatformToolset=v143 -p:WindowsTargetPlatformVersion=10.0.22621.0
if (-not(Test-Path -Path bin\ARM\Release\dosbox-x.exe -PathType Leaf)) {exit 1}
- name: Package Visual Studio ARM32 SDL1
shell: bash
run: |
top=`pwd`
mkdir -p $top/package/bin/ARM/Release/drivez
mkdir -p $top/package/bin/ARM/Release/scripts
mkdir -p $top/package/bin/ARM/Release/shaders
mkdir -p $top/package/bin/ARM/Release/glshaders
mkdir -p $top/package/bin/ARM/Release/languages
sed -e 's/^\(output[ ]*=[ ]*\)default$/\1ttf/;s/^\(windowposition[ ]*=\)[ ]*-/\1 /;s/^\(file access tries[ ]*=[ ]*\)0$/\13/;s/^\(printoutput[ ]*=[ ]*\)png$/\1printer/;s/\(drive data rate limit[ ]*=[ ]*\)-1$/\10/' $top/dosbox-x.reference.conf>$top/package/bin/ARM/Release/dosbox-x.conf
cp $top/bin/ARM/Release/dosbox-x.exe $top/package/bin/ARM/Release/dosbox-x.exe
cp $top/CHANGELOG $top/package/bin/ARM/Release/CHANGELOG.txt
cp $top/dosbox-x.reference.conf $top/package/bin/ARM/Release/dosbox-x.reference.conf
cp $top/dosbox-x.reference.full.conf $top/package/bin/ARM/Release/dosbox-x.reference.full.conf
cp $top/contrib/windows/installer/readme.txt $top/package/bin/ARM/Release/README.txt
cp $top/contrib/fonts/FREECG98.BMP $top/package/bin/ARM/Release/FREECG98.BMP
cp $top/contrib/fonts/wqy_1?pt.bdf $top/package/bin/ARM/Release/
cp $top/contrib/fonts/Nouveau_IBM.ttf $top/package/bin/ARM/Release/Nouveau_IBM.ttf
cp $top/contrib/fonts/SarasaGothicFixed.ttf $top/package/bin/ARM/Release/SarasaGothicFixed.ttf
cp $top/contrib/windows/installer/drivez_readme.txt $top/package/bin/ARM/Release/drivez/readme.txt
cp $top/contrib/windows/installer/windows_explorer_context_menu*.bat $top/package/bin/ARM/Release/scripts/
cp $top/contrib/windows/shaders/* $top/package/bin/ARM/Release/shaders/
cp $top/contrib/glshaders/* $top/package/bin/ARM/Release/glshaders/
cp $top/contrib/translations/*/*.lng $top/package/bin/ARM/Release/languages/
- name: Build Visual Studio ARM32 SDL2
shell: pwsh
run: |
msbuild -m vs/dosbox-x.sln -t:dosbox-x:Rebuild -p:Configuration="Release SDL2" -p:Platform=ARM -p:PostBuildEventUseInBuild=false -p:PlatformToolset=v143 -p:WindowsTargetPlatformVersion=10.0.22621.0
if (-not(Test-Path -Path bin\ARM\"Release SDL2"\dosbox-x.exe -PathType Leaf)) {exit 1}
- name: Package Visual Studio ARM32 SDL2
shell: bash
run: |
top=`pwd`
mkdir -p $top/package/bin/ARM/"Release SDL2"/drivez
mkdir -p $top/package/bin/ARM/"Release SDL2"/scripts
mkdir -p $top/package/bin/ARM/"Release SDL2"/shaders
mkdir -p $top/package/bin/ARM/"Release SDL2"/glshaders
mkdir -p $top/package/bin/ARM/"Release SDL2"/languages
sed -e 's/^\(output[ ]*=[ ]*\)default$/\1ttf/;s/^\(windowposition[ ]*=\)[ ]*-/\1 /;s/^\(file access tries[ ]*=[ ]*\)0$/\13/;s/^\(printoutput[ ]*=[ ]*\)png$/\1printer/;s/\(drive data rate limit[ ]*=[ ]*\)-1$/\10/' $top/dosbox-x.reference.conf>$top/package/bin/ARM/"Release SDL2"/dosbox-x.conf
cp $top/bin/ARM/"Release SDL2"/dosbox-x.exe $top/package/bin/ARM/"Release SDL2"/dosbox-x.exe
cp $top/CHANGELOG $top/package/bin/ARM/"Release SDL2"/CHANGELOG.txt
cp $top/dosbox-x.reference.conf $top/package/bin/ARM/"Release SDL2"/dosbox-x.reference.conf
cp $top/dosbox-x.reference.full.conf $top/package/bin/ARM/"Release SDL2"/dosbox-x.reference.full.conf
cp $top/contrib/windows/installer/readme.txt $top/package/bin/ARM/"Release SDL2"/README.txt
cp $top/contrib/fonts/FREECG98.BMP $top/package/bin/ARM/"Release SDL2"/FREECG98.BMP
cp $top/contrib/fonts/wqy_1?pt.bdf $top/package/bin/ARM/"Release SDL2"/
cp $top/contrib/fonts/Nouveau_IBM.ttf $top/package/bin/ARM/"Release SDL2"/Nouveau_IBM.ttf
cp $top/contrib/fonts/SarasaGothicFixed.ttf $top/package/bin/ARM/"Release SDL2"/SarasaGothicFixed.ttf
cp $top/contrib/windows/installer/drivez_readme.txt $top/package/bin/ARM/"Release SDL2"/drivez/readme.txt
cp $top/contrib/windows/installer/windows_explorer_context_menu*.bat $top/package/bin/ARM/"Release SDL2"/scripts/
cp $top/contrib/windows/shaders/* $top/package/bin/ARM/"Release SDL2"/shaders/
cp $top/contrib/glshaders/* $top/package/bin/ARM/"Release SDL2"/glshaders/
cp $top/contrib/translations/*/*.lng $top/package/bin/ARM/"Release SDL2"/languages/
cp $top/COPYING $top/package/COPYING
cd $top/package/
TIMESTAMP="${{ env.timestamp }}"
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
ZIPNAME="dosbox-x-vsbuild-arm32-${VERSION}-portable.zip"
$top/vs/tool/zip.exe -r -9 "$top/$ZIPNAME" *
else
ZIPNAME="dosbox-x-vsbuild-arm32-${TIMESTAMP}-nightly"
fi
echo "ZIPNAME=$ZIPNAME" >> $GITHUB_ENV
cd $top
- name: Upload preview package
uses: actions/upload-artifact@v7.0.0
with:
name: ${{ env.ZIPNAME }}
path: ${{ github.workspace }}/package/
- name: Upload release package
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{ env.ZIPNAME }}