summaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
authorruki <[email protected]>2023-11-22 23:34:12 +0800
committerruki <[email protected]>2023-11-22 23:34:12 +0800
commit0babd67de3c23dbdf8402b9ad8fa98edc825ab71 (patch)
treecea5f12337dbe2cb35caccb66088fc9978a98a06 /core/src
parent0415ab4d9b7ba347aed638422a7b40885da2943e (diff)
improve to install xmake for msys/mingw
Diffstat (limited to 'core/src')
-rwxr-xr-xcore/src/demo/xmake.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/core/src/demo/xmake.sh b/core/src/demo/xmake.sh
index d91b50d99..d50c6cbf3 100755
--- a/core/src/demo/xmake.sh
+++ b/core/src/demo/xmake.sh
@@ -39,8 +39,8 @@ target "demo"
#
# @see https://github.com/xmake-io/xmake/issues/3628
if is_host "msys"; then
+ after_install "xmake_after_install"
add_installfiles "${projectdir}/scripts/msys/xmake.sh" "bin" "xmake"
- add_installfiles "${buildir}/xmake.exe" "share/xmake"
fi
# add syslinks
@@ -56,3 +56,10 @@ target "demo"
else
add_syslinks "pthread" "dl" "m" "c"
fi
+
+xmake_after_install() {
+ local target=${1}
+ local installdir=${2}
+ print "\t@if test -f ${installdir}/bin/xmake.exe; then rm ${installdir}/bin/xmake.exe; fi" >> "${xmake_sh_makefile}"
+ print "\t@cp ${buildir}/xmake.exe ${installdir}/share/xmake" >> "${xmake_sh_makefile}"
+}