Skip to content

Commit 679c166

Browse files
author
GEPIDEN
committed
poprawiono wsparcie systemów innych
1 parent e686129 commit 679c166

15 files changed

Lines changed: 195 additions & 71 deletions

File tree

.github/workflows/release.yml

Lines changed: 43 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
name: Deploy Release
22

3-
# Uruchom tylko, gdy wypchnięty zostanie tag zaczynający się od 'v' (np. v0.1.3)
43
on:
54
push:
65
tags:
@@ -20,72 +19,86 @@ jobs:
2019
# --- WINDOWS ---
2120
- target: x86_64-pc-windows-msvc
2221
os: windows-latest
23-
output_name: cargo-plot-fs-tree-win64.exe
22+
archive_name: cargo-plot-fs-tree-x86_64-windows.zip
23+
bin_name: cargo-plot-fs-tree.exe
2424

2525
- target: i686-pc-windows-msvc
2626
os: windows-latest
27-
output_name: cargo-plot-fs-tree-win32.exe
28-
29-
# Opcjonalnie: Windows ARM (Surface Pro X/11 itp.)
30-
# - target: aarch64-pc-windows-msvc
31-
# os: windows-latest
32-
# output_name: cargo-plot-fs-tree-win-arm64.exe
27+
archive_name: cargo-plot-fs-tree-i686-windows.zip
28+
bin_name: cargo-plot-fs-tree.exe
3329

3430
# --- LINUX ---
35-
# 64-bit: Używamy MUSL dla pełnej przenośności (działa na Alpine, Debian, Ubuntu)
3631
- target: x86_64-unknown-linux-musl
3732
os: ubuntu-latest
38-
output_name: cargo-plot-fs-tree-linux64
33+
archive_name: cargo-plot-fs-tree-x86_64-linux.tar.gz
34+
bin_name: cargo-plot-fs-tree
3935
use_musl: true
4036

41-
# 32-bit: Używamy GNU (łatwiejsze do zbudowania na GitHub Actions bez Dockera)
4237
- target: i686-unknown-linux-gnu
4338
os: ubuntu-latest
44-
output_name: cargo-plot-fs-tree-linux32
39+
archive_name: cargo-plot-fs-tree-i686-linux.tar.gz
40+
bin_name: cargo-plot-fs-tree
4541
install_multilib: true
4642

43+
# --- MACOS ---
44+
- target: aarch64-apple-darwin
45+
os: macos-latest
46+
archive_name: cargo-plot-fs-tree-aarch64-macos.tar.gz
47+
bin_name: cargo-plot-fs-tree
48+
49+
- target: x86_64-apple-darwin
50+
os: macos-latest
51+
archive_name: cargo-plot-fs-tree-x86_64-macos.tar.gz
52+
bin_name: cargo-plot-fs-tree
53+
4754
steps:
4855
- uses: actions/checkout@v4
4956

50-
# Aktualizacja Rusta
5157
- name: Install Rust
5258
run: rustup update stable && rustup target add ${{ matrix.target }}
5359

54-
# Zależności dla Linuxa (tylko jeśli system to Linux)
60+
# --- ZALEŻNOŚCI LINUX ---
5561
- name: Install Linux Deps
5662
if: runner.os == 'Linux'
57-
run: |
58-
sudo apt-get update
59-
# Podstawowe narzędzia
60-
sudo apt-get install -y build-essential
63+
run: sudo apt-get update && sudo apt-get install -y build-essential
6164

62-
# Specyficzne dla Linux 32-bit (gcc-multilib pozwala kompilować 32bit na 64bit maszynie)
6365
- name: Install Multilib (Linux 32-bit)
6466
if: matrix.install_multilib == true
6567
run: sudo apt-get install -y gcc-multilib
6668

67-
# Specyficzne dla Linux MUSL 64-bit
6869
- name: Install MUSL Tools
6970
if: matrix.use_musl == true
7071
run: sudo apt-get install -y musl-tools
7172

72-
# Budowanie (Release) dla konkretnego targetu
73+
# --- BUDOWANIE ---
7374
- name: Build
7475
run: cargo build --release --target ${{ matrix.target }} --verbose
7576

