Fix compilation under mono #117. Allow explicit web client selection. Init curl at application start.

This commit is contained in:
KZ
2015-07-30 18:50:46 +01:00
parent c76137a70c
commit 922583ea5d
21 changed files with 139 additions and 59 deletions

View File

@@ -28,6 +28,11 @@ namespace JackettTray
toolStripMenuItemWebUI.Click += toolStripMenuItemWebUI_Click;
toolStripMenuItemShutdown.Click += toolStripMenuItemShutdown_Click;
#if __MonoCS__
// No shortcuts on linux
#else
toolStripMenuItemAutoStart.Visible = true;
#endif
Engine.Server.Initalize();
@@ -91,13 +96,16 @@ namespace JackettTray
private void CreateShortcut()
{
#if __MonoCS__
// No shortcuts on linux
#else
var appPath = Assembly.GetExecutingAssembly().Location;
var shell = new IWshRuntimeLibrary.WshShell();
var shortcut = (IWshRuntimeLibrary.IWshShortcut)shell.CreateShortcut(ShortcutPath);
shortcut.Description = Assembly.GetExecutingAssembly().GetName().Name;
shortcut.TargetPath = appPath;
shortcut.Save();
#endif
}
private void contextMenuStrip1_Opening(object sender, CancelEventArgs e)