public static void FileDownload(string url, string file, ExternalMinecraftLauncher.WischiLauncherMainForm form = null)
        {
            if (File.Exists(file)) return;
            Debug.WriteLine(file);
            if (form != null) form.AddConsoleLine("download: " + Path.GetFileName(file));

            string dir = Path.GetDirectoryName(file);
            if (!Directory.Exists(dir)) Directory.CreateDirectory(dir);
            FileStream fs = new FileStream(file, FileMode.Create, FileAccess.Write);
            WebRequest req_inner = WebRequest.Create(url);
            Stream resourceread = req_inner.GetResponse().GetResponseStream();
            byte[] Buffer = new byte[1024 * 1024];
            int written;
            while ((written = resourceread.Read(Buffer, 0, Buffer.Length)) > 0)
            {
                fs.Write(Buffer, 0, written);
            }

            fs.Close();
            resourceread.Close();
        }
        public static void DownloadBins(string binfolder,ExternalMinecraftLauncher.WischiLauncherMainForm form=null)
        {
            #region lwjgl_util.jar
            FileDownload("http://dev.wischenbart.org/minecraft/bin/lwjgl_util.jar", binfolder + Path.DirectorySeparatorChar + "lwjgl_util.jar",form);
            FileDownload("http://dev.wischenbart.org/minecraft/bin/jinput.jar", binfolder + Path.DirectorySeparatorChar + "jinput.jar", form);
            FileDownload("http://dev.wischenbart.org/minecraft/bin/lwjgl.jar", binfolder + Path.DirectorySeparatorChar + "lwjgl.jar", form);

            //natives
            FileDownload("http://dev.wischenbart.org/minecraft/bin/natives/jinput-raw.dll", binfolder + Path.DirectorySeparatorChar + "natives" + Path.DirectorySeparatorChar + "jinput-raw.dll", form);
            FileDownload("http://dev.wischenbart.org/minecraft/bin/natives/jinput-dx8.dll", binfolder + Path.DirectorySeparatorChar + "natives" + Path.DirectorySeparatorChar + "jinput-dx8.dll", form);
            FileDownload("http://dev.wischenbart.org/minecraft/bin/natives/jinput-raw_64.dll", binfolder + Path.DirectorySeparatorChar + "natives" + Path.DirectorySeparatorChar + "jinput-raw_64.dll", form);
            FileDownload("http://dev.wischenbart.org/minecraft/bin/natives/jinput-dx8_64.dll", binfolder + Path.DirectorySeparatorChar + "natives" + Path.DirectorySeparatorChar + "jinput-dx8_64.dll", form);
            FileDownload("http://dev.wischenbart.org/minecraft/bin/natives/OpenAL32.dll", binfolder + Path.DirectorySeparatorChar + "natives" + Path.DirectorySeparatorChar + "OpenAL32.dll", form);
            FileDownload("http://dev.wischenbart.org/minecraft/bin/natives/lwjgl.dll", binfolder + Path.DirectorySeparatorChar + "natives" + Path.DirectorySeparatorChar + "lwjgl.dll", form);
            FileDownload("http://dev.wischenbart.org/minecraft/bin/natives/OpenAL64.dll", binfolder + Path.DirectorySeparatorChar + "natives" + Path.DirectorySeparatorChar + "OpenAL64.dll", form);
            FileDownload("http://dev.wischenbart.org/minecraft/bin/natives/lwjgl64.dll", binfolder + Path.DirectorySeparatorChar + "natives" + Path.DirectorySeparatorChar + "lwjgl64.dll", form);

            #endregion
        }