mirror of
https://github.com/n00mkrad/flowframes
synced 2024-11-16 19:10:31 +01:00
Exit if required pkgs are missing, minor cleanups
This commit is contained in:
parent
b3f9258a4c
commit
dd4043abe9
3
Code/Form1.Designer.cs
generated
3
Code/Form1.Designer.cs
generated
@ -650,8 +650,7 @@
|
||||
this.logBox.Size = new System.Drawing.Size(701, 111);
|
||||
this.logBox.TabIndex = 5;
|
||||
this.logBox.TabStop = false;
|
||||
this.logBox.Text = "Welcome to Flowframes!\r\nThis is the console output box. Status messages will appe" +
|
||||
"ar here.";
|
||||
this.logBox.Text = "Welcome to Flowframes!";
|
||||
//
|
||||
// inFileDialog
|
||||
//
|
||||
|
6
Code/Forms/SettingsForm.Designer.cs
generated
6
Code/Forms/SettingsForm.Designer.cs
generated
@ -1349,10 +1349,10 @@
|
||||
this.label41.Location = new System.Drawing.Point(308, 213);
|
||||
this.label41.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7);
|
||||
this.label41.Name = "label41";
|
||||
this.label41.Size = new System.Drawing.Size(423, 13);
|
||||
this.label41.Size = new System.Drawing.Size(395, 13);
|
||||
this.label41.TabIndex = 74;
|
||||
this.label41.Text = "Use alternative method to get the amount of total frames. Slower, but better comp" +
|
||||
"atibility.";
|
||||
this.label41.Text = "Use alternative method to get the amount of total frames. Slower, but more reliab" +
|
||||
"le.";
|
||||
//
|
||||
// ffprobeCountFrames
|
||||
//
|
||||
|
@ -372,14 +372,13 @@ namespace Flowframes.IO
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Logger.Log($"Error trying to delete {path}: {e.Message}", true);
|
||||
Logger.Log($"TryDeleteIfExists: Error trying to delete {path}: {e.Message}", true);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool DeleteIfExists (string path) // Returns true if the file/dir exists
|
||||
{
|
||||
Logger.Log("DeleteIfExists: " + path, true);
|
||||
if (!IsPathDirectory(path) && File.Exists(path))
|
||||
{
|
||||
File.Delete(path);
|
||||
|
@ -6,6 +6,7 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using Flowframes.Forms;
|
||||
using Flowframes.Main;
|
||||
|
||||
namespace Flowframes
|
||||
{
|
||||
@ -18,7 +19,9 @@ namespace Flowframes
|
||||
if (!InstallIsValid())
|
||||
{
|
||||
Logger.Log("No valid installation detected");
|
||||
new InstallerForm().ShowDialog();
|
||||
InterpolateUtils.ShowMessage($"Some packages are missing!\n\nCheck the log ({Path.GetFileName(Paths.GetDataPath())}/{Path.GetFileName(Paths.GetLogPath())}/{Logger.defaultLogName}).", "Error");
|
||||
Application.Exit();
|
||||
//new InstallerForm().ShowDialog();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -39,7 +42,10 @@ namespace Flowframes
|
||||
{
|
||||
// if pkg is required and not installed, return false
|
||||
if (pkg.friendlyName.ToLower().Contains("required") && !PkgUtils.IsInstalled(pkg))
|
||||
{
|
||||
Logger.Log($"Required packages \"{pkg.friendlyName}\" was not found!", true);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -14,6 +14,7 @@ namespace Flowframes
|
||||
{
|
||||
public static TextBox textbox;
|
||||
static string file;
|
||||
public const string defaultLogName = "sessionlog.txt";
|
||||
|
||||
public static void Log(string s, bool hidden = false, bool replaceLastLine = false, string filename = "")
|
||||
{
|
||||
@ -40,7 +41,7 @@ namespace Flowframes
|
||||
public static void LogToFile(string s, bool noLineBreak, string filename)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(filename))
|
||||
filename = "sessionlog.txt";
|
||||
filename = defaultLogName;
|
||||
|
||||
file = Path.Combine(Paths.GetLogPath(), filename);
|
||||
|
||||
|
@ -12,8 +12,6 @@ namespace Flowframes
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
//public const int version = 18;
|
||||
|
||||
public static Form1 mainForm;
|
||||
|
||||
public static bool busy = false;
|
||||
|
Loading…
Reference in New Issue
Block a user