Ejemplo n.º 1
0
        /// <summary>
        /// IInitializes the SFX Creation Process.
        /// </summary>
        /// <returns>The directory that the Source is unpacked to.</returns>
        private static string InitializeSFXSource()
        {
#if DEBUG
            string path = Path.GetFullPath(".\\sfx\\");
#else
            string path = Path.Combine(Path.GetTempPath(), Path.GetFileNameWithoutExtension(Path.GetTempFileName())) + "\\";
#endif
            Directory.CreateDirectory(path);
            Stream s = Assembly.GetExecutingAssembly().GetManifestResourceStream("Byt3.Archive.content.sfx-src.arch");
            if (s == null)
            {
                throw new Exception("This Version of Byt3.Archive was compiled without SFX Source.");
            }
            Archiver a = new Archiver(s, false);
            a.Extract(path);
            a.Dispose();
            return(path);
        }