3.2 KiB
3.2 KiB
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:
- Rust and Cargo - The Rust package manager
- Visual Studio Build Tools - Required for Windows native development
- Git - For version control (optional but recommended)
Installing Rust
Method 1: Using rustup (Recommended)
- Download the rustup installer
- Run the installer and follow the instructions
- Restart your terminal/command prompt after installation
Method 2: Using 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
- Download and install Visual Studio Community (free)
- During installation, make sure to select the "Desktop development with C++" workload
- This includes the necessary MSVC compiler and Windows SDK
Building the Application
Once you have all prerequisites installed:
- Open a terminal/command prompt
- Navigate to the project directory:
cd C:\Users\Alvin\Documents\dev\image - Build the application:
cargo build - Run the application:
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:
cargo build --release
The executable will be located in target/release/media-viewer.exe.
Troubleshooting
Common Issues
-
"rustc is not recognized" - Make sure Rust was installed properly and the PATH environment variable includes
%USERPROFILE%\.cargo\bin -
"link.exe is not found" - Install Visual Studio with C++ build tools
-
"No such file or directory" errors - Ensure you're in the correct project directory
Environment Setup
If you encounter issues with the environment, run:
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