Skip to content

Commit

Permalink
Update Windows build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
allkern committed May 11, 2024
1 parent 2dbc449 commit f78d8b0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
8 changes: 5 additions & 3 deletions build-win32.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ 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 = "."
Expand All @@ -11,7 +13,6 @@ mkdir -Force -Path bin > $null

gcc -I"`"$($PSX_DIR)`"" `
-I"`"$($PSX_DIR)\psx`"" `
-I"`"$($SDL2_DIR)\include`"" `
-I"`"$($SDL2_DIR)\include\SDL2`"" `
"psx\*.c" `
"psx\dev\*.c" `
Expand All @@ -25,6 +26,7 @@ gcc -I"`"$($PSX_DIR)`"" `
-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"
10 changes: 5 additions & 5 deletions build-win64.ps1
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
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 = "."

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" `
Expand Down

0 comments on commit f78d8b0

Please sign in to comment.