move emuversion, releasedate, and interim constants from MainForm to VersionInfo so that they are available to all projects (we can now "interim" things in all projects)
This commit is contained in:
parent
fa35f3fef4
commit
9e5e477467
|
@ -23,15 +23,15 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void BizBox_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (MainForm.INTERIM)
|
||||
if (VersionInfo.INTERIM)
|
||||
{
|
||||
Text = " BizHawk (SVN r" + SubWCRev.SVN_REV + ")";
|
||||
}
|
||||
else
|
||||
{
|
||||
Text = MainForm.EMUVERSION;
|
||||
Text = "Version " + VersionInfo.MAINVERSION;
|
||||
}
|
||||
VersionLabel.Text = MainForm.EMUVERSION + " Released " + MainForm.RELEASEDATE;
|
||||
VersionLabel.Text = "Version " + VersionInfo.MAINVERSION + " Released " + VersionInfo.RELEASEDATE;
|
||||
}
|
||||
|
||||
private void linkLabel3_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||
|
|
|
@ -1763,7 +1763,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void AboutMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (INTERIM)
|
||||
if (VersionInfo.INTERIM)
|
||||
{
|
||||
new AboutBox().ShowDialog();
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void MainForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
Text = "BizHawk" + (INTERIM ? " (interim) " : "");
|
||||
Text = "BizHawk" + (VersionInfo.INTERIM ? " (interim) " : "");
|
||||
|
||||
//Hide Status bar icons
|
||||
PlayRecordStatusButton.Visible = false;
|
||||
|
@ -314,10 +314,9 @@ namespace BizHawk.Client.EmuHawk
|
|||
PauseEmulator();
|
||||
}
|
||||
|
||||
if (!INTERIM)
|
||||
if (!VersionInfo.INTERIM)
|
||||
{
|
||||
NESDebuggerMenuItem.Enabled = false;
|
||||
//luaConsoleToolStripMenuItem.Enabled = false;
|
||||
}
|
||||
|
||||
// start dumping, if appropriate
|
||||
|
@ -400,9 +399,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
#region Properties
|
||||
|
||||
public static bool INTERIM = true;
|
||||
public const string EMUVERSION = "Version " + VersionInfo.MAINVERSION;
|
||||
public const string RELEASEDATE = "August 22, 2013";
|
||||
public string CurrentlyOpenRom;
|
||||
public bool PauseAVI = false;
|
||||
public bool PressFrameAdvance = false;
|
||||
|
@ -1591,7 +1587,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
case "DGB": str = "Game Boy Link"; break;
|
||||
}
|
||||
|
||||
if (INTERIM) str += " (interim)";
|
||||
if (VersionInfo.INTERIM) str += " (interim)";
|
||||
return str;
|
||||
}
|
||||
|
||||
|
@ -2027,7 +2023,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
var ofd = new OpenFileDialog { InitialDirectory = PathManager.GetRomsPath(Global.Emulator.SystemId) };
|
||||
|
||||
//adelikat: ugly design for this, I know
|
||||
if (INTERIM)
|
||||
if (VersionInfo.INTERIM)
|
||||
{
|
||||
ofd.Filter = FormatFilter(
|
||||
"Rom Files", "*.nes;*.fds;*.sms;*.gg;*.sg;*.pce;*.sgx;*.bin;*.smd;*.rom;*.a26;*.a78;*.cue;*.exe;*.gb;*.gbc;*.gen;*.md;*.col;.int;*.smc;*.sfc;*.prg;*.d64;*.g64;*.crt;*.sgb;*.xml;*.z64;*.v64;*.n64;%ARCH%",
|
||||
|
@ -2971,9 +2967,9 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
#region Scheduled for refactor
|
||||
|
||||
public string GetEmuVersion() //This and EMUVERSION don't need to be on mainform
|
||||
public string GetEmuVersion() //This doesn't need to be on mainform
|
||||
{
|
||||
return INTERIM ? "SVN " + SubWCRev.SVN_REV : EMUVERSION;
|
||||
return VersionInfo.INTERIM ? "SVN " + SubWCRev.SVN_REV : ("Version " + VersionInfo.MAINVERSION);
|
||||
}
|
||||
|
||||
private void NESSpeicalMenuAdd(string name, string button, string msg) //TODO: don't do this, put these into the menu but hide them in the dropdownopened event as needed
|
||||
|
@ -3483,7 +3479,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
nextEmulator = c64;
|
||||
break;
|
||||
case "GBA":
|
||||
if (INTERIM)
|
||||
if (VersionInfo.INTERIM)
|
||||
{
|
||||
string gbabiospath = Global.FirmwareManager.Request("GBA", "Bios");
|
||||
byte[] gbabios;
|
||||
|
@ -3746,7 +3742,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
RewireSound();
|
||||
ResetRewindBuffer();
|
||||
Cheats_Restart();
|
||||
Text = "BizHawk" + (INTERIM ? " (interim) " : "");
|
||||
Text = "BizHawk" + (VersionInfo.INTERIM ? " (interim) " : String.Empty);
|
||||
HandlePlatformMenus();
|
||||
StateSlots.Clear();
|
||||
UpdateDumpIcon();
|
||||
|
|
|
@ -50,7 +50,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
// this check has to be done VERY early. i stepped through a debug build with wrong .dll versions purposely used,
|
||||
// and there was a TypeLoadException before the first line of SubMain was reached (some static ColorType init?)
|
||||
// zero 25-dec-2012 - only do for public builds. its annoying during development
|
||||
if (!MainForm.INTERIM)
|
||||
if (!VersionInfo.INTERIM)
|
||||
{
|
||||
var thisversion = typeof(Program).Assembly.GetName().Version;
|
||||
var utilversion = Assembly.LoadWithPartialName("Bizhawk.Client.Common").GetName().Version;
|
||||
|
|
|
@ -146,8 +146,10 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
SetControllerPicture(def.Name);
|
||||
|
||||
if (!MainForm.INTERIM)
|
||||
if (!VersionInfo.INTERIM)
|
||||
{
|
||||
buttonSaveDefaults.Hide();
|
||||
}
|
||||
|
||||
ResumeLayout();
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void LockDownCores()
|
||||
{
|
||||
if (!MainForm.INTERIM)
|
||||
if (!VersionInfo.INTERIM)
|
||||
{
|
||||
string[] coresToHide = { "PSX", "GBA", "INTV", "C64", "GEN" };
|
||||
|
||||
|
|
|
@ -112,10 +112,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
newStripButton1.Visible = MainForm.INTERIM;
|
||||
newScriptToolStripMenuItem.Visible = MainForm.INTERIM;
|
||||
newStripButton1.Enabled = MainForm.INTERIM;
|
||||
newScriptToolStripMenuItem.Enabled = MainForm.INTERIM;
|
||||
newStripButton1.Visible = VersionInfo.INTERIM;
|
||||
newScriptToolStripMenuItem.Visible = VersionInfo.INTERIM;
|
||||
}
|
||||
|
||||
private void StopScript(int x)
|
||||
|
@ -668,7 +666,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void EditToolstripButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (MainForm.INTERIM)
|
||||
if (VersionInfo.INTERIM)
|
||||
{
|
||||
DoLuaWriter();
|
||||
}
|
||||
|
|
|
@ -175,7 +175,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void TAStudio_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!MainForm.INTERIM)
|
||||
if (!VersionInfo.INTERIM)
|
||||
{
|
||||
newProjectToolStripMenuItem.Enabled = false;
|
||||
openProjectToolStripMenuItem.Enabled = false;
|
||||
|
|
|
@ -29,6 +29,7 @@ namespace BizHawk.Emulation.Common
|
|||
{
|
||||
new MemoryDomain("Main RAM", 1, MemoryDomain.Endian.Little, addr => 0, (a, v) => { })
|
||||
});
|
||||
memoryDomains = new MemoryDomainList(domains);
|
||||
}
|
||||
public void ResetCounters()
|
||||
{
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
static class VersionInfo
|
||||
{
|
||||
public const string MAINVERSION = "1.5.2";
|
||||
public const string RELEASEDATE = "August 22, 2013";
|
||||
public static bool INTERIM = true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue