Skip to content

Commit

Permalink
Sanity check the supplied Rocksmith folder and inform user when conve…
Browse files Browse the repository at this point in the history
…rsion is done.
  • Loading branch information
fholger committed Dec 25, 2015
1 parent dccf3ae commit 0668a0f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
Binary file added Newtonsoft.Json.dll
Binary file not shown.
14 changes: 8 additions & 6 deletions RocksmithToTabGUI/CallProgram.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,14 @@ private void StartProcess()
void process_Exited(object sender, EventArgs e)
{
// Leave open to give chance of seeing output
// DialogResult = System.Windows.Forms.DialogResult.OK;
// Close();
// But let's change the label on the button
//CancelProcess.Text = "Close";
this.Invoke((MethodInvoker) delegate { this.CancelProcess.Text = "Close"; });
// also, let's open the folder where the tabs where stored
// But inform user that we are done converting
this.Invoke((MethodInvoker) delegate
{
this.CancelProcess.Text = "Close";
this.CurrentFileLabel.Text = "All done :)";
this.Text = "Converting tabs... Done.";
});
// also, let's open the folder where the tabs were stored
Process.Start(OutputPath);
}

Expand Down
9 changes: 9 additions & 0 deletions RocksmithToTabGUI/MainWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;

namespace RocksmithToTabGUI
{
Expand Down Expand Up @@ -84,6 +85,14 @@ private void OutputFolderSelect_Click(object sender, EventArgs e)

private void CreateTabs_Click(object sender, EventArgs e)
{
// sanity check: test if given Rocksmith folder is legit
string songsPsarc = Path.Combine(RocksmithFolder.Text, "songs.psarc");
if (!File.Exists(songsPsarc))
{
MessageBox.Show("Could not find songs.psarc file in the Rocksmith folder. Are you sure you provided the correct path to your Rocksmith 2014 installation directory?", "Rocksmith 2014 path invalid");
return;
}

string[] fileFormats = new string[] { "gp5", "gpx", "gpif" };
using (var callProgram = new CallProgram())
{
Expand Down

0 comments on commit 0668a0f

Please sign in to comment.