Esempio n. 1
0
        //========= CONSTRUCTORS =========
        #region Constructors

        /**<summary>Extracts and loads the xcompress dll.</summary>*/
        static XCompress()
        {
            try {
                EmbeddedResources.Extract(TempXCompressDll, Resources.xcompress32);
                EmbeddedResources.LoadDll(TempXCompressDll);
                Compress(new byte[1]);
                IsAvailable = true;
            }
            catch (DllNotFoundException) {
                IsAvailable = false;
            }
        }
        //--------------------------------
        #region Required Files

        /**<summary>Copies the required dlls and files to the Terraria folder.</summary>*/
        private static void CopyRequiredFiles()
        {
            try {
                foreach (string file in RequireFiles)
                {
                    //string source = Path.Combine(AppDirectory, file);
                    string destination = Path.Combine(ExeDirectory, file);
                    //File.Copy(source, destination, true);
                    EmbeddedResources.Extract(destination, file);
                }
            }
            catch (Exception ex) {
                throw new IOException("Error while trying to copy over required files.", ex);
            }
        }
Esempio n. 3
0
 static Ws2811()
 {
     // Extraction of embedded resources
     EmbeddedResources.Extract(ws2811Library, Standard.UserLibDirectory, executable: true);
 }
Esempio n. 4
0
        //========= CONSTRUCTORS =========
        #region Constructors

        /**<summary>Extracts FFmpeg.</summary>*/
        static FFmpeg()
        {
            EmbeddedResources.Extract(TempFFmpeg, Resources.ffmpeg);
        }