mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2025-12-16 06:20:34 +00:00
Compare commits
12 Commits
7e9c49cc79
...
6.3.1.3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
23f9f58f6c | ||
|
|
f0dfbc5ee4 | ||
|
|
8ac4efe392 | ||
|
|
d4691ced51 | ||
|
|
d679bf9307 | ||
|
|
564d0bf9a4 | ||
|
|
2f848fe585 | ||
|
|
bf34d2e91e | ||
|
|
83e4c7f63a | ||
|
|
1e2e52943d | ||
|
|
4a9ecc52c1 | ||
|
|
10fc914ac1 |
2
.github/workflows/lock-threads.yml
vendored
2
.github/workflows/lock-threads.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Lock inactive threads
|
||||
uses: dessant/lock-threads@1bf7ec25051fe7c00bdd17e6a7cf3d7bfb7dc771 # v5.0.1
|
||||
uses: dessant/lock-threads@7266a7ce5c1df01b1c6db85bf8cd86c737dadbe7 # v6.0.0
|
||||
with:
|
||||
discussion-inactive-days: 90
|
||||
issue-inactive-days: 60
|
||||
|
||||
30
.github/workflows/publish.yml
vendored
30
.github/workflows/publish.yml
vendored
@@ -43,7 +43,7 @@ jobs:
|
||||
run: npm run-script deploy --no-progress --prefix ASF-ui
|
||||
|
||||
- name: Upload ASF-ui
|
||||
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
|
||||
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
|
||||
with:
|
||||
compression-level: 1
|
||||
if-no-files-found: error
|
||||
@@ -95,7 +95,7 @@ jobs:
|
||||
run: dotnet --info
|
||||
|
||||
- name: Download previously built ASF-ui
|
||||
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
|
||||
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
|
||||
with:
|
||||
name: ASF-ui
|
||||
path: ASF-ui/dist
|
||||
@@ -367,7 +367,7 @@ jobs:
|
||||
subject-path: out/ASF-${{ matrix.variant }}.zip
|
||||
|
||||
- name: Upload ASF-${{ matrix.variant }}
|
||||
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
|
||||
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
|
||||
with:
|
||||
compression-level: 1
|
||||
if-no-files-found: error
|
||||
@@ -416,7 +416,7 @@ jobs:
|
||||
|
||||
- name: Upload ArchiSteamFarm.OfficialPlugins.Monitoring
|
||||
if: ${{ matrix.os == 'ubuntu-latest' && matrix.variant == 'generic' }}
|
||||
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
|
||||
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
|
||||
with:
|
||||
compression-level: 1
|
||||
if-no-files-found: error
|
||||
@@ -441,55 +441,55 @@ jobs:
|
||||
show-progress: false
|
||||
|
||||
- name: Download ASF-generic artifact from ubuntu-latest
|
||||
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
|
||||
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
|
||||
with:
|
||||
name: ubuntu-latest_ASF-generic
|
||||
path: out
|
||||
|
||||
- name: Download ASF-linux-arm artifact from ubuntu-latest
|
||||
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
|
||||
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
|
||||
with:
|
||||
name: ubuntu-latest_ASF-linux-arm
|
||||
path: out
|
||||
|
||||
- name: Download ASF-linux-arm64 artifact from ubuntu-latest
|
||||
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
|
||||
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
|
||||
with:
|
||||
name: ubuntu-latest_ASF-linux-arm64
|
||||
path: out
|
||||
|
||||
- name: Download ASF-linux-x64 artifact from ubuntu-latest
|
||||
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
|
||||
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
|
||||
with:
|
||||
name: ubuntu-latest_ASF-linux-x64
|
||||
path: out
|
||||
|
||||
- name: Download ASF-osx-arm64 artifact from macos-latest
|
||||
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
|
||||
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
|
||||
with:
|
||||
name: macos-latest_ASF-osx-arm64
|
||||
path: out
|
||||
|
||||
- name: Download ASF-osx-x64 artifact from macos-latest
|
||||
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
|
||||
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
|
||||
with:
|
||||
name: macos-latest_ASF-osx-x64
|
||||
path: out
|
||||
|
||||
- name: Download ASF-win-arm64 artifact from windows-latest
|
||||
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
|
||||
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
|
||||
with:
|
||||
name: windows-latest_ASF-win-arm64
|
||||
path: out
|
||||
|
||||
- name: Download ASF-win-x64 artifact from windows-latest
|
||||
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
|
||||
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
|
||||
with:
|
||||
name: windows-latest_ASF-win-x64
|
||||
path: out
|
||||
|
||||
- name: Download ArchiSteamFarm.OfficialPlugins.Monitoring artifact
|
||||
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
|
||||
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
|
||||
with:
|
||||
name: ArchiSteamFarm.OfficialPlugins.Monitoring
|
||||
path: out
|
||||
@@ -514,7 +514,7 @@ jobs:
|
||||
subject-path: out/SHA512SUMS
|
||||
|
||||
- name: Upload SHA512SUMS
|
||||
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
|
||||
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
|
||||
with:
|
||||
compression-level: 1
|
||||
if-no-files-found: error
|
||||
@@ -527,7 +527,7 @@ jobs:
|
||||
subject-path: out/SHA512SUMS.sign
|
||||
|
||||
- name: Upload SHA512SUMS.sign
|
||||
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
|
||||
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
|
||||
with:
|
||||
compression-level: 1
|
||||
if-no-files-found: error
|
||||
|
||||
2
ASF-ui
2
ASF-ui
Submodule ASF-ui updated: c703223091...9e1d5e33d4
@@ -24,6 +24,7 @@
|
||||
<PackageReference Include="SteamKit2" />
|
||||
<PackageReference Include="System.Composition" />
|
||||
<PackageReference Include="System.Security.Cryptography.ProtectedData" />
|
||||
<PackageReference Include="Tmds.DBus.Protocol" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -37,6 +37,8 @@ using System.Threading.Tasks;
|
||||
using ArchiSteamFarm.Localization;
|
||||
using ArchiSteamFarm.Storage;
|
||||
using ArchiSteamFarm.Web;
|
||||
using Microsoft.Win32.SafeHandles;
|
||||
using Tmds.DBus.Protocol;
|
||||
|
||||
namespace ArchiSteamFarm.Core;
|
||||
|
||||
@@ -69,13 +71,20 @@ internal static class OS {
|
||||
}
|
||||
}
|
||||
|
||||
private static SafeHandle? InhibitLock;
|
||||
private static Mutex? SingleInstance;
|
||||
|
||||
internal static void CoreInit(bool minimized, bool systemRequired) {
|
||||
internal static async Task CoreInit(bool minimized, bool systemRequired) {
|
||||
if (minimized) {
|
||||
MinimizeConsoleWindow();
|
||||
}
|
||||
|
||||
if (OperatingSystem.IsLinux()) {
|
||||
if (systemRequired) {
|
||||
await LinuxKeepSystemActive().ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
if (OperatingSystem.IsWindows()) {
|
||||
if (systemRequired) {
|
||||
WindowsKeepSystemActive();
|
||||
@@ -181,6 +190,12 @@ internal static class OS {
|
||||
// Instead, we'll dispose the mutex which should automatically release it by the CLR
|
||||
SingleInstance.Dispose();
|
||||
SingleInstance = null;
|
||||
|
||||
// Release the inhibit lock as well, if needed
|
||||
if (InhibitLock != null) {
|
||||
InhibitLock.Dispose();
|
||||
InhibitLock = null;
|
||||
}
|
||||
}
|
||||
|
||||
internal static bool VerifyEnvironment() {
|
||||
@@ -261,6 +276,79 @@ internal static class OS {
|
||||
NativeMethods.FlashWindowEx(ref flashInfo);
|
||||
}
|
||||
|
||||
[SupportedOSPlatform("Linux")]
|
||||
private static async Task LinuxKeepSystemActive() {
|
||||
if (!OperatingSystem.IsLinux()) {
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
// Docs: https://systemd.io/INHIBITOR_LOCKS
|
||||
string? systemAddress = Address.System;
|
||||
|
||||
if (string.IsNullOrEmpty(systemAddress)) {
|
||||
ASF.ArchiLogger.LogGenericError(Strings.FormatWarningFailedWithError(nameof(systemAddress)));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
using Connection connection = new(systemAddress);
|
||||
|
||||
try {
|
||||
await connection.ConnectAsync().ConfigureAwait(false);
|
||||
} catch (ConnectException e) {
|
||||
// Possible if no DBus is available at all
|
||||
ASF.ArchiLogger.LogGenericDebuggingException(e);
|
||||
ASF.ArchiLogger.LogGenericWarning(Strings.WarningNoSystemRequiredLinuxDependencies);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
MessageWriter writer = connection.GetMessageWriter();
|
||||
|
||||
writer.WriteMethodCallHeader(
|
||||
"org.freedesktop.login1",
|
||||
"/org/freedesktop/login1",
|
||||
"org.freedesktop.login1.Manager",
|
||||
"Inhibit",
|
||||
"ssss"
|
||||
);
|
||||
|
||||
// Colon-separated list of lock types
|
||||
writer.WriteString("idle");
|
||||
|
||||
// Human-readable, descriptive string of who is taking the lock
|
||||
writer.WriteString(SharedInfo.PublicIdentifier);
|
||||
|
||||
// Human-readable, descriptive string of why the lock is taken
|
||||
writer.WriteString("--system-required");
|
||||
|
||||
// Mode
|
||||
writer.WriteString("block");
|
||||
|
||||
MessageBuffer message = writer.CreateMessage();
|
||||
|
||||
try {
|
||||
// Inhibit() returns a single value, a file descriptor that encapsulates the lock
|
||||
InhibitLock = await connection.CallMethodAsync(
|
||||
message, static (response, _) => {
|
||||
Reader reader = response.GetBodyReader();
|
||||
|
||||
return reader.ReadHandle<SafeFileHandle>();
|
||||
}
|
||||
).ConfigureAwait(false);
|
||||
} catch (DBusException e) {
|
||||
// Possible if login manager does not support inhibit, although that should be super rare
|
||||
ASF.ArchiLogger.LogGenericDebuggingException(e);
|
||||
ASF.ArchiLogger.LogGenericWarning(Strings.WarningNoSystemRequiredLinuxDependencies);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (InhibitLock == null) {
|
||||
ASF.ArchiLogger.LogGenericError(Strings.FormatWarningFailedWithError(nameof(InhibitLock)));
|
||||
}
|
||||
}
|
||||
|
||||
private static void MinimizeConsoleWindow() {
|
||||
(_, int top) = Console.GetCursorPosition();
|
||||
|
||||
|
||||
@@ -800,4 +800,7 @@ Process uptime: {1}</value>
|
||||
<value>Input: {0}</value>
|
||||
<comment>{0} will be replaced by text input from the user.</comment>
|
||||
</data>
|
||||
<data name="WarningNoSystemRequiredLinuxDependencies" xml:space="preserve">
|
||||
<value>You've declared --system-required, although your OS is missing required dependencies for that feature to work. Consider installing dbus, although you can also safely ignore this warning if you do not require inhibition to work properly.</value>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -278,7 +278,7 @@ internal static class Program {
|
||||
return false;
|
||||
}
|
||||
|
||||
OS.CoreInit(Minimized, SystemRequired);
|
||||
await OS.CoreInit(Minimized, SystemRequired).ConfigureAwait(false);
|
||||
|
||||
Console.Title = SharedInfo.ProgramIdentifier;
|
||||
ASF.ArchiLogger.LogGenericInfo(SharedInfo.ProgramIdentifier);
|
||||
|
||||
@@ -56,7 +56,7 @@ public sealed class CardsFarmer : IAsyncDisposable, IDisposable {
|
||||
private const byte HoursToIgnore = 1; // How many hours we ignore unreleased appIDs and don't bother checking them again
|
||||
|
||||
[PublicAPI]
|
||||
public static readonly FrozenSet<uint> SalesBlacklist = [267420, 303700, 335590, 368020, 425280, 480730, 566020, 639900, 762800, 876740, 991980, 1195670, 1343890, 1465680, 1658760, 1797760, 2021850, 2243720, 2459330, 2640280, 2861690, 2861720, 3558920];
|
||||
public static readonly FrozenSet<uint> SalesBlacklist = [267420, 303700, 335590, 368020, 425280, 480730, 566020, 639900, 762800, 876740, 991980, 1195670, 1343890, 1465680, 1658760, 1797760, 2021850, 2243720, 2459330, 2640280, 2861690, 2861720, 3558920, 3558940];
|
||||
|
||||
private static readonly ConcurrentDictionary<uint, DateTime> GloballyIgnoredAppIDs = new(); // Reserved for unreleased games
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<Version>6.3.1.2</Version>
|
||||
<Version>6.3.1.3</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
||||
@@ -16,10 +16,11 @@
|
||||
<PackageVersion Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.14.0" />
|
||||
<PackageVersion Include="OpenTelemetry.Instrumentation.Http" Version="1.14.0" />
|
||||
<PackageVersion Include="OpenTelemetry.Instrumentation.Runtime" Version="1.14.0" />
|
||||
<PackageVersion Include="Scalar.AspNetCore" Version="2.11.5" />
|
||||
<PackageVersion Include="Scalar.AspNetCore" Version="2.11.6" />
|
||||
<PackageVersion Include="SteamKit2" Version="3.3.1" />
|
||||
<PackageVersion Include="System.Composition" Version="10.0.1" />
|
||||
<PackageVersion Include="System.Composition.AttributedModel" Version="10.0.1" />
|
||||
<PackageVersion Include="System.Security.Cryptography.ProtectedData" Version="10.0.1" />
|
||||
<PackageVersion Include="Tmds.DBus.Protocol" Version="0.21.2" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
@@ -114,4 +114,4 @@ EOF
|
||||
WORKDIR /app
|
||||
VOLUME ["/app/config", "/app/logs"]
|
||||
HEALTHCHECK CMD ["pidof", "-q", "dotnet"]
|
||||
ENTRYPOINT ["ArchiSteamFarm", "--no-restart", "--system-required"]
|
||||
ENTRYPOINT ["ArchiSteamFarm", "--no-restart"]
|
||||
|
||||
@@ -114,4 +114,4 @@ EOF
|
||||
WORKDIR /app
|
||||
VOLUME ["/app/config", "/app/logs"]
|
||||
HEALTHCHECK CMD ["pidof", "-q", "ArchiSteamFarm"]
|
||||
ENTRYPOINT ["ArchiSteamFarm", "--no-restart", "--system-required"]
|
||||
ENTRYPOINT ["ArchiSteamFarm", "--no-restart"]
|
||||
|
||||
2
wiki
2
wiki
Submodule wiki updated: 8d546a5bfe...7854f32a69
Reference in New Issue
Block a user