Remove WinForms references and start on installer

This commit is contained in:
2023-04-22 09:05:41 -04:00
parent d6a2fd5a46
commit 586a0497d6
14 changed files with 572 additions and 676 deletions

View File

@@ -106,9 +106,6 @@ public partial class App
if (!IsDebugBuild) if (!IsDebugBuild)
Current.SetStartWithWindows(Settings.Default.StartWithWindows); Current.SetStartWithWindows(Settings.Default.StartWithWindows);
// Initialize the window
mainWindow.Initialize();
// Run the app // Run the app
app.Run(mainWindow); app.Run(mainWindow);
} }

View File

@@ -1,127 +1,30 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net70-windows</TargetFramework> <TargetFramework>net70-windows</TargetFramework>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<IsWebBootstrapper>false</IsWebBootstrapper>
<SccProjectName></SccProjectName>
<SccLocalPath></SccLocalPath>
<SccAuxPath></SccAuxPath>
<SccProvider></SccProvider>
<PublishUrl>\\server\d\FeedCenter\</PublishUrl>
<Install>true</Install>
<InstallFrom>Unc</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ProductName>Feed Center</ProductName>
<PublisherName>Feed Center</PublisherName>
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>Publish.html</WebPage>
<OpenBrowserOnPublish>false</OpenBrowserOnPublish>
<ApplicationRevision>215</ApplicationRevision>
<ApplicationVersion>0.1.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<PublishWizardCompleted>true</PublishWizardCompleted>
<BootstrapperEnabled>true</BootstrapperEnabled>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo> <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWindowsForms>true</UseWindowsForms> <UseWindowsForms>false</UseWindowsForms>
<UseWPF>true</UseWPF> <UseWPF>true</UseWPF>
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets> <ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
</PropertyGroup>
<PropertyGroup>
<StartupObject></StartupObject>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<EnableDefaultApplicationDefinition>false</EnableDefaultApplicationDefinition> <EnableDefaultApplicationDefinition>false</EnableDefaultApplicationDefinition>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile></AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>Resources\Application.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup>
<TargetZone>LocalIntranet</TargetZone>
</PropertyGroup>
<PropertyGroup> <PropertyGroup>
<GenerateManifests>false</GenerateManifests> <GenerateManifests>false</GenerateManifests>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<ApplicationManifest>Properties\app.manifest</ApplicationManifest>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<CodeAnalysisLogFile>bin\Debug\FeedCenter.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
<UseVSHostingProcess>true</UseVSHostingProcess>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<CodeAnalysisLogFile>bin\Release\FeedCenter.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<OutputPath>bin\x64\Debug\</OutputPath>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<EntityDeploy Include="Model.edmx"> <None Remove="Resources\Application.ico" />
<Generator>EntityModelCodeGenerator</Generator> <None Remove="Resources\Comments-edit.ico" />
<LastGenOutput>Model.Designer.cs</LastGenOutput> <None Remove="Resources\Compile.ico" />
</EntityDeploy> <None Remove="Resources\Left.ico" />
<AppDesigner Include="Properties\" /> <None Remove="Resources\News.ico" />
<None Remove="Resources\Right.ico" />
<None Remove="Resources\Rss-Download.ico" />
<None Remove="Resources\Warning.ico" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Resource Include="Resources\Application.ico" /> <Content Include="Resources\Application.ico" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.5">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.5 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.4.5">
<Visible>False</Visible>
<ProductName>Windows Installer 4.5</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\Rss-Download.ico" />
<Resource Include="Resources\Comments-edit.ico" />
<Resource Include="Resources\Warning.ico" />
<Resource Include="Resources\News.ico" />
<Resource Include="Resources\Compile.ico" />
<Resource Include="Resources\Left.ico" />
<Resource Include="Resources\Right.ico" />
</ItemGroup>
<ItemGroup>
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="ChrisKaczor.ApplicationUpdate" Version="1.0.2" /> <PackageReference Include="ChrisKaczor.ApplicationUpdate" Version="1.0.2" />
@@ -137,6 +40,7 @@
<PackageReference Include="ChrisKaczor.Wpf.Windows.SnappingWindow" Version="1.0.2" /> <PackageReference Include="ChrisKaczor.Wpf.Windows.SnappingWindow" Version="1.0.2" />
<PackageReference Include="Dapper" Version="2.0.123" /> <PackageReference Include="Dapper" Version="2.0.123" />
<PackageReference Include="DebounceThrottle" Version="2.0.0" /> <PackageReference Include="DebounceThrottle" Version="2.0.0" />
<PackageReference Include="H.NotifyIcon.Wpf" Version="2.0.108" />
<PackageReference Include="HtmlAgilityPack" Version="1.11.46" /> <PackageReference Include="HtmlAgilityPack" Version="1.11.46" />
<PackageReference Include="HtmlTextWriter" Version="2.1.1" /> <PackageReference Include="HtmlTextWriter" Version="2.1.1" />
<PackageReference Include="MahApps.Metro" Version="2.4.9" /> <PackageReference Include="MahApps.Metro" Version="2.4.9" />
@@ -155,7 +59,14 @@
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" /> <PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Remove="SqlSettingsProvider.cs" /> <Resource Include="Resources\Application.ico" />
<Resource Include="Resources\Comments-edit.ico" />
<Resource Include="Resources\Compile.ico" />
<Resource Include="Resources\Left.ico" />
<Resource Include="Resources\News.ico" />
<Resource Include="Resources\Right.ico" />
<Resource Include="Resources\Rss-Download.ico" />
<Resource Include="Resources\Warning.ico" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Update="Properties\Resources.Designer.cs"> <Compile Update="Properties\Resources.Designer.cs">
@@ -181,12 +92,17 @@
<LastGenOutput>Settings.Designer.cs</LastGenOutput> <LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None> </None>
</ItemGroup> </ItemGroup>
<Target Name="AddSqlServerCompact_x86" AfterTargets="Publish" Condition="'$(RuntimeIdentifier)' == 'win-x86'">
<Exec Command="xcopy /s /y /i &quot;$(PkgMicrosoft_SqlServer_Compact)\NativeBinaries\x86\*.*&quot; &quot;$(PublishDir)x86&quot;" />
</Target>
<Target Name="AddSqlServerCompact_x64" AfterTargets="Publish" Condition="'$(RuntimeIdentifier)' == 'win-x64'">
<Exec Command="xcopy /s /y /i &quot;$(PkgMicrosoft_SqlServer_Compact)\NativeBinaries\amd64\*.*&quot; &quot;$(PublishDir)amd64&quot;" />
</Target>
<PropertyGroup> <PropertyGroup>
<PostBuildEvent> <PostBuildEvent>
if not exist "$(TargetDir)x86" md "$(TargetDir)x86" xcopy /s /y /i "$(PkgMicrosoft_SqlServer_Compact)\NativeBinaries\x86\*.*" "$(TargetDir)x86"
xcopy /s /y "$(PkgMicrosoft_SqlServer_Compact)\NativeBinaries\x86\*.*" "$(TargetDir)x86" xcopy /s /y /i "$(PkgMicrosoft_SqlServer_Compact)\NativeBinaries\amd64\*.*" "$(TargetDir)amd64"
if not exist "$(TargetDir)amd64" md "$(TargetDir)amd64"
xcopy /s /y "$(PkgMicrosoft_SqlServer_Compact)\NativeBinaries\amd64\*.*" "$(TargetDir)amd64"
</PostBuildEvent> </PostBuildEvent>
<ApplicationIcon>Resources\Application.ico</ApplicationIcon>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@@ -86,7 +86,7 @@ public partial class MainWindow
_database.SaveChanges(() => _database.Feeds.Add(feed)); _database.SaveChanges(() => _database.Feeds.Add(feed));
// Show a tip // Show a tip
NotificationIcon.ShowBalloonTip(string.Format(Properties.Resources.FeedAddedNotification, feed.Name), System.Windows.Forms.ToolTipIcon.Info); NotificationIcon.ShowBalloonTip(string.Format(Properties.Resources.FeedAddedNotification, feed.Name), H.NotifyIcon.Core.NotificationIcon.Info);
_currentFeed = feed; _currentFeed = feed;

