Add HelloWorld tool to repo, add build scripts, fix bugs in HelloWorld
This commit is contained in:
parent
ce7d6cdcf5
commit
692eb5ea89
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="$(basename "$PWD").dll"
|
||||||
|
CscToolExe="$(which csc)" dotnet build -c Debug -m && cp -f "bin/Debug/$name" "../../output/ExternalTools/$name"
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="$(basename "$PWD").dll"
|
||||||
|
CscToolExe="$(which csc)" dotnet build -c Release -m && cp -f "bin/Release/$name" "../../output/ExternalTools/$name"
|
|
@ -0,0 +1,195 @@
|
||||||
|
namespace BizHawk.Client.EmuHawk
|
||||||
|
{
|
||||||
|
public partial class CustomMainForm
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.label_Watch1 = new System.Windows.Forms.Label();
|
||||||
|
this.label_Watch2 = new System.Windows.Forms.Label();
|
||||||
|
this.label_Watch3 = new System.Windows.Forms.Label();
|
||||||
|
this.label_Game = new System.Windows.Forms.Label();
|
||||||
|
this.button1 = new System.Windows.Forms.Button();
|
||||||
|
this.label_GameHash = new System.Windows.Forms.Label();
|
||||||
|
this.button2 = new System.Windows.Forms.Button();
|
||||||
|
this.button3 = new System.Windows.Forms.Button();
|
||||||
|
this.savestateLabel = new System.Windows.Forms.Label();
|
||||||
|
this.savestateName = new System.Windows.Forms.TextBox();
|
||||||
|
this.saveState = new System.Windows.Forms.Button();
|
||||||
|
this.loadstate = new System.Windows.Forms.Button();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// label_Watch1
|
||||||
|
//
|
||||||
|
this.label_Watch1.AutoSize = true;
|
||||||
|
this.label_Watch1.Location = new System.Drawing.Point(12, 57);
|
||||||
|
this.label_Watch1.Name = "label_Watch1";
|
||||||
|
this.label_Watch1.Size = new System.Drawing.Size(35, 13);
|
||||||
|
this.label_Watch1.TabIndex = 0;
|
||||||
|
this.label_Watch1.Text = "label1";
|
||||||
|
//
|
||||||
|
// label_Watch2
|
||||||
|
//
|
||||||
|
this.label_Watch2.AutoSize = true;
|
||||||
|
this.label_Watch2.Location = new System.Drawing.Point(12, 79);
|
||||||
|
this.label_Watch2.Name = "label_Watch2";
|
||||||
|
this.label_Watch2.Size = new System.Drawing.Size(35, 13);
|
||||||
|
this.label_Watch2.TabIndex = 1;
|
||||||
|
this.label_Watch2.Text = "label2";
|
||||||
|
//
|
||||||
|
// label_Watch3
|
||||||
|
//
|
||||||
|
this.label_Watch3.AutoSize = true;
|
||||||
|
this.label_Watch3.Location = new System.Drawing.Point(12, 102);
|
||||||
|
this.label_Watch3.Name = "label_Watch3";
|
||||||
|
this.label_Watch3.Size = new System.Drawing.Size(35, 13);
|
||||||
|
this.label_Watch3.TabIndex = 2;
|
||||||
|
this.label_Watch3.Text = "label3";
|
||||||
|
//
|
||||||
|
// label_Game
|
||||||
|
//
|
||||||
|
this.label_Game.AutoSize = true;
|
||||||
|
this.label_Game.Location = new System.Drawing.Point(13, 13);
|
||||||
|
this.label_Game.Name = "label_Game";
|
||||||
|
this.label_Game.Size = new System.Drawing.Size(35, 13);
|
||||||
|
this.label_Game.TabIndex = 3;
|
||||||
|
this.label_Game.Text = "label4";
|
||||||
|
//
|
||||||
|
// button1
|
||||||
|
//
|
||||||
|
this.button1.Location = new System.Drawing.Point(176, 226);
|
||||||
|
this.button1.Name = "button1";
|
||||||
|
this.button1.Size = new System.Drawing.Size(96, 23);
|
||||||
|
this.button1.TabIndex = 4;
|
||||||
|
this.button1.Text = "Frame Advance";
|
||||||
|
this.button1.UseVisualStyleBackColor = true;
|
||||||
|
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||||
|
//
|
||||||
|
// label_GameHash
|
||||||
|
//
|
||||||
|
this.label_GameHash.AutoSize = true;
|
||||||
|
this.label_GameHash.Location = new System.Drawing.Point(13, 35);
|
||||||
|
this.label_GameHash.Name = "label_GameHash";
|
||||||
|
this.label_GameHash.Size = new System.Drawing.Size(35, 13);
|
||||||
|
this.label_GameHash.TabIndex = 5;
|
||||||
|
this.label_GameHash.Text = "label5";
|
||||||
|
//
|
||||||
|
// button2
|
||||||
|
//
|
||||||
|
this.button2.Location = new System.Drawing.Point(72, 197);
|
||||||
|
this.button2.Name = "button2";
|
||||||
|
this.button2.Size = new System.Drawing.Size(98, 23);
|
||||||
|
this.button2.TabIndex = 6;
|
||||||
|
this.button2.Text = "Current Buttons";
|
||||||
|
this.button2.UseVisualStyleBackColor = true;
|
||||||
|
this.button2.Click += new System.EventHandler(this.button2_Click);
|
||||||
|
//
|
||||||
|
// button3
|
||||||
|
//
|
||||||
|
this.button3.Location = new System.Drawing.Point(72, 226);
|
||||||
|
this.button3.Name = "button3";
|
||||||
|
this.button3.Size = new System.Drawing.Size(98, 23);
|
||||||
|
this.button3.TabIndex = 7;
|
||||||
|
this.button3.Text = "10 A Press";
|
||||||
|
this.button3.UseVisualStyleBackColor = true;
|
||||||
|
this.button3.Click += new System.EventHandler(this.button3_Click);
|
||||||
|
//
|
||||||
|
// savestateLabel
|
||||||
|
//
|
||||||
|
this.savestateLabel.AutoSize = true;
|
||||||
|
this.savestateLabel.Location = new System.Drawing.Point(12, 119);
|
||||||
|
this.savestateLabel.Name = "savestateLabel";
|
||||||
|
this.savestateLabel.Size = new System.Drawing.Size(87, 13);
|
||||||
|
this.savestateLabel.TabIndex = 8;
|
||||||
|
this.savestateLabel.Text = "Savestate name:";
|
||||||
|
//
|
||||||
|
// savestateName
|
||||||
|
//
|
||||||
|
this.savestateName.Location = new System.Drawing.Point(106, 116);
|
||||||
|
this.savestateName.Name = "savestateName";
|
||||||
|
this.savestateName.Size = new System.Drawing.Size(75, 20);
|
||||||
|
this.savestateName.TabIndex = 9;
|
||||||
|
//
|
||||||
|
// saveState
|
||||||
|
//
|
||||||
|
this.saveState.Location = new System.Drawing.Point(187, 114);
|
||||||
|
this.saveState.Name = "saveState";
|
||||||
|
this.saveState.Size = new System.Drawing.Size(44, 23);
|
||||||
|
this.saveState.TabIndex = 10;
|
||||||
|
this.saveState.Text = "Save";
|
||||||
|
this.saveState.UseVisualStyleBackColor = true;
|
||||||
|
this.saveState.Click += new System.EventHandler(this.saveState_Click);
|
||||||
|
//
|
||||||
|
// loadstate
|
||||||
|
//
|
||||||
|
this.loadstate.Location = new System.Drawing.Point(237, 114);
|
||||||
|
this.loadstate.Name = "loadstate";
|
||||||
|
this.loadstate.Size = new System.Drawing.Size(46, 23);
|
||||||
|
this.loadstate.TabIndex = 11;
|
||||||
|
this.loadstate.Text = "Load";
|
||||||
|
this.loadstate.UseVisualStyleBackColor = true;
|
||||||
|
this.loadstate.Click += new System.EventHandler(this.loadstate_Click);
|
||||||
|
//
|
||||||
|
// CustomMainForm
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(284, 261);
|
||||||
|
this.Controls.Add(this.loadstate);
|
||||||
|
this.Controls.Add(this.saveState);
|
||||||
|
this.Controls.Add(this.savestateName);
|
||||||
|
this.Controls.Add(this.savestateLabel);
|
||||||
|
this.Controls.Add(this.button3);
|
||||||
|
this.Controls.Add(this.button2);
|
||||||
|
this.Controls.Add(this.label_GameHash);
|
||||||
|
this.Controls.Add(this.button1);
|
||||||
|
this.Controls.Add(this.label_Game);
|
||||||
|
this.Controls.Add(this.label_Watch3);
|
||||||
|
this.Controls.Add(this.label_Watch2);
|
||||||
|
this.Controls.Add(this.label_Watch1);
|
||||||
|
this.Name = "CustomMainForm";
|
||||||
|
this.Text = "HelloWorld";
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Label label_Watch1;
|
||||||
|
private System.Windows.Forms.Label label_Watch2;
|
||||||
|
private System.Windows.Forms.Label label_Watch3;
|
||||||
|
private System.Windows.Forms.Label label_Game;
|
||||||
|
private System.Windows.Forms.Button button1;
|
||||||
|
private System.Windows.Forms.Label label_GameHash;
|
||||||
|
private System.Windows.Forms.Button button2;
|
||||||
|
private System.Windows.Forms.Button button3;
|
||||||
|
private System.Windows.Forms.Label savestateLabel;
|
||||||
|
private System.Windows.Forms.TextBox savestateName;
|
||||||
|
private System.Windows.Forms.Button saveState;
|
||||||
|
private System.Windows.Forms.Button loadstate;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,228 @@
|
||||||
|
using System;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
using BizHawk.Client.ApiHawk;
|
||||||
|
using BizHawk.Client.Common;
|
||||||
|
using BizHawk.Emulation.Common;
|
||||||
|
using BizHawk.Client.ApiHawk.Classes.Events;
|
||||||
|
|
||||||
|
namespace BizHawk.Client.EmuHawk
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Here your first form
|
||||||
|
/// /!\ it MUST be called CustomMainForm and implements IExternalToolForm
|
||||||
|
/// Take also care of the namespace
|
||||||
|
/// </summary>
|
||||||
|
public partial class CustomMainForm : Form, IExternalToolForm
|
||||||
|
{
|
||||||
|
#region Fields
|
||||||
|
|
||||||
|
/*
|
||||||
|
The following stuff will be automatically filled
|
||||||
|
by BizHawk runtime
|
||||||
|
*/
|
||||||
|
[RequiredService]
|
||||||
|
internal IMemoryDomains _memoryDomains { get; set; }
|
||||||
|
[RequiredService]
|
||||||
|
private IEmulator _emu { get; set; }
|
||||||
|
|
||||||
|
/*private members for our needed*/
|
||||||
|
private WatchList _watches;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region cTor(s)
|
||||||
|
|
||||||
|
public CustomMainForm()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
label_GameHash.Click += Label_GameHash_Click;
|
||||||
|
|
||||||
|
ClientApi.BeforeQuickSave += ClientApi_BeforeQuickSave;
|
||||||
|
ClientApi.BeforeQuickLoad += ClientApi_BeforeQuickLoad;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Methods
|
||||||
|
|
||||||
|
private void button1_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
ClientApi.DoFrameAdvance();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void button2_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
ClientApi.GetInput(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void button3_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < 600; i++)
|
||||||
|
{
|
||||||
|
if (i % 60 == 0)
|
||||||
|
{
|
||||||
|
Joypad j1 = ClientApi.GetInput(1);
|
||||||
|
j1.AddInput(JoypadButton.A);
|
||||||
|
ClientApi.SetInput(1, j1);
|
||||||
|
|
||||||
|
ClientApi.DoFrameAdvance();
|
||||||
|
|
||||||
|
j1.RemoveInput(JoypadButton.A);
|
||||||
|
ClientApi.SetInput(1, j1);
|
||||||
|
ClientApi.DoFrameAdvance();
|
||||||
|
}
|
||||||
|
ClientApi.DoFrameAdvance();
|
||||||
|
}
|
||||||
|
Joypad j = ClientApi.GetInput(1);
|
||||||
|
j.ClearInputs();
|
||||||
|
ClientApi.SetInput(1, j);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Label_GameHash_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Clipboard.SetText(Global.Game.Hash);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void loadstate_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (savestateName.Text.Trim() != string.Empty)
|
||||||
|
{
|
||||||
|
ClientApi.LoadState(savestateName.Text);
|
||||||
|
//BinaryStateLoader.LoadAndDetect(savestateName.Text + ".State").GetLump(BinaryStateLump.Framebuffer, false, Test);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*private void Test(BinaryReader r)
|
||||||
|
{
|
||||||
|
System.Drawing.Bitmap b = new System.Drawing.Bitmap(r.BaseStream);
|
||||||
|
}*/
|
||||||
|
|
||||||
|
private void saveState_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (savestateName.Text.Trim() != string.Empty)
|
||||||
|
{
|
||||||
|
ClientApi.SaveState(savestateName.Text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//We will override F10 quicksave behavior
|
||||||
|
private void ClientApi_BeforeQuickSave(object sender, BeforeQuickSaveEventArgs e)
|
||||||
|
{
|
||||||
|
if(e.Slot == 0)
|
||||||
|
{
|
||||||
|
string basePath = Path.Combine(PathManager.GetSaveStatePath(Global.Game), "Test");
|
||||||
|
if (!Directory.Exists(basePath))
|
||||||
|
{
|
||||||
|
Directory.CreateDirectory(basePath);
|
||||||
|
}
|
||||||
|
ClientApi.SaveState(Path.Combine(basePath, e.Name));
|
||||||
|
e.Handled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//We will override F10 quickload behavior
|
||||||
|
private void ClientApi_BeforeQuickLoad(object sender, BeforeQuickLoadEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.Slot == 0)
|
||||||
|
{
|
||||||
|
string basePath = Path.Combine(PathManager.GetSaveStatePath(Global.Game), "Test");
|
||||||
|
ClientApi.LoadState(Path.Combine(basePath, e.Name));
|
||||||
|
e.Handled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region BizHawk Required methods
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Return true if you want the <see cref="UpdateValues"/> method
|
||||||
|
/// to be called before rendering
|
||||||
|
/// </summary>
|
||||||
|
public bool UpdateBefore
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool AskSaveChanges()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// This method is called instead of regular <see cref="UpdateValues"/>
|
||||||
|
/// when emulator is runnig in turbo mode
|
||||||
|
/// </summary>
|
||||||
|
public void FastUpdate()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public void NewUpdate(ToolFormUpdateType type) {}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Restart is called the first time you call the form
|
||||||
|
/// but also when you start playing a movie
|
||||||
|
/// </summary>
|
||||||
|
public void Restart()
|
||||||
|
{
|
||||||
|
//set a client padding
|
||||||
|
// ClientApi.SetExtraPadding(50, 50);
|
||||||
|
|
||||||
|
if (Global.Game.Name != "Null")
|
||||||
|
{
|
||||||
|
//first initialization of WatchList
|
||||||
|
if (_watches == null)
|
||||||
|
{
|
||||||
|
_watches = new WatchList(_memoryDomains, _emu.SystemId ?? string.Empty);
|
||||||
|
|
||||||
|
//Create some watch
|
||||||
|
Watch myFirstWatch = Watch.GenerateWatch(_memoryDomains.MainMemory, 0x40, WatchSize.Byte, BizHawk.Client.Common.DisplayType.Hex, true);
|
||||||
|
Watch mySecondWatch = Watch.GenerateWatch(_memoryDomains.MainMemory, 0x50, WatchSize.Word, BizHawk.Client.Common.DisplayType.Unsigned, true);
|
||||||
|
Watch myThirdWatch = Watch.GenerateWatch(_memoryDomains.MainMemory, 0x60, WatchSize.DWord, BizHawk.Client.Common.DisplayType.Hex, true);
|
||||||
|
|
||||||
|
//add them into the list
|
||||||
|
_watches.Add(myFirstWatch);
|
||||||
|
_watches.Add(mySecondWatch);
|
||||||
|
_watches.Add(myThirdWatch);
|
||||||
|
|
||||||
|
label_Game.Text = string.Format("You're playing {0}", Global.Game.Name);
|
||||||
|
label_GameHash.Text = string.Format("Hash: {0}", Global.Game.Hash);
|
||||||
|
}
|
||||||
|
//refresh it
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_watches.RefreshDomains(_memoryDomains);
|
||||||
|
label_Game.Text = string.Format("You're playing {0}", Global.Game.Name);
|
||||||
|
label_GameHash.Text = string.Format("Hash: {0}", Global.Game.Hash);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
label_Game.Text = string.Format("You aren't playing to anything");
|
||||||
|
label_GameHash.Text = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// This method is called when a frame is rendered
|
||||||
|
/// You can comapre it the lua equivalent emu.frameadvance()
|
||||||
|
/// </summary>
|
||||||
|
public void UpdateValues()
|
||||||
|
{
|
||||||
|
if (Global.Game.Name != "Null")
|
||||||
|
{
|
||||||
|
//we update our watches
|
||||||
|
_watches.UpdateValues();
|
||||||
|
label_Watch1.Text = string.Format("First watch ({0}) current value: {1}", _watches[0].AddressString, _watches[0].ValueString);
|
||||||
|
label_Watch2.Text = string.Format("Second watch ({0}) current value: {1}", _watches[1].AddressString, _watches[1].ValueString);
|
||||||
|
label_Watch3.Text = string.Format("Third watch ({0}) current value: {1}", _watches[2].AddressString, _watches[2].ValueString);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion BizHawk Required methods
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,120 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
|
@ -0,0 +1,80 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="../../DotNetBuild.Common.targets" Condition=" '$(OS)' != 'Windows_NT' " />
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{288D598F-1019-4EA2-802D-14D3CC73EE90}</ProjectGuid>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<RootNamespace>HelloWorld</RootNamespace>
|
||||||
|
<AssemblyName>HelloWorld</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference
|
||||||
|
HintPath="../../output/BizHawk.Client.ApiHawk.dll"
|
||||||
|
Include="BizHawk.Client.ApiHawk" />
|
||||||
|
<Reference
|
||||||
|
HintPath="../../output/BizHawk.Client.Common.dll"
|
||||||
|
Include="BizHawk.Client.Common" />
|
||||||
|
<Reference
|
||||||
|
HintPath="../../output/BizHawk.Emulation.Common.dll"
|
||||||
|
Include="BizHawk.Emulation.Common" />
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="CustomMainForm.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="CustomMainForm.Designer.cs">
|
||||||
|
<DependentUpon>CustomMainForm.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="CustomMainForm.resx">
|
||||||
|
<DependentUpon>CustomMainForm.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="icon_Hello.ico" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
<Target Name="BeforeBuild">
|
||||||
|
</Target>
|
||||||
|
<Target Name="AfterBuild">
|
||||||
|
</Target>
|
||||||
|
-->
|
||||||
|
</Project>
|
|
@ -0,0 +1,50 @@
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
using BizHawk.Client.ApiHawk;
|
||||||
|
|
||||||
|
// General Information about an assembly is controlled through the following
|
||||||
|
// set of attributes. Change these attribute values to modify the information
|
||||||
|
// associated with an assembly.
|
||||||
|
[assembly: AssemblyTitle("HelloWorld")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("HelloWorld")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2015")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
//As you can see this is a dedicated attribute. You can write the name of your tool, a small description
|
||||||
|
//and give an icon. The icon should be compiled as an embedded resource and you must give the entire path
|
||||||
|
[assembly: BizHawkExternalTool("Hello World", "My first External tool for BizHawk emulator", "icon_Hello.ico")]
|
||||||
|
|
||||||
|
//This attribute say what the is for. here, I don't anything
|
||||||
|
//It's equivalent to [assembly: BizHawkExternalToolUsage(BizHawkExternalToolUsage.Global, string.Empty)]
|
||||||
|
//Here is an example for an emulator specific: BizHawkExternalToolUsage(BizHawkExternalToolUsage.EmulatorSpecific, EmulatedSystem.NES)]
|
||||||
|
//Here is an example for an game specific: BizHawkExternalToolUsage(BizHawkExternalToolUsage.GameSpecific, "6B47BB75D16514B6A476AA0C73A683A2A4C18765")] => Super Mario World (USA)
|
||||||
|
//By setting this, your tool is contextualized, that mean you can't load it if emulator is in state you don't want
|
||||||
|
//It avoid crash
|
||||||
|
[assembly: BizHawkExternalToolUsage()]
|
||||||
|
|
||||||
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||||
|
// to COM components. If you need to access a type in this assembly from
|
||||||
|
// COM, set the ComVisible attribute to true on that type.
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||||
|
[assembly: Guid("288d598f-1019-4ea2-802d-14d3cc73ee90")]
|
||||||
|
|
||||||
|
// Version information for an assembly consists of the following four values:
|
||||||
|
//
|
||||||
|
// Major Version
|
||||||
|
// Minor Version
|
||||||
|
// Build Number
|
||||||
|
// Revision
|
||||||
|
//
|
||||||
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
|
// by using the '*' as shown below:
|
||||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
@ -0,0 +1 @@
|
||||||
|
../.build_from_cwd_debug.sh
|
|
@ -0,0 +1 @@
|
||||||
|
../.build_from_cwd_release.sh
|
Binary file not shown.
After Width: | Height: | Size: 4.4 KiB |
Loading…
Reference in New Issue