Skip to content

Commit

Permalink
Merged PR #38 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
TechieGuy12 committed Aug 15, 2023
2 parents 09d57df + e5ed1a1 commit 30a2ade
Show file tree
Hide file tree
Showing 10 changed files with 739 additions and 55 deletions.
37 changes: 36 additions & 1 deletion FileWatcher.sln
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.32112.339
Expand All @@ -10,16 +9,52 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "templates", "templates", "{
templates\config-template.xml = templates\config-template.xml
EndProjectSection
EndProject
Project("{B7DD6F7E-DEF8-4E67-B5B7-07EF123DB6F0}") = "FwInstaller", "FwInstaller\FwInstaller.wixproj", "{7ABA5E77-930C-490D-A73B-556589F70F6E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|ARM64 = Debug|ARM64
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|ARM64 = Release|ARM64
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F46457BB-E373-462E-8E5A-8EE669A4B57A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F46457BB-E373-462E-8E5A-8EE669A4B57A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F46457BB-E373-462E-8E5A-8EE669A4B57A}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{F46457BB-E373-462E-8E5A-8EE669A4B57A}.Debug|ARM64.Build.0 = Debug|Any CPU
{F46457BB-E373-462E-8E5A-8EE669A4B57A}.Debug|x64.ActiveCfg = Debug|Any CPU
{F46457BB-E373-462E-8E5A-8EE669A4B57A}.Debug|x64.Build.0 = Debug|Any CPU
{F46457BB-E373-462E-8E5A-8EE669A4B57A}.Debug|x86.ActiveCfg = Debug|Any CPU
{F46457BB-E373-462E-8E5A-8EE669A4B57A}.Debug|x86.Build.0 = Debug|Any CPU
{F46457BB-E373-462E-8E5A-8EE669A4B57A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F46457BB-E373-462E-8E5A-8EE669A4B57A}.Release|Any CPU.Build.0 = Release|Any CPU
{F46457BB-E373-462E-8E5A-8EE669A4B57A}.Release|ARM64.ActiveCfg = Release|Any CPU
{F46457BB-E373-462E-8E5A-8EE669A4B57A}.Release|ARM64.Build.0 = Release|Any CPU
{F46457BB-E373-462E-8E5A-8EE669A4B57A}.Release|x64.ActiveCfg = Release|Any CPU
{F46457BB-E373-462E-8E5A-8EE669A4B57A}.Release|x64.Build.0 = Release|Any CPU
{F46457BB-E373-462E-8E5A-8EE669A4B57A}.Release|x86.ActiveCfg = Release|Any CPU
{F46457BB-E373-462E-8E5A-8EE669A4B57A}.Release|x86.Build.0 = Release|Any CPU
{7ABA5E77-930C-490D-A73B-556589F70F6E}.Debug|Any CPU.ActiveCfg = Debug|x64
{7ABA5E77-930C-490D-A73B-556589F70F6E}.Debug|Any CPU.Build.0 = Debug|x64
{7ABA5E77-930C-490D-A73B-556589F70F6E}.Debug|ARM64.ActiveCfg = Debug|ARM64
{7ABA5E77-930C-490D-A73B-556589F70F6E}.Debug|ARM64.Build.0 = Debug|ARM64
{7ABA5E77-930C-490D-A73B-556589F70F6E}.Debug|x64.ActiveCfg = Debug|x64
{7ABA5E77-930C-490D-A73B-556589F70F6E}.Debug|x64.Build.0 = Debug|x64
{7ABA5E77-930C-490D-A73B-556589F70F6E}.Debug|x86.ActiveCfg = Debug|x86
{7ABA5E77-930C-490D-A73B-556589F70F6E}.Debug|x86.Build.0 = Debug|x86
{7ABA5E77-930C-490D-A73B-556589F70F6E}.Release|Any CPU.ActiveCfg = Release|x64
{7ABA5E77-930C-490D-A73B-556589F70F6E}.Release|Any CPU.Build.0 = Release|x64
{7ABA5E77-930C-490D-A73B-556589F70F6E}.Release|ARM64.ActiveCfg = Release|ARM64
{7ABA5E77-930C-490D-A73B-556589F70F6E}.Release|ARM64.Build.0 = Release|ARM64
{7ABA5E77-930C-490D-A73B-556589F70F6E}.Release|x64.ActiveCfg = Release|x64
{7ABA5E77-930C-490D-A73B-556589F70F6E}.Release|x64.Build.0 = Release|x64
{7ABA5E77-930C-490D-A73B-556589F70F6E}.Release|x86.ActiveCfg = Release|x86
{7ABA5E77-930C-490D-A73B-556589F70F6E}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
16 changes: 16 additions & 0 deletions FileWatcher/Properties/PublishProfiles/win-x64.pubxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<PublishDir>bin\Release\net6.0\win-x64\publish</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<TargetFramework>net6.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<PublishReadyToRun>false</PublishReadyToRun>
</PropertyGroup>
</Project>
11 changes: 11 additions & 0 deletions FwInstaller/FwInstaller.wixproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<Project Sdk="WixToolset.Sdk/4.0.0">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutputPath>..\FileWatcher\bin\Release\net6.0\publish\win-x64</OutputPath>
</PropertyGroup>
<ItemGroup>
<None Include="config.xml.sample" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FileWatcher\FileWatcher.csproj" />
</ItemGroup>
</Project>
79 changes: 79 additions & 0 deletions FwInstaller/Package.wxs
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- Define the variables in "$(var.*) expressions" -->
<?define Name = "FileWatcher Service" ?>
<?define Manufacturer = "Kåre Smith" ?>
<?define Version = "1.0.0.0" ?>
<?define UpgradeCode = "B3D46D88-3D2A-4648-B760-AB1E8C89742C" ?>

