|
2 | 2 |
|
3 | 3 | <PropertyGroup> |
4 | 4 | <ProjDir>$(MSBuildThisFileDirectory)</ProjDir> |
5 | | - <BinDir>$(ProjRoot)bin\</BinDir> |
6 | | - <ObjDir>$(ProjRoot)obj\</ObjDir> |
7 | | - <PackageAssetsPath>$(BinDir)packages\</PackageAssetsPath> |
8 | | - |
| 5 | + <BinDir>$(ProjDir)bin\</BinDir> |
| 6 | + <ObjDir>$(ProjDir)obj\</ObjDir> |
9 | 7 |
|
10 | | - <NoBuild>true</NoBuild> |
11 | | - <IncludeBuildOutput>false</IncludeBuildOutput> |
12 | | - |
13 | 8 | <TargetArchitecture Condition="'$(TargetArchitecture)' == ''">x64</TargetArchitecture> |
14 | 9 | <TargetFramework>netstandard2.0</TargetFramework> |
15 | 10 | <TensorFlowVersion>1.14.0</TensorFlowVersion> |
16 | 11 | <TensorFlowMajorVersion>1</TensorFlowMajorVersion> |
17 | 12 |
|
| 13 | + <PackageAssetsPath>$(BinDir)packages\</PackageAssetsPath> |
| 14 | + <PackageId>$(MSBuildProjectName)</PackageId> |
| 15 | + <PackageVersion>0.15.0</PackageVersion> |
| 16 | + |
| 17 | + <NoBuild>true</NoBuild> |
| 18 | + <IncludeBuildOutput>false</IncludeBuildOutput> |
| 19 | + |
| 20 | + <NuspecFile>Redist.nuspec</NuspecFile> |
| 21 | + <NuspecProperties>packageId=$(PackageId);version=$(PackageVersion)</NuspecProperties> |
| 22 | + <NuspecBasePath>$(ProjDir)</NuspecBasePath> |
| 23 | + |
18 | 24 | <GenerateNuspecDependsOn>CopyFilesFromArchive</GenerateNuspecDependsOn> |
19 | | - |
| 25 | + |
20 | 26 | <PackageRid Condition="'$(OS)' == 'Windows_NT'">win</PackageRid> |
21 | 27 | <PackageRid Condition="'$(OS)' != 'Windows_NT'">linux</PackageRid> |
22 | 28 | <PackageRid Condition="$([MSBuild]::IsOSPlatform('osx'))">osx</PackageRid> |
23 | 29 | <PackageRid>$(PackageRid)-$(TargetArchitecture)</PackageRid> |
24 | 30 |
|
25 | | - <PackageId>TensorFlowNET.Redist</PackageId> |
26 | | - <Authors>The TensorFlow Authors</Authors> |
27 | | - <TargetFramework>netstandard2.0</TargetFramework> |
28 | | - <PackageDescription>$(MSBuildProjectName) contains the TensorFlow C library version $(TensorFlowVersion) redistributed as a NuGet package.</PackageDescription> |
29 | | - <PackageLicenseFile>LICENSE.txt</PackageLicenseFile> |
30 | | - <PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance> |
31 | | - <Copyright>Copyright 2019 The TensorFlow Authors. All rights reserved.</Copyright> |
32 | | - <PackageProjectUrl>https://www.tensorflow.org</PackageProjectUrl> |
33 | | - <PackageReleaseNotes>https://github.com/tensorflow/tensorflow/releases/tag/v$(TensorFlowVersion)</PackageReleaseNotes> |
34 | | - <PackageTags>$(PackageTags) TensorFlow</PackageTags> |
35 | | - <!-- TODO: consider PackageIconUrl --> |
36 | 31 | </PropertyGroup> |
37 | 32 |
|
38 | 33 | <PropertyGroup> |
39 | 34 | <IncludeMLNetNotices>false</IncludeMLNetNotices> |
40 | 35 | </PropertyGroup> |
41 | 36 |
|
42 | | - <ItemGroup> |
43 | | - <Content Include="CommonPackage.props" Pack="true" PackagePath="build\netstandard2.0\$(MSBuildProjectName).props" /> |
44 | | - <Content Include="$(PackageAssetsPath)$(PackageId)\LICENSE.txt" Pack="true" PackagePath="" /> |
45 | | - <Content Condition="Exists('$(PackageAssetsPath)\$(PackageId)\THIRD_PARTY_NOTICES.txt')" Include="$(PackageAssetsPath)\$(PackageId)\THIRD_PARTY_NOTICES.txt" Pack="true" PackagePath="" /> |
46 | | - <Content Include="$(PackageAssetsPath)$(PackageId)\runtimes\**\*" Pack="true" PackagePath="runtimes" /> |
47 | | - </ItemGroup> |
48 | | - |
49 | 37 | <ItemGroup> |
50 | 38 | <TensorFlowConfig Include="windows" |
51 | 39 | FileExtension=".zip" |
|
143 | 131 |
|
144 | 132 | <Message Importance="High" Text="Decompressing '%(TensorFlowArchive.DownloadFile)' to '%(TensorFlowArchive.ExtractDirectory)'." /> |
145 | 133 |
|
146 | | - <Unzip Condition="'$(PackageRid)' == 'win-x64'" |
| 134 | + <Unzip Condition="'%(TensorFlowArchive.FileExtension)' == '.zip'" |
147 | 135 | SourceFiles="%(TensorFlowArchive.DownloadFile)" |
148 | 136 | DestinationFolder="%(TensorFlowArchive.ExtractDirectory)" /> |
149 | 137 |
|
150 | | - <Exec Condition="'$(OS)' != 'Windows_NT'" |
151 | | - WorkingDirectory="%(TensorFlowArchive.ExtractDirectory)" |
152 | | - Command="tar -xzmf %(TensorFlowArchive.DownloadFile) -C %(TensorFlowArchive.ExtractDirectory)" /> |
| 138 | + <Exec Condition="'$(OS)' != 'Windows_NT' AND '%(TensorFlowArchive.FileExtension)' == '.tar.gz'" |
| 139 | + WorkingDirectory="$(MSBuildThisFileDirectory)" |
| 140 | + Command="tar -xzmv --hard-dereference -f %(TensorFlowArchive.DownloadFile) -C %(TensorFlowArchive.ExtractDirectory)" /> |
153 | 141 |
|
154 | 142 | <Touch Files="@(TensorFlowArchive->'%(ExtractSemaphore)')" AlwaysCreate="true" /> |
155 | 143 | </Target> |
|
174 | 162 | TargetPath="$(PackageAssetsPath)$(MSBuildProjectName)\LICENSE.txt" /> |
175 | 163 |
|
176 | 164 | <!-- copy to NativeAssets location, only for current RID, so that they may be used by tests --> |
177 | | - <FilesFromArchive Condition="'$(PackageRID)' == '%(_fileFromArchive.Runtime)'" |
| 165 | + <!--<FilesFromArchive Condition="'$(PackageRID)' == '%(_fileFromArchive.Runtime)'" |
178 | 166 | Include="@(_fileFromArchive->'%(ExtractDirectory)\%(Identity)')" |
179 | | - TargetPath="$(NativeAssetsBuiltPath)\%(_fileFromArchive.DestinationFile)" /> |
| 167 | + TargetPath="$(NativeAssetsBuiltPath)\%(_fileFromArchive.DestinationFile)" />--> |
180 | 168 | </ItemGroup> |
181 | 169 | </Target> |
182 | 170 |
|
183 | 171 | <Target Name="CopyFilesFromArchive" |
184 | 172 | DependsOnTargets="GetFilesFromArchive"> |
| 173 | + |
185 | 174 | <Message Importance="High" Text="@(FilesFromArchive) -> %(FilesFromArchive.TargetPath)" /> |
186 | 175 | <Copy SourceFiles="@(FilesFromArchive)" |
187 | 176 | DestinationFiles="@(FilesFromArchive->'%(TargetPath)')" /> |
|
0 commit comments