Support freetype packaging for windows
This commit is contained in:
parent
3a24090607
commit
9273a6f538
2 changed files with 98 additions and 47 deletions
|
|
@ -7,7 +7,8 @@ RUN apt-get update && apt-get upgrade -y && apt-get install -y \
|
|||
libxext-dev libgl-dev \
|
||||
wget zip zstd \
|
||||
libpng-dev libboost-all-dev \
|
||||
libxi-dev libxrender-dev
|
||||
libxi-dev libxrender-dev \
|
||||
libfreetype-dev
|
||||
|
||||
# Set user
|
||||
RUN useradd -u 1000 -U -o -d /home -M worker
|
||||
|
|
@ -17,59 +18,21 @@ USER worker
|
|||
# Install sdl2
|
||||
RUN mkdir /home/sdl2
|
||||
WORKDIR /home/sdl2
|
||||
RUN wget https://www.libsdl.org/release/SDL2-devel-2.0.22-mingw.tar.gz
|
||||
RUN tar xvf SDL2-devel-2.0.22-mingw.tar.gz
|
||||
RUN mv SDL2-2.0.22/x86_64-w64-mingw32 ./install
|
||||
RUN rm -r SDL2-devel-2.0.22-mingw.tar.gz SDL2-2.0.22
|
||||
|
||||
# Install sdl2-mixer
|
||||
WORKDIR /home/sdl2
|
||||
RUN wget https://github.com/libsdl-org/SDL_mixer/releases/download/release-2.6.1/SDL2_mixer-devel-2.6.1-mingw.tar.gz
|
||||
RUN tar xvf SDL2_mixer-devel-2.6.1-mingw.tar.gz
|
||||
RUN cp -a SDL2_mixer-2.6.1/x86_64-w64-mingw32/* install/
|
||||
RUN rm -r SDL2_mixer-2.6.1 SDL2_mixer-devel-2.6.1-mingw.tar.gz
|
||||
|
||||
# Install zlib
|
||||
RUN mkdir /home/zlib
|
||||
WORKDIR /home/zlib
|
||||
RUN wget https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-zlib-1.2.12-1-any.pkg.tar.zst
|
||||
RUN tar xvf mingw-w64-x86_64-zlib-1.2.12-1-any.pkg.tar.zst
|
||||
RUN mv mingw64 install
|
||||
RUN rm mingw-w64-x86_64-zlib-1.2.12-1-any.pkg.tar.zst
|
||||
|
||||
# Install libpng
|
||||
RUN mkdir /home/libpng
|
||||
WORKDIR /home/libpng
|
||||
RUN wget https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-libpng-1.6.37-6-any.pkg.tar.zst
|
||||
RUN tar xvf mingw-w64-x86_64-libpng-1.6.37-6-any.pkg.tar.zst
|
||||
RUN mv mingw64 install
|
||||
RUN rm mingw-w64-x86_64-libpng-1.6.37-6-any.pkg.tar.zst
|
||||
RUN wget https://github.com/libsdl-org/SDL/releases/download/release-2.30.6/SDL2-devel-2.30.6-mingw.tar.gz
|
||||
RUN tar xvf SDL2-devel-2.30.6-mingw.tar.gz
|
||||
RUN mv SDL2-2.30.6/x86_64-w64-mingw32 ./install
|
||||
RUN rm -r SDL2-devel-2.30.6-mingw.tar.gz SDL2-2.30.6
|
||||
|
||||
# Install boost
|
||||
RUN mkdir /home/boost
|
||||
WORKDIR /home/boost
|
||||
RUN wget https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-boost-1.79.0-4-any.pkg.tar.zst
|
||||
RUN tar xvf mingw-w64-x86_64-boost-1.79.0-4-any.pkg.tar.zst
|
||||
RUN wget https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-boost-1.85.0-4-any.pkg.tar.zst
|
||||
RUN tar xvf *.zst
|
||||
RUN mv mingw64 install
|
||||
RUN rm mingw-w64-x86_64-boost-1.79.0-4-any.pkg.tar.zst
|
||||
|
||||
# Install libmpg
|
||||
RUN mkdir /home/libmpg
|
||||
WORKDIR /home/libmpg
|
||||
RUN wget https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-mpg123-1.30.1-1-any.pkg.tar.zst
|
||||
RUN tar xvf mingw-w64-x86_64-mpg123-1.30.1-1-any.pkg.tar.zst
|
||||
RUN mv mingw64 install
|
||||
RUN rm mingw-w64-x86_64-mpg123-1.30.1-1-any.pkg.tar.zst
|
||||
|
||||
# Install blender
|
||||
WORKDIR /home
|
||||
RUN wget https://download.blender.org/release/Blender3.2/blender-3.2.0-linux-x64.tar.xz
|
||||
RUN tar xvf blender-3.2.0-linux-x64.tar.xz
|
||||
RUN mv blender-3.2.0-linux-x64 blender
|
||||
RUN rm blender-3.2.0-linux-x64.tar.xz
|
||||
RUN ln -sv /home/blender/blender /usr/local/bin/blender
|
||||
RUN rm *.zst
|
||||
|
||||
# Install wgpu-native for host
|
||||
WORKDIR /home
|
||||
RUN wget https://github.com/gfx-rs/wgpu-native/releases/download/v0.19.4.1/wgpu-linux-x86_64-release.zip
|
||||
RUN mkdir -p wgpu-native
|
||||
RUN unzip wgpu-*.zip -d wgpu-native
|
||||
|
|
@ -86,7 +49,93 @@ RUN chmod +x wgpu-native/wgpu_native.dll
|
|||
RUN mkdir -p wgpu-native/install/target
|
||||
RUN mv wgpu-native/wgpu_native.dll.lib wgpu-native/wgpu_native.dll wgpu-native/install/target
|
||||
|
||||
# Install freetype
|
||||
RUN mkdir -p /home/freetype
|
||||
WORKDIR /home/freetype
|
||||
RUN wget https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-freetype-2.13.2-1-any.pkg.tar.zst
|
||||
RUN tar xvf mingw-w64*
|
||||
RUN mv mingw64 install
|
||||
RUN mkdir -p /tmp/freetype-dep
|
||||
|
||||
# Instal freetype dependency: zlib
|
||||
WORKDIR /tmp/freetype-dep
|
||||
RUN rm -rf ./*
|
||||
RUN wget https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-zlib-1.3.1-1-any.pkg.tar.zst
|
||||
RUN tar xvf *.zst
|
||||
RUN mv mingw64/bin/zlib1.dll /home/freetype/install/bin
|
||||
|
||||
# Instal freetype dependency: bzip2
|
||||
WORKDIR /tmp/freetype-dep
|
||||
RUN rm -rf ./*
|
||||
RUN wget https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-bzip2-1.0.8-3-any.pkg.tar.zst
|
||||
RUN tar xvf *.zst
|
||||
RUN mv mingw64/bin/libbz2-1.dll /home/freetype/install/bin
|
||||
|
||||
# Instal freetype dependency: brotli
|
||||
WORKDIR /tmp/freetype-dep
|
||||
RUN rm -rf ./*
|
||||
RUN wget https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-brotli-1.1.0-2-any.pkg.tar.zst
|
||||
RUN tar xvf *.zst
|
||||
RUN mv mingw64/bin/libbrotlidec.dll mingw64/bin/libbrotlicommon.dll /home/freetype/install/bin
|
||||
|
||||
# Instal freetype dependency: png
|
||||
WORKDIR /tmp/freetype-dep
|
||||
RUN rm -rf ./*
|
||||
RUN wget https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-libpng-1.6.43-1-any.pkg.tar.zst
|
||||
RUN tar xvf *.zst
|
||||
RUN mv mingw64/bin/libpng16-16.dll /home/freetype/install/bin
|
||||
|
||||
# Instal freetype dependency: harfbuzz
|
||||
WORKDIR /tmp/freetype-dep
|
||||
RUN rm -rf ./*
|
||||
RUN wget https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-harfbuzz-9.0.0-1-any.pkg.tar.zst
|
||||
RUN tar xvf *.zst
|
||||
RUN mv mingw64/bin/libharfbuzz-0.dll /home/freetype/install/bin
|
||||
|
||||
# Install freetype dependency: gcc-libs
|
||||
WORKDIR /tmp/freetype-dep
|
||||
RUN rm -rf ./*
|
||||
RUN wget https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-gcc-libs-14.2.0-1-any.pkg.tar.zst
|
||||
RUN tar xvf *.zst
|
||||
RUN mv mingw64/bin/libstdc++-6.dll mingw64/bin/libgcc_s_seh-1.dll /home/freetype/install/bin
|
||||
|
||||
# Install freetype dependency: glib
|
||||
WORKDIR /tmp/freetype-dep
|
||||
RUN rm -rf ./*
|
||||
RUN wget https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-glib2-2.80.4-1-any.pkg.tar.zst
|
||||
RUN tar xvf *.zst
|
||||
RUN mv mingw64/bin/libglib-2.0-0.dll /home/freetype/install/bin
|
||||
|
||||
# Install freetype dependency: graphite
|
||||
WORKDIR /tmp/freetype-dep
|
||||
RUN rm -rf ./*
|
||||
RUN wget https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-graphite2-1.3.14-3-any.pkg.tar.zst
|
||||
RUN tar xvf *.zst
|
||||
RUN mv mingw64/bin/libgraphite2.dll /home/freetype/install/bin
|
||||
|
||||
# Install freetype dependency: gettext-runtime
|
||||
WORKDIR /tmp/freetype-dep
|
||||
RUN rm -rf ./*
|
||||
RUN wget https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-gettext-runtime-0.22.5-2-any.pkg.tar.zst
|
||||
RUN tar xvf *.zst
|
||||
RUN mv mingw64/bin/libintl-8.dll /home/freetype/install/bin
|
||||
|
||||
# Install freetype dependency: iconv
|
||||
WORKDIR /tmp/freetype-dep
|
||||
RUN rm -rf ./*
|
||||
RUN wget https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-libiconv-1.17-4-any.pkg.tar.zst
|
||||
RUN tar xvf *.zst
|
||||
RUN mv mingw64/bin/libiconv-2.dll /home/freetype/install/bin
|
||||
|
||||
# Install freetype dependency: pcre2
|
||||
WORKDIR /tmp/freetype-dep
|
||||
RUN rm -rf ./*
|
||||
RUN wget https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-pcre2-10.44-1-any.pkg.tar.zst
|
||||
RUN tar xvf *.zst
|
||||
RUN mv mingw64/bin/libpcre2-8-0.dll /home/freetype/install/bin
|
||||
|
||||
# Install toolchain files & main packaging script
|
||||
WORKDIR /home
|
||||
COPY toolchain-host.cmake .
|
||||
COPY toolchain-target.cmake .
|
||||
COPY package.sh .
|
||||
|
|
|
|||
|
|
@ -15,11 +15,13 @@ set(PSEMEK_PACKAGE_COPY_FILES
|
|||
${PSEMEK_PACKAGE_ROOT}/sdl2/install/bin/SDL2.dll
|
||||
/usr/x86_64-w64-mingw32/lib/libwinpthread-1.dll
|
||||
${PSEMEK_PACKAGE_ROOT}/wgpu-native/install/target/wgpu_native.dll
|
||||
${PSEMEK_PACKAGE_ROOT}/freetype/install/bin/*
|
||||
)
|
||||
|
||||
list(APPEND CMAKE_PREFIX_PATH
|
||||
"${PSEMEK_PACKAGE_ROOT}/sdl2/install"
|
||||
"${PSEMEK_PACKAGE_ROOT}/boost/install"
|
||||
"${PSEMEK_PACKAGE_ROOT}/freetype/install"
|
||||
)
|
||||
|
||||
set(WGPU_NATIVE_ROOT
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue