Windows Build Environment Setup
This guide walks you through setting up the development environment for building Drop Compress Image on Windows.
Choose Your Build Method
There are three ways to build on Windows:
- Docker for Linux Build (Recommended): Build Linux packages from Windows
- Docker Environment for Windows Build: Clean environment avoiding dependency conflicts
- Native Environment: Faster but more complex setup
Method 1: Docker for Linux Build (Recommended)
You can build Linux packages (.deb, .rpm) from Windows using Docker.
Prerequisites
- Windows 10/11 (64-bit)
- Docker Desktop for Windows
- WSL 2 (recommended)
- PowerShell 5.1 or higher
- 8GB+ RAM (16GB recommended)
Steps
- Install Docker Desktop
Download and install Docker Desktop for Windows. - Enable WSL 2
Enable "Use WSL 2 based engine" in Docker Desktop settings (recommended). - Clone the Project
git clone https://github.com/logue/DropWebP.git cd DropWebP - Build Linux Packages
# For x86_64 Linux pnpm run build:tauri:linux-x64 # For ARM64 Linux pnpm run build:tauri:linux-arm64 # Or run the script directly pwsh .\scripts\build-linux-docker.ps1 -Target x64 - Check Build Artifacts
Upon successful build, packages will be generated at:app/src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/deb/app/src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/rpm/
Linux Build Benefits
- ✅ Build Linux packages directly from Windows
- ✅ Consistency with CI/CD pipelines
- ✅ Easy cross-platform development
- ✅ Keeps host environment clean
More Info: See Building for Linux (Using Docker) for details.
Method 2: Docker Environment for Windows Build
Prerequisites
- Windows 10/11 Pro, Enterprise, or Education (with Hyper-V support)
- Docker Desktop for Windows
Steps
- Install Docker Desktop
Download and install Docker Desktop. - Switch to Windows Container Mode
Right-click the Docker Desktop tray icon and select "Switch to Windows containers...". - Clone the Project
git clone https://github.com/logue/DropWebP.git cd DropWebP - Build Docker Image (first time only, takes 30-60 minutes)
docker build -f Dockerfile.windows-x64 -t dropwebp-windows-builder . - Build the Application
docker run --rm -v ${PWD}:C:\workspace dropwebp-windows-builder - Check Build Artifacts
Upon successful build, executables and installers will be generated in theapp/src-tauri/target/release/bundle/directory.
Docker Environment Benefits
- ✅ Keeps host environment clean
- ✅ Avoids dependency conflicts
- ✅ Reproducible builds
- ✅ Clean build environment
- ✅ Consistency with CI/CD pipelines
Method 3: Native Environment Build
1. Install Chocolatey
- Install Chocolatey package manager by running the following command in PowerShell as Administrator:
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) - After installation, verify the version:
choco -v
2. Install Git
- Install Git using Chocolatey:
choco install git -y - After installation, verify the version:
git --version
3. Clone the Project
- Clone the project from GitHub and navigate to the project directory:
git clone https://github.com/logue/DropWebP.git cd DropWebP
4. Install Visual Studio Community 2022
- Install Visual Studio Community 2022:
choco install visualstudio2022community -y - Install the C++ Desktop Development workload:
choco install visualstudio2022-workload-nativedesktop -y - Install Clang/LLVM build tools, which are required for building certain image codec libraries:
choco install visualstudio2022buildtools --package-parameters "--add Microsoft.VisualStudio.Component.VC.Llvm.Clang --add Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset" -y - Once installation is complete, you can verify the installed components using the Visual Studio Installer.
Notice: The C++ Desktop Development workload includes tools necessary for building Rust native extensions, such as MSVC (Microsoft's compiler), Windows SDK, and CMake.
5. Install NASM and Ninja
- Install NASM and Ninja, which are required for building image codec libraries:
choco install nasm ninja -y - After installation, verify the versions:
nasm -v ninja --version - Add NASM to your system PATH so that Cargo can find it during build time:
[System.Environment]::SetEnvironmentVariable('PATH', [System.Environment]::GetEnvironmentVariable('PATH', 'User') + ';C:\Program Files\NASM', 'User') - Restart your terminal or PowerShell session for the PATH changes to take effect.
Notice: NASM is an assembler used for building optimized codec libraries like libavif. Ninja is a fast build system often used in conjunction with CMake.
6. Install Node.js and pnpm
- Install Node.js and pnpm:
choco install nodejs pnpm -y - After installation, verify the versions:
node -v pnpm -v
7. Install Rust (Official Method)
- Install Rust using the official method by running the following command in PowerShell or Command Prompt:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh - After installation, verify the version:
rustc --version
Warning: While it's possible to install Rust via Chocolatey, it installs with the MinGW toolchain, which may lead to compatibility issues with libraries.
8. Set Up vcpkg
- Clone the vcpkg repository:
git clone https://github.com/Microsoft/vcpkg.git C:\vcpkg cd C:\vcpkg - Run the bootstrap script:
.\bootstrap-vcpkg.bat - Set environment variables (recommended to add to system environment variables):
$env:VCPKG_ROOT = "C:\vcpkg" [System.Environment]::SetEnvironmentVariable('VCPKG_ROOT', 'C:\vcpkg', 'User')
Important: The VCPKG_ROOT environment variable is required for the build system to locate vcpkg libraries.
9. Install Dependencies
Create Release Triplet
vcpkg's default triplet includes debug symbols which cause link errors with Rust release builds. Create a custom triplet:
@"
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE static)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_BUILD_TYPE release)
"@ | Out-File -Encoding utf8 C:\vcpkg\triplets\x64-windows-static-release.cmake
Install Dependencies
Note (Updated Feb 2026): The project now uses
rav1e(a Rust-based AV1 encoder) for AVIF encoding on Windows. This eliminates the need forlibaomandaompackages.rav1eavoids NASM multipass optimization requirements and improves build stability on Windows.
Use the automated installation script (recommended):
cd DropWebP\app\src-tauri
.\setup-vcpkg.ps1
Or install manually:
cd C:\vcpkg
# Install with x64-windows-static-release triplet (release-only)
# Note: aom and libavif[aom] are no longer required (using rav1e)
.\vcpkg install libjxl:x64-windows-static-release
.\vcpkg install libwebp:x64-windows-static-release
.\vcpkg install openjpeg:x64-windows-static-release
.\vcpkg install libjpeg-turbo:x64-windows-static-release
.\vcpkg install lcms:x64-windows-static-release
Installed libraries:
- rav1e: AV1 encoder (Rust-based, for AVIF encoding) - automatically built by Cargo
- libjxl: JPEG XL image format
- libwebp: WebP image format
- openjpeg: JPEG 2000 image format
- libjpeg-turbo: JPEG image processing (for jpegli)
- lcms: Little CMS color management
Note for macOS/Linux users: macOS and Linux can still use
libaomas NASM and CMake configurations are more stable on those platforms.
Verify installation:
.\vcpkg list | Select-String "jxl|webp|openjpeg|jpeg|lcms"
10. Build the Application
- Navigate to the app directory and install dependencies:
cd app pnpm install - Build and run the application in development mode:
pnpm run dev:tauri - For a production build:
pnpm run build:tauri
The application should now build successfully on Windows. If you encounter any issues, ensure all dependencies are properly installed and environment variables are set correctly.
Cross-Building for Arm64 Windows
You can cross-build for Arm64 Windows (Windows on ARM) from an x64 Windows machine.
Prerequisites
- x64 Windows build environment set up as described above
- vcpkg dependencies for Arm64 target
1. Add Rust Toolchain
rustup target add aarch64-pc-windows-msvc
2. Install vcpkg Dependencies for Arm64
Create release triplet for Arm64 (if not already done):
@"
set(VCPKG_TARGET_ARCHITECTURE arm64)
set(VCPKG_CRT_LINKAGE static)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_BUILD_TYPE release)
"@ | Out-File -Encoding utf8 C:\vcpkg\triplets\arm64-windows-static-release.cmake
Install dependencies:
cd C:\vcpkg
# Note: aom and libavif[aom] are no longer required (using rav1e)
.\vcpkg install libjxl:arm64-windows-static-release
.\vcpkg install libwebp:arm64-windows-static-release
.\vcpkg install openjpeg:arm64-windows-static-release
.\vcpkg install libjpeg-turbo:arm64-windows-static-release
.\vcpkg install lcms:arm64-windows-static-release
3. Build for Arm64
cd path\to\DropWebP\app
pnpm run build:tauri:windows-arm64
Or build manually:
cd app\src-tauri
cargo build --release --target aarch64-pc-windows-msvc
cd ..
pnpm tauri build --target aarch64-pc-windows-msvc
Notes
- Arm64 binaries will only run on Arm64 Windows devices (e.g., Surface Pro X)
- Cross-built binaries cannot be executed on x64 machines
- Build artifacts are generated in
app/src-tauri/target/aarch64-pc-windows-msvc/release/