/// <summary>
		/// Updates the minor version in the CFBundleVersion key of the specified PList if this is a new package.
		/// Also updates the key EpicAppVersion with the bundle version and the current date/time (no year)
		/// </summary>
		public static void UpdateMinorVersion(Utilities.PListHelper PList)
		{
			string CFBundleVersion;
			if (PList.GetString("CFBundleVersion", out CFBundleVersion))
			{
				string UpdatedValue = CalculateUpdatedMinorVersionString(CFBundleVersion);
				Program.Log("Found CFBundleVersion string '{0}' and updated it to '{1}'", CFBundleVersion, UpdatedValue);
				PList.SetString("CFBundleVersion", UpdatedValue);
			}
			else
			{
				CFBundleVersion = "0.0";
			}

			// Write a second key with the packaging date/time in it
			string PackagingTime = DateTime.Now.ToString(@"MM-dd HH:mm");
			PList.SetString("EpicAppVersion", CFBundleVersion + " " + PackagingTime);
		}
Exemple #2
0
        /// <summary>
        /// Updates the version string and then applies the settings in the user overrides plist
        /// </summary>
        /// <param name="Info"></param>
        public static void UpdateVersion(Utilities.PListHelper Info)
        {
            // Update the minor version number if the current one is older than the version tracker file
            // Assuming that the version will be set explicitly in the overrides file for distribution
            VersionUtilities.UpdateMinorVersion(Info);

            // Mark the type of build (development or distribution)
            Info.SetString("EpicPackagingMode", Config.bForDistribution ? "Distribution" : "Development");
        }
		private void SavePList(Utilities.PListHelper Helper, string Filename)
		{
			FileInfo DestInfo = new FileInfo(Filename);
			if (DestInfo.Exists && DestInfo.IsReadOnly)
			{
				DestInfo.IsReadOnly = false;
			}
			Helper.SaveToFile(Filename);
		}