22 Commits
rel1.x ... v1.0

Author SHA1 Message Date
Eric Fontana
6bd15ae5d5 weak 2014-08-27 13:02:52 -04:00
Eric Fontana
078e60943c Doc 2014-08-27 12:53:40 -04:00
Eric Fontana
a4ec693a60 Fixed download location to use virtual path 2014-08-27 12:49:16 -04:00
Eric Fontana
7fe150b608 Templattized powershell for chocolatey 2014-08-27 11:50:28 -04:00
Eric Fontana
24f851bb4a Updates 2014-08-27 11:39:28 -04:00
Eric Fontana
39c2cbd5d2 Update version 2014-08-27 11:05:49 -04:00
Eric Fontana
3f0d60a979 Fixed version variable 2014-08-27 10:53:05 -04:00
Eric Fontana
9c7fec6c8f Templateized 2014-08-27 10:43:57 -04:00
Eric Fontana
ded604c192 Added nuspec for chocoloatye 2014-08-27 09:55:56 -04:00
Eric Fontana
4890508935 Added chocolatey 2014-08-27 09:54:52 -04:00
Eric Fontana
59df7b9719 Added save_artifcat 2014-08-27 09:08:42 -04:00
Eric Fontana
bc2b5300e5 Added Builds dir 2014-08-27 08:33:17 -04:00
Eric Fontana
7c010bf434 Removed appvery 2014-08-27 08:09:17 -04:00
Eric Fontana
1f51d43e2c Builds 2014-08-27 07:41:02 -04:00
Eric Fontana
822e73360f Removed after build script 2014-08-27 07:22:09 -04:00
Eric Fontana
ecad5be188 After build try1 2014-08-27 07:19:16 -04:00
Eric Fontana
4769b389a6 Added post-build script 2014-08-27 07:15:11 -04:00
Eric Fontana
9c21471fb2 Added UI to installer 2014-08-27 07:02:27 -04:00
Eric Fontana
8b46cde11e Doc tweaks. 2014-08-26 12:53:44 -04:00
Eric Fontana
788969aa2c Updated doc for diagnostic port 2014-08-26 11:52:51 -04:00
Eric Fontana
9662f82c18 Consolidated key names 2014-08-26 11:40:33 -04:00
Eric Fontana
c8a8d47f45 Merge pull request #7 from efontana/rel1.x
Merge pull request #5 from efontana/master
2014-08-26 11:23:38 -04:00
13 changed files with 120 additions and 30 deletions

View File

@@ -122,13 +122,16 @@ Alternatively you can use the Services Control Panel.
TimberWinR.ServiceHost.exe [options]
Options:
-logDir: Specifies the directory where TimberWinR will write its log file TimberWinR.txt
Default is -logDir:"C:\logs"
-logLevel: Specifies the logging level for TimberWinR
Legal Values: Trace|Debug|Info|Warn|Error|Fatal|Off
Default is -logDir:Info
-configFile: Specifies the path to the JSON config file, or directory which contains .json file(s).
Default is -configFile:default.json
-logDir: Specifies the directory where TimberWinR will write its log file TimberWinR.txt
Default is -logDir:"C:\logs"
-logLevel: Specifies the logging level for TimberWinR
Legal Values: Trace|Debug|Info|Warn|Error|Fatal|Off
Default is -logDir:Info
-configFile: Specifies the path to the JSON config file, or directory which contains .json file(s).
Default is -configFile:default.json
-diagnosticPort: Specifies the diagnostic port which can be used to get a health check of the service.
Default Port is 5142, A value of 0 will disable it. Open a browser
http://localhost:5142
```
#### -configFile
This may be a single .json file or a directory containing .json file(s). If it is a directory, all
@@ -156,7 +159,7 @@ TimberWinR.ServiceHost.exe install --autostart
TimberWinR.ServiceHost.exe start
```
### Builds ###
Builds are here.
Soon

View File

@@ -0,0 +1,3 @@
.MSI Packages Here
------------------

View File

