From 03d79d02226ea13b8fcceb49e0dfe846cdb9993b Mon Sep 17 00:00:00 2001 From: Kirigaya <1193466151@qq.com> Date: Tue, 22 Apr 2025 04:10:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20win=20=E4=B8=8A=E7=9A=84?= =?UTF-8?q?=E6=89=93=E5=8C=85=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .DS_Store | Bin 8196 -> 0 bytes build_service.ps1 | 19 ++++++++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) delete mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index f11a73515cc2fca979ec3927ca7c527fc6aca27b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8196 zcmeHM&2G~`5S~p^;;1QV5J&|H$r9H#q%EQ#E@|2bD)A#V2o8Wk+=SNDwWBy`kg7_# z!!z&-oOuv<7f$fat{c3Y1aU%0*_C!@ZO=EJ{bsz*I7B3BgZ4Vn3K2QzESDECOlf?b z`$WqmXKp|W;ECGQq?kI?qtgj(d%`kc8L$jk1}p=Xf&YO4ytBDEGv52^svRu@mVvos zfcFO%on>*ur$DRUeL6rTU#2c9`t`ja zI`D$XgEl{4+vw$=vSG&O{$wGhBLn}%z!zzU9>MBUdPsG8OwS<8bV6+%CvFRKTjee^?h-Uq`&E@N7XB(CK8>{Y}t@Bm)Y`wBoS#|Gj-a9`pIM;67ez4y> z4o<>|gN!DUcLXh|g@iBKHmSQ-s#14~7j+!oRbzIm-s8k+_^nf)eiC zf(OSK58=-mypQB@nNtY!Q1?P6ciM}hVPO`I6FrS9&^|ccrd@ghIpr~zDW66-^1%)z z+x&?4bk8`!wY3$bKCgkd1m4Dss1OoeL*%hy_1Tg~Lz`niLtAc=x;MPlXxdrWh8Knw zVybB^;bD&9>+kJs7N5vh4OyZgeD}uDFt>z>4S}~F%>n{s+x#(*RZCu3gskHw&eAr^ zfMsC57!bML#%>L3zWCi_E}v^{7yT_dH`W^|DIpkSISwhyameu>hM2ohWlS}ZBPDSL X?caY0-~z_J|I@z(WgzS@R}B0D6NT#i diff --git a/build_service.ps1 b/build_service.ps1 index 16d9714..d85bbea 100644 --- a/build_service.ps1 +++ b/build_service.ps1 @@ -1,20 +1,25 @@ # 创建并清理资源目录 New-Item -ItemType Directory -Path ./resources -Force -Remove-Item -Recurse -Force ./resources/* +Remove-Item -Recurse -Force ./resources/* -ErrorAction SilentlyContinue New-Item -ItemType Directory -Path ./resources -Force +# 获取当前工作目录的绝对路径 +$currentDir = (Get-Location).Path + # 并行构建 renderer 和 service $rendererJob = Start-Job -ScriptBlock { - cd ./renderer + param($workDir) + Set-Location -Path "$workDir\renderer" npm run build - mv ./dist ../resources/renderer -} + Move-Item -Path "./dist" -Destination "$workDir\resources\renderer" -Force +} -ArgumentList $currentDir $serviceJob = Start-Job -ScriptBlock { - cd ./service + param($workDir) + Set-Location -Path "$workDir\service" npm run build - mv ./dist ../resources/service -} + Move-Item -Path "./dist" -Destination "$workDir\resources\service" -Force +} -ArgumentList $currentDir # 等待任务完成 $rendererJob | Wait-Job | Receive-Job