Fix dotnet-compile-native scripts

This commit is contained in:
PiotrP 2016-01-28 14:22:48 -08:00
parent 8a36a61213
commit f3fa6be568
4 changed files with 30 additions and 39 deletions

View file

@ -1,33 +0,0 @@
REM TEMPORARILY disable @echo off to debug CI.
REM @echo off
REM This file encapsulates the temporary steps to build the dotnet-compile-native command successfully
REM The AppDepSDK package is a temporary artifact until we have CoreRT assemblies published to Nuget
set __ScriptDir=%~dp0
set __RepoRoot=%__ScriptDir%..\..
set __AppDepsProjectDir=%__RepoRoot%\src\Microsoft.DotNet.Tools.Compiler.Native\appdep
REM Get absolute path
pushd %1
set __OutputPath=%__RepoRoot%\artifacts\win7-x64\stage2\bin
popd
pushd %__AppDepsProjectDir%
rmdir /S /Q packages
mkdir packages
dotnet restore --packages %__AppDepsProjectDir%\packages
set __AppDepSDK=%__AppDepsProjectDir%\packages\toolchain*\
popd
mkdir %__OutputPath%\appdepsdk
cd %__AppDepSDK%
FOR /D %%a IN (*) DO (
CD %%a
TREE
GOTO :Copy
)
:Copy
xcopy /S/E/H/Y * %__OutputPath%\appdepsdk

View file

@ -0,0 +1,26 @@
#
# Copyright (c) .NET Foundation and contributors. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
#
param(
[Parameter(Mandatory=$true)][string]$RepoRoot,
[Parameter(Mandatory=$true)][string]$OutputDir)
$intermediateDir = "$RepoRoot\artifacts\appdepssdk\packages"
$appdepBinDir = "$OutputDir\bin\appdepsdk"
If (Test-Path $intermediateDir){
rmdir -Force -Rec $intermediateDir
}
mkdir $intermediateDir
& dotnet restore --packages "$intermediateDir" "$RepoRoot\src\dotnet-compile-native\appdep\project.json"
If (Test-Path $appdepBinDir){
rmdir -Force -Rec $appdepBinDir
}
mkdir -Force "$appdepBinDir"
ls "$intermediateDir\toolchain*\*\*" | foreach {
copy -Rec $_ "$appdepBinDir"
}

View file

@ -16,7 +16,7 @@ DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
source "$DIR/../common/_common.sh"
APPDEPS_PROJECT_DIR="$REPOROOT/src/Microsoft.DotNet.Tools.Compiler.Native/appdep"
APPDEPS_PROJECT_DIR="$REPOROOT/src/dotnet-compile-native/appdep"
# Get Absolute Output Dir
pushd $1

View file

@ -136,8 +136,6 @@ $BinariesForCoreHost | ForEach-Object {
#}
# Copy in AppDeps
if (-not (Test-Path "$OutputDir\bin\appdepsdk\")) {
$env:PATH = "$OutputDir\bin;$StartPath"
header "Acquiring Native App Dependencies"
_cmd "$RepoRoot\scripts\build\build_appdeps.cmd ""$OutputDir"""
}
header "Acquiring Native App Dependencies"
_ "$RepoRoot\scripts\build\build_appdeps.ps1" @("$RepoRoot", "$OutputDir")