2020-11-23 16:51:05 +01:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.IO;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Flowframes.IO
|
|
|
|
|
|
{
|
|
|
|
|
|
class Paths
|
|
|
|
|
|
{
|
2020-11-30 20:32:33 +01:00
|
|
|
|
public const string framesDir = "frames";
|
|
|
|
|
|
public const string interpDir = "interp";
|
|
|
|
|
|
public const string chunksDir = "vchunks";
|
2021-01-30 01:37:36 +01:00
|
|
|
|
public const string resumeDir = "resumedata";
|
2020-11-30 20:32:33 +01:00
|
|
|
|
public const string scenesDir = "scenes";
|
2021-02-02 21:48:18 +01:00
|
|
|
|
|
2021-01-27 11:41:05 +01:00
|
|
|
|
public const string alphaSuffix = "-a";
|
2021-02-02 21:48:18 +01:00
|
|
|
|
public const string prevSuffix = "-previous";
|
2021-03-09 15:55:50 +01:00
|
|
|
|
public const string fpsLimitSuffix = "-fpsLimit";
|
2020-11-23 16:51:05 +01:00
|
|
|
|
|
2021-02-08 20:57:37 +01:00
|
|
|
|
public const string frameOrderPrefix = "frames";
|
|
|
|
|
|
|
2021-02-23 22:26:13 +01:00
|
|
|
|
public const string audioSuffix = "audio";
|
|
|
|
|
|
|
2021-03-11 12:58:18 +01:00
|
|
|
|
public const string audioVideoDir = "av";
|
|
|
|
|
|
public const string licensesDir = "licenses";
|
|
|
|
|
|
|
2021-02-08 20:57:37 +01:00
|
|
|
|
public static string GetFrameOrderFilename(float factor)
|
|
|
|
|
|
{
|
|
|
|
|
|
return $"{frameOrderPrefix}-{factor.ToStringDot()}x.ini";
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static string GetFrameOrderFilenameChunk (int from, int to)
|
|
|
|
|
|
{
|
|
|
|
|
|
return $"{frameOrderPrefix}-chunk-{from}-{to}.ini";
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2021-02-18 14:30:56 +01:00
|
|
|
|
public static string GetExe()
|
|
|
|
|
|
{
|
|
|
|
|
|
return System.Reflection.Assembly.GetEntryAssembly().GetName().CodeBase.Replace("file:///", "");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static string GetExeDir()
|
|
|
|
|
|
{
|
|
|
|
|
|
return AppDomain.CurrentDomain.BaseDirectory;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-12-08 20:41:50 +01:00
|
|
|
|
public static string GetVerPath()
|
|
|
|
|
|
{
|
|
|
|
|
|
return Path.Combine(GetDataPath(), "ver.ini");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-11-23 16:51:05 +01:00
|
|
|
|
public static string GetDataPath ()
|
|
|
|
|
|
{
|
2021-02-18 14:30:56 +01:00
|
|
|
|
string path = Path.Combine(GetExeDir(), "FlowframesData");
|
2020-11-23 16:51:05 +01:00
|
|
|
|
Directory.CreateDirectory(path);
|
|
|
|
|
|
return path;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static string GetPkgPath()
|
|
|
|
|
|
{
|
|
|
|
|
|
string path = Path.Combine(GetDataPath(), "pkgs");
|
|
|
|
|
|
Directory.CreateDirectory(path);
|
|
|
|
|
|
return path;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static string GetLogPath()
|
|
|
|
|
|
{
|
|
|
|
|
|
string path = Path.Combine(GetDataPath(), "logs");
|
|
|
|
|
|
Directory.CreateDirectory(path);
|
|
|
|
|
|
return path;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|