76-
# Przygotowanie pliku do wysyłki (Zmieniamy nazwę na czytelną)
77-
- name: Rename Artifact (Windows)
77+
# --- PAKOWANIE (WINDOWS -> ZIP) ---
78+
# Tworzymy folder 'staging', wrzucamy tam exe i pakujemy folder do zipa
79+
- name: Package Windows (Zip)
7880
if: runner.os == 'Windows'
79-
run: copy target/${{ matrix.target }}/release/cargo-plot-fs-tree.exe ${{ matrix.output_name }}
81+
run: |
82+
New-Item -ItemType Directory -Force -Path staging
83+
Copy-Item -Path "target/${{ matrix.target }}/release/${{ matrix.bin_name }}" -Destination "staging/${{ matrix.bin_name }}"
84+
Copy-Item -Path "README.md" -Destination "staging/README.md"
85+
Compress-Archive -Path staging/* -DestinationPath ${{ matrix.archive_name }}
8086
81-
- name: Rename Artifact (Linux)
82-
if: runner.os == 'Linux'
83-
run: cp target/${{ matrix.target }}/release/cargo-plot-fs-tree ${{ matrix.output_name }}
87+
# --- PAKOWANIE (LINUX/MAC -> TAR.GZ) ---
88+
# Tworzymy folder 'staging', wrzucamy tam plik, nadajemy uprawnienia +x i pakujemy tar
89+
- name: Package Unix (Tar)
90+
if: runner.os != 'Windows'
91+
run: |
92+
mkdir staging
93+
cp target/${{ matrix.target }}/release/${{ matrix.bin_name }} staging/${{ matrix.bin_name }}
94+
cp README.md staging/README.md
95+
chmod +x staging/${{ matrix.bin_name }}
96+
tar -czvf ${{ matrix.archive_name }} -C staging .
8497
85-
# --- AUTOMATYCZNA PUBLIKACJA NA GITHUB RELEASES ---
98+
# --- PUBLIKACJA ---
8699
- name: Release
87100
uses: softprops/action-gh-release@v1
88101
with:
89-
files: ${{ matrix.output_name }}
102+
files: ${{ matrix.archive_name }}
90103
env:
91-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
104+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,34 @@
22
target/*
33

44
# pozwól Gitowi wejść do katalogów
5-
!target/
6-
!target/debug/
7-
!target/release/
8-
!target/i686-pc-windows-msvc/
9-
!target/i686-pc-windows-msvc/debug/
10-
!target/i686-pc-windows-msvc/release/
11-
!target/x86_64-pc-windows-msvc/
12-
!target/x86_64-pc-windows-msvc/debug/
13-
!target/x86_64-pc-windows-msvc/release/
14-
15-
# zignoruj CAŁĄ zawartość debug i release
16-
target/debug/*
17-
target/release/*
18-
# target/i686-pc-windows-msvc/*
19-
target/i686-pc-windows-msvc/debug/*
20-
target/i686-pc-windows-msvc/release/*
21-
# target/x86_64-pc-windows-msvc/*
22-
target/x86_64-pc-windows-msvc/debug/*
23-
target/x86_64-pc-windows-msvc/release/*
24-
25-
# ale nie ignoruj plików wykonywalnych
26-
!target/debug/*.exe
27-
!target/release/*.exe
28-
!target/i686-pc-windows-msvc/debug/*.exe
29-
!target/i686-pc-windows-msvc/release/*.exe
30-
!target/x86_64-pc-windows-msvc/debug/*.exe
31-
!target/x86_64-pc-windows-msvc/release/*.exe
32-
33-
#ignoruj
34-
/target/CACHEDIR.TAG
35-
/target/**/CACHEDIR.TAG
5+
# !target/
6+
# !target/debug/
7+
# !target/release/
8+
# !target/i686-pc-windows-msvc/
9+
# !target/i686-pc-windows-msvc/debug/
10+
# !target/i686-pc-windows-msvc/release/
11+
# !target/x86_64-pc-windows-msvc/
12+
# !target/x86_64-pc-windows-msvc/debug/
13+
# !target/x86_64-pc-windows-msvc/release/
14+
#
15+
# # zignoruj CAŁĄ zawartość debug i release
16+
# target/debug/*
17+
# target/release/*
18+
# # target/i686-pc-windows-msvc/*
19+
# target/i686-pc-windows-msvc/debug/*
20+
# target/i686-pc-windows-msvc/release/*
21+
# # target/x86_64-pc-windows-msvc/*
22+
# target/x86_64-pc-windows-msvc/debug/*
23+
# target/x86_64-pc-windows-msvc/release/*
24+
#
25+
# # ale nie ignoruj plików wykonywalnych
26+
# !target/debug/*.exe
27+
# !target/release/*.exe
28+
# !target/i686-pc-windows-msvc/debug/*.exe
29+
# !target/i686-pc-windows-msvc/release/*.exe
30+
# !target/x86_64-pc-windows-msvc/debug/*.exe
31+
# !target/x86_64-pc-windows-msvc/release/*.exe
32+
#
33+
# #ignoruj
34+
# /target/CACHEDIR.TAG
35+
# /target/**/CACHEDIR.TAG

