mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-16 16:37:48 +01:00
49 lines
988 B
C#
49 lines
988 B
C#
using Flowframes.IO;
|
|
using Flowframes.Properties;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Windows.Forms;
|
|
using Flowframes.Forms;
|
|
|
|
namespace Flowframes
|
|
{
|
|
class Setup
|
|
{
|
|
|
|
public static void Init()
|
|
{
|
|
Console.WriteLine("Setup Init()");
|
|
if (!InstallIsValid())
|
|
{
|
|
Logger.Log("No valid installation detected");
|
|
new InstallerForm().ShowDialog();
|
|
}
|
|
else
|
|
{
|
|
|
|
}
|
|
}
|
|
|
|
|
|
public static bool InstallIsValid ()
|
|
{
|
|
if (!Directory.Exists(Paths.GetPkgPath()))
|
|
{
|
|
Logger.Log("Install invalid - Reason: " + Paths.GetPkgPath() + " does not exist.");
|
|
return false;
|
|
}
|
|
|
|
foreach(FlowPackage pkg in PkgInstaller.packages)
|
|
{
|
|
// if pkg is required and not installed, return false
|
|
if (pkg.friendlyName.ToLower().Contains("required") && !PkgInstaller.IsInstalled(pkg.fileName))
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
}
|
|
}
|