diff --git a/tools/init.ps1 b/tools/init.ps1 index 8cf2f1c..e33e64d 100644 --- a/tools/init.ps1 +++ b/tools/init.ps1 @@ -3,5 +3,16 @@ param($installPath, $toolsPath, $package, $project) $manager = "DllExport.bat" Copy-Item "$installPath\\$manager" "$PWD" -Force +$pdir = "$PWD\\packages\\DllExport." + $package.Version +if(!(Test-Path -Path $pdir)) { + Get-ChildItem -Path $installPath | ForEach-Object { + if($_.PSIsContainer) { + # without this some files in subdirs can be copied in root folder: https://github.com/3F/coreclr/blob/4fde65a5695d8d4c2f73959e71fb38357ae02a28/pack.ps1 + $null = New-Item -ItemType Directory -Force -Path ($pdir + '\\' + $_.Name) + } + Copy-Item $_.fullname $pdir -Recurse -Force + } +} + $project.Save($project.FullPath) Start-Process -FilePath ".\\$manager" -WorkingDirectory "$PWD" \ No newline at end of file