View File

@@ -34,6 +34,14 @@ public partial class MainWindow : IDisposable
GC.SuppressFinalize(this); GC.SuppressFinalize(this);
} }
protected override void OnSourceInitialized(EventArgs e)
{
base.OnSourceInitialized(e);
// Initialize the window
Initialize();
}
protected override async void OnClosed(EventArgs e) protected override async void OnClosed(EventArgs e)
{ {
base.OnClosed(e); base.OnClosed(e);
@@ -207,9 +215,7 @@ public partial class MainWindow : IDisposable
private void InitializeDisplay() private void InitializeDisplay()
{ {
// Get the last category (defaulting to none) // Get the last category (defaulting to none)
_currentCategory = _currentCategory = _database.Categories.FirstOrDefault(category => category.Id.ToString() == Settings.Default.LastCategoryID);
_database.Categories.FirstOrDefault(category =>
category.Id.ToString() == Settings.Default.LastCategoryID);
DisplayCategory(); DisplayCategory();
// Get the current feed list to match the category // Get the current feed list to match the category

View File

@@ -1,6 +1,7 @@
using FeedCenter.Properties; using FeedCenter.Properties;
using System; using System;
using System.Windows.Forms; using System.Timers;
using System.Windows.Threading;
namespace FeedCenter; namespace FeedCenter;
@@ -9,11 +10,14 @@ public partial class MainWindow
private Timer _mainTimer; private Timer _mainTimer;
private DateTime _lastFeedRead; private DateTime _lastFeedRead;
private DateTime _lastFeedDisplay; private DateTime _lastFeedDisplay;
private Dispatcher _dispatcher;
private void InitializeTimer() private void InitializeTimer()
{ {
_dispatcher = Dispatcher.CurrentDispatcher;
_mainTimer = new Timer { Interval = 1000 }; _mainTimer = new Timer { Interval = 1000 };
_mainTimer.Tick += HandleMainTimerTick; _mainTimer.Elapsed += HandleMainTimerElapsed;
} }
private void TerminateTimer() private void TerminateTimer()
@@ -33,7 +37,9 @@ public partial class MainWindow
_mainTimer.Stop(); _mainTimer.Stop();
} }
private void HandleMainTimerTick(object sender, EventArgs e) private void HandleMainTimerElapsed(object sender, EventArgs e)
{
_dispatcher.Invoke(() =>
{ {
// If the background worker is busy then don't do anything // If the background worker is busy then don't do anything
if (_feedReadWorker.IsBusy) if (_feedReadWorker.IsBusy)
@@ -54,5 +60,6 @@ public partial class MainWindow
// Get the timer going again // Get the timer going again
StartTimer(); StartTimer();
});
} }
} }

View File

