Build on Windows 11 environment

This commit is contained in:
2023-05-29 01:21:59 +09:00
parent 54eca408c7
commit 0f12af2d44
4 changed files with 20 additions and 4 deletions

View File

@@ -38,7 +38,8 @@ extension Date {
}
}
#if os(Linux)
#if os(Linux) || os(Windows) || os(FreeBSD)
extension URL {
public static func currentDirectory() -> URL {
URL(fileURLWithPath: FileManager.default.currentDirectoryPath)
@@ -61,4 +62,3 @@ extension URL {
}
}
#endif

View File

@@ -7,7 +7,7 @@
import Foundation
#if os(Linux)
#if os(Linux) || os(Windows) || os(FreeBSD)
import FoundationNetworking
#endif

View File

@@ -7,7 +7,7 @@
import Foundation
#if os(Linux)
#if os(Linux) || os(Windows) || os(FreeBSD)
import FoundationNetworking
import FoundationXML
#endif

16
scripts/build.ps1 Normal file
View File

@@ -0,0 +1,16 @@
## Run this build script at root
## Ex)
## > powershell ./scripts/build.sh
##
$CONSOLE_APP = "KissMeConsole"
Write-Output "build console bin/$CONSOLE_APP.exe"
Set-Location $CONSOLE_APP
Remove-Item -Recurse -Force .build
swift build -c release
Copy-Item ./.build/release/$CONSOLE_APP.exe ../bin