Create hello-platform for Windows #10
No files matched your search
@@ -1,11 +0,0 @@
|
|||||||
import SwiftCrossUI
|
|
||||||
|
|
||||||
final class HPVM: ObservableObject {
|
|
||||||
@Published var countText = ""
|
|
||||||
|
|
||||||
static private(set) weak var shared: HPVM?
|
|
||||||
|
|
||||||
init() {
|
|
||||||
Self.shared = self
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
import SwiftCrossUI
|
|
||||||
|
|
||||||
struct HPView: View {
|
|
||||||
@State var vm: HPVM
|
|
||||||
|
|
||||||
init(_ vm: HPVM) {
|
|
||||||
self.vm = vm
|
|
||||||
}
|
|
||||||
|
|
||||||
var body: some View {
|
|
||||||
VStack(spacing: 16) {
|
|
||||||
Text("Hello, platform!")
|
|
||||||
.font(.largeTitle)
|
|
||||||
Text(vm.countText)
|
|
||||||
.font(.title3.monospaced())
|
|
||||||
Button("Increment") {
|
|
||||||
hpSet(F.didClickIncrement, true)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.padding(40)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -228,7 +228,7 @@ by this packaging step.
|
|||||||
|
|
||||||
`ver-windows/` mirrors the Linux SwiftCrossUI target with `WinUIBackend`.
|
`ver-windows/` mirrors the Linux SwiftCrossUI target with `WinUIBackend`.
|
||||||
It shares the counter component and generated Swift dialect via
|
It shares the counter component and generated Swift dialect via
|
||||||
relative symlinks. Its SwiftCrossUI model and view live in `components/hp/windows`. Check out the repository with Git symlinks enabled on Windows
|
relative symlinks. It reuses the SwiftCrossUI model and view in `components/hp/linux`. Check out the repository with Git symlinks enabled on Windows
|
||||||
(Developer Mode or appropriate symlink permissions are needed).
|
(Developer Mode or appropriate symlink permissions are needed).
|
||||||
|
|
||||||
With the Windows Swift toolchain, Windows SDK, and the Windows App SDK runtime
|
With the Windows Swift toolchain, Windows SDK, and the Windows App SDK runtime
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
../../../../../components/hp/windows/hpVM.swift
|
../../../../../components/hp/linux/hpVM.swift
|
||||||
@@ -1 +1 @@
|
|||||||
../../../../../../components/hp/windows/view/HPView.swift
|
../../../../../../components/hp/linux/view/HPView.swift
|
||||||
Reference in new issue
Block a user