aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core.Native/WixNativeExe.cs
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/WixToolset.Core.Native/WixNativeExe.cs
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/WixToolset.Core.Native/WixNativeExe.cs')
-rw-r--r--src/WixToolset.Core.Native/WixNativeExe.cs23
1 files changed, 7 insertions, 16 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