ref: 9bc73c51d61a7e12a38e633806598a3bf558900e
parent: f78d8b0a1f3f8dbcdd8c05b95d2f3725b31ebdb0
author: allkern <lisandroaalarcon@gmail.com>
date: Sat May 11 09:22:06 EDT 2024
Update SDL2 version Fix Windows build scripts
--- a/.gitignore
+++ b/.gitignore
@@ -4,7 +4,7 @@
imgui/
res/
sdl2/
-SDL2-2.26.5/
+SDL2-2.30.3/
sdl2-win32/
sdl2-win64/
test/
@@ -20,5 +20,5 @@
*.zip
*.cue
*.iso
-*.mcd
-*.rom
+*.mcd
+*.rom
--- a/build-deps.ps1
+++ b/build-deps.ps1
@@ -1,10 +1,10 @@
-if (Test-Path "SDL2-2.26.5") {
- Remove-Item -Recurse "SDL2-2.26.5"
+if (Test-Path "SDL2-2.30.3") {
+ Remove-Item -Recurse "SDL2-2.30.3"
}
-$SDL2_URL = "https://github.com/libsdl-org/SDL/releases/download/release-2.26.5/SDL2-devel-2.26.5-mingw.zip"
-$WIN32_URL = "https://github.com/libsdl-org/SDL/releases/download/release-2.26.5/SDL2-2.26.5-win32-x86.zip"
-$WIN64_URL = "https://github.com/libsdl-org/SDL/releases/download/release-2.26.5/SDL2-2.26.5-win32-x64.zip"
+$SDL2_URL = "https://github.com/libsdl-org/SDL/releases/download/release-2.30.3/SDL2-devel-2.30.3-mingw.zip"
+$WIN32_URL = "https://github.com/libsdl-org/SDL/releases/download/release-2.30.3/SDL2-2.30.3-win32-x86.zip"
+$WIN64_URL = "https://github.com/libsdl-org/SDL/releases/download/release-2.30.3/SDL2-2.30.3-win32-x64.zip"
Invoke-WebRequest -URI $SDL2_URL -OutFile "sdl2.zip"
Expand-Archive "sdl2.zip" -DestinationPath "." -Force
--- a/build-win32.ps1
+++ b/build-win32.ps1
@@ -6,7 +6,7 @@
(Get-WMIObject win32_operatingsystem).version + " " + `
(Get-WMIObject win32_operatingsystem).OSArchitecture
-$SDL2_DIR = "SDL2-2.26.5\x86_64-w64-mingw32"
+$SDL2_DIR = "SDL2-2.26.5\i686-w64-mingw32"
$PSX_DIR = "."
mkdir -Force -Path bin > $null
@@ -29,4 +29,4 @@
-Wno-address-of-packed-member `
-ffast-math -Ofast -g -flto
-Copy-Item -Path "sdl2-win32/SDL2.dll" -Destination "bin"
\ No newline at end of file
+ Copy-Item -Path "$($SDL2_DIR)\bin\SDL2.dll" -Destination "bin"
\ No newline at end of file
--- a/build-win64.ps1
+++ b/build-win64.ps1
@@ -1,5 +1,3 @@
-Set-PSDebug -Trace 1
-
git fetch --all --tags
$VERSION_TAG = git describe --always --tags --abbrev=0
@@ -8,14 +6,14 @@
(Get-WMIObject win32_operatingsystem).version + " " + `
(Get-WMIObject win32_operatingsystem).OSArchitecture
-$SDL2_DIR = "SDL2-2.26.5\x86_64-w64-mingw32"
+$SDL2_DIR = "SDL2-2.30.3\x86_64-w64-mingw32"
$PSX_DIR = "."
mkdir -Force -Path bin > $null
-gcc -I"`"$($PSX_DIR)`"" `
- -I"`"$($PSX_DIR)\psx`"" `
- -I"`"$($SDL2_DIR)\include\SDL2`"" `
+gcc -I"$($PSX_DIR)" `
+ -I"$($PSX_DIR)\psx" `
+ -I"$($SDL2_DIR)\include\SDL2" `
"psx\*.c" `
"psx\dev\*.c" `
"psx\input\*.c" `
@@ -31,4 +29,4 @@
-Wno-address-of-packed-member `
-ffast-math -Ofast -g -flto
-Copy-Item -Path "sdl2-win64/SDL2.dll" -Destination "bin"
\ No newline at end of file
+ Copy-Item -Path "$($SDL2_DIR)\bin\SDL2.dll" -Destination "bin"
\ No newline at end of file
--
⑨