Skip to content

Commit

Permalink
Add setup (msi package)
Browse files Browse the repository at this point in the history
  • Loading branch information
andre-hub committed Jun 13, 2017
1 parent 41c798f commit f6541bf
Show file tree
Hide file tree
Showing 16 changed files with 583 additions and 434 deletions.
42 changes: 42 additions & 0 deletions source/Chocolatey.AutoUpdater.Setup/Product.wxs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<?include Variables.wxi?>
<Product Id="$(var.ProductCode)"
Name="$(var.ProductName)"
Language="1033"
Codepage="utf-8"
Version="1.0.0.0"
Manufacturer="$(var.ManufacturerName)"
UpgradeCode="$(var.UpgradeCode)">

<Package InstallerVersion="200"
Compressed="yes"
InstallScope="perMachine"
Platforms="$(var.Platform)" />

<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate EmbedCab="yes" />

<Feature Id="ProductFeature" Title="$(var.ProductName)" Level="1">
<ComponentGroupRef Id="ProductComponents" />
</Feature>
</Product>

<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="$(var.ProductName)" />
</Directory>
</Directory>
</Fragment>

<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<Component Id="ProductComponent" Guid="3e8ea35b-f3fd-4ef1-9311-b852be2e0596">
<File Id="$(var.ApplicationExe)" Source="$(var.SourcePath)\$(var.ApplicationExe)" KeyPath="yes" Checksum="yes"/>
<File Id="$(var.ApplicationExe).config" Source="$(var.SourcePath)\$(var.ApplicationExe).config" KeyPath="false" Checksum="yes"/>
<File Id="NLog.dll" Source="$(var.SourcePath)\NLog.dll" KeyPath="false" Checksum="yes"/>
</Component>
</ComponentGroup>
</Fragment>
</Wix>
49 changes: 49 additions & 0 deletions source/Chocolatey.AutoUpdater.Setup/Setup.wixproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" InitialTargets="EnsureWixToolsetInstalled" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>3.9</ProductVersion>
<ProjectGuid>3e8ea35b-f3fd-4ef1-9311-b852be2e0596</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>Chocolatey-AutoUpdater-Setup</OutputName>
<OutputType>Package</OutputType>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\WiX Toolset\v4\wix.targets</WixTargetsPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<OutputPath>..\..\setup\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>Debug</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<OutputPath>bin\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<ItemGroup>
<Compile Include="Product.wxs" />
</ItemGroup>
<ItemGroup>
<Content Include="Variables.wxi" />
</ItemGroup>
<Import Project="$(WixTargetsPath)" Condition=" Exists('$(WixTargetsPath)') " />
<Target Name="EnsureWixToolsetInstalled" Condition=" !Exists('$(WixTargetsPath)') ">
<Error Text="The WiX Toolset v4 build tools must be installed to build this project. To download the WiX Toolset v4, see http://wixtoolset.org/releases/" />
</Target>
<Target Name="CleanUp">
<ItemGroup>
<CleanUpPdbFiles Include="$(SourcePath)*.pdb" />
<CleanUpXmlFiles Include="$(SourcePath)*.xml" />
</ItemGroup>
<Delete Files="@(CleanUpPdbFiles)" />
<Delete Files="@(CleanUpXmlFiles)" />
</Target>
<Target Name="BeforeBuild" DependsOnTargets="CleanUp" />
<!--
To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Wix.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
23 changes: 23 additions & 0 deletions source/Chocolatey.AutoUpdater.Setup/Variables.wxi
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<Include>
<?define ProductName = "Chocolatey.AutoUpdater"?>
<?define ProductVersion = "1.0.0"?>
<?define ManufacturerName = "somafu sandbox"?>
<?define ManufacturerUrl = "http://sandbox.somafu.com"?>
<?define ApplicationExe = "Chocolatey.AutoUpdater.exe"?>
<?define ProductDescription = "application autoupdater"?>
<?define Platform = "x64"?>

