Skip to content

Commit

Permalink
5.4.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
stax76 committed Nov 17, 2019
1 parent 5374e20 commit 3844db6
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

###
### 5.4.4.0

- new: forecolors in the dark theme are slightly darker now
- new: readme/website and manual were improved
Expand Down
10 changes: 7 additions & 3 deletions mpv.net/Misc/UpdateCheck.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class UpdateCheck
{
public static void DailyCheck()
{
if (App.UpdateCheck && RegistryHelp.GetInt(RegistryHelp.ApplicationKey, "LastUpdateCheck")
if (App.UpdateCheck && RegistryHelp.GetInt(RegistryHelp.ApplicationKey, "UpdateCheckLast")
!= DateTime.Now.DayOfYear)

CheckOnline();
Expand All @@ -24,7 +24,7 @@ public static async void CheckOnline(bool showUpToDateMessage = false)
{
using (HttpClient client = new HttpClient())
{
RegistryHelp.SetValue(RegistryHelp.ApplicationKey, "LastUpdateCheck", DateTime.Now.DayOfYear);
RegistryHelp.SetValue(RegistryHelp.ApplicationKey, "UpdateCheckLast", DateTime.Now.DayOfYear);
client.DefaultRequestHeaders.Add("User-Agent", "mpv.net");
var response = await client.GetAsync("https://api.github.com/repos/stax76/mpv.net/releases/latest");
response.EnsureSuccessStatusCode();
Expand All @@ -40,7 +40,9 @@ public static async void CheckOnline(bool showUpToDateMessage = false)
return;
}

if (Msg.ShowQuestion($"New version {onlineVersion} is available, update now?") == MsgResult.OK)
if (RegistryHelp.GetString(RegistryHelp.ApplicationKey, "UpdateCheckVersion")
!= onlineVersion.ToString() && Msg.ShowQuestion(
$"New version {onlineVersion} is available, update now?") == MsgResult.OK)
{
string arch = IntPtr.Size == 8 ? "64" : "86";
string url = $"https://github.com/stax76/mpv.net/releases/download/{onlineVersion}/mpv.net-portable-x{arch}-{onlineVersion}.7z";
Expand All @@ -58,6 +60,8 @@ public static async void CheckOnline(bool showUpToDateMessage = false)

mp.command("quit");
}

RegistryHelp.SetValue(RegistryHelp.ApplicationKey, "UpdateCheckVersion", onlineVersion.ToString());
}
}
catch (Exception ex)
Expand Down
4 changes: 2 additions & 2 deletions mpv.net/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("5.4.3.0")]
[assembly: AssemblyFileVersion("5.4.3.0")]
[assembly: AssemblyVersion("5.4.4.0")]
[assembly: AssemblyFileVersion("5.4.4.0")]
7 changes: 5 additions & 2 deletions setup.iss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

#define MyAppName "mpv.net"
#define MyAppExeName "mpvnet.exe"

Expand All @@ -18,9 +19,11 @@ AppId={{9AA2B100-BEF3-44D0-B819-D8FC3C4D557D}}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppPublisher=Frank Skare (stax76)

#if arch == "x64"
ArchitecturesInstallIn64BitMode=x64
#endif

Compression=lzma2
DefaultDirName={commonpf}\{#MyAppName}
OutputBaseFilename=mpv.net-setup-{#arch}-{#MyAppVersion}
Expand All @@ -34,12 +37,12 @@ Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"

[Files]
Source: "{#MyAppSourceDir}\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#MyAppSourceDir}\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: "System.Management.Automation.xml"
Source: "{#MyAppSourceDir}\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs;

[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "Associate video file extensions?"; Flags: postinstall unchecked runascurrentuser runhidden nowait; Parameters: "--reg-file-assoc video"
Filename: "{app}\{#MyAppExeName}"; Description: "Associate audio file extensions?"; Flags: postinstall unchecked runascurrentuser runhidden nowait; Parameters: "--reg-file-assoc audio"
Filename: "{app}\{#MyAppExeName}"; Description: "Associate image file extensions?"; Flags: postinstall unchecked runascurrentuser runhidden nowait; Parameters: "--reg-file-assoc image"

[UninstallRun]
Filename: "{app}\{#MyAppExeName}"; Flags: runascurrentuser runhidden; Parameters: "--reg-file-assoc unreg"
Filename: "{app}\{#MyAppExeName}"; Flags: runascurrentuser runhidden; Parameters: "--reg-file-assoc unreg"

0 comments on commit 3844db6

Please sign in to comment.