예제 #1
0
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        /// <param name="args">Arguments to decompiler.</param>
        /// <returns>0 if sucessful, otherwise 1.</returns>
        public static int Main(string[] args)
        {
            AppCommon.PrepareConsoleForLocalization();
            Dark dark = new Dark();

            return(dark.Run(args));
        }
예제 #2
0
        /// <summary>
        /// Runs the WIX Dark utility, which reverse-engineers a .msi installer or .msm
        /// merge module into WIX source XML.
        /// </summary>
        /// <param name="installerFilePath">(Relative) path to installer or merge module</param>
        /// <returns>WIX source XML object</returns>
        private static XmlDocument Dark(string installerFilePath)
        {
            var args = new string[2];
            args[0] = installerFilePath;
            // Output WIX source to temporary file:
            args[1] = "___Temp.wxs";

            var dark = new Dark();
            var retVal = dark.Run(args);

            if (retVal != 0)
                throw new Exception("Running Dark with file '" + installerFilePath + "' exited with error " + retVal);

            // Load temporary file into XML object:
            var xmlDoc = new XmlDocument();
            xmlDoc.Load(args[1]);

            // Delete temporary file:
            File.Delete(args[1]);

            return xmlDoc;
        }
예제 #3
0
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        /// <param name="args">Arguments to decompiler.</param>
        /// <returns>0 if sucessful, otherwise 1.</returns>
        public static int Main(string[] args)
        {
            Dark dark = new Dark();

            return(dark.Run(args));
        }
예제 #4
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 /// <param name="args">Arguments to decompiler.</param>
 /// <returns>0 if sucessful, otherwise 1.</returns>
 public static int Main(string[] args)
 {
     AppCommon.PrepareConsoleForLocalization();
     Dark dark = new Dark();
     return dark.Run(args);
 }
예제 #5
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 /// <param name="args">Arguments to decompiler.</param>
 /// <returns>0 if sucessful, otherwise 1.</returns>
 public static int Main(string[] args)
 {
     Dark dark = new Dark();
     return dark.Run(args);
 }