@@ -112,28 +112,28 @@ public partial class MainWindow
{ {
var windowInteropHelper = new WindowInteropHelper(this); var windowInteropHelper = new WindowInteropHelper(this);
var screen = System.Windows.Forms.Screen.FromHandle(windowInteropHelper.Handle); var screen = WpfScreenHelper.Screen.FromHandle(windowInteropHelper.Handle);
var rectangle = new System.Drawing.Rectangle var rectangle = new Rect
{ {
X = (int) Left, X = Left,
Y = (int) Top, Y = Top,
Width = (int) Width, Width = Width,
Height = (int) Height Height = Height
}; };
var borderThickness = new Thickness(); var borderThickness = new Thickness();
if (rectangle.Right != screen.WorkingArea.Right) if (!rectangle.Right.Equals(screen.WorkingArea.Right))
borderThickness.Right = 1; borderThickness.Right = 1;
if (rectangle.Left != screen.WorkingArea.Left) if (!rectangle.Left.Equals(screen.WorkingArea.Left))
borderThickness.Left = 1; borderThickness.Left = 1;
if (rectangle.Top != screen.WorkingArea.Top) if (!rectangle.Top.Equals(screen.WorkingArea.Top))
borderThickness.Top = 1; borderThickness.Top = 1;
if (rectangle.Bottom != screen.WorkingArea.Bottom) if (!rectangle.Bottom.Equals(screen.WorkingArea.Bottom))
borderThickness.Bottom = 1; borderThickness.Bottom = 1;
WindowBorder.BorderThickness = borderThickness; WindowBorder.BorderThickness = borderThickness;

View File

@@ -1,49 +1,61 @@
using FeedCenter.Properties; using FeedCenter.Properties;
using System.Windows.Forms; using H.NotifyIcon;
using System.Windows.Controls;
namespace FeedCenter; namespace FeedCenter;
internal static class NotificationIcon internal static class NotificationIcon
{ {
private static MainWindow _mainForm; private static MainWindow _mainWindow;
private static NotifyIcon _notificationIcon; private static TaskbarIcon _notificationIcon;
private static MenuItem _lockMenuItem;
public static void Initialize(MainWindow mainForm) public static void Initialize(MainWindow mainWindow)
{ {
// Store the main window // Store the main window
_mainForm = mainForm; _mainWindow = mainWindow;
// Create the notification icon // Create the notification icon
_notificationIcon = new NotifyIcon { Icon = Resources.Application }; _notificationIcon = new TaskbarIcon { Icon = Resources.Application };
_notificationIcon.DoubleClick += HandleNotificationIconDoubleClick; _notificationIcon.TrayMouseDoubleClick += HandleNotificationIconDoubleClick;
// Setup the menu // Setup the menu
var contextMenuStrip = new ContextMenuStrip(); var contextMenu = new ContextMenu();
var toolStripMenuItem = new ToolStripMenuItem(Resources.NotificationIconContextMenuLocked, null, HandleLockWindowClicked) { Checked = Settings.Default.WindowLocked }; _lockMenuItem = new MenuItem()
contextMenuStrip.Items.Add(toolStripMenuItem); {
Header = Resources.NotificationIconContextMenuLocked,
IsChecked = Settings.Default.WindowLocked
};
_lockMenuItem.Click += HandleLockWindowClicked;
contextMenu.Items.Add(_lockMenuItem);
contextMenuStrip.Items.Add(new ToolStripSeparator()); contextMenu.Items.Add(new Separator());
contextMenuStrip.Items.Add(Resources.NotificationIconContextMenuExit, null, HandleContextMenuExitClick); var menuItem = new MenuItem()
{
Header = Resources.NotificationIconContextMenuExit
};
menuItem.Click += HandleContextMenuExitClick;
contextMenu.Items.Add(menuItem);
// Set the menu into the icon // Set the menu into the icon
_notificationIcon.ContextMenuStrip = contextMenuStrip; _notificationIcon.ContextMenu = contextMenu;
// Show the icon // Show the icon
_notificationIcon.Visible = true; _notificationIcon.ForceCreate(false);
} }
private static void HandleNotificationIconDoubleClick(object sender, System.EventArgs e) private static void HandleNotificationIconDoubleClick(object sender, System.EventArgs e)
{ {
// Bring the main form to the front // Bring the main form to the front
_mainForm.Activate(); _mainWindow.Activate();
} }
private static void HandleContextMenuExitClick(object sender, System.EventArgs e) private static void HandleContextMenuExitClick(object sender, System.EventArgs e)
{ {
// Close the main form // Close the main form
_mainForm.Close(); _mainWindow.Close();
} }
private static void HandleLockWindowClicked(object sender, System.EventArgs e) private static void HandleLockWindowClicked(object sender, System.EventArgs e)
@@ -52,26 +64,20 @@ internal static class NotificationIcon
Settings.Default.WindowLocked = !Settings.Default.WindowLocked; Settings.Default.WindowLocked = !Settings.Default.WindowLocked;
// Refresh the menu choice // Refresh the menu choice
((ToolStripMenuItem) sender).Checked = Settings.Default.WindowLocked; _lockMenuItem.IsChecked = Settings.Default.WindowLocked;
} }
public static void Dispose() public static void Dispose()
{ {
// Get rid of the icon // Get rid of the icon
_notificationIcon.Visible = false;
_notificationIcon.Dispose(); _notificationIcon.Dispose();
_notificationIcon = null; _notificationIcon = null;
_mainForm = null; _mainWindow = null;
} }
public static void ShowBalloonTip(string text, ToolTipIcon icon) public static void ShowBalloonTip(string text, H.NotifyIcon.Core.NotificationIcon icon)
{ {
ShowBalloonTip(text, icon, Settings.Default.BalloonTipTimeout); _notificationIcon.ShowNotification(Resources.ApplicationDisplayName, text, icon);
}
private static void ShowBalloonTip(string text, ToolTipIcon icon, int timeout)
{
_notificationIcon.ShowBalloonTip(timeout, Resources.ApplicationDisplayName, text, icon);
} }
} }

View File

@@ -1,116 +0,0 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Configuration;
using System.Windows.Forms;
using System.Collections.Specialized;
using Microsoft.Win32;
namespace FeedCenter
{
class RegistrySettingsProvider : SettingsProvider
{
public RegistrySettingsProvider()
{
}
public override string ApplicationName
{
get { return Application.ProductName; }
set { }
}
public override void Initialize(string name, NameValueCollection col)
{
base.Initialize(this.ApplicationName, col);
}
// SetPropertyValue is invoked when ApplicationSettingsBase.Save is called
// ASB makes sure to pass each provider only the values marked for that provider -
// though in this sample, since the entire settings class was marked with a SettingsProvider
// attribute, all settings in that class map to this provider
public override void SetPropertyValues(SettingsContext context, SettingsPropertyValueCollection propvals)
{
// Iterate through the settings to be stored
// Only IsDirty=true properties should be included in propvals
foreach (SettingsPropertyValue propval in propvals)
{
// NOTE: this provider allows setting to both user- and application-scoped
// settings. The default provider for ApplicationSettingsBase -
// LocalFileSettingsProvider - is read-only for application-scoped setting. This
// is an example of a policy that a provider may need to enforce for implementation,
// security or other reasons.
GetRegKey(propval.Property).SetValue(propval.Name, propval.SerializedValue);
}
}
public override SettingsPropertyValueCollection GetPropertyValues(SettingsContext context, SettingsPropertyCollection props)
{
// Create new collection of values
SettingsPropertyValueCollection values = new SettingsPropertyValueCollection();
// Iterate through the settings to be retrieved
foreach (SettingsProperty setting in props)
{
SettingsPropertyValue value = new SettingsPropertyValue(setting);
value.IsDirty = false;
value.SerializedValue = GetRegKey(setting).GetValue(setting.Name);
values.Add(value);
}
return values;
}
// Helper method: fetches correct registry subkey.
// HKLM is used for settings marked as application-scoped.
// HKLU is used for settings marked as user-scoped.
private RegistryKey GetRegKey(SettingsProperty prop)
{
RegistryKey regKey;
if (IsUserScoped(prop))
{
regKey = Registry.CurrentUser;
}
else
{
regKey = Registry.LocalMachine;
}
regKey = regKey.CreateSubKey(GetSubKeyPath());
return regKey;
}
// Helper method: walks the "attribute bag" for a given property
// to determine if it is user-scoped or not.
// Note that this provider does not enforce other rules, such as
// - unknown attributes
// - improper attribute combinations (e.g. both user and app - this implementation
// would say true for user-scoped regardless of existence of app-scoped)
private bool IsUserScoped(SettingsProperty prop)
{
foreach (DictionaryEntry d in prop.Attributes)
{
Attribute a = (Attribute) d.Value;
if (a.GetType() == typeof(UserScopedSettingAttribute))
return true;
}
return false;
}
// Builds a key path based on the CompanyName, ProductName, and ProductVersion attributes in
// the AssemblyInfo file (editable directly or within the Project Properties UI)
private string GetSubKeyPath()
{
return "Software\\" + Application.CompanyName + "\\" + Application.ProductName + "\\" + Application.ProductVersion;
}
}
}

