Add more windows extension and add selection of type of broken files (#749)
* Add more windows extension * ABCD * Windows CI and basic choosing broken files * Core and GUI support for few
This commit is contained in:
parent
db09dc9363
commit
486bec15ad
73
.github/workflows/windows.yml
vendored
Normal file
73
.github/workflows/windows.yml
vendored
Normal file
|
@ -0,0 +1,73 @@
|
||||||
|
name: 🏁 Windows
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 0 * * 2'
|
||||||
|
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
container:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
container:
|
||||||
|
image: ghcr.io/piegamesde/gtk4-cross:gtk-4.6
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- 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: Cross compile for Windows
|
||||||
|
run: |
|
||||||
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
|
export PKG_CONFIG_PATH=/usr/lib64/pkgconfig:/usr/share/pkgconfig:$MINGW_PREFIX/lib/pkgconfig/:/usr/x86_64-w64-mingw32/lib/pkgconfig/
|
||||||
|
cargo build --target=x86_64-pc-windows-gnu --release --locked
|
||||||
|
mkdir -p package
|
||||||
|
cp target/x86_64-pc-windows-gnu/release/czkawka_gui.exe package/
|
||||||
|
cp target/x86_64-pc-windows-gnu/release/czkawka_cli.exe package/
|
||||||
|
- name: Package
|
||||||
|
run: |
|
||||||
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
|
cp -t package $(pds -vv -f package/*.exe)
|
||||||
|
# Add gdbus which is recommended on Windows (why?)
|
||||||
|
cp $MINGW_PREFIX/bin/gdbus.exe package
|
||||||
|
# Handle the glib schema compilation as well
|
||||||
|
glib-compile-schemas $MINGW_PREFIX/share/glib-2.0/schemas/
|
||||||
|
mkdir -p package/share/glib-2.0/schemas/
|
||||||
|
cp -T $MINGW_PREFIX/share/glib-2.0/schemas/gschemas.compiled package/share/glib-2.0/schemas/gschemas.compiled
|
||||||
|
# Pixbuf stuff, in order to get SVGs (scalable icons) to load
|
||||||
|
mkdir -p package/lib/gdk-pixbuf-2.0
|
||||||
|
cp -rT $MINGW_PREFIX/lib/gdk-pixbuf-2.0 package/lib/gdk-pixbuf-2.0
|
||||||
|
cp -f -t package $(pds -vv -f $MINGW_PREFIX/lib/gdk-pixbuf-2.0/2.10.0/loaders/*)
|
||||||
|
find package -iname "*.dll" -or -iname "*.exe" -type f -exec mingw-strip {} +
|
||||||
|
|
||||||
|
cd package/share
|
||||||
|
wget2 https://github.com/qarmin/czkawka/files/8880216/gtk4_theme.zip
|
||||||
|
unzip gtk4_theme.zip
|
||||||
|
rm gtk4_theme.zip
|
||||||
|
cd ../..
|
||||||
|
- name: Upload artifacts
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: czkawka-windows-${{ github.sha }}
|
||||||
|
path: |
|
||||||
|
./package
|
||||||
|
if-no-files-found: error
|
511
.github/workflows/windows.yml.disabled
vendored
511
.github/workflows/windows.yml.disabled
vendored
|
@ -1,511 +0,0 @@
|
||||||
name: 🏁 Windows
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
pull_request:
|
|
||||||
schedule:
|
|
||||||
- cron: '0 0 * * 2'
|
|
||||||
|
|
||||||
env:
|
|
||||||
CARGO_TERM_COLOR: always
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
windows-cli:
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
toolchain: [ stable ]
|
|
||||||
type: [ release ]
|
|
||||||
runs-on: windows-2019
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- uses: actions/setup-python@v1
|
|
||||||
|
|
||||||
- uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: ${{ matrix.toolchain }}
|
|
||||||
override: true
|
|
||||||
|
|
||||||
- uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
target
|
|
||||||
key: windows-cli-${{github.ref}}-${{github.sha}}
|
|
||||||
restore-keys: |
|
|
||||||
windows-cli-${{github.ref}}-${{github.sha}}
|
|
||||||
|
|
||||||
- name: Build CLI Debug
|
|
||||||
run: cargo build --bin czkawka_cli
|
|
||||||
env:
|
|
||||||
CARGO_INCREMENTAL: 0
|
|
||||||
RUSTFLAGS: "-C debuginfo=0 -D warnings"
|
|
||||||
if: ${{ matrix.type == 'debug'}}
|
|
||||||
|
|
||||||
- name: Build CLI Release
|
|
||||||
run: cargo build --release --bin czkawka_cli
|
|
||||||
env:
|
|
||||||
CARGO_INCREMENTAL: 0
|
|
||||||
RUSTFLAGS: "-C debuginfo=0 -D warnings"
|
|
||||||
if: ${{ matrix.type == 'release'}}
|
|
||||||
|
|
||||||
- name: Store Windows CLI
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: czkawka_cli-${{ runner.os }}-${{ matrix.toolchain }}
|
|
||||||
path: target/release/czkawka_cli.exe
|
|
||||||
if: ${{ matrix.type == 'release' }}
|
|
||||||
|
|
||||||
# Duplicate finder checks included and excluded directories
|
|
||||||
# Others are just check delete files number
|
|
||||||
# Windows build have some elements changed like powershell before wget and unzip, python instead python3, rm -r instead rm -r and one (at the top) additional test which check size of characters
|
|
||||||
- name: test
|
|
||||||
run: |
|
|
||||||
powershell wget https://github.com/qarmin/czkawka/releases/download/1.1.0/TestSuite.zip -O TestSuite.zip
|
|
||||||
powershell unzip TestSuite.zip -d TestSuite
|
|
||||||
python misc/check_results.py TestSuite 15 8
|
|
||||||
|
|
||||||
|
|
||||||
target/release/czkawka_cli dup -d "$(pwd)/TestSuite" "$(pwd)\testsuite" -e "$(pwd)/TestSuite/subFolder" -D aeo -m 1024
|
|
||||||
python misc/check_results.py TestSuite 13 8
|
|
||||||
|
|
||||||
rm -r TestSuite
|
|
||||||
unzip TestSuite.zip -d TestSuite
|
|
||||||
|
|
||||||
target/release/czkawka_cli dup -d "$(pwd)/TestSuite" "$(pwd)/teStSuite" -D aen -m 1024
|
|
||||||
python misc/check_results.py TestSuite 7 8
|
|
||||||
|
|
||||||
rm -r TestSuite
|
|
||||||
unzip TestSuite.zip -d TestSuite
|
|
||||||
|
|
||||||
target/release/czkawka_cli dup -d "$(pwd)\TestSuite" "$(pwd)/TESTSUITE" -D aen -m 1024
|
|
||||||
python misc/check_results.py TestSuite 7 8
|
|
||||||
|
|
||||||
rm -r TestSuite
|
|
||||||
unzip TestSuite.zip -d TestSuite
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
target/release/czkawka_cli dup -d "$(pwd)/TestSuite" -D aen -m 1024
|
|
||||||
python misc/check_results.py TestSuite 7 8
|
|
||||||
|
|
||||||
rm -r TestSuite
|
|
||||||
unzip TestSuite.zip -d TestSuite
|
|
||||||
|
|
||||||
target/release/czkawka_cli dup -d "$(pwd)/TestSuite" -D aen -m 1024
|
|
||||||
python misc/check_results.py TestSuite 7 8
|
|
||||||
|
|
||||||
rm -r TestSuite
|
|
||||||
unzip TestSuite.zip -d TestSuite
|
|
||||||
|
|
||||||
target/release/czkawka_cli dup -d "$(pwd)/TestSuite" -x TEXT -D aeo -m 1024
|
|
||||||
python misc/check_results.py TestSuite 14 8
|
|
||||||
|
|
||||||
rm -r TestSuite
|
|
||||||
unzip TestSuite.zip -d TestSuite
|
|
||||||
|
|
||||||
target/release/czkawka_cli dup -d "$(pwd)/TestSuite" -e "$(pwd)/TestSuite/SubFolder" -D aeo -m 1024
|
|
||||||
python misc/check_results.py TestSuite 13 8
|
|
||||||
|
|
||||||
rm -r TestSuite
|
|
||||||
unzip TestSuite.zip -d TestSuite
|
|
||||||
|
|
||||||
target/release/czkawka_cli dup -d "$(pwd)/TestSuite" -m 1500 -D aeo
|
|
||||||
python misc/check_results.py TestSuite 8 8
|
|
||||||
|
|
||||||
rm -r TestSuite
|
|
||||||
unzip TestSuite.zip -d TestSuite
|
|
||||||
|
|
||||||
target/release/czkawka_cli dup -d "$(pwd)/TestSuite" -R -m 1024
|
|
||||||
python misc/check_results.py TestSuite 15 8
|
|
||||||
target/release/czkawka_cli dup -d "$(pwd)/TestSuite" -R -D aeo -m 1024
|
|
||||||
python misc/check_results.py TestSuite 13 8
|
|
||||||
|
|
||||||
|
|
||||||
target/release/czkawka_cli big -d "$(pwd)/TestSuite"
|
|
||||||
|
|
||||||
rm -r TestSuite
|
|
||||||
unzip TestSuite.zip -d TestSuite
|
|
||||||
|
|
||||||
target/release/czkawka_cli empty-files -d "$(pwd)/TestSuite"
|
|
||||||
python misc/check_results.py TestSuite 15 8
|
|
||||||
target/release/czkawka_cli empty-files -d "$(pwd)/TestSuite" -D
|
|
||||||
python misc/check_results.py TestSuite 13 8
|
|
||||||
|
|
||||||
rm -r TestSuite
|
|
||||||
unzip TestSuite.zip -d TestSuite
|
|
||||||
|
|
||||||
target/release/czkawka_cli empty-folders -d "$(pwd)/TestSuite"
|
|
||||||
python misc/check_results.py TestSuite 15 8
|
|
||||||
target/release/czkawka_cli empty-folders -d "$(pwd)/TestSuite" -D
|
|
||||||
python misc/check_results.py TestSuite 15 2
|
|
||||||
|
|
||||||
rm -r TestSuite
|
|
||||||
unzip TestSuite.zip -d TestSuite
|
|
||||||
|
|
||||||
target/release/czkawka_cli temp -d "$(pwd)/TestSuite"
|
|
||||||
python misc/check_results.py TestSuite 15 8
|
|
||||||
target/release/czkawka_cli temp -d "$(pwd)/TestSuite" -D
|
|
||||||
python misc/check_results.py TestSuite 14 8
|
|
||||||
if: ${{ matrix.type == 'release' }}
|
|
||||||
|
|
||||||
windows-gui-release-normal-app:
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
toolchain: [ stable ]
|
|
||||||
type: [ release ]
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: ${{ matrix.toolchain }}
|
|
||||||
override: true
|
|
||||||
|
|
||||||
- name: Install Gtk, Mingw, unzip, zip and wget
|
|
||||||
run: sudo apt-get update; sudo apt install mingw-w64 libgtk-4-dev unzip wget zip -y
|
|
||||||
|
|
||||||
- name: Build GUI Release Cross Compile
|
|
||||||
run: |
|
|
||||||
rustup target add x86_64-pc-windows-gnu
|
|
||||||
|
|
||||||
echo "[target.x86_64-pc-windows-gnu]" > ~/.cargo/config
|
|
||||||
echo "linker = \"x86_64-w64-mingw32-gcc\"" >> ~/.cargo/config
|
|
||||||
echo "ar = \"x86_64-w64-mingw32-gcc-ar\"" >> ~/.cargo/config
|
|
||||||
|
|
||||||
GTK_LIBRARY="$(pwd)/gtk_library"
|
|
||||||
GTK_APP="$(pwd)/gtk_app"
|
|
||||||
GTK_THEME="$(pwd)/gtk_theme"
|
|
||||||
|
|
||||||
wget https://github.com/qarmin/gtk_library_store/releases/download/3.24.0/gtk4_4_2_test.zip
|
|
||||||
unzip gtk4_4_2_test.zip -d $GTK_LIBRARY
|
|
||||||
GTK_LIBRARY="$GTK_LIBRARY/mingw64"
|
|
||||||
|
|
||||||
wget https://github.com/nrhodes91/AdMin/archive/master.zip
|
|
||||||
unzip master.zip -d $GTK_THEME
|
|
||||||
|
|
||||||
PKG_CONFIG_ALLOW_CROSS=1 PKG_CONFIG_PATH="$GTK_LIBRARY/lib/pkgconfig" RUSTFLAGS="-L $GTK_LIBRARY/lib" cargo build --target=x86_64-pc-windows-gnu --bin czkawka_gui --release
|
|
||||||
|
|
||||||
strip target/x86_64-pc-windows-gnu/release/czkawka_gui.exe
|
|
||||||
|
|
||||||
mkdir $GTK_APP
|
|
||||||
cp target/x86_64-pc-windows-gnu/release/czkawka_gui.exe $GTK_APP
|
|
||||||
cp $GTK_LIBRARY/bin/*.dll $GTK_APP
|
|
||||||
mkdir -p $GTK_APP/share/glib-2.0/schemas
|
|
||||||
mkdir $GTK_APP/share/icons
|
|
||||||
cp $GTK_LIBRARY/share/glib-2.0/schemas/* $GTK_APP/share/glib-2.0/schemas
|
|
||||||
cp -r $GTK_LIBRARY/share/icons/* $GTK_APP/share/icons
|
|
||||||
mkdir $GTK_APP/lib
|
|
||||||
cp -r $GTK_LIBRARY/lib/gdk-pixbuf-2.0 $GTK_APP/lib
|
|
||||||
|
|
||||||
mkdir -p $GTK_APP/share/themes
|
|
||||||
mkdir -p $GTK_APP/share/gtk-3.0
|
|
||||||
echo "[Settings]" > $GTK_APP/share/gtk-3.0/settings.ini
|
|
||||||
echo "gtk-theme-name = admin-gtk3-dark-osx" >> $GTK_APP/share/gtk-3.0/settings.ini
|
|
||||||
echo "gtk-font-name = Segoe UI 10" >> $GTK_APP/share/gtk-3.0/settings.ini
|
|
||||||
echo "gtk-xft-rgba = rgb" >> $GTK_APP/share/gtk-3.0/settings.ini
|
|
||||||
cp $GTK_THEME/AdMin-master/admin-gtk3-dark-osx $GTK_APP/share/themes -r -L
|
|
||||||
|
|
||||||
# This part is only unique for Czkawka
|
|
||||||
# This code allows to check which icons are used in Czkawka
|
|
||||||
# cd czkawka/ui
|
|
||||||
# rg icon-name
|
|
||||||
rm -rf $GTK_APP/share/icons/Adwaita/16x16
|
|
||||||
rm -rf $GTK_APP/share/icons/Adwaita/22x22
|
|
||||||
rm -rf $GTK_APP/share/icons/Adwaita/24x24
|
|
||||||
rm -rf $GTK_APP/share/icons/Adwaita/256x256
|
|
||||||
rm -rf $GTK_APP/share/icons/Adwaita/32x32
|
|
||||||
rm -rf $GTK_APP/share/icons/Adwaita/48x48
|
|
||||||
rm -rf $GTK_APP/share/icons/Adwaita/512x512
|
|
||||||
rm -rf $GTK_APP/share/icons/Adwaita/64x64
|
|
||||||
rm -rf $GTK_APP/share/icons/Adwaita/8x8
|
|
||||||
rm -rf $GTK_APP/share/icons/Adwaita/96x96
|
|
||||||
rm -rf $GTK_APP/share/icons/Adwaita/cursors
|
|
||||||
rm -rf $GTK_APP/share/icons/Adwaita/scalable
|
|
||||||
rm -rf $GTK_APP/share/icons/Adwaita/scalable-up-to-32
|
|
||||||
rm -rf $GTK_APP/share/icons/hicolor
|
|
||||||
wget https://github.com/qarmin/gtk_library_store/releases/download/3.24.0/czkawka_icons.zip
|
|
||||||
unzip czkawka_icons.zip -d $GTK_APP/share/icons/Adwaita
|
|
||||||
|
|
||||||
zip -r gtk_app.zip $GTK_APP
|
|
||||||
env:
|
|
||||||
CARGO_INCREMENTAL: 0
|
|
||||||
RUSTFLAGS: "-C debuginfo=0 -D warnings"
|
|
||||||
|
|
||||||
- name: Store Windows GUI CrossComplile
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: czkawka_gui-release-normal-app-${{ matrix.toolchain }}
|
|
||||||
path: gtk_app.zip
|
|
||||||
|
|
||||||
windows-gui-release-console:
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
toolchain: [ stable ]
|
|
||||||
type: [ release ]
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: ${{ matrix.toolchain }}
|
|
||||||
override: true
|
|
||||||
|
|
||||||
- name: Install Gtk, Mingw, unzip, zip and wget
|
|
||||||
run: sudo apt-get update; sudo apt install mingw-w64 libgtk-4-dev unzip wget zip -y
|
|
||||||
|
|
||||||
- name: Build GUI Release Cross Compile
|
|
||||||
run: |
|
|
||||||
sed -i 's/windows_subsystem = "windows"/windows_subsystem = "console"/' czkawka_gui/src/main.rs
|
|
||||||
rustup target add x86_64-pc-windows-gnu
|
|
||||||
|
|
||||||
echo "[target.x86_64-pc-windows-gnu]" > ~/.cargo/config
|
|
||||||
echo "linker = \"x86_64-w64-mingw32-gcc\"" >> ~/.cargo/config
|
|
||||||
echo "ar = \"x86_64-w64-mingw32-gcc-ar\"" >> ~/.cargo/config
|
|
||||||
|
|
||||||
GTK_LIBRARY="$(pwd)/gtk_library"
|
|
||||||
GTK_APP="$(pwd)/gtk_app"
|
|
||||||
GTK_THEME="$(pwd)/gtk_theme"
|
|
||||||
|
|
||||||
wget https://github.com/qarmin/gtk_library_store/releases/download/3.24.0/mingw64.zip
|
|
||||||
unzip mingw64.zip -d $GTK_LIBRARY
|
|
||||||
GTK_LIBRARY="$GTK_LIBRARY/mingw64"
|
|
||||||
|
|
||||||
wget https://github.com/nrhodes91/AdMin/archive/master.zip
|
|
||||||
unzip master.zip -d $GTK_THEME
|
|
||||||
|
|
||||||
PKG_CONFIG_ALLOW_CROSS=1 PKG_CONFIG_PATH="$GTK_LIBRARY/lib/pkgconfig" RUSTFLAGS="-L $GTK_LIBRARY/lib" cargo build --target=x86_64-pc-windows-gnu --bin czkawka_gui --release
|
|
||||||
|
|
||||||
strip target/x86_64-pc-windows-gnu/release/czkawka_gui.exe
|
|
||||||
|
|
||||||
mkdir $GTK_APP
|
|
||||||
cp target/x86_64-pc-windows-gnu/release/czkawka_gui.exe $GTK_APP
|
|
||||||
cp $GTK_LIBRARY/bin/*.dll $GTK_APP
|
|
||||||
mkdir -p $GTK_APP/share/glib-2.0/schemas
|
|
||||||
mkdir $GTK_APP/share/icons
|
|
||||||
cp $GTK_LIBRARY/share/glib-2.0/schemas/* $GTK_APP/share/glib-2.0/schemas
|
|
||||||
cp -r $GTK_LIBRARY/share/icons/* $GTK_APP/share/icons
|
|
||||||
mkdir $GTK_APP/lib
|
|
||||||
cp -r $GTK_LIBRARY/lib/gdk-pixbuf-2.0 $GTK_APP/lib
|
|
||||||
|
|
||||||
mkdir -p $GTK_APP/share/themes
|
|
||||||
mkdir -p $GTK_APP/share/gtk-3.0
|
|
||||||
echo "[Settings]" > $GTK_APP/share/gtk-3.0/settings.ini
|
|
||||||
echo "gtk-theme-name = admin-gtk3-dark-osx" >> $GTK_APP/share/gtk-3.0/settings.ini
|
|
||||||
echo "gtk-font-name = Segoe UI 10" >> $GTK_APP/share/gtk-3.0/settings.ini
|
|
||||||
echo "gtk-xft-rgba = rgb" >> $GTK_APP/share/gtk-3.0/settings.ini
|
|
||||||
cp $GTK_THEME/AdMin-master/admin-gtk3-dark-osx $GTK_APP/share/themes -r -L
|
|
||||||
|
|
||||||
# This part is only unique for Czkawka
|
|
||||||
# This code allows to check which icons are used in Czkawka
|
|
||||||
# cd czkawka/ui
|
|
||||||
# rg icon-name
|
|
||||||
rm -rf $GTK_APP/share/icons/Adwaita/16x16
|
|
||||||
rm -rf $GTK_APP/share/icons/Adwaita/22x22
|
|
||||||
rm -rf $GTK_APP/share/icons/Adwaita/24x24
|
|
||||||
rm -rf $GTK_APP/share/icons/Adwaita/256x256
|
|
||||||
rm -rf $GTK_APP/share/icons/Adwaita/32x32
|
|
||||||
rm -rf $GTK_APP/share/icons/Adwaita/48x48
|
|
||||||
rm -rf $GTK_APP/share/icons/Adwaita/512x512
|
|
||||||
rm -rf $GTK_APP/share/icons/Adwaita/64x64
|
|
||||||
rm -rf $GTK_APP/share/icons/Adwaita/8x8
|
|
||||||
rm -rf $GTK_APP/share/icons/Adwaita/96x96
|
|
||||||
rm -rf $GTK_APP/share/icons/Adwaita/cursors
|
|
||||||
rm -rf $GTK_APP/share/icons/Adwaita/scalable
|
|
||||||
rm -rf $GTK_APP/share/icons/Adwaita/scalable-up-to-32
|
|
||||||
rm -rf $GTK_APP/share/icons/hicolor
|
|
||||||
wget https://github.com/qarmin/gtk_library_store/releases/download/3.24.0/czkawka_icons.zip
|
|
||||||
unzip czkawka_icons.zip -d $GTK_APP/share/icons/Adwaita
|
|
||||||
|
|
||||||
zip -r gtk_app.zip $GTK_APP
|
|
||||||
env:
|
|
||||||
CARGO_INCREMENTAL: 0
|
|
||||||
RUSTFLAGS: "-C debuginfo=0 -D warnings"
|
|
||||||
|
|
||||||
- name: Store Windows GUI CrossComplile
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: czkawka_gui-release-console-${{ matrix.toolchain }}
|
|
||||||
path: gtk_app.zip
|
|
||||||
|
|
||||||
# windows-gui-debug-normal-app:
|
|
||||||
# strategy:
|
|
||||||
# matrix:
|
|
||||||
# toolchain: [ stable ]
|
|
||||||
# type: [ release ]
|
|
||||||
# runs-on: ubuntu-22.04
|
|
||||||
# steps:
|
|
||||||
# - uses: actions/checkout@v2
|
|
||||||
#
|
|
||||||
# - uses: actions-rs/toolchain@v1
|
|
||||||
# with:
|
|
||||||
# toolchain: ${{ matrix.toolchain }}
|
|
||||||
# override: true
|
|
||||||
#
|
|
||||||
# - name: Install Gtk, Mingw, unzip, zip and wget
|
|
||||||
# run: sudo apt-get update; sudo apt install mingw-w64 libgtk-4-dev unzip wget zip -y
|
|
||||||
#
|
|
||||||
# - name: Build GUI Debug Cross Compile
|
|
||||||
# run: |
|
|
||||||
# rustup target add x86_64-pc-windows-gnu
|
|
||||||
#
|
|
||||||
# echo "[target.x86_64-pc-windows-gnu]" > ~/.cargo/config
|
|
||||||
# echo "linker = \"x86_64-w64-mingw32-gcc\"" >> ~/.cargo/config
|
|
||||||
# echo "ar = \"x86_64-w64-mingw32-gcc-ar\"" >> ~/.cargo/config
|
|
||||||
#
|
|
||||||
# GTK_LIBRARY="$(pwd)/gtk_library"
|
|
||||||
# GTK_APP="$(pwd)/gtk_app"
|
|
||||||
# GTK_THEME="$(pwd)/gtk_theme"
|
|
||||||
#
|
|
||||||
# wget https://github.com/qarmin/gtk_library_store/releases/download/3.24.0/mingw64.zip
|
|
||||||
# unzip mingw64.zip -d $GTK_LIBRARY
|
|
||||||
# GTK_LIBRARY="$GTK_LIBRARY/mingw64"
|
|
||||||
#
|
|
||||||
# wget https://github.com/nrhodes91/AdMin/archive/master.zip
|
|
||||||
# unzip master.zip -d $GTK_THEME
|
|
||||||
#
|
|
||||||
# PKG_CONFIG_ALLOW_CROSS=1 PKG_CONFIG_PATH="$GTK_LIBRARY/lib/pkgconfig" RUSTFLAGS="-L $GTK_LIBRARY/lib" cargo build --target=x86_64-pc-windows-gnu --bin czkawka_gui
|
|
||||||
#
|
|
||||||
# strip target/x86_64-pc-windows-gnu/debug/czkawka_gui.exe
|
|
||||||
#
|
|
||||||
# mkdir $GTK_APP
|
|
||||||
# cp target/x86_64-pc-windows-gnu/debug/czkawka_gui.exe $GTK_APP
|
|
||||||
# cp $GTK_LIBRARY/bin/*.dll $GTK_APP
|
|
||||||
# mkdir -p $GTK_APP/share/glib-2.0/schemas
|
|
||||||
# mkdir $GTK_APP/share/icons
|
|
||||||
# cp $GTK_LIBRARY/share/glib-2.0/schemas/* $GTK_APP/share/glib-2.0/schemas
|
|
||||||
# cp -r $GTK_LIBRARY/share/icons/* $GTK_APP/share/icons
|
|
||||||
# mkdir $GTK_APP/lib
|
|
||||||
# cp -r $GTK_LIBRARY/lib/gdk-pixbuf-2.0 $GTK_APP/lib
|
|
||||||
#
|
|
||||||
# mkdir -p $GTK_APP/share/themes
|
|
||||||
# mkdir -p $GTK_APP/share/gtk-3.0
|
|
||||||
# echo "[Settings]" > $GTK_APP/share/gtk-3.0/settings.ini
|
|
||||||
# echo "gtk-theme-name = admin-gtk3-dark-osx" >> $GTK_APP/share/gtk-3.0/settings.ini
|
|
||||||
# echo "gtk-font-name = Segoe UI 10" >> $GTK_APP/share/gtk-3.0/settings.ini
|
|
||||||
# echo "gtk-xft-rgba = rgb" >> $GTK_APP/share/gtk-3.0/settings.ini
|
|
||||||
# cp $GTK_THEME/AdMin-master/admin-gtk3-dark-osx $GTK_APP/share/themes -r -L
|
|
||||||
#
|
|
||||||
# # This part is only unique for Czkawka
|
|
||||||
# # This code allows to check which icons are used in Czkawka
|
|
||||||
# # cd czkawka/ui
|
|
||||||
# # rg icon-name
|
|
||||||
# rm -rf $GTK_APP/share/icons/Adwaita/16x16
|
|
||||||
# rm -rf $GTK_APP/share/icons/Adwaita/22x22
|
|
||||||
# rm -rf $GTK_APP/share/icons/Adwaita/24x24
|
|
||||||
# rm -rf $GTK_APP/share/icons/Adwaita/256x256
|
|
||||||
# rm -rf $GTK_APP/share/icons/Adwaita/32x32
|
|
||||||
# rm -rf $GTK_APP/share/icons/Adwaita/48x48
|
|
||||||
# rm -rf $GTK_APP/share/icons/Adwaita/512x512
|
|
||||||
# rm -rf $GTK_APP/share/icons/Adwaita/64x64
|
|
||||||
# rm -rf $GTK_APP/share/icons/Adwaita/8x8
|
|
||||||
# rm -rf $GTK_APP/share/icons/Adwaita/96x96
|
|
||||||
# rm -rf $GTK_APP/share/icons/Adwaita/cursors
|
|
||||||
# rm -rf $GTK_APP/share/icons/Adwaita/scalable
|
|
||||||
# rm -rf $GTK_APP/share/icons/Adwaita/scalable-up-to-32
|
|
||||||
# rm -rf $GTK_APP/share/icons/hicolor
|
|
||||||
# wget https://github.com/qarmin/gtk_library_store/releases/download/3.24.0/czkawka_icons.zip
|
|
||||||
# unzip czkawka_icons.zip -d $GTK_APP/share/icons/Adwaita
|
|
||||||
#
|
|
||||||
# zip -r gtk_app.zip $GTK_APP
|
|
||||||
# env:
|
|
||||||
# CARGO_INCREMENTAL: 0
|
|
||||||
# RUSTFLAGS: "-C debuginfo=0 -D warnings"
|
|
||||||
#
|
|
||||||
# - name: Store Windows GUI CrossComplile
|
|
||||||
# uses: actions/upload-artifact@v2
|
|
||||||
# with:
|
|
||||||
# name: czkawka_gui-debug-normal-app-${{ matrix.toolchain }}
|
|
||||||
# path: gtk_app.zip
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# windows-gui-debug-console:
|
|
||||||
# strategy:
|
|
||||||
# matrix:
|
|
||||||
# toolchain: [ stable ]
|
|
||||||
# type: [ release ]
|
|
||||||
# runs-on: ubuntu-22.04
|
|
||||||
# steps:
|
|
||||||
# - uses: actions/checkout@v2
|
|
||||||
#
|
|
||||||
# - uses: actions-rs/toolchain@v1
|
|
||||||
# with:
|
|
||||||
# toolchain: ${{ matrix.toolchain }}
|
|
||||||
# override: true
|
|
||||||
#
|
|
||||||
# - name: Install Gtk, Mingw, unzip, zip and wget
|
|
||||||
# run: sudo apt-get update; sudo apt install mingw-w64 libgtk-4-dev unzip wget zip -y
|
|
||||||
#
|
|
||||||
# - name: Build GUI Debug Cross Compile
|
|
||||||
# run: |
|
|
||||||
# sed -i 's/windows_subsystem = "windows"/windows_subsystem = "console"/' czkawka_gui/src/main.rs
|
|
||||||
# rustup target add x86_64-pc-windows-gnu
|
|
||||||
#
|
|
||||||
# echo "[target.x86_64-pc-windows-gnu]" > ~/.cargo/config
|
|
||||||
# echo "linker = \"x86_64-w64-mingw32-gcc\"" >> ~/.cargo/config
|
|
||||||
# echo "ar = \"x86_64-w64-mingw32-gcc-ar\"" >> ~/.cargo/config
|
|
||||||
#
|
|
||||||
# GTK_LIBRARY="$(pwd)/gtk_library"
|
|
||||||
# GTK_APP="$(pwd)/gtk_app"
|
|
||||||
# GTK_THEME="$(pwd)/gtk_theme"
|
|
||||||
#
|
|
||||||
# wget https://github.com/qarmin/gtk_library_store/releases/download/3.24.0/mingw64.zip
|
|
||||||
# unzip mingw64.zip -d $GTK_LIBRARY
|
|
||||||
# GTK_LIBRARY="$GTK_LIBRARY/mingw64"
|
|
||||||
#
|
|
||||||
# wget https://github.com/nrhodes91/AdMin/archive/master.zip
|
|
||||||
# unzip master.zip -d $GTK_THEME
|
|
||||||
#
|
|
||||||
# PKG_CONFIG_ALLOW_CROSS=1 PKG_CONFIG_PATH="$GTK_LIBRARY/lib/pkgconfig" RUSTFLAGS="-L $GTK_LIBRARY/lib" cargo build --target=x86_64-pc-windows-gnu --bin czkawka_gui
|
|
||||||
#
|
|
||||||
# strip target/x86_64-pc-windows-gnu/debug/czkawka_gui.exe
|
|
||||||
#
|
|
||||||
# mkdir $GTK_APP
|
|
||||||
# cp target/x86_64-pc-windows-gnu/debug/czkawka_gui.exe $GTK_APP
|
|
||||||
# cp $GTK_LIBRARY/bin/*.dll $GTK_APP
|
|
||||||
# mkdir -p $GTK_APP/share/glib-2.0/schemas
|
|
||||||
# mkdir $GTK_APP/share/icons
|
|
||||||
# cp $GTK_LIBRARY/share/glib-2.0/schemas/* $GTK_APP/share/glib-2.0/schemas
|
|
||||||
# cp -r $GTK_LIBRARY/share/icons/* $GTK_APP/share/icons
|
|
||||||
# mkdir $GTK_APP/lib
|
|
||||||
# cp -r $GTK_LIBRARY/lib/gdk-pixbuf-2.0 $GTK_APP/lib
|
|
||||||
#
|
|
||||||
# mkdir -p $GTK_APP/share/themes
|
|
||||||
# mkdir -p $GTK_APP/share/gtk-3.0
|
|
||||||
# echo "[Settings]" > $GTK_APP/share/gtk-3.0/settings.ini
|
|
||||||
# echo "gtk-theme-name = admin-gtk3-dark-osx" >> $GTK_APP/share/gtk-3.0/settings.ini
|
|
||||||
# echo "gtk-font-name = Segoe UI 10" >> $GTK_APP/share/gtk-3.0/settings.ini
|
|
||||||
# echo "gtk-xft-rgba = rgb" >> $GTK_APP/share/gtk-3.0/settings.ini
|
|
||||||
# cp $GTK_THEME/AdMin-master/admin-gtk3-dark-osx $GTK_APP/share/themes -r -L
|
|
||||||
#
|
|
||||||
# # This part is only unique for Czkawka
|
|
||||||
# # This code allows to check which icons are used in Czkawka
|
|
||||||
# # cd czkawka/ui
|
|
||||||
# # rg icon-name
|
|
||||||
# rm -rf $GTK_APP/share/icons/Adwaita/16x16
|
|
||||||
# rm -rf $GTK_APP/share/icons/Adwaita/22x22
|
|
||||||
# rm -rf $GTK_APP/share/icons/Adwaita/24x24
|
|
||||||
# rm -rf $GTK_APP/share/icons/Adwaita/256x256
|
|
||||||
# rm -rf $GTK_APP/share/icons/Adwaita/32x32
|
|
||||||
# rm -rf $GTK_APP/share/icons/Adwaita/48x48
|
|
||||||
# rm -rf $GTK_APP/share/icons/Adwaita/512x512
|
|
||||||
# rm -rf $GTK_APP/share/icons/Adwaita/64x64
|
|
||||||
# rm -rf $GTK_APP/share/icons/Adwaita/8x8
|
|
||||||
# rm -rf $GTK_APP/share/icons/Adwaita/96x96
|
|
||||||
# rm -rf $GTK_APP/share/icons/Adwaita/cursors
|
|
||||||
# rm -rf $GTK_APP/share/icons/Adwaita/scalable
|
|
||||||
# rm -rf $GTK_APP/share/icons/Adwaita/scalable-up-to-32
|
|
||||||
# rm -rf $GTK_APP/share/icons/hicolor
|
|
||||||
# wget https://github.com/qarmin/gtk_library_store/releases/download/3.24.0/czkawka_icons.zip
|
|
||||||
# unzip czkawka_icons.zip -d $GTK_APP/share/icons/Adwaita
|
|
||||||
#
|
|
||||||
# zip -r gtk_app.zip $GTK_APP
|
|
||||||
# env:
|
|
||||||
# CARGO_INCREMENTAL: 0
|
|
||||||
# RUSTFLAGS: "-C debuginfo=0 -D warnings"
|
|
||||||
#
|
|
||||||
# - name: Store Windows GUI CrossComplile
|
|
||||||
# uses: actions/upload-artifact@v2
|
|
||||||
# with:
|
|
||||||
# name: czkawka_gui-debug-console-${{ matrix.toolchain }}
|
|
||||||
# path: gtk_app.zip
|
|
|
@ -26,6 +26,7 @@ core_directory_overlap = Directories: All directories to search overlaps with ex
|
||||||
core_directory_unable_to_get_device_id = Directories: Unable to get device id from folder { $path }
|
core_directory_unable_to_get_device_id = Directories: Unable to get device id from folder { $path }
|
||||||
|
|
||||||
core_ffmpeg_not_found = Cannot find proper installation of FFmpeg
|
core_ffmpeg_not_found = Cannot find proper installation of FFmpeg
|
||||||
|
core_ffmpeg_not_found_windows = When using Windows be sure that ffmpeg.exe and ffprobe.exe are available in PATH or are put directly to same folder where is app executable
|
||||||
core_ffmpeg_missing_in_snap = Similar Videos don't work currently with snap, if you want help look at - { $url }
|
core_ffmpeg_missing_in_snap = Similar Videos don't work currently with snap, if you want help look at - { $url }
|
||||||
|
|
||||||
core_saving_to_cache = Saved to file { $number } cache entries
|
core_saving_to_cache = Saved to file { $number } cache entries
|
||||||
|
|
|
@ -21,7 +21,7 @@ use crate::common_items::ExcludedItems;
|
||||||
use crate::common_messages::Messages;
|
use crate::common_messages::Messages;
|
||||||
use crate::common_traits::*;
|
use crate::common_traits::*;
|
||||||
|
|
||||||
static DISABLED_EXTENSIONS: &[&str] = &["file", "cache", "bak"]; // Such files can have any type inside
|
static DISABLED_EXTENSIONS: &[&str] = &["file", "cache", "bak", "data"]; // Such files can have any type inside
|
||||||
|
|
||||||
// This adds several workarounds for bugs/invalid recognizing types by external libraries
|
// This adds several workarounds for bugs/invalid recognizing types by external libraries
|
||||||
// ("real_content_extension", "current_file_extension")
|
// ("real_content_extension", "current_file_extension")
|
||||||
|
@ -33,10 +33,10 @@ static WORKAROUNDS: &[(&str, &str)] = &[
|
||||||
("exe", "bck"),
|
("exe", "bck"),
|
||||||
("exe", "com"),
|
("exe", "com"),
|
||||||
("exe", "cpl"),
|
("exe", "cpl"),
|
||||||
("exe", "dll"),
|
|
||||||
("exe", "dll16"),
|
("exe", "dll16"),
|
||||||
("exe", "drv"),
|
("exe", "dll"),
|
||||||
("exe", "drv16"),
|
("exe", "drv16"),
|
||||||
|
("exe", "drv"),
|
||||||
("exe", "ds"),
|
("exe", "ds"),
|
||||||
("exe", "efi"),
|
("exe", "efi"),
|
||||||
("exe", "exe16"),
|
("exe", "exe16"),
|
||||||
|
@ -44,20 +44,43 @@ static WORKAROUNDS: &[(&str, &str)] = &[
|
||||||
("exe", "mod16"),
|
("exe", "mod16"),
|
||||||
("exe", "msstyles"),
|
("exe", "msstyles"),
|
||||||
("exe", "mui"),
|
("exe", "mui"),
|
||||||
|
("exe", "mun"),
|
||||||
("exe", "orig"),
|
("exe", "orig"),
|
||||||
|
("exe", "ps1xml"),
|
||||||
|
("exe", "rll"),
|
||||||
|
("exe", "rs"),
|
||||||
|
("exe", "scr"),
|
||||||
("exe", "signed"),
|
("exe", "signed"),
|
||||||
("exe", "sys"),
|
("exe", "sys"),
|
||||||
("exe", "tlb"),
|
("exe", "tlb"),
|
||||||
|
("exe", "tsp"),
|
||||||
|
("exe", "vdm"),
|
||||||
("exe", "vxd"),
|
("exe", "vxd"),
|
||||||
("exe", "winmd"),
|
("exe", "winmd"),
|
||||||
|
("gz", "loggz"),
|
||||||
("xml", "adml"),
|
("xml", "adml"),
|
||||||
|
("xml", "admx"),
|
||||||
|
("xml", "camp"),
|
||||||
|
("xml", "cdmp"),
|
||||||
|
("xml", "cdxml"),
|
||||||
|
("xml", "dgml"),
|
||||||
|
("xml", "diagpkg"),
|
||||||
|
("xml", "gmmp"),
|
||||||
|
("xml", "library-ms"),
|
||||||
|
("xml", "man"),
|
||||||
("xml", "manifest"),
|
("xml", "manifest"),
|
||||||
|
("xml", "msc"),
|
||||||
("xml", "mum"),
|
("xml", "mum"),
|
||||||
|
("xml", "resx"),
|
||||||
|
("zip", "wmz"),
|
||||||
// Other
|
// Other
|
||||||
|
("exe", "pyd"), // Python/Mingw
|
||||||
("gz", "blend"), // Blender
|
("gz", "blend"), // Blender
|
||||||
("gz", "crate"), // Cargo
|
("gz", "crate"), // Cargo
|
||||||
("gz", "svgz"), // Archive svg
|
("gz", "svgz"), // Archive svg
|
||||||
("gz", "tgz"), // Archive
|
("gz", "tgz"), // Archive
|
||||||
|
("html", "dtd"), // Mingw
|
||||||
|
("html", "ent"), // Mingw
|
||||||
("html", "md"), // Markdown
|
("html", "md"), // Markdown
|
||||||
("jpg", "jfif"), // Photo format
|
("jpg", "jfif"), // Photo format
|
||||||
("mobi", "azw3"), // Ebook format
|
("mobi", "azw3"), // Ebook format
|
||||||
|
@ -70,6 +93,7 @@ static WORKAROUNDS: &[(&str, &str)] = &[
|
||||||
("ogg", "ogv"), // Audio format
|
("ogg", "ogv"), // Audio format
|
||||||
("pptx", "ppsx"), // Powerpoint
|
("pptx", "ppsx"), // Powerpoint
|
||||||
("sh", "bash"), // Linux
|
("sh", "bash"), // Linux
|
||||||
|
("sh", "guess"), // GNU
|
||||||
("sh", "pl"), // Gnome/Linux
|
("sh", "pl"), // Gnome/Linux
|
||||||
("sh", "pm"), // Gnome/Linux
|
("sh", "pm"), // Gnome/Linux
|
||||||
("sh", "py"), // Python
|
("sh", "py"), // Python
|
||||||
|
@ -90,6 +114,7 @@ static WORKAROUNDS: &[(&str, &str)] = &[
|
||||||
("xml", "iml"), // Intelij Idea
|
("xml", "iml"), // Intelij Idea
|
||||||
("xml", "kdenlive"), // KDenLive
|
("xml", "kdenlive"), // KDenLive
|
||||||
("xml", "lang"), // ?
|
("xml", "lang"), // ?
|
||||||
|
("xml", "nuspec"), // Nuget
|
||||||
("xml", "policy"), // SystemD
|
("xml", "policy"), // SystemD
|
||||||
("xml", "qsys"), // Quartus
|
("xml", "qsys"), // Quartus
|
||||||
("xml", "sopcinfo"), // Quartus
|
("xml", "sopcinfo"), // Quartus
|
||||||
|
@ -112,12 +137,14 @@ static WORKAROUNDS: &[(&str, &str)] = &[
|
||||||
("zip", "odg"), // Libreoffice
|
("zip", "odg"), // Libreoffice
|
||||||
("zip", "pptx"), // Powerpoint
|
("zip", "pptx"), // Powerpoint
|
||||||
("zip", "whl"), // Python packages
|
("zip", "whl"), // Python packages
|
||||||
|
("zip", "xlsx"), // Excel
|
||||||
("zip", "xpi"), // Firefox extensions
|
("zip", "xpi"), // Firefox extensions
|
||||||
("zip", "zcos"), // Scilab
|
("zip", "zcos"), // Scilab
|
||||||
// Probably invalid
|
// Probably invalid
|
||||||
("html", "svg"),
|
("html", "svg"),
|
||||||
("xml", "html"),
|
("xml", "html"),
|
||||||
// Probably bug in external library
|
// Probably bug in external library
|
||||||
|
("msi", "ppt"), // Not sure whe ppt is not recognized
|
||||||
("msi", "doc"), // Not sure whe doc is not recognized
|
("msi", "doc"), // Not sure whe doc is not recognized
|
||||||
("exe", "xls"), // Not sure whe xls is not recognized
|
("exe", "xls"), // Not sure whe xls is not recognized
|
||||||
];
|
];
|
||||||
|
|
|
@ -48,7 +48,7 @@ pub struct FileEntry {
|
||||||
pub error_string: String,
|
pub error_string: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
#[derive(Copy, Clone, PartialEq, Eq, Serialize, Deserialize, Debug)]
|
||||||
pub enum TypeOfFile {
|
pub enum TypeOfFile {
|
||||||
Unknown = -1,
|
Unknown = -1,
|
||||||
Image = 0,
|
Image = 0,
|
||||||
|
@ -57,6 +57,17 @@ pub enum TypeOfFile {
|
||||||
PDF,
|
PDF,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bitflags! {
|
||||||
|
pub struct CheckedTypes : u32 {
|
||||||
|
const NONE = 0;
|
||||||
|
|
||||||
|
const PDF = 0b1;
|
||||||
|
const AUDIO = 0b10;
|
||||||
|
const IMAGE = 0b100;
|
||||||
|
const ARCHIVE = 0b1000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Info struck with helpful information's about results
|
/// Info struck with helpful information's about results
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct Info {
|
pub struct Info {
|
||||||
|
@ -80,6 +91,7 @@ pub struct BrokenFiles {
|
||||||
recursive_search: bool,
|
recursive_search: bool,
|
||||||
delete_method: DeleteMethod,
|
delete_method: DeleteMethod,
|
||||||
stopped_search: bool,
|
stopped_search: bool,
|
||||||
|
checked_types: CheckedTypes,
|
||||||
use_cache: bool,
|
use_cache: bool,
|
||||||
delete_outdated_cache: bool, // TODO add this to GUI
|
delete_outdated_cache: bool, // TODO add this to GUI
|
||||||
save_also_as_json: bool,
|
save_also_as_json: bool,
|
||||||
|
@ -101,6 +113,7 @@ impl BrokenFiles {
|
||||||
use_cache: true,
|
use_cache: true,
|
||||||
delete_outdated_cache: true,
|
delete_outdated_cache: true,
|
||||||
save_also_as_json: false,
|
save_also_as_json: false,
|
||||||
|
checked_types: CheckedTypes::PDF | CheckedTypes::AUDIO | CheckedTypes::IMAGE | CheckedTypes::ARCHIVE,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -126,6 +139,10 @@ impl BrokenFiles {
|
||||||
&self.broken_files
|
&self.broken_files
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn set_checked_types(&mut self, checked_types: CheckedTypes) {
|
||||||
|
self.checked_types = checked_types;
|
||||||
|
}
|
||||||
|
|
||||||
pub const fn get_text_messages(&self) -> &Messages {
|
pub const fn get_text_messages(&self) -> &Messages {
|
||||||
&self.text_messages
|
&self.text_messages
|
||||||
}
|
}
|
||||||
|
@ -303,6 +320,10 @@ impl BrokenFiles {
|
||||||
continue 'dir;
|
continue 'dir;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !check_extension_allowed(&type_of_file, &self.checked_types) {
|
||||||
|
continue 'dir;
|
||||||
|
}
|
||||||
|
|
||||||
let current_file_name = current_folder.join(entry_data.file_name());
|
let current_file_name = current_folder.join(entry_data.file_name());
|
||||||
if self.excluded_items.is_excluded(¤t_file_name) {
|
if self.excluded_items.is_excluded(¤t_file_name) {
|
||||||
continue 'dir;
|
continue 'dir;
|
||||||
|
@ -368,6 +389,8 @@ impl BrokenFiles {
|
||||||
|
|
||||||
let mut records_already_cached: BTreeMap<String, FileEntry> = Default::default();
|
let mut records_already_cached: BTreeMap<String, FileEntry> = Default::default();
|
||||||
let mut non_cached_files_to_check: BTreeMap<String, FileEntry> = Default::default();
|
let mut non_cached_files_to_check: BTreeMap<String, FileEntry> = Default::default();
|
||||||
|
let mut files_to_check = Default::default();
|
||||||
|
mem::swap(&mut self.files_to_check, &mut files_to_check);
|
||||||
|
|
||||||
if self.use_cache {
|
if self.use_cache {
|
||||||
loaded_hash_map = match load_cache_from_file(&mut self.text_messages, self.delete_outdated_cache) {
|
loaded_hash_map = match load_cache_from_file(&mut self.text_messages, self.delete_outdated_cache) {
|
||||||
|
@ -375,22 +398,26 @@ impl BrokenFiles {
|
||||||
None => Default::default(),
|
None => Default::default(),
|
||||||
};
|
};
|
||||||
|
|
||||||
for (name, file_entry) in &self.files_to_check {
|
for (name, file_entry) in files_to_check {
|
||||||
|
let checked_extension = check_extension_allowed(&file_entry.type_of_file, &self.checked_types); // Only broken
|
||||||
|
|
||||||
#[allow(clippy::if_same_then_else)]
|
#[allow(clippy::if_same_then_else)]
|
||||||
if !loaded_hash_map.contains_key(name) {
|
if checked_extension && !loaded_hash_map.contains_key(&name) {
|
||||||
// If loaded data doesn't contains current image info
|
// If loaded data doesn't contains current info
|
||||||
non_cached_files_to_check.insert(name.clone(), file_entry.clone());
|
non_cached_files_to_check.insert(name, file_entry.clone());
|
||||||
} else if file_entry.size != loaded_hash_map.get(name).unwrap().size || file_entry.modified_date != loaded_hash_map.get(name).unwrap().modified_date {
|
} else if checked_extension && file_entry.size != loaded_hash_map.get(&name).unwrap().size
|
||||||
|
|| file_entry.modified_date != loaded_hash_map.get(&name).unwrap().modified_date
|
||||||
|
{
|
||||||
// When size or modification date of image changed, then it is clear that is different image
|
// When size or modification date of image changed, then it is clear that is different image
|
||||||
non_cached_files_to_check.insert(name.clone(), file_entry.clone());
|
non_cached_files_to_check.insert(name, file_entry);
|
||||||
} else {
|
} else {
|
||||||
// Checking may be omitted when already there is entry with same size and modification date
|
// Checking may be omitted when already there is entry with same size and modification date
|
||||||
records_already_cached.insert(name.clone(), loaded_hash_map.get(name).unwrap().clone());
|
records_already_cached.insert(name.clone(), loaded_hash_map.get(&name).unwrap().clone());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
loaded_hash_map = Default::default();
|
loaded_hash_map = Default::default();
|
||||||
mem::swap(&mut self.files_to_check, &mut non_cached_files_to_check);
|
non_cached_files_to_check = files_to_check;
|
||||||
}
|
}
|
||||||
|
|
||||||
//// PROGRESS THREAD START
|
//// PROGRESS THREAD START
|
||||||
|
@ -765,6 +792,12 @@ fn check_extension_availability(file_name_lowercase: &str) -> TypeOfFile {
|
||||||
TypeOfFile::Unknown
|
TypeOfFile::Unknown
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
fn check_extension_allowed(type_of_file: &TypeOfFile, checked_types: &CheckedTypes) -> bool {
|
||||||
|
((*type_of_file == TypeOfFile::Image) && ((*checked_types & CheckedTypes::IMAGE) == CheckedTypes::IMAGE))
|
||||||
|
|| ((*type_of_file == TypeOfFile::PDF) && ((*checked_types & CheckedTypes::PDF) == CheckedTypes::PDF))
|
||||||
|
|| ((*type_of_file == TypeOfFile::ArchiveZip) && ((*checked_types & CheckedTypes::ARCHIVE) == CheckedTypes::ARCHIVE))
|
||||||
|
|| ((*type_of_file == TypeOfFile::Audio) && ((*checked_types & CheckedTypes::AUDIO) == CheckedTypes::AUDIO))
|
||||||
|
}
|
||||||
|
|
||||||
fn unpack_pdf_error(e: PdfError) -> PdfError {
|
fn unpack_pdf_error(e: PdfError) -> PdfError {
|
||||||
if let Try {
|
if let Try {
|
||||||
|
|
|
@ -203,6 +203,7 @@ impl SimilarVideos {
|
||||||
pub fn find_similar_videos(&mut self, stop_receiver: Option<&Receiver<()>>, progress_sender: Option<&futures::channel::mpsc::UnboundedSender<ProgressData>>) {
|
pub fn find_similar_videos(&mut self, stop_receiver: Option<&Receiver<()>>, progress_sender: Option<&futures::channel::mpsc::UnboundedSender<ProgressData>>) {
|
||||||
if !check_if_ffmpeg_is_installed() {
|
if !check_if_ffmpeg_is_installed() {
|
||||||
self.text_messages.errors.push(flc!("core_ffmpeg_not_found"));
|
self.text_messages.errors.push(flc!("core_ffmpeg_not_found"));
|
||||||
|
self.text_messages.errors.push(flc!("core_ffmpeg_not_found_windows"));
|
||||||
self.text_messages.errors.push(flc!(
|
self.text_messages.errors.push(flc!(
|
||||||
"core_ffmpeg_missing_in_snap",
|
"core_ffmpeg_missing_in_snap",
|
||||||
generate_translation_hashmap(vec![("url", "https://github.com/snapcrafters/ffmpeg/issues/73".to_string())])
|
generate_translation_hashmap(vec![("url", "https://github.com/snapcrafters/ffmpeg/issues/73".to_string())])
|
||||||
|
|
|
@ -116,6 +116,11 @@ main_label_shown_files = Number of shown files
|
||||||
main_label_resize_algorithm = Resize algorithm
|
main_label_resize_algorithm = Resize algorithm
|
||||||
main_label_similarity = Similarity{" "}
|
main_label_similarity = Similarity{" "}
|
||||||
|
|
||||||
|
main_check_box_broken_files_audio = Audio
|
||||||
|
main_check_box_broken_files_pdf = Pdf
|
||||||
|
main_check_box_broken_files_archive = Archive
|
||||||
|
main_check_box_broken_files_image = Image
|
||||||
|
|
||||||
check_button_general_same_size = Ignore same size
|
check_button_general_same_size = Ignore same size
|
||||||
check_button_general_same_size_tooltip = Ignore from results, files which have identical size - usually this are 1:1 duplicates
|
check_button_general_same_size_tooltip = Ignore from results, files which have identical size - usually this are 1:1 duplicates
|
||||||
|
|
||||||
|
@ -474,6 +479,7 @@ move_stats = Properly moved {$num_files}/{$all_files} items
|
||||||
save_results_to_file = Saved results to file {$name}
|
save_results_to_file = Saved results to file {$name}
|
||||||
|
|
||||||
search_not_choosing_any_music = ERROR: You must select at least one checkbox with music searching types.
|
search_not_choosing_any_music = ERROR: You must select at least one checkbox with music searching types.
|
||||||
|
search_not_choosing_any_broken_files = ERROR: You must select at least one checkbox with type of checked broken files.
|
||||||
|
|
||||||
include_folders_dialog_title = Folders to include
|
include_folders_dialog_title = Folders to include
|
||||||
exclude_folders_dialog_title = Folders to exclude
|
exclude_folders_dialog_title = Folders to exclude
|
||||||
|
|
|
@ -7,7 +7,7 @@ use gtk4::prelude::*;
|
||||||
|
|
||||||
use czkawka_core::bad_extensions::BadExtensions;
|
use czkawka_core::bad_extensions::BadExtensions;
|
||||||
use czkawka_core::big_file::BigFile;
|
use czkawka_core::big_file::BigFile;
|
||||||
use czkawka_core::broken_files::BrokenFiles;
|
use czkawka_core::broken_files::{BrokenFiles, CheckedTypes};
|
||||||
use czkawka_core::common_dir_traversal;
|
use czkawka_core::common_dir_traversal;
|
||||||
use czkawka_core::duplicate::DuplicateFinder;
|
use czkawka_core::duplicate::DuplicateFinder;
|
||||||
use czkawka_core::empty_files::EmptyFiles;
|
use czkawka_core::empty_files::EmptyFiles;
|
||||||
|
@ -64,6 +64,10 @@ pub fn connect_button_search(
|
||||||
let check_button_music_genre: gtk4::CheckButton = gui_data.main_notebook.check_button_music_genre.clone();
|
let check_button_music_genre: gtk4::CheckButton = gui_data.main_notebook.check_button_music_genre.clone();
|
||||||
let check_button_music_length: gtk4::CheckButton = gui_data.main_notebook.check_button_music_length.clone();
|
let check_button_music_length: gtk4::CheckButton = gui_data.main_notebook.check_button_music_length.clone();
|
||||||
let check_button_music_bitrate: gtk4::CheckButton = gui_data.main_notebook.check_button_music_bitrate.clone();
|
let check_button_music_bitrate: gtk4::CheckButton = gui_data.main_notebook.check_button_music_bitrate.clone();
|
||||||
|
let check_button_broken_files_archive: gtk4::CheckButton = gui_data.main_notebook.check_button_broken_files_archive.clone();
|
||||||
|
let check_button_broken_files_pdf: gtk4::CheckButton = gui_data.main_notebook.check_button_broken_files_pdf.clone();
|
||||||
|
let check_button_broken_files_audio: gtk4::CheckButton = gui_data.main_notebook.check_button_broken_files_audio.clone();
|
||||||
|
let check_button_broken_files_image: gtk4::CheckButton = gui_data.main_notebook.check_button_broken_files_image.clone();
|
||||||
let check_button_recursive = gui_data.upper_notebook.check_button_recursive.clone();
|
let check_button_recursive = gui_data.upper_notebook.check_button_recursive.clone();
|
||||||
let check_button_settings_duplicates_delete_outdated_cache = gui_data.settings.check_button_settings_duplicates_delete_outdated_cache.clone();
|
let check_button_settings_duplicates_delete_outdated_cache = gui_data.settings.check_button_settings_duplicates_delete_outdated_cache.clone();
|
||||||
let check_button_settings_hide_hard_links = gui_data.settings.check_button_settings_hide_hard_links.clone();
|
let check_button_settings_hide_hard_links = gui_data.settings.check_button_settings_hide_hard_links.clone();
|
||||||
|
@ -484,19 +488,50 @@ pub fn connect_button_search(
|
||||||
|
|
||||||
let futures_sender_broken_files = futures_sender_broken_files.clone();
|
let futures_sender_broken_files = futures_sender_broken_files.clone();
|
||||||
|
|
||||||
thread::spawn(move || {
|
let mut checked_types: CheckedTypes = CheckedTypes::NONE;
|
||||||
let mut br = BrokenFiles::new();
|
|
||||||
|
|
||||||
br.set_included_directory(included_directories);
|
if check_button_broken_files_audio.is_active() {
|
||||||
br.set_excluded_directory(excluded_directories);
|
checked_types |= CheckedTypes::AUDIO;
|
||||||
br.set_recursive_search(recursive_search);
|
}
|
||||||
br.set_excluded_items(excluded_items);
|
if check_button_broken_files_pdf.is_active() {
|
||||||
br.set_use_cache(use_cache);
|
checked_types |= CheckedTypes::PDF;
|
||||||
br.set_allowed_extensions(allowed_extensions);
|
}
|
||||||
br.set_save_also_as_json(save_also_as_json);
|
if check_button_broken_files_image.is_active() {
|
||||||
br.find_broken_files(Some(&stop_receiver), Some(&futures_sender_broken_files));
|
checked_types |= CheckedTypes::IMAGE;
|
||||||
let _ = glib_stop_sender.send(Message::BrokenFiles(br));
|
}
|
||||||
});
|
if check_button_broken_files_archive.is_active() {
|
||||||
|
checked_types |= CheckedTypes::ARCHIVE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if checked_types != CheckedTypes::NONE {
|
||||||
|
thread::spawn(move || {
|
||||||
|
let mut br = BrokenFiles::new();
|
||||||
|
|
||||||
|
br.set_included_directory(included_directories);
|
||||||
|
br.set_excluded_directory(excluded_directories);
|
||||||
|
br.set_recursive_search(recursive_search);
|
||||||
|
br.set_excluded_items(excluded_items);
|
||||||
|
br.set_use_cache(use_cache);
|
||||||
|
br.set_allowed_extensions(allowed_extensions);
|
||||||
|
br.set_save_also_as_json(save_also_as_json);
|
||||||
|
br.set_checked_types(checked_types);
|
||||||
|
br.find_broken_files(Some(&stop_receiver), Some(&futures_sender_broken_files));
|
||||||
|
let _ = glib_stop_sender.send(Message::BrokenFiles(br));
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
set_buttons(
|
||||||
|
&mut *shared_buttons.borrow_mut().get_mut(&NotebookMainEnum::BrokenFiles).unwrap(),
|
||||||
|
&buttons_array,
|
||||||
|
&buttons_names,
|
||||||
|
);
|
||||||
|
entry_info.set_text(&flg!("search_not_choosing_any_broken_files"));
|
||||||
|
show_dialog.store(false, Ordering::Relaxed);
|
||||||
|
|
||||||
|
notebook_main.set_sensitive(true);
|
||||||
|
notebook_upper.set_sensitive(true);
|
||||||
|
button_settings.set_sensitive(true);
|
||||||
|
button_app_info.set_sensitive(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
NotebookMainEnum::BadExtensions => {
|
NotebookMainEnum::BadExtensions => {
|
||||||
label_stage.show();
|
label_stage.show();
|
||||||
|
|
|
@ -109,6 +109,12 @@ pub struct GuiMainNotebook {
|
||||||
|
|
||||||
pub scale_similarity_similar_videos: Scale,
|
pub scale_similarity_similar_videos: Scale,
|
||||||
|
|
||||||
|
// Broken Files
|
||||||
|
pub check_button_broken_files_audio: CheckButton,
|
||||||
|
pub check_button_broken_files_pdf: CheckButton,
|
||||||
|
pub check_button_broken_files_archive: CheckButton,
|
||||||
|
pub check_button_broken_files_image: CheckButton,
|
||||||
|
|
||||||
// Music
|
// Music
|
||||||
pub check_button_music_title: CheckButton,
|
pub check_button_music_title: CheckButton,
|
||||||
pub check_button_music_artist: CheckButton,
|
pub check_button_music_artist: CheckButton,
|
||||||
|
@ -209,6 +215,11 @@ impl GuiMainNotebook {
|
||||||
let check_button_music_length: CheckButton = builder.object("check_button_music_length").unwrap();
|
let check_button_music_length: CheckButton = builder.object("check_button_music_length").unwrap();
|
||||||
let check_button_music_approximate_comparison: CheckButton = builder.object("check_button_music_approximate_comparison").unwrap();
|
let check_button_music_approximate_comparison: CheckButton = builder.object("check_button_music_approximate_comparison").unwrap();
|
||||||
|
|
||||||
|
let check_button_broken_files_audio: CheckButton = builder.object("check_button_broken_files_audio").unwrap();
|
||||||
|
let check_button_broken_files_pdf: CheckButton = builder.object("check_button_broken_files_pdf").unwrap();
|
||||||
|
let check_button_broken_files_archive: CheckButton = builder.object("check_button_broken_files_archive").unwrap();
|
||||||
|
let check_button_broken_files_image: CheckButton = builder.object("check_button_broken_files_image").unwrap();
|
||||||
|
|
||||||
let scale_similarity_similar_images: Scale = builder.object("scale_similarity_similar_images").unwrap();
|
let scale_similarity_similar_images: Scale = builder.object("scale_similarity_similar_images").unwrap();
|
||||||
let scale_similarity_similar_videos: Scale = builder.object("scale_similarity_similar_videos").unwrap();
|
let scale_similarity_similar_videos: Scale = builder.object("scale_similarity_similar_videos").unwrap();
|
||||||
|
|
||||||
|
@ -284,6 +295,9 @@ impl GuiMainNotebook {
|
||||||
check_button_music_approximate_comparison,
|
check_button_music_approximate_comparison,
|
||||||
scale_similarity_similar_images,
|
scale_similarity_similar_images,
|
||||||
scale_similarity_similar_videos,
|
scale_similarity_similar_videos,
|
||||||
|
check_button_broken_files_audio,
|
||||||
|
check_button_broken_files_pdf,
|
||||||
|
check_button_broken_files_archive,
|
||||||
check_button_image_ignore_same_size,
|
check_button_image_ignore_same_size,
|
||||||
label_similar_images_minimal_similarity,
|
label_similar_images_minimal_similarity,
|
||||||
label_duplicate_check_method,
|
label_duplicate_check_method,
|
||||||
|
@ -321,6 +335,7 @@ impl GuiMainNotebook {
|
||||||
gc_tree_view_bad_extensions,
|
gc_tree_view_bad_extensions,
|
||||||
combo_box_big_files_mode,
|
combo_box_big_files_mode,
|
||||||
label_big_files_mode,
|
label_big_files_mode,
|
||||||
|
check_button_broken_files_image,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -396,6 +411,11 @@ impl GuiMainNotebook {
|
||||||
self.check_button_image_fast_compare
|
self.check_button_image_fast_compare
|
||||||
.set_tooltip_text(Some(&flg!("main_notebook_image_fast_compare_tooltip")));
|
.set_tooltip_text(Some(&flg!("main_notebook_image_fast_compare_tooltip")));
|
||||||
|
|
||||||
|
self.check_button_broken_files_audio.set_label(Some(&flg!("main_check_box_broken_files_audio")));
|
||||||
|
self.check_button_broken_files_archive.set_label(Some(&flg!("main_check_box_broken_files_archive")));
|
||||||
|
self.check_button_broken_files_image.set_label(Some(&flg!("main_check_box_broken_files_image")));
|
||||||
|
self.check_button_broken_files_pdf.set_label(Some(&flg!("main_check_box_broken_files_pdf")));
|
||||||
|
|
||||||
{
|
{
|
||||||
let hash_size_index = self.combo_box_image_hash_size.active().unwrap() as usize;
|
let hash_size_index = self.combo_box_image_hash_size.active().unwrap() as usize;
|
||||||
let hash_size = IMAGES_HASH_SIZE_COMBO_BOX[hash_size_index];
|
let hash_size = IMAGES_HASH_SIZE_COMBO_BOX[hash_size_index];
|
||||||
|
|
|
@ -42,6 +42,11 @@ const DEFAULT_IMAGE_REMOVE_AUTO_OUTDATED_CACHE: bool = true;
|
||||||
const DEFAULT_DUPLICATE_REMOVE_AUTO_OUTDATED_CACHE: bool = true;
|
const DEFAULT_DUPLICATE_REMOVE_AUTO_OUTDATED_CACHE: bool = true;
|
||||||
const DEFAULT_DUPLICATE_CASE_SENSITIVE_NAME_CHECKING: bool = false;
|
const DEFAULT_DUPLICATE_CASE_SENSITIVE_NAME_CHECKING: bool = false;
|
||||||
|
|
||||||
|
const DEFAULT_BROKEN_FILES_PDF: bool = true;
|
||||||
|
const DEFAULT_BROKEN_FILES_AUDIO: bool = true;
|
||||||
|
const DEFAULT_BROKEN_FILES_ARCHIVE: bool = true;
|
||||||
|
const DEFAULT_BROKEN_FILES_IMAGE: bool = true;
|
||||||
|
|
||||||
const DEFAULT_NUMBER_OF_BIGGEST_FILES: &str = "50";
|
const DEFAULT_NUMBER_OF_BIGGEST_FILES: &str = "50";
|
||||||
const DEFAULT_SIMILAR_IMAGES_SIMILARITY: i32 = 0;
|
const DEFAULT_SIMILAR_IMAGES_SIMILARITY: i32 = 0;
|
||||||
const DEFAULT_SIMILAR_IMAGES_IGNORE_SAME_SIZE: bool = false;
|
const DEFAULT_SIMILAR_IMAGES_IGNORE_SAME_SIZE: bool = false;
|
||||||
|
@ -427,6 +432,10 @@ enum LoadText {
|
||||||
SimilarVideosIgnoreSameSize,
|
SimilarVideosIgnoreSameSize,
|
||||||
MusicApproximateComparison,
|
MusicApproximateComparison,
|
||||||
DuplicateNameCaseSensitive,
|
DuplicateNameCaseSensitive,
|
||||||
|
BrokenFilesPdf,
|
||||||
|
BrokenFilesAudio,
|
||||||
|
BrokenFilesImage,
|
||||||
|
BrokenFilesArchive,
|
||||||
}
|
}
|
||||||
|
|
||||||
fn create_hash_map() -> (HashMap<LoadText, String>, HashMap<String, LoadText>) {
|
fn create_hash_map() -> (HashMap<LoadText, String>, HashMap<String, LoadText>) {
|
||||||
|
@ -469,6 +478,10 @@ fn create_hash_map() -> (HashMap<LoadText, String>, HashMap<String, LoadText>) {
|
||||||
(LoadText::MusicApproximateComparison, "music_approximate_comparison"),
|
(LoadText::MusicApproximateComparison, "music_approximate_comparison"),
|
||||||
(LoadText::DuplicateNameCaseSensitive, "duplicate_name_case_sensitive"),
|
(LoadText::DuplicateNameCaseSensitive, "duplicate_name_case_sensitive"),
|
||||||
(LoadText::ComboBoxBigFiles, "combo_box_big_files_mode"),
|
(LoadText::ComboBoxBigFiles, "combo_box_big_files_mode"),
|
||||||
|
(LoadText::BrokenFilesPdf, "broken_files_pdf"),
|
||||||
|
(LoadText::BrokenFilesAudio, "broken_files_audio"),
|
||||||
|
(LoadText::BrokenFilesImage, "broken_files_image"),
|
||||||
|
(LoadText::BrokenFilesArchive, "broken_files_archive"),
|
||||||
];
|
];
|
||||||
let mut hashmap_ls: HashMap<LoadText, String> = Default::default();
|
let mut hashmap_ls: HashMap<LoadText, String> = Default::default();
|
||||||
let mut hashmap_sl: HashMap<String, LoadText> = Default::default();
|
let mut hashmap_sl: HashMap<String, LoadText> = Default::default();
|
||||||
|
@ -583,6 +596,23 @@ pub fn save_configuration(manual_execution: bool, upper_notebook: &GuiUpperNoteb
|
||||||
settings.check_button_settings_show_text_view.is_active(),
|
settings.check_button_settings_show_text_view.is_active(),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
saving_struct.save_var(
|
||||||
|
hashmap_ls.get(&LoadText::BrokenFilesArchive).unwrap().to_string(),
|
||||||
|
main_notebook.check_button_broken_files_archive.is_active(),
|
||||||
|
);
|
||||||
|
saving_struct.save_var(
|
||||||
|
hashmap_ls.get(&LoadText::BrokenFilesImage).unwrap().to_string(),
|
||||||
|
main_notebook.check_button_broken_files_image.is_active(),
|
||||||
|
);
|
||||||
|
saving_struct.save_var(
|
||||||
|
hashmap_ls.get(&LoadText::BrokenFilesAudio).unwrap().to_string(),
|
||||||
|
main_notebook.check_button_broken_files_audio.is_active(),
|
||||||
|
);
|
||||||
|
saving_struct.save_var(
|
||||||
|
hashmap_ls.get(&LoadText::BrokenFilesPdf).unwrap().to_string(),
|
||||||
|
main_notebook.check_button_broken_files_pdf.is_active(),
|
||||||
|
);
|
||||||
|
|
||||||
// Others
|
// Others
|
||||||
saving_struct.save_var(
|
saving_struct.save_var(
|
||||||
hashmap_ls.get(&LoadText::MinimalCacheSize).unwrap().to_string(),
|
hashmap_ls.get(&LoadText::MinimalCacheSize).unwrap().to_string(),
|
||||||
|
@ -756,6 +786,11 @@ pub fn load_configuration(
|
||||||
DEFAULT_DUPLICATE_CASE_SENSITIVE_NAME_CHECKING,
|
DEFAULT_DUPLICATE_CASE_SENSITIVE_NAME_CHECKING,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
let check_button_broken_files_archive = loaded_entries.get_integer(hashmap_ls.get(&LoadText::BrokenFilesArchive).unwrap().clone(), DEFAULT_BROKEN_FILES_ARCHIVE);
|
||||||
|
let check_button_broken_files_pdf = loaded_entries.get_integer(hashmap_ls.get(&LoadText::BrokenFilesPdf).unwrap().clone(), DEFAULT_BROKEN_FILES_ARCHIVE);
|
||||||
|
let check_button_broken_files_image = loaded_entries.get_integer(hashmap_ls.get(&LoadText::BrokenFilesImage).unwrap().clone(), DEFAULT_BROKEN_FILES_ARCHIVE);
|
||||||
|
let check_button_broken_files_audio = loaded_entries.get_integer(hashmap_ls.get(&LoadText::BrokenFilesAudio).unwrap().clone(), DEFAULT_BROKEN_FILES_ARCHIVE);
|
||||||
|
|
||||||
// Setting data
|
// Setting data
|
||||||
if manual_execution || loading_at_start {
|
if manual_execution || loading_at_start {
|
||||||
{
|
{
|
||||||
|
@ -880,6 +915,11 @@ pub fn load_configuration(
|
||||||
main_notebook.check_button_video_ignore_same_size.set_active(similar_videos_ignore_same_size);
|
main_notebook.check_button_video_ignore_same_size.set_active(similar_videos_ignore_same_size);
|
||||||
main_notebook.scale_similarity_similar_videos.set_value(similar_videos_similarity as f64);
|
main_notebook.scale_similarity_similar_videos.set_value(similar_videos_similarity as f64);
|
||||||
|
|
||||||
|
main_notebook.check_button_broken_files_audio.set_active(check_button_broken_files_audio);
|
||||||
|
main_notebook.check_button_broken_files_pdf.set_active(check_button_broken_files_pdf);
|
||||||
|
main_notebook.check_button_broken_files_image.set_active(check_button_broken_files_image);
|
||||||
|
main_notebook.check_button_broken_files_archive.set_active(check_button_broken_files_archive);
|
||||||
|
|
||||||
{
|
{
|
||||||
let combo_chosen_index = main_notebook.combo_box_duplicate_check_method.active().unwrap();
|
let combo_chosen_index = main_notebook.combo_box_duplicate_check_method.active().unwrap();
|
||||||
|
|
||||||
|
@ -1004,6 +1044,11 @@ pub fn reset_configuration(manual_clearing: bool, upper_notebook: &GuiUpperNoteb
|
||||||
main_notebook.combo_box_image_hash_size.set_active(Some(0));
|
main_notebook.combo_box_image_hash_size.set_active(Some(0));
|
||||||
main_notebook.combo_box_big_files_mode.set_active(Some(0));
|
main_notebook.combo_box_big_files_mode.set_active(Some(0));
|
||||||
|
|
||||||
|
main_notebook.check_button_broken_files_audio.set_active(DEFAULT_BROKEN_FILES_AUDIO);
|
||||||
|
main_notebook.check_button_broken_files_pdf.set_active(DEFAULT_BROKEN_FILES_PDF);
|
||||||
|
main_notebook.check_button_broken_files_archive.set_active(DEFAULT_BROKEN_FILES_ARCHIVE);
|
||||||
|
main_notebook.check_button_broken_files_image.set_active(DEFAULT_BROKEN_FILES_IMAGE);
|
||||||
|
|
||||||
main_notebook.scale_similarity_similar_images.set_range(0_f64, SIMILAR_VALUES[0][5] as f64); // DEFAULT FOR MAX of 8
|
main_notebook.scale_similarity_similar_images.set_range(0_f64, SIMILAR_VALUES[0][5] as f64); // DEFAULT FOR MAX of 8
|
||||||
main_notebook.scale_similarity_similar_images.set_fill_level(SIMILAR_VALUES[0][5] as f64);
|
main_notebook.scale_similarity_similar_images.set_fill_level(SIMILAR_VALUES[0][5] as f64);
|
||||||
|
|
||||||
|
|
|
@ -167,7 +167,7 @@
|
||||||
(5,129,"GtkScrolledWindow","scrolled_window_invalid_symlinks",128,None,None,None,None),
|
(5,129,"GtkScrolledWindow","scrolled_window_invalid_symlinks",128,None,None,None,None),
|
||||||
(5,130,"GtkLabel",None,128,None,None,None,None),
|
(5,130,"GtkLabel",None,128,None,None,None,None),
|
||||||
(5,131,"GtkNotebookPage",None,56,None,None,None,9),
|
(5,131,"GtkNotebookPage",None,56,None,None,None,9),
|
||||||
(5,132,"GtkScrolledWindow","scrolled_window_broken_files",131,None,None,None,None),
|
(5,132,"GtkBox",None,131,None,None,None,None),
|
||||||
(5,133,"GtkLabel",None,131,None,None,None,None),
|
(5,133,"GtkLabel",None,131,None,None,None,None),
|
||||||
(5,134,"GtkNotebookPage",None,56,None,None,None,10),
|
(5,134,"GtkNotebookPage",None,56,None,None,None,10),
|
||||||
(5,135,"GtkScrolledWindow","scrolled_window_bad_extensions",134,None,None,None,None),
|
(5,135,"GtkScrolledWindow","scrolled_window_bad_extensions",134,None,None,None,None),
|
||||||
|
@ -225,6 +225,12 @@
|
||||||
(5,220,"GtkImage",None,219,None,None,None,None),
|
(5,220,"GtkImage",None,219,None,None,None,None),
|
||||||
(5,221,"GtkComboBoxText","combo_box_big_files_mode",74,None,None,None,1),
|
(5,221,"GtkComboBoxText","combo_box_big_files_mode",74,None,None,None,1),
|
||||||
(5,222,"GtkLabel","label_big_files_mode",74,None,None,None,None),
|
(5,222,"GtkLabel","label_big_files_mode",74,None,None,None,None),
|
||||||
|
(5,223,"GtkScrolledWindow","scrolled_window_broken_files",132,None,None,None,1),
|
||||||
|
(5,224,"GtkBox",None,132,None,None,None,None),
|
||||||
|
(5,225,"GtkCheckButton","check_button_broken_files_audio",224,None,None,None,None),
|
||||||
|
(5,226,"GtkCheckButton","check_button_broken_files_pdf",224,None,None,None,1),
|
||||||
|
(5,227,"GtkCheckButton","check_button_broken_files_archive",224,None,None,None,2),
|
||||||
|
(5,228,"GtkCheckButton","check_button_broken_files_image",224,None,None,None,3),
|
||||||
(6,1,"GtkPopover","popover_right_click",None,None,None,None,None),
|
(6,1,"GtkPopover","popover_right_click",None,None,None,None,None),
|
||||||
(6,2,"GtkBox",None,1,None,None,None,None),
|
(6,2,"GtkBox",None,1,None,None,None,None),
|
||||||
(6,3,"GtkButton","buttons_popover_right_click_open_file",2,None,None,None,None),
|
(6,3,"GtkButton","buttons_popover_right_click_open_file",2,None,None,None,None),
|
||||||
|
@ -284,12 +290,12 @@
|
||||||
(9,27,"GtkBox",None,26,None,None,None,None),
|
(9,27,"GtkBox",None,26,None,None,None,None),
|
||||||
(9,28,"GtkCheckButton","check_button_settings_hide_hard_links",27,None,None,None,None),
|
(9,28,"GtkCheckButton","check_button_settings_hide_hard_links",27,None,None,None,None),
|
||||||
(9,29,"GtkCheckButton","check_button_settings_show_preview_duplicates",27,None,None,None,1),
|
(9,29,"GtkCheckButton","check_button_settings_show_preview_duplicates",27,None,None,None,1),
|
||||||
(9,30,"GtkCheckButton","check_button_settings_duplicates_delete_outdated_cache",27,None,None,None,2),
|
(9,30,"GtkCheckButton","check_button_settings_duplicates_delete_outdated_cache",27,None,None,None,8),
|
||||||
(9,31,"GtkBox",None,27,None,None,None,3),
|
(9,31,"GtkBox",None,27,None,None,None,3),
|
||||||
(9,32,"GtkLabel","label_settings_duplicate_minimal_size_cache",31,None,None,None,None),
|
(9,32,"GtkLabel","label_settings_duplicate_minimal_size_cache",31,None,None,None,None),
|
||||||
(9,33,"GtkEntry","entry_settings_cache_file_minimal_size",31,None,None,None,1),
|
(9,33,"GtkEntry","entry_settings_cache_file_minimal_size",31,None,None,None,1),
|
||||||
(9,34,"GtkCheckButton","check_button_duplicates_use_prehash_cache",27,None,None,None,4),
|
(9,34,"GtkCheckButton","check_button_duplicates_use_prehash_cache",27,None,None,None,4),
|
||||||
(9,35,"GtkButton","button_settings_duplicates_clear_cache",27,None,None,None,5),
|
(9,35,"GtkButton","button_settings_duplicates_clear_cache",27,None,None,None,9),
|
||||||
(9,36,"GtkBox",None,27,None,None,None,6),
|
(9,36,"GtkBox",None,27,None,None,None,6),
|
||||||
(9,37,"GtkLabel","label_settings_duplicate_minimal_size_cache_prehash",36,None,None,None,None),
|
(9,37,"GtkLabel","label_settings_duplicate_minimal_size_cache_prehash",36,None,None,None,None),
|
||||||
(9,38,"GtkEntry","entry_settings_prehash_cache_file_minimal_size",36,None,None,None,1),
|
(9,38,"GtkEntry","entry_settings_prehash_cache_file_minimal_size",36,None,None,None,1),
|
||||||
|
@ -302,7 +308,7 @@
|
||||||
(9,45,"GtkLabel",None,40,None,None,None,None),
|
(9,45,"GtkLabel",None,40,None,None,None,None),
|
||||||
(9,46,"GtkNotebookPage",None,6,None,None,None,3),
|
(9,46,"GtkNotebookPage",None,6,None,None,None,3),
|
||||||
(9,47,"GtkBox",None,46,None,None,None,None),
|
(9,47,"GtkBox",None,46,None,None,None,None),
|
||||||
(9,48,"GtkButton","button_settings_similar_videos_clear_cache",47,None,None,None,None),
|
(9,48,"GtkButton","button_settings_similar_videos_clear_cache",47,None,None,None,3),
|
||||||
(9,49,"GtkCheckButton","check_button_settings_similar_videos_delete_outdated_cache",47,None,None,None,1),
|
(9,49,"GtkCheckButton","check_button_settings_similar_videos_delete_outdated_cache",47,None,None,None,1),
|
||||||
(9,50,"GtkLabel",None,46,None,None,None,None),
|
(9,50,"GtkLabel",None,46,None,None,None,None),
|
||||||
(9,51,"GtkBox",None,3,None,None,None,2),
|
(9,51,"GtkBox",None,3,None,None,None,2),
|
||||||
|
@ -629,6 +635,7 @@
|
||||||
(5,131,"GtkNotebookPage","child",None,None,None,None,None,132),
|
(5,131,"GtkNotebookPage","child",None,None,None,None,None,132),
|
||||||
(5,131,"GtkNotebookPage","position","9",None,None,None,None,None),
|
(5,131,"GtkNotebookPage","position","9",None,None,None,None,None),
|
||||||
(5,131,"GtkNotebookPage","tab",None,None,None,None,None,133),
|
(5,131,"GtkNotebookPage","tab",None,None,None,None,None,133),
|
||||||
|
(5,132,"GtkOrientable","orientation","vertical",None,None,None,None,None),
|
||||||
(5,132,"GtkWidget","focusable","1",None,None,None,None,None),
|
(5,132,"GtkWidget","focusable","1",None,None,None,None,None),
|
||||||
(5,133,"GtkLabel","label","Broken Files",1,None,None,None,None),
|
(5,133,"GtkLabel","label","Broken Files",1,None,None,None,None),
|
||||||
(5,134,"GtkNotebookPage","child",None,None,None,None,None,135),
|
(5,134,"GtkNotebookPage","child",None,None,None,None,None,135),
|
||||||
|
@ -729,6 +736,15 @@
|
||||||
(5,220,"GtkImage","icon-name","image-missing",None,None,None,None,None),
|
(5,220,"GtkImage","icon-name","image-missing",None,None,None,None,None),
|
||||||
(5,220,"GtkWidget","halign","center",None,None,None,None,None),
|
(5,220,"GtkWidget","halign","center",None,None,None,None,None),
|
||||||
(5,222,"GtkLabel","label","VVV",None,None,None,None,None),
|
(5,222,"GtkLabel","label","VVV",None,None,None,None,None),
|
||||||
|
(5,223,"GtkWidget","vexpand","True",None,None,None,None,None),
|
||||||
|
(5,225,"GtkCheckButton","active","True",None,None,None,None,None),
|
||||||
|
(5,225,"GtkCheckButton","label","Audio",None,None,None,None,None),
|
||||||
|
(5,226,"GtkCheckButton","active","True",None,None,None,None,None),
|
||||||
|
(5,226,"GtkCheckButton","label","PDF",None,None,None,None,None),
|
||||||
|
(5,227,"GtkCheckButton","active","True",None,None,None,None,None),
|
||||||
|
(5,227,"GtkCheckButton","label","Archive",None,None,None,None,None),
|
||||||
|
(5,228,"GtkCheckButton","active","True",None,None,None,None,None),
|
||||||
|
(5,228,"GtkCheckButton","label","Image",None,None,None,None,None),
|
||||||
(6,1,"GtkPopover","child",None,None,None,None,None,2),
|
(6,1,"GtkPopover","child",None,None,None,None,None,2),
|
||||||
(6,1,"GtkPopover","position","left",None,None,None,None,None),
|
(6,1,"GtkPopover","position","left",None,None,None,None,None),
|
||||||
(6,2,"GtkOrientable","orientation","vertical",None,None,None,None,None),
|
(6,2,"GtkOrientable","orientation","vertical",None,None,None,None,None),
|
||||||
|
|
|
@ -778,8 +778,42 @@
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkNotebookPage">
|
<object class="GtkNotebookPage">
|
||||||
<property name="child">
|
<property name="child">
|
||||||
<object class="GtkScrolledWindow" id="scrolled_window_broken_files">
|
<object class="GtkBox">
|
||||||
<property name="focusable">1</property>
|
<property name="focusable">1</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<child>
|
||||||
|
<object class="GtkCheckButton" id="check_button_broken_files_audio">
|
||||||
|
<property name="active">True</property>
|
||||||
|
<property name="label">Audio</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCheckButton" id="check_button_broken_files_pdf">
|
||||||
|
<property name="active">True</property>
|
||||||
|
<property name="label">PDF</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCheckButton" id="check_button_broken_files_archive">
|
||||||
|
<property name="active">True</property>
|
||||||
|
<property name="label">Archive</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCheckButton" id="check_button_broken_files_image">
|
||||||
|
<property name="active">True</property>
|
||||||
|
<property name="label">Image</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkScrolledWindow" id="scrolled_window_broken_files">
|
||||||
|
<property name="vexpand">True</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</property>
|
</property>
|
||||||
<property name="position">9</property>
|
<property name="position">9</property>
|
||||||
|
|
|
@ -156,13 +156,6 @@
|
||||||
<property name="label" translatable="yes">Show image preview</property>
|
<property name="label" translatable="yes">Show image preview</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
|
||||||
<object class="GtkCheckButton" id="check_button_settings_duplicates_delete_outdated_cache">
|
|
||||||
<property name="active">1</property>
|
|
||||||
<property name="focusable">1</property>
|
|
||||||
<property name="label" translatable="yes">Delete outdated cache entries automatically</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkBox">
|
<object class="GtkBox">
|
||||||
<property name="margin-end">4</property>
|
<property name="margin-end">4</property>
|
||||||
|
@ -190,14 +183,6 @@
|
||||||
<property name="label" translatable="yes">Use prehash cache</property>
|
<property name="label" translatable="yes">Use prehash cache</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
|
||||||
<object class="GtkButton" id="button_settings_duplicates_clear_cache">
|
|
||||||
<property name="focusable">1</property>
|
|
||||||
<property name="label" translatable="yes">Remove outdated results from duplicates cache</property>
|
|
||||||
<property name="receives-default">1</property>
|
|
||||||
<property name="valign">center</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkBox">
|
<object class="GtkBox">
|
||||||
<property name="margin-end">4</property>
|
<property name="margin-end">4</property>
|
||||||
|
@ -219,6 +204,21 @@
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCheckButton" id="check_button_settings_duplicates_delete_outdated_cache">
|
||||||
|
<property name="active">1</property>
|
||||||
|
<property name="focusable">1</property>
|
||||||
|
<property name="label" translatable="yes">Delete outdated cache entries automatically</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="button_settings_duplicates_clear_cache">
|
||||||
|
<property name="focusable">1</property>
|
||||||
|
<property name="label" translatable="yes">Remove outdated results from duplicates cache</property>
|
||||||
|
<property name="receives-default">1</property>
|
||||||
|
<property name="valign">center</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</property>
|
</property>
|
||||||
<property name="position">1</property>
|
<property name="position">1</property>
|
||||||
|
@ -271,6 +271,12 @@
|
||||||
<property name="child">
|
<property name="child">
|
||||||
<object class="GtkBox">
|
<object class="GtkBox">
|
||||||
<property name="orientation">vertical</property>
|
<property name="orientation">vertical</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCheckButton" id="check_button_settings_similar_videos_delete_outdated_cache">
|
||||||
|
<property name="focusable">1</property>
|
||||||
|
<property name="label" translatable="yes">Delete outdated cache entries automatically</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton" id="button_settings_similar_videos_clear_cache">
|
<object class="GtkButton" id="button_settings_similar_videos_clear_cache">
|
||||||
<property name="focusable">1</property>
|
<property name="focusable">1</property>
|
||||||
|
@ -279,12 +285,6 @@
|
||||||
<property name="valign">center</property>
|
<property name="valign">center</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
|
||||||
<object class="GtkCheckButton" id="check_button_settings_similar_videos_delete_outdated_cache">
|
|
||||||
<property name="focusable">1</property>
|
|
||||||
<property name="label" translatable="yes">Delete outdated cache entries automatically</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
</property>
|
</property>
|
||||||
<property name="position">3</property>
|
<property name="position">3</property>
|
||||||
|
|
Loading…
Reference in a new issue