Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closes synhershko/NAppUpdate/#95 #124

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 47 additions & 47 deletions src/NAppUpdate.Framework/Common/NauConfigurations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,51 +3,51 @@
using System.IO;

namespace NAppUpdate.Framework.Common
{
[Serializable]
public class NauConfigurations
{
public string TempFolder { get; set; }

/// <summary>
/// Path to the backup folder used by the update process
/// </summary>
public string BackupFolder
{
set
{
if (UpdateManager.Instance.State == UpdateManager.UpdateProcessState.NotChecked
|| UpdateManager.Instance.State == UpdateManager.UpdateProcessState.Checked)
{
string path = value.TrimEnd(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar);
_backupFolder = Path.IsPathRooted(path) ? path : Path.Combine(TempFolder, path);
}
else
throw new ArgumentException("BackupFolder can only be specified before update has started");
}
get
{
return _backupFolder;
}
}
internal string _backupFolder;

public string UpdateProcessName { get; set; }

/// <summary>
/// The name for the executable file to extract and run cold updates with. Default is foo.exe. You can change
/// it to whatever you want, but pay attention to names like "updater.exe" and "installer.exe" - they will trigger
/// an UAC prompt in all cases.
/// </summary>
public string UpdateExecutableName { get; set; }

/// <summary>
/// A list of files (relative paths only) to be copied along with the NAppUpdate DLL and updater host
/// when performing cold updates. You need to set this only when you have a custom IUpdateTask that
/// takes dependency of an external DLL, or require other files side by side with them.
/// Custom IUpdateTasks taking dependencies of external DLLs which may require cold update, MUST reside
/// in an external class-library, never in the application EXE, for that reason.
/// </summary>
public List<string> DependenciesForColdUpdate { get; set; }
}
{
[Serializable]
public class NauConfigurations
{
public string TempFolder { get; set; }
public string RelaunchAppArgs { get; set; }
/// <summary>
/// Path to the backup folder used by the update process
/// </summary>
public string BackupFolder
{
set
{
if (UpdateManager.Instance.State == UpdateManager.UpdateProcessState.NotChecked
|| UpdateManager.Instance.State == UpdateManager.UpdateProcessState.Checked)
{
string path = value.TrimEnd(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar);
_backupFolder = Path.IsPathRooted(path) ? path : Path.Combine(TempFolder, path);
}
else
throw new ArgumentException("BackupFolder can only be specified before update has started");
}
get
{
return _backupFolder;
}
}
internal string _backupFolder;
public string UpdateProcessName { get; set; }
/// <summary>
/// The name for the executable file to extract and run cold updates with. Default is foo.exe. You can change
/// it to whatever you want, but pay attention to names like "updater.exe" and "installer.exe" - they will trigger
/// an UAC prompt in all cases.
/// </summary>
public string UpdateExecutableName { get; set; }
/// <summary>
/// A list of files (relative paths only) to be copied along with the NAppUpdate DLL and updater host
/// when performing cold updates. You need to set this only when you have a custom IUpdateTask that
/// takes dependency of an external DLL, or require other files side by side with them.
/// Custom IUpdateTasks taking dependencies of external DLLs which may require cold update, MUST reside
/// in an external class-library, never in the application EXE, for that reason.
/// </summary>
public List<string> DependenciesForColdUpdate { get; set; }
}
}
Loading