View File

@@ -1,42 +1,16 @@
<?xml version="1.0" encoding="utf-8"?> <Project>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Import Project="Sdk.props" Sdk="WixToolset.Sdk" Version="4.0.0" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>3.9</ProductVersion> <ProductVersion>3.9</ProductVersion>
<ProjectGuid>5e5c13a5-635e-4310-a653-0f9760f46935</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>FeedCenterSetup</OutputName> <OutputName>FeedCenterSetup</OutputName>
<OutputType>Bundle</OutputType> <OutputType>Bundle</OutputType>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
<RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent> <RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<OutputPath>bin\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>Debug</DefineConstants> <DefineConstants>Debug</DefineConstants>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<OutputPath>bin\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Bundle.wxs" /> <PackageReference Include="WixToolset.Bal.wixext" Version="4.0.0" />
</ItemGroup>
<ItemGroup>
<WixExtension Include="WixBalExtensionExt">
<HintPath>..\packages\WixBalExtensionExt.1.0.0.49\lib\WixBalExtensionExt.dll</HintPath>
<Name>WixBalExtensionExt</Name>
</WixExtension>
<WixExtension Include="WixFileVersionExtension">
<HintPath>..\packages\WixFileVersionExtension.1.0.0.3\lib\WixFileVersionExtension.dll</HintPath>
<Name>WixFileVersionExtension</Name>
</WixExtension>
<WixExtension Include="WixNetFxExtension">
<HintPath>$(WixExtDir)\WixNetFxExtension.dll</HintPath>
<Name>WixNetFxExtension</Name>
</WixExtension>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Application\FeedCenter.csproj"> <ProjectReference Include="..\Application\FeedCenter.csproj">
@@ -56,19 +30,8 @@
<RefTargetDir>INSTALLFOLDER</RefTargetDir> <RefTargetDir>INSTALLFOLDER</RefTargetDir>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <Import Project="Sdk.targets" Sdk="WixToolset.Sdk" Version="4.0.0" />
<Content Include="packages.config" />
</ItemGroup>
<Import Project="$(WixTargetsPath)" />
<PropertyGroup> <PropertyGroup>
<PostBuildEvent /> <PostBuildEvent />
</PropertyGroup> </PropertyGroup>
<!--
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> </Project>

View File

@@ -1,31 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?> <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal">
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
<?define ProductName="$(fileVersion.ProductName($(var.FeedCenter.TargetPath)))" ?> <?define ProductName="Feed Center" ?>
<?define CompanyName="$(fileVersion.CompanyName($(var.FeedCenter.TargetPath)))" ?> <?define CompanyName="Chris Kaczor" ?>
<?define ProductVersion="$(fileVersion.ProductVersion($(var.FeedCenter.TargetPath)))" ?> <?define ProductVersion="!(bind.packageVersion.FeedCenter)" ?>
<?define FileDescription="" ?>
<Bundle Name="$(var.ProductName)" <Bundle Name="$(var.ProductName)"
Version="$(var.ProductVersion)" Version="$(var.ProductVersion)"
Manufacturer="$(var.CompanyName)" Manufacturer="$(var.CompanyName)"
UpgradeCode="5e5c13a5-635e-4310-a653-0f9760f46935"> UpgradeCode="5e5c13a5-635e-4310-a653-0f9760f46935"
Compressed="no">
<BootstrapperApplicationRef Id="WixExtendedBootstrapperApplication.HyperlinkLicense"> <BootstrapperApplication Id="WixExtendedBootstrapperApplication.HyperlinkLicense">
<bal:WixExtendedBootstrapperApplication <!--<bal:WixStandardBootstrapperApplication LaunchPassive="yes" LaunchQuiet="yes" />-->
LicenseUrl="" <bal:WixStandardBootstrapperApplication LicenseUrl=""
SuppressOptionsUI="yes" SuppressOptionsUI="yes"
ShowVersion="yes" ShowVersion="yes"
LaunchPassive="yes" LaunchTarget="[LocalAppDataFolder]$(var.ProductName)\FeedCenter.exe"
LaunchQuiet="yes" Theme="hyperlinkLargeLicense" />
LaunchTarget="[LocalAppDataFolder]$(var.ProductName)\FeedCenter.exe" /> </BootstrapperApplication>
</BootstrapperApplicationRef>
<Chain> <Chain>
<PackageGroupRef Id="NetFx451Web" /> <ExePackage Id="runtime_desktop_x64"
DisplayName=".NET 7.0 Desktop Runtime (x64)"
InstallArguments="/install /quiet"
Permanent="yes"
InstallCondition='VersionNT64'>
<ArpEntry Id="runtime_desktop_x64_arp"
Version="7.0.5.32327"
Win64="yes" />
<ExePackagePayload Hash="8907aa0e934a31c63f0a840bf9e734c2f5ba109b766c1a775f8adbb169049753664790c0a15b216f02a942392819a3500e4a33918df10fb967341dc167f82d11"
DownloadUrl="https://download.visualstudio.microsoft.com/download/pr/dffb1939-cef1-4db3-a579-5475a3061cdd/578b208733c914c7b7357f6baa4ecfd6/windowsdesktop-runtime-7.0.5-win-x64.exe"
Name="windowsdesktop-runtime-7.0.5-win-x64.exe"
Size="57609944" />
</ExePackage>
<ExePackage Id="runtime_desktop_x32"
DisplayName=".NET 7.0 Desktop Runtime (x86)"
InstallArguments="/install /quiet"
Permanent="yes"
InstallCondition='NOT VersionNT64'>
<ArpEntry Id="runtime_desktop_x64_arp"
Version="7.0.5.32327"
Win64="no" />
<ExePackagePayload Hash="a2f776cfabcfbd4b9278198301d289ed1c56febd47259520c50b8b8d130a79d0ea99c857aec96865cc635ddf078fd575368c030ce11d61bb9991d296df87a4a7"
DownloadUrl="https://download.visualstudio.microsoft.com/download/pr/eb64dcd1-d277-4798-ada1-600805c9e2dc/fc73c843d66f3996e7ef22468f4902e6/windowsdesktop-runtime-7.0.5-win-x86.exe"
Name="windowsdesktop-runtime-7.0.5-win-x86.exe"
Size="52816632" />
</ExePackage>
<MsiPackage Id="FeedCenter" <MsiPackage Id="FeedCenter"
SourceFile="$(var.Setup.TargetPath)" /> SourceFile="$(var.Setup.TargetPath)"
Compressed="yes" />
</Chain> </Chain>
</Bundle> </Bundle>
</Wix> </Wix>

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="WixBalExtensionExt" version="1.0.0.49" />
<package id="WixFileVersionExtension" version="1.0.0.3" />
</packages>

