Fix: correct metainfo path, icon destination, add post-install
This commit is contained in:
parent
21974724c3
commit
d8e5ff559d
3 changed files with 11 additions and 722 deletions
15
justfile
15
justfile
|
|
@ -19,11 +19,11 @@ icon-svg := appid + '.svg'
|
|||
|
||||
# Install destinations
|
||||
base-dir := absolute_path(clean(rootdir / prefix))
|
||||
appdata-dst := base-dir / 'share' / 'appdata' / appdata
|
||||
appdata-dst := base-dir / 'share' / 'metainfo' / appdata
|
||||
bin-dst := base-dir / 'bin' / name
|
||||
desktop-dst := base-dir / 'share' / 'applications' / desktop
|
||||
icons-dst := base-dir / 'share' / 'icons' / 'hicolor'
|
||||
icon-svg-dst := icons-dst / 'scalable' / 'apps'
|
||||
icon-svg-dst := icons-dst / 'scalable' / 'apps' / icon-svg
|
||||
|
||||
# Default recipe which runs `just build-release`
|
||||
default: build-release
|
||||
|
|
@ -65,11 +65,18 @@ install:
|
|||
install -Dm0755 {{ cargo-target-dir / 'release' / name }} {{bin-dst}}
|
||||
install -Dm0644 {{ 'resources' / desktop }} {{desktop-dst}}
|
||||
install -Dm0644 {{ 'resources' / appdata }} {{appdata-dst}}
|
||||
install -Dm0644 {{ 'resources' / 'icons' / 'hicolor' / 'scalable' / 'apps' / 'icon.svg' }} {{icon-svg-dst}}
|
||||
install -Dm0644 {{ 'resources' / 'icons' / 'hicolor' / 'scalable' / 'apps' / icon-svg }} {{icon-svg-dst}}
|
||||
|
||||
# Update icon cache and desktop database after install
|
||||
post-install:
|
||||
-gtk-update-icon-cache -f -t {{icons-dst}}
|
||||
-update-desktop-database {{base-dir / 'share' / 'applications'}}
|
||||
|
||||
# Uninstalls installed files
|
||||
uninstall:
|
||||
rm {{bin-dst}} {{desktop-dst}} {{icon-svg-dst}}
|
||||
rm -f {{bin-dst}} {{desktop-dst}} {{appdata-dst}} {{icon-svg-dst}}
|
||||
-gtk-update-icon-cache -f -t {{icons-dst}}
|
||||
-update-desktop-database {{base-dir / 'share' / 'applications'}}
|
||||
|
||||
# Vendor dependencies locally
|
||||
vendor:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue