ID
This commit is contained in:
parent
f3a4ca7c2e
commit
26ce7de410
2
.github/workflows/quality.yml
vendored
2
.github/workflows/quality.yml
vendored
|
@ -20,7 +20,5 @@ jobs:
|
|||
- name: Check the format
|
||||
run: cargo fmt --all -- --check
|
||||
|
||||
# Clippy overly_complex_bool_expr is disabled because mess with generated files in target dir
|
||||
# and I cannot disable it
|
||||
- name: Run clippy
|
||||
run: cargo clippy --all-targets --all-features -- -D warnings
|
||||
|
|
37
.github/workflows/windows.yml
vendored
37
.github/workflows/windows.yml
vendored
|
@ -116,21 +116,10 @@ jobs:
|
|||
- name: Install additional dependencies
|
||||
# gio is for the build script
|
||||
run: dnf install wget2 unzip mingw64-bzip2.noarch mingw64-poppler mingw64-poppler-glib mingw32-python3 rust-gio-devel adwaita-icon-theme -y && dnf clean all -y
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
target: x86_64-pc-windows-gnu
|
||||
- name: Cache ~/.cargo
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cargo
|
||||
key: windows-dotcargo
|
||||
- name: Cache cargo build
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: target
|
||||
key: windows-build-target
|
||||
|
||||
- name: Setup rust version
|
||||
run: |
|
||||
rustup target add x86_64-pc-windows-gnu
|
||||
|
||||
- name: Cross compile for Windows Heif
|
||||
run: |
|
||||
|
@ -201,21 +190,9 @@ jobs:
|
|||
- name: Install additional dependencies
|
||||
# gio is for the build script
|
||||
run: dnf install wget2 unzip mingw64-bzip2.noarch mingw64-poppler mingw64-poppler-glib mingw32-python3 rust-gio-devel adwaita-icon-theme -y && dnf clean all -y
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
target: x86_64-pc-windows-gnu
|
||||
- name: Cache ~/.cargo
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cargo
|
||||
key: windows-dotcargo
|
||||
- name: Cache cargo build
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: target
|
||||
key: windows-build-target
|
||||
- name: Setup rust version
|
||||
run: |
|
||||
rustup target add x86_64-pc-windows-gnu
|
||||
- name: Show console window on windows
|
||||
run: sd -s '#![windows_subsystem = "windows"]' '//#![windows_subsystem = "windows"]' krokiet/src/main.rs
|
||||
- name: Cross compile for Windows
|
||||
|
|
12
Cargo.lock
generated
12
Cargo.lock
generated
|
@ -1387,7 +1387,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"hashbrown 0.14.2",
|
||||
"hashbrown 0.14.3",
|
||||
"lock_api",
|
||||
"once_cell",
|
||||
"parking_lot_core",
|
||||
|
@ -2639,9 +2639,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "hashbrown"
|
||||
version = "0.14.2"
|
||||
version = "0.14.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156"
|
||||
checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604"
|
||||
|
||||
[[package]]
|
||||
name = "heck"
|
||||
|
@ -3127,7 +3127,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f"
|
||||
dependencies = [
|
||||
"equivalent",
|
||||
"hashbrown 0.14.2",
|
||||
"hashbrown 0.14.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -4416,9 +4416,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.69"
|
||||
version = "1.0.70"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da"
|
||||
checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b"
|
||||
dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
|
|
11
README.md
11
README.md
|
@ -144,17 +144,6 @@ You can also help by doing other things:
|
|||
- Creating videos - [First Video](https://www.youtube.com/watch?v=CWlRiTD4vDc) or [Spanish Tutorial](https://www.youtube.com/watch?v=V9x-pHJRmKY)
|
||||
- Recommending it to others
|
||||
|
||||
## Name
|
||||
Czkawka is a Polish word which means _hiccup_.
|
||||
|
||||
I chose this name because I wanted to hear people speaking other languages pronounce it, so feel free to spell it the way you want.
|
||||
|
||||
This name is not as bad as it seems, because I was also thinking about using words like _żółć_, _gżegżółka_ or _żołądź_,
|
||||
but I gave up on these ideas because they contained Polish characters, which would cause difficulty in searching for the project.
|
||||
|
||||
At the beginning of the program creation, if the response concerning the name was unanimously negative, I prepared myself
|
||||
for a possible change of the name of the program, and the opinions were extremely mixed.
|
||||
|
||||
## Thanks
|
||||
|
||||
Big thanks to Pádraig Brady, creator of fantastic FSlint, because without his work I wouldn't create this tool.
|
||||
|
|
|
@ -1,15 +1,20 @@
|
|||
# Czkawka GUI
|
||||
Czkawka GUI is a graphical user interface for Czkawka Core written with GTK 4.
|
||||
|
||||
![Screenshot from 2023-11-26 12-43-32](https://github.com/qarmin/czkawka/assets/41945903/722ed490-0be1-4dac-bcfc-182a4d0787dc)
|
||||
|
||||
## Requirements
|
||||
Requirements depends on platform that you are using:
|
||||
Requirements depends on platform that you are using.
|
||||
|
||||
Prebuild binareies are available here - https://github.com/qarmin/czkawka/releases/
|
||||
|
||||
### Linux
|
||||
#### Prebuild binaries
|
||||
Ubuntu - `sudo apt install libgtk-4 libheif ffmpeg -y`
|
||||
#### Snap -
|
||||
none - all needed libraries are bundled in snap - except ffmpeg https://github.com/snapcrafters/ffmpeg/issues/73
|
||||
none - all needed libraries are bundled in snap [except ffmpeg](https://github.com/snapcrafters/ffmpeg/issues/73) - https://snapcraft.io/czkawka
|
||||
#### Flatpak
|
||||
none - all needed libraries are bundled
|
||||
none - all needed libraries are bundled - https://flathub.org/apps/com.github.qarmin.czkawka
|
||||
### Mac
|
||||
```
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
|
@ -19,19 +24,21 @@ brew install gtk4 adwaita-icon-theme ffmpeg librsvg libheif
|
|||
### Windows
|
||||
All needed libraries should be bundled in zip(except ffmpeg which you need download and unpack to location with `czkawka_gui.exe` - https://ffmpeg.org/download.html#build-windows)
|
||||
|
||||
You can also install app via msys2(webp and heif should work here) - https://www.msys2.org/#installation (czkawka package - https://packages.msys2.org/base/mingw-w64-czkawka)
|
||||
```
|
||||
pacman -S mingw-w64-x86_64-czkawka-gui
|
||||
```
|
||||
and you can create shortcut to `C:\msys64\mingw64\bin\czkawka_gui.exe`
|
||||
|
||||
## Compilation
|
||||
Compilation of gui is harder that compilation cli or core, because uses gtk4 which is written in C and also requires a lot build and runtime dependencies.
|
||||
|
||||
### Requirements
|
||||
| Program | Minimal version |
|
||||
|:---------:|:-----------------:|
|
||||
| Rust | 1.72.1 |
|
||||
| GTK | 4.6 |
|
||||
|
||||
Prebuild binaries - https://github.com/qarmin/czkawka/releases/ </br>
|
||||
Snap package - https://snapcraft.io/czkawka </br>
|
||||
Flatpak package - https://flathub.org/apps/com.github.qarmin.czkawka </br>
|
||||
|
||||
## Compilation
|
||||
Compilation of gui is harder that compilation cli or core, because uses gtk4 which is written in C and also requires a lot build and runtime dependencies.
|
||||
|
||||
### Linux (Ubuntu, but on other OS should work similar)
|
||||
```shell
|
||||
sudo apt install libgtk-4-dev libheif-dev -y
|
||||
|
@ -45,13 +52,14 @@ rustup-init
|
|||
cargo run --release --bin czkawka_gui
|
||||
```
|
||||
### Windows
|
||||
Currently, it is not possible to compile app natively on Windows, but is possible to cross-compile it from Linux.</br>
|
||||
You can check for CI for instructions how to cross-compile app(uses prebuilt docker image) - [CI Instructions](../.github/workflows/windows.yml)
|
||||
Currently, there is no instruction how to compile app on Windows natively.</br>
|
||||
You can check for CI for instructions how to cross-compile app from linux to windows(uses prebuilt docker image) - [CI Instructions](../.github/workflows/windows.yml)</br>
|
||||
There exists mingw recipe which you can try to convert for your purposes - https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-czkawka/PKGBUILD
|
||||
|
||||
## Limitations
|
||||
Not all available features in core are available in GUI and also there are limitations between platforms:
|
||||
Not all available features other components implemented here, so this is list of limitations:
|
||||
- Snap versions not allows to use similar videos feature
|
||||
- Windows version not supports heif and webp files
|
||||
- Windows version not supports heif and webp files with prebuild binaries
|
||||
- Prebuild binaries for mac arm not exists
|
||||
|
||||
## License
|
||||
|
@ -65,4 +73,15 @@ Some icons were taken from [ReShot](https://www.reshot.com) site and are license
|
|||
|
||||
The program is completely free to use.
|
||||
|
||||
"Gratis to uczciwa cena" - "Free is a fair price"
|
||||
"Gratis to uczciwa cena" - "Free is a fair price"
|
||||
|
||||
## Name
|
||||
Czkawka is a Polish word which means _hiccup_.
|
||||
|
||||
I chose this name because I wanted to hear people speaking other languages pronounce it, so feel free to spell it the way you want.
|
||||
|
||||
This name is not as bad as it seems, because I was also thinking about using words like _żółć_, _gżegżółka_ or _żołądź_,
|
||||
but I gave up on these ideas because they contained Polish characters, which would cause difficulty in searching for the project.
|
||||
|
||||
At the beginning of the program creation, if the response concerning the name was unanimously negative, I prepared myself
|
||||
for a possible change of the name of the program, and the opinions were extremely mixed.
|
||||
|
|
|
@ -10,7 +10,9 @@ frontend(but of course I want implement most of features from other project).
|
|||
|
||||
Krokiet should not have any special runtime requirements - it should work on almost any device non-antic device.
|
||||
|
||||
Prebuild binaries should work on Windows 10,11, Mac
|
||||
Prebuild binaries should work on Windows 10,11, Mac, Ubuntu 22.04/20.04 and similar(libheif version + czkawka_gui requires Ubuntu 22.04+ and rest Ubuntu 20.04) - https://github.com/qarmin/czkawka/releases/
|
||||
|
||||
|
||||
|
||||
## Compilation
|
||||
|
||||
|
@ -99,13 +101,10 @@ SLINT_STYLE=material-dark cargo run -- --path .
|
|||
- Modifying user interface - gui is written in simple language similar to qml, that can be modified in vscode/web with
|
||||
live
|
||||
preview - [slint live preview example](https://slint.dev/releases/1.3.0/editor/?load_demo=examples/printerdemo/ui/printerdemo.slint)
|
||||
- Improving libraries used by Krokiet e.g. czkawka_core, image-rs etc.
|
||||
- Improving app rust code
|
||||
|
||||
## Missing features available in GTK 4 frontend
|
||||
|
||||
- preview support
|
||||
- selecting/deselecting results
|
||||
- icons in buttons
|
||||
- resizable input files panel
|
||||
- settings
|
||||
|
@ -115,9 +114,7 @@ SLINT_STYLE=material-dark cargo run -- --path .
|
|||
- saving results
|
||||
- symlink/hardlink
|
||||
- implementing all modes
|
||||
- multiple languages
|
||||
- multiple selection
|
||||
- key selection support
|
||||
- proper popup windows - slint not handle them properly
|
||||
- logo
|
||||
- about window
|
||||
|
@ -129,13 +126,13 @@ SLINT_STYLE=material-dark cargo run -- --path .
|
|||
|
||||
There are multiple reasons why I decided to use Slint as toolkit for Krokiet over other toolkits.
|
||||
|
||||
| Toolkit | Pros | Cons |
|
||||
|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Gtk 4 | - Hard compilation/cross compilation and bundling all required libraries - mostly on windows </br> - Cambalache can be used to create graphically gui </br> - Good gtk4-rs bindings(but sometimes not really intuitive) | - Hard compilation/cross compilation and bundling all required libraries - mostly on windows </br> - Forcing the use of a specific gui creation style </br> - Strange crashes, not working basic features, etc.(again, mostly on windows) </br> - Forcing to use bugged/outdated but dynamically loaded version of libraries on linux (e.g. 4.6 on Ubuntu 22.04) - not all fixes are backported |
|
||||
| Qt | - QML support - simplify creating of gui from code it is easy to use and powerful </br> - Very flexible framework <br/> - Typescript/javascript <=> qml interoperability </br> - Probably the most mature GUI library | - New and limited qt bindings <br/> - Big cross compilation problems and hard to setup on non windows platforms <br/> - Very easy to create and use invalid state in QML(unexpected null/undefined values etc.) <br/> - Commercial license or GPL |
|
||||
| Slint | - Internal language is compiled to native code <br/> - Live gui preview with Vscode/Vscodium without needing to use rust <br/> - Full rust solution - easy to compile/cross compile, minimal runtime requirements </br> - Static type checks in slint files | - Internal .slint language is more limited than QML(javascript flexibility is hard to ) <br/> - Out of bounds and similar errors are quietly being corrected instead printing error - this can lead to hard to debug problems <br/> - Commercial license or GPL(is available also different <br/> - Popup windows almost not exists <br/> - Internal widgets are almost not customizable and usually quite limited) |
|
||||
| Iced | - ~100% rust code - so compilation is simple </br> - Elm architecture - simple to understand | - Mostly maintained by one person - slows down fixing bugs and implementing new features </br> - GUI can be created only from rust code, which really is bad for creating complex GUIs(mostly due rust compile times) </br> - Docs are almost non-existent |
|
||||
| Tauri | - Easy to create ui(at least for web developers) - uses html/css/js</br>- Quite portable | - Webview dependency - it is not really lightweight and can be hard to compile on some platforms and on Linux e.g. webRTC not working have multiple limitaions in different os</br>- Cannot select directory - file chooser only can choose files - small thing but important for me</br>- Not very performant Rust <=> Javascript communication |
|
||||
| Toolkit | Pros | Cons |
|
||||
|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Gtk 4 | - Hard compilation/cross compilation and bundling all required libraries - mostly on windows </br> - Cambalache can be used to create graphically gui </br> - Good gtk4-rs bindings(but sometimes not really intuitive) | - Hard compilation/cross compilation and bundling all required libraries - mostly on windows </br> - Forcing the use of a specific gui creation style </br> - Strange crashes, not working basic features, etc.(again, mostly on windows) </br> - Forcing to use bugged/outdated but dynamically loaded version of libraries on linux (e.g. 4.6 on Ubuntu 22.04) - not all fixes are backported |
|
||||
| Qt | - QML support - simplify creating of gui from code it is easy to use and powerful </br> - Very flexible framework <br/> - Typescript/javascript <=> qml interoperability </br> - Probably the most mature GUI library | - New and limited qt bindings <br/> - Hard to cross-compile <br/> - Very easy to create and use invalid state in QML(unexpected null/undefined values, messed properties bindings etc.) <br/> - Commercial license or GPL |
|
||||
| Slint | - Internal language is compiled to native code <br/> - Live gui preview with Vscode/Vscodium without needing to use rust <br/> - Full rust solution - easy to compile/cross compile, minimal runtime requirements </br> - Static type checks in slint files | - Internal .slint language is more limited than QML <br/> - Out of bounds and similar errors are quietly being corrected instead printing error - this can lead to hard to debug problems <br/> - Only GPL is only available open-source license <br/> - Popup windows almost not exists <br/> - Internal widgets are almost not customizable and usually quite limited |
|
||||
| Iced | - ~100% rust code - so compilation is simple </br> - Elm architecture - simple to understand | - Mostly maintained by one person - slows down fixing bugs and implementing new features </br> - GUI can be created only from rust code, which really is bad for creating complex GUIs(mostly due rust compile times) </br> - Docs are almost non-existent |
|
||||
| Tauri | - Easy to create ui(at least for web developers) - uses html/css/js</br>- Quite portable | - Webview dependency - it is not really lightweight and can be hard to compile on some platforms and on Linux e.g. webRTC not working</br>- Cannot select directory - file chooser only can choose files - small thing but important for me</br>- Not very performant Rust <=> Javascript communication |
|
||||
|
||||
Since I don't have time to create really complex and good looking GUI, I needed a helper tool to create GUI not from
|
||||
Rust(I don't want to use different language, because this will make communication with czkawka_core harder) so I decided
|
||||
|
|
Loading…
Reference in a new issue