@@ -21,6 +21,9 @@ namespace TimberWinR.ServiceHost
{
internal class Program
{
const string KeyPath = @"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\TimberWinR";
const string KeyName = "ImagePath";
private static void Main(string[] args)
{
Arguments arguments = new Arguments();
@@ -50,11 +53,8 @@ namespace TimberWinR.ServiceHost
hostConfigurator.SetServiceName("TimberWinR");
hostConfigurator.AfterInstall(() =>
{
const string keyPath = @"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\TimberWinR";
const string keyName = "ImagePath";
var currentValue = Registry.GetValue(keyPath, keyName, "").ToString();
{
var currentValue = Registry.GetValue(KeyPath, KeyName, "").ToString();
if (!string.IsNullOrEmpty(currentValue))
{
AddServiceParameter("-configFile", arguments.ConfigFile);
@@ -69,29 +69,25 @@ namespace TimberWinR.ServiceHost
private static void AddServiceParameter(string paramName, string value)
{
string keyPath = @"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\TimberWinR";
string keyName = "ImagePath";
string currentValue = Registry.GetValue(keyPath, keyName, "").ToString();
string currentValue = Registry.GetValue(KeyPath, KeyName, "").ToString();
if (!string.IsNullOrEmpty(paramName) && !currentValue.Contains(string.Format("{0} ", paramName)))
{
currentValue += string.Format(" {0} \"{1}\"", paramName, value.Replace("\\\\", "\\"));
Registry.SetValue(keyPath, keyName, currentValue);
Registry.SetValue(KeyPath, KeyName, currentValue);
}
}
private static void AddServiceParameter(string paramName, int value)
{
string keyPath = @"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\TimberWinR";
string keyName = "ImagePath";
string currentValue = Registry.GetValue(keyPath, keyName, "").ToString();
string currentValue = Registry.GetValue(KeyPath, KeyName, "").ToString();
if (!string.IsNullOrEmpty(paramName) && !currentValue.Contains(string.Format("{0}:", paramName)))
{
currentValue += string.Format(" {0}:{1}", paramName, value);
Registry.SetValue(keyPath, keyName, currentValue);
Registry.SetValue(KeyPath, KeyName, currentValue);
}
}

View File

@@ -17,8 +17,10 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{1B2F600B-2400-45B9-A28E-CFC391D9EFA9}"
ProjectSection(SolutionItems) = preProject
appveyor.yml = appveyor.yml
tools\chocolateyInstall.ps1.template = tools\chocolateyInstall.ps1.template
LICENSE.txt = LICENSE.txt
README.md = README.md
timberwinr.nuspec.template = timberwinr.nuspec.template
EndProjectSection
EndProject
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "TimberWinR.Wix", "TimberWix\TimberWinR.Wix.wixproj", "{82A39B31-61EC-468D-AA71-0D949AC6528F}"

View File

@@ -106,7 +106,7 @@ namespace TimberWinR.Diagnostics
}
catch (Exception ex)
{
LogManager.GetCurrentClassLogger().Error("Tcp Exception", ex);
LogManager.GetCurrentClassLogger().Error(ex);
}
}

View File

@@ -70,7 +70,7 @@ namespace TimberWinR.Inputs
}
catch (Exception ex)
{
LogManager.GetCurrentClassLogger().Error("Error Deleting Checkpoint File", ex);
LogManager.GetCurrentClassLogger().Error(ex);
}
}

View File

@@ -117,7 +117,7 @@ namespace TimberWinR.Inputs
}
catch (Exception ex)
{
LogManager.GetCurrentClassLogger().Error("Tcp Exception", ex);
LogManager.GetCurrentClassLogger().Error(ex);
}
if (clientStream != null)

View File

@@ -116,7 +116,7 @@ namespace TimberWinR.Inputs
}
catch (Exception ex)
{
LogManager.GetCurrentClassLogger().Error("WindowsEventListener", ex);
LogManager.GetCurrentClassLogger().Error(ex);
firstQuery = true;
oLogQuery = new LogQuery();
}

View File

@@ -6,6 +6,8 @@
<Property Id="LOGDIR">c:\logs</Property>
<Property Id="LOGLEVEL">Info</Property>
<Property Id="DIAGPORT">5141</Property>
<UIRef Id="WixUI_InstallDir" />
<!--
We need to be able to uninstall a newer version from an older version.
The default reinstallmode is "omus", of which the 'o' means "reinstall if missing or older"
@@ -30,15 +32,19 @@
<Directory Id="INSTALLFOLDER" Name="TimberWinR" />
</Directory>
</Directory>
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />
</Fragment>
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<Component Id="ProductComponent" Guid="1BDEC5F3-5E9F-4E2E-8B1B-30E7968A99E1">
<File Id="TimberWinR.ServiceHost.exe" Name="$(var.TimberWinR.ServiceHost.TargetFileName)" Source="$(var.TimberWinR.ServiceHost.TargetPath)" />
<File Id="TimberWinR.ServiceHost.exe" Name="$(var.TimberWinR.ServiceHost.TargetFileName)" Source="$(var.TimberWinR.ServiceHost.TargetPath)" />
<File Id="TimberWinR.ServiceHost.exe.config" Source="$(var.TimberWinR.ServiceHost.TargetDir)\TimberWinR.ServiceHost.exe.config" />
<File Id="Interop.MSUtil.dll" Source="$(var.TimberWinR.ServiceHost.TargetDir)\Interop.MSUtil.dll" />
<File Id="csredis.dll" Source="$(var.TimberWinR.ServiceHost.TargetDir)\csredis.dll" />
<File Id="default.json" Source="$(var.TimberWinR.ServiceHost.TargetDir)\default.json" />
<File Id="Newtonsoft.Json.dll" Source="$(var.TimberWinR.ServiceHost.TargetDir)\Newtonsoft.Json.dll" />
<File Id="Nlog.dll" Source="$(var.TimberWinR.ServiceHost.TargetDir)\Nlog.dll" />
<File Id="RestSharp.dll" Source="$(var.TimberWinR.ServiceHost.TargetDir)\RestSharp.dll" />

View File

@@ -44,6 +44,12 @@
<RefTargetDir>INSTALLFOLDER</RefTargetDir>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<WixExtension Include="WixUIExtension">
<HintPath>$(WixExtDir)\WixUIExtension.dll</HintPath>
<Name>WixUIExtension</Name>
</WixExtension>
</ItemGroup>
<Import Project="$(WixTargetsPath)" />
<PropertyGroup>
<PostBuildEvent />

View File

@@ -12,3 +12,4 @@ assembly_info:
artifacts:
- path: '**\*.msi'

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Do not remove this test for UTF-8: if ??? doesn?t appear as greek uppercase omega letter enclosed in quotation marks, you should use an editor that supports UTF-8, not this one. -->
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<!-- Read this before publishing packages to chocolatey.org: https://github.com/chocolatey/chocolatey/wiki/CreatePackages -->
<id>TimberWinR</id>
<title>TimberWinR</title>
<version>${version}.0</version>
<authors>efontana</authors>
<owners>Eric Fontana</owners>
<summary>TimberWinR Shipper</summary>
<description>TimberWinR Shipper</description>
<projectUrl>https://github.com/efontana/TimberWinR</projectUrl>
<tags>TimberWinR admin</tags>
<copyright></copyright>
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0.html</licenseUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<!--<iconUrl>http://cdn.rawgit.com/__CHOCO_PKG_MAINTAINER_REPO__/master/icons/TimberWinR.png</iconUrl>-->
<!--<dependencies>
<dependency id="" version="" />
</dependencies>-->
<releaseNotes></releaseNotes>
</metadata>
<files>
<file src="tools\**" target="tools" />
</files>
</package>

View File

@@ -0,0 +1,46 @@
#NOTE: Please remove any commented lines to tidy up prior to releasing the package, including this one
$packageName = 'TimberWinR' # arbitrary name for the package, used in messages
$installerType = 'msi' #only one of these: exe, msi, msu
$url = 'http://www.ericfontana.com/TimberWinR/TimberWinR-${version}.0.msi' # download url
$silentArgs = '/quiet' # "/s /S /q /Q /quiet /silent /SILENT /VERYSILENT" # try any of these to get the silent installer #msi is always /quiet
$validExitCodes = @(0) #please insert other valid exit codes here, exit codes for ms http://msdn.microsoft.com/en-us/library/aa368542(VS.85).aspx
# main helpers - these have error handling tucked into them already
# installer, will assert administrative rights
# if removing $url64, please remove from here
Install-ChocolateyPackage "$packageName" "$installerType" "$silentArgs" "$url" "$url64" -validExitCodes $validExitCodes
# download and unpack a zip file
#try { #error handling is only necessary if you need to do anything in addition to/instead of the main helpers
# other helpers - using any of these means you want to uncomment the error handling up top and at bottom.
# downloader that the main helpers use to download items
# if removing $url64, please remove from here
#Get-ChocolateyWebFile "$packageName" 'DOWNLOAD_TO_FILE_FULL_PATH' "$url" "$url64"
# installer, will assert administrative rights - used by Install-ChocolateyPackage
#Install-ChocolateyInstallPackage "$packageName" "$installerType" "$silentArgs" '_FULLFILEPATH_' -validExitCodes $validExitCodes
# unzips a file to the specified location - auto overwrites existing content
#Get-ChocolateyUnzip "FULL_LOCATION_TO_ZIP.zip" "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
# Runs processes asserting UAC, will assert administrative rights - used by Install-ChocolateyInstallPackage
#Start-ChocolateyProcessAsAdmin 'STATEMENTS_TO_RUN' 'Optional_Application_If_Not_PowerShell' -validExitCodes $validExitCodes
# add specific folders to the path - any executables found in the chocolatey package folder will already be on the path. This is used in addition to that or for cases when a native installer doesn't add things to the path.
#Install-ChocolateyPath 'LOCATION_TO_ADD_TO_PATH' 'User_OR_Machine' # Machine will assert administrative rights
# add specific files as shortcuts to the desktop
#$target = Join-Path $MyInvocation.MyCommand.Definition "$($packageName).exe"
#Install-ChocolateyDesktopLink $target
#------- ADDITIONAL SETUP -------#
# make sure to uncomment the error handling if you have additional setup to do
# outputs the bitness of the OS (either "32" or "64")
#$osBitness = Get-ProcessorBits
# the following is all part of error handling
#Write-ChocolateySuccess "$packageName"
#} catch {
#Write-ChocolateyFailure "$packageName" "$($_.Exception.Message)"
#throw
#}