Cargo.toml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,23 @@ clap = { version = "4.5.54", features = ["derive"] }
5959

6060
# `code .` - otwarcie projektu w Visual Studio Code
6161
# `ii .` - otwarcie katalogu projektu w Eksploratorze plików (Windows)
62+
63+
# Windows
64+
# `cargo build --target x86_64-pc-windows-msvc --release` - kompilacja dla Windows 64-bit (MSVC)
65+
# `cargo build --target i686-pc-windows-msvc --release` - kompilacja dla Windows 32-bit (MSVC)
66+
# //// `cargo build --target aarch64-pc-windows-msvc --release` - kompilacja dla Windows ARM 64-bit (MSVC)
67+
68+
# Linux
69+
# `cargo build --target x86_64-unknown-linux-gnu --release` - kompilacja dla Linux 64-bit (GNU)
70+
# `cargo build --target x86_64-unknown-linux-musl --release` - kompilacja dla Linux 64-bit (musl)
71+
# `cargo build --target i686-unknown-linux-gnu --release` - kompilacja dla Linux 32-bit (GNU)
72+
# `cargo build --target i686-unknown-linux-musl --release` - kompilacja dla Linux 32-bit (musl)
73+
# //// `cargo build --target aarch64-unknown-linux-gnu --release` - kompilacja dla Linux ARM 64-bit (GNU)
74+
# //// `cargo build --target armv7-unknown-linux-gnueabihf --release` - kompilacja dla Linux ARM 32-bit (GNU)
75+
76+
# macOS
77+
# //// `cargo build --target x86_64-apple-darwin --release` - kompilacja dla macOS 64-bit (Apple Silicon)
78+
# //// `cargo build --target i686-apple-darwin --release` - kompilacja dla macOS 32-bit (Apple)
79+
# //// `cargo build --target aarch64-apple-darwin --release` - kompilacja dla macOS ARM 64-bit (Apple Silicon)
80+
81+

TODO.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
11
# DO ZROBIENIA
22

3-
## 1. ZWIĘKSZYĆ KOMPATYBILNOŚĆ i kompilacja na Linux
4-
5-
* Standardowo Rust używa _`glibc`_ (które jest dynamiczne i zależy od wersji systemu)
6-
* Dodajmy alternatywnie kompilację statyczną z użyciem _`MUSL`_
7-
8-
Będziemy mieć 100% pewności, że program zadziała na każdym Windowsie, Linuxie (Ubuntu, Debian, Fedora, Alpine, Arch - cokolwiek). Wtedy plik wynikowy będzie nieco większy ale całkowicie niezależny od systemu (nie obchodzi go, jaką wersję bibliotek ma Debian czy Ubuntu czy Windows); Zadziała wszędzie.
9-
10-
To spowoduje budowanie paczek podwójnie jedne minimalne a durgie maksymalne.
11-
12-
## 2. POPRAWIĆ IMPLEMENTACJE WZORCÓW
3+
## 1. POPRAWIĆ IMPLEMENTACJE WZORCÓW

