feat: use Windows Registry for standard install path + cross-platform builds

- Now reads PublicUsersDataParentFolder from Registry:
  HKLM\SOFTWARE\WOW6432Node\MindArk\Entropia Universe
- Constructs full path: {ParentFolder}\public_users_data\cache\icon
- Fallback to hardcoded path if Registry read fails
- Removed unused webbrowser import
- Updated GitHub Actions to build for both Windows and Linux
- Updated README with cross-platform documentation
This commit is contained in:
LemonNexus 2026-02-12 15:04:59 +00:00
parent fb492c417a
commit a8af5a0f1d
3 changed files with 135 additions and 25 deletions

View File

@ -1,4 +1,4 @@
name: Build Windows Executable name: Build Executables
on: on:
push: push:
@ -8,7 +8,7 @@ on:
workflow_dispatch: workflow_dispatch:
jobs: jobs:
build: build-windows:
runs-on: windows-latest runs-on: windows-latest
steps: steps:
@ -44,3 +44,45 @@ jobs:
prerelease: false prerelease: false
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgl1-mesa-glx libglib2.0-0 libxkbcommon-x11-0
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install pyinstaller
pip install -r requirements.txt
- name: Build executable
run: |
pyinstaller icon_extractor.spec --clean
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: EU-Icon-Extractor-Linux
path: dist/EU-Icon-Extractor
- name: Create Release
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v1
with:
files: dist/EU-Icon-Extractor
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -1,6 +1,6 @@
# Entropia Universe Icon Extractor # Entropia Universe Icon Extractor
A standalone tool for extracting item icons from Entropia Universe game cache. A standalone cross-platform tool for extracting item icons from Entropia Universe game cache.
<img src="icon.ico" width="64" height="64" alt="EU Icon Extractor"> <img src="icon.ico" width="64" height="64" alt="EU Icon Extractor">
@ -8,7 +8,10 @@ A standalone tool for extracting item icons from Entropia Universe game cache.
**[Download Latest Release](https://github.com/ImpulsiveFPS/EU-Icon-Extractor/releases/latest)** **[Download Latest Release](https://github.com/ImpulsiveFPS/EU-Icon-Extractor/releases/latest)**
Download `EU-Icon-Extractor.exe` and run it - no installation needed! - **Windows:** `EU-Icon-Extractor-Windows.exe`
- **Linux:** `EU-Icon-Extractor-Linux`
No installation needed - just download and run!
## Description ## Description
@ -16,10 +19,34 @@ Extract item icons from Entropia Universe cache and convert them to PNG format.
**Important:** Items must be seen/rendered in-game before they appear in the cache! If an icon is missing, view the item in your inventory or the auction first. **Important:** Items must be seen/rendered in-game before they appear in the cache! If an icon is missing, view the item in your inventory or the auction first.
## Features
### Cross-Platform Support
- **Windows** - Auto-detects from Registry and standard paths
- **Linux** - Auto-detects Steam installations
### Multiple Cache Sources
- **Standard Install** - Detected from Windows Registry (`PublicUsersDataParentFolder`)
- **Steam** - Auto-detects from Steam library folders
- **Manual Browse** - Select custom cache folder
- **Extract from All** - Combine icons from multiple sources
### Extraction Options
- **Version selector** - Choose which game version to extract from
- **"All Folders" option** - Extract from all versions at once
- **320x320 PNG output** - Icons centered on transparent canvas
- **Multiple upscale methods** - HQ4x, Lanczos, or Nearest Neighbor
### User Interface
- **Source selection** - Choose between Standard, Steam, or All sources
- **Double-click preview** - Preview TGA files before extraction
- **Light/Dark theme** - Toggle between themes
- **Custom output folder** - Choose where to save extracted icons
## Usage ## Usage
### Option 1: Download Executable (Recommended) ### Option 1: Download Executable (Recommended)
1. Download `EU-Icon-Extractor.exe` from [Releases](https://github.com/ImpulsiveFPS/EU-Icon-Extractor/releases/latest) 1. Download the appropriate executable for your OS from [Releases](https://github.com/ImpulsiveFPS/EU-Icon-Extractor/releases/latest)
2. Double-click to run - no installation needed! 2. Double-click to run - no installation needed!
### Option 2: Run from Source ### Option 2: Run from Source
@ -32,23 +59,39 @@ python icon_extractor.py
- PyQt6: `pip install PyQt6` - PyQt6: `pip install PyQt6`
- Pillow: `pip install Pillow` - Pillow: `pip install Pillow`
## Features ## Cache Locations
- **Auto-detects** game cache from `C:\ProgramData\Entropia Universe\public_users_data\cache\icon` ### Windows
- **Version selector** - Choose which game version to extract from The tool automatically detects the cache location from the Windows Registry:
- **"All Folders" option** - Extract from all versions at once ```
- **Double-click preview** - Preview TGA files before extraction HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\MindArk\Entropia Universe
- **320x320 PNG output** - Icons centered on transparent canvas PublicUsersDataParentFolder = C:\ProgramData\Entropia Universe
- **Light/Dark theme** - Toggle between themes ```
- **Custom output folder** - Choose where to save extracted icons
Full cache path: `{PublicUsersDataParentFolder}\public_users_data\cache\icon\{VERSION}`
### Linux (Steam)
The tool checks these Steam installation paths:
- `~/.steam/steam/`
- `~/.local/share/Steam/`
- `~/.steam/root/`
Full cache path: `{Steam}/steamapps/common/Entropia Universe/public_users_data/cache/icon/{VERSION}`
## Output ## Output
Icons are saved to your Documents folder: Icons are saved to your Documents folder:
**Windows:**
``` ```
Documents\Entropia Universe\Icons\ Documents\Entropia Universe\Icons\
``` ```
**Linux:**
```
~/Documents/Entropia Universe/Icons/
```
(Same location where `chat.log` is normally stored) (Same location where `chat.log` is normally stored)
## Links ## Links
@ -56,6 +99,7 @@ Documents\Entropia Universe\Icons\
- **Developer:** ImpulsiveFPS - **Developer:** ImpulsiveFPS
- **Discord:** impulsivefps - **Discord:** impulsivefps
- **GitHub:** https://github.com/ImpulsiveFPS/EU-Icon-Extractor - **GitHub:** https://github.com/ImpulsiveFPS/EU-Icon-Extractor
- **Report Bug:** https://github.com/ImpulsiveFPS/EU-Icon-Extractor/issues
- **Support Me:** https://ko-fi.com/impulsivefps - **Support Me:** https://ko-fi.com/impulsivefps
## Disclaimer ## Disclaimer
@ -64,8 +108,7 @@ Entropia Universe Icon Extractor is a fan-made resource and is not affiliated wi
## Building from Source ## Building from Source
If you want to build the executable yourself: ### Windows
```bash ```bash
# Install dependencies # Install dependencies
pip install pyinstaller pip install pyinstaller
@ -75,7 +118,20 @@ pip install -r requirements.txt
pyinstaller icon_extractor.spec --clean pyinstaller icon_extractor.spec --clean
``` ```
The executable will be in `dist/EU-Icon-Extractor.exe` ### Linux
```bash
# Install system dependencies (Ubuntu/Debian)
sudo apt-get install libgl1-mesa-glx libglib2.0-0 libxkbcommon-x11-0
# Install Python dependencies
pip install pyinstaller
pip install -r requirements.txt
# Build executable
pyinstaller icon_extractor.spec --clean
```
The executable will be in `dist/`
## License ## License

View File

@ -13,10 +13,9 @@ GitHub: https://github.com/ImpulsiveFPS/EU-Icon-Extractor
import sys import sys
import os import os
import subprocess import subprocess
import webbrowser
import re import re
from pathlib import Path from pathlib import Path
from typing import Optional, List from typing import Optional, List, Tuple
# Platform-specific imports # Platform-specific imports
if sys.platform == 'win32': if sys.platform == 'win32':
@ -102,19 +101,32 @@ def parse_library_folders_vdf(vdf_path: Path) -> List[Path]:
return libraries return libraries
def find_all_cache_paths() -> List[Path]: def find_all_cache_paths() -> List[Tuple[str, Path]]:
""" """
Find all Entropia Universe cache folders. Find all Entropia Universe cache folders.
Returns a list of paths (standard install, Steam, etc.) Returns a list of (name, path) tuples.
""" """
found_paths = [] found_paths = []
# Check standard installation first (platform-specific) # Check Windows Registry for MindArk installation (Standard Install)
if sys.platform == 'win32': if sys.platform == 'win32':
standard_path = Path("C:/ProgramData/Entropia Universe/public_users_data/cache/icon") try:
else: with winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, r"SOFTWARE\WOW6432Node\MindArk\Entropia Universe") as key:
standard_path = Path.home() / ".local" / "share" / "Entropia Universe" / "public_users_data" / "cache" / "icon" parent_folder, _ = winreg.QueryValueEx(key, "PublicUsersDataParentFolder")
standard_path = Path(parent_folder) / "public_users_data" / "cache" / "icon"
if standard_path.exists() and list(standard_path.rglob("*.tga")):
found_paths.append(("Standard Install", standard_path))
except Exception:
pass
# Fallback to hardcoded path if registry fails
if not found_paths:
fallback_path = Path("C:/ProgramData/Entropia Universe/public_users_data/cache/icon")
if fallback_path.exists() and list(fallback_path.rglob("*.tga")):
found_paths.append(("Standard Install", fallback_path))
else:
# Linux standard paths (if non-Steam install exists)
standard_path = Path.home() / ".local" / "share" / "Entropia Universe" / "public_users_data" / "cache" / "icon"
if standard_path.exists() and list(standard_path.rglob("*.tga")): if standard_path.exists() and list(standard_path.rglob("*.tga")):
found_paths.append(("Standard Install", standard_path)) found_paths.append(("Standard Install", standard_path))