<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<Package Name="$(Name)"
Manufacturer="$(Manufacturer)"
Version="$(Version)"
UpgradeCode="$(var.UpgradeCode)"
Compressed="true"
>
<MediaTemplate EmbedCab="yes"/>

<!-- Allow upgrades and prevent downgrades -->
<MajorUpgrade DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit." />

<StandardDirectory Id="ProgramFiles6432Folder">
<!-- Create a folder inside program files -->
<Directory Id="ROOTDIRECTORY" Name="$(var.Manufacturer)">

<!-- Create a folder within the parent folder given the name -->
<Directory Id="INSTALLFOLDER" Name="$(Name)" />
</Directory>
</StandardDirectory>

<!-- The files inside this DirectoryRef are linked to
the fw directory via INSTALLFOLDER -->
<DirectoryRef Id="INSTALLFOLDER">

<!-- Create a single component which is the fw.exe file -->
<Component Id="ServiceExecutable" Bitness="always64">

<!-- Copies the fw.exe file using the
project reference preprocessor variables -->
<File Id="fw.exe"
Source="$(var.FileWatcher.TargetDir)publish\fw.exe"
KeyPath="true" />

<File Id="appsettings.json"
Source="$(var.FileWatcher.TargetDir)publish\appsettings.json"
KeyPath="false" />

<File Id="config.xml"
Source="config.xml.sample"
KeyPath="false" />


<!-- Remove all files from the INSTALLFOLDER on uninstall -->
<RemoveFile Id="ALLFILES" Name="*.*" On="both" />

<!-- Tell WiX to install the Service -->
<ServiceInstall Id="ServiceInstaller"
Type="ownProcess"
Name="$(Name)"
DisplayName="$(Name)"
Description="Monitors files and folders for changes"
Start="auto"
ErrorControl="normal" />

<!-- Tell WiX to start the Service Start="install" -->
<ServiceControl Id="StartService"
Stop="both"
Remove="uninstall"
Name="$(Name)"
Wait="true" />
</Component>
</DirectoryRef>

<!-- Tell WiX to install the files -->
<Feature Id="Service" Title="$(Name) Setup" Level="1">
<ComponentRef Id="ServiceExecutable" />
</Feature>

</Package>
</Wix>
Loading

0 comments on commit 30a2ade

Please sign in to comment.