From 5752c96f12af6f06459ba42d09f76a9b0a623e29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Wed, 21 Oct 2026 17:59:18 +0300 Subject: [PATCH] prepare chk --- components/chkgfx/mac/view/ChkgfxView.swift | 3 -- ogs-chkgfx/dialect.yml | 46 --------------------- ogs-chkgfx/ver-mac/Package.swift | 2 +- ogs-chkgfx/ver-mac/res | 1 - ogs-chkgfx/ver-mac/res/AppIcon.icns | 1 + ogs-chkgfx/ver-mac/res/cube | 1 + util/build-ogs-chkgfx-mac | 12 ++++++ util/run-ogs-chkgfx-mac | 8 ++++ 8 files changed, 23 insertions(+), 51 deletions(-) delete mode 120000 ogs-chkgfx/ver-mac/res create mode 120000 ogs-chkgfx/ver-mac/res/AppIcon.icns create mode 120000 ogs-chkgfx/ver-mac/res/cube create mode 100755 util/build-ogs-chkgfx-mac create mode 100755 util/run-ogs-chkgfx-mac diff --git a/components/chkgfx/mac/view/ChkgfxView.swift b/components/chkgfx/mac/view/ChkgfxView.swift index eda0b97..76a1136 100644 --- a/components/chkgfx/mac/view/ChkgfxView.swift +++ b/components/chkgfx/mac/view/ChkgfxView.swift @@ -11,9 +11,6 @@ struct ChkgfxView: View { VStack(spacing: 16) { Text("Check graphics") .font(.largeTitle) - Button("Load model") { - rootSet(F.didClickLoadModel, true) - } } .padding(40) } diff --git a/ogs-chkgfx/dialect.yml b/ogs-chkgfx/dialect.yml index 9990de3..1d28d65 100644 --- a/ogs-chkgfx/dialect.yml +++ b/ogs-chkgfx/dialect.yml @@ -67,49 +67,3 @@ RenderComponent: c.recentField == F.backingPixelSize then: c.pixelSize = c.backingPixelSize - -RootComponent: - type: component - oneliners: - - countText: RootVM.shared!.countText = c.countText - - didClickIncrement: renderSet(F.didClickIncrement, true) - shoulds: - count: - 1. Upon hitting 10 the first time: - if: - c.recentField == F.didClickIncrement && - c.count == 7 - then: - c.count += 10 - 2. Upon each button click: - if: - c.recentField == F.didClickIncrement - then: - c.count += 1 - countText: - 1. Upon each count change: - if: - c.recentField == F.count - then: - c.countText = "Count: '\(c.count)'" - 2. Upon launch: - if: - c.recentField == F.didLaunch - then: - c.countText = "Press the button to count" - didLaunch: - 1. Only once during the first setup: - if: - c.recentField == F.didSetup && - c.didLaunch == false - then: - c.didLaunch = true - -RootContext: - type: context - fields: - count: Int - countText: String - didClickIncrement: Bool - didLaunch: Bool - didSetup: Bool diff --git a/ogs-chkgfx/ver-mac/Package.swift b/ogs-chkgfx/ver-mac/Package.swift index 3974170..33fb0be 100644 --- a/ogs-chkgfx/ver-mac/Package.swift +++ b/ogs-chkgfx/ver-mac/Package.swift @@ -5,7 +5,7 @@ import PackageDescription let raylibPrefix = ProcessInfo.processInfo.environment["RAYLIB_PREFIX"] ?? "/opt/homebrew" let package = Package( - name: "OGSChkgfx", + name: "OGSchkgfx", platforms: [ .macOS(.v13) ], diff --git a/ogs-chkgfx/ver-mac/res b/ogs-chkgfx/ver-mac/res deleted file mode 120000 index 8f3459f..0000000 --- a/ogs-chkgfx/ver-mac/res +++ /dev/null @@ -1 +0,0 @@ -../../res \ No newline at end of file diff --git a/ogs-chkgfx/ver-mac/res/AppIcon.icns b/ogs-chkgfx/ver-mac/res/AppIcon.icns new file mode 120000 index 0000000..7e98160 --- /dev/null +++ b/ogs-chkgfx/ver-mac/res/AppIcon.icns @@ -0,0 +1 @@ +../../../res/AppIcon.icns \ No newline at end of file diff --git a/ogs-chkgfx/ver-mac/res/cube b/ogs-chkgfx/ver-mac/res/cube new file mode 120000 index 0000000..24cd8a9 --- /dev/null +++ b/ogs-chkgfx/ver-mac/res/cube @@ -0,0 +1 @@ +../../../res/cube \ No newline at end of file diff --git a/util/build-ogs-chkgfx-mac b/util/build-ogs-chkgfx-mac new file mode 100755 index 0000000..c9fa789 --- /dev/null +++ b/util/build-ogs-chkgfx-mac @@ -0,0 +1,12 @@ +#!/bin/bash -e +SDIR=$(cd "$(dirname "$0")" ; pwd -P) + +T=$SDIR/step +source $SDIR/paths + +TARGET=ogs-chkgfx + +STEP=0 +source $T/generateDialect $TARGET +source $T/buildMac $TARGET +source $T/packageMac $TARGET "OGS chkgfx" diff --git a/util/run-ogs-chkgfx-mac b/util/run-ogs-chkgfx-mac new file mode 100755 index 0000000..df59791 --- /dev/null +++ b/util/run-ogs-chkgfx-mac @@ -0,0 +1,8 @@ +#!/bin/bash -e +SDIR=$(cd "$(dirname "$0")" ; pwd -P) + +T=$SDIR/step +source $SDIR/paths + +STEP=0 +source $T/runMac ogs-chkgfx "OGS chkgfx"