This repository was archived by the owner on Mar 17, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjustfile
More file actions
105 lines (80 loc) · 2.64 KB
/
Copy pathjustfile
File metadata and controls
105 lines (80 loc) · 2.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name := 'xcalendar'
appid := 'dev.xarbit.apps.Calendar'
rootdir := ''
prefix := '/usr'
base-dir := absolute_path(clean(rootdir / prefix))
export INSTALL_DIR := base-dir / 'share'
bin-src := 'target' / 'release' / name
bin-dst := base-dir / 'bin' / name
desktop := appid + '.desktop'
desktop-src := 'res' / desktop
desktop-dst := clean(INSTALL_DIR / 'applications' / desktop)
metainfo := appid + '.metainfo.xml'
metainfo-src := 'res' / metainfo
metainfo-dst := clean(INSTALL_DIR / 'metainfo' / metainfo)
dbus-service := appid + '.service'
dbus-service-src := 'res' / dbus-service
dbus-service-dst := clean(INSTALL_DIR / 'dbus-1' / 'services' / dbus-service)
# Default recipe to display help information
default:
@just --list
# Run the application in debug mode
run *args:
cargo run --release -- {{args}}
# Run the application in debug mode with debug output
run-debug *args:
cargo run -- {{args}}
# Build the application in release mode
build-release *args:
cargo build --release {{args}}
# Build the application in debug mode
build-debug *args:
cargo build {{args}}
# Check the project for errors
check *args:
cargo check --all-features {{args}}
# Run tests
test *args:
cargo test --all-features {{args}}
# Run clippy lints
clippy *args:
cargo clippy --all-features {{args}}
# Format the code
fmt *args:
cargo fmt --all {{args}}
# Install the application to the system
install:
install -Dm0755 {{bin-src}} {{bin-dst}}
install -Dm0644 {{desktop-src}} {{desktop-dst}}
install -Dm0644 {{metainfo-src}} {{metainfo-dst}}
install -Dm0644 {{dbus-service-src}} {{dbus-service-dst}}
# Vendor dependencies
vendor:
mkdir -p .cargo
cargo vendor --sync Cargo.toml | head -n -1 > .cargo/config.toml
echo 'directory = "vendor"' >> .cargo/config.toml
# Clean build artifacts
clean:
cargo clean
# Generate Flatpak cargo dependencies manifest
flatpak-deps:
python3 scripts/flatpak-cargo-generator.py Cargo.lock -o cargo-sources.json
@echo "✅ Generated cargo-sources.json"
# Build Flatpak locally
flatpak-build:
bash scripts/build-flatpak.sh
# Build standalone Flatpak bundle (.flatpak file)
flatpak-bundle:
python3 scripts/flatpak-cargo-generator.py Cargo.lock -o cargo-sources.json
@echo "✅ Generated cargo-sources.json"
bash scripts/build-flatpak-bundle.sh
# Install standalone Flatpak bundle (.flatpak file)
flatpak-bundle-install:
flatpak install --user dev.xarbit.apps.Calendar.flatpak
# Run Flatpak
flatpak-run *args:
flatpak run {{appid}} {{args}}
# Uninstall local Flatpak
flatpak-uninstall:
flatpak uninstall --user -y {{appid}} || true
@echo "✅ Uninstalled {{appid}}"