Windows sd
This commit is contained in:
parent
3fcd71f80c
commit
c8ab75c270
2 changed files with 14 additions and 9 deletions
19
.github/workflows/windows.yml
vendored
19
.github/workflows/windows.yml
vendored
|
@ -20,11 +20,9 @@ jobs:
|
||||||
|
|
||||||
- name: Install dependencies(mostly sd)
|
- name: Install dependencies(mostly sd)
|
||||||
run: |
|
run: |
|
||||||
sudo apt update || true; sudo apt install wget -y
|
curl https://github.com/chmln/sd/releases/download/v1.0.0/sd-v1.0.0-x86_64-pc-windows-gnu.zip
|
||||||
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
|
Expand-Archive ./sd-v1.0.0-x86_64-pc-windows-gnu.zip
|
||||||
tar -xzf a.tar.gz
|
cp sd-v1.0.0-x86_64-pc-windows-gnu/sd-v1.0.0-x86_64-pc-windows-gnu/sd.exe .
|
||||||
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: Setup rust version
|
- name: Setup rust version
|
||||||
run: rustup default ${{ matrix.toolchain }}
|
run: rustup default ${{ matrix.toolchain }}
|
||||||
|
@ -41,7 +39,7 @@ jobs:
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Show console window on windows
|
- 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
|
- name: Compile Krokiet Console
|
||||||
run: cargo build --release --bin krokiet
|
run: cargo build --release --bin krokiet
|
||||||
|
@ -143,6 +141,13 @@ jobs:
|
||||||
image: ghcr.io/piegamesde/gtk4-cross:gtk-4.6
|
image: ghcr.io/piegamesde/gtk4-cross:gtk-4.6
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- 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
|
- name: Install additional dependencies
|
||||||
# gio is for the build script
|
# 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
|
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
|
path: target
|
||||||
key: windows-build-target
|
key: windows-build-target
|
||||||
- name: Show console window on windows
|
- 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
|
- name: Cross compile for Windows
|
||||||
run: |
|
run: |
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
|
@ -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
|
// 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
|
// 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
|
// 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());
|
info!("Items to remove {}", items.len());
|
||||||
drop(items);
|
drop(items);
|
||||||
drop(delete_empty_folders);
|
// drop(delete_empty_folders);
|
||||||
// items.into_iter().for_each(|_item| {});
|
// items.into_iter().for_each(|_item| {});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue