Skip to content

Commit

Permalink
fix: fail copy *.so when build on docker on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
takuya-takeuchi committed Jul 12, 2019
1 parent 3f0e0b8 commit d6d391b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 16 deletions.
2 changes: 1 addition & 1 deletion nuget/BuildOSX.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ $Current = Get-Location
$DlibDotNetRoot = (Split-Path (Get-Location) -Parent)
$DlibDotNetSourceRoot = Join-Path $DlibDotNetRoot src

$BuildSourceHash = [Config]::GetBinaryLibraryHash()
$BuildSourceHash = [Config]::GetBinaryLibraryOSXHash()

$BuildTargets = @()
$BuildTargets += New-Object PSObject -Property @{Target = "cpu"; Architecture = 64; RID = "$OperatingSystem-x64"; CUDA = 0 }
Expand Down
2 changes: 1 addition & 1 deletion nuget/BuildUbuntu16.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ $DockerFileDir = Join-Path $DockerDir build | `
Join-Path -ChildPath $Distribution | `
Join-Path -ChildPath $DistributionVersion

$BuildSourceHash = [Config]::GetBinaryLibraryHash()
$BuildSourceHash = [Config]::GetBinaryLibraryLinuxHash()

$BuildTargets = @()
$BuildTargets += New-Object PSObject -Property @{Target = "cpu"; Architecture = 64; RID = "$OperatingSystem-x64"; CUDA = 0 }
Expand Down
25 changes: 12 additions & 13 deletions nuget/BuildUtils.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -118,20 +118,19 @@ class Config
$this._Option = $Option
}

static [hashtable] GetBinaryLibraryHash()
static [hashtable] GetBinaryLibraryWindowsHash()
{
if ($global:IsWindows)
{
return [Config]::BuildLibraryWindowsHash
}
elseif ($global:IsMacOS)
{
return [Config]::BuildLibraryOSXHash
}
else
{
return [Config]::BuildLibraryLinuxHash
}
return [Config]::BuildLibraryWindowsHash
}

static [hashtable] GetBinaryLibraryOSXHash()
{
return [Config]::BuildLibraryOSXHash
}

static [hashtable] GetBinaryLibraryLinuxHash()
{
return [Config]::BuildLibraryLinuxHash
}

[int] GetArchitecture()
Expand Down
2 changes: 1 addition & 1 deletion nuget/BuildWindows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ $Current = Get-Location
$DlibDotNetRoot = (Split-Path (Get-Location) -Parent)
$DlibDotNetSourceRoot = Join-Path $DlibDotNetRoot src

$BuildSourceHash = [Config]::GetBinaryLibraryHash()
$BuildSourceHash = [Config]::GetBinaryLibraryWindowsHash()

$IntelMKLDir = $env:MKL_WIN
if ([string]::IsNullOrEmpty($IntelMKLDir))
Expand Down

0 comments on commit d6d391b

Please sign in to comment.