@@ -5,17 +5,27 @@ Write-Host "Project Directory:" $ProjectDir
55Write-Host " Configuration Name Current:" $Configuration
66$bundle = " C:\ProgramData\Autodesk\ApplicationPlugins\CADPythonShell.bundle\"
77$content = " PackageContents.xml"
8+ $AutodeskProcessName = " acad"
89if ($Configuration -match " Debug" ){
9- Write-Host " ************Start Create Folder And Check File \(^.^)/"
10- if (Test-Path $bundle ){
11- Write-Host " Exits Path, So Remove All File Exits"
12- Remove-Item ($bundle ) - Recurse
13- Write-Host " Removed All File Exist"
10+ $proc = Get-Process $AutodeskProcessName - ErrorAction SilentlyContinue
11+ if ($proc )
12+ {
13+ Write-Host " Warning : Please Close Autocad Or Civil3D To Auto Copy Resouce And Debug \(^_^)/"
1414 }
15- Write-Host " ************ Start Copy New File"
16- xcopy ($SolutionDir + $content ) $bundle / Y
17- xcopy ($ProjectDir + " *.*" ) $bundle / Y / I / E / R
18- Write-Host " ************ Oh my got ! Copy Complete! Chuongmep.com \(^_^)/"
15+ else
16+ {
17+ Write-Host " ************Start Create Folder And Check File \(^.^)/"
18+ if (Test-Path $bundle ){
19+ Write-Host " Exits Path, So Remove All File Exits"
20+ Remove-Item ($bundle ) - Recurse
21+ Write-Host " Removed All File Exist"
22+ }
23+ Write-Host " ************ Start Copy New File"
24+ xcopy ($SolutionDir + $content ) $bundle / Y
25+ xcopy ($ProjectDir + " *.*" ) $bundle / Y / I / E / R
26+ Write-Host " ************ Oh my got ! Copy Complete! Chuongmep.com \(^_^)/"
27+ }
28+
1929}
2030else
2131{
0 commit comments