imgui wrap from Wrap DB and build-source.sh rework

Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
pull/445/head
Stephan Lachnit 3 years ago
parent a27984f343
commit b0ee2f749c
No known key found for this signature in database
GPG Key ID: B35B49EA5D563EFE

4
.gitignore vendored

@ -2,7 +2,7 @@ build
builddir
__pycache__
.vscode
MangoHud*.tar.gz
MangoHud*.tar.*
pkg
mangohud*.tar.*
lib32-mangohud*.tar.*
@ -44,4 +44,4 @@ subprojects/imgui-*/
#GNU Global Metadata
**/GPATH
**/GRTAGS
**/GTAGS
**/GTAGS

@ -1,15 +1,36 @@
#!/bin/sh
VERSION=$(git describe --tags --dirty)
NAME=MangoHud-$VERSION-Source
# create archive via git
git archive HEAD --format=tar --prefix=${NAME}/ --output=${NAME}.tar
# remove unused minihook from source tarball
tar -f ${NAME}.tar --delete ${NAME}/modules
# create DFSG compliant version which excludes NVML
cp ${NAME}.tar ${NAME}-DFSG.tar
tar -f ${NAME}-DFSG.tar --delete ${NAME}/include/nvml.h
# compress archives
gzip ${NAME}.tar
gzip ${NAME}-DFSG.tar
NAME=MangoHud-${VERSION}
TAR_NAME=${NAME}-Source.tar.xz
DFSG_TAR_NAME=${NAME}-Source-DFSG.tar.xz
# remove existing files
rm -rf sourcedir
rm -rf ${NAME}
rm -f ${TAR_NAME}
rm -f ${DFSG_TAR_NAME}
# create tarball with meson
meson sourcedir
meson dist --formats=xztar --include-subprojects --no-tests -C sourcedir
mv sourcedir/meson-dist/*.tar.xz ${TAR_NAME}
# create DFSG compliant version
# unpack since tarball is compressed
mkdir ${NAME}
tar -xf ${TAR_NAME} --strip 1 -C ${NAME}
# nvml.h is not DFSG compliant
rm ${NAME}/include/nvml.h
# minhook not needed
rm -r ${NAME}/modules/minhook
# vulkan headers from system
rm -r ${NAME}/subprojects/Vulkan-Headers-*
# remove some dear imgui clutter
rm -rf ${NAME}/subprojects/imgui-*/examples ${NAME}/subprojects/imgui-*/misc
# compress new sources
tar -cJf ${DFSG_TAR_NAME} ${NAME}
# cleanup
rm -r sourcedir
rm -r ${NAME}

@ -216,8 +216,24 @@ elif sizeof_ptr == 4
pre_args += '-DMANGOHUD_ARCH="32bit"'
endif
dearimgui_sp = subproject('imgui')
dearimgui_dep = dearimgui_sp.get_variable('dearimgui_dep')
dearimgui_sp = subproject('imgui', default_options: [
'default_library=static',
# use 'auto_features=disabled' once available: https://github.com/mesonbuild/meson/issues/5320
'dx9=disabled',
'dx10=disabled',
'dx11=disabled',
'dx12=disabled',
'metal=disabled',
'opengl=disabled',
'vulkan=disabled',
'glfw=disabled',
'sdl2=disabled',
'osx=disabled',
'win=disabled',
'marmalade=disabled',
'allegro5=disabled',
])
dearimgui_dep = dearimgui_sp.get_variable('imgui_dep')
if ['windows', 'mingw'].contains(host_machine.system())
subdir('modules/minhook')

@ -1,7 +1,11 @@
[wrap-git]
directory = imgui
url = https://github.com/ocornut/imgui.git
revision = 22ace4438c86b3137567c69346a3836d26ebf95c
patch_url = https://flightlessmango.com/wraps/imgui.zip
patch_filename = imgui.zip
patch_hash = 55e9f31b3edfe725e7271bd0dd06434ba2a3b6fdce476314947907a43e36b641
[wrap-file]
directory = imgui-1.80
source_url = https://github.com/ocornut/imgui/archive/v1.80.tar.gz
source_filename = imgui-1.80.tar.gz
source_hash = d7e4e1c7233409018437a646680316040e6977b9a635c02da93d172baad94ce9
patch_url = https://wrapdb.mesonbuild.com/v1/projects/imgui/1.80/1/get_zip
patch_filename = imgui-1.80-1-wrap.zip
patch_hash = 9b86a584968d3c4b0b0c0cd648013eb5b81aeb6789babe3c1097727a134efc7f
[provide]
imgui = imgui_dep

Loading…
Cancel
Save