Sprite Compiler Installation¶
This guide walks you through installing the PixelRoot32 Sprite Compiler on your system.
Prerequisites¶
Required Software¶
- Node.js: Version 14.0 or higher
- npm: Usually included with Node.js
- Git: For cloning from source (optional)
Verify Prerequisites¶
Check if Node.js is installed:
Check if npm is installed:
If not installed, download from nodejs.org
Installation Methods¶
Method 1: NPM Package (Recommended)¶
The easiest way to install the Sprite Compiler is via npm:
This installs the compiler globally, making it available from any directory.
Verify installation:
Method 2: From Source¶
If you want the latest development version or need to customize:
Step 1: Clone Repository¶
Step 2: Install Dependencies¶
Step 3: Install Locally (Optional)¶
To use the compiler from anywhere:
This creates a global symlink to the local installation.
Step 4: Verify Installation¶
Method 3: Local Project Installation¶
For project-specific installation (not global):
Then use via npx:
Platform-Specific Instructions¶
Windows¶
Using npm (Recommended)¶
- Install Node.js from nodejs.org
- Download the Windows installer
- Run the installer
-
Restart your terminal/command prompt
-
Open Command Prompt or PowerShell
-
Install globally:
-
Verify:
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¶
- Install Node.js (if not already installed):
Ubuntu/Debian:
Fedora/RHEL:
-
Install Sprite Compiler:
-
Verify:
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¶
- Install Node.js:
- Download from nodejs.org
-
Or use Homebrew:
brew install node -
Install Sprite Compiler:
-
Verify:
Using Homebrew (Alternative)¶
If available as a Homebrew formula:
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¶
- Create a test image:
- Create an 8x8 pixel PNG image (black and white)
-
Save as
test.png -
Run compiler:
-
Check output:
- File
test_output.hshould be created - Should contain sprite data arrays
Check Version¶
Check Help¶
Updating¶
Update via npm¶
Update from Source¶
Uninstallation¶
Remove Global Installation¶
Remove Local Installation¶
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¶
- Check the Usage Guide for usage examples
- Review Troubleshooting for common issues
- Open an issue on GitHub if problems persist
Next Steps¶
Once installed, proceed to: - Usage Guide - Learn how to use the compiler - Advanced Features - Explore advanced options
See Also¶
- Overview - What the Sprite Compiler does
- Available Tools - All PixelRoot32 tools