Fix error in case glade.sh is not found (#9)
This commit is contained in:
parent
5f3d138d1a
commit
86b20442a2
1 changed files with 16 additions and 1 deletions
|
@ -8,7 +8,22 @@ namespace MonoDevelop.GtkSharp.Addin
|
|||
{
|
||||
public class GladeDesktopApplication : DesktopApplication
|
||||
{
|
||||
private static readonly string s_unixgladeapp = "-c '" + File.ReadAllText("glade.sh") + "'";
|
||||
private static readonly string s_unixgladeapp;
|
||||
|
||||
static GladeDesktopApplication()
|
||||
{
|
||||
try
|
||||
{
|
||||
var assembly = typeof(GladeDesktopApplication).Assembly.Location;
|
||||
var gladesh = Path.Combine(Path.GetDirectoryName(assembly), "glade.sh");
|
||||
|
||||
s_unixgladeapp = "-c '" + File.ReadAllText(gladesh) + "'";
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine(ex);
|
||||
}
|
||||
}
|
||||
|
||||
private readonly string _filename;
|
||||
|
||||
|
|
Loading…
Reference in a new issue