Skip to content

Commit db09dc9

Browse files
authored
Heic or heif support, don't know (#750)
1 parent 56fc29f commit db09dc9

18 files changed

+367
-155
lines changed

.github/workflows/linux.yml

+14-16
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,10 @@ jobs:
3232
linux-cli-${{github.ref}}-${{github.sha}}
3333
3434
- name: Install basic libraries
35-
run: sudo apt-get update; sudo apt install libgtk-4-dev libasound2-dev -y
36-
37-
- name: Build CLI Debug
38-
run: cargo build --bin czkawka_cli
39-
env:
40-
CARGO_INCREMENTAL: 0
41-
RUSTFLAGS: "-C debuginfo=0"
42-
if: ${{ matrix.type == 'debug'}}
35+
run: sudo apt-get update; sudo apt install libgtk-4-dev libheif-dev -y
4336

4437
- name: Build CLI Release
45-
run: cargo build --release --bin czkawka_cli
38+
run: cargo build --release --bin czkawka_cli --features heif
4639
env:
4740
CARGO_INCREMENTAL: 0
4841
RUSTFLAGS: "-C debuginfo=0"
@@ -150,21 +143,26 @@ jobs:
150143
linux-gui-${{github.ref}}-${{github.sha}}
151144
152145
- name: Install Gtk, Mingw, unzip, zip and wget
153-
run: sudo apt-get update; sudo apt install libgtk-4-dev libasound2-dev fuse libfuse2 -y
146+
run: sudo apt-get update; sudo apt install libgtk-4-dev fuse libfuse2
147+
if: ${{ matrix.toolchain == '1.60.0' }}
148+
149+
- name: Install Gtk, Mingw, unzip, zip and wget and libheif
150+
run: sudo apt-get update; sudo apt install libgtk-4-dev fuse libfuse2 libheif-dev -y
151+
if: ${{ matrix.toolchain == 'stable' }}
154152

155-
- name: Build GUI Debug
156-
run: cargo build --bin czkawka_gui
153+
- name: Build GUI Release
154+
run: cargo build --release --bin czkawka_gui
157155
env:
158156
CARGO_INCREMENTAL: 0
159157
RUSTFLAGS: "-C debuginfo=0"
160-
if: ${{ matrix.type == 'debug'}}
158+
if: ${{ (matrix.type == 'release') && (matrix.toolchain == '1.60.0') }}
161159

162160
- name: Build GUI Release
163-
run: cargo build --release --bin czkawka_gui
161+
run: cargo build --release --bin czkawka_gui --features heif
164162
env:
165163
CARGO_INCREMENTAL: 0
166164
RUSTFLAGS: "-C debuginfo=0"
167-
if: ${{ matrix.type == 'release'}}
165+
if: ${{ (matrix.type == 'release') && (matrix.toolchain == 'stable') }}
168166

169167
- name: Store Linux GUI
170168
uses: actions/upload-artifact@v2
@@ -214,7 +212,7 @@ jobs:
214212
linux-appimage-gui-${{github.ref}}-${{github.sha}}
215213
216214
- name: Install Gtk,
217-
run: sudo apt-get update; sudo apt install libgtk-4-dev libasound2-dev librsvg2-dev wget fuse libfuse2 -y
215+
run: sudo apt-get update; sudo apt install libgtk-4-dev libheif-dev librsvg2-dev wget fuse libfuse2 -y
218216

219217
- name: Build GUI Release
220218
run: cargo build --release --bin czkawka_gui

.github/workflows/mac.yml

+3-17
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,8 @@ jobs:
3131
restore-keys: |
3232
mac-cli-${{github.ref}}-${{github.sha}}
3333
34-
- name: Build CLI Debug
35-
run: cargo build --bin czkawka_cli
36-
env:
37-
CARGO_INCREMENTAL: 0
38-
RUSTFLAGS: "-C debuginfo=0 -D warnings"
39-
if: ${{ matrix.type == 'debug'}}
40-
4134
- name: Build CLI Release
42-
run: cargo build --release --bin czkawka_cli
35+
run: cargo build --release --bin czkawka_cli --features heif
4336
env:
4437
CARGO_INCREMENTAL: 0
4538
RUSTFLAGS: "-C debuginfo=0 -D warnings"
@@ -73,17 +66,10 @@ jobs:
7366
run: rm '/usr/local/bin/2to3'
7467

7568
- name: Install GTK4
76-
run: brew install rust gtk4
77-
78-
- name: Build GUI Debug
79-
run: cargo build --bin czkawka_gui
80-
env:
81-
CARGO_INCREMENTAL: 0
82-
RUSTFLAGS: "-C debuginfo=0 -D warnings"
83-
if: ${{ matrix.type == 'debug'}}
69+
run: brew install rust gtk4 libheif
8470

8571
- name: Build GUI Release
86-
run: cargo build --release --bin czkawka_gui
72+
run: cargo build --release --bin czkawka_gui --features heif
8773
env:
8874
CARGO_INCREMENTAL: 0
8975
RUSTFLAGS: "-C debuginfo=0 -D warnings"

.github/workflows/quality.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ jobs:
2828
components: rustfmt, clippy
2929
override: true
3030

31-
- name: Install Gtk
32-
run: sudo apt-get update; sudo apt install -y libgtk-4-dev libasound2-dev
31+
- name: Install Gtk 4
32+
run: sudo apt-get update; sudo apt install -y libgtk-4-dev libheif-dev -y
3333

3434
- name: Check the format
3535
run: cargo fmt --all -- --check

Cargo.lock

+50-29
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

czkawka_cli/Cargo.toml

+10-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,16 @@ homepage = "https://github.com/qarmin/czkawka"
99
repository = "https://github.com/qarmin/czkawka"
1010

1111
[dependencies]
12-
czkawka_core = { path = "../czkawka_core", version = "4.1.0" }
1312
structopt = "0.3.26"
1413

1514
# For enum types
16-
image_hasher = "1.0.0"
15+
image_hasher = "1.0.0"
16+
17+
[dependencies.czkawka_core]
18+
path = "../czkawka_core"
19+
version = "4.1.0"
20+
features = []
21+
22+
[features]
23+
default = []
24+
heif = ["czkawka_core/heif"]

czkawka_core/Cargo.toml

+8-1
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,11 @@ imagepipe = "0.5.0"
6363

6464
# Checking for invalid extensions
6565
mime_guess = "2.0.4"
66-
infer = "0.8.0"
66+
infer = "0.8.0"
67+
68+
libheif-rs = { version = "0.15.0", optional = true }
69+
anyhow = { version = "1.0.57", optional = true }
70+
71+
[features]
72+
default = []
73+
heif = ["dep:libheif-rs", "dep:anyhow"]

0 commit comments

Comments
 (0)