mirror of
https://github.com/ckaczor/FeedCenter.git
synced 2026-02-16 10:58:31 -05:00
Change assembly used to get version and make sure to not delete old settings on upgrade
This commit is contained in:
@@ -48,7 +48,7 @@ namespace FeedCenter
|
|||||||
// Set the data directory based on debug or not
|
// Set the data directory based on debug or not
|
||||||
AppDomain.CurrentDomain.SetData("DataDirectory",
|
AppDomain.CurrentDomain.SetData("DataDirectory",
|
||||||
_useDebugPath
|
_useDebugPath
|
||||||
? Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)
|
? Path.GetDirectoryName(Assembly.GetEntryAssembly().Location)
|
||||||
: UserSettingsPath);
|
: UserSettingsPath);
|
||||||
|
|
||||||
// Get the generic provider
|
// Get the generic provider
|
||||||
@@ -64,6 +64,7 @@ namespace FeedCenter
|
|||||||
genericProvider.SetSettingValue = SettingsStore.SetSettingValue;
|
genericProvider.SetSettingValue = SettingsStore.SetSettingValue;
|
||||||
genericProvider.DeleteSettingsForVersion = SettingsStore.DeleteSettingsForVersion;
|
genericProvider.DeleteSettingsForVersion = SettingsStore.DeleteSettingsForVersion;
|
||||||
genericProvider.GetVersionList = SettingsStore.GetVersionList;
|
genericProvider.GetVersionList = SettingsStore.GetVersionList;
|
||||||
|
genericProvider.DeleteOldVersionsOnUpgrade = false;
|
||||||
|
|
||||||
// Initialize the tracer with the current process ID
|
// Initialize the tracer with the current process ID
|
||||||
Tracer.Initialize(UserSettingsPath, FeedCenter.Properties.Resources.ApplicationName, Process.GetCurrentProcess().Id.ToString(CultureInfo.InvariantCulture), false);
|
Tracer.Initialize(UserSettingsPath, FeedCenter.Properties.Resources.ApplicationName, Process.GetCurrentProcess().Id.ToString(CultureInfo.InvariantCulture), false);
|
||||||
@@ -123,7 +124,7 @@ namespace FeedCenter
|
|||||||
{
|
{
|
||||||
// If we're running in debug mode then use a local path for the database and logs
|
// If we're running in debug mode then use a local path for the database and logs
|
||||||
if (_useDebugPath)
|
if (_useDebugPath)
|
||||||
return Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
|
return Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
|
||||||
|
|
||||||
// Get the path to the local application data directory
|
// Get the path to the local application data directory
|
||||||
var path = Path.Combine(
|
var path = Path.Combine(
|
||||||
@@ -159,7 +160,7 @@ namespace FeedCenter
|
|||||||
public static void SetDefaultFeedReader(bool value)
|
public static void SetDefaultFeedReader(bool value)
|
||||||
{
|
{
|
||||||
// Get the location of the assembly
|
// Get the location of the assembly
|
||||||
var assemblyLocation = Assembly.GetExecutingAssembly().Location;
|
var assemblyLocation = Assembly.GetEntryAssembly().Location;
|
||||||
|
|
||||||
// Open the registry key (creating if needed)
|
// Open the registry key (creating if needed)
|
||||||
using (var registryKey = Registry.CurrentUser.CreateSubKey("Software\\Classes\\feed", RegistryKeyPermissionCheck.ReadWriteSubTree))
|
using (var registryKey = Registry.CurrentUser.CreateSubKey("Software\\Classes\\feed", RegistryKeyPermissionCheck.ReadWriteSubTree))
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ namespace FeedCenter.Options
|
|||||||
string version = UpdateCheck.LocalVersion.ToString();
|
string version = UpdateCheck.LocalVersion.ToString();
|
||||||
versionLabel.Text = string.Format(Properties.Resources.Version, version);
|
versionLabel.Text = string.Format(Properties.Resources.Version, version);
|
||||||
|
|
||||||
companyLabel.Text = ((AssemblyCompanyAttribute) Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false)[0]).Company;
|
companyLabel.Text = ((AssemblyCompanyAttribute) Assembly.GetEntryAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false)[0]).Company;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool ValidatePanel()
|
public override bool ValidatePanel()
|
||||||
|
|||||||
Reference in New Issue
Block a user