ref: f78d8b0a1f3f8dbcdd8c05b95d2f3725b31ebdb0
parent: 2dbc44928fbd1df0200bff76a2bf9b6f61974d73
author: allkern <lisandroaalarcon@gmail.com>
date: Sat May 11 08:45:43 EDT 2024
Update Windows build scripts
--- a/build-win32.ps1
+++ b/build-win32.ps1
@@ -2,7 +2,9 @@
$VERSION_TAG = git describe --always --tags --abbrev=0
$COMMIT_HASH = git rev-parse --short HEAD
-$OS_INFO = (Get-WMIObject win32_operatingsystem).caption + " " + (Get-WMIObject win32_operatingsystem).version + " " + (Get-WMIObject win32_operatingsystem).OSArchitecture
+$OS_INFO = (Get-WMIObject win32_operatingsystem).caption + " " + `
+ (Get-WMIObject win32_operatingsystem).version + " " + `
+ (Get-WMIObject win32_operatingsystem).OSArchitecture
$SDL2_DIR = "SDL2-2.26.5\x86_64-w64-mingw32"
$PSX_DIR = "."
@@ -11,7 +13,6 @@
gcc -I"`"$($PSX_DIR)`"" `
-I"`"$($PSX_DIR)\psx`"" `
- -I"`"$($SDL2_DIR)\include`"" `
-I"`"$($SDL2_DIR)\include\SDL2`"" `
"psx\*.c" `
"psx\dev\*.c" `
@@ -25,6 +26,7 @@
-L"`"$($SDL2_DIR)\lib`"" `
-lSDL2main -lSDL2 -Wno-overflow `
-Wall -pedantic -DLOG_USE_COLOR `
- -ffast-math -Ofast
+ -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
--- a/build-win64.ps1
+++ b/build-win64.ps1
@@ -1,8 +1,12 @@
+Set-PSDebug -Trace 1
+
git fetch --all --tags
$VERSION_TAG = git describe --always --tags --abbrev=0
$COMMIT_HASH = git rev-parse --short HEAD
-$OS_INFO = (Get-WMIObject win32_operatingsystem).caption + " " + (Get-WMIObject win32_operatingsystem).version + " " + (Get-WMIObject win32_operatingsystem).OSArchitecture
+$OS_INFO = (Get-WMIObject win32_operatingsystem).caption + " " + `
+ (Get-WMIObject win32_operatingsystem).version + " " + `
+ (Get-WMIObject win32_operatingsystem).OSArchitecture
$SDL2_DIR = "SDL2-2.26.5\x86_64-w64-mingw32"
$PSX_DIR = "."
@@ -9,12 +13,8 @@
mkdir -Force -Path bin > $null
-Get-ChildItem
-Get-ChildItem psx
-
gcc -I"`"$($PSX_DIR)`"" `
-I"`"$($PSX_DIR)\psx`"" `
- -I"`"$($SDL2_DIR)\include`"" `
-I"`"$($SDL2_DIR)\include\SDL2`"" `
"psx\*.c" `
"psx\dev\*.c" `
--
⑨