Compare commits

..

17 Commits

Author SHA1 Message Date
JustArchi
d947fecbd1 Translations update 2019-06-02 00:30:23 +02:00
JustArchi
75ca05830a Fix linux console 2019-06-02 00:05:06 +02:00
Łukasz Domeradzki
3910f27a12 Update FUNDING.yml 2019-06-01 23:44:39 +02:00
JustArchi
ce9d29401e Revert back to VS 2017 due to missing java 2019-06-01 16:08:11 +02:00
JustArchi
40f677b859 Add java check for appveyor 2019-06-01 16:03:52 +02:00
JustArchi
a4c0ed4304 CI: updates 2019-06-01 15:45:39 +02:00
dependabot-preview[bot]
6c5e6911d5 Bump HtmlAgilityPack from 1.11.6 to 1.11.7
Bumps [HtmlAgilityPack](https://github.com/zzzprojects/html-agility-pack) from 1.11.6 to 1.11.7.
- [Release notes](https://github.com/zzzprojects/html-agility-pack/releases)
- [Commits](https://github.com/zzzprojects/html-agility-pack/compare/v1.11.6...v1.11.7)
2019-05-31 21:05:12 +00:00
dependabot-preview[bot]
799efdbb4b Bump HtmlAgilityPack from 1.11.5 to 1.11.6
Bumps [HtmlAgilityPack](https://github.com/zzzprojects/html-agility-pack) from 1.11.5 to 1.11.6.
- [Release notes](https://github.com/zzzprojects/html-agility-pack/releases)
- [Commits](https://github.com/zzzprojects/html-agility-pack/compare/v1.11.5...v1.11.6)
2019-05-31 15:13:58 +00:00
Łukasz Domeradzki
02134ab01f Update FUNDING.yml 2019-05-31 12:57:34 +02:00
Łukasz Domeradzki
8e0be4dd54 Update FUNDING.yml 2019-05-31 12:57:11 +02:00
Łukasz Domeradzki
ed91a03437 Create FUNDING.yml 2019-05-31 12:56:27 +02:00
JustArchi
124994aead Extract ConcurrentEnumerator 2019-05-30 20:40:50 +02:00
dependabot-preview[bot]
39a2991b47 Bump HtmlAgilityPack from 1.11.4 to 1.11.5
Bumps [HtmlAgilityPack](https://github.com/zzzprojects/html-agility-pack) from 1.11.4 to 1.11.5.
- [Release notes](https://github.com/zzzprojects/html-agility-pack/releases)
- [Commits](https://github.com/zzzprojects/html-agility-pack/compare/v1.11.4...v1.11.5)
2019-05-30 17:47:10 +00:00
dependabot-preview[bot]
c07bed7df1 Bump Microsoft.NET.Test.Sdk from 16.1.0 to 16.1.1
Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 16.1.0 to 16.1.1.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Commits](https://github.com/microsoft/vstest/compare/v16.1.0...v16.1.1)
2019-05-30 06:29:30 +00:00
JustArchi
9c405ed667 Update CodeStyle.vssettings 2019-05-29 19:46:11 +02:00
JustArchi
1db1757654 Update .editorconfig 2019-05-29 19:19:29 +02:00
JustArchi
922a3c574d Bump 2019-05-29 12:27:09 +02:00
13 changed files with 105 additions and 57 deletions

View File

@@ -31,18 +31,19 @@ csharp_preserve_single_line_statements = false
csharp_space_after_cast = true
csharp_style_expression_bodied_accessors = when_on_single_line:suggestion
csharp_style_expression_bodied_constructors = when_on_single_line:suggestion
csharp_style_expression_bodied_indexers = when_on_single_line:suggestion
csharp_style_expression_bodied_methods = when_on_single_line:suggestion
csharp_style_expression_bodied_operators = when_on_single_line:suggestion
csharp_style_expression_bodied_properties = when_on_single_line:suggestion
csharp_style_pattern_matching_over_as_with_null_check = false:suggestion
csharp_style_expression_bodied_accessors = true:suggestion
csharp_style_expression_bodied_constructors = true:suggestion
csharp_style_expression_bodied_indexers = true:suggestion
csharp_style_expression_bodied_methods = true:suggestion
csharp_style_expression_bodied_operators = true:suggestion
csharp_style_expression_bodied_properties = true:suggestion
csharp_style_var_elsewhere = false:suggestion
csharp_style_var_for_built_in_types = false:suggestion
csharp_style_var_when_type_is_apparent = false:suggestion
csharp_using_directive_placement = outside_namespace:suggestion
[*.{cs,vb}]
# PascalCase for naming everything but parameters
dotnet_naming_rule.all_members_must_be_capitalized.severity = suggestion

5
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,5 @@
# These are supported funding model platforms
github: JustArchi
patreon: JustArchi
custom: https://www.paypal.me/JustArchi/5eur

View File

@@ -85,5 +85,5 @@ matrix:
dist: xenial
- os: osx
# Ref: https://docs.travis-ci.com/user/reference/osx
dotnet: 2.2.203 # For OSX, we need absolute dotnet version until https://github.com/dotnet/core-setup/issues/4187 is resolved
dotnet: 2.2.300 # For OSX, we need absolute dotnet version until https://github.com/dotnet/core-setup/issues/4187 is resolved
osx_image: xcode10.2

View File

@@ -37,7 +37,7 @@
<PackageReference Include="ConfigureAwaitChecker.Analyzer" Version="3.0.0">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="MSTest.TestAdapter" Version="1.4.0" />
<PackageReference Include="MSTest.TestFramework" Version="1.4.0" />
</ItemGroup>

View File

@@ -2,7 +2,7 @@
<PropertyGroup>
<ApplicationIcon>ASF.ico</ApplicationIcon>
<AssemblyVersion>4.0.2.1</AssemblyVersion>
<AssemblyVersion>4.0.2.2</AssemblyVersion>
<Authors>JustArchi</Authors>
<Company>JustArchi</Company>
<ConcurrentGarbageCollection>true</ConcurrentGarbageCollection>
@@ -11,7 +11,7 @@
<DefaultItemExcludes>$(DefaultItemExcludes);config/**;debug/**;out/**;overlay/**</DefaultItemExcludes>
<Description>ASF is an application that allows you to farm steam cards using multiple steam accounts simultaneously.</Description>
<ErrorReport>none</ErrorReport>
<FileVersion>4.0.2.1</FileVersion>
<FileVersion>4.0.2.2</FileVersion>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<LangVersion>latest</LangVersion>
<NoWarn>1591</NoWarn>
@@ -59,7 +59,7 @@
<PackageReference Include="ConfigureAwaitChecker.Analyzer" Version="3.0.0">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="HtmlAgilityPack" Version="1.11.4" />
<PackageReference Include="HtmlAgilityPack" Version="1.11.7" />
<PackageReference Include="Humanizer" Version="2.6.2" />
<PackageReference Include="JetBrains.Annotations" Version="2019.1.1" />
<PackageReference Include="Markdig.Signed" Version="0.17.0" />

View File

@@ -0,0 +1,52 @@
// _ _ _ ____ _ _____
// / \ _ __ ___ | |__ (_)/ ___| | |_ ___ __ _ _ __ ___ | ___|__ _ _ __ _ __ ___
// / _ \ | '__|/ __|| '_ \ | |\___ \ | __|/ _ \ / _` || '_ ` _ \ | |_ / _` || '__|| '_ ` _ \
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
// |
// Copyright 2015-2019 Łukasz "JustArchi" Domeradzki
// Contact: JustArchi@JustArchi.net
// |
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// |
// http://www.apache.org/licenses/LICENSE-2.0
// |
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Threading;
using JetBrains.Annotations;
namespace ArchiSteamFarm.Collections {
internal sealed class ConcurrentEnumerator<T> : IEnumerator<T> {
public T Current => Enumerator.Current;
private readonly IEnumerator<T> Enumerator;
private readonly SemaphoreSlim Semaphore;
object IEnumerator.Current => Current;
internal ConcurrentEnumerator([NotNull] IReadOnlyCollection<T> collection, [NotNull] SemaphoreSlim semaphore) {
if ((collection == null) || (semaphore == null)) {
throw new ArgumentNullException(nameof(collection) + " || " + nameof(semaphore));
}
Semaphore = semaphore;
semaphore.Wait();
Enumerator = collection.GetEnumerator();
}
public void Dispose() => Semaphore.Release();
public bool MoveNext() => Enumerator.MoveNext();
public void Reset() => Enumerator.Reset();
}
}

View File

@@ -97,7 +97,7 @@ namespace ArchiSteamFarm.Collections {
}
}
public IEnumerator<T> GetEnumerator() => new ConcurrentEnumerator(BackingCollection, CollectionSemaphore);
public IEnumerator<T> GetEnumerator() => new ConcurrentEnumerator<T>(BackingCollection, CollectionSemaphore);
public void IntersectWith(IEnumerable<T> other) {
CollectionSemaphore.Wait();
@@ -217,29 +217,5 @@ namespace ArchiSteamFarm.Collections {
CollectionSemaphore.Release();
}
}
private sealed class ConcurrentEnumerator : IEnumerator<T> {
public T Current => Enumerator.Current;
private readonly IEnumerator<T> Enumerator;
private readonly SemaphoreSlim Semaphore;
object IEnumerator.Current => Current;
internal ConcurrentEnumerator([NotNull] IReadOnlyCollection<T> collection, [NotNull] SemaphoreSlim semaphore) {
if ((collection == null) || (semaphore == null)) {
throw new ArgumentNullException(nameof(collection) + " || " + nameof(semaphore));
}
Semaphore = semaphore;
semaphore.Wait();
Enumerator = collection.GetEnumerator();
}
public void Dispose() => Semaphore.Release();
public bool MoveNext() => Enumerator.MoveNext();
public void Reset() => Enumerator.Reset();
}
}
}

View File

@@ -160,7 +160,7 @@ StackTrace:
<comment>{0} will be replaced by object's name</comment>
</data>
<data name="ErrorMobileAuthenticatorInvalidDeviceID" xml:space="preserve">
<value>Recusando executar esta função devido ao DeviceID inválido no ASF 2FA!</value>
<value>Recusando a execução desta função devido a um DeviceID inválido no ASF 2FA!</value>
</data>
<data name="ErrorNoBotsDefined" xml:space="preserve">
<value>Nenhum bot definido. Você se esqueceu de configurar seu ASF?</value>
@@ -187,7 +187,7 @@ StackTrace:
<value>Não foi possível prosseguir com a atualização pois esta versão não inclui nenhum arquivo!</value>
</data>
<data name="ErrorUserInputRunningInHeadlessMode" xml:space="preserve">
<value>O pedido de entrada do usuário foi recebido, mas o processo está sendo executado no modo não-interativo!</value>
<value>Recebemos um pedido de entrada do usuário, mas o processo está sendo executado no modo não-interativo!</value>
</data>
<data name="Exiting" xml:space="preserve">
<value>Saindo...</value>
@@ -443,7 +443,7 @@ StackTrace:
<value>Este bot não será iniciado pois está desativado no arquivo de configurações!</value>
</data>
<data name="BotInvalidAuthenticatorDuringLogin" xml:space="preserve">
<value>Erro TwoFactorCodeMismatch recebido {0} vezes seguidas. Suas credencias 2FA não são válidas ou seu relógio está fora de sincronia. Abortando!</value>
<value>Recebemos o código de erro TwoFactorCodeMismatch {0} vezes seguidas. As suas credencias da autenticação em duas etapas são inválidas ou o relógio do sistema não está sincronizado. Abortando!</value>
<comment>{0} will be replaced by maximum allowed number of failed 2FA attempts</comment>
</data>
<data name="BotLoggedOff" xml:space="preserve">
@@ -473,7 +473,7 @@ StackTrace:
<value>Você não pode enviar uma proposta de troca a si mesmo!</value>
</data>
<data name="BotNoASFAuthenticator" xml:space="preserve">
<value>Este bot não possui o ASF 2FA habilitado! Você esqueceu de importar seu autenticador para o 2FA ASF?</value>
<value>Este bot não possui o ASF 2FA habilitado! Você se esqueceu de importar o autenticador como ASF 2FA?</value>
</data>
<data name="BotNotConnected" xml:space="preserve">
<value>Esse bot não está conectado!</value>
@@ -661,22 +661,22 @@ StackTrace:
<comment>{0} will be replaced by bot's level</comment>
</data>
<data name="ActivelyMatchingItems" xml:space="preserve">
<value>Correspondendo itens Steam, rodada #{0}...</value>
<value>Associando itens do Steam, {0}ª rodada...</value>
<comment>{0} will be replaced by round number</comment>
</data>
<data name="DoneActivelyMatchingItems" xml:space="preserve">
<value>Itens Steam correspondidos, rodada #{0}.</value>
<value>Associação de itens do Steam concluída, {0}ª rodada.</value>
<comment>{0} will be replaced by round number</comment>
</data>
<data name="ErrorAborted" xml:space="preserve">
<value>Cancelado!</value>
</data>
<data name="ActivelyMatchingItemsRound" xml:space="preserve">
<value>Correspondido um total de {0} conjuntos nessa rodada.</value>
<value>{0} conjuntos foram associados no total nessa rodada.</value>
<comment>{0} will be replaced by number of sets traded</comment>
</data>
<data name="WarningExcessiveBotsCount" xml:space="preserve">
<value>Você está rodando mais contas de bots pessoais do que nosso limite máximo recomendado ({0}). Esteja ciente de que essa configuração não é suportada e pode causar vários problemas relacionados ao Steam, incluindo suspensões de contas. Confira o FAQ para mais detalhes.</value>
<value>Você está rodando mais contas pessoais de bots do que nosso limite máximo recomendado ({0}). Esteja ciente de que essa configuração não é suportada e pode causar vários problemas relacionados ao Steam, incluindo suspensões de contas. Acesse as perguntas frequentes para mais detalhes.</value>
<comment>{0} will be replaced by our maximum recommended bots count (number)</comment>
</data>
<data name="PluginLoaded" xml:space="preserve">
@@ -729,6 +729,6 @@ StackTrace:
<comment>{0} will be replaced by translated TimeSpan string (such as "1 minute")</comment>
</data>
<data name="UpdateCleanup" xml:space="preserve">
<value>Apagando arquivos antigos após a atualização...</value>
<value>Limpando arquivos antigos após a atualização...</value>
</data>
</root>

View File

@@ -37,10 +37,16 @@ namespace ArchiSteamFarm {
private static Mutex SingleInstance;
internal static void CoreInit() {
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) {
Console.OutputEncoding = Encoding.Unicode;
DisableQuickEditMode();
}
}
internal static void Init(bool systemRequired, GlobalConfig.EOptimizationMode optimizationMode) {
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) {
DisableQuickEditMode();
if (systemRequired) {
KeepWindowsSystemActive();
}

View File

@@ -129,7 +129,7 @@ namespace ArchiSteamFarm {
}
private static async Task InitASF(IReadOnlyCollection<string> args) {
Console.OutputEncoding = Encoding.Unicode;
OS.CoreInit();
string programIdentifier = SharedInfo.PublicIdentifier + " V" + SharedInfo.Version + " (" + SharedInfo.BuildInfo.Variant + "/" + SharedInfo.ModuleVersion + " | " + OS.Variant + ")";

File diff suppressed because one or more lines are too long

View File

@@ -59,6 +59,14 @@ before_build:
dotnet --info
if ($LastExitCode -ne 0) {
throw "Last command failed."
}
java -version
if ($LastExitCode -ne 0) {
throw "Last command failed."
}

2
wiki

Submodule wiki updated: 82e82c1a14...b65ec70ac9