Skip to content

Patch enabling UTF-8 support in libjxl-tools on Windows

License

Notifications You must be signed in to change notification settings

JacobDev1/libjxl-utf8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JPEG XL UTF-8 Patch for Windows

This patch enables UTF-8 support in cjxl, djxl, cjpegli, djpegli, jxlinfo on Windows.

Just the Patch

cd libjxl/
wget https://raw.githubusercontent.com/JacobDev1/libjxl-utf8/main/utf8_0.10.2.patch
git apply utf8_0.10.2.patch

Compatible with libjxl 0.10.2

Full Compilation Guide

Install MSYS2 and launch MSYS2 MINGW64

Synchronize packages

pacman -Syu

MSYS2 will close, open it again, and install the packages

pacman -S --needed git base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja mingw-w64-x86_64-gtest mingw-w64-x86_64-giflib mingw-w64-x86_64-libpng mingw-w64-x86_64-libjpeg-turbo

Clone and enter the repo

git clone --depth 1 -b v0.10.2 https://github.com/libjxl/libjxl
cd libjxl/

Download and apply the patch

wget https://raw.githubusercontent.com/JacobDev1/libjxl-utf8/main/utf8_0.10.2.patch
git apply utf8_0.10.2.patch

Download dependencies

./deps.sh

Generate a makefile

mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF -DJPEGXL_ENABLE_BENCHMARK=OFF -DJPEGXL_ENABLE_PLUGINS=ON -DJPEGXL_ENABLE_MANPAGES=OFF -DJPEGXL_FORCE_SYSTEM_BROTLI=ON -DJPEGXL_FORCE_SYSTEM_GTEST=ON ..

Build

cmake --build .

You will find the tools in libjxl/build/tools/.

To run them outside of MSYS2, you need to include the necessary DLLs in the same folder.

The Easy Way

  1. Make a new folder anywhere, let's call it libjxl-tools
  2. Copy the EXEs from C:/msys64/home/user/libjxl/build/tools/ to libjxl-tools
  3. Copy the DLLs mentioned below from C:/msys64/mingw64/bin/ into libjxl-tools
  • zlib1.dll
  • libwinpthread-1.dll
  • libstdc++-6.dll
  • libpng16-16.dll
  • libjpeg-8.dll
  • libgif-7.dll
  • libgcc_s_seh-1.dll
  • libbrotlienc.dll
  • libbrotlidec.dll
  • libbrotlicommon.dll
  1. Click on cjxl.exe in libjxl-tools. If you get DLL errors, also include those DLLs.

The Better Way

Import cjxl.exe into a dependency walker. Any DLL not linked to system32 needs to be copied over from C:/msys64/mingw64/bin/.

See Also

About

Patch enabling UTF-8 support in libjxl-tools on Windows

Topics

Resources

License

Stars

Watchers

Forks