mirror of
https://github.com/gwdevhub/Daybreak.git
synced 2026-09-16 05:19:23 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9fd7d8b62a | ||
|
|
a9aa73033f |
@@ -9,7 +9,7 @@
|
||||
<CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies>
|
||||
<LangVersion>preview</LangVersion>
|
||||
<ApplicationIcon>Daybreak.ico</ApplicationIcon>
|
||||
<Version>0.1.4</Version>
|
||||
<Version>0.2.1</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -22,6 +22,7 @@ namespace Daybreak.Services.Updater
|
||||
private const string OutputPathTag = "{OUTPUTPATh}";
|
||||
private const string Url = "https://github.com/AlexMacocian/Daybreak/releases/latest";
|
||||
private const string DownloadUrl = $"https://github.com/AlexMacocian/Daybreak/releases/download/v{VersionTag}/Daybreakv{VersionTag}.zip";
|
||||
private const string SetExecutionPolicy = $"Set-ExecutionPolicy RemoteSigned -Scope CurrentUser";
|
||||
private const string DelayCommand = "Start-Sleep -m 3000";
|
||||
private const string ExtractCommandTemplate = $"Expand-Archive -Path '{InputFileTag}' -DestinationPath '{OutputPathTag}' -Force";
|
||||
private const string RunClientCommand = @".\Daybreak.exe";
|
||||
@@ -99,7 +100,8 @@ namespace Daybreak.Services.Updater
|
||||
public void FinalizeUpdate()
|
||||
{
|
||||
File.WriteAllLines(ExtractAndRunPs1, new List<string>()
|
||||
{
|
||||
{
|
||||
SetExecutionPolicy,
|
||||
DelayCommand,
|
||||
ExtractCommandTemplate
|
||||
.Replace(InputFileTag, Path.GetFullPath(TempFile))
|
||||
|
||||
Reference in New Issue
Block a user