mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Make more mono friendly
This commit is contained in:
@@ -14,6 +14,14 @@ namespace SabreTools.Helper
|
|||||||
get { return "0.6.0.0"; }
|
get { return "0.6.0.0"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if running in a Mono environment
|
||||||
|
/// </summary>
|
||||||
|
public static bool MonoEnvironment
|
||||||
|
{
|
||||||
|
get { return (Type.GetType("Mono.Runtime") != null); }
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The path to the root of the 7z binaries and DLLs
|
/// The path to the root of the 7z binaries and DLLs
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -21,9 +29,8 @@ namespace SabreTools.Helper
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
bool isMono = (Type.GetType("Mono.Runtime") != null);
|
|
||||||
char delim = (Environment.CurrentDirectory.Contains("\\") ? '\\' : '/');
|
char delim = (Environment.CurrentDirectory.Contains("\\") ? '\\' : '/');
|
||||||
return Environment.CurrentDirectory + delim + (!isMono && Environment.Is64BitOperatingSystem ? "x64" : "x86") + delim;
|
return Environment.CurrentDirectory + delim + (!MonoEnvironment && Environment.Is64BitOperatingSystem ? "x64" : "x86") + delim;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user