понедельник, 9 сентября 2024 г.

Compilation SwiftGodot on Windows

Swift 5.10.1 Windows toolchain. (www.swift.org)
Download SwiftGodot (v0.45)

Run compilation
(in folder "C:\SwiftGodot-0.45")

- for DEBUG
>> swift build
(C:\SwiftGodot-0.45\.build\debug\SwiftGodot.dll)
(Copy to "res://bin/SwiftGodot_debug.x86_64.dll")

- for RELEASE
>> swift build -c release
(C:\SwiftGodot-0.45\.build\release\SwiftGodot.dll)
(Copy to "res://bin/SwiftGodot_release.x86_64.dll")

Edit file: my_extension.gdextension

[configuration]
entry_symbol = "swift_entry_point"
compatibility_minimum = 4.2
compatibility_maximum = 4.3
reloadable = true

[icons]
MyExtension = "res://bin/my_extension.svg"

[libraries]
windows.debug.x86_64 = "res://bin/my_extension_debug.x86_64.dll"
windows.release.x86_64 = "res://bin/my_extension_release.x86_64.dll"

[dependencies]
windows.debug = {
    "res://bin/SwiftGodot_debug.x86_64.dll" : "",
}

windows.release = {
    "res://bin/SwiftGodot_release.x86_64.dll" : "",
}

Attention!

Copy files from "C:\Swift\Runtimes\5.10.1\usr\bin"
to folder with your extension ("res://bin")
(and put them in [dependencies] section or copy to game Export folder).

Комментариев нет:

Отправить комментарий