Repository navigation
Installation
| Component | Version used | Needed for |
|---|---|---|
MSYS2 mingw-w64-x86_64 GCC, C++20 |
15.x | everything |
| CMake | >= 3.16 | build |
| Ninja | any | build |
mingw-w64-x86_64-openjpeg2 |
2.5.4 | JPEG 2000 decoding |
mingw-w64-x86_64-libpng |
1.6.58 | PNG output |
mingw-w64-x86_64-gtest |
1.17.0 | unit tests |
mingw-w64-x86_64-qt6-base |
6.x | optional, GUI only |
pacman -S --needed mingw-w64-x86_64-{toolchain,cmake,ninja,openjpeg2,libpng,gtest,qt6-base}The same project builds against the distribution packages. Verified on Ubuntu 24.04 / Linux Mint 22 with GCC 13, CMake 3.28 and Ninja.
| Component | Package | Needed for |
|---|---|---|
| GCC / C++20, CMake >= 3.16, Ninja |
g++, cmake, ninja-build
|
everything |
| OpenJPEG 2.5 | libopenjp2-7-dev |
JPEG 2000 decoding |
| libpng 1.6 | libpng-dev |
PNG output |
| GoogleTest | libgtest-dev |
unit tests |
| Qt 6 Widgets | qt6-base-dev |
optional, GUI only |
sudo apt-get install -y g++ cmake ninja-build libopenjp2-7-dev libpng-dev libgtest-dev qt6-base-devQt 6 is optional: without it the GUI target is skipped and the build stays green.
-DSLTCD_BUILD_GUI=OFF turns it off explicitly.
Run these from an MSYS2 MINGW64 shell (or any shell that has
C:\msys64\mingw64\bin on PATH; the compiler, CMake and Ninja are all needed):
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=C:/msys64/mingw64
cmake --build build
ctest --test-dir build --output-on-failure-DCMAKE_PREFIX_PATH=C:/msys64/mingw64 is what lets find_package locate Qt 6,
OpenJPEG and libpng; it is harmless if Qt 6 is not installed.
The distribution packages are found without a prefix path:
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
cmake --build build
ctest --test-dir build --output-on-failurelibopenjp2-7-dev installs OpenJPEGConfig.cmake without a matching
OpenJPEGConfigVersion.cmake, so the versioned find_package(OpenJPEG 2.5) is
reported as "version: unknown" and rejected. CMakeLists.txt handles this by
trying the versioned form first and falling back to the unversioned one when no
version file is present.
For a development build use -DCMAKE_BUILD_TYPE=Debug (the test suite is quick,
~3 s, and does not need a real cache: tests/data/ holds a frozen slice).
The binaries carry a .exe suffix in a Windows build and no suffix on Linux.
| File | What it is |
|---|---|
build/bin/SLTextureDecoder.exe |
the command line tool |
build/bin/SLTextureDecoderGUI.exe |
the Qt 6 front end and the --batch headless mode |
build/bin/sl_texture_decoder_tests.exe |
the gtest binary |
build/lib/libsl_texture_decoder_core.a |
the decoding library the front ends link against |
Qt 6 from MSYS2 is linked dynamically. Either put C:\msys64\mingw64\bin on
PATH, or copy the runtime next to the executable:
windeployqt --release build/bin/SLTextureDecoderGUI.exeThe CLI and the core library need only libopenjp2-7.dll, libpng16-16.dll
and the GCC runtime, which windeployqt also brings along.
The tool needs the directory that contains texture.entries, texture.cache
and the 0..f shard folders. Typical Windows locations:
| Viewer | Directory |
|---|---|
| Second Life (official viewer), 64 bit | %APPDATA%\SecondLife_x64\texturecache |
| Second Life (official viewer), 32 bit | %APPDATA%\SecondLife\texturecache |
| Firestorm Viewer | %APPDATA%\Firestorm_x64\texturecache |
| Firestorm (older 32 bit builds) | %APPDATA%\Firestorm\texturecache |
Rules of thumb:
-
%APPDATA%isC:\Users\<you>\AppData\Roaming; the directory name follows the viewer's own cache name, so a third party viewer may use a different one. - If the viewer was installed into a custom location or you use several
accounts, search for
texture.entriesand take the folder that also containstexture.cacheand the hex named subdirectories. - Open the cache while the viewer is closed, or at least accept that the viewer may rewrite/trim the cache while the tool reads it. The tool opens the cache read-only and never modifies it.
Then point the tool at it (see Usage):
.\build\bin\SLTextureDecoder.exe --cache-dir "$env:APPDATA\Firestorm_x64\texturecache" --limit 5 -vNothing is installed system wide. Delete build/ and the output directory, and
- if you want to forget the GUI settings as well - the registry key
HKCU\Software\SLTextureDecoder\GUI.
MIT licensed - the licence covers the source code only, never the decoded textures. Educational and research use only; not affiliated with Linden Research, Inc. or the Phoenix Firestorm Project - see the Legal notice.
SLTextureDecoder