Skip to content

Commit f9cfcac

Browse files
committed
feat(ShellPkg/VisualFileMan): implement full-featured dual-pane Visual File Manager
Developed a visual, native text-based file manager application for the UEFI Shell to facilitate intuitive file and directory management. Key implementations and features include: 1. UI & Navigation: - Dual-pane layout with color-coded syntax (Directories: Cyan, Executables: Green). - High-performance, flicker-free rendering by optimizing screen redraw logic instead of full `ClearScreen` clearing. - Smooth keyboard navigations (`Tab` to switch panes, `Up/Down` to scroll). 2. File System Traversal: - Handled deep directory logic with universal `..` injection. - Designed a virtual `Drives:` parent level bridging across all block devices, dynamically mapping handles via `GetMapFromDevicePath` to allow smooth fs0:, fs1: transversals. - Safe DirName trailing slash normalization avoiding `EFI_UNSUPPORTED` exception under strict filesystem drivers. 3. Core File Operations (F-Keys): - Implemented `InputBox` with active cursor and inline editing (Left/Right/Backspace/Delete), alongside `ConfirmBox` and `MessageBox`. - F5 Copy & F6 Move: Smart destination detection (automatically appending filenames when targets are pure directories). - F7 MkDir & F8 Delete: Complete operations bound safely to EDKII ShellLib protocols.
0 parents  commit f9cfcac

3 files changed

Lines changed: 935 additions & 0 deletions

File tree

README.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# UEFI VisualFileMan
2+
![UEFI VisualFileMan Preview](https://img.shields.io/badge/UEFI-VisualFileMan-blue?style=flat-square)
3+
4+
[中文版](#中文说明) | [English Version](#english-readme)
5+
6+
---
7+
8+
## 中文说明
9+
10+
**VisualFileMan** 是一个专为 EDK II (UEFI Shell) 开发的轻量级、双面板、可视化文本控制台文件管理器。它受 Midnight Commander (`mc`) 启发,让你告别枯燥的纯命令行敲打,在 UEFI 层级中高效地复制、移动、并浏览各种文件和磁盘分卷。
11+
12+
### 🌟 核心特性
13+
- **双面布局可视操作**:经典双面板并行显示文件树视图,通过 `Tab` 键在两个面板间自由穿梭切换。
14+
- **色彩语法**:彩色文件展示——青色(Cyan)代表目录,绿色(Green)代表原生 UEFI 固件可执行文件 (`.efi`),一目了然。
15+
- **丝滑不闪烁的 TUI**:摒弃了每次按键即暴力 `ClearScreen()` 的闪屏问题,改为原址字符覆写策略,按键操作更流畅。
16+
- **完整的块设备穿越支持 (跨盘符导航)**:自动生成一个顶层抽象 `Drives:` 虚拟入口,退到根目录后再后退时,自动列出所有的 Block Devices (形如 `fs0:`, `fs1:` 等),轻松跨越磁盘边界。
17+
- **快捷键直达执行**:集成基础对话框 (`MessageBox`、带光标编辑功能的 `InputBox` 等) 以提供安全的 F-Key 按键热操:
18+
- `F5` - **复制** 文件(基于智能目录感知的拼接)
19+
- `F6` - **移动 / 重命名**
20+
- `F7` - **新建文件夹 (MkDir)**
21+
- `F8` - **删除 (Delete)** 文件或控文件夹
22+
23+
### 🛠️ 编译与安装
24+
25+
1. **环境准备**:将此项目全部文件放入 EDK2 工作目录:`ShellPkg/Application/VisualFileMan/` 中。
26+
2. **连接编译链**:确保在 EDK II 的 `ShellPkg/ShellPkg.dsc``[Components]` 部分包含该工程:
27+
```ini
28+
[Components]
29+
ShellPkg/Application/VisualFileMan/VisualFileMan.inf
30+
```
31+
3. **编译执行**
32+
使用 EDK II 全局 build 脚本生成 `.efi`
33+
```bash
34+
source edksetup.sh
35+
build -p ShellPkg/ShellPkg.dsc -a X64 -t GCC -b DEBUG
36+
```
37+
4. **拷入磁盘测试**:将编译输出在 `Build/Shell/DEBUG_GCC/X64/VisualFileMan.efi` 的应用复制至你的 U 盘或 OVMF 的虚拟硬盘挂载点并启动运行即可。
38+
39+
---
40+
41+
## English README
42+
43+
**VisualFileMan** is a lightweight, dual-pane, text-based visual file manager designed exclusively for EDK II (UEFI Shell). Inspired by Midnight Commander (`mc`), it provides an intuitive and efficient way to explore, copy, and move files across volumes without relying on raw UEFI command-line interactions.
44+
45+
### 🌟 Key Features
46+
- **Dual-Pane Layout**: Classic side-by-side directory panels. Seamlessly navigate and switch between the active pane by pressing `Tab`.
47+
- **Color-Coded Feedback**: Syntactically colored UI — Cyan for directories and Green for native UEFI executable files (`.efi`).
48+
- **Flicker-Free Rendering**: Instead of using forceful `ClearScreen()` functions which blank the screen on every key press, this app relies on in-place padding/character overwriting algorithms ensuring perfectly silky rendering.
49+
- **Cross-Disk Subsystem Transversal**: Intelligently handles root directory idiosyncrasies. Escaping the root partition exposes a virtual `Drives:` root displaying all auto-mapped handles like `fs0:`, `fs1:`, allowing cross-volume exploration.
50+
- **Native F-Key Bindings via Built-In InputWidgets**: Comes with built-in `InputBox` featuring hardware cursor/text editing and `MessageBox` to handle raw UEFI inputs:
51+
- `F5` - **Copy** (Intelligent directory destination detection)
52+
- `F6` - **Move / Rename**
53+
- `F7` - **Create Directory (MkDir)**
54+
- `F8` - **Delete**
55+
56+
### 🛠️ Build and Installation
57+
58+
1. **Copy the Source**: Move this repository's folder into your EDK2 workspace: `ShellPkg/Application/VisualFileMan/`.
59+
2. **Hook the Component**: In EDK II, open `ShellPkg/ShellPkg.dsc` and add the application under `[Components]`:
60+
```ini
61+
[Components]
62+
ShellPkg/Application/VisualFileMan/VisualFileMan.inf
63+
```
64+
3. **Compile the App**:
65+
Run the standard EDK II build script targeting ShellPkg:
66+
```bash
67+
source edksetup.sh
68+
build -p ShellPkg/ShellPkg.dsc -a X64 -t GCC -b DEBUG
69+
```
70+
4. **Deploy**: The resulting UEFI executable will be located at `Build/Shell/DEBUG_GCC/X64/VisualFileMan.efi`. Transfer this securely into your testing file system formatted in FAT32 or directly into your emulated OVMF VM storage to launch.

0 commit comments

Comments
 (0)