Experimental nightly build by VS2022

This commit is contained in:
maron2000 2024-11-01 17:34:35 +09:00
parent 03f04db5ae
commit 04c4265112
2 changed files with 98 additions and 0 deletions

View File

@ -217,3 +217,98 @@ jobs:
if: startsWith(github.ref, 'refs/tags/')
with:
files: dosbox-x-vsbuild-arm64-${{ env.timestamp }}.zip
MS2022Build64_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.12.1
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v4
- uses: microsoft/setup-msbuild@v2
- name: Prepare Visual Studio 2022 build
shell: bash
run: |
echo "timestamp=`git show -s --format=%at | xargs -I# date -d @# +%Y%m%d%H%M%S`" >> $GITHUB_ENV
ls -1 vs/dosbox-x.vcxproj vs/freetype/builds/windows/vc2010/freetype.vcxproj vs/libpdcurses/libpdcurses.vcxproj vs/libpng/projects/vstudio/libpng/libpng.vcxproj vs/libpng/projects/vstudio/libpng/libpng.vcxproj vs/sdl/VisualC/SDL/SDL.vcxproj vs/sdl/VisualC/SDLmain/SDLmain.vcxproj vs/sdl2/VisualC/SDL/SDL.vcxproj vs/sdl2/VisualC/SDLmain/SDLmain.vcxproj vs/sdlnet/VisualC/SDL_net_VS2008.vcxproj vs/sdlnet/VisualC/SDL_net_VS2008.vcxproj vs/zlib/zlib/zlib.vcxproj | xargs sed -b -i 's/v14[2-9]/v143/g'
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
- 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}
- 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}
- name: Build Visual Studio Win64 SDL1
shell: pwsh
run: |
msbuild -m vs/dosbox-x.sln -t:dosbox-x:Rebuild -p:Configuration=Release -p:Platform=x64
if (-not(Test-Path -Path bin\x64\Release\dosbox-x.exe -PathType Leaf)) {exit 1}
- name: Build Visual Studio Win64 SDL2
shell: pwsh
run: |
msbuild -m vs/dosbox-x.sln -t:dosbox-x:Rebuild -p:Configuration="Release SDL2" -p:Platform=x64
if (-not(Test-Path -Path bin\x64\"Release SDL2"\dosbox-x.exe -PathType Leaf)) {exit 1}
- name: Package Visual Studio 2022 build
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/drivez
mkdir -p $top/package/scripts
mkdir -p $top/package/shaders
mkdir -p $top/package/glshaders
mkdir -p $top/package/languages
mkdir -p $top/vs-bin
cp $top/bin/Win32/Release/dosbox-x.exe $top/package/dosbox-x_VS2022x86_SDL1.exe
cp $top/bin/Win32/"Release SDL2"/dosbox-x.exe $top/package/dosbox-x_VS2022x86_SDL2.exe
cp $top/bin/x64/Release/dosbox-x.exe $top/package/dosbox-x_VS2022x64_SDL1.exe
cp $top/bin/x64/"Release SDL2"/dosbox-x.exe $top/package/dosbox-x_VS2022x64_SDL2.exe
cp $top/bin/Win32/Release/dosbox-x.exe $top/vs-bin/dosbox-x_VS2022x86_SDL1.exe
cp $top/bin/Win32/"Release SDL2"/dosbox-x.exe $top/vs-bin/dosbox-x_VS2022x86_SDL2.exe
cp $top/bin/x64/Release/dosbox-x.exe $top/vs-bin/dosbox-x_VS2022x64_SDL1.exe
cp $top/bin/x64/"Release SDL2"/dosbox-x.exe $top/vs-bin/dosbox-x_VS2022x64_SDL2.exe
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/dosbox-x.conf
cp $top/CHANGELOG $top/package/CHANGELOG.txt
cp $top/dosbox-x.reference.conf $top/package/dosbox-x.reference.conf
cp $top/dosbox-x.reference.full.conf $top/package/dosbox-x.reference.full.conf
cp $top/contrib/windows/installer/readme.txt $top/package/README.txt
cp $top/contrib/windows/installer/inpout32.dll $top/package/inpout32.dll
cp $top/contrib/windows/installer/inpoutx64.dll $top/package/inpoutx64.dll
cp $top/contrib/fonts/FREECG98.BMP $top/package/FREECG98.BMP
cp $top/contrib/fonts/wqy_1?pt.bdf $top/package/
cp $top/contrib/fonts/Nouveau_IBM.ttf $top/package/Nouveau_IBM.ttf
cp $top/contrib/fonts/SarasaGothicFixed.ttf $top/package/SarasaGothicFixed.ttf
cp $top/contrib/windows/installer/drivez_readme.txt $top/package/drivez/readme.txt
cp $top/contrib/windows/installer/windows_explorer_context_menu*.bat $top/package/scripts/
cp $top/contrib/windows/shaders/* $top/package/shaders/
cp $top/contrib/glshaders/* $top/package/glshaders/
cp $top/contrib/translations/*/*.lng $top/package/languages/
cp $top/COPYING $top/package/COPYING
cd $top/package/
$top/vs/tool/zip.exe -r -9 $top/dosbox-x-vs2022build-${{ env.timestamp }}-experimental.zip *
cd $top
- name: Upload preview package
uses: actions/upload-artifact@v4.4.3
with:
name: dosbox-x-vs2022build-${{ env.timestamp }}-experimental
path: ${{ github.workspace }}/package/

View File

@ -120,6 +120,8 @@ localexit:
/* *INDENT-ON* */
}
//Causes conflict with LIBCMT on VS2022
#if _MSC_VER <= 1930
void _ftol2_sse()
{
_ftol();
@ -129,6 +131,7 @@ void _ftol2()
{
_ftol();
}
#endif
/* 64-bit math operators for 32-bit systems */
void __declspec(naked) _allmul()