2016-11-13 00:49:03 +00:00
|
|
|
using System;
|
|
|
|
using System.IO;
|
|
|
|
|
2012-11-02 05:33:33 +00:00
|
|
|
static class VersionInfo
|
|
|
|
{
|
2016-10-22 16:57:54 +00:00
|
|
|
public const string MAINVERSION = "1.11.8"; // Use numbers only or the new version notification won't work
|
|
|
|
public static readonly string RELEASEDATE = "October 22, 2016";
|
2016-09-02 15:48:01 +00:00
|
|
|
public static readonly bool DeveloperBuild = true;
|
2015-01-04 15:04:44 +00:00
|
|
|
public static readonly string HomePage = "http://tasvideos.org/BizHawk.html";
|
2013-11-10 02:55:11 +00:00
|
|
|
|
2016-11-13 00:49:03 +00:00
|
|
|
public static readonly string CustomBuildString;
|
|
|
|
|
2013-11-15 14:14:24 +00:00
|
|
|
public static string GetEmuVersion()
|
2013-11-10 02:55:11 +00:00
|
|
|
{
|
2015-10-04 01:26:30 +00:00
|
|
|
return DeveloperBuild ? ("GIT " + SubWCRev.GIT_BRANCH + "#" + SubWCRev.GIT_SHORTHASH) : ("Version " + MAINVERSION);
|
2013-11-10 02:55:11 +00:00
|
|
|
}
|
2016-11-13 00:49:03 +00:00
|
|
|
|
|
|
|
static VersionInfo()
|
|
|
|
{
|
|
|
|
string path = Path.Combine(GetExeDirectoryAbsolute(),"dll");
|
|
|
|
path = Path.Combine(path,"custombuild.txt");
|
|
|
|
if(File.Exists(path))
|
|
|
|
{
|
|
|
|
var lines = File.ReadAllLines(path);
|
|
|
|
if (lines.Length > 0)
|
|
|
|
CustomBuildString = lines[0];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//code copied to avoid depending on code in otherp rojects
|
|
|
|
static string GetExeDirectoryAbsolute()
|
|
|
|
{
|
|
|
|
var path = Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location);
|
|
|
|
if (path.EndsWith(Path.DirectorySeparatorChar.ToString()))
|
|
|
|
path = path.Remove(path.Length - 1, 1);
|
|
|
|
|
|
|
|
return path;
|
|
|
|
}
|
2015-12-20 20:44:50 +00:00
|
|
|
}
|