summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDeepChirp <[email protected]>2024-11-21 17:09:25 +0800
committerDeepChirp <[email protected]>2024-11-21 17:09:25 +0800
commite0708d805c2af8c9cc37c88267eece421edc1c93 (patch)
treeef9ea0719fde5c9064acbf453afb0e1f12cd2e6c /scripts
parent2db856f0b66351389847583b7f3c128666e00c16 (diff)
feat(msys2): add `xmake.cmd` and `xmake.ps1` for better integration with Windows cmd and powershell
Diffstat (limited to 'scripts')
-rw-r--r--scripts/msys/xmake.cmd7
-rw-r--r--scripts/msys/xmake.ps14
2 files changed, 11 insertions, 0 deletions
diff --git a/scripts/msys/xmake.cmd b/scripts/msys/xmake.cmd
new file mode 100644
index 000000000..6ea05866c
--- /dev/null
+++ b/scripts/msys/xmake.cmd
@@ -0,0 +1,7 @@
+@echo off
+setlocal
+set BASEDIR=%~dp0
+if exist "%BASEDIR%..\share\xmake\xmake.exe" (
+ "%BASEDIR%..\share\xmake\xmake.exe" %*
+)
+endlocal \ No newline at end of file
diff --git a/scripts/msys/xmake.ps1 b/scripts/msys/xmake.ps1
new file mode 100644
index 000000000..2ecd30763
--- /dev/null
+++ b/scripts/msys/xmake.ps1
@@ -0,0 +1,4 @@
+$BASEDIR = Split-Path -Parent $MyInvocation.MyCommand.Definition
+if (Test-Path "$BASEDIR\..\share\xmake\xmake.exe") {
+ & "$BASEDIR\..\share\xmake\xmake.exe" @args
+} \ No newline at end of file