TexturePacker CI installation

We introduced the new floating license model, also known as the Docker/CI License, in 2020. This permits the use of TexturePacker in a Continuous Integration (CI) system on a server or build machine. It also allows users to run it inside a Docker (or similar) container.

Single User Licenses and Volume Licenses for TexturePacker are designed to be used by 'real' users on a desktop or laptop. These licenses do not permit use on a server or in automated builds.

1. Get your Docker/CI license

First, you have to purchase a Docker/CI License. Here are some things you should consider before the purchase:

Concurrency Level

The concurrency level describes how many instances of TexturePacker you want to run in parallel. It does not matter on how many computers it is running. E.g. you can run all instances on the same computer or distribute them if you have multiple build machines.

During the checkout, you have to decide which concurrency level you need. You can increase the level at any time later from within the License Manager.

License Restrictions

  1. The license only works from the command line - use it on your build machines only. It is not meant for desktop use.
  2. A single license can only run on the same type of operating system - Linux is the default. Please email us to transfer the license to Windows or macOS.

Get the license

The license is available from here: Docker/CI License.

2. Upgrading TexturePacker

The license permits you to always run the newest version of TexturePacker. You must use at least TexturePacker 7.0.3 - older versions have a bug that can cause issues with license release in certain cases.

We've also changed what happens when no activation is available. Versions prior to 7.0.3 return an error in this case, making it difficult to add TexturePacker to a Makefile. The newer versions wait until a seat becomes available and thus do not interrupt the build process.

Activating the Docker/CI licenses has also been made easier - see below.

After installation, run TexturePacker from the command line and agree to the license terms. You can also agree to the terms via the UI.

To use the license inside a Docker container, see Docker installation below.

3. Using the License in Your Build

Using the new TP_FLOATING_LICENSE environment variable

The easiest way to use the license is to set an environment variable that contains the license key. This allows you to keep your build scripts free from the license key and does not require any modifications.

export TP_FLOATING_LICENSE="TP-????-????-????-????"

Windows (cmd)

set TP_FLOATING_LICENSE=TP-????-????-????-????

Windows (powershell)


Do not use this environment variable with a Volume or Single User License. Doing so results in TexturePacker activating and deactivating the license without performing any packing.

Using --activate-license

You can also set the Docker/CI license using --activate-license from the command line. Since TexturePacker allocates and deallocates the license with each start, you have to pass it to every call of TexturePacker.

TexturePacker --activate-license TP-????-????-????-???? --sheet sheet.png --data sheet.json .....

This method might be more cumbersome than using the environment variable, as it requires updates to your build scripts.

4. Start your Build

That's all - your build should now work as it did before. Consider increasing the concurrency level for your TexturePacker Docker/CI license if you have a powerful machine with many CPU cores and RAM. This will allow more parallel running instances.

In rare cases, a license might not be properly released - e.g. if TexturePacker is killed without allowing it to release the license. This is no big problem because the activations are released by the server after 2 minutes automatically.

If licenses get often stuck, please make sure that you are using TexturePacker 7.0.3 or newer.

5. Conclusion

Migrating from a Single User or Volume License to a Docker/CI license is easy. If you encounter any issues or have questions, don't hesitate to contact us for support.

Optional: Docker installation

Installing TexturePacker inside Docker is not hard to accomplish. Follow these steps for a simple setup:

1. Download TexturePacker

Download the current Ubuntu version of TexturePacker and rename it to TexturePacker.deb.

2. Create a Dockerfile

This simple Dockerfile uses the current version of Ubuntu and installs all required files. It assumes that the downloaded TexturePacker.deb from step 1) is in the same directory.

FROM ubuntu:20.04

ARG DEBIAN_FRONTEND=noninteractive

# Copy pre-downloaded TexturePacker.deb package into container
COPY TexturePacker.deb /tmp

# Install dependencies and TexturePacker, cleanup
RUN apt-get update \
&&  apt-get -y install libegl1-mesa libgl1-mesa-glx \
                       libfontconfig libx11-6 libxkbcommon-x11-0 \
                       /tmp/TexturePacker.deb \
&&  rm -rf /var/lib/apt/lists/*

# Uncomment this line if you agree to the license terms
# RUN echo agree | TexturePacker --version

3. Build the image

Build the image and install TexturePacker

docker build -t texturepacker:latest .

Run TexturePacker to read the license agreement.

docker run texturepacker:latest TexturePacker

If you agree with the license terms, uncomment the last line in the Dockerfile. This saves your agreement in the image. TexturePacker won't ask you again to agree when you use this image.

docker build -t texturepacker:latest .

Running TexturePacker inside the Container

A docker license is a floating license that claims a "seat" when TexturePacker is started and automatically releases the license after the packing process. This is why the license has to be passed as parameter for each run of TexturePacker.

Use a bind-mount to mount your sprite sheet directories and run the packing process:

docker run texturepacker:latest \
--mount type=bind,source=/tmp/spritesheets,target=/spritesheets \
TexturePacker --activate-license [YOUR-LICENSE-KEY] /spritesheets/*.tps