Skip to content

Commit

Permalink
updated setup
Browse files Browse the repository at this point in the history
  • Loading branch information
fbarresi committed Mar 20, 2020
1 parent 97b282a commit f77aca9
Show file tree
Hide file tree
Showing 3 changed files with 154 additions and 4 deletions.
72 changes: 72 additions & 0 deletions TFU002/TFU002.Setup/Product.wxs
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">

<Product Id="*" Name="Beckhoff S7 Client" Language="1033" Version="!(bind.FileVersion.exe)" Manufacturer="fbarresi" UpgradeCode="017809a0-af9e-4125-8ec7-cdfa25e34162">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />

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

<Feature Id="ProductFeature" Title="TFU002 Beckhoff S7 Client" Level="1">
<ComponentGroupRef Id="ProductComponents" />
</Feature>

<UI Id="UserInterface">
<Property Id="WIXUI_INSTALLDIR" Value="TARGETDIR" />
<Property Id="WixUI_Mode" Value="Custom" />

<TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" />
<TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="9" Bold="yes" />
<TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes" />

<Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />

<DialogRef Id="ProgressDlg" />
<DialogRef Id="ErrorDlg" />
<DialogRef Id="FilesInUse" />
<DialogRef Id="FatalError" />
<DialogRef Id="UserExit" />

<Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>
<Publish Dialog="WelcomeDlg" Control="Next" Event="EndDialog" Value="Return" Order="2"></Publish>

</UI>
<UIRef Id="WixUI_Common" />

<Property Id="ACCOUNT" Secure="yes" Value="TFUServiceUser" />
<Property Id="PASSWORD" Secure="yes" Value="Tw1nc4tR0ck5" />
</Product>

<Fragment>
<SetDirectory Id="TWINCAT" Value="[WindowsVolume]TwinCAT"/>

<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="TWINCAT" >
<Directory Id="functions" Name="Functions" >
<Directory Id="unofficial" Name="Unofficial" >
<Directory Id="INSTALLFOLDER" Name="BeckhoffS7Client" />
</Directory>
</Directory>
</Directory>
</Directory>
</Fragment>

<Fragment>

<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER" >
<!-- TODO: Remove the comments around this Component element and the ComponentRef below in order to add resources to this installer. -->
<Component Id="ProductComponent" Guid="8227A017-5694-4FC0-97E4-31ED11AF3AA1">
<!-- TODO: Insert files, registry keys, and other resources here. -->
<File Id="exe" Checksum="yes" Source="..\out\TFU002.Service.exe" />

<util:User Domain="[ComputerName]" Id="UpdateUserLogonAsService" UpdateIfExists="no" CreateUser="yes" PasswordNeverExpires="yes" CanNotChangePassword="yes" Name="[ACCOUNT]" Password="[PASSWORD]" LogonAsService="yes" RemoveOnUninstall="no" />
<ServiceInstall Id="ServiceInstaller" Type="ownProcess" Vital="yes" Name="Beckhoff S7 Client Service" DisplayName="Beckhoff S7 Client Service" Description="Beckhoff S7 Client Service" Start="auto" Account=".\[ACCOUNT]" Password="[PASSWORD]" ErrorControl="normal" Interactive="no">
<util:ServiceConfig FirstFailureActionType="restart" SecondFailureActionType="restart" ThirdFailureActionType="none" RestartServiceDelayInSeconds="30" ResetPeriodInDays="1" />
</ServiceInstall>
<ServiceControl Id="StartService" Name="Beckhoff S7 Client Service" Start="install" Stop="both" Remove="uninstall" Wait="yes" />

