Skip to content

Sprite Compiler Installation

This guide walks you through installing the PixelRoot32 Sprite Compiler on your system.

Prerequisites

Required Software

  • Python: Version 3.8 or higher
  • pip: Usually included with Python

Verify Prerequisites

Check if Python is installed:

python --version
# Should show 3.8.0 or higher

Check if pip is installed:

pip --version
# Should show version number

If not installed, download from python.org

Installation Methods

Step 1: Clone Repository

git clone https://github.com/Gperez88/PixelRoot32-Sprite-Compiler.git
cd PixelRoot32-Sprite-Compiler

Step 2: Install Dependencies

pip install -r requirements.txt

Step 3: Verify Installation

python main.py --help

Method 2: Standalone Executable (Windows)

If you are on Windows, you can download the latest standalone .exe from the Releases section of the repository. This does not require Python or any dependencies to be installed.

Platform-Specific Instructions

Windows

  1. Install Node.js from nodejs.org
  2. Download the Windows installer
  3. Run the installer
  4. Restart your terminal/command prompt

  5. Open Command Prompt or PowerShell

  6. Install globally:

    npm install -g pr32-sprite-compiler
    

  7. Verify:

    pr32-sprite-compiler --version
    

Troubleshooting Windows Issues

"pr32-sprite-compiler is not recognized": - Ensure Node.js is in your PATH - Restart terminal after installation - Try using full path: C:\Users\YourName\AppData\Roaming\npm\pr32-sprite-compiler.cmd

Permission errors: - Run terminal as Administrator - Or install locally: npm install pr32-sprite-compiler (without -g)

Linux

Using npm

  1. Install Node.js (if not already installed):

Ubuntu/Debian:

curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs

Fedora/RHEL:

sudo dnf install nodejs npm

  1. Install Sprite Compiler:

    sudo npm install -g pr32-sprite-compiler
    

  2. Verify:

    pr32-sprite-compiler --version
    

Troubleshooting Linux Issues

Permission denied: - Use sudo for global installation - Or install locally without -g flag

Command not found: - Check npm global bin path: npm config get prefix - Add to PATH if needed: export PATH=$PATH:$(npm config get prefix)/bin

macOS

Using npm

  1. Install Node.js:
  2. Download from nodejs.org
  3. Or use Homebrew: brew install node

  4. Install Sprite Compiler:

    npm install -g pr32-sprite-compiler
    

  5. Verify:

    pr32-sprite-compiler --version
    

Using Homebrew (Alternative)

If available as a Homebrew formula:

brew install pr32-sprite-compiler

GUI Version Installation

If a GUI version is available:

Windows

Download the installer from the releases page and run it.

Linux

# Download AppImage or .deb package
# Make executable and run
chmod +x pr32-sprite-compiler-gui.AppImage
./pr32-sprite-compiler-gui.AppImage

macOS

Download the .dmg file from releases and install.

Verification

After installation, verify everything works:

Test Basic Functionality

  1. Create a test image:
  2. Create an 8x8 pixel PNG image (black and white)
  3. Save as test.png

  4. Run compiler:

    pr32-sprite-compiler test.png test_output.h
    

  5. Check output:

  6. File test_output.h should be created
  7. Should contain sprite data arrays

Check Version

pr32-sprite-compiler --version

Check Help

pr32-sprite-compiler --help

Updating

Update via npm

npm update -g pr32-sprite-compiler

Update from Source

cd pr32-sprite-compiler
git pull
npm install

Uninstallation

Remove Global Installation

npm uninstall -g pr32-sprite-compiler

Remove Local Installation

npm uninstall pr32-sprite-compiler

Troubleshooting

Common Issues

"Command not found" after installation: - Restart your terminal - Check npm global bin path: npm config get prefix - Verify PATH includes npm bin directory

Permission errors: - On Linux/macOS: Use sudo for global install - Or install locally without -g flag - On Windows: Run terminal as Administrator

Module not found errors: - Reinstall: npm install -g pr32-sprite-compiler - Clear npm cache: npm cache clean --force

Version conflicts: - Check Node.js version: node --version - Update Node.js if version is too old - Use nvm (Node Version Manager) to manage versions

Getting Help

Next Steps

Once installed, proceed to: - Usage Guide - Learn how to use the compiler - Advanced Features - Explore advanced options

See Also