예제 #1
0
		public static string Download(Release R, string FileName, bool Replace = true) {
			FileName = Path.Combine(ExeDir, FileName);

			if (File.Exists(FileName)) {
				if (Replace)
					File.Delete(FileName);
				else
					throw new Exception("File exists " + FileName);
			}
			WebClient WC = new WebClient();
			WC.DownloadFile(R.assets[0].browser_download_url, FileName);
			return Path.GetFullPath(FileName);
		}
예제 #2
0
		public static void UpdateTo(Release Rel) {
			CreateAndExecUpdateBatch(Unzip(Download(Rel, "__latest.zip"), "__latest"), "Upd.bat");
		}