add windows stub

This commit is contained in:
kornerr committed 2026-11-03 21:57:07 +03:00
1 parent e4dc8bd473
commit 321388b98d
13 files changed
+103

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
#!/bin/bash -e
SDIR=$(cd "$(dirname "$0")" && pwd -P)
T=$SDIR/step
TARGET=hello-platform
STEP=0
source "$T/buildWindows" "$TARGET"
+8
View File
@@ -0,0 +1,8 @@
#!/bin/bash -e
SDIR=$(cd "$(dirname "$0")" && pwd -P)
T=$SDIR/step
TARGET=hello-platform
STEP=0
source "$T/runWindows" "$TARGET"
@@ -0,0 +1,7 @@
#!/bin/bash -e
TARGET=$1
STEP=$((STEP+1))
echo "Step $STEP: build $TARGET for Windows"
swift build --package-path "$(cygpath -m "$SDIR/../ver-windows")"
+13
View File
@@ -0,0 +1,13 @@
#!/bin/bash -e
TARGET=$1
STEP=$((STEP+1))
echo "Step $STEP: run $TARGET for Windows"
BIN_DIR=$(swift build --package-path "$(cygpath -m "$SDIR/../ver-windows")" --show-bin-path)
EXE="$(cygpath -u "${BIN_DIR%$'\r'}")/$TARGET.exe"
if [[ ! -f "$EXE" ]]; then
echo "Run util/build-windows first." >&2
exit 1
fi
exec "$EXE"
@@ -0,0 +1,19 @@
// swift-tools-version: 5.10
import PackageDescription
let package = Package(
name: "hello-platform",
dependencies: [
.package(url: "https://github.com/moreSwift/swift-cross-ui", branch: "v0.10.0")
],
targets: [
.executableTarget(
name: "hello-platform",
dependencies: [
.product(name: "WinUIBackend", package: "swift-cross-ui"),
.product(name: "SwiftCrossUI", package: "swift-cross-ui")
],
path: "src"
)
]
)
@@ -0,0 +1,14 @@
import WinUIBackend
import SwiftCrossUI
@main
struct HPApp: App {
let delegate = HPAppDelegate()
var body: some Scene {
WindowGroup("Hello platform") {
HPView(delegate.hpVM)
}
}
}
@@ -0,0 +1,11 @@
import SwiftCrossUI
final class HPAppDelegate {
let hp = HPComponent()
let hpVM = HPVM()
init() {
otherSetupConsoleLogging(hp.ctrl, "HP")
hp.setup()
}
}
+1
View File
@@ -0,0 +1 @@
../../ver-mac/src/dialect.swift
+1
View File
@@ -0,0 +1 @@
../../../../../components/hp/linux/hp.swift
+1
View File
@@ -0,0 +1 @@
../../../../../components/hp/linux/hpVM.swift
@@ -0,0 +1 @@
../../../../../../components/hp/linux/view/HPView.swift
@@ -0,0 +1 @@
../../../../../components/other/other.swift