From ee3d450552cd0c37a114b05c557ff9381ef92466 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mikrut?= Date: Tue, 8 Dec 2020 19:41:43 +0100 Subject: [PATCH] Add Snap support --- README.md | 24 +++++++++++++-------- misc/snap/local/CreateSnap.sh | 17 +++++++++++++++ misc/snap/snapcraft.yaml | 39 +++++++++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+), 9 deletions(-) create mode 100755 misc/snap/local/CreateSnap.sh create mode 100644 misc/snap/snapcraft.yaml diff --git a/README.md b/README.md index 3e97ef4..8e77f25 100644 --- a/README.md +++ b/README.md @@ -55,13 +55,19 @@ If the app does not run when clicking at a launcher, run it through a terminal. Appimage files are available in release page - https://github.com/qarmin/czkawka/releases/ ### Cargo -Easier method to install Czkawka is to use Cargo command(you must have installed GTK libraries in OS) +Easier method to install Czkawka is to use Cargo command(you must have installed GTK libraries in OS) ``` cargo install czkawka_gui ``` You can update package by typing same command. -### Snap, Flatpak +### Snap +Sadly some features are not available like mounted drives +``` +sudo snap install czkawka +``` + +## Flatpak Maybe someday @@ -132,7 +138,7 @@ Minimum file size to check I set to 1 KB on all programs |:----------:|:-------------:| | FSlint 2.4.7 (Second Run)| 86s | | Czkawka 1.4.0 (Second Run) | 12s | -| DupeGuru 4.0.4 (Second Run) | 28s | +| DupeGuru 4.0.4 (Second Run) | 28s | I used Mprof for checking memory usage FSlint and Dupeguru, for Czkawka I used Heaptrack. @@ -148,15 +154,15 @@ Similar Images which check 332 files which takes 1,7GB | App| Scan time | |:----------:|:-------------:| -| Czkawka 1.4.0 | 58s | -| DupeGuru 4.0.4 | 51s | +| Czkawka 1.4.0 | 58s | +| DupeGuru 4.0.4 | 51s | Similar Images which check 1421 image files which takes 110,1MB | App| Scan time | |:----------:|:-------------:| -| Czkawka 1.4.0 | 25s | -| DupeGuru 4.0.4 | 92s | +| Czkawka 1.4.0 | 25s | +| DupeGuru 4.0.4 | 92s | So still is a big room for improvements. @@ -164,10 +170,10 @@ So still is a big room for improvements. | | Czkawka | FSlint | DupeGuru | |:----------:|:-------------:|:-----:|:---:| -| Language | Rust| Python | Python/Objective C | +| Language | Rust| Python | Python/Objective C | | OS | Linux, Windows, Mac(only CLI) | Linux | Linux, Windows, Mac| | Framework | GTK 3 (Gtk-rs)| GTK 2 (PyGTK) | Qt 5 (PyQt)/Cocoa | -| Ram Usage | Low | Medium | Very High | +| Ram Usage | Low | Medium | Very High | | Duplicate finder | X | X | X | | Empty files | X | X | | | Empty folders | X | X | | diff --git a/misc/snap/local/CreateSnap.sh b/misc/snap/local/CreateSnap.sh new file mode 100755 index 0000000..d16c6ec --- /dev/null +++ b/misc/snap/local/CreateSnap.sh @@ -0,0 +1,17 @@ +#!/bin/bash +NUMBER="1.5.1" +CZKAWKA_PATH="/home/rafal" + +cd "$CZKAWKA_PATH" +CZKAWKA_PATH="$CZKAWKA_PATH/czkawka" +rm -rf $CZKAWKA_PATH +git clone https://github.com/qarmin/czkawka.git "$CZKAWKA_PATH" +cd $CZKAWKA_PATH +git checkout "$NUMBER" + +cd "$CZKAWKA_PATH/misc/snap" +snapcraft + +snapcraft login + +snapcraft upload --release=stable "czkawka_${NUMBER}_amd64.snap" diff --git a/misc/snap/snapcraft.yaml b/misc/snap/snapcraft.yaml new file mode 100644 index 0000000..bade4d6 --- /dev/null +++ b/misc/snap/snapcraft.yaml @@ -0,0 +1,39 @@ +name: czkawka # you probably want to 'snapcraft register ' +base: core18 # the base snap is the execution environment for this snap +version: '1.5.1' # just for humans, typically '1.2+git' or '1.3.2' +summary: Czkawka - fast data cleaner written in Rust # 79 char long summary +description: | + Czkawka is very fast and feature rich cleaner which finds file duplicates, empty folders and files, duplicated music, similar images or the biggest files in selected directories. + This program have frontend written in modern GTK 3. + +grade: stable # must be 'stable' to release into candidate/stable channels +confinement: strict # use 'strict' once you have the right plugs and slots + +parts: + czkawka: + plugin: nil + source: https://github.com/qarmin/czkawka.git + source-tag: 1.5.1 + build-packages: + - libgtk-3-dev + - curl + - gcc + - git + stage-packages: + - libgtk-3-dev + override-build: | + if ! command -v rustup 2>/dev/null; then + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path --profile=minimal + export PATH="${HOME}/.cargo/bin:${PATH}" + fi + + cargo install --locked --path czkawka_gui --root "${SNAPCRAFT_PART_INSTALL}" --force + +apps: + czkawka: + command: bin/czkawka_gui + extensions: [gnome-3-34] + plugs: + - home + - removable-media + - udisks2