aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2018-12-26 16:11:51 -0800
committerRob Mensching <rob@firegiant.com>2018-12-26 16:20:33 -0800
commit6dfba4f5a6528991b57d3939c8f62ba9de7cd7d5 (patch)
tree7f82e53b983f69d92a98eb9ba2c17fb0f157dbb8 /src
parent22672837ce4248778cbe3ad0b0056c3998a33a84 (diff)
downloadwix-6dfba4f5a6528991b57d3939c8f62ba9de7cd7d5.tar.gz
wix-6dfba4f5a6528991b57d3939c8f62ba9de7cd7d5.tar.bz2
wix-6dfba4f5a6528991b57d3939c8f62ba9de7cd7d5.zip
Move wixnative.*.exe back to root libs in .nupkg
It seems NuGet will not copy the .exes from subfolders so move them back to root folder and live with the warnings that the .exe files are not managed code (because they aren't).
Diffstat (limited to 'src')
-rw-r--r--src/WixToolset.Core.Native/WixNativeExe.cs23
-rw-r--r--src/WixToolset.Core.Native/WixToolset.Core.Native.nuspec8
2 files changed, 11 insertions, 20 deletions
diff --git a/src/WixToolset.Core.Native/WixNativeExe.cs b/src/WixToolset.Core.Native/WixNativeExe.cs
index 3bd340bc..994fc7ec 100644
--- a/src/WixToolset.Core.Native/WixNativeExe.cs
+++ b/src/WixToolset.Core.Native/WixNativeExe.cs
@@ -12,7 +12,6 @@ namespace WixToolset.Core.Native
12 internal class WixNativeExe 12 internal class WixNativeExe
13 { 13 {
14 private const int FiveMinutesInMilliseconds = 300000; 14 private const int FiveMinutesInMilliseconds = 300000;
15 private static readonly object PathToWixNativeExeLock = new object();
16 private static string PathToWixNativeExe; 15 private static string PathToWixNativeExe;
17 16
18 private readonly string commandLine; 17 private readonly string commandLine;
@@ -83,24 +82,16 @@ namespace WixToolset.Core.Native
83 82
84 private static void EnsurePathToWixNativeExeSet() 83 private static void EnsurePathToWixNativeExeSet()
85 { 84 {
86 lock (PathToWixNativeExeLock) 85 if (String.IsNullOrEmpty(PathToWixNativeExe))
87 { 86 {
88 if (String.IsNullOrEmpty(PathToWixNativeExe)) 87 var path = Path.Combine(Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath), "wixnative.x86.exe");
89 {
90 var path = Path.Combine(Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath), @"x86\wixnative.x86.exe");
91
92 if (!File.Exists(path))
93 {
94 path = Path.Combine(Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath), "wixnative.x86.exe");
95 88
96 if (!File.Exists(path)) 89 if (!File.Exists(path))
97 { 90 {
98 throw new FileNotFoundException($"Could not find internal piece of WiX Toolset at: {path}", path); 91 throw new FileNotFoundException($"Could not find internal piece of WiX Toolset at: {path}", path);
99 }
100 }
101
102 PathToWixNativeExe = path;
103 } 92 }
93
94 PathToWixNativeExe = path;
104 } 95 }
105 } 96 }
106 97
diff --git a/src/WixToolset.Core.Native/WixToolset.Core.Native.nuspec b/src/WixToolset.Core.Native/WixToolset.Core.Native.nuspec
index a99c5ec3..195ea7b6 100644
--- a/src/WixToolset.Core.Native/WixToolset.Core.Native.nuspec
+++ b/src/WixToolset.Core.Native/WixToolset.Core.Native.nuspec
@@ -28,9 +28,9 @@
28 These native executables are included in this .nupkg to place the .exe correctly for tests to work. 28 These native executables are included in this .nupkg to place the .exe correctly for tests to work.
29 That are ignored when published. The dependency above is used when publishing the tools. 29 That are ignored when published. The dependency above is used when publishing the tools.
30 --> 30 -->
31 <file src="..\Win32\wixnative.x86.exe" target="lib\netstandard2.0\x86" /> 31 <file src="..\Win32\wixnative.x86.exe" target="lib\netstandard2.0" />
32 <file src="..\Win32\wixnative.x86.pdb" target="lib\netstandard2.0\x86" /> 32 <file src="..\Win32\wixnative.x86.pdb" target="lib\netstandard2.0" />
33 <file src="..\x64\wixnative.amd64.exe" target="lib\netstandard2.0\amd64" /> 33 <file src="..\x64\wixnative.amd64.exe" target="lib\netstandard2.0" />
34 <file src="..\x64\wixnative.amd64.pdb" target="lib\netstandard2.0\amd64" /> 34 <file src="..\x64\wixnative.amd64.pdb" target="lib\netstandard2.0" />
35 </files> 35 </files>
36</package> 36</package>