View File

@@ -1,22 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?> <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util">
xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<?define ProductName="$(fileVersion.ProductName($(var.FeedCenter.TargetPath)))" ?>
<?define CompanyName="$(fileVersion.CompanyName($(var.FeedCenter.TargetPath)))" ?>
<?define ProductVersion="$(fileVersion.ProductVersion($(var.FeedCenter.TargetPath)))" ?>
<?define FileDescription="$(fileVersion.FileDescription($(var.FeedCenter.TargetPath)))" ?>
<Product Id="*" <?define ProductName="Feed Center" ?>
Name="$(var.ProductName)" <?define CompanyName="Chris Kaczor" ?>
<?define ProductVersion="!(bind.fileVersion.FeedCenter.exe)" ?>
<?define FileDescription="" ?>
<Package Name="$(var.ProductName)"
Language="1033" Language="1033"
Version="$(var.ProductVersion)" Version="$(var.ProductVersion)"
Manufacturer="$(var.CompanyName)" Manufacturer="$(var.CompanyName)"
UpgradeCode="47f30e4a-a861-47ac-b82d-35e4b886992a"> UpgradeCode="47f30e4a-a861-47ac-b82d-35e4b886992a"
<Package InstallerVersion="405" Scope="perUser">
Compressed="yes"
InstallScope="perUser" />
<util:CloseApplication Id="CloseApplication" <util:CloseApplication Id="CloseApplication"
Target="FeedCenter.exe" Target="FeedCenter.exe"
CloseMessage="yes" CloseMessage="yes"
@@ -27,38 +22,37 @@
AllowSameVersionUpgrades="no" AllowSameVersionUpgrades="no"
DowngradeErrorMessage="A newer version of [ProductName] is already installed." /> DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate />
<Feature Id="ProductFeature" <Feature Id="ProductFeature"
Title="$(var.ProductName)" Title="$(var.ProductName)"
Level="1"> Level="1">
<ComponentGroupRef Id="ProductComponents" /> <ComponentGroupRef Id="ProductComponents" />
</Feature> </Feature>
</Product> </Package>
<Fragment> <Fragment>
<PropertyRef Id="NETFRAMEWORK45"/> <StandardDirectory Id="LocalAppDataFolder">
<Condition Message="This application requires version 4.5 of the .NET Framework. Please install the .NET Framework then run this installer again.">
<![CDATA[Installed OR NETFRAMEWORK45]]>
</Condition>
<Directory Id="TARGETDIR"
Name="SourceDir">
<Directory Id="LocalAppDataFolder">
<Directory Id="INSTALLFOLDER" <Directory Id="INSTALLFOLDER"
Name="$(var.ProductName)"> Name="$(var.ProductName)">
<Directory Id="SqlServerCe_32" <Directory Id="SqlServerCe_32"
Name="x86" /> Name="x86" />
<Directory Id="SqlServerCe_64" <Directory Id="SqlServerCe_64"
Name="amd64" /> Name="amd64" />
<Directory Name="runtimes">
<Directory Name="win-x32">
<Directory Id="Runtimes_Win_x32_Native"
Name="native" />
</Directory>
<Directory Name="win-x64">
<Directory Id="Runtimes_Win_x64_Native"
Name="native" />
</Directory> </Directory>
</Directory> </Directory>
<Directory Id="ProgramMenuFolder"> </Directory>
</StandardDirectory>
<StandardDirectory Id="ProgramMenuFolder">
<Directory Id="ApplicationProgramsFolder" <Directory Id="ApplicationProgramsFolder"
Name="$(var.ProductName)" /> Name="$(var.ProductName)" />
</Directory> </StandardDirectory>
</Directory>
</Fragment> </Fragment>
<Fragment> <Fragment>
@@ -66,13 +60,12 @@
<Component Id="SqlServerCe_32" <Component Id="SqlServerCe_32"
Guid="{800607E9-65ED-489F-83A2-C73AA36A9D1D}" Guid="{800607E9-65ED-489F-83A2-C73AA36A9D1D}"
Directory="SqlServerCe_32"> Directory="SqlServerCe_32">
<RegistryValue Root="HKCU"
<RegistryValue Root='HKCU' Key="Software\Feed Center\Setup"
Key='Software\Feed Center\Setup' Type="integer"
Type='integer' Name="SqlServerCe_32"
Name='SqlServerCe_32' Value="1"
Value='1' KeyPath="yes" />
KeyPath='yes' />
<File Id="sqlceca40_32" <File Id="sqlceca40_32"
Source="$(var.FeedCenter.TargetDir)\x86\sqlceca40.dll" /> Source="$(var.FeedCenter.TargetDir)\x86\sqlceca40.dll" />
@@ -87,19 +80,18 @@
<File Id="sqlcese40_32" <File Id="sqlcese40_32"
Source="$(var.FeedCenter.TargetDir)\x86\sqlcese40.dll" /> Source="$(var.FeedCenter.TargetDir)\x86\sqlcese40.dll" />
<RemoveFolder Id='SqlServerCe_32' <RemoveFolder Id="SqlServerCe_32"
On='uninstall' /> On="uninstall" />
</Component> </Component>
<Component Id="SqlServerCe_64" <Component Id="SqlServerCe_64"
Guid="{67DB1CF4-23F2-4252-896C-714438959C9A}" Guid="{67DB1CF4-23F2-4252-896C-714438959C9A}"
Directory="SqlServerCe_64"> Directory="SqlServerCe_64">
<RegistryValue Root="HKCU"
<RegistryValue Root='HKCU' Key="Software\Feed Center\Setup"
Key='Software\Feed Center\Setup' Type="integer"
Type='integer' Name="SqlServerCe_64"
Name='SqlServerCe_64' Value="1"
Value='1' KeyPath="yes" />
KeyPath='yes' />
<File Id="sqlceca40_64" <File Id="sqlceca40_64"
Source="$(var.FeedCenter.TargetDir)\amd64\sqlceca40.dll" /> Source="$(var.FeedCenter.TargetDir)\amd64\sqlceca40.dll" />
@@ -114,19 +106,48 @@
<File Id="sqlcese40_64" <File Id="sqlcese40_64"
Source="$(var.FeedCenter.TargetDir)\amd64\sqlcese40.dll" /> Source="$(var.FeedCenter.TargetDir)\amd64\sqlcese40.dll" />
<RemoveFolder Id='SqlServerCe_64' <RemoveFolder Id="SqlServerCe_64"
On='uninstall' /> On="uninstall" />
</Component>
<Component Id="Runtimes_Win_x32_Native"
Guid="{E07B7F53-9FA0-426D-8ADF-A9FFF4E1ED02}"
Directory="Runtimes_Win_x32_Native">
<RegistryValue Root="HKCU"
Key="Software\Feed Center\Setup"
Type="integer"
Name="Runtimes_Win_x32"
Value="1"
KeyPath="yes" />
<File Id="realm_wrappers.dll_x32"
Source="$(var.FeedCenter.TargetDir)\runtimes\win-x64\native\realm-wrappers.dll" />
<File Id="sni.dll_x32"
Source="$(var.FeedCenter.TargetDir)\runtimes\win-x64\native\sni.dll" />
</Component>
<Component Id="Runtimes_Win_x64_Native"
Guid="{566D640B-F34D-4400-9B86-10EFD669A8B7}"
Directory="Runtimes_Win_x64_Native">
<RegistryValue Root="HKCU"
Key="Software\Feed Center\Setup"
Type="integer"
Name="Runtimes_Win_x64"
Value="1"
KeyPath="yes" />
<File Id="realm_wrappers.dll_x64"
Source="$(var.FeedCenter.TargetDir)\runtimes\win-x64\native\realm-wrappers.dll" />
<File Id="sni.dll_x64"
Source="$(var.FeedCenter.TargetDir)\runtimes\win-x64\native\sni.dll" />
</Component> </Component>
<Component Id="FeedCenter" <Component Id="FeedCenter"
Guid="{9B2B9C65-8E68-4F82-9AC5-16EBCAC34B9E}" Guid="{9B2B9C65-8E68-4F82-9AC5-16EBCAC34B9E}"
Directory="INSTALLFOLDER"> Directory="INSTALLFOLDER">
<RegistryValue Root="HKCU"
<RegistryValue Root='HKCU' Key="Software\Feed Center\Setup"
Key='Software\Feed Center\Setup' Type="integer"
Type='integer' Name="FeedCenter"
Name='FeedCenter' Value="1"
Value='1' KeyPath="yes" />
KeyPath='yes' />
<!-- Capabilities keys for Vista/7 "Set Program Access and Defaults" --> <!-- Capabilities keys for Vista/7 "Set Program Access and Defaults" -->
<RegistryValue Root="HKCU" <RegistryValue Root="HKCU"
@@ -169,39 +190,158 @@
Value="&quot;[INSTALLFOLDER]FeedCenter.exe&quot; %1" Value="&quot;[INSTALLFOLDER]FeedCenter.exe&quot; %1"
Type="string" /> Type="string" />
<File Source="$(var.Common.TargetPath)" /> <File Id="ChrisKaczor.ApplicationUpdate.dll"
<File Source="$(var.Common.Native.TargetPath)" /> Source="$(var.FeedCenter.TargetDir)\ChrisKaczor.ApplicationUpdate.dll" />
<File Source="$(var.Common.Wpf.TargetPath)" /> <File Id="ChrisKaczor.GenericSettingsProvider.dll"
Source="$(var.FeedCenter.TargetDir)\ChrisKaczor.GenericSettingsProvider.dll" />
<File Source="$(var.FeedCenter.TargetDir)\NameBasedGrid.dll" /> <File Id="ChrisKaczor.InstalledBrowsers.dll"
Source="$(var.FeedCenter.TargetDir)\ChrisKaczor.InstalledBrowsers.dll" />
<File Source="$(var.FeedCenter.TargetDir)\HtmlAgilityPack.dll" /> <File Id="ChrisKaczor.Wpf.Application.SingleInstance.dll"
Source="$(var.FeedCenter.TargetDir)\ChrisKaczor.Wpf.Application.SingleInstance.dll" />
<File Source="$(var.FeedCenter.TargetDir)\Newtonsoft.Json.dll" /> <File Id="ChrisKaczor.Wpf.Application.StartWithWindows.dll"
Source="$(var.FeedCenter.TargetDir)\ChrisKaczor.Wpf.Application.StartWithWindows.dll" />
<File Source="$(var.FeedCenter.TargetDir)\EntityFramework.dll" /> <File Id="ChrisKaczor.Wpf.Controls.HtmlTextBlock.dll"
<File Source="$(var.FeedCenter.TargetDir)\EntityFramework.SqlServer.dll" /> Source="$(var.FeedCenter.TargetDir)\ChrisKaczor.Wpf.Controls.HtmlTextBlock.dll" />
<File Source="$(var.FeedCenter.TargetDir)\EntityFramework.SqlServerCompact.dll" /> <File Id="ChrisKaczor.Wpf.Controls.Link.dll"
Source="$(var.FeedCenter.TargetDir)\ChrisKaczor.Wpf.Controls.Link.dll" />
<File Source="$(var.FeedCenter.TargetDir)\System.Data.SqlServerCe.dll" /> <File Id="ChrisKaczor.Wpf.Controls.Toolbar.dll"
<File Source="$(var.FeedCenter.TargetDir)\System.Data.SqlServerCe.Entity.dll" /> Source="$(var.FeedCenter.TargetDir)\ChrisKaczor.Wpf.Controls.Toolbar.dll" />
<File Id="ChrisKaczor.Wpf.Validation.dll"
<File Source="$(var.FeedCenter.TargetPath).config" /> Source="$(var.FeedCenter.TargetDir)\ChrisKaczor.Wpf.Validation.dll" />
<File Id="ChrisKaczor.Wpf.Windows.ControlBox.dll"
Source="$(var.FeedCenter.TargetDir)\ChrisKaczor.Wpf.Windows.ControlBox.dll" />
<File Id="ChrisKaczor.Wpf.Windows.SnappingWindow.dll"
Source="$(var.FeedCenter.TargetDir)\ChrisKaczor.Wpf.Windows.SnappingWindow.dll" />
<File Id="ControlzEx.dll"
Source="$(var.FeedCenter.TargetDir)\ControlzEx.dll" />
<File Id="Dapper.dll"
Source="$(var.FeedCenter.TargetDir)\Dapper.dll" />
<File Id="DebounceThrottle.dll"
Source="$(var.FeedCenter.TargetDir)\DebounceThrottle.dll" />
<File Id="FeedCenter.deps.json"
Source="$(var.FeedCenter.TargetDir)\FeedCenter.deps.json" />
<File Id="FeedCenter.dll"
Source="$(var.FeedCenter.TargetDir)\FeedCenter.dll" />
<File Id="FeedCenter.dll.config"
Source="$(var.FeedCenter.TargetDir)\FeedCenter.dll.config" />
<File Id="FeedCenter.exe" <File Id="FeedCenter.exe"
Source="$(var.FeedCenter.TargetPath)" /> Source="$(var.FeedCenter.TargetDir)\FeedCenter.exe" />
<File Id="FeedCenter.runtimeconfig.json"
Source="$(var.FeedCenter.TargetDir)\FeedCenter.runtimeconfig.json" />
<File Id="H.Formatters.BinaryFormatter.dll"
Source="$(var.FeedCenter.TargetDir)\H.Formatters.BinaryFormatter.dll" />
<File Id="H.Formatters.dll"
Source="$(var.FeedCenter.TargetDir)\H.Formatters.dll" />
<File Id="H.GeneratedIcons.System.Drawing.dll"
Source="$(var.FeedCenter.TargetDir)\H.GeneratedIcons.System.Drawing.dll" />
<File Id="H.NotifyIcon.dll"
Source="$(var.FeedCenter.TargetDir)\H.NotifyIcon.dll" />
<File Id="H.NotifyIcon.Wpf.dll"
Source="$(var.FeedCenter.TargetDir)\H.NotifyIcon.Wpf.dll" />
<File Id="H.Pipes.dll"
Source="$(var.FeedCenter.TargetDir)\H.Pipes.dll" />
<File Id="HtmlAgilityPack.dll"
Source="$(var.FeedCenter.TargetDir)\HtmlAgilityPack.dll" />
<File Id="HtmlTextWriter.dll"
Source="$(var.FeedCenter.TargetDir)\HtmlTextWriter.dll" />
<File Id="JetBrains.Annotations.dll"
Source="$(var.FeedCenter.TargetDir)\JetBrains.Annotations.dll" />
<File Id="MahApps.Metro.dll"
Source="$(var.FeedCenter.TargetDir)\MahApps.Metro.dll" />
<File Id="Microsoft.Bcl.AsyncInterfaces.dll"
Source="$(var.FeedCenter.TargetDir)\Microsoft.Bcl.AsyncInterfaces.dll" />
<File Id="Microsoft.Extensions.ObjectPool.dll"
Source="$(var.FeedCenter.TargetDir)\Microsoft.Extensions.ObjectPool.dll" />
<File Id="Microsoft.Xaml.Behaviors.dll"
Source="$(var.FeedCenter.TargetDir)\Microsoft.Xaml.Behaviors.dll" />
<File Id="MongoDB.Bson.dll"
Source="$(var.FeedCenter.TargetDir)\MongoDB.Bson.dll" />
<File Id="NameBasedGrid.dll"
Source="$(var.FeedCenter.TargetDir)\NameBasedGrid.dll" />
<File Id="Newtonsoft.Json.dll"
Source="$(var.FeedCenter.TargetDir)\Newtonsoft.Json.dll" />
<File Id="Realm.dll"
Source="$(var.FeedCenter.TargetDir)\Realm.dll" />
<File Id="Remotion.Linq.dll"
Source="$(var.FeedCenter.TargetDir)\Remotion.Linq.dll" />
<File Id="Serilog.dll"
Source="$(var.FeedCenter.TargetDir)\Serilog.dll" />
<File Id="Serilog.Enrichers.Thread.dll"
Source="$(var.FeedCenter.TargetDir)\Serilog.Enrichers.Thread.dll" />
<File Id="Serilog.Sinks.Console.dll"
Source="$(var.FeedCenter.TargetDir)\Serilog.Sinks.Console.dll" />
<File Id="Serilog.Sinks.File.dll"
Source="$(var.FeedCenter.TargetDir)\Serilog.Sinks.File.dll" />
<File Id="System.ComponentModel.Composition.dll"
Source="$(var.FeedCenter.TargetDir)\System.ComponentModel.Composition.dll" />
<File Id="System.ComponentModel.Composition.Registration.dll"
Source="$(var.FeedCenter.TargetDir)\System.ComponentModel.Composition.Registration.dll" />
<File Id="System.Data.Odbc.dll"
Source="$(var.FeedCenter.TargetDir)\System.Data.Odbc.dll" />
<File Id="System.Data.OleDb.dll"
Source="$(var.FeedCenter.TargetDir)\System.Data.OleDb.dll" />
<File Id="System.Data.SqlClient.dll"
Source="$(var.FeedCenter.TargetDir)\System.Data.SqlClient.dll" />
<File Id="System.Data.SqlServerCe.dll"
Source="$(var.FeedCenter.TargetDir)\System.Data.SqlServerCe.dll" />
<File Id="System.DirectoryServices.AccountManagement.dll"
Source="$(var.FeedCenter.TargetDir)\System.DirectoryServices.AccountManagement.dll" />
<File Id="System.DirectoryServices.dll"
Source="$(var.FeedCenter.TargetDir)\System.DirectoryServices.dll" />
<File Id="System.DirectoryServices.Protocols.dll"
Source="$(var.FeedCenter.TargetDir)\System.DirectoryServices.Protocols.dll" />
<File Id="System.IO.Ports.dll"
Source="$(var.FeedCenter.TargetDir)\System.IO.Ports.dll" />
<File Id="System.Management.dll"
Source="$(var.FeedCenter.TargetDir)\System.Management.dll" />
<File Id="System.Private.ServiceModel.dll"
Source="$(var.FeedCenter.TargetDir)\System.Private.ServiceModel.dll" />
<File Id="System.Reflection.Context.dll"
Source="$(var.FeedCenter.TargetDir)\System.Reflection.Context.dll" />
<File Id="System.Runtime.Caching.dll"
Source="$(var.FeedCenter.TargetDir)\System.Runtime.Caching.dll" />
<File Id="System.Security.Cryptography.Pkcs.dll"
Source="$(var.FeedCenter.TargetDir)\System.Security.Cryptography.Pkcs.dll" />
<File Id="System.Security.Cryptography.ProtectedData.dll"
Source="$(var.FeedCenter.TargetDir)\System.Security.Cryptography.ProtectedData.dll" />
<File Id="System.Security.Cryptography.Xml.dll"
Source="$(var.FeedCenter.TargetDir)\System.Security.Cryptography.Xml.dll" />
<File Id="System.ServiceModel.dll"
Source="$(var.FeedCenter.TargetDir)\System.ServiceModel.dll" />
<File Id="System.ServiceModel.Duplex.dll"
Source="$(var.FeedCenter.TargetDir)\System.ServiceModel.Duplex.dll" />
<File Id="System.ServiceModel.Http.dll"
Source="$(var.FeedCenter.TargetDir)\System.ServiceModel.Http.dll" />
<File Id="System.ServiceModel.NetTcp.dll"
Source="$(var.FeedCenter.TargetDir)\System.ServiceModel.NetTcp.dll" />
<File Id="System.ServiceModel.Primitives.dll"
Source="$(var.FeedCenter.TargetDir)\System.ServiceModel.Primitives.dll" />
<File Id="System.ServiceModel.Security.dll"
Source="$(var.FeedCenter.TargetDir)\System.ServiceModel.Security.dll" />
<File Id="System.ServiceModel.Syndication.dll"
Source="$(var.FeedCenter.TargetDir)\System.ServiceModel.Syndication.dll" />
<File Id="System.ServiceProcess.ServiceController.dll"
Source="$(var.FeedCenter.TargetDir)\System.ServiceProcess.ServiceController.dll" />
<File Id="System.Speech.dll"
Source="$(var.FeedCenter.TargetDir)\System.Speech.dll" />
<File Id="System.Threading.AccessControl.dll"
Source="$(var.FeedCenter.TargetDir)\System.Threading.AccessControl.dll" />
<File Id="System.Web.Services.Description.dll"
Source="$(var.FeedCenter.TargetDir)\System.Web.Services.Description.dll" />
<File Id="WpfScreenHelper.dll"
Source="$(var.FeedCenter.TargetDir)\WpfScreenHelper.dll" />
<RemoveFolder Id='INSTALLFOLDER' <RemoveFolder Id="INSTALLFOLDER"
On='uninstall' /> On="uninstall" />
</Component> </Component>
<Component Id="ApplicationShortcut" <Component Id="ApplicationShortcut"
Guid="{63CF0995-E117-4BB9-9077-76F570FDFAA9}" Guid="{63CF0995-E117-4BB9-9077-76F570FDFAA9}"
Directory="ApplicationProgramsFolder"> Directory="ApplicationProgramsFolder">
<Shortcut Id="StartMenuShortcut" <Shortcut Id="StartMenuShortcut"
Directory="ApplicationProgramsFolder" Directory="ApplicationProgramsFolder"
Advertise="no" Advertise="no"
Name="$(var.ProductName)" Name="$(var.ProductName)"
Target="[INSTALLFOLDER]\$(var.FeedCenter.TargetName)" Target="[INSTALLFOLDER]\FeedCenter.exe"
WorkingDirectory="INSTALLFOLDER" /> WorkingDirectory="INSTALLFOLDER" />
<RemoveFolder Id="ApplicationProgramsFolder" <RemoveFolder Id="ApplicationProgramsFolder"

