Misc improvements

This commit is contained in:
JustArchi 2019-01-11 16:48:40 +01:00
parent fd933d166a
commit 1d8edde943
6 changed files with 39 additions and 16 deletions

View file

@ -56,7 +56,7 @@ script:
# TODO: Workaround https://github.com/mono/linker/issues/286 (don't forget to remove it from docker files too)
dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -o "out/${1}" --no-restore /nologo "/p:ASFVariant=$1" "/p:LinkDuringPublish=false"
else
dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -o "out/${1}" -r "$1" --no-restore /nologo "/p:ASFVariant=$1" "/p:CrossGenDuringPublish=false"
dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -o "out/${1}" -r "$1" --no-restore /nologo "/p:ASFVariant=$1"
fi
# If we include any helper scripts for this variant, copy them to output directory

View file

@ -6,6 +6,7 @@
<Authors>JustArchi</Authors>
<Company>JustArchi</Company>
<ConcurrentGarbageCollection>true</ConcurrentGarbageCollection>
<CrossGenDuringPublish>false</CrossGenDuringPublish>
<Copyright>Copyright © ArchiSteamFarm 2015-2019</Copyright>
<DefaultItemExcludes>$(DefaultItemExcludes);debug/**;out/**</DefaultItemExcludes>
<Description>ASF is an application that allows you to farm steam cards using multiple steam accounts simultaneously.</Description>
@ -37,6 +38,16 @@
<DefineConstants>$(DefineConstants);ASF_VARIANT_$(ASFVariant.Replace('-', '_').ToUpperInvariant())</DefineConstants>
</PropertyGroup>
<ItemGroup>
<LinkerRootDescriptors Include="rootDescriptor.xml" />
</ItemGroup>
<!-- Workaround for https://github.com/Microsoft/msbuild/issues/3350 -->
<!-- TODO: Revisit this with msbuild 16.0+ (probably .NET Core 3.0) -->
<ItemGroup>
<CoreCompileCache Include="$(DefineConstants)" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="ConfigureAwaitChecker.Analyzer" Version="2.0.0" />
<PackageReference Include="HtmlAgilityPack" Version="1.8.11" />
@ -77,15 +88,6 @@
</Reference>
</ItemGroup>
<ItemGroup>
<LinkerRootDescriptors Include="rootDescriptor.xml" />
</ItemGroup>
<!-- Workaround for https://github.com/Microsoft/msbuild/issues/3350 -->
<ItemGroup>
<CoreCompileCache Include="$(DefineConstants)" />
</ItemGroup>
<ItemGroup>
<Compile Update="Localization\Strings.Designer.cs">
<AutoGen>True</AutoGen>
@ -108,6 +110,9 @@
<None Update="ConfigGenerator.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Manual.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="UI.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>

View file

@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<title>ASF Manual</title>
<meta http-equiv="refresh" content="0; url=https://github.com/JustArchiNET/ArchiSteamFarm/wiki">
</head>
<body>
</body>
</html>

View file

@ -4,4 +4,4 @@
<assembly fullname="System.ComponentModel.TypeConverter">
<type fullname="System.ComponentModel.*" required="true" />
</assembly>
</linker>
</linker>

View file

@ -167,7 +167,7 @@ after_test:
# TODO: Workaround https://github.com/mono/linker/issues/286 (don't forget to remove it from docker files too)
dotnet publish ArchiSteamFarm -c "$env:CONFIGURATION" -f "$targetFramework" -o "out\$variant" --no-restore /nologo "/p:ASFVariant=$variant" "/p:LinkDuringPublish=false"
} else {
dotnet publish ArchiSteamFarm -c "$env:CONFIGURATION" -f "$targetFramework" -o "out\$variant" -r "$variant" --no-restore /nologo "/p:ASFVariant=$variant" "/p:CrossGenDuringPublish=false"
dotnet publish ArchiSteamFarm -c "$env:CONFIGURATION" -f "$targetFramework" -o "out\$variant" -r "$variant" --no-restore /nologo "/p:ASFVariant=$variant"
}
if ($LastExitCode -ne 0) {

17
cc.sh
View file

@ -1,20 +1,27 @@
#!/bin/bash
set -eu
NET_CORE_VERSION="netcoreapp2.2"
NET_FRAMEWORK_VERSION="net472"
MAIN_PROJECT="ArchiSteamFarm"
TESTS_PROJECT="${MAIN_PROJECT}.Tests"
SOLUTION="${MAIN_PROJECT}.sln"
CONFIGURATION="Release"
OUT="out/source"
TARGET_FRAMEWORK="netcoreapp2.2"
TARGET_FRAMEWORK="$NET_CORE_VERSION"
ASF_UI=1
CLEAN=0
LINK_DURING_PUBLISH=1
LINK_DURING_PUBLISH=0
PULL=1
SHARED_COMPILATION=1
TEST=1
PRINT_USAGE() {
echo "Usage: $0 [--clean] [--link-during-publish] [--netf] [--no-asf-ui] [--no-pull] [--no-shared-compilation] [--no-test] [debug/release]"
}
cd "$(dirname "$(readlink -f "$0")")"
for ARG in "$@"; do
@ -27,14 +34,16 @@ for ARG in "$@"; do
--no-clean) CLEAN=0 ;;
--link-during-publish) LINK_DURING_PUBLISH=1 ;;
--no-link-during-publish) LINK_DURING_PUBLISH=0 ;;
--netf) TARGET_FRAMEWORK="$NET_FRAMEWORK_VERSION" ;;
--no-netf) TARGET_FRAMEWORK="$NET_CORE_VERSION" ;;
--pull) PULL=1 ;;
--no-pull) PULL=0 ;;
--shared-compilation) SHARED_COMPILATION=1 ;;
--no-shared-compilation) SHARED_COMPILATION=0 ;;
--test) TEST=1 ;;
--no-test) TEST=0 ;;
--help) echo "Usage: $0 [--clean] [--no-asf-ui] [--no-link-during-publish] [--no-pull] [--no-shared-compilation] [--no-test] [debug/release]"; exit 0 ;;
*) echo "Usage: $0 [--clean] [--no-asf-ui] [--no-link-during-publish] [--no-pull] [--no-shared-compilation] [--no-test] [debug/release]"; exit 1
--help) PRINT_USAGE; exit 0 ;;
*) PRINT_USAGE; exit 1
esac
done