Merge pull request #445 from stephanlachnit/p/build-source-rework
imgui wrap from WrapDB and build-source.sh reworkpull/496/head
commit
af57e0cb2d
@ -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}
|
||||
|
@ -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…
Reference in New Issue