Desktop mode

This commit is contained in:
Jeremy Soller 2024-08-20 13:26:10 -06:00
parent bbcfe19375
commit 5d596239be
12 changed files with 640 additions and 218 deletions

View file

@ -12,6 +12,10 @@ cargo-target-dir := env('CARGO_TARGET_DIR', 'target')
bin-src := cargo-target-dir / 'release' / name
bin-dst := base-dir / 'bin' / name
applet-name := name + '-applet'
applet-src := cargo-target-dir / 'release' / applet-name
applet-dst := base-dir / 'bin' / applet-name
desktop := APPID + '.desktop'
desktop-src := 'res' / desktop
desktop-dst := clean(rootdir / prefix) / 'share' / 'applications' / desktop
@ -40,6 +44,7 @@ clean-dist: clean clean-vendor
# Compiles with debug profile
build-debug *args:
cargo build {{args}}
cargo build --package {{applet-name}} {{args}}
# Compiles with release profile
build-release *args: (build-debug '--release' args)
@ -71,6 +76,7 @@ test *args:
# Installs files
install:
install -Dm0755 {{bin-src}} {{bin-dst}}
install -Dm0755 {{applet-src}} {{applet-dst}}
install -Dm0644 {{desktop-src}} {{desktop-dst}}
install -Dm0644 {{metainfo-src}} {{metainfo-dst}}
for size in `ls {{icons-src}}`; do \
@ -79,7 +85,7 @@ install:
# Uninstalls installed files
uninstall:
rm {{bin-dst}}
rm -f {{bin-dst}} {{applet-dst}}
# Vendor dependencies locally
vendor: