using System.Reflection; using System; using System.Text.RegularExpressions; using System.Linq; using UnityEngine; using Perforce.P4; namespace P4Connect { /// <summary> /// Version wrappers for P4Connect /// </summary> public static class Version { public static string appName = "p4connect"; public static string perforceRelease = "2016.1.00.0000"; // Cache _PerforceReleaseString for re-use private static string _PerforceReleaseString = null; private static string _BuildType = ""; private static string _BuildString = ""; private static string changeIdStr; #if DEBUG private static string _build = "Debug"; #else private static string _build = "Release"; #endif public static string Build { get { if (_BuildString != null) { _BuildString = _build; } return _BuildString; } } public static string ChangeId { get { string change = " $Change: 21852 $"; // File must be stored +k so the RCS Keyword expands if (String.IsNullOrEmpty(changeIdStr)) { changeIdStr = Regex.Match(change, @"\d+").Value; } return changeIdStr; } } public static string PerforceReleaseString { get { if (_PerforceReleaseString != null) return _PerforceReleaseString; char[] delims = { '.' }; string[] fields = perforceRelease.Split(delims); // If UpdateVersion.exe is missing, perforceRelease will be unchanged, // so we instead generate the last two version fields from the contents of the "Change" RCS Keyword if (fields[2].Equals("0") && fields[3].Equals("0") && ChangeId.ToCharArray().Any(char.IsDigit)) { // Convert change ID into last two fields of version string. each field is limited to 16 bits, so we split values so they look appropriate in decimal. int changeId = Convert.ToInt32(ChangeId); fields[2] = (changeId / 10000).ToString(); fields[3] = (changeId % 10000).ToString(); _BuildType = "W"; // Mark workshop builds } _PerforceReleaseString = string.Join(".",fields) + _BuildType; return _PerforceReleaseString; } } static Options NameVerOpts = null; // Create an Array of options for the Connect call. You can see these in the Perforce server log public static Options ConnectOptions { get { if (NameVerOpts == null) { NameVerOpts = new Options(); NameVerOpts.Add("ProgramName", appName); NameVerOpts.Add("ProgramVersion", PerforceReleaseString); } return NameVerOpts; } } } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 21852 | cswiedler | Branch //guest/cswiedler/p4connect | ||
//guest/perforce_software/p4connect/main/src/P4Connect/P4Connect/P4Connect.VersionInfo.cs | |||||
#7 | 20581 | Norman Morse |
Add P4Connect.Skin Fixed issues in ChangeManager Renamed ChangeLists to ChangeListsWindow. |
||
#6 | 20275 | Norman Morse |
Update source to match 2016.2 patch 2 release Much thrashing of source during refactor. Proper caching of asset statuses, reducing fstats issued. Some bug fixes by Liz Lam Cleanup of Pending changes, rework of initialization and play/stop play transitions |
||
#5 | 19279 | Norman Morse |
Update workshop from internal changes. These Changes are the basis of the 2016.2 release - Dropped support for Unity 4 - Built in Unity 5 - Fixed assembly misidentifications. - Fixed problem where configuration dialog would pop up between runs |
||
#4 | 18665 | Norman Morse | 16.2 preparation checkin | ||
#3 | 18462 | Norman Morse |
Final Changes needed for 2016.1 release New Icons. New Icon Packaging. Unity 4 compatibility changes. |
||
#2 | 18418 | Norman Morse |
Many changes from the dev branch. Icons are packaged differently. Style Sheet is created / used New ConnectionWizard Dialog New PasswordDialog Generate -a tickets Update version to 2016.1.0.0 |
||
#1 | 16209 | Norman Morse | Move entire source tree into "main" branch so workshop code will act correctly. | ||
//guest/perforce_software/p4connect/src/P4Connect/P4Connect/P4Connect.VersionInfo.cs | |||||
#22 | 16163 | Norman Morse |
Import latest changes from 2015.2/1245676 Fixes disconnect issue on "run" Fixes SSL versioning problem on OSX Added VS2015 support to project files |
||
#21 | 15383 | Norman Morse |
Improved Diagnostics, cleaned up unnecessary log output Moved some Dialog Initialization to OnEnable() Fixed Unity 5.1.1 incompatibilities Added Operation support for In Depot Deleted files |
||
#20 | 15300 | Norman Morse | Change version string to use '-' hyphen before the build type | ||
#19 | 15298 | Norman Morse | Fix Version Stamping to not use UpdateVersion.exe for personal (workshop) builds. | ||
#18 | 15266 | Norman Morse |
Integrated "UpdateVersion" tool to update the VersionInfo and the DLL properties with information from "Version" EC generates the Version file for us in builds. Workshop users need to generate their own Release number with two zeros (like 2015.2.0.0) which will have the last two numbers replaced with change ID. |
||
#17 | 15256 | Norman Morse | Make these files writeable in the workspace, so they can be modified in a pre build hook. | ||
#16 | 15245 | Norman Morse |
Missed a couple files. Bumped version to 2.8 2015.2 |
||
#15 | 14801 | Norman Morse |
GA.9 changes. Fixed debug message exceptions Improved Pending Changes dialog for large changesets Changed configuration to allow saving configuration with Perforce disabled. Improved restart after recompile, automatically attempts connection now unless disabled. |
||
#14 | 14232 | Norman Morse | GA.8 release | ||
#13 | 14193 | Norman Morse |
GA.7 release Refactor Pending Changes Resolve Submit issues. Fixed Menu entries. Handle mismatched file and meta states. |
||
#12 | 14007 | Norman Morse |
Bump release to GA.6 Fixes problem accessing Unicode server on OSX |
||
#11 | 13814 | Norman Morse | Upped version to GA.5 | ||
#10 | 13693 | Norman Morse |
Updated release notes and version. GA.4 it is |
||
#9 | 13596 | Norman Morse |
GA.3 fixes Update release notes. Fix config dialog initialization, update version Disable warnings for PackageIcons.cs, Fix crash in GetLockState() call |
||
#8 | 13269 | Norman Morse |
Bumped version to 2.7 GA 2 Fixed problem with Hung Config Window and no previous settings Fixed code to automattically attempt to connect to Perforce Server if configuration allows. |
||
#7 | 12945 | Norman Morse | Changes from internal main GA.1 | ||
#6 | 12566 | Norman Morse |
Fixed hang when restarting after rebuild Updated Release String to GA |
||
#5 | 12553 | Norman Morse |
integrate from internal main Build fixes for EC. Major changes to Configuration and re-initialization code. Bug fixes |
||
#4 | 12512 | Norman Morse | Integrate from Dev branch, preparing for Beta3 release | ||
#3 | 12252 | Norman Morse |
2.7 Beta2 release unitypackages. Updated version file. |
||
#2 | 12251 | Norman Morse |
Fixes for Beta 2 release Mostly Configuration dialog bug fixes |
||
#1 | 12135 | Norman Morse |
Integrate dev branch changes into main. This code is the basiis of the 2.7 BETA release which provides Unity 5 compatibility |
||
//guest/norman_morse/dev/p4connect/src/P4Connect/P4Connect/P4Connect.VersionInfo.cs | |||||
#5 | 12101 | Norman Morse |
Additional movement towards Unity 5. Still gettting DllNotFound exceptions in 5 |
||
#4 | 12099 | Norman Morse |
Various changes to prepare for Beta Fixed VersionInfo to show changeID Added "additional ignore in config". Updated ReleaseNotes |
||
#3 | 12088 | Norman Morse | Fix RCS keyword | ||
#2 | 11896 | Norman Morse | Checkin of Version file | ||
#1 | 11403 | Norman Morse | Add version module to P4Connect |