<!--NEVER TOUCH!!!-->
<?define UpgradeCode="309b186b-6113-4c16-8da5-865e984630a8"?>
<?define AppDirName="$(var.ProductName)"?>
<?define SourcePath="..\..\out\"?>
<?define TargetPattern="[#$(var.ApplicationExe)]"?>
<?define RegistryKey = "SOFTWARE\$(var.ProductName)" ?>
<?define ProductCode = "*" ?>
<?if $(var.Platform) = x64 ?>
<?define Win64 = 'yes'?>
<?else?>
<?define Win64 = 'no'?>
<?endif?>
</Include>
58 changes: 36 additions & 22 deletions Chocolatey.AutoUpdater.sln → source/Chocolatey.AutoUpdater.sln
Original file line number Diff line number Diff line change
@@ -1,22 +1,36 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26430.12
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Chocolatey.AutoUpdater", "Chocolatey.AutoUpdater\Chocolatey.AutoUpdater.csproj", "{2B668BF8-CB36-40FE-A49F-5585531E88C7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2B668BF8-CB36-40FE-A49F-5585531E88C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2B668BF8-CB36-40FE-A49F-5585531E88C7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2B668BF8-CB36-40FE-A49F-5585531E88C7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2B668BF8-CB36-40FE-A49F-5585531E88C7}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26430.12
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Chocolatey.AutoUpdater", "Chocolatey.AutoUpdater\Chocolatey.AutoUpdater.csproj", "{2B668BF8-CB36-40FE-A49F-5585531E88C7}"
EndProject
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "Chocolatey.AutoUpdater.Setup", "Chocolatey.AutoUpdater.Setup\Setup.wixproj", "{3E8EA35B-F3FD-4EF1-9311-B852BE2E0596}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2B668BF8-CB36-40FE-A49F-5585531E88C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2B668BF8-CB36-40FE-A49F-5585531E88C7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2B668BF8-CB36-40FE-A49F-5585531E88C7}.Debug|x86.ActiveCfg = Debug|Any CPU
{2B668BF8-CB36-40FE-A49F-5585531E88C7}.Debug|x86.Build.0 = Debug|Any CPU
{2B668BF8-CB36-40FE-A49F-5585531E88C7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2B668BF8-CB36-40FE-A49F-5585531E88C7}.Release|Any CPU.Build.0 = Release|Any CPU
{2B668BF8-CB36-40FE-A49F-5585531E88C7}.Release|x86.ActiveCfg = Release|Any CPU
{2B668BF8-CB36-40FE-A49F-5585531E88C7}.Release|x86.Build.0 = Release|Any CPU
{3E8EA35B-F3FD-4EF1-9311-B852BE2E0596}.Debug|Any CPU.ActiveCfg = Debug|x86
{3E8EA35B-F3FD-4EF1-9311-B852BE2E0596}.Debug|x86.ActiveCfg = Debug|x86
{3E8EA35B-F3FD-4EF1-9311-B852BE2E0596}.Debug|x86.Build.0 = Debug|x86
{3E8EA35B-F3FD-4EF1-9311-B852BE2E0596}.Release|Any CPU.ActiveCfg = Release|x86
{3E8EA35B-F3FD-4EF1-9311-B852BE2E0596}.Release|x86.ActiveCfg = Release|x86
{3E8EA35B-F3FD-4EF1-9311-B852BE2E0596}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog"/>
</configSections>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<targets>
<!--<target name="consoleLog" xsi:type="Console" layout="${longdate} ${level} ${logger} ${message}"/>-->
<target name="file" xsi:type="AsyncWrapper" queueLimit="5000" overflowAction="Discard">
<target name="file" xsi:type="File" layout="${longdate} ${level} ${logger} ${message} ${exception:format=tostring} ${exception:innerFormat=Message,StackTrace}" fileName="c:/logs/AutoUpdater/${shortdate}.log"/>
</target>
</targets>
<rules>
<logger name="*" minlevel="Debug" writeTo="file"/>
</rules>
</nlog>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<appSettings>
<add key="IntervalInMilliseconds" value="60000" /><!-- 1 Min -->
<add key="ChocolateyPath" value="C:\ProgramData\chocolatey\bin\choco.exe" />
</appSettings>
</configuration>
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog"/>
</configSections>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<targets>
<!--<target name="consoleLog" xsi:type="Console" layout="${longdate} ${level} ${logger} ${message}"/>-->
<target name="file" xsi:type="AsyncWrapper" queueLimit="5000" overflowAction="Discard">
<target name="file" xsi:type="File" layout="${longdate} ${level} ${logger} ${message} ${exception:format=tostring} ${exception:innerFormat=Message,StackTrace}" fileName="c:/logs/AutoUpdater/${shortdate}.log"/>
</target>
</targets>
<rules>
<logger name="*" minlevel="Debug" writeTo="file"/>
</rules>
</nlog>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<appSettings>
<add key="IntervalInMilliseconds" value="60000" /><!-- 1 Min -->
<add key="ChocolateyPath" value="C:\ProgramData\chocolatey\bin\choco.exe" />
<add key="ProxyUrl" value="" />
</appSettings>
</configuration>
Original file line number Diff line number Diff line change
@@ -1,72 +1,73 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{2B668BF8-CB36-40FE-A49F-5585531E88C7}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>Chocolatey.AutoUpdater</RootNamespace>
<AssemblyName>Chocolatey.AutoUpdater</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\out\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\out\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.4.10\lib\net45\NLog.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.ServiceProcess" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Configuration\AppSettingBase.cs" />
<Compile Include="Configuration\ComponentsContainer.cs" />
<Compile Include="Configuration\Config.cs" />
<Compile Include="NT-Service\Service.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="NT-Service\Service.Designer.cs">
<DependentUpon>Service.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Components\AppModel.cs" />
<Compile Include="NT-Service\TimeScheduler.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config">
<SubType>Designer</SubType>
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{2B668BF8-CB36-40FE-A49F-5585531E88C7}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>Chocolatey.AutoUpdater</RootNamespace>
<AssemblyName>Chocolatey.AutoUpdater</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\out\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\out\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.4.10\lib\net45\NLog.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.ServiceProcess" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Configuration\AppSettingBase.cs" />
<Compile Include="Configuration\ComponentsContainer.cs" />
<Compile Include="Configuration\Config.cs" />
<Compile Include="NT-Service\Service.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="NT-Service\Service.Designer.cs">
<DependentUpon>Service.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Components\AppModel.cs" />
<Compile Include="NT-Service\TimeScheduler.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config">
<SubType>Designer</SubType>
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
Loading

0 comments on commit f6541bf

Please sign in to comment.