diff options
| author | Rob Mensching <rob@firegiant.com> | 2017-09-17 15:35:20 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2017-09-17 16:00:11 -0700 |
| commit | d3d3649a68cb1fa589fdd987a6690dbd5d671f0d (patch) | |
| tree | 44fe37ee352b7e3a355cc1e08b1d7d5988c14cc0 /src/candle | |
| parent | a62610d23d6feb98be3b1e529a4e81b19d77d9d8 (diff) | |
| download | wix-d3d3649a68cb1fa589fdd987a6690dbd5d671f0d.tar.gz wix-d3d3649a68cb1fa589fdd987a6690dbd5d671f0d.tar.bz2 wix-d3d3649a68cb1fa589fdd987a6690dbd5d671f0d.zip | |
Initial code commit
Diffstat (limited to 'src/candle')
| -rw-r--r-- | src/candle/App.ico | bin | 0 -> 1078 bytes | |||
| -rw-r--r-- | src/candle/AssemblyInfo.cs | 11 | ||||
| -rw-r--r-- | src/candle/CandleCommandLine.cs | 343 | ||||
| -rw-r--r-- | src/candle/CandleStrings.Designer.cs | 81 | ||||
| -rw-r--r-- | src/candle/CandleStrings.resx | 142 | ||||
| -rw-r--r-- | src/candle/CompileFile.cs | 20 | ||||
| -rw-r--r-- | src/candle/app.config | 9 | ||||
| -rw-r--r-- | src/candle/candle.cs | 200 | ||||
| -rw-r--r-- | src/candle/candle.csproj | 62 | ||||
| -rw-r--r-- | src/candle/candle.exe.manifest | 9 | ||||
| -rw-r--r-- | src/candle/candle.rc | 10 |
11 files changed, 887 insertions, 0 deletions
diff --git a/src/candle/App.ico b/src/candle/App.ico new file mode 100644 index 00000000..3a5525fd --- /dev/null +++ b/src/candle/App.ico | |||
| Binary files differ | |||
diff --git a/src/candle/AssemblyInfo.cs b/src/candle/AssemblyInfo.cs new file mode 100644 index 00000000..7df55940 --- /dev/null +++ b/src/candle/AssemblyInfo.cs | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 2 | |||
| 3 | using System; | ||
| 4 | using System.Reflection; | ||
| 5 | using System.Runtime.CompilerServices; | ||
| 6 | using System.Runtime.InteropServices; | ||
| 7 | |||
| 8 | [assembly: AssemblyTitle("WiX Toolset Compiler")] | ||
| 9 | [assembly: AssemblyDescription("Compiler")] | ||
| 10 | [assembly: AssemblyCulture("")] | ||
| 11 | [assembly: ComVisible(false)] | ||
diff --git a/src/candle/CandleCommandLine.cs b/src/candle/CandleCommandLine.cs new file mode 100644 index 00000000..81fdf7b2 --- /dev/null +++ b/src/candle/CandleCommandLine.cs | |||
| @@ -0,0 +1,343 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 2 | |||
| 3 | namespace WixToolset.Tools | ||
| 4 | { | ||
| 5 | using System; | ||
| 6 | using System.Collections.Generic; | ||
| 7 | using System.Globalization; | ||
| 8 | using System.IO; | ||
| 9 | using WixToolset.Data; | ||
| 10 | |||
| 11 | /// <summary> | ||
| 12 | /// Parse command line for candle. | ||
| 13 | /// </summary> | ||
| 14 | public class CandleCommandLine | ||
| 15 | { | ||
| 16 | public CandleCommandLine() | ||
| 17 | { | ||
| 18 | this.Platform = Platform.X86; | ||
| 19 | |||
| 20 | this.ShowLogo = true; | ||
| 21 | this.Extensions = new List<string>(); | ||
| 22 | this.Files = new List<CompileFile>(); | ||
| 23 | this.IncludeSearchPaths = new List<string>(); | ||
| 24 | this.PreprocessorVariables = new Dictionary<string, string>(); | ||
| 25 | } | ||
| 26 | |||
| 27 | public Platform Platform { get; private set; } | ||
| 28 | |||
| 29 | public bool ShowLogo { get; private set; } | ||
| 30 | |||
| 31 | public bool ShowHelp { get; private set; } | ||
| 32 | |||
| 33 | public bool ShowPedanticMessages { get; private set; } | ||
| 34 | |||
| 35 | public string OutputFolder { get; private set; } | ||
| 36 | |||
| 37 | public string OutputFile { get; private set; } | ||
| 38 | |||
| 39 | public List<string> Extensions { get; private set; } | ||
| 40 | |||
| 41 | public List<CompileFile> Files { get; private set; } | ||
| 42 | |||
| 43 | public List<string> IncludeSearchPaths { get; private set; } | ||
| 44 | |||
| 45 | public string PreprocessFile { get; private set; } | ||
| 46 | |||
| 47 | public Dictionary<string, string> PreprocessorVariables { get; private set; } | ||
| 48 | |||
| 49 | /// <summary> | ||
| 50 | /// Parse the commandline arguments. | ||
| 51 | /// </summary> | ||
| 52 | /// <param name="args">Commandline arguments.</param> | ||
| 53 | public string[] Parse(string[] args) | ||
| 54 | { | ||
| 55 | List<string> unprocessed = new List<string>(); | ||
| 56 | |||
| 57 | for (int i = 0; i < args.Length; ++i) | ||
| 58 | { | ||
| 59 | string arg = args[i]; | ||
| 60 | if (String.IsNullOrEmpty(arg)) // skip blank arguments | ||
| 61 | { | ||
| 62 | continue; | ||
| 63 | } | ||
| 64 | |||
| 65 | if (1 == arg.Length) // treat '-' and '@' as filenames when by themselves. | ||
| 66 | { | ||
| 67 | unprocessed.Add(arg); | ||
| 68 | } | ||
| 69 | else if ('-' == arg[0] || '/' == arg[0]) | ||
| 70 | { | ||
| 71 | string parameter = arg.Substring(1); | ||
| 72 | if ('d' == parameter[0]) | ||
| 73 | { | ||
| 74 | if (1 >= parameter.Length || '=' == parameter[1]) | ||
| 75 | { | ||
| 76 | Messaging.Instance.OnMessage(WixErrors.InvalidVariableDefinition(arg)); | ||
| 77 | break; | ||
| 78 | } | ||
| 79 | |||
| 80 | parameter = arg.Substring(2); | ||
| 81 | |||
| 82 | string[] value = parameter.Split("=".ToCharArray(), 2); | ||
| 83 | |||
| 84 | if (this.PreprocessorVariables.ContainsKey(value[0])) | ||
| 85 | { | ||
| 86 | Messaging.Instance.OnMessage(WixErrors.DuplicateVariableDefinition(value[0], (1 == value.Length) ? String.Empty : value[1], this.PreprocessorVariables[value[0]])); | ||
| 87 | break; | ||
| 88 | } | ||
| 89 | |||
| 90 | if (1 == value.Length) | ||
| 91 | { | ||
| 92 | this.PreprocessorVariables.Add(value[0], String.Empty); | ||
| 93 | } | ||
| 94 | else | ||
| 95 | { | ||
| 96 | this.PreprocessorVariables.Add(value[0], value[1]); | ||
| 97 | } | ||
| 98 | } | ||
| 99 | else if ('I' == parameter[0]) | ||
| 100 | { | ||
| 101 | this.IncludeSearchPaths.Add(parameter.Substring(1)); | ||
| 102 | } | ||
| 103 | else if ("ext" == parameter) | ||
| 104 | { | ||
| 105 | if (!CommandLine.IsValidArg(args, ++i)) | ||
| 106 | { | ||
| 107 | Messaging.Instance.OnMessage(WixErrors.TypeSpecificationForExtensionRequired("-ext")); | ||
| 108 | break; | ||
| 109 | } | ||
| 110 | else | ||
| 111 | { | ||
| 112 | this.Extensions.Add(args[i]); | ||
| 113 | } | ||
| 114 | } | ||
| 115 | else if ("nologo" == parameter) | ||
| 116 | { | ||
| 117 | this.ShowLogo = false; | ||
| 118 | } | ||
| 119 | else if ("o" == parameter || "out" == parameter) | ||
| 120 | { | ||
| 121 | string path = CommandLine.GetFileOrDirectory(parameter, args, ++i); | ||
| 122 | |||
| 123 | if (!String.IsNullOrEmpty(path)) | ||
| 124 | { | ||
| 125 | if (path.EndsWith("\\", StringComparison.Ordinal) || path.EndsWith("/", StringComparison.Ordinal)) | ||
| 126 | { | ||
| 127 | this.OutputFolder = path; | ||
| 128 | } | ||
| 129 | else | ||
| 130 | { | ||
| 131 | this.OutputFile = path; | ||
| 132 | } | ||
| 133 | } | ||
| 134 | else | ||
| 135 | { | ||
| 136 | break; | ||
| 137 | } | ||
| 138 | } | ||
| 139 | else if ("pedantic" == parameter) | ||
| 140 | { | ||
| 141 | this.ShowPedanticMessages = true; | ||
| 142 | } | ||
| 143 | else if ("arch" == parameter) | ||
| 144 | { | ||
| 145 | if (!CommandLine.IsValidArg(args, ++i)) | ||
| 146 | { | ||
| 147 | Messaging.Instance.OnMessage(WixErrors.InvalidPlatformParameter(parameter, String.Empty)); | ||
| 148 | break; | ||
| 149 | } | ||
| 150 | |||
| 151 | if (String.Equals(args[i], "intel", StringComparison.OrdinalIgnoreCase) || String.Equals(args[i], "x86", StringComparison.OrdinalIgnoreCase)) | ||
| 152 | { | ||
| 153 | this.Platform = Platform.X86; | ||
| 154 | } | ||
| 155 | else if (String.Equals(args[i], "x64", StringComparison.OrdinalIgnoreCase)) | ||
| 156 | { | ||
| 157 | this.Platform = Platform.X64; | ||
| 158 | } | ||
| 159 | else if (String.Equals(args[i], "intel64", StringComparison.OrdinalIgnoreCase) || String.Equals(args[i], "ia64", StringComparison.OrdinalIgnoreCase)) | ||
| 160 | { | ||
| 161 | this.Platform = Platform.IA64; | ||
| 162 | } | ||
| 163 | else if (String.Equals(args[i], "arm", StringComparison.OrdinalIgnoreCase)) | ||
| 164 | { | ||
| 165 | this.Platform = Platform.ARM; | ||
| 166 | } | ||
| 167 | else | ||
| 168 | { | ||
| 169 | Messaging.Instance.OnMessage(WixErrors.InvalidPlatformParameter(parameter, args[i])); | ||
| 170 | } | ||
| 171 | } | ||
| 172 | else if ('p' == parameter[0]) | ||
| 173 | { | ||
| 174 | string file = parameter.Substring(1); | ||
| 175 | this.PreprocessFile = String.IsNullOrEmpty(file) ? "con:" : file; | ||
| 176 | } | ||
| 177 | else if (parameter.StartsWith("sw", StringComparison.Ordinal)) | ||
| 178 | { | ||
| 179 | string paramArg = parameter.Substring(2); | ||
| 180 | try | ||
| 181 | { | ||
| 182 | if (0 == paramArg.Length) | ||
| 183 | { | ||
| 184 | Messaging.Instance.SuppressAllWarnings = true; | ||
| 185 | } | ||
| 186 | else | ||
| 187 | { | ||
| 188 | int suppressWarning = Convert.ToInt32(paramArg, CultureInfo.InvariantCulture.NumberFormat); | ||
| 189 | if (0 >= suppressWarning) | ||
| 190 | { | ||
| 191 | Messaging.Instance.OnMessage(WixErrors.IllegalSuppressWarningId(paramArg)); | ||
| 192 | } | ||
| 193 | |||
| 194 | Messaging.Instance.SuppressWarningMessage(suppressWarning); | ||
| 195 | } | ||
| 196 | } | ||
| 197 | catch (FormatException) | ||
| 198 | { | ||
| 199 | Messaging.Instance.OnMessage(WixErrors.IllegalSuppressWarningId(paramArg)); | ||
| 200 | } | ||
| 201 | catch (OverflowException) | ||
| 202 | { | ||
| 203 | Messaging.Instance.OnMessage(WixErrors.IllegalSuppressWarningId(paramArg)); | ||
| 204 | } | ||
| 205 | } | ||
| 206 | else if (parameter.StartsWith("wx", StringComparison.Ordinal)) | ||
| 207 | { | ||
| 208 | string paramArg = parameter.Substring(2); | ||
| 209 | try | ||
| 210 | { | ||
| 211 | if (0 == paramArg.Length) | ||
| 212 | { | ||
| 213 | Messaging.Instance.WarningsAsError = true; | ||
| 214 | } | ||
| 215 | else | ||
| 216 | { | ||
| 217 | int elevateWarning = Convert.ToInt32(paramArg, CultureInfo.InvariantCulture.NumberFormat); | ||
| 218 | if (0 >= elevateWarning) | ||
| 219 | { | ||
| 220 | Messaging.Instance.OnMessage(WixErrors.IllegalWarningIdAsError(paramArg)); | ||
| 221 | } | ||
| 222 | |||
| 223 | Messaging.Instance.ElevateWarningMessage(elevateWarning); | ||
| 224 | } | ||
| 225 | } | ||
| 226 | catch (FormatException) | ||
| 227 | { | ||
| 228 | Messaging.Instance.OnMessage(WixErrors.IllegalWarningIdAsError(paramArg)); | ||
| 229 | } | ||
| 230 | catch (OverflowException) | ||
| 231 | { | ||
| 232 | Messaging.Instance.OnMessage(WixErrors.IllegalWarningIdAsError(paramArg)); | ||
| 233 | } | ||
| 234 | } | ||
| 235 | else if ("v" == parameter) | ||
| 236 | { | ||
| 237 | Messaging.Instance.ShowVerboseMessages = true; | ||
| 238 | } | ||
| 239 | else if ("?" == parameter || "help" == parameter) | ||
| 240 | { | ||
| 241 | this.ShowHelp = true; | ||
| 242 | break; | ||
| 243 | } | ||
| 244 | else | ||
| 245 | { | ||
| 246 | unprocessed.Add(arg); | ||
| 247 | } | ||
| 248 | } | ||
| 249 | else if ('@' == arg[0]) | ||
| 250 | { | ||
| 251 | string[] parsedArgs = CommandLineResponseFile.Parse(arg.Substring(1)); | ||
| 252 | string[] unparsedArgs = this.Parse(parsedArgs); | ||
| 253 | unprocessed.AddRange(unparsedArgs); | ||
| 254 | } | ||
| 255 | else | ||
| 256 | { | ||
| 257 | unprocessed.Add(arg); | ||
| 258 | } | ||
| 259 | } | ||
| 260 | |||
| 261 | return unprocessed.ToArray(); | ||
| 262 | } | ||
| 263 | |||
| 264 | public string[] ParsePostExtensions(string[] remaining) | ||
| 265 | { | ||
| 266 | List<string> unprocessed = new List<string>(); | ||
| 267 | List<string> files = new List<string>(); | ||
| 268 | |||
| 269 | for (int i = 0; i < remaining.Length; ++i) | ||
| 270 | { | ||
| 271 | string arg = remaining[i]; | ||
| 272 | if (String.IsNullOrEmpty(arg)) // skip blank arguments | ||
| 273 | { | ||
| 274 | continue; | ||
| 275 | } | ||
| 276 | |||
| 277 | if (1 < arg.Length && ('-' == arg[0] || '/' == arg[0])) | ||
| 278 | { | ||
| 279 | unprocessed.Add(arg); | ||
| 280 | } | ||
| 281 | else | ||
| 282 | { | ||
| 283 | files.AddRange(CommandLine.GetFiles(arg, "Source")); | ||
| 284 | } | ||
| 285 | } | ||
| 286 | |||
| 287 | if (0 == files.Count) | ||
| 288 | { | ||
| 289 | this.ShowHelp = true; | ||
| 290 | } | ||
| 291 | else | ||
| 292 | { | ||
| 293 | Dictionary<string, List<string>> sourcesForOutput = new Dictionary<string, List<string>>(StringComparer.OrdinalIgnoreCase); | ||
| 294 | foreach (string file in files) | ||
| 295 | { | ||
| 296 | string sourceFileName = Path.GetFileName(file); | ||
| 297 | |||
| 298 | CompileFile compileFile = new CompileFile(); | ||
| 299 | compileFile.SourcePath = Path.GetFullPath(file); | ||
| 300 | |||
| 301 | if (null != this.OutputFile) | ||
| 302 | { | ||
| 303 | compileFile.OutputPath = this.OutputFile; | ||
| 304 | } | ||
| 305 | else if (null != this.OutputFolder) | ||
| 306 | { | ||
| 307 | compileFile.OutputPath = Path.Combine(this.OutputFolder, Path.ChangeExtension(sourceFileName, ".wixobj")); | ||
| 308 | } | ||
| 309 | else | ||
| 310 | { | ||
| 311 | compileFile.OutputPath = Path.ChangeExtension(sourceFileName, ".wixobj"); | ||
| 312 | } | ||
| 313 | |||
| 314 | // Track which source files result in a given output file, to ensure we aren't | ||
| 315 | // overwriting the output. | ||
| 316 | List<string> sources; | ||
| 317 | string targetPath = Path.GetFullPath(compileFile.OutputPath); | ||
| 318 | if (!sourcesForOutput.TryGetValue(targetPath, out sources)) | ||
| 319 | { | ||
| 320 | sources = new List<string>(); | ||
| 321 | sourcesForOutput.Add(targetPath, sources); | ||
| 322 | } | ||
| 323 | |||
| 324 | sources.Add(compileFile.SourcePath); | ||
| 325 | |||
| 326 | this.Files.Add(compileFile); | ||
| 327 | } | ||
| 328 | |||
| 329 | // Show an error for every output file that had more than 1 source file. | ||
| 330 | foreach (KeyValuePair<string, List<string>> outputSources in sourcesForOutput) | ||
| 331 | { | ||
| 332 | if (1 < outputSources.Value.Count) | ||
| 333 | { | ||
| 334 | string sourceFiles = String.Join(", ", outputSources.Value); | ||
| 335 | Messaging.Instance.OnMessage(WixErrors.DuplicateSourcesForOutput(sourceFiles, outputSources.Key)); | ||
| 336 | } | ||
| 337 | } | ||
| 338 | } | ||
| 339 | |||
| 340 | return unprocessed.ToArray(); | ||
| 341 | } | ||
| 342 | } | ||
| 343 | } | ||
diff --git a/src/candle/CandleStrings.Designer.cs b/src/candle/CandleStrings.Designer.cs new file mode 100644 index 00000000..aaf7254e --- /dev/null +++ b/src/candle/CandleStrings.Designer.cs | |||
| @@ -0,0 +1,81 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 2 | |||
| 3 | namespace WixToolset.Tools { | ||
| 4 | using System; | ||
| 5 | |||
| 6 | |||
| 7 | /// <summary> | ||
| 8 | /// A strongly-typed resource class, for looking up localized strings, etc. | ||
| 9 | /// </summary> | ||
| 10 | // This class was auto-generated by the StronglyTypedResourceBuilder | ||
| 11 | // class via a tool like ResGen or Visual Studio. | ||
| 12 | // To add or remove a member, edit your .ResX file then rerun ResGen | ||
| 13 | // with the /str option, or rebuild your VS project. | ||
| 14 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] | ||
| 15 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | ||
| 16 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] | ||
| 17 | internal class CandleStrings { | ||
| 18 | |||
| 19 | private static global::System.Resources.ResourceManager resourceMan; | ||
| 20 | |||
| 21 | private static global::System.Globalization.CultureInfo resourceCulture; | ||
| 22 | |||
| 23 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] | ||
| 24 | internal CandleStrings() { | ||
| 25 | } | ||
| 26 | |||
| 27 | /// <summary> | ||
| 28 | /// Returns the cached ResourceManager instance used by this class. | ||
| 29 | /// </summary> | ||
| 30 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] | ||
| 31 | internal static global::System.Resources.ResourceManager ResourceManager { | ||
| 32 | get { | ||
| 33 | if (object.ReferenceEquals(resourceMan, null)) { | ||
| 34 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WixToolset.Tools.CandleStrings", typeof(CandleStrings).Assembly); | ||
| 35 | resourceMan = temp; | ||
| 36 | } | ||
| 37 | return resourceMan; | ||
| 38 | } | ||
| 39 | } | ||
| 40 | |||
| 41 | /// <summary> | ||
| 42 | /// Overrides the current thread's CurrentUICulture property for all | ||
| 43 | /// resource lookups using this strongly typed resource class. | ||
| 44 | /// </summary> | ||
| 45 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] | ||
| 46 | internal static global::System.Globalization.CultureInfo Culture { | ||
| 47 | get { | ||
| 48 | return resourceCulture; | ||
| 49 | } | ||
| 50 | set { | ||
| 51 | resourceCulture = value; | ||
| 52 | } | ||
| 53 | } | ||
| 54 | |||
| 55 | /// <summary> | ||
| 56 | /// Looks up a localized string similar to Cannot specify more than one source file with single output file. Either specify an output directory for the -out argument by ending the argument with a '\' or remove the -out argument to have the source files compiled to the current directory.. | ||
| 57 | /// </summary> | ||
| 58 | internal static string CannotSpecifyMoreThanOneSourceFileForSingleTargetFile { | ||
| 59 | get { | ||
| 60 | return ResourceManager.GetString("CannotSpecifyMoreThanOneSourceFileForSingleTargetFile", resourceCulture); | ||
| 61 | } | ||
| 62 | } | ||
| 63 | |||
| 64 | /// <summary> | ||
| 65 | /// Looks up a localized string similar to usage: candle.exe [-?] [-nologo] [-out outputFile] sourceFile [sourceFile ...] [@responseFile] | ||
| 66 | /// | ||
| 67 | /// -arch set architecture defaults for package, components, etc. | ||
| 68 | /// values: x86, x64, or ia64 (default: x86) | ||
| 69 | /// -d<name>[=<value>] define a parameter for the preprocessor | ||
| 70 | /// -ext <extension> extension assembly or "class, assembly" | ||
| 71 | /// -I<dir> add to include search path | ||
| 72 | /// -nologo skip printing candle logo information | ||
| 73 | /// -o[ut] s [rest of string was truncated]";. | ||
| 74 | /// </summary> | ||
| 75 | internal static string HelpMessage { | ||
| 76 | get { | ||
| 77 | return ResourceManager.GetString("HelpMessage", resourceCulture); | ||
| 78 | } | ||
| 79 | } | ||
| 80 | } | ||
| 81 | } | ||
diff --git a/src/candle/CandleStrings.resx b/src/candle/CandleStrings.resx new file mode 100644 index 00000000..d77788ca --- /dev/null +++ b/src/candle/CandleStrings.resx | |||
| @@ -0,0 +1,142 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <root> | ||
| 3 | <!-- | ||
| 4 | Microsoft ResX Schema | ||
| 5 | |||
| 6 | Version 2.0 | ||
| 7 | |||
| 8 | The primary goals of this format is to allow a simple XML format | ||
| 9 | that is mostly human readable. The generation and parsing of the | ||
| 10 | various data types are done through the TypeConverter classes | ||
| 11 | associated with the data types. | ||
| 12 | |||
| 13 | Example: | ||
| 14 | |||
| 15 | ... ado.net/XML headers & schema ... | ||
| 16 | <resheader name="resmimetype">text/microsoft-resx</resheader> | ||
| 17 | <resheader name="version">2.0</resheader> | ||
| 18 | <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> | ||
| 19 | <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> | ||
| 20 | <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> | ||
| 21 | <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> | ||
| 22 | <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> | ||
| 23 | <value>[base64 mime encoded serialized .NET Framework object]</value> | ||
| 24 | </data> | ||
| 25 | <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> | ||
| 26 | <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> | ||
| 27 | <comment>This is a comment</comment> | ||
| 28 | </data> | ||
| 29 | |||
| 30 | There are any number of "resheader" rows that contain simple | ||
| 31 | name/value pairs. | ||
| 32 | |||
| 33 | Each data row contains a name, and value. The row also contains a | ||
| 34 | type or mimetype. Type corresponds to a .NET class that support | ||
| 35 | text/value conversion through the TypeConverter architecture. | ||
| 36 | Classes that don't support this are serialized and stored with the | ||
| 37 | mimetype set. | ||
| 38 | |||
| 39 | The mimetype is used for serialized objects, and tells the | ||
| 40 | ResXResourceReader how to depersist the object. This is currently not | ||
| 41 | extensible. For a given mimetype the value must be set accordingly: | ||
| 42 | |||
| 43 | Note - application/x-microsoft.net.object.binary.base64 is the format | ||
| 44 | that the ResXResourceWriter will generate, however the reader can | ||
| 45 | read any of the formats listed below. | ||
| 46 | |||
| 47 | mimetype: application/x-microsoft.net.object.binary.base64 | ||
| 48 | value : The object must be serialized with | ||
| 49 | : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter | ||
| 50 | : and then encoded with base64 encoding. | ||
| 51 | |||
| 52 | mimetype: application/x-microsoft.net.object.soap.base64 | ||
| 53 | value : The object must be serialized with | ||
| 54 | : System.Runtime.Serialization.Formatters.Soap.SoapFormatter | ||
| 55 | : and then encoded with base64 encoding. | ||
| 56 | |||
| 57 | mimetype: application/x-microsoft.net.object.bytearray.base64 | ||
| 58 | value : The object must be serialized into a byte array | ||
| 59 | : using a System.ComponentModel.TypeConverter | ||
| 60 | : and then encoded with base64 encoding. | ||
| 61 | --> | ||
| 62 | <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> | ||
| 63 | <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> | ||
| 64 | <xsd:element name="root" msdata:IsDataSet="true"> | ||
| 65 | <xsd:complexType> | ||
| 66 | <xsd:choice maxOccurs="unbounded"> | ||
| 67 | <xsd:element name="metadata"> | ||
| 68 | <xsd:complexType> | ||
| 69 | <xsd:sequence> | ||
| 70 | <xsd:element name="value" type="xsd:string" minOccurs="0" /> | ||
| 71 | </xsd:sequence> | ||
| 72 | <xsd:attribute name="name" use="required" type="xsd:string" /> | ||
| 73 | <xsd:attribute name="type" type="xsd:string" /> | ||
| 74 | <xsd:attribute name="mimetype" type="xsd:string" /> | ||
| 75 | <xsd:attribute ref="xml:space" /> | ||
| 76 | </xsd:complexType> | ||
| 77 | </xsd:element> | ||
| 78 | <xsd:element name="assembly"> | ||
| 79 | <xsd:complexType> | ||
| 80 | <xsd:attribute name="alias" type="xsd:string" /> | ||
| 81 | <xsd:attribute name="name" type="xsd:string" /> | ||
| 82 | </xsd:complexType> | ||
| 83 | </xsd:element> | ||
| 84 | <xsd:element name="data"> | ||
| 85 | <xsd:complexType> | ||
| 86 | <xsd:sequence> | ||
| 87 | <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> | ||
| 88 | <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> | ||
| 89 | </xsd:sequence> | ||
| 90 | <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> | ||
| 91 | <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> | ||
| 92 | <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> | ||
| 93 | <xsd:attribute ref="xml:space" /> | ||
| 94 | </xsd:complexType> | ||
| 95 | </xsd:element> | ||
| 96 | <xsd:element name="resheader"> | ||
| 97 | <xsd:complexType> | ||
| 98 | <xsd:sequence> | ||
| 99 | <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> | ||
| 100 | </xsd:sequence> | ||
| 101 | <xsd:attribute name="name" type="xsd:string" use="required" /> | ||
| 102 | </xsd:complexType> | ||
| 103 | </xsd:element> | ||
| 104 | </xsd:choice> | ||
| 105 | </xsd:complexType> | ||
| 106 | </xsd:element> | ||
| 107 | </xsd:schema> | ||
| 108 | <resheader name="resmimetype"> | ||
| 109 | <value>text/microsoft-resx</value> | ||
| 110 | </resheader> | ||
| 111 | <resheader name="version"> | ||
| 112 | <value>2.0</value> | ||
| 113 | </resheader> | ||
| 114 | <resheader name="reader"> | ||
| 115 | <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | ||
| 116 | </resheader> | ||
| 117 | <resheader name="writer"> | ||
| 118 | <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | ||
| 119 | </resheader> | ||
| 120 | <data name="CannotSpecifyMoreThanOneSourceFileForSingleTargetFile" xml:space="preserve"> | ||
| 121 | <value>Cannot specify more than one source file with single output file. Either specify an output directory for the -out argument by ending the argument with a '\' or remove the -out argument to have the source files compiled to the current directory.</value> | ||
| 122 | </data> | ||
| 123 | <data name="HelpMessage" xml:space="preserve"> | ||
| 124 | <value> usage: candle.exe [-?] [-nologo] [-out outputFile] sourceFile [sourceFile ...] [@responseFile] | ||
| 125 | |||
| 126 | -arch set architecture defaults for package, components, etc. | ||
| 127 | values: x86, x64, ia64 or arm (default: x86) | ||
| 128 | -d<name>[=<value>] define a parameter for the preprocessor | ||
| 129 | -ext <extension> extension assembly or "class, assembly" | ||
| 130 | -I<dir> add to include search path | ||
| 131 | -nologo skip printing candle logo information | ||
| 132 | -o[ut] specify output file (default: write to current directory) | ||
| 133 | -p<file> preprocess to a file (or stdout if no file supplied) | ||
| 134 | -pedantic show pedantic messages | ||
| 135 | -sw[N] suppress all warnings or a specific message ID | ||
| 136 | (example: -sw1009 -sw1103) | ||
| 137 | -v verbose output | ||
| 138 | -wx[N] treat all warnings or a specific message ID as an error | ||
| 139 | (example: -wx1009 -wx1103) | ||
| 140 | -? | -help this help information</value> | ||
| 141 | </data> | ||
| 142 | </root> \ No newline at end of file | ||
diff --git a/src/candle/CompileFile.cs b/src/candle/CompileFile.cs new file mode 100644 index 00000000..682acc21 --- /dev/null +++ b/src/candle/CompileFile.cs | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 2 | |||
| 3 | namespace WixToolset.Tools | ||
| 4 | { | ||
| 5 | /// <summary> | ||
| 6 | /// Source code file to be compiled. | ||
| 7 | /// </summary> | ||
| 8 | public class CompileFile | ||
| 9 | { | ||
| 10 | /// <summary> | ||
| 11 | /// Path to the source code file. | ||
| 12 | /// </summary> | ||
| 13 | public string SourcePath { get; set; } | ||
| 14 | |||
| 15 | /// <summary> | ||
| 16 | /// Path to compile the output to. | ||
| 17 | /// </summary> | ||
| 18 | public string OutputPath { get; set; } | ||
| 19 | } | ||
| 20 | } | ||
diff --git a/src/candle/app.config b/src/candle/app.config new file mode 100644 index 00000000..71c529fb --- /dev/null +++ b/src/candle/app.config | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8" ?> | ||
| 2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
| 3 | |||
| 4 | |||
| 5 | <configuration> | ||
| 6 | <runtime> | ||
| 7 | <loadFromRemoteSources enabled="true"/> | ||
| 8 | </runtime> | ||
| 9 | </configuration> | ||
diff --git a/src/candle/candle.cs b/src/candle/candle.cs new file mode 100644 index 00000000..f5c65cb1 --- /dev/null +++ b/src/candle/candle.cs | |||
| @@ -0,0 +1,200 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 2 | |||
| 3 | namespace WixToolset.Tools | ||
| 4 | { | ||
| 5 | using System; | ||
| 6 | using System.Collections.Generic; | ||
| 7 | using System.IO; | ||
| 8 | using System.Linq; | ||
| 9 | using System.Runtime.InteropServices; | ||
| 10 | using System.Xml.Linq; | ||
| 11 | using WixToolset.Data; | ||
| 12 | using WixToolset.Extensibility; | ||
| 13 | |||
| 14 | /// <summary> | ||
| 15 | /// The main entry point for candle. | ||
| 16 | /// </summary> | ||
| 17 | public sealed class Candle | ||
| 18 | { | ||
| 19 | private CandleCommandLine commandLine; | ||
| 20 | |||
| 21 | private IEnumerable<IPreprocessorExtension> preprocessorExtensions; | ||
| 22 | private IEnumerable<ICompilerExtension> compilerExtensions; | ||
| 23 | private IEnumerable<IExtensionData> extensionData; | ||
| 24 | |||
| 25 | /// <summary> | ||
| 26 | /// The main entry point for candle. | ||
| 27 | /// </summary> | ||
| 28 | /// <param name="args">Commandline arguments for the application.</param> | ||
| 29 | /// <returns>Returns the application error code.</returns> | ||
| 30 | [MTAThread] | ||
| 31 | public static int Main(string[] args) | ||
| 32 | { | ||
| 33 | AppCommon.PrepareConsoleForLocalization(); | ||
| 34 | Messaging.Instance.InitializeAppName("CNDL", "candle.exe").Display += AppCommon.ConsoleDisplayMessage; | ||
| 35 | |||
| 36 | Candle candle = new Candle(); | ||
| 37 | return candle.Execute(args); | ||
| 38 | } | ||
| 39 | |||
| 40 | private int Execute(string[] args) | ||
| 41 | { | ||
| 42 | try | ||
| 43 | { | ||
| 44 | string[] unparsed = this.ParseCommandLineAndLoadExtensions(args); | ||
| 45 | |||
| 46 | if (!Messaging.Instance.EncounteredError) | ||
| 47 | { | ||
| 48 | if (this.commandLine.ShowLogo) | ||
| 49 | { | ||
| 50 | AppCommon.DisplayToolHeader(); | ||
| 51 | } | ||
| 52 | |||
| 53 | if (this.commandLine.ShowHelp) | ||
| 54 | { | ||
| 55 | Console.WriteLine(CandleStrings.HelpMessage); | ||
| 56 | AppCommon.DisplayToolFooter(); | ||
| 57 | } | ||
| 58 | else | ||
| 59 | { | ||
| 60 | foreach (string arg in unparsed) | ||
| 61 | { | ||
| 62 | Messaging.Instance.OnMessage(WixWarnings.UnsupportedCommandLineArgument(arg)); | ||
| 63 | } | ||
| 64 | |||
| 65 | this.Run(); | ||
| 66 | } | ||
| 67 | } | ||
| 68 | } | ||
| 69 | catch (WixException we) | ||
| 70 | { | ||
| 71 | Messaging.Instance.OnMessage(we.Error); | ||
| 72 | } | ||
| 73 | catch (Exception e) | ||
| 74 | { | ||
| 75 | Messaging.Instance.OnMessage(WixErrors.UnexpectedException(e.Message, e.GetType().ToString(), e.StackTrace)); | ||
| 76 | if (e is NullReferenceException || e is SEHException) | ||
| 77 | { | ||
| 78 | throw; | ||
| 79 | } | ||
| 80 | } | ||
| 81 | |||
| 82 | return Messaging.Instance.LastErrorNumber; | ||
| 83 | } | ||
| 84 | |||
| 85 | private string[] ParseCommandLineAndLoadExtensions(string[] args) | ||
| 86 | { | ||
| 87 | this.commandLine = new CandleCommandLine(); | ||
| 88 | string[] unprocessed = commandLine.Parse(args); | ||
| 89 | if (Messaging.Instance.EncounteredError) | ||
| 90 | { | ||
| 91 | return unprocessed; | ||
| 92 | } | ||
| 93 | |||
| 94 | // Load extensions. | ||
| 95 | ExtensionManager extensionManager = new ExtensionManager(); | ||
| 96 | foreach (string extension in this.commandLine.Extensions) | ||
| 97 | { | ||
| 98 | extensionManager.Load(extension); | ||
| 99 | } | ||
| 100 | |||
| 101 | // Preprocessor extension command line processing. | ||
| 102 | this.preprocessorExtensions = extensionManager.Create<IPreprocessorExtension>(); | ||
| 103 | foreach (IExtensionCommandLine pce in this.preprocessorExtensions.Where(e => e is IExtensionCommandLine).Cast<IExtensionCommandLine>()) | ||
| 104 | { | ||
| 105 | pce.MessageHandler = Messaging.Instance; | ||
| 106 | unprocessed = pce.ParseCommandLine(unprocessed); | ||
| 107 | } | ||
| 108 | |||
| 109 | // Compiler extension command line processing. | ||
| 110 | this.compilerExtensions = extensionManager.Create<ICompilerExtension>(); | ||
| 111 | foreach (IExtensionCommandLine cce in this.compilerExtensions.Where(e => e is IExtensionCommandLine).Cast<IExtensionCommandLine>()) | ||
| 112 | { | ||
| 113 | cce.MessageHandler = Messaging.Instance; | ||
| 114 | unprocessed = cce.ParseCommandLine(unprocessed); | ||
| 115 | } | ||
| 116 | |||
| 117 | // Extension data command line processing. | ||
| 118 | this.extensionData = extensionManager.Create<IExtensionData>(); | ||
| 119 | foreach (IExtensionCommandLine dce in this.extensionData.Where(e => e is IExtensionCommandLine).Cast<IExtensionCommandLine>()) | ||
| 120 | { | ||
| 121 | dce.MessageHandler = Messaging.Instance; | ||
| 122 | unprocessed = dce.ParseCommandLine(unprocessed); | ||
| 123 | } | ||
| 124 | |||
| 125 | return commandLine.ParsePostExtensions(unprocessed); | ||
| 126 | } | ||
| 127 | |||
| 128 | private void Run() | ||
| 129 | { | ||
| 130 | // Create the preprocessor and compiler | ||
| 131 | Preprocessor preprocessor = new Preprocessor(); | ||
| 132 | preprocessor.CurrentPlatform = this.commandLine.Platform; | ||
| 133 | |||
| 134 | foreach (string includePath in this.commandLine.IncludeSearchPaths) | ||
| 135 | { | ||
| 136 | preprocessor.IncludeSearchPaths.Add(includePath); | ||
| 137 | } | ||
| 138 | |||
| 139 | foreach (IPreprocessorExtension pe in this.preprocessorExtensions) | ||
| 140 | { | ||
| 141 | preprocessor.AddExtension(pe); | ||
| 142 | } | ||
| 143 | |||
| 144 | Compiler compiler = new Compiler(); | ||
| 145 | compiler.ShowPedanticMessages = this.commandLine.ShowPedanticMessages; | ||
| 146 | compiler.CurrentPlatform = this.commandLine.Platform; | ||
| 147 | |||
| 148 | foreach (IExtensionData ed in this.extensionData) | ||
| 149 | { | ||
| 150 | compiler.AddExtensionData(ed); | ||
| 151 | } | ||
| 152 | |||
| 153 | foreach (ICompilerExtension ce in this.compilerExtensions) | ||
| 154 | { | ||
| 155 | compiler.AddExtension(ce); | ||
| 156 | } | ||
| 157 | |||
| 158 | // Preprocess then compile each source file. | ||
| 159 | foreach (CompileFile file in this.commandLine.Files) | ||
| 160 | { | ||
| 161 | // print friendly message saying what file is being compiled | ||
| 162 | Console.WriteLine(file.SourcePath); | ||
| 163 | |||
| 164 | // preprocess the source | ||
| 165 | XDocument sourceDocument; | ||
| 166 | try | ||
| 167 | { | ||
| 168 | if (!String.IsNullOrEmpty(this.commandLine.PreprocessFile)) | ||
| 169 | { | ||
| 170 | preprocessor.PreprocessOut = this.commandLine.PreprocessFile.Equals("con:", StringComparison.OrdinalIgnoreCase) ? Console.Out : new StreamWriter(this.commandLine.PreprocessFile); | ||
| 171 | } | ||
| 172 | |||
| 173 | sourceDocument = preprocessor.Process(file.SourcePath, this.commandLine.PreprocessorVariables); | ||
| 174 | } | ||
| 175 | finally | ||
| 176 | { | ||
| 177 | if (null != preprocessor.PreprocessOut && Console.Out != preprocessor.PreprocessOut) | ||
| 178 | { | ||
| 179 | preprocessor.PreprocessOut.Close(); | ||
| 180 | } | ||
| 181 | } | ||
| 182 | |||
| 183 | // If we're not actually going to compile anything, move on to the next file. | ||
| 184 | if (null == sourceDocument || !String.IsNullOrEmpty(this.commandLine.PreprocessFile)) | ||
| 185 | { | ||
| 186 | continue; | ||
| 187 | } | ||
| 188 | |||
| 189 | // and now we do what we came here to do... | ||
| 190 | Intermediate intermediate = compiler.Compile(sourceDocument); | ||
| 191 | |||
| 192 | // save the intermediate to disk if no errors were found for this source file | ||
| 193 | if (null != intermediate) | ||
| 194 | { | ||
| 195 | intermediate.Save(file.OutputPath); | ||
| 196 | } | ||
| 197 | } | ||
| 198 | } | ||
| 199 | } | ||
| 200 | } | ||
diff --git a/src/candle/candle.csproj b/src/candle/candle.csproj new file mode 100644 index 00000000..cea0cf62 --- /dev/null +++ b/src/candle/candle.csproj | |||
| @@ -0,0 +1,62 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
| 3 | |||
| 4 | |||
| 5 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> | ||
| 6 | <PropertyGroup> | ||
| 7 | <ProjectGuid>{956401A5-3C04-4786-9611-B2AEC6207686}</ProjectGuid> | ||
| 8 | <AssemblyName>candle</AssemblyName> | ||
| 9 | <OutputType>Exe</OutputType> | ||
| 10 | <RootNamespace>WixToolset.Tools</RootNamespace> | ||
| 11 | <PlatformTarget>x86</PlatformTarget> | ||
| 12 | </PropertyGroup> | ||
| 13 | <ItemGroup> | ||
| 14 | <Compile Include="AssemblyInfo.cs" /> | ||
| 15 | <Compile Include="candle.cs" /> | ||
| 16 | <Compile Include="CandleCommandLine.cs" /> | ||
| 17 | <Compile Include="CompileFile.cs" /> | ||
| 18 | <Compile Include="CandleStrings.Designer.cs"> | ||
| 19 | <AutoGen>True</AutoGen> | ||
| 20 | <DesignTime>True</DesignTime> | ||
| 21 | <DependentUpon>CandleStrings.resx</DependentUpon> | ||
| 22 | </Compile> | ||
| 23 | </ItemGroup> | ||
| 24 | <ItemGroup> | ||
| 25 | <EmbeddedNativeResource Include="candle.rc" /> | ||
| 26 | </ItemGroup> | ||
| 27 | <ItemGroup> | ||
| 28 | <None Include="app.config" /> | ||
| 29 | </ItemGroup> | ||
| 30 | <ItemGroup> | ||
| 31 | <EmbeddedResource Include="CandleStrings.resx"> | ||
| 32 | <SubType>Designer</SubType> | ||
| 33 | <Generator>ResXFileCodeGenerator</Generator> | ||
| 34 | <LastGenOutput>CandleStrings.Designer.cs</LastGenOutput> | ||
| 35 | </EmbeddedResource> | ||
| 36 | </ItemGroup> | ||
| 37 | <ItemGroup> | ||
| 38 | <Service Include="{B4F97281-0DBD-4835-9ED8-7DFB966E87FF}" /> | ||
| 39 | </ItemGroup> | ||
| 40 | <ItemGroup> | ||
| 41 | <Reference Include="System" /> | ||
| 42 | <Reference Include="System.Xml" /> | ||
| 43 | <ProjectReference Include="..\..\libs\WixToolset.Data\WixToolset.Data.csproj"> | ||
| 44 | <Project>{6a98499e-40ec-4335-9c31-96a2511d47c6}</Project> | ||
| 45 | <Name>WixToolset.Data</Name> | ||
| 46 | </ProjectReference> | ||
| 47 | <ProjectReference Include="..\..\libs\WixToolset.Extensibility\WixToolset.Extensibility.csproj"> | ||
| 48 | <Project>{eee88c2a-45a0-4e48-a40a-431a4ba458d8}</Project> | ||
| 49 | <Name>WixToolset.Extensibility</Name> | ||
| 50 | </ProjectReference> | ||
| 51 | <ProjectReference Include="..\wconsole\wconsole.csproj"> | ||
| 52 | <Project>{4B2BD779-59F7-4BF1-871C-A75952BCA749}</Project> | ||
| 53 | <Name>wconsole</Name> | ||
| 54 | </ProjectReference> | ||
| 55 | <ProjectReference Include="..\wix\Wix.csproj"> | ||
| 56 | <Project>{9E03A94C-C70E-45C6-A269-E737BBD8B319}</Project> | ||
| 57 | <Name>Wix</Name> | ||
| 58 | </ProjectReference> | ||
| 59 | <Reference Include="System.Xml.Linq" /> | ||
| 60 | </ItemGroup> | ||
| 61 | <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), wix.proj))\tools\WixBuild.targets" /> | ||
| 62 | </Project> | ||
diff --git a/src/candle/candle.exe.manifest b/src/candle/candle.exe.manifest new file mode 100644 index 00000000..b05ab18b --- /dev/null +++ b/src/candle/candle.exe.manifest | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
| 2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
| 3 | |||
| 4 | |||
| 5 | <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> | ||
| 6 | <assemblyIdentity name="WixToolset.Tools.Candle" version="2.0.0.0" processorArchitecture="x86" type="win32"/> | ||
| 7 | <description>WiX Toolset Compiler</description> | ||
| 8 | <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"><security><requestedPrivileges><requestedExecutionLevel level="asInvoker" uiAccess="false"/></requestedPrivileges></security></trustInfo> | ||
| 9 | </assembly> | ||
diff --git a/src/candle/candle.rc b/src/candle/candle.rc new file mode 100644 index 00000000..47864811 --- /dev/null +++ b/src/candle/candle.rc | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 2 | |||
| 3 | #define VER_APP | ||
| 4 | #define VER_ORIGINAL_FILENAME "candle.exe" | ||
| 5 | #define VER_INTERNAL_NAME "candle" | ||
| 6 | #define VER_FILE_DESCRIPTION "WiX Toolset Compiler" | ||
| 7 | #include "wix.rc" | ||
| 8 | |||
| 9 | #define MANIFEST_RESOURCE_ID 1 | ||
| 10 | MANIFEST_RESOURCE_ID RT_MANIFEST "candle.exe.manifest" | ||
