1
0
Fork 0
mirror of synced 2024-05-17 19:03:08 +12:00

Windows sd

This commit is contained in:
Rafał Mikrut 2023-11-20 17:30:44 +01:00
parent 3fcd71f80c
commit c8ab75c270
2 changed files with 14 additions and 9 deletions

View file

@ -20,11 +20,9 @@ jobs:
- name: Install dependencies(mostly sd)
run: |
sudo apt update || true; sudo apt install wget -y
wget https://github.com/chmln/sd/releases/download/v1.0.0/sd-v1.0.0-x86_64-unknown-linux-gnu.tar.gz -O a.tar.gz
tar -xzf a.tar.gz
chmod +x sd-v1.0.0-x86_64-unknown-linux-gnu/sd
sudo cp sd-v1.0.0-x86_64-unknown-linux-gnu/sd /usr/bin/sd
curl https://github.com/chmln/sd/releases/download/v1.0.0/sd-v1.0.0-x86_64-pc-windows-gnu.zip
Expand-Archive ./sd-v1.0.0-x86_64-pc-windows-gnu.zip
cp sd-v1.0.0-x86_64-pc-windows-gnu/sd-v1.0.0-x86_64-pc-windows-gnu/sd.exe .
- name: Setup rust version
run: rustup default ${{ matrix.toolchain }}
@ -41,7 +39,7 @@ jobs:
if-no-files-found: error
- name: Show console window on windows
run: sd -s '#![windows_subsystem = "windows"]' '//#![windows_subsystem = "windows"]' krokiet/src/main.rs
run: ./sd.exe -s '#![windows_subsystem = "windows"]' '//#![windows_subsystem = "windows"]' krokiet/src/main.rs
- name: Compile Krokiet Console
run: cargo build --release --bin krokiet
@ -143,6 +141,13 @@ jobs:
image: ghcr.io/piegamesde/gtk4-cross:gtk-4.6
steps:
- uses: actions/checkout@v1
- name: Install dependencies(mostly sd)
run: |
sudo apt update || true; sudo apt install wget -y
wget https://github.com/chmln/sd/releases/download/v1.0.0/sd-v1.0.0-x86_64-unknown-linux-gnu.tar.gz -O a.tar.gz
tar -xzf a.tar.gz
chmod +x sd-v1.0.0-x86_64-unknown-linux-gnu/sd
sudo cp sd-v1.0.0-x86_64-unknown-linux-gnu/sd /usr/bin/sd
- 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
@ -162,7 +167,7 @@ jobs:
path: target
key: windows-build-target
- name: Show console window on windows
run: sed -i 's|\#\!\[windows_subsystem|//#![windows_subsystem|' czkawka_gui/src/main.rs
run: sd -s '#![windows_subsystem = "windows"]' '//#![windows_subsystem = "windows"]' krokiet/src/main.rs
- name: Cross compile for Windows
run: |
#!/bin/bash

View file

@ -44,10 +44,10 @@ fn handle_delete_items(items: &ModelRc<MainListModel>, delete_empty_folders: boo
// TODO delete in parallel items, consider to add progress bar
// For empty folders double check if folders are really empty - this function probably should be run in thread
// and at the end should be send signal to main thread to update model
fn remove_selected_items(items: Vec<MainListModel>, delete_empty_folders: bool) {
fn remove_selected_items(items: Vec<MainListModel>, _delete_empty_folders: bool) {
info!("Items to remove {}", items.len());
drop(items);
drop(delete_empty_folders);
// drop(delete_empty_folders);
// items.into_iter().for_each(|_item| {});
}