Commit 268d3b89 authored by Chun-wei Fan's avatar Chun-wei Fan Committed by Chun-wei Fan

build: Add post install script for MSVC builds

Visual Studio builds do not assume the presence of a shell script
interpreter but would normally use cmd.exe, which would make the post
install shell script useless in such situations.

Fix this by adding a Windows .bat port of the post install script, to be
used on Visual Studio builds, which may be usable on MinGW builds if
MinGW builds can be done directly in cmd.exe.
parent 84da8513
@echo off
set libdir=%1
set binary_version=%2
set libdir_windows=%libdir:/=\%
if not "%DESTDIR%" == "" goto warn_msg
if not exist %libdir_windows%\gdk-pixbuf-2.0\%binary_version%\ mkdir %libdir_windows%\gdk-pixbuf-2.0\%binary_version%
gdk-pixbuf-query-loaders > %libdir_windows%\gdk-pixbuf-2.0\%binary_version%\loaders.cache
goto end
:warn_msg
echo ***
echo *** Warning: loaders.cache not built
echo ***
echo *** You should generate this file manually on the host system
echo *** using:
echo *** gdk-pixbuf-query-loaders ^> %libdir_windows%\gdk-pixbuf-2.0\%binary_version%\loaders.cache
echo ***
:end
\ No newline at end of file
......@@ -407,10 +407,18 @@ subdir('thumbnailer')
subdir('docs')
if not meson.is_cross_build()
meson.add_install_script('build-aux/post-install.sh',
gdk_pixbuf_libdir,
gdk_pixbuf_binary_version,
)
# On Visual Studio, we don't normally have a shell interpreter, so use a .bat
if cc.get_id() == 'msvc'
meson.add_install_script('build-aux/post-install.bat',
gdk_pixbuf_libdir,
gdk_pixbuf_binary_version,
)
else
meson.add_install_script('build-aux/post-install.sh',
gdk_pixbuf_libdir,
gdk_pixbuf_binary_version,
)
endif
endif
summary = [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment