Skip to content

Commit

Permalink
Add Windows Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
migueldeicaza committed Jan 24, 2025
1 parent bc2db01 commit 2f4e4e2
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
1 change: 1 addition & 0 deletions Sources/SwiftGodot/SwiftGodot.docc/SwiftGodot.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Going in depth with SwiftGodot:
### Platform Integration

- <doc:iOS>
- <doc:Windows>

### Godot Nodes

Expand Down
46 changes: 46 additions & 0 deletions Sources/SwiftGodot/SwiftGodot.docc/Windows.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Using SwiftGodot on Windows

## Extension Dependencies

Since Swift is not a system component on Windows, you will need to make a copy
of the Swift runtime libraries that you use, and place those side-by-side the
extension that you created.

On Windows, you can use the `dumpbin /dependents` command to see which which
libraries you need, like this:

```
C:\project> dumpbin /dependents MyExtension.dll
Image has the following dependencies:
SwiftGodot.dll
swiftCore.dll
swift_Concurrency.dll
swiftWinSDK.dll
swiftSwiftOnoneSupport.dll
swiftCRT.dll
KERNEL32.dll
VCRUNTIME140.dll
api-ms-win-crt-runtime-l1-1-0.dll
```

Those files are typically located in `AppData\Local\Programs\Swift\Runtimes`.

## Debug Symbols

On Windows, if you want to get debug symbols in the Windows Native format, build
your extension like this:

```
C:\project> swift build -debug-info-format codeview
```
## Using Relative Paths

On Windows, you can use relative paths to reference your library, so you do not
need to copy binaries to your game when making changes, like this:

```
windows.x86_64.release = "../../../project/.build/release/SandboxSwift.dll"
windows.x86_64.debug = "../../../project/.build/debug/SandboxSwift.dll"
```

0 comments on commit 2f4e4e2

Please sign in to comment.