</Component>
</ComponentGroup>
</Fragment>
</Wix>
51 changes: 51 additions & 0 deletions TFU002/TFU002.Setup/TFU002.Setup.wixproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?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.10</ProductVersion>
<ProjectGuid>ae7c3fe5-1377-4f04-bf4b-ee01b8265744</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>TFU002.Setup</OutputName>
<OutputType>Package</OutputType>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<OutputPath>bin\$(Configuration)\</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>
<WixExtension Include="WixUtilExtension">
<HintPath>$(WixExtDir)\WixUtilExtension.dll</HintPath>
<Name>WixUtilExtension</Name>
</WixExtension>
<WixExtension Include="WixUIExtension">
<HintPath>$(WixExtDir)\WixUIExtension.dll</HintPath>
<Name>WixUIExtension</Name>
</WixExtension>
<WixExtension Include="WixNetFxExtension">
<HintPath>$(WixExtDir)\WixNetFxExtension.dll</HintPath>
<Name>WixNetFxExtension</Name>
</WixExtension>
</ItemGroup>
<Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' " />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets" Condition=" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets') " />
<Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixTargetsImported)' != 'true' ">
<Error Text="The WiX Toolset v3.11 (or newer) build tools must be installed to build this project. To download the WiX Toolset, see http://wixtoolset.org/releases/" />
</Target>
<!--
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>
35 changes: 31 additions & 4 deletions TFU002/TFU002.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,63 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.28803.352
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TFU002.Service", "TFU002.Service\TFU002.Service.csproj", "{5070AD56-B0F0-4ADC-82ED-B42615AA89E4}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TFU002.Service", "TFU002.Service\TFU002.Service.csproj", "{5070AD56-B0F0-4ADC-82ED-B42615AA89E4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TFU002.Logic", "TFU002.Logic\TFU002.Logic.csproj", "{E65ACA75-BDE2-4BE9-938E-5ECF5C2C65FE}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TFU002.Logic", "TFU002.Logic\TFU002.Logic.csproj", "{E65ACA75-BDE2-4BE9-938E-5ECF5C2C65FE}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TFU002.Interfaces", "TFU002.Interfaces\TFU002.Interfaces.csproj", "{137207E2-122A-426E-9826-9C8C717F6BDC}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TFU002.Interfaces", "TFU002.Interfaces\TFU002.Interfaces.csproj", "{137207E2-122A-426E-9826-9C8C717F6BDC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TFU002.Tests", "TFU002.Tests\TFU002.Tests.csproj", "{576EE1D9-131F-4123-81FB-95EF29265DDA}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TFU002.Tests", "TFU002.Tests\TFU002.Tests.csproj", "{576EE1D9-131F-4123-81FB-95EF29265DDA}"
EndProject
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "TFU002.Setup", "TFU002.Setup\TFU002.Setup.wixproj", "{AE7C3FE5-1377-4F04-BF4B-EE01B8265744}"
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
{5070AD56-B0F0-4ADC-82ED-B42615AA89E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5070AD56-B0F0-4ADC-82ED-B42615AA89E4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5070AD56-B0F0-4ADC-82ED-B42615AA89E4}.Debug|x86.ActiveCfg = Debug|Any CPU
{5070AD56-B0F0-4ADC-82ED-B42615AA89E4}.Debug|x86.Build.0 = Debug|Any CPU
{5070AD56-B0F0-4ADC-82ED-B42615AA89E4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5070AD56-B0F0-4ADC-82ED-B42615AA89E4}.Release|Any CPU.Build.0 = Release|Any CPU
{5070AD56-B0F0-4ADC-82ED-B42615AA89E4}.Release|x86.ActiveCfg = Release|Any CPU
{5070AD56-B0F0-4ADC-82ED-B42615AA89E4}.Release|x86.Build.0 = Release|Any CPU
{E65ACA75-BDE2-4BE9-938E-5ECF5C2C65FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E65ACA75-BDE2-4BE9-938E-5ECF5C2C65FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E65ACA75-BDE2-4BE9-938E-5ECF5C2C65FE}.Debug|x86.ActiveCfg = Debug|Any CPU
{E65ACA75-BDE2-4BE9-938E-5ECF5C2C65FE}.Debug|x86.Build.0 = Debug|Any CPU
{E65ACA75-BDE2-4BE9-938E-5ECF5C2C65FE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E65ACA75-BDE2-4BE9-938E-5ECF5C2C65FE}.Release|Any CPU.Build.0 = Release|Any CPU
{E65ACA75-BDE2-4BE9-938E-5ECF5C2C65FE}.Release|x86.ActiveCfg = Release|Any CPU
{E65ACA75-BDE2-4BE9-938E-5ECF5C2C65FE}.Release|x86.Build.0 = Release|Any CPU
{137207E2-122A-426E-9826-9C8C717F6BDC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{137207E2-122A-426E-9826-9C8C717F6BDC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{137207E2-122A-426E-9826-9C8C717F6BDC}.Debug|x86.ActiveCfg = Debug|Any CPU
{137207E2-122A-426E-9826-9C8C717F6BDC}.Debug|x86.Build.0 = Debug|Any CPU
{137207E2-122A-426E-9826-9C8C717F6BDC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{137207E2-122A-426E-9826-9C8C717F6BDC}.Release|Any CPU.Build.0 = Release|Any CPU
{137207E2-122A-426E-9826-9C8C717F6BDC}.Release|x86.ActiveCfg = Release|Any CPU
{137207E2-122A-426E-9826-9C8C717F6BDC}.Release|x86.Build.0 = Release|Any CPU
{576EE1D9-131F-4123-81FB-95EF29265DDA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{576EE1D9-131F-4123-81FB-95EF29265DDA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{576EE1D9-131F-4123-81FB-95EF29265DDA}.Debug|x86.ActiveCfg = Debug|Any CPU
{576EE1D9-131F-4123-81FB-95EF29265DDA}.Debug|x86.Build.0 = Debug|Any CPU
{576EE1D9-131F-4123-81FB-95EF29265DDA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{576EE1D9-131F-4123-81FB-95EF29265DDA}.Release|Any CPU.Build.0 = Release|Any CPU
{576EE1D9-131F-4123-81FB-95EF29265DDA}.Release|x86.ActiveCfg = Release|Any CPU
{576EE1D9-131F-4123-81FB-95EF29265DDA}.Release|x86.Build.0 = Release|Any CPU
{AE7C3FE5-1377-4F04-BF4B-EE01B8265744}.Debug|Any CPU.ActiveCfg = Debug|x86
{AE7C3FE5-1377-4F04-BF4B-EE01B8265744}.Debug|x86.ActiveCfg = Debug|x86
{AE7C3FE5-1377-4F04-BF4B-EE01B8265744}.Debug|x86.Build.0 = Debug|x86
{AE7C3FE5-1377-4F04-BF4B-EE01B8265744}.Release|Any CPU.ActiveCfg = Release|x86
{AE7C3FE5-1377-4F04-BF4B-EE01B8265744}.Release|Any CPU.Build.0 = Release|x86
{AE7C3FE5-1377-4F04-BF4B-EE01B8265744}.Release|x86.ActiveCfg = Release|x86
{AE7C3FE5-1377-4F04-BF4B-EE01B8265744}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down

0 comments on commit f77aca9

Please sign in to comment.