summaryrefslogtreecommitdiff
path: root/scripts/make_lnk.ps1
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-01-24 03:56:35 +0800
committer魏曹先生 <1992414357@qq.com>2026-01-24 04:31:03 +0800
commit4c77a05993d40c42ebe78c1d3a72f8049f360982 (patch)
tree81df02103be28bc88c0ff89f1857852255bdb32c /scripts/make_lnk.ps1
parentb32a021c2d5075303f5987e702c9df83e7c365e7 (diff)
Move deployment scripts to scripts/dev directory
Diffstat (limited to 'scripts/make_lnk.ps1')
-rw-r--r--scripts/make_lnk.ps124
1 files changed, 24 insertions, 0 deletions
diff --git a/scripts/make_lnk.ps1 b/scripts/make_lnk.ps1
new file mode 100644
index 0000000..67d7ec2
--- /dev/null
+++ b/scripts/make_lnk.ps1
@@ -0,0 +1,24 @@
+$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
+Set-Location $scriptDir
+
+$deployPs1 = Join-Path $scriptDir "dev\deploy.ps1"
+$devDeployPs1 = Join-Path $scriptDir "dev\dev_deploy.ps1"
+$parentDir = Split-Path $scriptDir -Parent
+
+if (Test-Path $deployPs1) {
+ $linkPath = Join-Path $parentDir "deploy.lnk"
+ if (Test-Path $linkPath) { Remove-Item $linkPath -Force }
+ $WshShell = New-Object -ComObject WScript.Shell
+ $shortcut = $WshShell.CreateShortcut($linkPath)
+ $shortcut.TargetPath = $deployPs1
+ $shortcut.Save()
+}
+
+if (Test-Path $devDeployPs1) {
+ $linkPath = Join-Path $parentDir "dev.lnk"
+ if (Test-Path $linkPath) { Remove-Item $linkPath -Force }
+ $WshShell = New-Object -ComObject WScript.Shell
+ $shortcut = $WshShell.CreateShortcut($linkPath)
+ $shortcut.TargetPath = $devDeployPs1
+ $shortcut.Save()
+}