View File

@@ -1,46 +1,19 @@
<?xml version="1.0" encoding="utf-8"?> <Project Sdk="WixToolset.Sdk/4.0.0">
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>3.9</ProductVersion> <ProductVersion>3.9</ProductVersion>
<ProjectGuid>dfb3fe30-18ea-4216-8d92-11df9c8d50f1</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>Setup</OutputName>
<OutputType>Package</OutputType>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<OutputPath>bin\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>Debug</DefineConstants> <DefineConstants>Debug</DefineConstants>
<SuppressIces>ICE91</SuppressIces> <SuppressIces>ICE91</SuppressIces>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<OutputPath>bin\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<SuppressIces>ICE91</SuppressIces> <SuppressIces>ICE91</SuppressIces>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<SuppressValidation>true</SuppressValidation> <SuppressValidation>true</SuppressValidation>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Product.wxs" /> <PackageReference Include="WixToolset.Util.wixext" Version="4.0.0" />
</ItemGroup>
<ItemGroup>
<WixExtension Include="WixFileVersionExtension">
<HintPath>..\packages\WixFileVersionExtension.1.0.0.3\lib\WixFileVersionExtension.dll</HintPath>
<Name>WixFileVersionExtension</Name>
</WixExtension>
<WixExtension Include="WixUtilExtension">
<HintPath>$(WixExtDir)\WixUtilExtension.dll</HintPath>
<Name>WixUtilExtension</Name>
</WixExtension>
<WixExtension Include="WixNetFxExtension">
<HintPath>$(WixExtDir)\WixNetFxExtension.dll</HintPath>
<Name>WixNetFxExtension</Name>
</WixExtension>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Application\FeedCenter.csproj"> <ProjectReference Include="..\Application\FeedCenter.csproj">
@@ -52,16 +25,4 @@
<RefTargetDir>INSTALLFOLDER</RefTargetDir> <RefTargetDir>INSTALLFOLDER</RefTargetDir>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<Content Include="packages.config" />
</ItemGroup>
<Import Project="$(WixTargetsPath)" />
<!--
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> </Project>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="WixFileVersionExtension" version="1.0.0.3" />
</packages>