54 lines
1.9 KiB
PowerShell
54 lines
1.9 KiB
PowerShell
|
|
<#
|
||
|
|
.SYNOPSIS
|
||
|
|
Installs (or updates) the TinqsBridge iClone 8 plugin.
|
||
|
|
|
||
|
|
.DESCRIPTION
|
||
|
|
Copies tools/iclone_bridge/TinqsBridge/ (the plugin's source of truth in
|
||
|
|
this repo) into iClone 8's auto-load plugin folder, overwriting any
|
||
|
|
existing copy there. Idempotent -- safe to re-run any time after editing
|
||
|
|
the plugin source; it will not touch any other plugin under OpenPlugin.
|
||
|
|
|
||
|
|
iClone must be RESTARTED to pick up a new or changed plugin. This script
|
||
|
|
never touches the running iClone process -- it only copies files.
|
||
|
|
|
||
|
|
.EXAMPLE
|
||
|
|
powershell -File tools\install_iclone_bridge.ps1
|
||
|
|
#>
|
||
|
|
|
||
|
|
$ErrorActionPreference = "Stop"
|
||
|
|
|
||
|
|
$RepoRoot = Split-Path -Parent $PSScriptRoot
|
||
|
|
$SourceDir = Join-Path $RepoRoot "tools\iclone_bridge\TinqsBridge"
|
||
|
|
$DestRoot = "A:\Program Files (x86)\iClone 8\Bin64\OpenPlugin"
|
||
|
|
$DestDir = Join-Path $DestRoot "TinqsBridge"
|
||
|
|
|
||
|
|
if (-not (Test-Path $SourceDir)) {
|
||
|
|
Write-Error "Plugin source not found: $SourceDir"
|
||
|
|
exit 1
|
||
|
|
}
|
||
|
|
|
||
|
|
if (-not (Test-Path $DestRoot)) {
|
||
|
|
Write-Error "iClone OpenPlugin folder not found: $DestRoot (is iClone 8 installed at the expected path?)"
|
||
|
|
exit 1
|
||
|
|
}
|
||
|
|
|
||
|
|
New-Item -ItemType Directory -Force -Path $DestDir | Out-Null
|
||
|
|
|
||
|
|
$copied = Copy-Item -Path (Join-Path $SourceDir "*") -Destination $DestDir -Recurse -Force -PassThru
|
||
|
|
|
||
|
|
Write-Host ""
|
||
|
|
Write-Host "TinqsBridge plugin installed to:" -ForegroundColor Cyan
|
||
|
|
Write-Host " $DestDir"
|
||
|
|
Write-Host ""
|
||
|
|
Write-Host "Files copied:"
|
||
|
|
foreach ($item in $copied) {
|
||
|
|
if (-not $item.PSIsContainer) {
|
||
|
|
Write-Host " $($item.FullName.Substring($DestDir.Length + 1))"
|
||
|
|
}
|
||
|
|
}
|
||
|
|
Write-Host ""
|
||
|
|
Write-Host "iClone must be RESTARTED to load this plugin (or pick up changes to it)." -ForegroundColor Yellow
|
||
|
|
Write-Host "Have Jeremy save his work and restart iClone before running any smoke tests." -ForegroundColor Yellow
|
||
|
|
Write-Host ""
|
||
|
|
Write-Host "Log file once running: `$env:TEMP\tinqs_iclone_bridge.log"
|