mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-26 21:16:13 +01:00
Add build scripts for macOS and Windows
This commit is contained in:
1 parent
f84ff413a1
commit
c5a37aed84
4 files changed
+646
-2
No files matched your search
@@ -0,0 +1,35 @@
|
||||
Param(
|
||||
[Parameter(Mandatory, Position = 0)]
|
||||
[string]$architecture
|
||||
)
|
||||
|
||||
Function Convert-DLL([string]$name)
|
||||
{
|
||||
& gendef.exe "..\..\bin\$name-2.dll"
|
||||
& dlltool.exe -d "$name-2.def" -D "..\..\bin\$name-2.dll" -l "lib$name.a"
|
||||
del "$name-2.def"
|
||||
}
|
||||
|
||||
Function Create-ImportLib([string]$architecture)
|
||||
{
|
||||
New-Item -ItemType "directory" -Path "lib\gcc"
|
||||
New-Item -ItemType "directory" -Path "lib\msvc"
|
||||
Move-Item -Path "lib\*.lib" -Destination "lib\msvc"
|
||||
|
||||
$patharch = If($architecture -eq "x64") { "64" } Else { "32" }
|
||||
|
||||
$oldpath = $env:Path
|
||||
$env:Path += ";C:\tools\mingw$patharch\bin\"
|
||||
|
||||
Push-Location "lib\gcc"
|
||||
Convert-DLL("csfml-graphics")
|
||||
Convert-DLL("csfml-window")
|
||||
Convert-DLL("csfml-audio")
|
||||
Convert-DLL("csfml-network")
|
||||
Convert-DLL("csfml-system")
|
||||
Pop-Location
|
||||
|
||||
$env:Path = $oldpath
|
||||
}
|
||||
|
||||
Create-ImportLib $architecture
|
||||
Reference in new issue
Block a user