Make Cosmic Files show .exe icons (#2070)
* [Feature Request] Make Cosmic Files show .exe icons like Dolphin * Sped Up Icon Extraction * Compacted Code * Replace wrestool with pelite crate for .exe icon extraction * Run PE icon extraction as external thumbnailer * Use dedicated external EXE thumbnailer * Remove embedded EXE thumbnailer * Move cosmic-files-thumbnailer to new crate --------- Co-authored-by: ZlordHUN <137647604+ZlordHUN@users.noreply.github.com>
This commit is contained in:
parent
c0b8a8c60a
commit
b326e48cf6
8 changed files with 356 additions and 9 deletions
17
justfile
17
justfile
|
|
@ -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
|
||||
|
||||
thumbnailer-bin-name := name + '-thumbnailer'
|
||||
thumbnailer-bin-src := cargo-target-dir / 'release' / thumbnailer-bin-name
|
||||
thumbnailer-bin-dst := base-dir / 'bin' / thumbnailer-bin-name
|
||||
|
||||
applet-name := name + '-applet'
|
||||
applet-src := cargo-target-dir / 'release' / applet-name
|
||||
applet-dst := base-dir / 'bin' / applet-name
|
||||
|
|
@ -24,6 +28,10 @@ metainfo := APPID + '.metainfo.xml'
|
|||
metainfo-src := 'target/xdgen' / metainfo
|
||||
metainfo-dst := clean(rootdir / prefix) / 'share' / 'metainfo' / metainfo
|
||||
|
||||
thumbnailer := APPID + '.thumbnailer'
|
||||
thumbnailer-src := 'res' / thumbnailer
|
||||
thumbnailer-dst := clean(rootdir / prefix) / 'share' / 'thumbnailers' / thumbnailer
|
||||
|
||||
icons-src := 'res' / 'icons' / 'hicolor'
|
||||
icons-dst := clean(rootdir / prefix) / 'share' / 'icons' / 'hicolor'
|
||||
|
||||
|
|
@ -45,14 +53,11 @@ clean-dist: clean clean-vendor
|
|||
build-debug *args:
|
||||
cargo build {{args}}
|
||||
cargo build --package {{applet-name}} {{args}}
|
||||
cargo build --package {{thumbnailer-bin-name}} {{args}}
|
||||
|
||||
# Compiles with release profile
|
||||
build-release *args: (build-debug '--release' args)
|
||||
|
||||
# Compiles applet with release profile
|
||||
build-release-applet *args:
|
||||
cargo build --package {{applet-name}} --release {{args}}
|
||||
|
||||
# Compiles release profile with vendored dependencies
|
||||
build-vendored *args: vendor-extract (build-release '--frozen --offline' args)
|
||||
|
||||
|
|
@ -92,9 +97,11 @@ heaptrack *args:
|
|||
# Installs files
|
||||
install:
|
||||
install -Dm0755 {{bin-src}} {{bin-dst}}
|
||||
install -Dm0755 {{thumbnailer-bin-src}} {{thumbnailer-bin-dst}}
|
||||
install -Dm0755 {{applet-src}} {{applet-dst}}
|
||||
install -Dm0644 {{desktop-src}} {{desktop-dst}}
|
||||
install -Dm0644 {{metainfo-src}} {{metainfo-dst}}
|
||||
install -Dm0644 {{thumbnailer-src}} {{thumbnailer-dst}}
|
||||
for size in `ls {{icons-src}}`; do \
|
||||
install -Dm0644 "{{icons-src}}/$size/apps/{{APPID}}.svg" "{{icons-dst}}/$size/apps/{{APPID}}.svg"; \
|
||||
done
|
||||
|
|
@ -105,7 +112,7 @@ install-applet:
|
|||
|
||||
# Uninstalls installed files
|
||||
uninstall:
|
||||
rm -f {{bin-dst}} {{applet-dst}}
|
||||
rm -f {{bin-dst}} {{thumbnailer-bin-dst}} {{applet-dst}} {{thumbnailer-dst}}
|
||||
|
||||
# Vendor dependencies locally
|
||||
vendor:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue