BizHawk/DiscoHawk/DiscoHawk.cs

54 lines
1.1 KiB
C#
Raw Normal View History

2011-05-08 09:07:46 +00:00
using System;
2011-08-08 01:48:31 +00:00
using System.Reflection;
2011-05-08 09:07:46 +00:00
using System.Collections.Generic;
using System.IO;
2011-06-20 09:09:21 +00:00
//cue format preferences notes
//pcejin -
//does not like session commands
//it can handle binpercue
//it seems not to be able to handle binpertrack, or maybe i am doing something wrong (still havent ruled it out)
2011-05-08 09:07:46 +00:00
namespace BizHawk
{
class DiscoHawk
{
2011-08-08 01:48:31 +00:00
public static string GetExeDirectoryAbsolute()
{
string p = Path.GetDirectoryName(Assembly.GetEntryAssembly().GetName().CodeBase);
if (p.Substring(0, 6) == "file:\\")
p = p.Remove(0, 6);
string z = p;
return p;
}
2011-08-07 03:21:03 +00:00
[STAThread]
2011-05-08 09:07:46 +00:00
static void Main(string[] args)
{
2011-09-03 04:01:06 +00:00
var ffmpegPath = Path.Combine(GetExeDirectoryAbsolute(), "ffmpeg.exe");
DiscSystem.FFMpeg.FFMpegPath = ffmpegPath;
AudioExtractor.FFmpegPath = ffmpegPath;
2011-05-08 09:07:46 +00:00
new DiscoHawk().Run(args);
}
void Run(string[] args)
{
2011-08-07 03:22:41 +00:00
bool gui = true;
2011-08-07 03:21:03 +00:00
foreach (var arg in args)
{
2011-08-07 03:22:41 +00:00
if (arg.ToUpper() == "COMMAND") gui = false;
2011-08-07 03:21:03 +00:00
}
if (gui)
{
var dialog = new MainDiscoForm();
2011-08-07 03:21:03 +00:00
dialog.ShowDialog();
return;
2011-08-07 03:21:03 +00:00
}
2011-05-08 09:07:46 +00:00
}
}
}