mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 19:36:28 +00:00
Updating - Fix crash when client has internet
Updating - Check for updates periodically and when window opens (if auto-update enabled) Webserver - Don't write wildcard to webserver.txt
This commit is contained in:
1 parent
98b9770250
commit
f829743b6c
9 files changed
+120
-57
No files matched your search
@@ -46,7 +46,14 @@ namespace Artemis.Core
|
||||
/// </summary>
|
||||
public static readonly BuildInfo BuildInfo = File.Exists(Path.Combine(ApplicationFolder, "buildinfo.json"))
|
||||
? JsonConvert.DeserializeObject<BuildInfo>(File.ReadAllText(Path.Combine(ApplicationFolder, "buildinfo.json")))
|
||||
: new BuildInfo();
|
||||
: new BuildInfo
|
||||
{
|
||||
IsLocalBuild = true,
|
||||
BuildId = 1337,
|
||||
BuildNumber = 1337,
|
||||
SourceBranch = "local",
|
||||
SourceVersion = "local"
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// The plugin used by core components of Artemis
|
||||
@@ -108,6 +115,6 @@ namespace Artemis.Core
|
||||
typeof(float),
|
||||
typeof(double),
|
||||
typeof(decimal)
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -38,5 +38,10 @@ namespace Artemis.Core.Services.Core
|
||||
/// </summary>
|
||||
[JsonProperty]
|
||||
public string SourceVersion { get; internal set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets a boolean indicating whether the current build is a local build
|
||||
/// </summary>
|
||||
public bool IsLocalBuild { get; internal set; }
|
||||
}
|
||||
}
|
||||
@@ -61,7 +61,7 @@ namespace Artemis.Core.Services
|
||||
server.StateChanged += (s, e) => _logger.Verbose("WebServer new state - {state}", e.NewState);
|
||||
|
||||
// Store the URL in a webserver.txt file so that remote applications can find it
|
||||
File.WriteAllText(Path.Combine(Constants.DataFolder, "webserver.txt"), url);
|
||||
File.WriteAllText(Path.Combine(Constants.DataFolder, "webserver.txt"), $"http://localhost:{_webServerPortSetting.Value}/");
|
||||
|
||||
return server;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user