Running TexturePacker in WSL (Windows Subsystem for Linux)

If you want to run TexturePacker's command-line client in WSL, you can activate its license key like this:

wsl TexturePacker --activate-license TP-xxxx-xxxx-xxxx-xxxx

Problem

Each time WSL restarts, TexturePacker loses its license activation and falls back to Essential mode with only limited features. You may see warnings such as:

TexturePacker:: warning: You are using some advanced features which will cause some sprites to
TexturePacker:: warning: be colored red in the sprite sheet.

This happens because WSL generates a random Ethernet MAC address on every restart. TexturePacker interprets this as a new machine and discards the existing license activation.

Solution

You can configure WSL to use the physical network adapter of your Windows machine instead of creating a virtual adapter with a random MAC address.

To do this, add the following entry to the file .wslconfig in your user directory:

/Users/your_user_name/.wslconfig
[wsl2]
networkingMode=mirrored

After saving the file, shut down WSL completely and reactivate your TexturePacker license:

wsl --shutdown
wsl TexturePacker --activate-license TP-xxxx-xxxx-xxxx-xxxx

With this configuration, WSL consistently uses the same network adapter, so TexturePacker will retain its license activation.