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