Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/21/11 17:58:29 (14 years ago)
Author:
ascheibe
Message:

#1233 worked on installer and slave

Location:
branches/HeuristicLab.Hive-3.4/sources
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.SlaveTrayIcon/HeuristicLab.Clients.Hive.Slave.SlaveTrayIcon.csproj

    r5599 r5780  
    6363    </Reference>
    6464    <Reference Include="System" />
     65    <Reference Include="System.Configuration.Install" />
    6566    <Reference Include="System.Core" />
     67    <Reference Include="System.Management" />
    6668    <Reference Include="System.Xml.Linq" />
    6769    <Reference Include="System.Data.DataSetExtensions" />
     
    8284    <Compile Include="Program.cs" />
    8385    <Compile Include="Properties\AssemblyInfo.cs" />
     86    <Compile Include="TrayIconInstaller.cs">
     87      <SubType>Component</SubType>
     88    </Compile>
     89    <Compile Include="TrayIconInstaller.Designer.cs">
     90      <DependentUpon>TrayIconInstaller.cs</DependentUpon>
     91    </Compile>
    8492    <EmbeddedResource Include="MainWindow.resx">
    8593      <DependentUpon>MainWindow.cs</DependentUpon>
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.SlaveTrayIcon/Program.cs

    r5599 r5780  
    11using System;
     2using System.Diagnostics;
    23using System.Windows.Forms;
    34using HeuristicLab.Clients.Hive.SlaveCore.Views;
     
    1011    [STAThread]
    1112    static void Main() {
     13      KillOtherInstances();
     14
    1215      Application.EnableVisualStyles();
    1316      Application.SetCompatibleTextRenderingDefault(false);
     
    1821      Application.Run();
    1922    }
     23
     24    /// <summary>
     25    /// kill all other slave tray icons, we only want 1 running at a time
     26    /// (and if a newer version is installed the older one should be killed)
     27    /// </summary>
     28    private static void KillOtherInstances() {
     29      Process curProc = Process.GetCurrentProcess();
     30
     31      try {
     32        Process[] procs = Process.GetProcessesByName(curProc.ProcessName);
     33        foreach (Process p in procs) {
     34          if (p.Id != curProc.Id) {
     35            p.Kill();
     36          }
     37        }
     38      }
     39      catch (InvalidOperationException) {
     40      }
     41      catch (Exception) {
     42        MessageBox.Show("There is another instance of the Hive Slave tray icon running which can't be closed.", "HeuristicLab Hive Slave");
     43      }
     44    }
    2045  }
    2146}
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.SlaveWindowsService/ProjectInstaller.cs

    r5599 r5780  
    11using System;
    22using System.Collections;
    3 using System.Collections.Generic;
    43using System.ComponentModel;
    5 using System.Configuration.Install;
    6 using System.Linq;
     4using System.ServiceProcess;
    75
    86
     
    1311      InitializeComponent();
    1412    }
     13
     14    protected override void OnAfterInstall(IDictionary savedState) {
     15      base.OnAfterInstall(savedState);
     16
     17      //try to start the service after installation
     18      using (var serviceController = new ServiceController(this.serviceInstaller1.ServiceName, Environment.MachineName)) {
     19        try {
     20          serviceController.Start();
     21        }
     22        catch { }
     23      }
     24    }
    1525  }
    1626}
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.SlaveWindowsService/SlaveWindowsService.cs

    r5621 r5780  
    4343    protected override void OnStart(string[] args) {
    4444      core = new Core();
     45      core.ServiceEventLog = eventLog;
    4546      coreThread = new Thread(core.Start);
    4647      coreThread.Start();
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.SlaveWindowsServiceSetup/HeuristicLab.Clients.Hive.Slave.SlaveWindowsServiceSetup.vdproj

    r5721 r5780  
    5252        "Entry"
    5353        {
    54         "MsmKey" = "8:_01440FC6C110EF86D1057E965F8A00D4"
    55         "OwnerKey" = "8:_A33A66CD24EA6F2EB8BC0C7B0374C7AC"
    56         "MsmSig" = "8:_UNDEFINED"
    57         }
    58         "Entry"
    59         {
    6054        "MsmKey" = "8:_1078CDBED9F033A8F8092D70EE698E9A"
    6155        "OwnerKey" = "8:_259AB1050A9B0A12646AAB03ED49AE98"
     
    10861080        "MsmKey" = "8:_9501231212CB8897345E5D8F6F31FBE4"
    10871081        "OwnerKey" = "8:_1078CDBED9F033A8F8092D70EE698E9A"
     1082        "MsmSig" = "8:_UNDEFINED"
     1083        }
     1084        "Entry"
     1085        {
     1086        "MsmKey" = "8:_98295B7BD0CC41ED881E9A9207EF6DB4"
     1087        "OwnerKey" = "8:_UNDEFINED"
    10881088        "MsmSig" = "8:_UNDEFINED"
    10891089        }
     
    16501650        "CustomAction"
    16511651        {
     1652            "{4AA51A2D-7D85-4A59-BA75-B0809FC8B380}:_090B515D4B724A818341AB77211C562A"
     1653            {
     1654            "Name" = "8:Primary output from HeuristicLab.Clients.Hive.Slave.SlaveTrayIcon (Active)"
     1655            "Condition" = "8:"
     1656            "Object" = "8:_E425C85EBBC047D2944046574F2FB159"
     1657            "FileType" = "3:2"
     1658            "InstallAction" = "3:2"
     1659            "Arguments" = "8:"
     1660            "EntryPoint" = "8:"
     1661            "Sequence" = "3:2"
     1662            "Identifier" = "8:_4C9B3289_4A7B_4468_A3E6_104B233F7A07"
     1663            "InstallerClass" = "11:TRUE"
     1664            "CustomActionData" = "8:/TARGETDIR=\"[TARGETDIR]\\\""
     1665            }
    16521666            "{4AA51A2D-7D85-4A59-BA75-B0809FC8B380}:_96A6A0924F6E4EB3A650D99CE94D954B"
    16531667            {
     
    16641678            "CustomActionData" = "8:"
    16651679            }
     1680            "{4AA51A2D-7D85-4A59-BA75-B0809FC8B380}:_97CB3FDA08444695B30FF01C7FC1C057"
     1681            {
     1682            "Name" = "8:Primary output from HeuristicLab.Clients.Hive.Slave.SlaveTrayIcon (Active)"
     1683            "Condition" = "8:"
     1684            "Object" = "8:_E425C85EBBC047D2944046574F2FB159"
     1685            "FileType" = "3:2"
     1686            "InstallAction" = "3:1"
     1687            "Arguments" = "8:"
     1688            "EntryPoint" = "8:"
     1689            "Sequence" = "3:2"
     1690            "Identifier" = "8:_01C278BC_EA31_4977_B1CF_D61C0E4FDD5A"
     1691            "InstallerClass" = "11:TRUE"
     1692            "CustomActionData" = "8:/TARGETDIR=\"[TARGETDIR]\\\""
     1693            }
    16661694            "{4AA51A2D-7D85-4A59-BA75-B0809FC8B380}:_BA4B4CE24A6A4AF5B9E15838A4E3A2DA"
    16671695            {
     
    24112439            "IsolateTo" = "8:"
    24122440            }
     2441            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_98295B7BD0CC41ED881E9A9207EF6DB4"
     2442            {
     2443            "SourcePath" = "8:..\\HeuristicLab.Clients.Hive.Slave.Views\\3.4\\hive_icon.ico"
     2444            "TargetName" = "8:hive_icon.ico"
     2445            "Tag" = "8:"
     2446            "Folder" = "8:_8564EC48868C45BDB6F26256DBC6B288"
     2447            "Condition" = "8:"
     2448            "Transitive" = "11:FALSE"
     2449            "Vital" = "11:TRUE"
     2450            "ReadOnly" = "11:FALSE"
     2451            "Hidden" = "11:FALSE"
     2452            "System" = "11:FALSE"
     2453            "Permanent" = "11:FALSE"
     2454            "SharedLegacy" = "11:FALSE"
     2455            "PackageAs" = "3:1"
     2456            "Register" = "3:1"
     2457            "Exclude" = "11:FALSE"
     2458            "IsDependency" = "11:FALSE"
     2459            "IsolateTo" = "8:"
     2460            }
    24132461            "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_9ADCBD11412B8CF88989271EC4E87418"
    24142462            {
     
    27732821            {
    27742822            "Name" = "8:#1919"
    2775             "AlwaysCreate" = "11:FALSE"
     2823            "AlwaysCreate" = "11:TRUE"
    27762824            "Condition" = "8:"
    27772825            "Transitive" = "11:FALSE"
     
    27792827                "Folders"
    27802828                {
     2829                    "{9EF0B969-E518-4E46-987F-47570745A589}:_EB172448DA454A1EACE198BCA7BC8A03"
     2830                    {
     2831                    "Name" = "8:HeuristicLab Hive Slave"
     2832                    "AlwaysCreate" = "11:FALSE"
     2833                    "Condition" = "8:"
     2834                    "Transitive" = "11:FALSE"
     2835                    "Property" = "8:_1D3268864FFD419CAAC685DE6DBCA87D"
     2836                        "Folders"
     2837                        {
     2838                        }
     2839                    }
    27812840                }
    27822841            }
     
    27962855        {
    27972856        "Name" = "8:Microsoft Visual Studio"
    2798         "ProductName" = "8:HeuristicLab.Clients.Hive.Slave.SlaveWindowsServiceSetup"
     2857        "ProductName" = "8:HeuristicLab Hive Slave"
    27992858        "ProductCode" = "8:{83D128A1-4766-4B19-A449-15B0A1969B99}"
    2800         "PackageCode" = "8:{B313D301-3AE8-4CAB-A254-CFC5B15E6984}"
     2859        "PackageCode" = "8:{E16E0DDF-7849-45C1-8379-6F7070E7248C}"
    28012860        "UpgradeCode" = "8:{F27A07F7-B96C-4375-B9C2-6623E5C2B03E}"
    28022861        "AspNetVersion" = "8:4.0.30319.0"
     
    28052864        "DetectNewerInstalledVersion" = "11:TRUE"
    28062865        "InstallAllUsers" = "11:TRUE"
    2807         "ProductVersion" = "8:1.0.0"
     2866        "ProductVersion" = "8:3.3.5"
    28082867        "Manufacturer" = "8:HEAL"
    28092868        "ARPHELPTELEPHONE" = "8:"
    28102869        "ARPHELPLINK" = "8:"
    2811         "Title" = "8:HeuristicLab.Clients.Hive.Slave.SlaveWindowsServiceSetup"
     2870        "Title" = "8:HeuristicLab Hive Slave Installer"
    28122871        "Subject" = "8:"
    28132872        "ARPCONTACT" = "8:HEAL"
    28142873        "Keywords" = "8:"
    28152874        "ARPCOMMENTS" = "8:"
    2816         "ARPURLINFOABOUT" = "8:"
    2817         "ARPPRODUCTICON" = "8:"
     2875        "ARPURLINFOABOUT" = "8:http://dev.heuristiclab.com"
     2876        "ARPPRODUCTICON" = "8:_98295B7BD0CC41ED881E9A9207EF6DB4"
    28182877        "ARPIconIndex" = "3:0"
    28192878        "SearchPath" = "8:"
     
    29182977        "Shortcut"
    29192978        {
     2979            "{970C0BB2-C7D0-45D7-ABFA-7EC378858BC0}:_165C7319BB1047F2BDEEACA5E0377DC5"
     2980            {
     2981            "Name" = "8:HeuristicLab Hive Slave"
     2982            "Arguments" = "8:"
     2983            "Description" = "8:"
     2984            "ShowCmd" = "3:1"
     2985            "IconIndex" = "3:0"
     2986            "Transitive" = "11:FALSE"
     2987            "Target" = "8:_E425C85EBBC047D2944046574F2FB159"
     2988            "Folder" = "8:_EB172448DA454A1EACE198BCA7BC8A03"
     2989            "WorkingFolder" = "8:_8564EC48868C45BDB6F26256DBC6B288"
     2990            "Icon" = "8:_98295B7BD0CC41ED881E9A9207EF6DB4"
     2991            "Feature" = "8:"
     2992            }
    29202993        }
    29212994        "UserInterface"
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/Core.cs

    r5778 r5780  
    114114    private void StartHeartbeats() {
    115115      //Initialize the heartbeat     
    116       if (heartbeatManager != null) {
     116      if (heartbeatManager == null) {
    117117        heartbeatManager = new HeartbeatManager { Interval = new TimeSpan(0, 0, 10) };
    118118        heartbeatManager.StartHeartbeat();
Note: See TracChangeset for help on using the changeset viewer.