File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33default :
44 @ just --list
55
6+ native-backend := if os () == " macos" {
7+ " appkit"
8+ } else if os () == " linux" {
9+ " gtk4"
10+ } else if os () == " windows" {
11+ " winui"
12+ } else {
13+ error (" unsupported operating system for native GUI examples" )
14+ }
15+
616# ============================================================================
717# Build
818# ============================================================================
@@ -418,24 +428,7 @@ controls-native:
418428
419429# Run the native calculator app for this operating system
420430calculator :
421- #!/usr/bin/env bash
422- set -euo pipefail
423-
424- case " $( uname -s) " in
425- Darwin)
426- cargo run --locked --features appkit-native --example appkit_calculator
427- ;;
428- Linux)
429- cargo run --locked --features gtk4-native --example gtk4_calculator
430- ;;
431- MINGW* |MSYS* |CYGWIN* |Windows_NT)
432- cargo run --locked --features winui-native --example winui_calculator
433- ;;
434- * )
435- echo " unsupported operating system for native GUI calculator: $( uname -s) " >&2
436- exit 1
437- ;;
438- esac
431+ cargo run --locked --features {{ native-backend }} -native --example {{ native-backend }} _calculator
439432
440433# Run the native semantic component playground for this operating system
441434playground :
You can’t perform that action at this time.
0 commit comments