Build on Windows 11 environment
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
#if os(Linux)
|
||||
#if os(Linux) || os(Windows) || os(FreeBSD)
|
||||
import FoundationNetworking
|
||||
#endif
|
||||
|
||||
|
||||
@@ -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
16
scripts/build.ps1
Normal 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
|
||||
Reference in New Issue
Block a user