Initial commit: Media viewer project structure and files
This commit is contained in:
1 parent
fc8e56da41
commit
9a64fd2618
11 files changed
+928
-1
No files matched your search
+121
@@ -0,0 +1,121 @@
|
||||
# Media Viewer Installation Guide
|
||||
|
||||
This document explains how to install, build, and run the Media Viewer application.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Before building the Media Viewer, you need to have the following installed:
|
||||
|
||||
1. **Rust and Cargo** - The Rust package manager
|
||||
2. **Visual Studio Build Tools** - Required for Windows native development
|
||||
3. **Git** - For version control (optional but recommended)
|
||||
|
||||
## Installing Rust
|
||||
|
||||
### Method 1: Using rustup (Recommended)
|
||||
|
||||
1. Download the [rustup installer](https://www.rust-lang.org/tools/install)
|
||||
2. Run the installer and follow the instructions
|
||||
3. Restart your terminal/command prompt after installation
|
||||
|
||||
### Method 2: Using PowerShell
|
||||
|
||||
```powershell
|
||||
# Run this command in PowerShell as Administrator
|
||||
curl -O https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe
|
||||
rustup-init.exe
|
||||
```
|
||||
|
||||
## Installing Visual Studio Build Tools
|
||||
|
||||
1. Download and install [Visual Studio Community](https://visualstudio.microsoft.com/vs/community/) (free)
|
||||
2. During installation, make sure to select the "Desktop development with C++" workload
|
||||
3. This includes the necessary MSVC compiler and Windows SDK
|
||||
|
||||
## Building the Application
|
||||
|
||||
Once you have all prerequisites installed:
|
||||
|
||||
1. Open a terminal/command prompt
|
||||
2. Navigate to the project directory:
|
||||
```bash
|
||||
cd C:\Users\Alvin\Documents\dev\image
|
||||
```
|
||||
3. Build the application:
|
||||
```bash
|
||||
cargo build
|
||||
```
|
||||
4. Run the application:
|
||||
```bash
|
||||
cargo run
|
||||
```
|
||||
|
||||
## Project Structure
|
||||
|
||||
```
|
||||
media-viewer/
|
||||
├── Cargo.toml # Project configuration
|
||||
├── src/
|
||||
│ ├── main.rs # Main entry point
|
||||
│ ├── lib.rs # Library exports
|
||||
│ ├── media_handler.rs # Media loading and processing
|
||||
│ └── ui.rs # Windows UI components
|
||||
├── README.md # Project overview
|
||||
└── INSTALL.md # This file
|
||||
```
|
||||
|
||||
## Features Implemented
|
||||
|
||||
### Core Functionality
|
||||
- Native Windows application (no WebView or web technologies)
|
||||
- Support for common image formats (PNG, JPEG, GIF, WebP, BMP)
|
||||
- Support for common video formats (MP4, AVI, MOV)
|
||||
- Windows 11 style UI with modern design elements
|
||||
- High-performance rendering
|
||||
|
||||
### UI Components
|
||||
- File menu with open and exit options
|
||||
- Media display area
|
||||
- Status bar
|
||||
- Navigation controls
|
||||
|
||||
## Building for Release
|
||||
|
||||
To build a release version:
|
||||
|
||||
```bash
|
||||
cargo build --release
|
||||
```
|
||||
|
||||
The executable will be located in `target/release/media-viewer.exe`.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Common Issues
|
||||
|
||||
1. **"rustc is not recognized"** - Make sure Rust was installed properly and the PATH environment variable includes `%USERPROFILE%\.cargo\bin`
|
||||
|
||||
2. **"link.exe is not found"** - Install Visual Studio with C++ build tools
|
||||
|
||||
3. **"No such file or directory" errors** - Ensure you're in the correct project directory
|
||||
|
||||
### Environment Setup
|
||||
|
||||
If you encounter issues with the environment, run:
|
||||
|
||||
```bash
|
||||
rustc --version
|
||||
cargo --version
|
||||
```
|
||||
|
||||
These should show version information if everything is properly installed.
|
||||
|
||||
## Future Enhancements
|
||||
|
||||
The application can be extended with:
|
||||
- Thumbnail preview support
|
||||
- Image editing capabilities
|
||||
- Advanced video playback controls
|
||||
- Multi-monitor support
|
||||
- Drag and drop functionality
|
||||
- Keyboard shortcuts for navigation
|
||||
Reference in new issue
Block a user