Skip to content

Commit bd961f5

Browse files
committed
Refactor build script to use PowerShell for downloading and extracting SDL2 and FFTW dependencies
1 parent d5d8b5f commit bd961f5

1 file changed

Lines changed: 22 additions & 19 deletions

File tree

.github/workflows/build.yml

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,27 +26,30 @@ jobs:
2626
arch: amd64_x86
2727

2828
- name: get sdl, fftw
29+
shell: powershell
2930
run: |
30-
curl.exe http://www.libsdl.org/release/SDL2-devel-2.0.16-VC.zip --output sdl.zip
31-
curl.exe http://www.libsdl.org/projects/SDL_image/release/SDL2_image-devel-2.0.5-VC.zip --output sdl_im.zip
32-
tar -xf sdl.zip
33-
tar -xf sdl_im.zip
34-
ren SDL2_image-2.0.5 SDL2_IM_VC
35-
ren SDL2-2.0.16 SDL2_VC
36-
move .\SDL2_IM_VC\include\* .\SDL2_VC\include\
37-
move .\SDL2_IM_VC\lib\x64\* .\SDL2_VC\lib\x64
38-
move .\SDL2_IM_VC\lib\x86\* .\SDL2_VC\lib\x86
39-
move SDL2_VC C:\
40-
del sdl.zip
41-
del sdl_im.zip
42-
mkdir FFTW
43-
cd FFTW
44-
curl.exe https://fftw.org/pub/fftw/fftw-3.3.5-dll64.zip --output fftw.zip
45-
tar -xf fftw.zip
46-
del fftw.zip
31+
# Download SDL2 and SDL2_image and extract using PowerShell (follows redirects and supports ZIP)
32+
Invoke-WebRequest -Uri "https://www.libsdl.org/release/SDL2-devel-2.0.16-VC.zip" -OutFile sdl.zip -UseBasicParsing
33+
Invoke-WebRequest -Uri "https://www.libsdl.org/projects/SDL_image/release/SDL2_image-devel-2.0.5-VC.zip" -OutFile sdl_im.zip -UseBasicParsing
34+
Expand-Archive -LiteralPath sdl.zip -DestinationPath .
35+
Expand-Archive -LiteralPath sdl_im.zip -DestinationPath .
36+
Rename-Item SDL2_image-2.0.5 SDL2_IM_VC
37+
Rename-Item SDL2-2.0.16 SDL2_VC
38+
Move-Item .\SDL2_IM_VC\include\* .\SDL2_VC\include\
39+
Move-Item .\SDL2_IM_VC\lib\x64\* .\SDL2_VC\lib\x64\
40+
Move-Item .\SDL2_IM_VC\lib\x86\* .\SDL2_VC\lib\x86\
41+
Move-Item SDL2_VC C:\
42+
Remove-Item sdl.zip, sdl_im.zip -Force
43+
# FFTW
44+
New-Item -ItemType Directory FFTW -Force | Out-Null
45+
Push-Location FFTW
46+
Invoke-WebRequest -Uri "https://fftw.org/pub/fftw/fftw-3.3.5-dll64.zip" -OutFile fftw.zip -UseBasicParsing
47+
Expand-Archive -LiteralPath fftw.zip -DestinationPath .
48+
Remove-Item fftw.zip -Force
4749
lib /machine:x64 /def:libfftw3f-3.def
48-
cd ..
49-
move FFTW C:\
50+
Pop-Location
51+
Move-Item FFTW C:\
52+
5053
5154
- name: Build with MSVC
5255
run: |

0 commit comments

Comments
 (0)