forked from Taritsyn/JavaScriptEngineSwitcher
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInstall.ps1
More file actions
22 lines (18 loc) · 1.01 KB
/
Install.ps1
File metadata and controls
22 lines (18 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
param($installPath, $toolsPath, $package, $project)
if ($project.Type -eq "Web Site") {
$runtimeDirectoryPath = Join-Path $installPath "runtimes/win-x64/"
$projectDirectoryPath = $project.Properties.Item("FullPath").Value
$binDirectoryPath = Join-Path $projectDirectoryPath "bin"
$managedAssemblyFileName = "ClearScriptV8-64.dll"
$nativeAssemblyFileNames = "v8-libcpp-x64.dll", "v8-base-x64.dll", "v8-x64.dll"
$assemblyDestDirectoryPath = Join-Path $binDirectoryPath "x64"
if (!(Test-Path $assemblyDestDirectoryPath)) {
New-Item -ItemType Directory -Force -Path $assemblyDestDirectoryPath
}
$managedAssemblySourceFilePath = Join-Path $runtimeDirectoryPath ("lib/net45/" + $managedAssemblyFileName)
Copy-Item $managedAssemblySourceFilePath $assemblyDestDirectoryPath -Force
foreach ($nativeAssemblyFileName in $nativeAssemblyFileNames) {
$nativeAssemblySourceFilePath = Join-Path $runtimeDirectoryPath ("native/" + $nativeAssemblyFileName)
Copy-Item $nativeAssemblySourceFilePath $assemblyDestDirectoryPath -Force
}
}