release/RELEASE.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# 🌲 Plot FS Tree v0.1.2
2+
3+
**Repozytorium:** [https://github.com/mod-by-cis/plot-path-tree-by-pattern](https://github.com/mod-by-cis/plot-path-tree-by-pattern)
4+
**Wydania:** [https://github.com/mod-by-cis/plot-path-tree-by-pattern/releases](https://github.com/mod-by-cis/plot-path-tree-by-pattern/releases)
5+
6+
Narzędzie CLI do wizualizacji struktury plików w terminalu. Skanuje katalogi na podstawie zaawansowanych wzorców (włączeń/wykluczeń) i generuje kolorowe drzewo ASCII.
7+
8+
![przykład](https://github.com/mod-by-cis/plot-path-tree-by-pattern/blob/main/EXAMPLE.webp "PRZYKŁAD")
9+
---
10+
11+
## 📥 1. Pobieranie (Gotowe pliki)
12+
13+
Nie musisz nic instalować. Pobierz archiwum dla swojego systemu z sekcji **Assets** na dole strony, rozpakuj je i uruchom.
14+
15+
| System | Architektura | Plik do pobrania | Opis |
16+
| --- | --- | --- | --- |
17+
| **Windows** | **64-bit** (Standard) | `cargo-plot-fs-tree-x86_64-windows.zip` | Windows 10/11 (Intel/AMD) |
18+
| **Windows** | 32-bit (Legacy) | `cargo-plot-fs-tree-i686-windows.zip` | Starsze systemy Windows |
19+
| **Linux** | **64-bit** (MUSL) | `cargo-plot-fs-tree-x86_64-linux.tar.gz` | **Uniwersalna**. Ubuntu, Debian, Fedora, Alpine |
20+
| **Linux** | 32-bit (GNU) | `cargo-plot-fs-tree-i686-linux.tar.gz` | Starsze systemy Linux 32-bit |
21+
| **macOS** | Apple Silicon | `cargo-plot-fs-tree-aarch64-macos.tar.gz` | Procesory M1/M2/M3 |
22+
| **macOS** | Intel | `cargo-plot-fs-tree-x86_64-macos.tar.gz` | Starsze Maki z Intelem |
23+
24+
---
25+
26+
## ⚠️ 2. Pierwsze uruchomienie (Ważne!)
27+
28+
Ponieważ pliki binarne nie są podpisane cyfrowo (brak certyfikatu developera), systemy mogą je blokować. Wykonaj te kroki jednorazowo po rozpakowaniu.
29+
30+
### 🐧 Linux
31+
32+
Należy nadać plikowi uprawnienia do wykonywania:
33+
34+
```bash
35+
# Windows
36+
cargo-plot-fs-tree.exe --help
37+
38+
# Linux / macOS
39+
./cargo-plot-fs-tree --help
40+
41+
# Jeśli zainstalowano przez Cargo
42+
cargo plot-fs-tree --help
43+
44+
```
45+
46+
**Dostępne opcje:**
47+
48+
```text
49+
Usage: cargo-plot-fs-tree [OPTIONS]
50+
51+
Options:
52+
-l, --location <LOCATION> Ścieżka początkowa (domyślnie .)
53+
-p, --patterns <PATTERNS> Wzorce oddzielone przecinkami (np. "**/*, !target/")
54+
-s, --strategy <STRATEGY> Strategia sortowania: name, ext-name, deep-ext
55+
--dir-first Czy wyświetlać foldery jako pierwsze?
56+
--ext-depth <EXT_DEPTH> Głębokość sortowania rozszerzeń (dla strategii deep-ext) [default: 4]
57+
-h, --help Print help
58+
-V, --version Print version
59+
60+
```
61+
62+
**Przykłady:**
63+
64+
```bash
65+
# Tryb interaktywny (Menu TUI)
66+
cargo plot-fs-tree
67+
68+
# Szybkie skanowanie z parametrami
69+
cargo plot-fs-tree -l "." -p "**/*.rs, !target/" --dir-first
70+
71+
```
72+
73+
---
74+
75+
### B. Wersja PowerShell (Skrypt)
76+
77+
Dla użytkowników Windows dostępny jest natywny skrypt (w folderze `ps1` w kodzie źródłowym), który nie wymaga kompilacji.
78+
79+
**Uruchomienie:**
80+
81+
```powershell
82+
.\ps1\plot-fs-tree.ps1 -pathLocation "<ŚCIEŻKA>" `
83+
-pathPatterns "<WZORCE>" `
84+
-sortPriority "<PRIORYTETY>" `
85+
-sortStrategy "<STRATEGIA>" `
86+
-sortExtDepth <GŁĘBOKOŚĆ> `
87+
-sortDirFirst
88+
89+
```
90+
91+
**Przykład:**
92+
93+
```powershell
94+
.\ps1\plot-fs-tree.ps1 -pathLocation "." -pathPatterns "**/*.rs", "!git/" -sortDirFirst
95+
96+
```
97+
98+
---
99+
---
100+
**Full Changelog**: <https://github.com/mod-by-cis/plot-path-tree-by-pattern/compare/v.0.1.2...v0.1.2>
3.49 MB
Binary file not shown.
3.14 MB
Binary file not shown.

target/i686-pc-windows-msvc/release/cargo-plot-fs-tree.exe renamed to release/v0.1.2/32bit/Windows/cargo-plot-fs-tree.exe

File renamed without changes.
3.71 MB
Binary file not shown.
3.74 MB
Binary file not shown.

0 commit comments

Comments
 (0)