mirror of
https://github.com/BeyondDimension/SteamTools.git
synced 2026-10-26 20:20:14 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6562d28336 | ||
|
|
7c26e1fbc6 | ||
|
|
f15dc904ff | ||
|
|
a6102b92d2 | ||
|
|
fdf0e43ce6 | ||
|
|
8f64b542a6 | ||
|
|
5fcab98d4d | ||
|
|
c8bf9b39f4 | ||
|
|
fcaad74bb9 | ||
|
|
8361481d5c | ||
|
|
db6bf1d673 | ||
|
|
cbb7330bda | ||
|
|
079469b89e | ||
|
|
7f45ca966e | ||
|
|
a26b9689ee | ||
|
|
53bca3f027 | ||
|
|
0cc5c28c85 | ||
|
|
32bdab41a7 | ||
|
|
6bdfb0b9e0 | ||
|
|
8558ec864f | ||
|
|
99745d8c77 | ||
|
|
e20f96753b | ||
|
|
4cc738ca38 | ||
|
|
83433aea70 | ||
|
|
d97ab12427 | ||
|
|
8bb3526e27 | ||
|
|
6894ad27e2 | ||
|
|
053259bdaf | ||
|
|
62d6f66344 | ||
|
|
1d4b18da88 | ||
|
|
90dc90329d | ||
|
|
76bf2eb80d | ||
|
|
73b60d428d | ||
|
|
695657cbbc | ||
|
|
aa20d3d19c | ||
|
|
c9b0fdbe88 | ||
|
|
35498b2751 | ||
|
|
f894f0f58b | ||
|
|
6c08f51e9f | ||
|
|
12e46bd5a0 | ||
|
|
8e98313634 | ||
|
|
b947d6cdd5 | ||
|
|
e8e64c1c74 | ||
|
|
44b24406cf | ||
|
|
a4f06a2aa5 | ||
|
|
13db927cd3 | ||
|
|
90088e8d2c | ||
|
|
4d8f577e0b | ||
|
|
6ed175a01c | ||
|
|
7794eb7495 | ||
|
|
f6c869081b | ||
|
|
8a88dd0615 | ||
|
|
b247e0f6bc | ||
|
|
6e6fd8a881 | ||
|
|
1e118ae5e0 | ||
|
|
6c126f1c1f | ||
|
|
3df3d2857f | ||
|
|
d3e6293a89 | ||
|
|
161297a478 | ||
|
|
e244056d7d | ||
|
|
2e44dfc8ef | ||
|
|
930eb2261f | ||
|
|
c57b49e8de | ||
|
|
37be6b16eb | ||
|
|
c64fe98f73 | ||
|
|
b8ebbc73b3 | ||
|
|
12512231ba | ||
|
|
a8f6f663a1 | ||
|
|
35e9910ece | ||
|
|
0d9394aea9 | ||
|
|
208435cd57 | ||
|
|
e169bb4e88 | ||
|
|
88755791b1 | ||
|
|
73ba4d01bc | ||
|
|
b230eb9839 | ||
|
|
70df1891bf | ||
|
|
7bf0bc2be7 | ||
|
|
c694bd0586 | ||
|
|
ef79ceeb84 | ||
|
|
3ee1d99330 | ||
|
|
37735e0add | ||
|
|
61e31aab82 | ||
|
|
2ef08a87ea | ||
|
|
147ff6ce9d | ||
|
|
ec43d282e6 | ||
|
|
4211ab64a2 | ||
|
|
7f8411edc5 | ||
|
|
075ff38198 | ||
|
|
3627e26c5e | ||
|
|
2e296cb3ec | ||
|
|
132dd15f97 | ||
|
|
7965d4cab4 | ||
|
|
869567fde5 | ||
|
|
32a8d35c91 | ||
|
|
796b7f7622 | ||
|
|
e7f989627c | ||
|
|
2627d51af4 | ||
|
|
31100b2bac | ||
|
|
f283e87289 | ||
|
|
dc5e700907 | ||
|
|
44e5bdb895 | ||
|
|
879cda38fa | ||
|
|
dea356eee1 | ||
|
|
1182677aca | ||
|
|
8891a4658e | ||
|
|
d522ec4523 | ||
|
|
94bb65732e | ||
|
|
d1b81930e0 | ||
|
|
987a39bb84 | ||
|
|
b7b6548a36 | ||
|
|
f07b4d3390 | ||
|
|
00678d6afe | ||
|
|
6cd2ab22e1 | ||
|
|
ef8a167472 | ||
|
|
4a802a88d6 | ||
|
|
0c9c66fe1d | ||
|
|
05627ceb0a | ||
|
|
aca4ee031c | ||
|
|
48d9d07373 | ||
|
|
b61de318e8 | ||
|
|
dd16bd64fd | ||
|
|
6726c02d2f | ||
|
|
145fcb33b7 | ||
|
|
2dfbec3967 | ||
|
|
5ec4ccf735 | ||
|
|
1b6c47cc4c | ||
|
|
89172b85e7 | ||
|
|
32005d6abe | ||
|
|
519d12dddd | ||
|
|
c7fe1bd2a2 | ||
|
|
4ba3346d0c | ||
|
|
8061e36829 | ||
|
|
6249d5f384 | ||
|
|
32b6819768 | ||
|
|
d85ed18225 | ||
|
|
1eef19f4b8 | ||
|
|
215d3ebf7c | ||
|
|
f2fb797a56 | ||
|
|
85ffb45324 | ||
|
|
d247b100f4 | ||
|
|
a8ca77d8c0 | ||
|
|
b0ee5c0bde | ||
|
|
6e3bba1e6e | ||
|
|
d9f26dc0bc | ||
|
|
9ba2ff380c | ||
|
|
d7f26d00a0 | ||
|
|
017c17d32b | ||
|
|
571bede4fc | ||
|
|
276d749598 | ||
|
|
acbba55ffe | ||
|
|
0cf3892ae9 | ||
|
|
f874c6e22f | ||
|
|
b71fabb435 | ||
|
|
a23b62c71f | ||
|
|
3732af2374 | ||
|
|
6d3199a89d | ||
|
|
4312f76106 | ||
|
|
b1692497a7 | ||
|
|
abc9676e69 | ||
|
|
eaf70bef97 | ||
|
|
47056fa1ff | ||
|
|
3e545b2c13 | ||
|
|
f4f0f35267 | ||
|
|
afc805aaf5 | ||
|
|
abb52f1667 | ||
|
|
2433366978 | ||
|
|
2db4b9963e | ||
|
|
b0e3970074 | ||
|
|
d5b82a09a9 | ||
|
|
f749fe37c0 | ||
|
|
42aa6fcc99 | ||
|
|
075bdf9202 | ||
|
|
48921457f3 | ||
|
|
527f8e719c | ||
|
|
12cdb6b03d | ||
|
|
e51f19bdf7 | ||
|
|
b9e48d66cc | ||
|
|
3a2aa8276b | ||
|
|
a9f0b36df7 | ||
|
|
6edd126a8e | ||
|
|
53e4a3cc95 | ||
|
|
dd79afe919 | ||
|
|
ba183090ef | ||
|
|
3a9c1c2ef4 | ||
|
|
cc2845c566 | ||
|
|
d3dd6a228a | ||
|
|
9651d8d013 | ||
|
|
f7d8eefe1c | ||
|
|
3b423b4f84 | ||
|
|
ad8d30f39a | ||
|
|
b273ab8bfc | ||
|
|
09e89df082 | ||
|
|
4cd52bc758 | ||
|
|
45f5001041 | ||
|
|
9cb3db3594 | ||
|
|
998d8bb139 | ||
|
|
de3620eec2 | ||
|
|
683b793326 | ||
|
|
6464a822c4 | ||
|
|
7d37e7d76b | ||
|
|
4b45cd5798 | ||
|
|
c10f81e7c3 | ||
|
|
b2b950b0e6 | ||
|
|
96b5474641 | ||
|
|
8cc44fc569 | ||
|
|
37edbae348 | ||
|
|
cbd672a962 | ||
|
|
51c34160a1 | ||
|
|
708546d384 | ||
|
|
4bc88ea640 | ||
|
|
0b08857bd2 | ||
|
|
eb890f41aa | ||
|
|
e02ecc4956 | ||
|
|
fceb37a475 | ||
|
|
4c80f6c887 | ||
|
|
7315e432cb | ||
|
|
2d4f0fe7a1 | ||
|
|
e237c144d4 | ||
|
|
a98182d0d2 | ||
|
|
8a9dd00dcc | ||
|
|
035abe98f1 | ||
|
|
04250f415c | ||
|
|
1ada60511b | ||
|
|
71d9f0f986 | ||
|
|
73b6abaa7a | ||
|
|
c69ac36b9b | ||
|
|
3b85858ee2 | ||
|
|
2defa4ccd5 | ||
|
|
c081f79d35 | ||
|
|
2d26ed2aa4 | ||
|
|
c2d5b0e160 | ||
|
|
0f18581ab2 | ||
|
|
ba3ffaaff0 | ||
|
|
b82f6f3e49 | ||
|
|
d09fe704b6 | ||
|
|
33234398d5 | ||
|
|
085cd09872 | ||
|
|
708330790c | ||
|
|
0bb4e26f90 | ||
|
|
0d446e51d4 | ||
|
|
91c647973a | ||
|
|
b48772c353 | ||
|
|
7836ccc56e | ||
|
|
269825e2e1 | ||
|
|
438073f980 | ||
|
|
ff93dd97f9 | ||
|
|
a76c287146 | ||
|
|
3b08ecc5a5 | ||
|
|
dfd8a31326 | ||
|
|
f80ec7c79a | ||
|
|
fd257a084d | ||
|
|
6d705a576d | ||
|
|
3e6666f87a | ||
|
|
1c9017804f | ||
|
|
3e022c922a | ||
|
|
aa5f8ff64b | ||
|
|
ae218f0a5d | ||
|
|
6aef170d9a | ||
|
|
b39deb6197 | ||
|
|
7e54aaeb95 | ||
|
|
0c2fadb25a | ||
|
|
dfaf48ccd8 | ||
|
|
89343ceddd | ||
|
|
5728ad647e | ||
|
|
d4c02bc632 | ||
|
|
5fc0680845 | ||
|
|
bf9c045d8f | ||
|
|
a0bfa5d735 | ||
|
|
49998db4c4 | ||
|
|
29b5cd9371 | ||
|
|
7a0a4c4b5c | ||
|
|
dcf4db3ce4 | ||
|
|
ace93bfa7f | ||
|
|
3374de3506 | ||
|
|
7e223f4919 | ||
|
|
f4a8586a28 | ||
|
|
e2bbad31b2 | ||
|
|
494abed3c0 | ||
|
|
98f203d041 | ||
|
|
664cf75376 | ||
|
|
8b48062534 | ||
|
|
cf2def4ba9 | ||
|
|
97e6dfe6b2 | ||
|
|
e56466fe3f | ||
|
|
17db7a5264 | ||
|
|
0b30d217cc | ||
|
|
0a558c58f0 | ||
|
|
135c7fc7c3 | ||
|
|
5b819f0769 | ||
|
|
eb9f146471 | ||
|
|
a4200f5011 | ||
|
|
0865b7d3b0 | ||
|
|
be41fd6923 | ||
|
|
2fce4e828f | ||
|
|
0cd7f6cd72 | ||
|
|
b429915814 | ||
|
|
093b642e1c | ||
|
|
f59c600dbb | ||
|
|
36582cc455 | ||
|
|
d68eecd027 | ||
|
|
71076e50e5 | ||
|
|
fe377c3e68 | ||
|
|
369da3d830 | ||
|
|
1e39cbb586 | ||
|
|
feaecbcd16 | ||
|
|
988f601bfe | ||
|
|
2c72f6b452 | ||
|
|
b3201064ca | ||
|
|
7032193e52 | ||
|
|
8269098bcb | ||
|
|
8c2d5e760f | ||
|
|
da4c96e8d0 | ||
|
|
9aabd3b00d | ||
|
|
c1859bbe58 | ||
|
|
ed8a0b0143 | ||
|
|
e966dd9383 | ||
|
|
f38aeefdf9 | ||
|
|
9ca190f3bb | ||
|
|
703b2e7df2 | ||
|
|
1d1cd72e76 | ||
|
|
e6142bde00 | ||
|
|
10cb17831f | ||
|
|
bdd52b8789 | ||
|
|
11f0fcf547 | ||
|
|
db2df8eb28 | ||
|
|
1f307a63bb | ||
|
|
7921441010 | ||
|
|
fd6591f0ab | ||
|
|
bc2607127d | ||
|
|
6e11a235dd | ||
|
|
1efa07fef6 | ||
|
|
76c1de1639 | ||
|
|
bf1b22db3e | ||
|
|
6aaeded354 | ||
|
|
a40171dd73 | ||
|
|
273377a0d3 | ||
|
|
57aa04af69 | ||
|
|
c2d934edd5 | ||
|
|
ec2f863222 | ||
|
|
21ed97b807 | ||
|
|
3e1b9cf9fd | ||
|
|
7e99faffe4 | ||
|
|
56b019d96c | ||
|
|
9f748bf2bf | ||
|
|
bf2d7feaf7 | ||
|
|
2c48edf29a | ||
|
|
02c5dec9da | ||
|
|
6ee85ec8a6 | ||
|
|
03dacce353 | ||
|
|
1cde3b4178 | ||
|
|
e8eb23b161 | ||
|
|
9b257524bd | ||
|
|
e5ddc46deb | ||
|
|
51fdc5a841 | ||
|
|
2e263a96b9 | ||
|
|
d543c2bac1 | ||
|
|
0509d2b843 | ||
|
|
f0a14e332d | ||
|
|
948016c84f | ||
|
|
98da730c18 | ||
|
|
ab6bfd45b7 | ||
|
|
8abfc81ba2 | ||
|
|
d4d6c2fb51 | ||
|
|
8da01ac3dd | ||
|
|
2ab26f7848 | ||
|
|
d646eacda1 | ||
|
|
fb029f729b | ||
|
|
5ef6663269 | ||
|
|
5c86b53000 | ||
|
|
efb6adbd9b | ||
|
|
209202b5cf | ||
|
|
c0a081e226 |
+117
-28
@@ -1,4 +1,7 @@
|
||||
name: .NET Build
|
||||
name: Build
|
||||
|
||||
env:
|
||||
ProjectName: Steam++
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -8,21 +11,26 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# os: [ windows-latest, macOS-latest, ubuntu-latest ]
|
||||
os: [ windows-latest ]
|
||||
configuration: [ Debug, Release ]
|
||||
os: [ windows-latest, macOS-latest, ubuntu-latest ]
|
||||
# rid: [ fd-win-x64, win-x64, osx-x64, linux-x64,linux-arm64 ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup .NET 5
|
||||
uses: actions/setup-dotnet@v1
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
dotnet-version: 5.0.x
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: Setup .NET 6
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: 6.0.100
|
||||
dotnet-version: 6.0.x
|
||||
|
||||
- name: Install macOS SDK(macOS)
|
||||
if: matrix.os == 'macOS-latest'
|
||||
@@ -36,14 +44,24 @@ jobs:
|
||||
if: matrix.os == 'windows-latest'
|
||||
run: dotnet workload install maui
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
- name: Checkout submodules
|
||||
run: git submodule update --init --recursive
|
||||
|
||||
- name: dotnet info
|
||||
- name: Verify dotnet info
|
||||
run: dotnet --info
|
||||
|
||||
|
||||
- name: Checkout Credentials repository
|
||||
if: ${{ matrix.os == 'windows-latest' && !startsWith(github.ref, 'refs/tags/') && github.event_name == 'push' }}
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: SteamTools-Team/Credentials
|
||||
token: ${{ secrets.REPO_TOKEN }}
|
||||
path: ./Credentials
|
||||
|
||||
- name: Copy pfx and snk To Source
|
||||
if: ${{ matrix.os == 'windows-latest' && !startsWith(github.ref, 'refs/tags/') && github.event_name == 'push' }}
|
||||
run: |
|
||||
copy ".\Credentials\*.pfx" .
|
||||
copy ".\Credentials\*.snk" .
|
||||
dir *.pfx -s
|
||||
|
||||
- name: dotnet restore SteamToolsV2+.sln
|
||||
if: matrix.os == 'windows-latest'
|
||||
run: dotnet restore ./SteamToolsV2+.sln
|
||||
@@ -56,19 +74,90 @@ jobs:
|
||||
if: matrix.os == 'macOS-latest'
|
||||
run: dotnet restore ./SteamToolsV2+.Mac.slnf
|
||||
|
||||
- name: dotnet AvaloniaApp build
|
||||
run: dotnet build ./src/ST.Client.Desktop.Avalonia.App/ST.Client.Avalonia.App.csproj
|
||||
- name: dotnet CommonUnit build
|
||||
run: dotnet build ./tests/Common.UnitTest/Common.UnitTest.csproj
|
||||
- name: dotnet ST.Client.UnitTest build
|
||||
run: dotnet build ./tests/ST.Client.UnitTest/ST.Client.UnitTest.csproj
|
||||
# - name: dotnet ST.Client.Desktop.UnitTest build
|
||||
# run: dotnet build ./tests/ST.Client.Desktop.UnitTest/ST.Client.Desktop.UnitTest.csproj
|
||||
- name: Build AvaloniaApp ${{ matrix.configuration }}
|
||||
run: dotnet build ./src/ST.Client.Desktop.Avalonia.App/ST.Client.Avalonia.App.csproj -c "${{ matrix.configuration }}"
|
||||
|
||||
- name: dotnet CommonUnit test
|
||||
run: dotnet test ./tests/Common.UnitTest/Common.UnitTest.csproj
|
||||
- name: dotnet ST.Client.UnitTest test
|
||||
run: dotnet test ./tests/ST.Client.UnitTest/ST.Client.UnitTest.csproj
|
||||
- name: Run CommonUnit
|
||||
run: dotnet test ./tests/Common.UnitTest/Common.UnitTest.csproj -c "${{ matrix.configuration }}"
|
||||
|
||||
- name: Run ST.Client.UnitTest
|
||||
run: dotnet test ./tests/ST.Client.UnitTest/ST.Client.UnitTest.csproj -c "${{ matrix.configuration }}"
|
||||
|
||||
- name: Run ST.Client.Desktop.UnitTest
|
||||
run: dotnet test ./tests/ST.Client.Desktop.UnitTest/ST.Client.Desktop.UnitTest.csproj -c "${{ matrix.configuration }}"
|
||||
|
||||
# - name: dotnet ST.Client.Desktop.UnitTest test
|
||||
# if: matrix.os != 'windows-latest'
|
||||
# run: dotnet test ./tests/ST.Client.Desktop.UnitTest/ST.Client.Desktop.UnitTest.csproj
|
||||
|
||||
- name: Get Short CommitId
|
||||
if: ${{ matrix.os == 'windows-latest' && !startsWith(github.ref, 'refs/tags/') && github.event_name == 'push' }}
|
||||
shell: pwsh
|
||||
run: Write-Output "GITHUB_SHA_SHORT=$(${env:GITHUB_SHA}.Substring(0,7))" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
|
||||
- name: Build ST.Tools.Publish Release
|
||||
if: ${{ matrix.os == 'windows-latest' && !startsWith(github.ref, 'refs/tags/') && github.event_name == 'push' }}
|
||||
run: dotnet build ./src/ST.Tools.Publish/ST.Tools.Publish.csproj -c Release
|
||||
|
||||
- name: Build ${{ matrix.configuration }} & Package All
|
||||
if: ${{ matrix.os == 'windows-latest' && !startsWith(github.ref, 'refs/tags/') && github.event_name == 'push' }}
|
||||
shell: pwsh
|
||||
run: .\packaging\build.ps1 -configuration ${{ matrix.configuration }}
|
||||
|
||||
- name: All Package
|
||||
if: ${{ matrix.os == 'windows-latest' && !startsWith(github.ref, 'refs/tags/') && github.event_name == 'push' }}
|
||||
shell: pwsh
|
||||
run: |
|
||||
$dev = $(if ('${{ matrix.configuration }}' -eq 'Debug') {"-dev"})
|
||||
$pexe=".\src\ST.Tools.Publish\bin\Release\net6.0\p.exe"
|
||||
& $pexe hp $dev
|
||||
& $pexe sta $dev
|
||||
& $pexe 7z -buildpackage ${env:GITHUB_SHA_SHORT} $dev
|
||||
|
||||
- name: Upload fd-win-x64 App ${{ matrix.configuration }}
|
||||
continue-on-error: true
|
||||
if: ${{ matrix.os == 'windows-latest' && !startsWith(github.ref, 'refs/tags/') && github.event_name == 'push' }}
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: '[${{ matrix.configuration }}]${{ env.ProjectName }}_win_x64_fde_${{ env.GITHUB_SHA_SHORT }}'
|
||||
path: src\ST.Client.Desktop.Avalonia.App\bin\${{ matrix.configuration }}\Publish\${{ env.ProjectName }}_win_x64_fde_${{ env.GITHUB_SHA_SHORT }}.7z
|
||||
|
||||
- name: Upload win-x64 App ${{ matrix.configuration }}
|
||||
continue-on-error: true
|
||||
if: ${{ matrix.os == 'windows-latest' && !startsWith(github.ref, 'refs/tags/') && github.event_name == 'push' }}
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: '[${{ matrix.configuration }}]${{ env.ProjectName }}_win_x64_${{ env.GITHUB_SHA_SHORT }}'
|
||||
path: src\ST.Client.Desktop.Avalonia.App\bin\${{ matrix.configuration }}\Publish\${{ env.ProjectName }}_win_x64_${{ env.GITHUB_SHA_SHORT }}.7z
|
||||
|
||||
- name: Upload macos-x64 App ${{ matrix.configuration }}
|
||||
continue-on-error: true
|
||||
if: ${{ matrix.os == 'windows-latest' && !startsWith(github.ref, 'refs/tags/') && github.event_name == 'push' }}
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: '[${{ matrix.configuration }}]${{ env.ProjectName }}_macos_x64_${{ env.GITHUB_SHA_SHORT }}'
|
||||
path: src\ST.Client.Desktop.Avalonia.App\bin\${{ matrix.configuration }}\Publish\${{ env.ProjectName }}_macos_x64_${{ env.GITHUB_SHA_SHORT }}.7z
|
||||
|
||||
- name: Upload macos-arm64 App ${{ matrix.configuration }}
|
||||
continue-on-error: true
|
||||
if: ${{ matrix.os == 'windows-latest' && !startsWith(github.ref, 'refs/tags/') && github.event_name == 'push' }}
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: '[${{ matrix.configuration }}]${{ env.ProjectName }}_macos_arm64_${{ env.GITHUB_SHA_SHORT }}'
|
||||
path: src\ST.Client.Desktop.Avalonia.App\bin\${{ matrix.configuration }}\Publish\${{ env.ProjectName }}_macos_arm64_${{ env.GITHUB_SHA_SHORT }}.7z
|
||||
|
||||
- name: Upload linux-x64 App ${{ matrix.configuration }}
|
||||
continue-on-error: true
|
||||
if: ${{ matrix.os == 'windows-latest' && !startsWith(github.ref, 'refs/tags/') && github.event_name == 'push' }}
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: '[${{ matrix.configuration }}]${{ env.ProjectName }}_linux_x64_${{ env.GITHUB_SHA_SHORT }}'
|
||||
path: src\ST.Client.Desktop.Avalonia.App\bin\${{ matrix.configuration }}\Publish\${{ env.ProjectName }}_linux_x64_${{ env.GITHUB_SHA_SHORT }}.7z
|
||||
|
||||
- name: Upload linux-arm64 App ${{ matrix.configuration }}
|
||||
continue-on-error: true
|
||||
if: ${{ matrix.os == 'windows-latest' && !startsWith(github.ref, 'refs/tags/') && github.event_name == 'push' }}
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: '[${{ matrix.configuration }}]${{ env.ProjectName }}_linux_arm64_${{ env.GITHUB_SHA_SHORT }}'
|
||||
path: src\ST.Client.Desktop.Avalonia.App\bin\${{ matrix.configuration }}\Publish\${{ env.ProjectName }}_linux_arm64_${{ env.GITHUB_SHA_SHORT }}.7z
|
||||
|
||||
@@ -0,0 +1,331 @@
|
||||
name: Publish
|
||||
|
||||
env:
|
||||
ProjectName: Steam++
|
||||
Configuration: Release
|
||||
PublishFilePath: C:\PublishFiles
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
Publish:
|
||||
name: Publish
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ windows-latest ]
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: Setup .NET 6
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: 6.0.x
|
||||
|
||||
- name: Install macOS SDK(macOS)
|
||||
if: matrix.os == 'macOS-latest'
|
||||
run: sudo dotnet workload install macos
|
||||
|
||||
- name: Install macOS SDK(Windows)
|
||||
if: matrix.os == 'windows-latest'
|
||||
run: dotnet workload install macos
|
||||
|
||||
- name: Install Maui(Windows)
|
||||
if: matrix.os == 'windows-latest'
|
||||
run: dotnet workload install maui
|
||||
|
||||
- name: Verify dotnet info
|
||||
run: dotnet --info
|
||||
|
||||
- name: Shell Version
|
||||
run: sh --version
|
||||
|
||||
- name: Checkout NSIS-Build repository
|
||||
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: SteamTools-Team/NSIS-Build
|
||||
token: ${{ secrets.REPO_TOKEN }}
|
||||
path: ./NSIS-Build
|
||||
|
||||
- name: Checkout Credentials repository
|
||||
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: SteamTools-Team/Credentials
|
||||
token: ${{ secrets.REPO_TOKEN }}
|
||||
path: ./Credentials
|
||||
|
||||
- name: Copy pfx and snk To Source
|
||||
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
|
||||
run: |
|
||||
copy ".\Credentials\*.pfx" .
|
||||
copy ".\Credentials\*.snk" .
|
||||
dir *.pfx -s
|
||||
|
||||
- name: dotnet restore SteamToolsV2+.sln
|
||||
if: matrix.os == 'windows-latest'
|
||||
run: dotnet restore ./SteamToolsV2+.sln
|
||||
|
||||
- name: dotnet restore SteamToolsV2+.Linux.sln
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
run: dotnet restore ./SteamToolsV2+.Linux.slnf
|
||||
|
||||
- name: dotnet restore SteamToolsV2+.Mac.sln
|
||||
if: matrix.os == 'macOS-latest'
|
||||
run: dotnet restore ./SteamToolsV2+.Mac.slnf
|
||||
|
||||
- name: Build AvaloniaApp
|
||||
run: dotnet build ./src/ST.Client.Desktop.Avalonia.App/ST.Client.Avalonia.App.csproj -c "${{ env.Configuration }}"
|
||||
|
||||
- name: Run CommonUnit
|
||||
run: dotnet test ./tests/Common.UnitTest/Common.UnitTest.csproj -c "${{ env.Configuration }}"
|
||||
|
||||
- name: Run ST.Client.UnitTest
|
||||
run: dotnet test ./tests/ST.Client.UnitTest/ST.Client.UnitTest.csproj -c "${{ env.Configuration }}"
|
||||
|
||||
- name: Run ST.Client.Desktop.UnitTest
|
||||
run: dotnet test ./tests/ST.Client.Desktop.UnitTest/ST.Client.Desktop.UnitTest.csproj -c "${{ env.Configuration }}"
|
||||
|
||||
- name: Get tag
|
||||
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
|
||||
id: tag
|
||||
uses: dawidd6/action-get-tag@v1
|
||||
|
||||
- name: Build ST.Tools.Publish Release
|
||||
run: dotnet build ./src/ST.Tools.Publish/ST.Tools.Publish.csproj -c Release
|
||||
|
||||
- name: Build Release & Package All & Publish Server
|
||||
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
|
||||
shell: pwsh
|
||||
run: .\packaging\build.ps1 -version ${{ steps.tag.outputs.tag }} -configuration ${{ env.Configuration }} -isPublish $true
|
||||
env:
|
||||
Token: ${{ secrets.PUBLISH_TOKEN }}
|
||||
|
||||
- name: Package fd-win-x64 7z
|
||||
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
|
||||
shell: pwsh
|
||||
run: |
|
||||
New-Item -ItemType Directory -Path ${env:PublishFilePath} -Force > $null
|
||||
Copy-Item ".\src\ST.Client.Desktop.Avalonia.App\bin\${env:Configuration}\Publish\${env:ProjectName}_win_x64_fde_v${{ steps.tag.outputs.tag }}.7z" "${env:PublishFilePath}"
|
||||
Write-Output "fd_win_x64_SHA256=$(.\packaging\SHA256.ps1 ${env:PublishFilePath}\${env:ProjectName}_win_x64_fde_v${{ steps.tag.outputs.tag }}.7z)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
|
||||
- name: Package fd-win-x64 exe
|
||||
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
|
||||
shell: pwsh
|
||||
run: |
|
||||
New-Item -ItemType Directory -Path ${env:PublishFilePath} -Force > $null
|
||||
Copy-Item ".\src\ST.Client.Desktop.Avalonia.App\bin\${env:Configuration}\Publish\${env:ProjectName}_win_x64_fde_v${{ steps.tag.outputs.tag }}.exe" "${env:PublishFilePath}"
|
||||
Write-Output "exe_fd_win_x64_SHA256=$(.\packaging\SHA256.ps1 ${env:PublishFilePath}\${env:ProjectName}_win_x64_fde_v${{ steps.tag.outputs.tag }}.exe)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
|
||||
- name: Package win-x64 7z
|
||||
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
|
||||
shell: pwsh
|
||||
run: |
|
||||
New-Item -ItemType Directory -Path ${env:PublishFilePath} -Force > $null
|
||||
Copy-Item ".\src\ST.Client.Desktop.Avalonia.App\bin\${env:Configuration}\Publish\${env:ProjectName}_win_x64_v${{ steps.tag.outputs.tag }}.7z" "${env:PublishFilePath}"
|
||||
Write-Output "win_x64_SHA256=$(.\packaging\SHA256.ps1 ${env:PublishFilePath}\${env:ProjectName}_win_x64_v${{ steps.tag.outputs.tag }}.7z)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
|
||||
- name: Package win-x64 exe
|
||||
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
|
||||
shell: pwsh
|
||||
run: |
|
||||
New-Item -ItemType Directory -Path ${env:PublishFilePath} -Force > $null
|
||||
Copy-Item ".\src\ST.Client.Desktop.Avalonia.App\bin\${env:Configuration}\Publish\${env:ProjectName}_win_x64_v${{ steps.tag.outputs.tag }}.exe" "${env:PublishFilePath}"
|
||||
Write-Output "exe_win_x64_SHA256=$(.\packaging\SHA256.ps1 ${env:PublishFilePath}\${env:ProjectName}_win_x64_v${{ steps.tag.outputs.tag }}.exe)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
|
||||
- name: Package osx-x64 7z
|
||||
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
|
||||
shell: pwsh
|
||||
run: |
|
||||
New-Item -ItemType Directory -Path ${env:PublishFilePath} -Force > $null
|
||||
Copy-Item ".\src\ST.Client.Desktop.Avalonia.App\bin\${env:Configuration}\Publish\${env:ProjectName}_macos_x64_v${{ steps.tag.outputs.tag }}.7z" "${env:PublishFilePath}"
|
||||
Write-Output "macos_x64_SHA256=$(.\packaging\SHA256.ps1 ${env:PublishFilePath}\${env:ProjectName}_macos_x64_v${{ steps.tag.outputs.tag }}.7z)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
|
||||
- name: Package osx-arm64 7z
|
||||
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
|
||||
shell: pwsh
|
||||
run: |
|
||||
New-Item -ItemType Directory -Path ${env:PublishFilePath} -Force > $null
|
||||
Copy-Item ".\src\ST.Client.Desktop.Avalonia.App\bin\${env:Configuration}\Publish\${env:ProjectName}_macos_arm64_v${{ steps.tag.outputs.tag }}.7z" "${env:PublishFilePath}"
|
||||
Write-Output "macos_arm64_SHA256=$(.\packaging\SHA256.ps1 ${env:PublishFilePath}\${env:ProjectName}_macos_arm64_v${{ steps.tag.outputs.tag }}.7z)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
|
||||
- name: Package linux-x64 7z
|
||||
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
|
||||
shell: pwsh
|
||||
run: |
|
||||
New-Item -ItemType Directory -Path ${env:PublishFilePath} -Force > $null
|
||||
Copy-Item ".\src\ST.Client.Desktop.Avalonia.App\bin\${env:Configuration}\Publish\${env:ProjectName}_linux_x64_v${{ steps.tag.outputs.tag }}.7z" "${env:PublishFilePath}"
|
||||
Write-Output "linux_x64_SHA256=$(.\packaging\SHA256.ps1 ${env:PublishFilePath}\${env:ProjectName}_linux_x64_v${{ steps.tag.outputs.tag }}.7z)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
|
||||
- name: Package linux-arm64 7z
|
||||
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
|
||||
shell: pwsh
|
||||
run: |
|
||||
New-Item -ItemType Directory -Path ${env:PublishFilePath} -Force > $null
|
||||
Copy-Item ".\src\ST.Client.Desktop.Avalonia.App\bin\${env:Configuration}\Publish\${env:ProjectName}_linux_arm64_v${{ steps.tag.outputs.tag }}.7z" "${env:PublishFilePath}"
|
||||
Write-Output "linux_arm64_SHA256=$(.\packaging\SHA256.ps1 ${env:PublishFilePath}\${env:ProjectName}_linux_arm64_v${{ steps.tag.outputs.tag }}.7z)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
|
||||
- name: Package linux-x64 deb
|
||||
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
|
||||
shell: pwsh
|
||||
run: |
|
||||
New-Item -ItemType Directory -Path ${env:PublishFilePath} -Force > $null
|
||||
Copy-Item ".\src\ST.Client.Desktop.Avalonia.App\bin\${env:Configuration}\Publish\${env:ProjectName}_linux_x64_v${{ steps.tag.outputs.tag }}.deb" "${env:PublishFilePath}"
|
||||
Write-Output "deb_linux_x64_SHA256=$(.\packaging\SHA256.ps1 ${env:PublishFilePath}\${env:ProjectName}_linux_x64_v${{ steps.tag.outputs.tag }}.deb)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
|
||||
- name: Package linux-arm64 deb
|
||||
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
|
||||
shell: pwsh
|
||||
run: |
|
||||
New-Item -ItemType Directory -Path ${env:PublishFilePath} -Force > $null
|
||||
Copy-Item ".\src\ST.Client.Desktop.Avalonia.App\bin\${env:Configuration}\Publish\${env:ProjectName}_linux_arm64_v${{ steps.tag.outputs.tag }}.deb" "${env:PublishFilePath}"
|
||||
Write-Output "deb_linux_arm64_SHA256=$(.\packaging\SHA256.ps1 ${env:PublishFilePath}\${env:ProjectName}_linux_arm64_v${{ steps.tag.outputs.tag }}.deb)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
|
||||
- name: Package linux-x64 rpm
|
||||
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
|
||||
shell: pwsh
|
||||
run: |
|
||||
New-Item -ItemType Directory -Path ${env:PublishFilePath} -Force > $null
|
||||
Copy-Item ".\src\ST.Client.Desktop.Avalonia.App\bin\${env:Configuration}\Publish\${env:ProjectName}_linux_x64_v${{ steps.tag.outputs.tag }}.rpm" "${env:PublishFilePath}"
|
||||
Write-Output "rpm_linux_x64_SHA256=$(.\packaging\SHA256.ps1 ${env:PublishFilePath}\${env:ProjectName}_linux_x64_v${{ steps.tag.outputs.tag }}.rpm)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
|
||||
- name: Package linux-arm64 rpm
|
||||
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
|
||||
shell: pwsh
|
||||
run: |
|
||||
New-Item -ItemType Directory -Path ${env:PublishFilePath} -Force > $null
|
||||
Copy-Item ".\src\ST.Client.Desktop.Avalonia.App\bin\${env:Configuration}\Publish\${env:ProjectName}_linux_arm64_v${{ steps.tag.outputs.tag }}.rpm" "${env:PublishFilePath}"
|
||||
Write-Output "rpm_linux_arm64_SHA256=$(.\packaging\SHA256.ps1 ${env:PublishFilePath}\${env:ProjectName}_linux_arm64_v${{ steps.tag.outputs.tag }}.rpm)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
|
||||
- name: Changelog
|
||||
uses: glennawatson/ChangeLog@v1
|
||||
id: changelog
|
||||
|
||||
- name: Create a new GitHub release
|
||||
uses: ncipollo/release-action@v1
|
||||
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
name: ${{ steps.tag.outputs.tag }}
|
||||
prerelease: false
|
||||
draft: true
|
||||
artifacts: ${{ env.PublishFilePath }}\*
|
||||
body: |
|
||||
## 版本亮点
|
||||
* 此版本由 GitHub Action 自动化部署发布,更新日志会在一段时间后手动更新。
|
||||
|
||||
|
||||
${{ steps.changelog.outputs.commitLog }}
|
||||
|
||||
|
||||
## 文件校验
|
||||
| File | Checksum (SHA256) |
|
||||
| :- | :- |
|
||||
| <sub>${{ env.ProjectName }}_win_x64_v${{ steps.tag.outputs.tag }}.7z</sub> | <sub>${{ env.win_x64_SHA256 }}</sub> |
|
||||
| <sub>${{ env.ProjectName }}_win_x64_fde_v${{ steps.tag.outputs.tag }}.7z</sub> | <sub>${{ env.fd_win_x64_SHA256 }}</sub> |
|
||||
| <sub>${{ env.ProjectName }}_win_x64_v${{ steps.tag.outputs.tag }}.exe</sub> | <sub>${{ env.exe_win_x64_SHA256 }}</sub> |
|
||||
| <sub>${{ env.ProjectName }}_win_x64_fde_v${{ steps.tag.outputs.tag }}.exe</sub> | <sub>${{ env.exe_fd_win_x64_SHA256 }}</sub> |
|
||||
|||
|
||||
| <sub>${{ env.ProjectName }}_linux_x64_v${{ steps.tag.outputs.tag }}.7z</sub> | <sub>${{ env.linux_x64_SHA256 }}</sub> |
|
||||
| <sub>${{ env.ProjectName }}_linux_arm64_v${{ steps.tag.outputs.tag }}.7z</sub> | <sub>${{ env.linux_arm64_SHA256 }}</sub> |
|
||||
| <sub>${{ env.ProjectName }}_linux_x64_v${{ steps.tag.outputs.tag }}.deb</sub> | <sub>${{ env.deb_linux_x64_SHA256 }}</sub> |
|
||||
| <sub>${{ env.ProjectName }}_linux_arm64_v${{ steps.tag.outputs.tag }}.deb</sub> | <sub>${{ env.deb_linux_arm64_SHA256 }}</sub> |
|
||||
| <sub>${{ env.ProjectName }}_linux_x64_v${{ steps.tag.outputs.tag }}.rpm</sub> | <sub>${{ env.rpm_linux_x64_SHA256 }}</sub> |
|
||||
| <sub>${{ env.ProjectName }}_linux_arm64_v${{ steps.tag.outputs.tag }}.rpm</sub> | <sub>${{ env.rpm_linux_arm64_SHA256 }}</sub> |
|
||||
|||
|
||||
| <sub>${{ env.ProjectName }}_macos_x64_v${{ steps.tag.outputs.tag }}.7z</sub> | <sub>${{ env.macos_x64_SHA256 }}</sub> |
|
||||
| <sub>${{ env.ProjectName }}_macos_arm64_v${{ steps.tag.outputs.tag }}.7z</sub> | <sub>${{ env.macos_arm64_SHA256 }}</sub> |
|
||||
|
||||
|
||||
[](https://steampp.net)
|
||||
[]()
|
||||
|
||||
##### [不知道该下载哪个文件?](https://github.com/BeyondDimension/SteamTools/blob/develop/download-guide.md)
|
||||
|
||||
WindowsStore:
|
||||
name: WindowsStore Publish
|
||||
runs-on: ${{ matrix.os }}
|
||||
if: ${{ false }} #未做完暂时禁用
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ windows-latest ]
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: Setup .NET 6
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: 6.0.x
|
||||
|
||||
- name: Add msbuild to PATH
|
||||
if: matrix.os == 'windows-latest'
|
||||
uses: microsoft/setup-msbuild@v1.1
|
||||
|
||||
- name: Verify dotnet info
|
||||
run: |
|
||||
dotnet --info
|
||||
msbuild --version
|
||||
|
||||
- name: dotnet restore SteamToolsV2+.sln
|
||||
if: matrix.os == 'windows-latest'
|
||||
run: dotnet restore ./SteamToolsV2+.sln
|
||||
|
||||
- name: dotnet restore SteamToolsV2+.Linux.sln
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
run: dotnet restore ./SteamToolsV2+.Linux.slnf
|
||||
|
||||
- name: dotnet restore SteamToolsV2+.Mac.sln
|
||||
if: matrix.os == 'macOS-latest'
|
||||
run: dotnet restore ./SteamToolsV2+.Mac.slnf
|
||||
|
||||
- name: Build AvaloniaApp
|
||||
run: dotnet build ./src/ST.Client.Desktop.Avalonia.App/ST.Client.Avalonia.App.csproj -c "${{ env.Configuration }}"
|
||||
|
||||
- name: Run CommonUnit
|
||||
run: dotnet test ./tests/Common.UnitTest/Common.UnitTest.csproj -c "${{ env.Configuration }}"
|
||||
|
||||
- name: Run ST.Client.UnitTest
|
||||
run: dotnet test ./tests/ST.Client.UnitTest/ST.Client.UnitTest.csproj -c "${{ env.Configuration }}"
|
||||
|
||||
- name: Run ST.Client.Desktop.UnitTest
|
||||
run: dotnet test ./tests/ST.Client.Desktop.UnitTest/ST.Client.Desktop.UnitTest.csproj -c "${{ env.Configuration }}"
|
||||
|
||||
- name: Get tag
|
||||
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
|
||||
id: tag
|
||||
uses: dawidd6/action-get-tag@v1
|
||||
|
||||
- name: Checkout Credentials repository
|
||||
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: SteamTools-Team/Credentials
|
||||
token: ${{ secrets.REPO_TOKEN }}
|
||||
path: ./Credentials
|
||||
|
||||
- name: Copy pfx and snk To Source
|
||||
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
|
||||
run: |
|
||||
copy ".\Credentials\*.pfx" .
|
||||
copy ".\Credentials\*.snk" .
|
||||
dir *.pfx -s
|
||||
|
||||
#- name: Build MSIX Package
|
||||
# run: msbuild .\src\ST.Client.Desktop.Avalonia.App.Bridge.Package\ST.Client.Avalonia.App.Bridge.Package.wapproj /t:rebuild /p:Platform=x64 /p:AppxBundlePlatforms="x64" /p:AppxBundle=Always /p:configuration="release" /t:Publish /p:UapAppxPackageBuildMode=StoreUpload
|
||||
@@ -1,21 +1,21 @@
|
||||
name: Sync To Gitee
|
||||
name: Sync To Gitee
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main, develop ]
|
||||
delete:
|
||||
branches: [ main, develop ]
|
||||
create:
|
||||
branches: [ main, develop ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Sync to Gitee
|
||||
uses: wearerequired/git-mirror-action@master
|
||||
env:
|
||||
SSH_PRIVATE_KEY: ${{ secrets.GITEE_PRIVATE_KEY }}
|
||||
with:
|
||||
source-repo: "git@github.com:SteamTools-Team/SteamTools.git"
|
||||
destination-repo: "git@gitee.com:rmbgame/SteamTools"
|
||||
on:
|
||||
push:
|
||||
branches: [ main, develop, www ]
|
||||
delete:
|
||||
branches: [ main, develop, www ]
|
||||
create:
|
||||
branches: [ main, develop, www ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Sync to Gitee
|
||||
uses: wearerequired/git-mirror-action@master
|
||||
env:
|
||||
SSH_PRIVATE_KEY: ${{ secrets.GITEE_PRIVATE_KEY }}
|
||||
with:
|
||||
source-repo: "git@github.com:BeyondDimension/SteamTools.git"
|
||||
destination-repo: "git@gitee.com:rmbgame/SteamTools"
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
name: Build Xamarin app
|
||||
#https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-xamarin-applications
|
||||
on:
|
||||
push:
|
||||
branches: [ main, develop ]
|
||||
pull_request:
|
||||
branches: [ main, develop ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
configuration: [ Debug, Release ]
|
||||
os: [ macOS-latest ]
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: Setup .NET 6
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: 6.0.x
|
||||
|
||||
- name: Add msbuild to PATH
|
||||
if: matrix.os == 'windows-latest'
|
||||
uses: microsoft/setup-msbuild@v1.1
|
||||
|
||||
# - name: Install macOS SDK(macOS)
|
||||
# if: matrix.os == 'macOS-latest'
|
||||
# run: sudo dotnet workload install macos
|
||||
|
||||
# - name: Install macOS SDK(Windows)
|
||||
# if: matrix.os == 'windows-latest'
|
||||
# run: dotnet workload install macos
|
||||
|
||||
# - name: Install Maui(Windows)
|
||||
# if: matrix.os == 'windows-latest'
|
||||
# run: dotnet workload install maui
|
||||
|
||||
- name: Verify dotnet info
|
||||
run: |
|
||||
nuget help
|
||||
dotnet --info
|
||||
msbuild -version
|
||||
|
||||
# - name: Install dependencies
|
||||
# run: nuget restore ./SteamToolsV2+.sln
|
||||
|
||||
- name: Setup Xamarin
|
||||
uses: maxim-lobanov/setup-xamarin@v1
|
||||
with:
|
||||
# mono-version: '6.12' # specify version in '<major>.<minor>' format
|
||||
# xamarin-ios-version: '14.14' # specify version in '<major>' format
|
||||
# xamarin-mac-version: latest # specify 'latest' keyword to pick up the latest available version
|
||||
xamarin-android-version: '11.2' # specify full version; it is not recomended option because your pipeline can be broken suddenly in future
|
||||
# xcode-version: '12.x' # set the latest available Xcode 12
|
||||
|
||||
- name: Setup Android NDK
|
||||
uses: nttld/setup-ndk@v1.0.6
|
||||
id: setup-ndk
|
||||
with:
|
||||
ndk-version: r21e
|
||||
add-to-path: false
|
||||
env:
|
||||
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
|
||||
|
||||
- name: dotnet restore SteamToolsV2+.Mac.slnf
|
||||
run: dotnet restore ./SteamToolsV2+.Mac.slnf
|
||||
|
||||
# - name: Build ST.Client
|
||||
# run: dotnet msbuild ./src/ST.Client/ST.Client.csproj /p:Configuration=${{ matrix.configuration }}
|
||||
|
||||
- name: Build ST.Client.XamarinForms
|
||||
run: dotnet msbuild ./src/ST.Client.XamarinForms/ST.Client.XamarinForms.csproj /p:Configuration=${{ matrix.configuration }}
|
||||
|
||||
- name: Build Android app
|
||||
run: msbuild ./src/ST.Client.Mobile.Droid.App/ST.Client.Android.App.csproj /t:PackageForAndroid /p:Configuration=${{ matrix.configuration }}
|
||||
|
||||
#- name: Build iOS app
|
||||
# run: msbuild <csproj_file_path> /p:Configuration=${{ matrix.configuration }} /p:Platform=iPhoneSimulator /t:Rebuild
|
||||
@@ -34,3 +34,6 @@
|
||||
[submodule "references/dotnet-packaging"]
|
||||
path = references/dotnet-packaging
|
||||
url = https://github.com/qmfrederik/dotnet-packaging.git
|
||||
[submodule "references/SevenZipSharp"]
|
||||
path = references/SevenZipSharp
|
||||
url = https://github.com/SteamTools-Team/SevenZipSharp.git
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" Exists('$(MSBuildProjectDirectory)\..\..\Unicorn.pfx') ">
|
||||
<PropertyGroup Condition=" Exists('$(MSBuildProjectDirectory)\..\..\Unicorn.snk') ">
|
||||
<DefineConstants>SIGN_ASSEMBLY;$(DefineConstants)</DefineConstants>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<SignAssembly>false</SignAssembly>
|
||||
<DelaySign>false</DelaySign>
|
||||
<AssemblyOriginatorKeyFile>$(MSBuildProjectDirectory)\..\..\Unicorn.pfx</AssemblyOriginatorKeyFile>
|
||||
<AssemblyOriginatorKeyFile>$(MSBuildProjectDirectory)\..\..\Unicorn.snk</AssemblyOriginatorKeyFile>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
+247
-123
@@ -1,141 +1,265 @@
|
||||
<Project>
|
||||
<ItemGroup>
|
||||
<PackageVersion Include="ReactiveUI" Version="16.3.10" />
|
||||
<!--<PackageVersion Include="ReactiveUI.Fody" Version="16.3.5" /> -->
|
||||
<PackageVersion Include="ReactiveUI.XamForms" Version="16.3.10" />
|
||||
<PackageVersion Include="DynamicData" Version="7.4.3" />
|
||||
<PackageVersion Include="Splat" Version="13.1.42" />
|
||||
<PackageVersion Include="OperatingSystem2" Version="1.4.2" />
|
||||
<PackageVersion Include="Microsoft.AppCenter" Version="4.4.0" />
|
||||
<PackageVersion Include="Microsoft.AppCenter.Analytics" Version="4.4.0" />
|
||||
<PackageVersion Include="Microsoft.AppCenter.Crashes" Version="4.4.0" />
|
||||
<PackageVersion Include="Aigio.Avalonia.AppCenter" Version="4.4.0.1" />
|
||||
<PackageVersion Include="Aigio.Avalonia.AppCenter.Analytics" Version="4.4.0" />
|
||||
<PackageVersion Include="Aigio.Avalonia.AppCenter.Crashes" Version="4.4.0" />
|
||||
<PackageVersion Include="nor0x.AppCenter" Version="4.4.0-XMAC" />
|
||||
<PackageVersion Include="nor0x.AppCenter.Analytics" Version="4.4.0-XMAC" />
|
||||
<PackageVersion Include="nor0x.AppCenter.Crashes" Version="4.4.0-XMAC" />
|
||||
<PackageVersion Include="Plugin.CurrentActivity" Version="2.1.0.4" />
|
||||
<ItemGroup Condition=" $(TargetFramework.StartsWith('netstandard')) Or $(TargetFramework.StartsWith('netcoreapp3.1'))">
|
||||
<!-- Microsoft.Extensions.* & AspNetCore & EntityFrameworkCore(NETCOREAPP31) -->
|
||||
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="3.1.21" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Http" Version="3.1.21" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Logging" Version="3.1.21" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="3.1.21" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Logging.AzureAppServices" Version="3.1.21" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="3.1.21" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="3.1.21" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="3.1.21" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.21" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="3.1.21" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.1.21" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.21" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.MicrosoftAccount" Version="3.1.21" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="3.1.21" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="3.1.21" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" $(TargetFramework.StartsWith('net5.0')) ">
|
||||
<!-- Microsoft.Extensions.* & AspNetCore & EntityFrameworkCore(NET50) -->
|
||||
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Http" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Logging" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Logging.AzureAppServices" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.MicrosoftAccount" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="5.0.12" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" $(TargetFramework.StartsWith('net6.0')) ">
|
||||
<!-- Microsoft.Extensions.* & AspNetCore & EntityFrameworkCore(NET60) -->
|
||||
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Http" Version="6.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Logging" Version="6.0.0" />
|
||||
<PackageVersion Include="Nito.Comparers" Version="6.2.2" />
|
||||
<PackageVersion Include="Xamarin.Essentials" Version="1.7.0" />
|
||||
<PackageVersion Include="Crc32.NET" Version="1.2.0" />
|
||||
<PackageVersion Include="gfoidl.Base64" Version="1.1.1" />
|
||||
<PackageVersion Include="MessagePack" Version="2.3.85" />
|
||||
<PackageVersion Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
<PackageVersion Include="System.Text.Json" Version="6.0.0" />
|
||||
<PackageVersion Include="System.Text.Encodings.Web" Version="6.0.0" />
|
||||
<PackageVersion Include="Polly" Version="7.2.2" />
|
||||
<PackageVersion Include="sqlite-net-pcl" Version="1.8.116" />
|
||||
<PackageVersion Include="NUnit" Version="3.13.2" />
|
||||
<PackageVersion Include="NUnit3TestAdapter" Version="4.1.0" />
|
||||
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
|
||||
<PackageVersion Include="System.Security.Cryptography.ProtectedData" Version="6.0.0" />
|
||||
<PackageVersion Include="nunit.xamarin" Version="3.6.1" />
|
||||
<PackageVersion Include="PCLStorage" Version="1.0.2" />
|
||||
<PackageVersion Include="Xamarin.Forms" Version="5.0.0.2196" />
|
||||
<PackageVersion Include="Xamarin.Forms.Visual.Material" Version="5.0.0.2196" />
|
||||
<PackageVersion Include="Moq" Version="4.16.1" />
|
||||
<PackageVersion Include="AutoMapper" Version="10.1.1" />
|
||||
<PackageVersion Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="8.1.1" />
|
||||
<PackageVersion Include="Portable.BouncyCastle" Version="1.9.0" />
|
||||
<!--<PackageVersion Include="QRCoder" Version="1.4.2" />-->
|
||||
<PackageVersion Include="Net.Codecrete.QrCodeGenerator" Version="2.0.0" />
|
||||
<PackageVersion Include="DnsClient" Version="1.5.0" />
|
||||
<PackageVersion Include="Fleck" Version="1.2.0" />
|
||||
<PackageVersion Include="Gameloop.Vdf" Version="0.6.1" />
|
||||
<PackageVersion Include="NLog" Version="4.7.12" />
|
||||
<PackageVersion Include="NLog.Extensions.Logging" Version="1.7.4" />
|
||||
<PackageVersion Include="NotifyIcon.Base" Version="1.0.5" />
|
||||
<!--<PackageVersion Include="NotifyIcon.Linux" Version="1.0.5" />-->
|
||||
<!--<PackageVersion Include="NotifyIcon.Mac" Version="1.0.5" />-->
|
||||
<PackageVersion Include="NotifyIcon.Windows" Version="1.0.5" />
|
||||
<!--<PackageVersion Include="GtkSharp" Version="3.24.24.34" />-->
|
||||
<PackageVersion Include="SharpZipLib" Version="1.3.3" />
|
||||
<PackageVersion Include="Squid-Box.SevenZipSharp.Lite" Version="1.5.0.366" />
|
||||
<PackageVersion Include="StatefulModel.Standard" Version="0.1.0" />
|
||||
<PackageVersion Include="Titanium.Web.Proxy" Version="3.1.1397" />
|
||||
<PackageVersion Include="System.CommandLine" Version="2.0.0-beta1.21308.1" />
|
||||
<PackageVersion Include="System.Drawing.Common" Version="6.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="6.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Logging.AzureAppServices" Version="6.0.1" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.1" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="6.0.1" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.1" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.1" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.1" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.1" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.1" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.MicrosoftAccount" Version="6.0.1" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="6.0.1" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="6.0.1" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" $(TargetFramework.StartsWith('net6.0')) ">
|
||||
<!-- Entity Framework Plus -->
|
||||
<!-- A FREE & Open Source library to enhance EF6 and EF Core -->
|
||||
<PackageVersion Include="Z.EntityFramework.Plus.EFCore" Version="6.13.5" />
|
||||
|
||||
<!--Avalonia Start-->
|
||||
<PackageVersion Include="Avalonia" Version="0.10.10" />
|
||||
<PackageVersion Include="Avalonia.Desktop" Version="0.10.10" />
|
||||
<PackageVersion Include="Avalonia.Diagnostics" Version="0.10.10" />
|
||||
<PackageVersion Include="Avalonia.ReactiveUI" Version="0.10.10" />
|
||||
<!--<PackageVersion Include="Avalonia.Direct2D1" Version="0.10.9" />-->
|
||||
<PackageVersion Include="Avalonia.Controls.DataGrid" Version="0.10.10" />
|
||||
<PackageVersion Include="Avalonia.Xaml.Behaviors" Version="0.10.10.3" />
|
||||
<!--<PackageVersion Include="Avalonia.AvaloniaEdit" Version="0.10.4" />-->
|
||||
<!--<PackageVersion Include="CefNet.Avalonia" Version="93.1.21240.857" />-->
|
||||
<!--<PackageVersion Include="LibVLCSharp.Avalonia" Version="3.5.1" />-->
|
||||
<PackageVersion Include="FluentAvaloniaUI" Version="1.1.6" />
|
||||
<PackageVersion Include="JumpLists.Win32.Avalonia" Version="0.0.1" />
|
||||
<PackageVersion Include="HarfBuzzSharp" Version="2.8.2-preview.155" />
|
||||
<PackageVersion Include="HarfBuzzSharp.NativeAssets.Linux" Version="2.8.2-preview.155" />
|
||||
<PackageVersion Include="SkiaSharp" Version="2.88.0-preview.155" />
|
||||
<PackageVersion Include="SkiaSharp.NativeAssets.Linux" Version="2.88.0-preview.155" />
|
||||
<!--Avalonia End-->
|
||||
|
||||
<PackageVersion Include="MonoMac.NetStandard" Version="0.0.4" />
|
||||
<!--<PackageVersion Include="Microsoft.Windows.CsWinRT" Version="1.4.1" />-->
|
||||
<!--<PackageVersion Include="Microsoft.Windows.SDK.NET.Ref" Version="10.0.19041.22" />-->
|
||||
<PackageVersion Include="TaskScheduler" Version="2.9.2" />
|
||||
<PackageVersion Include="de.hdodenhof.circleimageview" Version="3.1.0" />
|
||||
<PackageVersion Include="ReactiveUI.AndroidX" Version="16.3.10" />
|
||||
<PackageVersion Include="Square.OkHttp3" Version="4.9.2" />
|
||||
<PackageVersion Include="Square.Picasso" Version="2.71828.0" />
|
||||
<PackageVersion Include="TencentOpenApiSDK.Android" Version="3.5.4.11" />
|
||||
<PackageVersion Include="LeakCanaryBinding" Version="1.5.1.1" />
|
||||
<PackageVersion Include="Toast.iOS" Version="1.2.0" />
|
||||
<PackageVersion Include="NPOI" Version="2.5.5" />
|
||||
<PackageVersion Include="Octokit" Version="0.50.0" />
|
||||
<!--<PackageVersion Include="Microsoft.Windows.SDK.Contracts" Version="10.0.19041.1" />-->
|
||||
<!-- AspNetCore 6 OpenId/OAuth -->
|
||||
<PackageVersion Include="AspNet.Security.OpenId.Steam" Version="6.0.0" />
|
||||
<PackageVersion Include="AspNet.Security.OAuth.QQ" Version="6.0.1" />
|
||||
<PackageVersion Include="AspNet.Security.OAuth.Apple" Version="6.0.1" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'net48' Or '$(TargetFramework)' == 'net472' Or '$(TargetFramework)' == 'net471' Or '$(TargetFramework)' == 'net46' Or '$(TargetFramework)' == 'net462' Or '$(TargetFramework)' == 'net461' Or '$(TargetFramework)' == 'net45' Or '$(TargetFramework)' == 'net452' Or '$(TargetFramework)' == 'net451' ">
|
||||
<!-- WindowsRuntime(NETFX) & PowerShell 5 -->
|
||||
<PackageVersion Include="System.Runtime.WindowsRuntime" Version="4.7.0" />
|
||||
<PackageVersion Include="System.Runtime.WindowsRuntime.UI.Xaml" Version="4.7.0" />
|
||||
<PackageVersion Include="Microsoft.PowerShell.5.ReferenceAssemblies" Version="1.1.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" $(TargetFramework.StartsWith('netstandard')) Or $(TargetFramework.StartsWith('net5.0')) Or $(TargetFramework.StartsWith('netcoreapp3.1')) Or $(TargetFramework.StartsWith('netcoreapp3.0')) Or $(TargetFramework.StartsWith('netcoreapp2.2')) Or $(TargetFramework.StartsWith('netcoreapp2.1')) Or $(TargetFramework.StartsWith('netcoreapp2.0')) ">
|
||||
<!-- .NET Platform Extensions 5 -->
|
||||
<PackageVersion Include="Microsoft.Win32.Registry" Version="5.0.0" />
|
||||
<PackageVersion Include="SQLitePCLRaw.bundle_green" Version="2.0.7" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" $(TargetFramework.StartsWith('netstandard')) ">
|
||||
<!-- BCL(NETSTANDARD) -->
|
||||
<PackageVersion Include="System.Text.Json" Version="6.0.1" />
|
||||
<PackageVersion Include="System.Text.Encodings.Web" Version="6.0.0" />
|
||||
<PackageVersion Include="System.Drawing.Common" Version="6.0.0" />
|
||||
<PackageVersion Include="System.Security.Principal.Windows" Version="5.0.0" />
|
||||
<PackageVersion Include="BrotliSharpLib" Version="0.3.3" />
|
||||
<PackageVersion Include="System.Buffers" Version="4.5.1" />
|
||||
<PackageVersion Include="System.Memory" Version="4.5.4" />
|
||||
<PackageVersion Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
|
||||
<PackageVersion Include="System.Diagnostics.Tracing" Version="4.3.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<!-- Microsoft.* -->
|
||||
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
|
||||
<!--<PackageVersion Include="Microsoft.Windows.CsWinRT" Version="1.4.1" />-->
|
||||
<!--<PackageVersion Include="Microsoft.Windows.SDK.NET.Ref" Version="10.0.19041.22" />-->
|
||||
<!--<PackageVersion Include="Microsoft.Windows.SDK.Contracts" Version="10.0.19041.1" />-->
|
||||
<PackageVersion Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22000.196" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="6.0.0" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.0" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Logging.AzureAppServices" Version="6.0.0" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.0" />
|
||||
|
||||
<!-- AppCenter.* -->
|
||||
<PackageVersion Include="Microsoft.AppCenter" Version="4.4.0" />
|
||||
<PackageVersion Include="Microsoft.AppCenter.Analytics" Version="4.4.0" />
|
||||
<PackageVersion Include="Microsoft.AppCenter.Crashes" Version="4.4.0" />
|
||||
<PackageVersion Include="Aigio.Avalonia.AppCenter" Version="4.4.0.2" />
|
||||
<PackageVersion Include="Aigio.Avalonia.AppCenter.Analytics" Version="4.4.0.2" />
|
||||
<PackageVersion Include="Aigio.Avalonia.AppCenter.Crashes" Version="4.4.0.2" />
|
||||
<PackageVersion Include="nor0x.AppCenter" Version="4.4.0-XMAC" />
|
||||
<PackageVersion Include="nor0x.AppCenter.Analytics" Version="4.4.0-XMAC" />
|
||||
<PackageVersion Include="nor0x.AppCenter.Crashes" Version="4.4.0-XMAC" />
|
||||
|
||||
<!-- .NET Platform Extensions 6 -->
|
||||
<PackageVersion Include="System.Security.Cryptography.ProtectedData" Version="6.0.0" />
|
||||
|
||||
<!-- Xamarin -->
|
||||
<PackageVersion Include="Xamarin.Essentials" Version="1.7.0" />
|
||||
<!-- Xamarin.Forms -->
|
||||
<PackageVersion Include="Xamarin.Forms" Version="5.0.0.2244" />
|
||||
<PackageVersion Include="Xamarin.Forms.Visual.Material" Version="5.0.0.2244" />
|
||||
<PackageVersion Include="Xam.Plugins.Forms.ImageCircle" Version="3.1.1.1-beta" />
|
||||
|
||||
<!-- NUnit & NUnit.Xamarin & Moq -->
|
||||
<PackageVersion Include="NUnit" Version="3.13.2" />
|
||||
<PackageVersion Include="NUnit3TestAdapter" Version="4.2.0" />
|
||||
<PackageVersion Include="nunit.xamarin" Version="3.6.1" />
|
||||
<PackageVersion Include="PCLStorage" Version="1.0.2" />
|
||||
<PackageVersion Include="Moq" Version="4.16.1" />
|
||||
|
||||
<!-- NLog -->
|
||||
<PackageVersion Include="NLog" Version="4.7.13" />
|
||||
<PackageVersion Include="NLog.Extensions.Logging" Version="1.7.4" />
|
||||
<PackageVersion Include="NLog.Web.AspNetCore" Version="4.14.0" />
|
||||
<PackageVersion Include="Z.EntityFramework.Plus.EFCore" Version="6.13.1" />
|
||||
|
||||
<!-- ReactiveUI -->
|
||||
<PackageVersion Include="System.Reactive" Version="5.0.0" />
|
||||
<PackageVersion Include="Splat" Version="14.1.17" />
|
||||
<PackageVersion Include="DynamicData" Version="7.4.9" />
|
||||
<PackageVersion Include="ReactiveUI" Version="17.1.17" />
|
||||
<!--<PackageVersion Include="ReactiveUI.Fody" Version="17.1.17" /> -->
|
||||
<PackageVersion Include="ReactiveUI.XamForms" Version="17.1.17" />
|
||||
<PackageVersion Include="ReactiveUI.AndroidX" Version="17.0.1" />
|
||||
|
||||
<!-- SkiaSharp & HarfBuzzSharp -->
|
||||
<PackageVersion Include="HarfBuzzSharp" Version="2.8.2-preview.179" />
|
||||
<PackageVersion Include="HarfBuzzSharp.NativeAssets.Linux" Version="2.8.2-preview.179" />
|
||||
<PackageVersion Include="SkiaSharp" Version="2.88.0-preview.179" />
|
||||
<PackageVersion Include="SkiaSharp.NativeAssets.Linux" Version="2.88.0-preview.179" />
|
||||
|
||||
<!-- AutoMapper -->
|
||||
<PackageVersion Include="AutoMapper" Version="10.1.1" />
|
||||
<PackageVersion Include="AutoMapper.Collection" Version="7.0.1" />
|
||||
<PackageVersion Include="AutoMapper.Collection.EntityFrameworkCore" Version="7.0.1" />
|
||||
<PackageVersion Include="AutoMapper.Collection.EntityFrameworkCore" Version="7.1.3" />
|
||||
<PackageVersion Include="AutoMapper.Extensions.ExpressionMapping" Version="4.1.3" />
|
||||
<PackageVersion Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="8.1.1" />
|
||||
<PackageVersion Include="HtmlAgilityPack" Version="1.11.38" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.0" />
|
||||
<PackageVersion Include="Microsoft.PowerShell.5.ReferenceAssemblies" Version="1.1.0" />
|
||||
<PackageVersion Include="TextCopy" Version="4.3.1" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.0" />
|
||||
<PackageVersion Include="AlipaySDKNet.Standard" Version="4.6.60" />
|
||||
<PackageVersion Include="AspNet.Security.OpenId.Steam" Version="6.0.0" />
|
||||
<PackageVersion Include="AspNet.Security.OAuth.QQ" Version="6.0.0" />
|
||||
<PackageVersion Include="AspNet.Security.OAuth.Apple" Version="6.0.0" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.MicrosoftAccount" Version="6.0.0" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="6.0.0" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.0" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="6.0.0" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="6.0.0" />
|
||||
<PackageVersion Include="Swashbuckle.AspNetCore" Version="6.2.3" />
|
||||
<!--<PackageVersion Include="Nito.Disposables" Version="2.2.1" />-->
|
||||
<PackageVersion Include="System.Diagnostics.Tracing" Version="4.3.0" />
|
||||
|
||||
<!-- QRCode -->
|
||||
<!--<PackageVersion Include="QRCoder" Version="1.4.2" />-->
|
||||
<PackageVersion Include="Net.Codecrete.QrCodeGenerator" Version="2.0.1" />
|
||||
|
||||
<!-- NotifyIcon -->
|
||||
<PackageVersion Include="NotifyIcon.Base" Version="1.0.5.1" />
|
||||
<!--<PackageVersion Include="NotifyIcon.Linux" Version="1.0.5.1" />-->
|
||||
<!--<PackageVersion Include="NotifyIcon.Mac" Version="1.0.5.1" />-->
|
||||
<PackageVersion Include="NotifyIcon.Windows" Version="1.0.5.1" />
|
||||
<!--<PackageVersion Include="GtkSharp" Version="3.24.24.34" />-->
|
||||
|
||||
<!-- Compression -->
|
||||
<PackageVersion Include="SharpZipLib" Version="1.3.3" />
|
||||
<PackageVersion Include="Squid-Box.SevenZipSharp.Lite" Version="1.5.0.366" />
|
||||
<PackageVersion Include="ZstdNet" Version="1.4.5" />
|
||||
|
||||
<!-- Algorithm -->
|
||||
<PackageVersion Include="Crc32.NET" Version="1.2.0" />
|
||||
<PackageVersion Include="gfoidl.Base64" Version="1.1.1" />
|
||||
|
||||
<!--Command Line Tools-->
|
||||
<PackageVersion Include="System.CommandLine" Version="2.0.0-beta1.21308.1" />
|
||||
|
||||
<!-- Pinyin -->
|
||||
<PackageVersion Include="TinyPinyin.Net" Version="1.0.2" />
|
||||
<PackageVersion Include="JustArchiNET.Madness" Version="2.3.2" />
|
||||
<PackageVersion Include="Xam.Plugins.Forms.ImageCircle" Version="3.1.1.1-beta" />
|
||||
|
||||
<!-- Win32/Windows -->
|
||||
<PackageVersion Include="TaskScheduler" Version="2.9.3" />
|
||||
|
||||
<!-- Swagger -->
|
||||
<PackageVersion Include="Swashbuckle.AspNetCore" Version="6.2.3" />
|
||||
|
||||
<!-- Pay -->
|
||||
<!--<PackageVersion Include="AlipaySDKNet.Standard" Version="4.6.109" />-->
|
||||
|
||||
<!-- Excel -->
|
||||
<PackageVersion Include="NPOI" Version="2.5.5" />
|
||||
|
||||
<!-- Github API -->
|
||||
<PackageVersion Include="Octokit" Version="0.50.0" />
|
||||
|
||||
<!-- ORM -->
|
||||
<PackageVersion Include="sqlite-net-pcl" Version="1.8.116" />
|
||||
<PackageVersion Include="SQLitePCLRaw.bundle_green" Version="2.0.7" />
|
||||
|
||||
<!-- MonoMac(NETSTANDARD) -->
|
||||
<PackageVersion Include="MonoMac.NetStandard" Version="0.0.4" />
|
||||
|
||||
<!-- .NET Compat -->
|
||||
<PackageVersion Include="OperatingSystem2" Version="1.4.2.1" />
|
||||
<PackageVersion Include="JustArchiNET.Madness" Version="3.1.1" />
|
||||
|
||||
<!-- Serialize -->
|
||||
<PackageVersion Include="MessagePack" Version="2.3.85" />
|
||||
<PackageVersion Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
|
||||
<!-- Html Parser -->
|
||||
<PackageVersion Include="HtmlAgilityPack" Version="1.11.39" />
|
||||
|
||||
<!-- Clipboard -->
|
||||
<PackageVersion Include="TextCopy" Version="4.3.1" />
|
||||
|
||||
<!-- Nito.* -->
|
||||
<PackageVersion Include="Nito.Comparers" Version="6.2.2" />
|
||||
<!--<PackageVersion Include="Nito.Disposables" Version="2.2.1" />-->
|
||||
|
||||
<!-- Valve Data File -->
|
||||
<PackageVersion Include="Gameloop.Vdf" Version="0.6.1" />
|
||||
|
||||
<!-- WebSocket -->
|
||||
<PackageVersion Include="Fleck" Version="1.2.0" />
|
||||
|
||||
<!-- DNS -->
|
||||
<PackageVersion Include="DnsClient" Version="1.5.0" />
|
||||
|
||||
<!-- Cryptographic Algorithms & Protocols -->
|
||||
<PackageVersion Include="Portable.BouncyCastle" Version="1.9.0" />
|
||||
|
||||
<!-- Resilience & Transient Fault Handling -->
|
||||
<PackageVersion Include="Polly" Version="7.2.2" />
|
||||
|
||||
<!--Avalonia Start-->
|
||||
<PackageVersion Include="Avalonia" Version="0.10.11" />
|
||||
<PackageVersion Include="Avalonia.Desktop" Version="0.10.11" />
|
||||
<PackageVersion Include="Avalonia.Skia" Version="0.10.11" />
|
||||
<PackageVersion Include="Avalonia.Diagnostics" Version="0.10.11" />
|
||||
<PackageVersion Include="Avalonia.ReactiveUI" Version="0.10.11" />
|
||||
<!--<PackageVersion Include="Avalonia.Direct2D1" Version="0.10.11" />-->
|
||||
<PackageVersion Include="Avalonia.Controls.DataGrid" Version="0.10.11" />
|
||||
<PackageVersion Include="Avalonia.Xaml.Behaviors" Version="0.10.11.5" />
|
||||
<!--<PackageVersion Include="Avalonia.AvaloniaEdit" Version="0.10.4" />-->
|
||||
<!--<PackageVersion Include="CefNet.Avalonia" Version="93.1.21240.857" />-->
|
||||
<!--<PackageVersion Include="LibVLCSharp.Avalonia" Version="3.5.1" />-->
|
||||
<!--<PackageVersion Include="FluentAvaloniaUI" Version="1.1.8" />-->
|
||||
<PackageVersion Include="JumpLists.Win32.Avalonia" Version="1.0.0" />
|
||||
<!--Avalonia End-->
|
||||
|
||||
<!-- Xamarin.Android -->
|
||||
<PackageVersion Include="Xamarin.Google.Dagger" Version="2.39.1" />
|
||||
<PackageVersion Include="Xamarin.Google.MLKit.BarcodeScanning" Version="116.1.2.3" />
|
||||
<PackageVersion Include="Plugin.CurrentActivity" Version="2.1.0.4" />
|
||||
<PackageVersion Include="de.hdodenhof.circleimageview" Version="3.1.0" />
|
||||
<PackageVersion Include="Square.OkHttp3" Version="4.9.2" />
|
||||
<PackageVersion Include="Square.Picasso" Version="2.71828.0" />
|
||||
<!--<PackageVersion Include="LeakCanaryBinding" Version="1.5.1.1" />-->
|
||||
<!--<PackageVersion Include="TencentOpenApiSDK.Android" Version="3.5.4.11" />-->
|
||||
|
||||
<!-- Xamarin.AndroidX -->
|
||||
<PackageVersion Include="Xamarin.AndroidX.Migration" Version="1.0.8" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.AppCompat" Version="1.3.1.3" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Emoji.AppCompat" Version="1.1.0.5" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Fragment" Version="1.3.6.3" />
|
||||
@@ -150,14 +274,14 @@
|
||||
<PackageVersion Include="Xamarin.AndroidX.Activity" Version="1.3.1.2" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Biometric" Version="1.1.0.6" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.ExifInterface" Version="1.3.3.2" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Migration" Version="1.0.8" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Legacy.Support.Core.UI" Version="1.0.0.11" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.3.1.3" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Camera.Camera2" Version="1.0.2" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Camera.View" Version="1.0.0.5-alpha20" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Camera.Lifecycle" Version="1.0.2" />
|
||||
<PackageVersion Include="Xamarin.Google.Dagger" Version="2.39.1" />
|
||||
<PackageVersion Include="Xamarin.Google.MLKit.BarcodeScanning" Version="116.1.2.2" />
|
||||
<PackageVersion Include="ZstdNet" Version="1.4.5" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Camera.View" Version="1.0.0.5-alpha20" />
|
||||
|
||||
<!-- Xamarin.iOS -->
|
||||
<PackageVersion Include="Toast.iOS" Version="1.2.0" />
|
||||
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
+11
-9
@@ -12,7 +12,7 @@ English | [简体中文](./README.md)
|
||||
[](https://github.com/rmbadmin/SteamTools/stargazers)
|
||||
[](https://github.com/rmbadmin/SteamTools/network/members)
|
||||

|
||||
[](https://github.com/SteamTools-Team/SteamTools/search?l=c%23)
|
||||
[](https://github.com/BeyondDimension/SteamTools/search?l=c%23)
|
||||
[](https://github.com/dotnet/core/blob/main/release-notes/6.0/6.0.0/6.0.0.md?WT.mc_id=dotnet-35129-website)
|
||||
[](https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-10)
|
||||
|
||||
@@ -21,18 +21,19 @@ English | [简体中文](./README.md)
|
||||
[](https://github.com/ant-design/ant-design)
|
||||
[](https://github.com/ant-design-blazor/ant-design-blazor)
|
||||
|
||||
[](https://actions-badge.atrox.dev/SteamTools-Team/SteamTools/goto?ref=develop)
|
||||
[](https://github.com/SteamTools-Team/SteamTools)
|
||||
[](https://actions-badge.atrox.dev/BeyondDimension/SteamTools/goto?ref=develop)
|
||||
[](https://github.com/BeyondDimension/SteamTools)
|
||||
[](https://gitee.com/rmbgame/SteamTools)
|
||||
</div>
|
||||
|
||||
<div align="center"><img src="./resources/screenshots.en.jpg" /></div>
|
||||
|
||||
## 🚀 Download channel
|
||||
- [GitHub Releases](https://github.com/SteamTools-Team/SteamTools/releases)
|
||||
- [GitHub Releases](https://github.com/BeyondDimension/SteamTools/releases)
|
||||
- [Gitee Releases](https://gitee.com/rmbgame/SteamTools/releases)
|
||||
- [Official WebSite](https://steampp.net)
|
||||
- [](https://www.microsoft.com/store/apps/9MTCFHS560NG)
|
||||
- [Arch Linux Package](https://aur.archlinux.org/packages/steam%2B%2B-bin)(By [zhanghua000](https://github.com/zhanghua000))
|
||||
|
||||
## ✨ Functions
|
||||
1. Local reverse proxy for Steam's community webpage to enable normal access in **the Chinese Mainland, Mainland of China**
|
||||
@@ -52,8 +53,8 @@ English | [简体中文](./README.md)
|
||||
OS | Version | Architectures | Lifecycle
|
||||
--------------------------------------|-------------------------|-----------------|----------
|
||||
[Windows Client][Windows-client] | 7 SP1(**\***), 8.1 | x64 | [Windows][Windows-lifecycle]
|
||||
[Windows 10 Client][Windows-client] | Version 1607+(**\***) | x64 | [Windows][Windows-lifecycle]
|
||||
[Windows Server][Windows-Server] | 2012+ | x64 | [Windows Server][Windows-Server-lifecycle]
|
||||
[Windows 10 Client][Windows-client] | Version 1607+(**\***) | x64 | [Windows][Windows-lifecycle]
|
||||
[Windows Server][Windows-Server] | 2012+ | x64 | [Windows Server][Windows-Server-lifecycle]
|
||||
|
||||
**\*** Windows 7 SP1 is supported with [Extended Security Updates](https://docs.microsoft.com/troubleshoot/windows-client/windows-7-eos-faq/windows-7-extended-security-updates-faq) installed.
|
||||
**\*** Microsoft Store/Desktop Bridge Version 1809+
|
||||
@@ -77,7 +78,8 @@ OS | Version | Architectures
|
||||
[Red Hat Enterprise Linux][RHEL] | 7+ | x64, Arm64 | [Red Hat][RHEL-lifecycle]
|
||||
[SUSE Enterprise Linux (SLES)][SLES] | 12 SP2+ | x64 | [SUSE][SLES-lifecycle]
|
||||
[Ubuntu][Ubuntu] | 16.04, 18.04, 20.04+ | x64, Arm64, Arm32 | [Ubuntu][Ubuntu-lifecycle]
|
||||
[Deepin / UOS][Deepin] | 20+ | x64 | [Deepin][Deepin-lifecycle]
|
||||
[Deepin / UOS][Deepin] | 20+ | x64 | [Deepin][Deepin-lifecycle]
|
||||
[Arch Linux][Arch] | | x64 |
|
||||
|
||||
[Alpine]: https://alpinelinux.org/
|
||||
[Alpine-lifecycle]: https://wiki.alpinelinux.org/wiki/Alpine_Linux:Releases
|
||||
@@ -109,6 +111,7 @@ OS | Version | Architectures
|
||||
[Ubuntu-pm]: https://docs.microsoft.com/dotnet/core/install/linux-package-manager-ubuntu-2004
|
||||
[Deepin]: https://www.deepin.org/
|
||||
[Deepin-lifecycle]: https://www.deepin.org/release-notes
|
||||
[Arch]: https://archlinux.org/
|
||||
|
||||
### macOS
|
||||
|
||||
@@ -143,7 +146,7 @@ OS | Version | Architectures |
|
||||
- Xbox or Windows Mobile / Phone
|
||||
|
||||
## 🌏 Roadmap
|
||||
Read what we [milestones](https://github.com/SteamTools-Team/SteamTools/milestones), and feel free to ask questions.
|
||||
Read what we [milestones](https://github.com/BeyondDimension/SteamTools/milestones), and feel free to ask questions.
|
||||
|
||||
## ⌨️ Development Environment
|
||||
[Visual Studio 2022](https://visualstudio.microsoft.com/vs/)
|
||||
@@ -182,7 +185,6 @@ Read what we [milestones](https://github.com/SteamTools-Team/SteamTools/mileston
|
||||
* [Hardcodet.NotifyIcon](https://github.com/HavenDV/Hardcodet.NotifyIcon.Wpf.NetCore)
|
||||
* [System.Reactive](https://github.com/dotnet/reactive)
|
||||
* [Titanium-Web-Proxy](https://github.com/justcoding121/Titanium-Web-Proxy)
|
||||
* [BrotliSharpLib](https://github.com/master131/BrotliSharpLib)
|
||||
* [Portable.BouncyCastle](https://github.com/novotnyllc/bc-csharp)
|
||||
* [Ninject](https://github.com/ninject/Ninject)
|
||||
* [log4net](https://github.com/apache/logging-log4net)
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
|
||||
「Steam++」是一个包含多种Steam工具功能的工具箱,此工具的大部分功能都是需要您下载安装Steam才能使用。
|
||||
|
||||

|
||||
[](https://github.com/SteamTools-Team/SteamTools/releases/latest)
|
||||
[](LICENSE)
|
||||
[](https://github.com/SteamTools-Team/SteamTools/stargazers)
|
||||
[](https://github.com/SteamTools-Team/SteamTools/network/members)
|
||||

|
||||
[](https://github.com/SteamTools-Team/SteamTools/search?l=c%23)
|
||||

|
||||
[](https://github.com/BeyondDimension/SteamTools/releases/latest)
|
||||
[](LICENSE)
|
||||
[](https://github.com/BeyondDimension/SteamTools/stargazers)
|
||||
[](https://github.com/BeyondDimension/SteamTools/network/members)
|
||||

|
||||
[](https://github.com/BeyondDimension/SteamTools/search?l=c%23)
|
||||
[](https://github.com/dotnet/core/blob/main/release-notes/6.0/6.0.0/6.0.0.md?WT.mc_id=dotnet-35129-website)
|
||||
[](https://docs.microsoft.com/zh-cn/dotnet/csharp/whats-new/csharp-10)
|
||||
|
||||
@@ -21,19 +21,20 @@
|
||||
[](https://github.com/ant-design/ant-design)
|
||||
[](https://github.com/ant-design-blazor/ant-design-blazor)
|
||||
|
||||
[](https://actions-badge.atrox.dev/SteamTools-Team/SteamTools/goto?ref=develop)
|
||||
[](https://github.com/SteamTools-Team/SteamTools)
|
||||
[](https://actions-badge.atrox.dev/BeyondDimension/SteamTools/goto?ref=develop)
|
||||
[](https://github.com/BeyondDimension/SteamTools)
|
||||
[](https://gitee.com/rmbgame/SteamTools)
|
||||
[](https://qm.qq.com/cgi-bin/qm/qr?k=JVlZF31RKSDqcsxfEaw6AQE75P2NF18F&jump_from=webapi)
|
||||
[](https://jq.qq.com/?_wv=1027&k=3JKPt4xC)
|
||||
</div>
|
||||
|
||||
<div align="center"><img src="./resources/screenshots.jpg" /></div>
|
||||
|
||||
## 🚀 下载渠道
|
||||
- [GitHub Releases](https://github.com/SteamTools-Team/SteamTools/releases)
|
||||
- [GitHub Releases](https://github.com/BeyondDimension/SteamTools/releases)
|
||||
- [Gitee Releases](https://gitee.com/rmbgame/SteamTools/releases)
|
||||
- [Official WebSite](https://steampp.net)
|
||||
- [](https://www.microsoft.com/store/apps/9MTCFHS560NG)
|
||||
- [Arch Linux Package](https://aur.archlinux.org/packages/steam%2B%2B-bin)(By [zhanghua000](https://github.com/zhanghua000))
|
||||
|
||||
## ✨ 功能
|
||||
1. 反代 Steam 的社区网页使其能正常访问
|
||||
@@ -61,8 +62,8 @@
|
||||
OS | Version | Architectures | Lifecycle
|
||||
--------------------------------------|-------------------------|-----------------|----------
|
||||
[Windows Client][Windows-client] | 7 SP1(**\***), 8.1 | x64 | [Windows][Windows-lifecycle]
|
||||
[Windows 10 Client][Windows-client] | Version 1607+(**\***) | x64 | [Windows][Windows-lifecycle]
|
||||
[Windows Server][Windows-Server] | 2012+ | x64 | [Windows Server][Windows-Server-lifecycle]
|
||||
[Windows 10 Client][Windows-client] | Version 1607+(**\***) | x64 | [Windows][Windows-lifecycle]
|
||||
[Windows Server][Windows-Server] | 2012+ | x64 | [Windows Server][Windows-Server-lifecycle]
|
||||
|
||||
**\*** Windows 7 SP1 is supported with [Extended Security Updates](https://docs.microsoft.com/troubleshoot/windows-client/windows-7-eos-faq/windows-7-extended-security-updates-faq) installed.
|
||||
**\*** Microsoft Store/Desktop Bridge Version 1809+
|
||||
@@ -86,7 +87,8 @@ OS | Version | Architectures
|
||||
[Red Hat Enterprise Linux][RHEL] | 7+ | x64, Arm64 | [Red Hat][RHEL-lifecycle]
|
||||
[SUSE Enterprise Linux (SLES)][SLES] | 12 SP2+ | x64 | [SUSE][SLES-lifecycle]
|
||||
[Ubuntu][Ubuntu] | 16.04, 18.04, 20.04+ | x64, Arm64, Arm32 | [Ubuntu][Ubuntu-lifecycle]
|
||||
[Deepin / UOS][Deepin] | 20+ | x64 | [Deepin][Deepin-lifecycle]
|
||||
[Deepin / UOS][Deepin] | 20+ | x64 | [Deepin][Deepin-lifecycle]
|
||||
[Arch Linux][Arch] | | x64 |
|
||||
|
||||
[Alpine]: https://alpinelinux.org/
|
||||
[Alpine-lifecycle]: https://wiki.alpinelinux.org/wiki/Alpine_Linux:Releases
|
||||
@@ -118,6 +120,7 @@ OS | Version | Architectures
|
||||
[Ubuntu-pm]: https://docs.microsoft.com/dotnet/core/install/linux-package-manager-ubuntu-2004
|
||||
[Deepin]: https://www.deepin.org/
|
||||
[Deepin-lifecycle]: https://www.deepin.org/release-notes
|
||||
[Arch]: https://archlinux.org/
|
||||
|
||||
### macOS
|
||||
|
||||
@@ -152,7 +155,7 @@ OS | Version | Architectures |
|
||||
- Xbox or Windows Mobile / Phone
|
||||
|
||||
## 🌏 路线图
|
||||
查看这个 [milestones](https://github.com/SteamTools-Team/SteamTools/milestones) 来了解我们下一步的开发计划,并随时提出问题。
|
||||
查看这个 [milestones](https://github.com/BeyondDimension/SteamTools/milestones) 来了解我们下一步的开发计划,并随时提出问题。
|
||||
|
||||
## ⌨️ 开发环境
|
||||
[Visual Studio 2022](https://visualstudio.microsoft.com/zh-hans/vs/)
|
||||
@@ -202,7 +205,6 @@ OS | Version | Architectures |
|
||||
* [Hardcodet.NotifyIcon](https://github.com/HavenDV/Hardcodet.NotifyIcon.Wpf.NetCore)
|
||||
* [System.Reactive](https://github.com/dotnet/reactive)
|
||||
* [Titanium-Web-Proxy](https://github.com/justcoding121/Titanium-Web-Proxy)
|
||||
* [BrotliSharpLib](https://github.com/master131/BrotliSharpLib)
|
||||
* [Portable.BouncyCastle](https://github.com/novotnyllc/bc-csharp)
|
||||
* [Ninject](https://github.com/ninject/Ninject)
|
||||
* [log4net](https://github.com/apache/logging-log4net)
|
||||
|
||||
+29
-22
@@ -2,40 +2,47 @@
|
||||
"solution": {
|
||||
"path": "SteamToolsV2+.sln",
|
||||
"projects": [
|
||||
"src\\Common.AreaLib\\Common.AreaLib.csproj",
|
||||
"src\\Common.ClientLib\\Common.ClientLib.csproj",
|
||||
"src\\Common.ClientLib.Droid\\Common.ClientLib.Droid.csproj",
|
||||
"src\\Common.ClientLib.iOS\\Common.ClientLib.iOS.csproj",
|
||||
"src\\Common.CoreLib\\Common.CoreLib.csproj",
|
||||
"src\\Repositories.sqlite-net-pcl\\Repositories.sqlite-net-pcl.csproj",
|
||||
"references\\WinAuth\\Authenticator\\Authenticator.csproj",
|
||||
"references\\ArchiSteamFarm\\ArchiSteamFarm.Library\\ArchiSteamFarm.Library.csproj",
|
||||
"references\\AvaloniaGif\\AvaloniaGif\\AvaloniaGif.csproj",
|
||||
"references\\AvaloniaGif\\LibAPNG\\LibAPNG.csproj",
|
||||
"references\\SteamAchievementManager\\SAM.API\\SAM.API.csproj",
|
||||
"references\\Steam4NET\\Steam4NET\\Steam4NET.csproj",
|
||||
"references\\SteamAchievementManager\\SAM.API\\SAM.API.csproj",
|
||||
"references\\Titanium-Web-Proxy\\src\\Titanium.Web.Proxy\\Titanium.Web.Proxy.csproj",
|
||||
"references\\ArchiSteamFarm\\ArchiSteamFarm.Library\\ArchiSteamFarm.Library.csproj",
|
||||
"tests\\Common.UnitTest\\Common.UnitTest.csproj",
|
||||
"tests\\Common.UnitTest.Droid\\Common.UnitTest.Droid.csproj",
|
||||
"tests\\Common.UnitTest.Droid.App\\Common.UnitTest.Droid.App.csproj",
|
||||
"tests\\ST.Client.UnitTest\\ST.Client.UnitTest.csproj",
|
||||
"tests\\ST.Client.Desktop.UnitTest\\ST.Client.Desktop.UnitTest.csproj",
|
||||
"src\\ST\\ST.csproj",
|
||||
"references\\WinAuth\\Authenticator\\Authenticator.csproj",
|
||||
"references\\reactive\\Rx.NET\\Source\\src\\System.Reactive\\System.Reactive.csproj",
|
||||
"src\\Avalonia.Native\\Avalonia.Native.csproj",
|
||||
"src\\Avalonia.Themes.Default\\Avalonia.Themes.Default.csproj",
|
||||
"src\\Avalonia.Themes.Fluent\\Avalonia.Themes.Fluent.csproj",
|
||||
"src\\Avalonia.Win32\\Avalonia.Win32.csproj",
|
||||
"src\\Avalonia.X11\\Avalonia.X11.csproj",
|
||||
"src\\Common.AreaLib\\Common.AreaLib.csproj",
|
||||
"src\\Common.ClientLib.Droid\\Common.ClientLib.Droid.csproj",
|
||||
"src\\Common.ClientLib.iOS\\Common.ClientLib.iOS.csproj",
|
||||
"src\\Common.ClientLib\\Common.ClientLib.csproj",
|
||||
"src\\Common.CoreLib\\Common.CoreLib.csproj",
|
||||
"src\\Repositories.sqlite-net-pcl\\Repositories.sqlite-net-pcl.csproj",
|
||||
"src\\ST.Client.Android\\ST.Client.Android.csproj",
|
||||
"src\\ST.Client.Desktop.Linux\\ST.Client.Linux.csproj",
|
||||
"src\\ST.Client.Mobile.Droid.App\\ST.Client.Android.App.csproj",
|
||||
"src\\ST.Client.XamarinForms\\ST.Client.XamarinForms.csproj",
|
||||
"src\\ST.Client.Desktop.Avalonia\\ST.Client.Avalonia.csproj",
|
||||
"src\\ST.Client.Desktop.Avalonia.App\\ST.Client.Avalonia.App.csproj",
|
||||
"src\\ST.Client.iOS\\ST.Client.iOS.csproj",
|
||||
"src\\ST.Client\\ST.Client.csproj",
|
||||
"src\\ST.Client.Desktop\\ST.Client.Desktop.csproj",
|
||||
"src\\ST.Client.Desktop.Avalonia\\ST.Client.Desktop.Avalonia.csproj",
|
||||
"src\\ST.Client.Desktop.Linux\\ST.Client.Desktop.Linux.csproj",
|
||||
"src\\ST.Client.Mobile\\ST.Client.Mobile.csproj",
|
||||
"src\\ST.Client.Mobile.Droid\\ST.Client.Mobile.Droid.csproj",
|
||||
"src\\ST.Client.Mobile.iOS\\ST.Client.Mobile.iOS.csproj",
|
||||
"src\\ST.Services.CloudService.Models\\ST.Services.CloudService.Models.csproj",
|
||||
"src\\ST.Services.CloudService.ViewModels\\ST.Services.CloudService.ViewModels.csproj",
|
||||
"src\\ST.Services.CloudService\\ST.Services.CloudService.csproj",
|
||||
"src\\ST.Tools.AndroidResourceLink\\ST.Tools.AndroidResourceLink.csproj",
|
||||
"src\\ST.Tools.AreaImport\\ST.Tools.AreaImport.csproj",
|
||||
"src\\ST.Tools.MinifyStaticSites\\ST.Tools.MinifyStaticSites.csproj",
|
||||
"src\\ST.Tools.OpenSourceLibraryList\\ST.Tools.OpenSourceLibraryList.csproj",
|
||||
"src\\ST.Tools.Translate\\ST.Tools.Translate.csproj",
|
||||
"src\\ST.Tools.AndroidResourceLink\\ST.Tools.AndroidResourceLink.csproj"
|
||||
"src\\ST\\ST.csproj",
|
||||
"tests\\Common.UnitTest.Droid.App\\ST.Client.UnitTest.Droid.App.csproj",
|
||||
"tests\\Common.UnitTest.Droid\\ST.Client.UnitTest.Droid.csproj",
|
||||
"tests\\Common.UnitTest\\Common.UnitTest.csproj",
|
||||
"tests\\ST.Client.Desktop.UnitTest\\ST.Client.Desktop.UnitTest.csproj",
|
||||
"tests\\ST.Client.UnitTest\\ST.Client.UnitTest.csproj"
|
||||
]
|
||||
}
|
||||
}
|
||||
+29
-22
@@ -2,40 +2,47 @@
|
||||
"solution": {
|
||||
"path": "SteamToolsV2+.sln",
|
||||
"projects": [
|
||||
"src\\Common.AreaLib\\Common.AreaLib.csproj",
|
||||
"src\\Common.ClientLib\\Common.ClientLib.csproj",
|
||||
"src\\Common.ClientLib.Droid\\Common.ClientLib.Droid.csproj",
|
||||
"src\\Common.ClientLib.iOS\\Common.ClientLib.iOS.csproj",
|
||||
"src\\Common.CoreLib\\Common.CoreLib.csproj",
|
||||
"src\\Repositories.sqlite-net-pcl\\Repositories.sqlite-net-pcl.csproj",
|
||||
"references\\WinAuth\\Authenticator\\Authenticator.csproj",
|
||||
"references\\ArchiSteamFarm\\ArchiSteamFarm.Library\\ArchiSteamFarm.Library.csproj",
|
||||
"references\\AvaloniaGif\\AvaloniaGif\\AvaloniaGif.csproj",
|
||||
"references\\AvaloniaGif\\LibAPNG\\LibAPNG.csproj",
|
||||
"references\\SteamAchievementManager\\SAM.API\\SAM.API.csproj",
|
||||
"references\\Steam4NET\\Steam4NET\\Steam4NET.csproj",
|
||||
"references\\SteamAchievementManager\\SAM.API\\SAM.API.csproj",
|
||||
"references\\Titanium-Web-Proxy\\src\\Titanium.Web.Proxy\\Titanium.Web.Proxy.csproj",
|
||||
"references\\ArchiSteamFarm\\ArchiSteamFarm.Library\\ArchiSteamFarm.Library.csproj",
|
||||
"tests\\Common.UnitTest\\Common.UnitTest.csproj",
|
||||
"tests\\Common.UnitTest.Droid\\Common.UnitTest.Droid.csproj",
|
||||
"tests\\Common.UnitTest.Droid.App\\Common.UnitTest.Droid.App.csproj",
|
||||
"tests\\ST.Client.UnitTest\\ST.Client.UnitTest.csproj",
|
||||
"tests\\ST.Client.Desktop.UnitTest\\ST.Client.Desktop.UnitTest.csproj",
|
||||
"src\\ST\\ST.csproj",
|
||||
"references\\WinAuth\\Authenticator\\Authenticator.csproj",
|
||||
"references\\reactive\\Rx.NET\\Source\\src\\System.Reactive\\System.Reactive.csproj",
|
||||
"src\\Avalonia.Native\\Avalonia.Native.csproj",
|
||||
"src\\Avalonia.Themes.Default\\Avalonia.Themes.Default.csproj",
|
||||
"src\\Avalonia.Themes.Fluent\\Avalonia.Themes.Fluent.csproj",
|
||||
"src\\Avalonia.Win32\\Avalonia.Win32.csproj",
|
||||
"src\\Avalonia.X11\\Avalonia.X11.csproj",
|
||||
"src\\Common.AreaLib\\Common.AreaLib.csproj",
|
||||
"src\\Common.ClientLib.Droid\\Common.ClientLib.Droid.csproj",
|
||||
"src\\Common.ClientLib.iOS\\Common.ClientLib.iOS.csproj",
|
||||
"src\\Common.ClientLib\\Common.ClientLib.csproj",
|
||||
"src\\Common.CoreLib\\Common.CoreLib.csproj",
|
||||
"src\\Repositories.sqlite-net-pcl\\Repositories.sqlite-net-pcl.csproj",
|
||||
"src\\ST.Client.Android\\ST.Client.Android.csproj",
|
||||
"src\\ST.Client.Desktop.Mac\\ST.Client.Mac.csproj",
|
||||
"src\\ST.Client.Mobile.Droid.App\\ST.Client.Android.App.csproj",
|
||||
"src\\ST.Client.XamarinForms\\ST.Client.XamarinForms.csproj",
|
||||
"src\\ST.Client.Desktop.Avalonia\\ST.Client.Avalonia.csproj",
|
||||
"src\\ST.Client.Desktop.Avalonia.App\\ST.Client.Avalonia.App.csproj",
|
||||
"src\\ST.Client.iOS\\ST.Client.iOS.csproj",
|
||||
"src\\ST.Client\\ST.Client.csproj",
|
||||
"src\\ST.Client.Desktop\\ST.Client.Desktop.csproj",
|
||||
"src\\ST.Client.Desktop.Avalonia\\ST.Client.Desktop.Avalonia.csproj",
|
||||
"src\\ST.Client.Desktop.Mac\\ST.Client.Desktop.Mac.csproj",
|
||||
"src\\ST.Client.Mobile\\ST.Client.Mobile.csproj",
|
||||
"src\\ST.Client.Mobile.Droid\\ST.Client.Mobile.Droid.csproj",
|
||||
"src\\ST.Client.Mobile.iOS\\ST.Client.Mobile.iOS.csproj",
|
||||
"src\\ST.Services.CloudService.Models\\ST.Services.CloudService.Models.csproj",
|
||||
"src\\ST.Services.CloudService.ViewModels\\ST.Services.CloudService.ViewModels.csproj",
|
||||
"src\\ST.Services.CloudService\\ST.Services.CloudService.csproj",
|
||||
"src\\ST.Tools.AndroidResourceLink\\ST.Tools.AndroidResourceLink.csproj",
|
||||
"src\\ST.Tools.AreaImport\\ST.Tools.AreaImport.csproj",
|
||||
"src\\ST.Tools.MinifyStaticSites\\ST.Tools.MinifyStaticSites.csproj",
|
||||
"src\\ST.Tools.OpenSourceLibraryList\\ST.Tools.OpenSourceLibraryList.csproj",
|
||||
"src\\ST.Tools.Translate\\ST.Tools.Translate.csproj",
|
||||
"src\\ST.Tools.AndroidResourceLink\\ST.Tools.AndroidResourceLink.csproj"
|
||||
"src\\ST\\ST.csproj",
|
||||
"tests\\Common.UnitTest.Droid.App\\ST.Client.UnitTest.Droid.App.csproj",
|
||||
"tests\\Common.UnitTest.Droid\\ST.Client.UnitTest.Droid.csproj",
|
||||
"tests\\Common.UnitTest\\Common.UnitTest.csproj",
|
||||
"tests\\ST.Client.Desktop.UnitTest\\ST.Client.Desktop.UnitTest.csproj",
|
||||
"tests\\ST.Client.UnitTest\\ST.Client.UnitTest.csproj"
|
||||
]
|
||||
}
|
||||
}
|
||||
+279
-1
@@ -8,11 +8,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_Root", "_Root", "{66839CD8
|
||||
.editorconfig = .editorconfig
|
||||
.gitignore = .gitignore
|
||||
packaging\build-osx-app.sh = packaging\build-osx-app.sh
|
||||
packaging\build.ps1 = packaging\build.ps1
|
||||
Directory.Build.props = Directory.Build.props
|
||||
Directory.Packages.props = Directory.Packages.props
|
||||
download-guide.md = download-guide.md
|
||||
global.json = global.json
|
||||
packaging\Info.plist = packaging\Info.plist
|
||||
nuget.config = nuget.config
|
||||
packaging\package.net472.ps1 = packaging\package.net472.ps1
|
||||
README.en.md = README.en.md
|
||||
README.md = README.md
|
||||
release-template.md = release-template.md
|
||||
@@ -136,6 +139,35 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reactive", "referenc
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ST.Tools.Publish", "src\ST.Tools.Publish\ST.Tools.Publish.csproj", "{29DE5086-0690-4AE7-9BA9-840F54B249DC}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_Github", "_Github", "{B1142BA9-E601-4E93-93C4-6A8EC1842E4E}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
.github\ISSUE_TEMPLATE\bug-report.md = .github\ISSUE_TEMPLATE\bug-report.md
|
||||
.github\dependabot.yml = .github\dependabot.yml
|
||||
.github\workflows\dotnet.yml = .github\workflows\dotnet.yml
|
||||
.github\ISSUE_TEMPLATE\feature-request.md = .github\ISSUE_TEMPLATE\feature-request.md
|
||||
.github\FUNDING.yml = .github\FUNDING.yml
|
||||
.github\workflows\publish.yml = .github\workflows\publish.yml
|
||||
.github\ISSUE_TEMPLATE\question.md = .github\ISSUE_TEMPLATE\question.md
|
||||
.github\workflows\sync-gitee.yml = .github\workflows\sync-gitee.yml
|
||||
.github\workflows\xamarin.yml = .github\workflows\xamarin.yml
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Common.ClientLib.Droid", "src\Common.ClientLib.Droid\Common.ClientLib.Droid.csproj", "{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Common.ClientLib.iOS", "src\Common.ClientLib.iOS\Common.ClientLib.iOS.csproj", "{4658B02A-CB1A-4561-AD9C-3B3FF969D7F0}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ST.Client.UnitTest.Droid", "tests\Common.UnitTest.Droid\ST.Client.UnitTest.Droid.csproj", "{80E6762E-AB43-41E2-BDB4-7A3E24713977}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ST.Client.UnitTest.Droid.App", "tests\Common.UnitTest.Droid.App\ST.Client.UnitTest.Droid.App.csproj", "{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ST.Client.Desktop.UnitTest", "tests\ST.Client.Desktop.UnitTest\ST.Client.Desktop.UnitTest.csproj", "{5D9E0EAA-2419-426B-BAB4-EA496C1FF7E9}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ST.Client.UnitTest.Resources", "tests\ST.Client.UnitTest.Resources\ST.Client.UnitTest.Resources.csproj", "{FB2CA9B4-71F1-48E8-B9AE-FF4375F4FE43}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Diagnostics", "src\Avalonia.Diagnostics\Avalonia.Diagnostics.csproj", "{E84FF7BC-FC2A-424E-8780-7DA9B487E23F}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Skia.Internals", "src\Avalonia.Skia.Internals\Avalonia.Skia.Internals.csproj", "{47C151DA-D2B1-43F4-A04E-B454E2134852}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -1554,6 +1586,244 @@ Global
|
||||
{29DE5086-0690-4AE7-9BA9-840F54B249DC}.Release|x64.Build.0 = Release|Any CPU
|
||||
{29DE5086-0690-4AE7-9BA9-840F54B249DC}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{29DE5086-0690-4AE7-9BA9-840F54B249DC}.Release|x86.Build.0 = Release|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Debug|ARM64.Build.0 = Debug|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Release|ARM64.ActiveCfg = Release|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Release|ARM64.Build.0 = Release|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Release|x64.Build.0 = Release|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Release|x86.Build.0 = Release|Any CPU
|
||||
{4658B02A-CB1A-4561-AD9C-3B3FF969D7F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4658B02A-CB1A-4561-AD9C-3B3FF969D7F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4658B02A-CB1A-4561-AD9C-3B3FF969D7F0}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{4658B02A-CB1A-4561-AD9C-3B3FF969D7F0}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{4658B02A-CB1A-4561-AD9C-3B3FF969D7F0}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
||||
{4658B02A-CB1A-4561-AD9C-3B3FF969D7F0}.Debug|ARM64.Build.0 = Debug|Any CPU
|
||||
{4658B02A-CB1A-4561-AD9C-3B3FF969D7F0}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{4658B02A-CB1A-4561-AD9C-3B3FF969D7F0}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{4658B02A-CB1A-4561-AD9C-3B3FF969D7F0}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{4658B02A-CB1A-4561-AD9C-3B3FF969D7F0}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{4658B02A-CB1A-4561-AD9C-3B3FF969D7F0}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{4658B02A-CB1A-4561-AD9C-3B3FF969D7F0}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{4658B02A-CB1A-4561-AD9C-3B3FF969D7F0}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{4658B02A-CB1A-4561-AD9C-3B3FF969D7F0}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{4658B02A-CB1A-4561-AD9C-3B3FF969D7F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4658B02A-CB1A-4561-AD9C-3B3FF969D7F0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{4658B02A-CB1A-4561-AD9C-3B3FF969D7F0}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{4658B02A-CB1A-4561-AD9C-3B3FF969D7F0}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{4658B02A-CB1A-4561-AD9C-3B3FF969D7F0}.Release|ARM64.ActiveCfg = Release|Any CPU
|
||||
{4658B02A-CB1A-4561-AD9C-3B3FF969D7F0}.Release|ARM64.Build.0 = Release|Any CPU
|
||||
{4658B02A-CB1A-4561-AD9C-3B3FF969D7F0}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{4658B02A-CB1A-4561-AD9C-3B3FF969D7F0}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{4658B02A-CB1A-4561-AD9C-3B3FF969D7F0}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{4658B02A-CB1A-4561-AD9C-3B3FF969D7F0}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{4658B02A-CB1A-4561-AD9C-3B3FF969D7F0}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{4658B02A-CB1A-4561-AD9C-3B3FF969D7F0}.Release|x64.Build.0 = Release|Any CPU
|
||||
{4658B02A-CB1A-4561-AD9C-3B3FF969D7F0}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{4658B02A-CB1A-4561-AD9C-3B3FF969D7F0}.Release|x86.Build.0 = Release|Any CPU
|
||||
{80E6762E-AB43-41E2-BDB4-7A3E24713977}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{80E6762E-AB43-41E2-BDB4-7A3E24713977}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{80E6762E-AB43-41E2-BDB4-7A3E24713977}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{80E6762E-AB43-41E2-BDB4-7A3E24713977}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{80E6762E-AB43-41E2-BDB4-7A3E24713977}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
||||
{80E6762E-AB43-41E2-BDB4-7A3E24713977}.Debug|ARM64.Build.0 = Debug|Any CPU
|
||||
{80E6762E-AB43-41E2-BDB4-7A3E24713977}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{80E6762E-AB43-41E2-BDB4-7A3E24713977}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{80E6762E-AB43-41E2-BDB4-7A3E24713977}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{80E6762E-AB43-41E2-BDB4-7A3E24713977}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{80E6762E-AB43-41E2-BDB4-7A3E24713977}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{80E6762E-AB43-41E2-BDB4-7A3E24713977}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{80E6762E-AB43-41E2-BDB4-7A3E24713977}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{80E6762E-AB43-41E2-BDB4-7A3E24713977}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{80E6762E-AB43-41E2-BDB4-7A3E24713977}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{80E6762E-AB43-41E2-BDB4-7A3E24713977}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{80E6762E-AB43-41E2-BDB4-7A3E24713977}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{80E6762E-AB43-41E2-BDB4-7A3E24713977}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{80E6762E-AB43-41E2-BDB4-7A3E24713977}.Release|ARM64.ActiveCfg = Release|Any CPU
|
||||
{80E6762E-AB43-41E2-BDB4-7A3E24713977}.Release|ARM64.Build.0 = Release|Any CPU
|
||||
{80E6762E-AB43-41E2-BDB4-7A3E24713977}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{80E6762E-AB43-41E2-BDB4-7A3E24713977}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{80E6762E-AB43-41E2-BDB4-7A3E24713977}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{80E6762E-AB43-41E2-BDB4-7A3E24713977}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{80E6762E-AB43-41E2-BDB4-7A3E24713977}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{80E6762E-AB43-41E2-BDB4-7A3E24713977}.Release|x64.Build.0 = Release|Any CPU
|
||||
{80E6762E-AB43-41E2-BDB4-7A3E24713977}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{80E6762E-AB43-41E2-BDB4-7A3E24713977}.Release|x86.Build.0 = Release|Any CPU
|
||||
{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
|
||||
{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA}.Debug|ARM.Deploy.0 = Debug|Any CPU
|
||||
{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
||||
{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA}.Debug|ARM64.Build.0 = Debug|Any CPU
|
||||
{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA}.Debug|ARM64.Deploy.0 = Debug|Any CPU
|
||||
{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA}.Debug|iPhone.Deploy.0 = Debug|Any CPU
|
||||
{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU
|
||||
{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA}.Debug|x64.Deploy.0 = Debug|Any CPU
|
||||
{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA}.Debug|x86.Deploy.0 = Debug|Any CPU
|
||||
{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA}.Release|Any CPU.Deploy.0 = Release|Any CPU
|
||||
{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA}.Release|ARM.Deploy.0 = Release|Any CPU
|
||||
{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA}.Release|ARM64.ActiveCfg = Release|Any CPU
|
||||
{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA}.Release|ARM64.Build.0 = Release|Any CPU
|
||||
{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA}.Release|ARM64.Deploy.0 = Release|Any CPU
|
||||
{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA}.Release|iPhone.Deploy.0 = Release|Any CPU
|
||||
{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU
|
||||
{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA}.Release|x64.Build.0 = Release|Any CPU
|
||||
{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA}.Release|x64.Deploy.0 = Release|Any CPU
|
||||
{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA}.Release|x86.Build.0 = Release|Any CPU
|
||||
{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA}.Release|x86.Deploy.0 = Release|Any CPU
|
||||
{5D9E0EAA-2419-426B-BAB4-EA496C1FF7E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{5D9E0EAA-2419-426B-BAB4-EA496C1FF7E9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5D9E0EAA-2419-426B-BAB4-EA496C1FF7E9}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{5D9E0EAA-2419-426B-BAB4-EA496C1FF7E9}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{5D9E0EAA-2419-426B-BAB4-EA496C1FF7E9}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
||||
{5D9E0EAA-2419-426B-BAB4-EA496C1FF7E9}.Debug|ARM64.Build.0 = Debug|Any CPU
|
||||
{5D9E0EAA-2419-426B-BAB4-EA496C1FF7E9}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{5D9E0EAA-2419-426B-BAB4-EA496C1FF7E9}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{5D9E0EAA-2419-426B-BAB4-EA496C1FF7E9}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{5D9E0EAA-2419-426B-BAB4-EA496C1FF7E9}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{5D9E0EAA-2419-426B-BAB4-EA496C1FF7E9}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{5D9E0EAA-2419-426B-BAB4-EA496C1FF7E9}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{5D9E0EAA-2419-426B-BAB4-EA496C1FF7E9}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{5D9E0EAA-2419-426B-BAB4-EA496C1FF7E9}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{5D9E0EAA-2419-426B-BAB4-EA496C1FF7E9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5D9E0EAA-2419-426B-BAB4-EA496C1FF7E9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{5D9E0EAA-2419-426B-BAB4-EA496C1FF7E9}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{5D9E0EAA-2419-426B-BAB4-EA496C1FF7E9}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{5D9E0EAA-2419-426B-BAB4-EA496C1FF7E9}.Release|ARM64.ActiveCfg = Release|Any CPU
|
||||
{5D9E0EAA-2419-426B-BAB4-EA496C1FF7E9}.Release|ARM64.Build.0 = Release|Any CPU
|
||||
{5D9E0EAA-2419-426B-BAB4-EA496C1FF7E9}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{5D9E0EAA-2419-426B-BAB4-EA496C1FF7E9}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{5D9E0EAA-2419-426B-BAB4-EA496C1FF7E9}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{5D9E0EAA-2419-426B-BAB4-EA496C1FF7E9}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{5D9E0EAA-2419-426B-BAB4-EA496C1FF7E9}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{5D9E0EAA-2419-426B-BAB4-EA496C1FF7E9}.Release|x64.Build.0 = Release|Any CPU
|
||||
{5D9E0EAA-2419-426B-BAB4-EA496C1FF7E9}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{5D9E0EAA-2419-426B-BAB4-EA496C1FF7E9}.Release|x86.Build.0 = Release|Any CPU
|
||||
{FB2CA9B4-71F1-48E8-B9AE-FF4375F4FE43}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{FB2CA9B4-71F1-48E8-B9AE-FF4375F4FE43}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{FB2CA9B4-71F1-48E8-B9AE-FF4375F4FE43}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{FB2CA9B4-71F1-48E8-B9AE-FF4375F4FE43}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{FB2CA9B4-71F1-48E8-B9AE-FF4375F4FE43}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
||||
{FB2CA9B4-71F1-48E8-B9AE-FF4375F4FE43}.Debug|ARM64.Build.0 = Debug|Any CPU
|
||||
{FB2CA9B4-71F1-48E8-B9AE-FF4375F4FE43}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{FB2CA9B4-71F1-48E8-B9AE-FF4375F4FE43}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{FB2CA9B4-71F1-48E8-B9AE-FF4375F4FE43}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{FB2CA9B4-71F1-48E8-B9AE-FF4375F4FE43}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{FB2CA9B4-71F1-48E8-B9AE-FF4375F4FE43}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{FB2CA9B4-71F1-48E8-B9AE-FF4375F4FE43}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{FB2CA9B4-71F1-48E8-B9AE-FF4375F4FE43}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{FB2CA9B4-71F1-48E8-B9AE-FF4375F4FE43}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{FB2CA9B4-71F1-48E8-B9AE-FF4375F4FE43}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{FB2CA9B4-71F1-48E8-B9AE-FF4375F4FE43}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{FB2CA9B4-71F1-48E8-B9AE-FF4375F4FE43}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{FB2CA9B4-71F1-48E8-B9AE-FF4375F4FE43}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{FB2CA9B4-71F1-48E8-B9AE-FF4375F4FE43}.Release|ARM64.ActiveCfg = Release|Any CPU
|
||||
{FB2CA9B4-71F1-48E8-B9AE-FF4375F4FE43}.Release|ARM64.Build.0 = Release|Any CPU
|
||||
{FB2CA9B4-71F1-48E8-B9AE-FF4375F4FE43}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{FB2CA9B4-71F1-48E8-B9AE-FF4375F4FE43}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{FB2CA9B4-71F1-48E8-B9AE-FF4375F4FE43}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{FB2CA9B4-71F1-48E8-B9AE-FF4375F4FE43}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{FB2CA9B4-71F1-48E8-B9AE-FF4375F4FE43}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{FB2CA9B4-71F1-48E8-B9AE-FF4375F4FE43}.Release|x64.Build.0 = Release|Any CPU
|
||||
{FB2CA9B4-71F1-48E8-B9AE-FF4375F4FE43}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{FB2CA9B4-71F1-48E8-B9AE-FF4375F4FE43}.Release|x86.Build.0 = Release|Any CPU
|
||||
{E84FF7BC-FC2A-424E-8780-7DA9B487E23F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E84FF7BC-FC2A-424E-8780-7DA9B487E23F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E84FF7BC-FC2A-424E-8780-7DA9B487E23F}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{E84FF7BC-FC2A-424E-8780-7DA9B487E23F}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{E84FF7BC-FC2A-424E-8780-7DA9B487E23F}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
||||
{E84FF7BC-FC2A-424E-8780-7DA9B487E23F}.Debug|ARM64.Build.0 = Debug|Any CPU
|
||||
{E84FF7BC-FC2A-424E-8780-7DA9B487E23F}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{E84FF7BC-FC2A-424E-8780-7DA9B487E23F}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{E84FF7BC-FC2A-424E-8780-7DA9B487E23F}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{E84FF7BC-FC2A-424E-8780-7DA9B487E23F}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{E84FF7BC-FC2A-424E-8780-7DA9B487E23F}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{E84FF7BC-FC2A-424E-8780-7DA9B487E23F}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{E84FF7BC-FC2A-424E-8780-7DA9B487E23F}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{E84FF7BC-FC2A-424E-8780-7DA9B487E23F}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{E84FF7BC-FC2A-424E-8780-7DA9B487E23F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E84FF7BC-FC2A-424E-8780-7DA9B487E23F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E84FF7BC-FC2A-424E-8780-7DA9B487E23F}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{E84FF7BC-FC2A-424E-8780-7DA9B487E23F}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{E84FF7BC-FC2A-424E-8780-7DA9B487E23F}.Release|ARM64.ActiveCfg = Release|Any CPU
|
||||
{E84FF7BC-FC2A-424E-8780-7DA9B487E23F}.Release|ARM64.Build.0 = Release|Any CPU
|
||||
{E84FF7BC-FC2A-424E-8780-7DA9B487E23F}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{E84FF7BC-FC2A-424E-8780-7DA9B487E23F}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{E84FF7BC-FC2A-424E-8780-7DA9B487E23F}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{E84FF7BC-FC2A-424E-8780-7DA9B487E23F}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{E84FF7BC-FC2A-424E-8780-7DA9B487E23F}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{E84FF7BC-FC2A-424E-8780-7DA9B487E23F}.Release|x64.Build.0 = Release|Any CPU
|
||||
{E84FF7BC-FC2A-424E-8780-7DA9B487E23F}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{E84FF7BC-FC2A-424E-8780-7DA9B487E23F}.Release|x86.Build.0 = Release|Any CPU
|
||||
{47C151DA-D2B1-43F4-A04E-B454E2134852}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{47C151DA-D2B1-43F4-A04E-B454E2134852}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{47C151DA-D2B1-43F4-A04E-B454E2134852}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{47C151DA-D2B1-43F4-A04E-B454E2134852}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{47C151DA-D2B1-43F4-A04E-B454E2134852}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
||||
{47C151DA-D2B1-43F4-A04E-B454E2134852}.Debug|ARM64.Build.0 = Debug|Any CPU
|
||||
{47C151DA-D2B1-43F4-A04E-B454E2134852}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{47C151DA-D2B1-43F4-A04E-B454E2134852}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{47C151DA-D2B1-43F4-A04E-B454E2134852}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{47C151DA-D2B1-43F4-A04E-B454E2134852}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{47C151DA-D2B1-43F4-A04E-B454E2134852}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{47C151DA-D2B1-43F4-A04E-B454E2134852}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{47C151DA-D2B1-43F4-A04E-B454E2134852}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{47C151DA-D2B1-43F4-A04E-B454E2134852}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{47C151DA-D2B1-43F4-A04E-B454E2134852}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{47C151DA-D2B1-43F4-A04E-B454E2134852}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{47C151DA-D2B1-43F4-A04E-B454E2134852}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{47C151DA-D2B1-43F4-A04E-B454E2134852}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{47C151DA-D2B1-43F4-A04E-B454E2134852}.Release|ARM64.ActiveCfg = Release|Any CPU
|
||||
{47C151DA-D2B1-43F4-A04E-B454E2134852}.Release|ARM64.Build.0 = Release|Any CPU
|
||||
{47C151DA-D2B1-43F4-A04E-B454E2134852}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{47C151DA-D2B1-43F4-A04E-B454E2134852}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{47C151DA-D2B1-43F4-A04E-B454E2134852}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{47C151DA-D2B1-43F4-A04E-B454E2134852}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{47C151DA-D2B1-43F4-A04E-B454E2134852}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{47C151DA-D2B1-43F4-A04E-B454E2134852}.Release|x64.Build.0 = Release|Any CPU
|
||||
{47C151DA-D2B1-43F4-A04E-B454E2134852}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{47C151DA-D2B1-43F4-A04E-B454E2134852}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -1610,9 +1880,17 @@ Global
|
||||
{E85E92BA-202F-42D3-8C5E-96DA452501B7} = {910D6A0F-42AB-4B65-B532-852E864EC006}
|
||||
{21C392C5-AE41-421A-A127-1A03C4ACA2AD} = {673FF8CD-9E85-4FA1-ABFC-D1149675E138}
|
||||
{29DE5086-0690-4AE7-9BA9-840F54B249DC} = {E448F863-4C9D-47A4-BC4A-4A1381B54DA4}
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C} = {83186945-EC14-4B3F-8C6F-B205AA184CA4}
|
||||
{4658B02A-CB1A-4561-AD9C-3B3FF969D7F0} = {83186945-EC14-4B3F-8C6F-B205AA184CA4}
|
||||
{80E6762E-AB43-41E2-BDB4-7A3E24713977} = {CC46B486-00D7-49E6-ABA3-FDF8F4868D2B}
|
||||
{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA} = {CC46B486-00D7-49E6-ABA3-FDF8F4868D2B}
|
||||
{5D9E0EAA-2419-426B-BAB4-EA496C1FF7E9} = {CC46B486-00D7-49E6-ABA3-FDF8F4868D2B}
|
||||
{FB2CA9B4-71F1-48E8-B9AE-FF4375F4FE43} = {CC46B486-00D7-49E6-ABA3-FDF8F4868D2B}
|
||||
{E84FF7BC-FC2A-424E-8780-7DA9B487E23F} = {910D6A0F-42AB-4B65-B532-852E864EC006}
|
||||
{47C151DA-D2B1-43F4-A04E-B454E2134852} = {910D6A0F-42AB-4B65-B532-852E864EC006}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {9313F2B4-10DA-43AA-A481-CAA7571C740C}
|
||||
RESX_NeutralResourcesLanguage = zh-Hans
|
||||
SolutionGuid = {9313F2B4-10DA-43AA-A481-CAA7571C740C}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
Binary file not shown.
+5
-3
@@ -3,15 +3,12 @@
|
||||
- Windows
|
||||
- 如果你使用 Intel、AMD 的 x64 芯片的 Mac(较为**普遍**),则下载文件名中带有 **win_x64** 的文件
|
||||
- 如果你使用 ARM64 芯片的 PC(极为**稀有**),例如 **Surface Pro X**,则下载文件名中带有 **win_x64** 的文件可通过 Win11 x86 模拟运行
|
||||
- **[暂未支持]** ~~如果你使用 ARM64 芯片的 PC(极为**稀有**),例如 **Surface Pro X**,则下载文件名中带有 **win_arm64** 的文件~~
|
||||
- macOS
|
||||
- 如果你使用 Intel、AMD 的 x64 芯片的 Mac(较为**普遍**),则下载文件名中带有 **macos_x64** 的文件
|
||||
- 如果你使用 ARM64 芯片的 Mac(较为**稀有**),例如 **M1**,则下载文件名中带有 **macos_x64** 的文件可通过 [Rosetta 2](https://support.apple.com/zh-cn/HT211861) 运行
|
||||
- **[尚未测试]** ~~如果你使用 ARM64 芯片的 Mac(较为**稀有**),例如 **M1**,则下载文件名中带有 **macos_arm64** 的文件~~
|
||||
- Linux
|
||||
- 如果你使用 Intel、AMD 的 x64 芯片的 PC(较为**普遍**)则下载文件名中带有 **linux_x64** 的文件
|
||||
- 如果你使用 ARM64 芯片的 PC(较为**稀有**)例如 **Raspberry Pi Model 3+**,则下载文件名中带有 **linux_arm64** 的文件
|
||||
- 如果你使用 ARM32 芯片的 PC(较为**稀有**)例如 **Raspberry Pi Model 2+**,则下载文件名中带有 **linux_arm** 的文件
|
||||
- Shared
|
||||
- 如果你已安装了 [ASP.NET Core Runtime 6.0.0](https://dotnet.microsoft.com/download/dotnet/6.0) 则下载文件名中带有 **fde** 的文件,可减少磁盘占用空间
|
||||
- [在 Windows 上安装 .NET](https://docs.microsoft.com/en-us/dotnet/core/install/windows)
|
||||
@@ -26,3 +23,8 @@
|
||||
- 如果你使用 ARM64 芯片的设备(较为**普遍**)则下载文件名中带有 **android_arm64_v8a** 的文件
|
||||
- 如果你使用 ARM32 芯片的设备(较为**稀有**)通常为 **14** 年下半年之前生产的设备,则下载文件名中带有 **android_armeabi_v7a** 的文件
|
||||
- 如果你使用 Intel、AMD 的 x86 芯片的设备(较为**稀有**)则下载文件名中带有 **android_x86** 的文件
|
||||
|
||||
<!--
|
||||
- **[暂未支持]** ~~如果你使用 ARM64 芯片的 PC(极为**稀有**),例如 **Surface Pro X**,则下载文件名中带有 **win_arm64** 的文件~~
|
||||
- **[暂未支持]** ~~如果你使用 ARM64 芯片的 Mac(较为**稀有**),例如 **M1**,则下载文件名中带有 **macos_arm64** 的文件~~
|
||||
-->
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"msbuild-sdks": {
|
||||
"MSBuild.Sdk.Extras": "3.0.38"
|
||||
"MSBuild.Sdk.Extras": "3.0.44"
|
||||
},
|
||||
"sdk": {
|
||||
"version": "6.0.100"
|
||||
"version": "6.0.101"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
param([string]$file)
|
||||
(Get-FileHash $file -Algorithm SHA256).Hash
|
||||
@@ -33,9 +33,9 @@ emit_plist() {
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>net.steampp.app</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.6.1</string>
|
||||
<string>2.6.4</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>2.6.1.0</string>
|
||||
<string>2.6.4.0</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.14</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
param([string]$version,[string]$configuration='Release',[bool]$isPublish=$false)
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
Write-Host 'dotnet SDK info'
|
||||
dotnet --info
|
||||
|
||||
$RootPath = Split-Path $PSScriptRoot -Parent
|
||||
$output_dir = "$RootPath\src\ST.Client.Desktop.Avalonia.App\bin\$configuration\Publish"
|
||||
$proj_path = "$RootPath\src\ST.Client.Desktop.Avalonia.App\ST.Client.Avalonia.App.csproj"
|
||||
|
||||
$publishtool_dir = "$RootPath\src\ST.Tools.Publish"
|
||||
$publishtool_exe = "$publishtool_dir\bin\Release\net6.0\p.exe"
|
||||
|
||||
$build_pubxmls = "fd-win-x64","win-x64","osx-x64","linux-x64","linux-arm64","osx-arm64"
|
||||
|
||||
function Build-PublishTool
|
||||
{
|
||||
if(-not (Test-Path $publishtool_exe))
|
||||
{
|
||||
& dotnet build $publishtool_dir\ST.Tools.Publish.csproj -c Release
|
||||
if ($LASTEXITCODE) { exit $LASTEXITCODE }
|
||||
}
|
||||
|
||||
$dev=''
|
||||
if($configuration -eq 'Debug')
|
||||
{
|
||||
$dev = "-dev"
|
||||
}
|
||||
|
||||
& $publishtool_exe ver -token $('"')$env:Token$('"') $dev
|
||||
if ($LASTEXITCODE) { exit $LASTEXITCODE }
|
||||
|
||||
# build App
|
||||
|
||||
Foreach ($pubxml in $build_pubxmls)
|
||||
{
|
||||
Build-App $pubxml
|
||||
}
|
||||
|
||||
& $publishtool_exe full -token $('"')$env:Token$('"') $dev
|
||||
if ($LASTEXITCODE) { exit $LASTEXITCODE }
|
||||
}
|
||||
|
||||
function Build-App
|
||||
{
|
||||
param([string]$rid)
|
||||
|
||||
Write-Host "Building $version $rid"
|
||||
|
||||
if($rid.StartsWith("fd-"))
|
||||
{
|
||||
$publishDir = "$output_dir\FrameworkDependent\$rid"
|
||||
}else
|
||||
{
|
||||
$publishDir = "$output_dir\$rid"
|
||||
}
|
||||
|
||||
Remove-Item $publishDir -Recurse -Force -Confirm:$false -ErrorAction Ignore
|
||||
|
||||
if($configuration -eq 'Debug'){ $rid = "dev-$rid" }
|
||||
|
||||
& dotnet publish $proj_path -c $configuration -p:PublishProfile=$rid -p:DeployOnBuild=true -p:ExtraDefineConstants=$rid --nologo
|
||||
|
||||
if ($LASTEXITCODE) { exit $LASTEXITCODE }
|
||||
}
|
||||
|
||||
if($isPublish)
|
||||
{
|
||||
if([String]::IsNullOrEmpty($env:Token))
|
||||
{
|
||||
Write-Error "$version Undefined Token : $env:Token"
|
||||
Exit 1
|
||||
}
|
||||
|
||||
Build-PublishTool
|
||||
}else
|
||||
{
|
||||
Foreach ($pubxml in $build_pubxmls)
|
||||
{
|
||||
Build-App $pubxml
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
dotnet publish ..\source\SteamTools -c Release -f net5.0-windows -r win-x86 - /p:PublishSingleFile=true /p:PublishTrimmed=true -o out/result
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Submodule references/ArchiSteamFarm updated: 2595094519...38e3619c91
+1
-1
Submodule references/AvaloniaGif updated: 9a09355b9b...016cf27b57
Submodule references/FluentAvalonia updated: 6d2bc5d819...af86596b10
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ArchiSteamFarm
|
||||
{
|
||||
public interface IArchiSteamFarmHelperService
|
||||
{
|
||||
static IArchiSteamFarmHelperService Instance => DI.Get<IArchiSteamFarmHelperService>();
|
||||
|
||||
int IPCPortValue { get; }
|
||||
|
||||
Task Restart();
|
||||
}
|
||||
}
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Submodule
+1
Submodule references/SevenZipSharp added at 705a75a79b
Submodule references/Titanium-Web-Proxy updated: cabb49282b...29256a4b4f
Submodule references/dotnet-packaging updated: fb0ad36640...3f7bd3c61a
Binary file not shown.
+1
-1
Submodule references/reactive updated: d35f495801...fc2c3d1d22
+52
-46
@@ -1,59 +1,60 @@
|
||||
# 前言
|
||||
|
||||
Steam++是完全开源的,请不要在非官方渠道下载软件,对于软件报毒情况确实是误报问题。我们也制作了自己的产品[官网](https://www.steampp.net),大家可以去官网或者开源仓库地址下载。
|
||||
Steam++是一款开源的跨平台Steam工具箱,请不要在非官方渠道下载软件,
|
||||
[官网](https://www.steampp.net),大家可以去官网或者开源仓库地址下载。
|
||||
|
||||
# Steam++工具箱
|
||||
|
||||
|
||||
## 2.4.12更新内容
|
||||
|
||||
|
||||
### 新增内容
|
||||
1. 新增 Desktop 上网络加速代理设置
|
||||
2. 新增 Android 上屏幕捕获设置项,用于允许截图或录制视频
|
||||
3. 新增 Windows 托盘菜单支持切换账号与复制令牌
|
||||
4. 新增 Linux/macOS 托盘菜单改进与完善
|
||||
|
||||
## 2.6.2更新内容
|
||||
微软商店版本在微软商店检查获取更新即可,一般会比桌面版晚上一天的审核时间。
|
||||
### 版本亮点
|
||||
1. ASF 升级至 **V5.2.0.10**
|
||||
2. 新增 ASF 控制台字体大小、最大行数设置项
|
||||
3. 新增 Steam 下载完成定时关机、睡眠功能
|
||||
4. 新增 代理设置可自定义 DNS
|
||||
5. 新增 ASF 编辑/移除 Bot 功能
|
||||
6. 新增 Microsoft/Xbox 相关加速服务 (需要升级到 **2.6.2** 之后可用)
|
||||
7. 新增 Uplay 相关加速服务 (需要升级到 **2.6.2** 之后可用)
|
||||
8. 新增 OneDrive 等更多相关加速服务 (需要升级到 **2.6.2** 之后可用)
|
||||
9. 优化 Desktop 加速代理性能
|
||||
10. 优化 Desktop 脚本注入打包的性能
|
||||
11. 优化 Desktop 已安装游戏加载性能
|
||||
12. 从此版本开始将使用 Github Action 自动化部署发布
|
||||
|
||||
### 修复问题
|
||||
1. 修复 Desktop 上用户头像应当为圆形而不是方形
|
||||
2. 修复 Android 上切换系统语言可能引发的闪退
|
||||
3. 修复 Windows 10 上启动时可能出现的网络连接中断提示
|
||||
4. 修复 Android 上令牌倒计时可能引发的闪退
|
||||
5. 修复 Desktop 上库存游戏刷新可能引发的闪退
|
||||
6. 修复 Desktop 上可能少加载了部分已安装游戏
|
||||
7. 修复 Android 上暗色模式下某些区域背景为白色
|
||||
8. 改进 Android 上令牌刷新倒计时
|
||||
9. 改进 本地令牌名称最大长度限制 32 个字符
|
||||
10. 改进 Desktop 上网络加速 UI
|
||||
11. 修复 Desktop 上默认头像可能引发的闪退
|
||||
12. 改进 Desktop 上左侧菜单图标
|
||||
1. 改进 Desktop 网络加速现默认使用阿里 DNS(223.5.5.5, 223.6.6.6)
|
||||
2. 改进 自动更新包文件校验失败时提示
|
||||
3. 改进 自动更新失败时将自动跳转官网
|
||||
4. 改进 ASF IPC 默认端口号由 1242 改为 6242
|
||||
5. 修复 Linux 与 macOS 中 ASF-UI 解压包文件夹分隔符不正确
|
||||
6. 修复 Windows Hosts 只读时尝试取消只读属性的操作没有正确执行
|
||||
7. 修复 Windows 此软件自动更新删除更新包缓存时因文件占用引发的中断
|
||||
8. 修复 Desktop 高 DPI 下动态桌面错位
|
||||
9. 修复 本地令牌确认交易在登录时可能会卡住
|
||||
10. 修复 Windows 启用动态桌面后全屏可能导致窗口冻结无法操作
|
||||
11. 修复 Windows 动态背景有时会被其他窗口遮挡
|
||||
12. 改进 本地令牌 登录验证码无法加载时可点击在浏览器中查看验证码图片
|
||||
13. 修复 Desktop 加速代理中可能出现的一些错误
|
||||
14. 改进 Desktop 令牌详情 UI
|
||||
15. 改进 Desktop 账号切换中的用户名信息现在默认隐藏
|
||||
16. 改进 Desktop 深色模式与浅色模式的视觉效果
|
||||
17. 修复 Pixiv 加速不能登录的问题
|
||||
18. 修复 Twitch 加速不计算掉宝进度的问题
|
||||
19. 修复 Discord 加速检测更新失败导致无法启动客户端的问题
|
||||
20. 修复 Windows 因添加 JumpList 时可能导致的闪退
|
||||
21. 修复 Desktop 本地令牌 点击锁定后输入密码按回车解锁会循环无限触发锁定的问题
|
||||
|
||||
|
||||
### 已知问题
|
||||
- Desktop
|
||||
- macOS
|
||||
- 尚未公证,这会影响 macOS Catalina(版本 10.15)以上
|
||||
- 某些窗口顶部会有两个标题栏
|
||||
- 自动更新不可用
|
||||
- Linux
|
||||
- 当使用 root 权限运行时托盘不生效,可通过 Exit.sh 退出程序
|
||||
- 窗口弹出位置不正确
|
||||
- 窗口顶部会有两个标题栏
|
||||
- 自动更新不可用
|
||||
- Shared
|
||||
- 主题切换需重启软件后生效,且跟随系统暂不可用
|
||||
- Mobile
|
||||
- Android
|
||||
- 确认交易列表刷新后数据显示不正确
|
||||
- 自动更新暂不可用
|
||||
[](https://steampp.net)
|
||||
[]()
|
||||
|
||||
------
|
||||
|
||||
|
||||
## 工具介绍
|
||||
|
||||
`Steam++`是一个包含多种Steam工具功能的工具箱,所有功能完全免费,开源发布于Github,如果您对发布的二进制文件不放心,可以自行下载源码编译运行。
|
||||
`Steam++`是一款开源的跨平台Steam工具箱,所有本地功能完全免费,开源发布于Github,如果您对发布的二进制文件不放心,可以自行下载源码编译运行。
|
||||
此工具的大部分功能都是需要您下载安装Steam才能使用。
|
||||
工具预计将整合进大部分常用的Steam相关工具,并且尽力做到比原工具更好用。
|
||||
软件截图
|
||||
@@ -99,14 +100,18 @@ Steam++是完全开源的,请不要在非官方渠道下载软件,对于软
|
||||
|
||||
可以排序你的共享库存顺序,避免只能读取A的共享游戏,却想玩B的共享游戏。
|
||||
|
||||
### 7. 更多的游戏工具功能
|
||||
### 7.Steam监控下载完成定时关机
|
||||
|
||||
可以监控Steam下载列表所有游戏的下载进度并设置下载完成后自动关机或睡眠电脑,节约你的电费。
|
||||
|
||||
### 8.已内置ASF挂卡功能
|
||||
|
||||
[ASF](https://github.com/JustArchiNET/ArchiSteamFarm)大家肯定都不陌生,它实在是太好用了,所以我们内置了ASF在Steam++内,并在后续会对ASF在UI环境下使用做更多增强体验。
|
||||
|
||||
### 10. 更多的游戏工具功能
|
||||
|
||||
支持各种老游戏无边框窗口化等等
|
||||
|
||||
### 8. 更新计划(画饼时间到)
|
||||
|
||||
我们预计会在6月份将推出ASF挂卡功能。并且同步推出iOS、安卓端App,用户可以利用手机查看多个账号的令牌,一键确认上架,并且支持手机挂卡。
|
||||
|
||||
#### 并且,以上功能全部免费。
|
||||
|
||||
Linux 截图:
|
||||
@@ -138,9 +143,10 @@ ios-arm64 | ❌ |
|
||||
> [官网](https://steampp.net/)
|
||||
> [Github](https://github.com/rmbadmin/SteamTools/releases)
|
||||
> [Gitee](https://gitee.com/rmbgame/SteamTools/releases)
|
||||
> [Microsoft Store](https://www.microsoft.com/store/productId/9MTCFHS560NG)
|
||||
> 分流下载:
|
||||
> [hide]
|
||||
> [蓝奏云](https://cliencer.lanzoux.com/b0165duja)
|
||||
> 提取码:1234
|
||||
> [/hide]
|
||||
> 使用过程中可能遇到windows defender误报,您可以选择添加信任。
|
||||
> 使用过程中可能遇到windows defender误报,您可以选择添加信任。
|
||||
+85
-96
@@ -1,118 +1,107 @@
|
||||
### 新增内容
|
||||
1. CLR 更新至 6.0 RTM
|
||||
2. 新增 捐助功能,在关于中可使用 **爱发电**、**Ko-fi**、**Patreon** 平台捐助
|
||||
3. 新增 ASF 本地挂卡功能 (Beta)
|
||||
4. 新增 本地令牌搜索功能
|
||||
5. 新增 库存游戏右键菜单导航到 Steam 客户端
|
||||
6. 新增 Windows 11 上可设置材质 [云母(Mica)](https://docs.microsoft.com/zh-cn/windows/apps/design/style/mica)
|
||||
7. 新增 搜索框支持拼音搜索
|
||||
8. 新增 框架依赖部署模式(FDE),可通过共享运行库减少磁盘占用空间,仅支持 Windows 与 Linux
|
||||
9. 新增 Windows 上可将动态壁纸设置为程序背景
|
||||
10. 新增 桌面端 背景材质设置,并修复之前AcrylicBlur透明效果异常问题
|
||||
11. 改进 桌面端 UI 适配 Windows 11 风格
|
||||
12. 改进 Hosts 文件在 Windows 上默认使用 UTF8WithBOM 编码
|
||||
13. 改进 账号注销现需要通过手机号或昵称验证
|
||||
14. 改进 令牌账号加密、导出的界面UI和导入过程中的提示
|
||||
15. 改进 Steam 账号切换支持头像框、等级和游戏中信息的显示
|
||||
16. 改进 文本框窗口弹出时将自动设置焦点
|
||||
17. 改进 Windows 上端口占用提示文本显示占用该端口的进程名
|
||||
18. 改进 Linux 上存储数据遵循 [XDG Base Directory Specification](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html)
|
||||
19. 改进 主题切换现在不在需要重启程序,提升主题切换速度
|
||||
20. 改进 本地令牌账号导入过程中的说明提示
|
||||
21. 改进 Windows 上账号切换启动 Steam 时,默认不在以管理员身份启动
|
||||
22. 改进 macOS 上修改 hosts 文件可以不用每次输入密码
|
||||
<!--
|
||||
|
||||
. 改进 Android UI
|
||||
. 改进 Android 冷启动速度
|
||||
. 新增 Android x86 架构包,适用于 Intel、AMD 芯片的设备
|
||||
. 改进 Android 导入令牌成功后回到列表页
|
||||
|
||||
-->
|
||||
### 版本亮点
|
||||
1. 新增 Android x86 架构包,适用于 Intel、AMD 芯片的设备或虚拟机
|
||||
2. ASF 升级至 **V5.2.0.10**
|
||||
3. 新增 ASF 控制台字体大小、最大行数设置项
|
||||
4. 新增 Steam 下载完成定时关机、睡眠功能
|
||||
5. 新增 代理设置可自定义 DNS
|
||||
6. 新增 ASF 编辑/移除 Bot 功能
|
||||
7. 新增 Android ASF 本地挂卡功能 (Beta)
|
||||
8. 新增 Microsoft/Xbox 相关加速服务 (需要升级到 **2.6.3** 之后可用)
|
||||
9. 新增 Uplay 相关加速服务 (需要升级到 **2.6.3** 之后可用)
|
||||
10. 新增 OneDrive 等更多相关加速服务 (需要升级到 **2.6.3** 之后可用)
|
||||
11. 优化 Desktop 加速代理性能
|
||||
12. 优化 Desktop 脚本注入打包的性能
|
||||
13. 优化 Desktop 已安装游戏加载性能
|
||||
14. 从此版本开始将使用 Github Action 自动化部署发布
|
||||
|
||||
### 修复问题
|
||||
1. 修复 本地令牌 中确认交易时 Http 302 重定向错误
|
||||
2. 修复 Linux 与 macOS 上代理错误
|
||||
3. 修复 库存游戏无限加载
|
||||
4. 修复 脚本未启用时保存状态会全部未启用
|
||||
5. 修复 桌面端 上主题运行时切换与跟随系统
|
||||
6. 修复 Windows 上窗口边缘滚动条难以拖拽
|
||||
7. 修复 本地令牌 确认交易登录时会错误的提示没有开启加速
|
||||
8. 修复 本地令牌 确认交易有时会卡在提示登录中的问题
|
||||
9. 修复 Windows 上资源管理器重启后托盘消失,以及尝试修复开机自启时有时不显示托盘
|
||||
10. 修复 桌面端 上导航栏的弹出菜单失去焦点时不会自动隐藏的问题
|
||||
11. 修复 在 2.6.0 中账号切换、挂时长列表、ASF-UI 无效或缺失的问题
|
||||
1. 改进 Desktop 网络加速现默认使用阿里 DNS(223.5.5.5, 223.6.6.6)
|
||||
2. 改进 自动更新包文件校验失败时提示
|
||||
3. 改进 自动更新失败时将自动跳转官网
|
||||
4. 改进 ASF IPC 默认端口号由 1242 改为 6242
|
||||
5. 修复 Linux 与 macOS 中 ASF-UI 解压包文件夹分隔符不正确
|
||||
6. 修复 Windows Hosts 只读时尝试取消只读属性的操作没有正确执行
|
||||
7. 修复 Windows 此软件自动更新删除更新包缓存时因文件占用引发的中断
|
||||
8. 修复 Desktop 高 DPI 下动态桌面错位
|
||||
9. 改进 Android UI
|
||||
10. 改进 Android 冷启动速度
|
||||
11. 改进 Android 导入令牌成功后回到列表页
|
||||
12. 修复 Android 屏幕捕获设置项不生效
|
||||
13. 修复 Android 令牌列表有时不显示值
|
||||
14. 修复 本地令牌确认交易在登录时可能会卡住
|
||||
15. 修复 Windows 启用动态桌面后全屏可能导致窗口冻结无法操作
|
||||
16. 修复 Windows 动态背景有时会被其他窗口遮挡
|
||||
17. 改进 本地令牌 登录验证码无法加载时可点击在浏览器中查看验证码图片
|
||||
18. 修复 Desktop 加速代理中可能出现的一些错误
|
||||
19. 改进 Desktop 令牌详情 UI
|
||||
20. 改进 Desktop 账号切换中的用户名信息现在默认隐藏
|
||||
21. 修复 Android 确认交易 全选/全不选 复选框勾选时逻辑不正确执行
|
||||
22. 改进 Desktop 深色模式与浅色模式的视觉效果
|
||||
23. 修复 Pixiv 加速不能登录的问题
|
||||
24. 修复 Twitch 加速不计算掉宝进度的问题
|
||||
25. 修复 Discord 加速检测更新失败导致无法启动客户端的问题
|
||||
26. 修复 Windows 因添加 JumpList 时可能导致的闪退
|
||||
27. 修复 Desktop 本地令牌 点击锁定后输入密码按回车解锁会循环无限触发锁定的问题
|
||||
|
||||
<!--
|
||||
|
||||
. 修复 Android 上屏幕捕获设置项不生效
|
||||
. 修复 Android 上令牌列表有时不显示值
|
||||
|
||||
-->
|
||||
|
||||
### 已知问题
|
||||
- 除 Windows 之外的平台此软件自动更新尚不可用
|
||||
- Desktop
|
||||
- macOS
|
||||
- 尚未公证,这会影响 macOS Catalina(版本 10.15)以上
|
||||
- 自动更新不可用
|
||||
- [尚未公证](https://support.apple.com/zh-cn/guide/mac-help/mh40616/10.15/mac/10.15),这会影响 macOS Catalina(版本 10.15)以上版本
|
||||
- Linux
|
||||
- 在 Deepin 中托盘不生效,可通过 ```Exit.sh``` 退出程序
|
||||
- **Hosts 代理模式**可能无法配置成功,推荐使用**系统代理模式**
|
||||
- 系统代理模式下discord更新下载加速有问题暂不可用
|
||||
- 窗口弹出位置不正确
|
||||
- 自动更新不可用
|
||||
- 鼠标指针浮动样式不正确
|
||||
- Windows
|
||||
- 在 CPU 不受支持的 Win11 上无法启动,Windows 日志中显示 ```Failed to create CoreCLR, HRESULT: 0x80004005```
|
||||
- Windows 11
|
||||
- 在 CPU 不受支持的 Win11 上无法启动,Windows 日志中显示 ```Failed to create CoreCLR, HRESULT: 0x80004005```
|
||||
- 仅 .NET 6.0 受此影响,在几周后的 Insider 中会修复,见 [issue](https://github.com/dotnet/core/issues/6733)
|
||||
- **解决方案:** 可尝试使用早期版本,例如 v2.3.0
|
||||
- Shared
|
||||
- 拼音搜索不能正确的识别多音字
|
||||
- Mobile
|
||||
- Android
|
||||
- 确认交易列表刷新后数据有时会显示不正确
|
||||
- 自动更新暂不可用
|
||||
- **解决方案:** 可尝试使用旧版本 例如 v2.3.0
|
||||
- Windows 7
|
||||
- 先决条件
|
||||
- 需要安装 Extended Security Update
|
||||
- 在不符合先决条件的情况下运行可能导致
|
||||
- 程序无法正常运行
|
||||
- 运行程序时提示 计算机中丢失 api-ms-win-core-winrt-l1-1-0.dll
|
||||
- **解决方案**
|
||||
- 因 [Windows 7 延长结束日期](https://support.microsoft.com/zh-cn/windows/windows-7-%E6%94%AF%E6%8C%81%E4%BA%8E-2020-%E5%B9%B4-1-%E6%9C%88-14-%E6%97%A5%E7%BB%88%E6%AD%A2-b75d4580-2cc7-895a-2c9c-1466d9a53962)以于 2020 年 1 月 14 日结束支持
|
||||
- 所以必须安装 [Extended Security Update](https://docs.microsoft.com/zh-cn/troubleshoot/windows-client/windows-7-eos-faq/windows-7-extended-security-updates-faq) 支持,在安装第三年的补丁后[结束支持日期](https://docs.microsoft.com/zh-cn/lifecycle/products/windows-7)可延长至 2023 年 1 月 10 日
|
||||
- 可安装 *第三方* 补丁整合包例如 **[UpdatePack7R2](https://cn.bing.com/search?q=UpdatePack7R2)** *或* 购买官方 ESU 产品密钥 解决
|
||||
- 下载 api-ms-win-core-winrt-l1-1-0.dll 文件放入程序根目录(Steam++.exe 所在文件夹)
|
||||
- [从 Github 上直接下载](https://github.com/BeyondDimension/SteamTools/raw/develop/references/runtime.win7-x64.Microsoft.NETCore.Windows.ApiSets/api-ms-win-core-winrt-l1-1-0.dll)
|
||||
- [从 Gitee 上直接下载](https://gitee.com/rmbgame/SteamTools/raw/develop/references/runtime.win7-x64.Microsoft.NETCore.Windows.ApiSets/api-ms-win-core-winrt-l1-1-0.dll)
|
||||
- [从 NuGet 上下载后提取](https://www.nuget.org/api/v2/package/runtime.win7-x64.Microsoft.NETCore.Windows.ApiSets/1.0.1)
|
||||
- .nupkg 文件可使用解压工具打开或解压,找到此文件复制即可
|
||||
|
||||
## [下载指南](./download-guide.md)
|
||||
[](https://steampp.net)
|
||||
[]()
|
||||
|
||||
|
||||
##### [不知道该下载哪个文件?](./download-guide.md)
|
||||
---
|
||||
|
||||
### 文件校验
|
||||
| File | Checksum (SHA256) |
|
||||
| ---- | ---- |
|
||||
| Steam++_win_x64_v2.6.1.7z | SHA256 |
|
||||
| Steam++_win_x64_fde_v2.6.1.7z | SHA256 |
|
||||
| Steam++_win_x64_v2.6.3.7z | SHA256 |
|
||||
| Steam++_win_x64_fde_v2.6.3.7z | SHA256 |
|
||||
| | |
|
||||
| Steam++_win_x64_v2.6.1.exe | SHA256 |
|
||||
| Steam++_win_x64_fde_v2.6.1.exe | SHA256 |
|
||||
| Steam++_win_x64_v2.6.3.exe | SHA256 |
|
||||
| Steam++_win_x64_fde_v2.6.3.exe | SHA256 |
|
||||
| | |
|
||||
| Steam++_linux_x64_v2.6.1.7z | SHA256 |
|
||||
| Steam++_linux_arm64_v2.6.1.7z | SHA256 |
|
||||
| Steam++_linux_arm_v2.6.1.7z | SHA256 |
|
||||
| Steam++_linux_x64_v2.6.3.7z | SHA256 |
|
||||
| Steam++_linux_arm64_v2.6.3.7z | SHA256 |
|
||||
| | |
|
||||
| Steam++_linux_x64_fde_v2.6.1.7z | SHA256 |
|
||||
| Steam++_linux_arm64_fde_v2.6.1.7z | SHA256 |
|
||||
| Steam++_linux_arm_fde_v2.6.1.7z | SHA256 |
|
||||
| Steam++_linux_x64_v2.6.3.deb | SHA256 |
|
||||
| Steam++_linux_arm64_v2.6.3.deb | SHA256 |
|
||||
| | |
|
||||
| Steam++_linux_x64_v2.6.1.deb | SHA256 |
|
||||
| Steam++_linux_arm64_v2.6.1.deb | SHA256 |
|
||||
| Steam++_linux_arm_v2.6.1.deb | SHA256 |
|
||||
| Steam++_linux_x64_v2.6.3.rpm | SHA256 |
|
||||
| Steam++_linux_arm64_v2.6.3.rpm | SHA256 |
|
||||
| | |
|
||||
| Steam++_linux_x64_fde_v2.6.1.deb | SHA256 |
|
||||
| Steam++_linux_arm64_fde_v2.6.1.deb | SHA256 |
|
||||
| Steam++_linux_arm_fde_v2.6.1.deb | SHA256 |
|
||||
| Steam++_macos_x64_v2.6.3.dmg | SHA256 |
|
||||
| | |
|
||||
| Steam++_linux_x64_v2.6.1.rpm | SHA256 |
|
||||
| Steam++_linux_arm64_v2.6.1.rpm | SHA256 |
|
||||
| Steam++_linux_arm_v2.6.1.rpm | SHA256 |
|
||||
| | |
|
||||
| Steam++_linux_x64_fde_v2.6.1.rpm | SHA256 |
|
||||
| Steam++_linux_arm64_fde_v2.6.1.rpm | SHA256 |
|
||||
| Steam++_linux_arm_fde_v2.6.1.rpm | SHA256 |
|
||||
| | |
|
||||
| Steam++_macos_x64_v2.6.1.dmg | SHA256 |
|
||||
| Steam++_macos_arm64_v2.6.1.dmg | SHA256 |
|
||||
| Steam++_macos_x64_v2.6.1.7z | SHA256 |
|
||||
| Steam++_macos_arm64_v2.6.1.7z | SHA256 |
|
||||
| | |
|
||||
| Steam++_android_arm64_v8a_v2.6.1.apk | SHA256 |
|
||||
| Steam++_android_armeabi_v7a_v2.6.1.apk | SHA256 |
|
||||
| Steam++_android_x86_v2.6.1.apk | SHA256 |
|
||||
|
||||
<!-- ***
|
||||
由于程序体积较大,推荐从 [官网 https://steampp.net](https://steampp.net) 中下载 -->
|
||||
| Steam++_android_arm64_v8a_v2.6.3.apk | SHA256 |
|
||||
| Steam++_android_armeabi_v7a_v2.6.3.apk | SHA256 |
|
||||
| Steam++_android_x86_v2.6.3.apk | SHA256 |
|
||||
|
||||
@@ -21,18 +21,35 @@ namespace System
|
||||
public const string release_template_md =
|
||||
@"\release-template.md";
|
||||
|
||||
[Obsolete("use MainDllPath_", true)]
|
||||
public const string MainDllPath =
|
||||
@"\src\" + ProjectDir_AvaloniaApp + @"\bin\Release\Steam++.dll";
|
||||
|
||||
public const string MainDllPath_ =
|
||||
@"\src\" + ProjectDir_AvaloniaApp + @"\bin\{0}\Steam++.dll";
|
||||
|
||||
[Obsolete("use DirPublishWinX86_", true)]
|
||||
public const string DirPublishWinX86 =
|
||||
@"\src\" + ProjectDir_AvaloniaApp + @"\bin\Release\Publish\win-x86";
|
||||
|
||||
public const string DirPublishWinX86_ =
|
||||
@"\src\" + ProjectDir_AvaloniaApp + @"\bin\{0}\Publish\win-x86";
|
||||
|
||||
[Obsolete("use DirPublishWinX64_", true)]
|
||||
public const string DirPublishWinX64 =
|
||||
@"\src\" + ProjectDir_AvaloniaApp + @"\bin\Release\Publish\win-x64";
|
||||
|
||||
[Obsolete("use DirPublishWinX64_FDE_", true)]
|
||||
public const string DirPublishWinX64_FDE =
|
||||
@"\src\" + ProjectDir_AvaloniaApp + @"\bin\Release\Publish\FrameworkDependent\win-x64";
|
||||
|
||||
public const string DirPublishWinX64_ =
|
||||
@"\src\" + ProjectDir_AvaloniaApp + @"\bin\{0}\Publish\win-x64";
|
||||
|
||||
public const string DirPublishWinX64_FDE_ =
|
||||
@"\src\" + ProjectDir_AvaloniaApp + @"\bin\{0}\Publish\FrameworkDependent\win-x64";
|
||||
|
||||
[Obsolete("use DirPublish_", true)]
|
||||
public const string DirPublish =
|
||||
@"\src\" + ProjectDir_AvaloniaApp + @"\bin\Release\Publish";
|
||||
|
||||
@@ -42,8 +59,8 @@ namespace System
|
||||
public const string DirPublish_FDE_ =
|
||||
@"\src\" + ProjectDir_AvaloniaApp + @"\bin\{0}\Publish\FrameworkDependent";
|
||||
|
||||
public const string DirPublish_Win7Troubleshoot =
|
||||
@"\src\" + ProjectDir_Win7Troubleshoot + @"\bin\Release\Publish\net35";
|
||||
//public const string DirPublish_Win7Troubleshoot =
|
||||
// @"\src\" + ProjectDir_Win7Troubleshoot + @"\bin\Release\Publish\net35";
|
||||
|
||||
static ProjectPathUtil()
|
||||
{
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 384 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 168 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 163 KiB |
@@ -0,0 +1,17 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<DelaySign>false</DelaySign>
|
||||
<AssemblyOriginatorKeyFile>$(MSBuildProjectDirectory)\..\..\avalonia.snk</AssemblyOriginatorKeyFile>
|
||||
<!--https://github.com/AvaloniaUI/Avalonia/blob/0.10.10/build/SharedVersion.props#L18-->
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="..\AssemblyInfo.Version.Max.cs">
|
||||
<LinkBase>Properties</LinkBase>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<DelaySign>false</DelaySign>
|
||||
<AssemblyOriginatorKeyFile>$(MSBuildProjectDirectory)\..\..\avalonia.snk</AssemblyOriginatorKeyFile>
|
||||
<!--https://github.com/AvaloniaUI/Avalonia/blob/0.10.10/build/SharedVersion.props#L18-->
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
<RootNamespace>Avalonia.Skia</RootNamespace>
|
||||
<AssemblyName>Avalonia.Skia.UnitTests</AssemblyName>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<DelaySign>false</DelaySign>
|
||||
<AssemblyOriginatorKeyFile>$(MSBuildProjectDirectory)\..\..\avalonia.snk</AssemblyOriginatorKeyFile>
|
||||
<!--https://github.com/AvaloniaUI/Avalonia/blob/0.10.10/build/SharedVersion.props#L18-->
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia.Skia" Aliases="AvaloniaSkia" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,40 @@
|
||||
// Replace font management to implement custom default font
|
||||
extern alias AvaloniaSkia;
|
||||
|
||||
using Avalonia.Media;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using FontManagerImpl = AvaloniaSkia::Avalonia.Skia.FontManagerImpl;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace Avalonia.Platform
|
||||
{
|
||||
public interface IFontManagerImpl2 : IFontManagerImpl
|
||||
{
|
||||
protected IFontManagerImpl Impl { get; }
|
||||
|
||||
string DefaultFontFamilyName { get; }
|
||||
|
||||
Typeface OnCreateGlyphTypeface(Typeface typeface);
|
||||
|
||||
string IFontManagerImpl.GetDefaultFontFamilyName() => DefaultFontFamilyName;
|
||||
|
||||
IEnumerable<string> IFontManagerImpl.GetInstalledFontFamilyNames(bool checkForUpdates)
|
||||
{
|
||||
return Impl.GetInstalledFontFamilyNames(checkForUpdates);
|
||||
}
|
||||
|
||||
bool IFontManagerImpl.TryMatchCharacter(int codepoint, FontStyle fontStyle, FontWeight fontWeight, FontFamily fontFamily, CultureInfo culture, out Typeface typeface)
|
||||
{
|
||||
return Impl.TryMatchCharacter(codepoint, fontStyle, fontWeight, fontFamily, culture, out typeface);
|
||||
}
|
||||
|
||||
IGlyphTypefaceImpl IFontManagerImpl.CreateGlyphTypeface(Typeface typeface)
|
||||
{
|
||||
typeface = OnCreateGlyphTypeface(typeface);
|
||||
return Impl.CreateGlyphTypeface(typeface);
|
||||
}
|
||||
|
||||
protected static IFontManagerImpl CreateFontManager() => new FontManagerImpl();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
extern alias AvaloniaSkia;
|
||||
|
||||
using Avalonia.Media;
|
||||
using SkiaSharp;
|
||||
using @this = AvaloniaSkia::Avalonia.Skia.SKTypefaceCollection;
|
||||
|
||||
namespace Avalonia.Skia
|
||||
{
|
||||
public sealed class SKTypefaceCollection
|
||||
{
|
||||
readonly @this @this;
|
||||
internal SKTypefaceCollection(@this @this)
|
||||
{
|
||||
this.@this = @this;
|
||||
}
|
||||
|
||||
public void AddTypeface(Typeface key, SKTypeface typeface)
|
||||
{
|
||||
@this.AddTypeface(key, typeface);
|
||||
}
|
||||
|
||||
public SKTypeface Get(Typeface typeface)
|
||||
{
|
||||
return @this.Get(typeface);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
extern alias AvaloniaSkia;
|
||||
|
||||
using Avalonia.Media;
|
||||
using @this = AvaloniaSkia::Avalonia.Skia.SKTypefaceCollectionCache;
|
||||
|
||||
namespace Avalonia.Skia
|
||||
{
|
||||
public class SKTypefaceCollectionCache
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the or add typeface collection.
|
||||
/// </summary>
|
||||
/// <param name="fontFamily">The font family.</param>
|
||||
/// <returns></returns>
|
||||
public static SKTypefaceCollection GetOrAddTypefaceCollection(FontFamily fontFamily)
|
||||
{
|
||||
return new(@this.GetOrAddTypefaceCollection(fontFamily));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<DelaySign>false</DelaySign>
|
||||
<AssemblyOriginatorKeyFile>$(MSBuildProjectDirectory)\..\..\avalonia.snk</AssemblyOriginatorKeyFile>
|
||||
<!--https://github.com/AvaloniaUI/Avalonia/blob/0.10.10/build/SharedVersion.props#L18-->
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<DelaySign>false</DelaySign>
|
||||
<AssemblyOriginatorKeyFile>$(MSBuildProjectDirectory)\..\..\avalonia.snk</AssemblyOriginatorKeyFile>
|
||||
<!--https://github.com/AvaloniaUI/Avalonia/blob/0.10.10/build/SharedVersion.props#L18-->
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<DelaySign>false</DelaySign>
|
||||
<AssemblyOriginatorKeyFile>$(MSBuildProjectDirectory)\..\..\avalonia.snk</AssemblyOriginatorKeyFile>
|
||||
<!--https://github.com/AvaloniaUI/Avalonia/blob/0.10.10/build/SharedVersion.props#L18-->
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<DelaySign>false</DelaySign>
|
||||
<AssemblyOriginatorKeyFile>$(MSBuildProjectDirectory)\..\..\avalonia.snk</AssemblyOriginatorKeyFile>
|
||||
<!--https://github.com/AvaloniaUI/Avalonia/blob/0.10.10/build/SharedVersion.props#L18-->
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="ExitCode_IsVirtualApk" xml:space="preserve">
|
||||
<value>Esta aplicación no admite varias aperturas</value>
|
||||
<value>Esta aplicación no es compatible con multi-open</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="ExitCode_IsXposedExists" xml:space="preserve">
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="ExitCode_IsVirtualApk" xml:space="preserve">
|
||||
<value>Questa app non supporta più apertura</value>
|
||||
<value>Questa app non supporta il multi-open</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="ExitCode_IsXposedExists" xml:space="preserve">
|
||||
|
||||
@@ -122,15 +122,15 @@
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="ExitCode_IsRoot" xml:space="preserve">
|
||||
<value>このアプリは、ROOT権限を持つデバイスでの実行をサポートしていません</value>
|
||||
<value>このアプリは、ROOT 権限を持つデバイスでの実行をサポートしていません</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="ExitCode_IsVirtualApk" xml:space="preserve">
|
||||
<value>このアプリはマルチオープンをサポートしていません</value>
|
||||
<value>このアプリは、マルチオープンをサポートしていません</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="ExitCode_IsXposedExists" xml:space="preserve">
|
||||
<value>このアプリは、Xposed フレームワークがインストールされているデバイスでの実行をサポートしていません</value>
|
||||
<value>このアプリは、Xposed フレームワークを搭載したデバイスでの実行をサポートしていません</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -122,15 +122,15 @@
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="ExitCode_IsRoot" xml:space="preserve">
|
||||
<value>이 앱은 ROOT 권한이 있는 장치에서 실행할 수 없습니다</value>
|
||||
<value>이 앱은 ROOT 권한이 있는 장치에서 실행을 지원하지 않습니다</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="ExitCode_IsVirtualApk" xml:space="preserve">
|
||||
<value>이 앱은 다중 켜기를 지원하지 않습니다</value>
|
||||
<value>이 응용 프로그램은 멀티 오픈을 지원하지 않습니다</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="ExitCode_IsXposedExists" xml:space="preserve">
|
||||
<value>이 앱은 Xposed 프레임워크가 설치된 장치에서 실행할 수 없습니다</value>
|
||||
<value>이 앱은 Xposed 프레임워크가 설치된 장치에서 실행을 지원하지 않습니다</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -126,11 +126,11 @@
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="ExitCode_IsVirtualApk" xml:space="preserve">
|
||||
<value>Это приложение не поддерживает несколько открытых</value>
|
||||
<value>Это приложение не поддерживает многооткрытие</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="ExitCode_IsXposedExists" xml:space="preserve">
|
||||
<value>Это приложение не поддерживает работу на устройствах с платформой Xposed</value>
|
||||
<value>Это приложение не поддерживает работу на устройствах, оснащенных платформой Xposed</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="ExitCode_IsXposedExists" xml:space="preserve">
|
||||
<value>此應用不支援在裝有Xposed框架的設備中運行</value>
|
||||
<value>此應用不支持在裝有Xposed框架的設備中運行</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -134,7 +134,7 @@ namespace System.Application.UI.Adapters
|
||||
|
||||
public sealed override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
|
||||
{
|
||||
var viewType2 = viewType.ConvertToEnum<TViewType>();
|
||||
var viewType2 = ConvertibleHelper.Convert<TViewType, int>(viewType);
|
||||
var holder = OnCreateViewHolder(viewType2, parent);
|
||||
SetItemClicks(holder);
|
||||
return holder;
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace System.Application.UI.Adapters
|
||||
/// <inheritdoc cref="BaseViewHolder"/>
|
||||
public abstract class BaseViewHolder<TViewType> : BaseViewHolder,
|
||||
IReadOnlyItemViewType<TViewType>
|
||||
where TViewType : struct, IConvertible
|
||||
where TViewType : Enum
|
||||
{
|
||||
public BaseViewHolder(View itemView) : base(itemView)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Android.Runtime;
|
||||
using Android.Runtime;
|
||||
using Java.Security.Cert;
|
||||
using System.IO;
|
||||
using Xamarin.Android.Net;
|
||||
@@ -14,7 +14,7 @@ namespace System
|
||||
/// <param name="handler"></param>
|
||||
/// <param name="certificateFileData">证书文件数据(文件流,内嵌资源流)</param>
|
||||
/// <param name="certificateFileType">证书文件类型,默认使用X.509</param>
|
||||
public static void AddTrustedCerts(
|
||||
public static void AddTrustedCert(
|
||||
this AndroidClientHandler handler,
|
||||
Stream certificateFileData,
|
||||
string certificateFileType = "X.509")
|
||||
|
||||
@@ -11,14 +11,6 @@ namespace Microsoft.Extensions.DependencyInjection
|
||||
{
|
||||
public static partial class ServiceCollectionExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// 尝试添加适用于安卓平台的Toast
|
||||
/// </summary>
|
||||
/// <param name="services"></param>
|
||||
/// <returns></returns>
|
||||
public static IServiceCollection TryAddAndroidToast(this IServiceCollection services)
|
||||
=> PlatformToastImpl.TryAddToast(services);
|
||||
|
||||
/// <summary>
|
||||
/// 添加调试模式显示
|
||||
/// </summary>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma warning disable CS8618 // 在退出构造函数时,不可为 null 的字段必须包含非 null 值。请考虑声明为可以为 null。
|
||||
#pragma warning disable CS8618 // 在退出构造函数时,不可为 null 的字段必须包含非 null 值。请考虑声明为可以为 null。
|
||||
using SQLite;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
@@ -1,112 +1,73 @@
|
||||
using System.ComponentModel;
|
||||
using System.Threading.Tasks;
|
||||
using Xamarin.Essentials;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace System.Application
|
||||
{
|
||||
/// <inheritdoc cref="Browser"/>
|
||||
public static partial class Browser2
|
||||
{
|
||||
public static event Action<Win32Exception>? OnError;
|
||||
public static event Action<Exception>? OnError;
|
||||
|
||||
public static bool HttpsOnly { get; set; }
|
||||
|
||||
static sbyte OpenCore(string? url)
|
||||
{
|
||||
if (IsStoreUrl(url))
|
||||
{
|
||||
return OpenCoreByProcess(url);
|
||||
}
|
||||
else if (IsHttpUrl(url, HttpsOnly))
|
||||
{
|
||||
if (DeviceInfo.Platform == DevicePlatform.Unknown)
|
||||
{
|
||||
return OpenCoreByProcess(url);
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return -2;
|
||||
|
||||
static sbyte OpenCoreByProcess(string url)
|
||||
{
|
||||
try
|
||||
{
|
||||
Process2.Start(url, useShellExecute: true);
|
||||
return 1;
|
||||
}
|
||||
catch (Win32Exception e)
|
||||
{
|
||||
// [Win32Exception: 找不到应用程序] 39次报告
|
||||
// 疑似缺失没有默认浏览器设置会导致此异常,可能与杀毒软件有关
|
||||
if (OnError == null)
|
||||
{
|
||||
try
|
||||
{
|
||||
Toast.Show(e.GetAllMessage());
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
OnError(e);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 兼容 Linux/macOS/.Net Core/Android/iOS 的打开链接方法
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <returns></returns>
|
||||
public static Task OpenAsync(string? url) => OpenCore(url) switch
|
||||
public static Task<bool> OpenAsync(string? url) => OpenAnalysis(url) switch
|
||||
{
|
||||
0 => Browser.OpenAsync(url),
|
||||
_ => Task.CompletedTask,
|
||||
OpenResultCode.HttpUrl => OpenCoreAsync(url),
|
||||
OpenResultCode.StartedByProcess2 => Task.FromResult(true),
|
||||
_ => Task.FromResult(false),
|
||||
};
|
||||
|
||||
/// <inheritdoc cref="OpenAsync(string?)"/>
|
||||
public static async void Open(string? url) => await OpenAsync(url);
|
||||
|
||||
/// <inheritdoc cref="OpenAsync(string?)"/>
|
||||
public static Task OpenAsync(string? url, BrowserLaunchMode launchMode) => OpenCore(url) switch
|
||||
public static bool Open(string? url) => OpenAnalysis(url) switch
|
||||
{
|
||||
0 => Browser.OpenAsync(url, launchMode),
|
||||
_ => Task.CompletedTask,
|
||||
OpenResultCode.HttpUrl => OpenCore(url),
|
||||
OpenResultCode.StartedByProcess2 => true,
|
||||
_ => false,
|
||||
};
|
||||
|
||||
/// <inheritdoc cref="OpenAsync(string?)"/>
|
||||
public static Task OpenAsync(string? url, BrowserLaunchOptions options) => OpenCore(url) switch
|
||||
public static Task<bool> OpenAsync(string? url, BrowserLaunchMode launchMode) => OpenAnalysis(url) switch
|
||||
{
|
||||
0 => Browser.OpenAsync(url, options),
|
||||
_ => Task.CompletedTask,
|
||||
OpenResultCode.HttpUrl => OpenCoreAsync(url, launchMode),
|
||||
OpenResultCode.StartedByProcess2 => Task.FromResult(true),
|
||||
_ => Task.FromResult(false),
|
||||
};
|
||||
|
||||
/// <inheritdoc cref="OpenAsync(string?)"/>
|
||||
public static Task OpenAsync(Uri uri) => OpenCore(uri.ToString()) switch
|
||||
public static Task<bool> OpenAsync(string? url, BrowserLaunchOptions options) => OpenAnalysis(url) switch
|
||||
{
|
||||
0 => Browser.OpenAsync(uri),
|
||||
_ => Task.CompletedTask,
|
||||
OpenResultCode.HttpUrl => OpenCoreAsync(url, options),
|
||||
OpenResultCode.StartedByProcess2 => Task.FromResult(true),
|
||||
_ => Task.FromResult(false),
|
||||
};
|
||||
|
||||
/// <inheritdoc cref="OpenAsync(string?)"/>
|
||||
public static Task OpenAsync(Uri uri, BrowserLaunchMode launchMode) => OpenCore(uri.ToString()) switch
|
||||
public static Task<bool> OpenAsync(Uri uri) => OpenAnalysis(uri.ToString()) switch
|
||||
{
|
||||
0 => Browser.OpenAsync(uri, launchMode),
|
||||
_ => Task.CompletedTask,
|
||||
OpenResultCode.HttpUrl => OpenCoreAsync(uri),
|
||||
OpenResultCode.StartedByProcess2 => Task.FromResult(true),
|
||||
_ => Task.FromResult(false),
|
||||
};
|
||||
|
||||
/// <inheritdoc cref="OpenAsync(string?)"/>
|
||||
public static Task<bool> OpenAsync(Uri uri, BrowserLaunchOptions options) => OpenCore(uri.ToString()) switch
|
||||
public static Task<bool> OpenAsync(Uri uri, BrowserLaunchMode launchMode) => OpenAnalysis(uri.ToString()) switch
|
||||
{
|
||||
0 => Browser.OpenAsync(uri, options),
|
||||
1 => Task.FromResult(true),
|
||||
OpenResultCode.HttpUrl => OpenCoreAsync(uri, launchMode),
|
||||
OpenResultCode.StartedByProcess2 => Task.FromResult(true),
|
||||
_ => Task.FromResult(false),
|
||||
};
|
||||
|
||||
/// <inheritdoc cref="OpenAsync(string?)"/>
|
||||
public static Task<bool> OpenAsync(Uri uri, BrowserLaunchOptions options) => OpenAnalysis(uri.ToString()) switch
|
||||
{
|
||||
OpenResultCode.HttpUrl => OpenCoreAsync(uri, options),
|
||||
OpenResultCode.StartedByProcess2 => Task.FromResult(true),
|
||||
_ => Task.FromResult(false),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Diagnostics.CodeAnalysis;
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace System.Application
|
||||
{
|
||||
public partial class Browser2
|
||||
partial class Browser2
|
||||
{
|
||||
public const string Prefix_HTTPS = "https://";
|
||||
|
||||
|
||||
@@ -0,0 +1,178 @@
|
||||
using System.ComponentModel;
|
||||
using System.Threading.Tasks;
|
||||
using Xamarin.Essentials;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace System.Application
|
||||
{
|
||||
partial class Browser2
|
||||
{
|
||||
enum OpenResultCode : sbyte
|
||||
{
|
||||
/// <summary>
|
||||
/// 值为 Http URL
|
||||
/// </summary>
|
||||
HttpUrl = 0,
|
||||
|
||||
/// <summary>
|
||||
/// 已由 Process2 启动
|
||||
/// </summary>
|
||||
StartedByProcess2 = 1,
|
||||
|
||||
/// <summary>
|
||||
/// 出现异常,已由 <see cref="OnError"/> 或 <see cref="Toast"/> 处理
|
||||
/// </summary>
|
||||
Exception = -1,
|
||||
|
||||
/// <summary>
|
||||
/// 值格式不正确或未知
|
||||
/// </summary>
|
||||
Unknown = -2,
|
||||
}
|
||||
|
||||
static void HandlerException(Exception e)
|
||||
{
|
||||
if (OnError == null)
|
||||
{
|
||||
try
|
||||
{
|
||||
Toast.Show(e, nameof(Browser2));
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
OnError(e);
|
||||
}
|
||||
}
|
||||
|
||||
static OpenResultCode OpenAnalysis(string? url)
|
||||
{
|
||||
if (IsStoreUrl(url))
|
||||
{
|
||||
return OpenCoreByProcess(url);
|
||||
}
|
||||
else if (IsHttpUrl(url, HttpsOnly))
|
||||
{
|
||||
if (DeviceInfo.Platform == DevicePlatform.Unknown)
|
||||
{
|
||||
return OpenCoreByProcess(url);
|
||||
}
|
||||
else
|
||||
{
|
||||
return OpenResultCode.HttpUrl;
|
||||
}
|
||||
}
|
||||
return OpenResultCode.Unknown;
|
||||
|
||||
static OpenResultCode OpenCoreByProcess(string url)
|
||||
{
|
||||
try
|
||||
{
|
||||
Process2.Start(url, useShellExecute: true);
|
||||
return OpenResultCode.StartedByProcess2;
|
||||
}
|
||||
catch (Win32Exception e)
|
||||
{
|
||||
// [Win32Exception: 找不到应用程序] 39次报告
|
||||
// 疑似缺失没有默认浏览器设置会导致此异常,可能与杀毒软件有关
|
||||
HandlerException(e);
|
||||
return OpenResultCode.Exception;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static async Task<bool> OpenCoreAsync(Uri uri, BrowserLaunchMode launchMode)
|
||||
{
|
||||
try
|
||||
{
|
||||
await Browser.OpenAsync(uri, launchMode);
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
HandlerException(e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static async Task<bool> OpenCoreAsync(string? uri, BrowserLaunchMode launchMode)
|
||||
{
|
||||
try
|
||||
{
|
||||
await Browser.OpenAsync(uri, launchMode);
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
HandlerException(e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static async Task<bool> OpenCoreAsync(Uri uri, BrowserLaunchOptions options)
|
||||
{
|
||||
try
|
||||
{
|
||||
return await Browser.OpenAsync(uri, options);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
HandlerException(e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static async Task<bool> OpenCoreAsync(string? uri, BrowserLaunchOptions options)
|
||||
{
|
||||
try
|
||||
{
|
||||
await Browser.OpenAsync(uri, options);
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
HandlerException(e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static async Task<bool> OpenCoreAsync(Uri uri)
|
||||
{
|
||||
try
|
||||
{
|
||||
await Browser.OpenAsync(uri);
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
HandlerException(e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static async Task<bool> OpenCoreAsync(string? uri)
|
||||
{
|
||||
try
|
||||
{
|
||||
await Browser.OpenAsync(uri);
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
HandlerException(e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static bool OpenCore(string? uri)
|
||||
{
|
||||
OpenCoreSync(uri);
|
||||
return true;
|
||||
|
||||
static async void OpenCoreSync(string? uri) => await OpenCoreAsync(uri);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,12 +6,13 @@ using System.Application.Services;
|
||||
namespace System.Application
|
||||
{
|
||||
/// <summary>
|
||||
/// 剪贴板,参考 Xamarin.Essentials.Clipboard
|
||||
/// 剪贴板,参考 Xamarin.Essentials.Clipboard。
|
||||
/// <para><see cref="https://docs.microsoft.com/zh-cn/xamarin/essentials/clipboard"/></para>
|
||||
/// <para><see cref="https://github.com/xamarin/Essentials/blob/main/Xamarin.Essentials/Clipboard/Clipboard.shared.cs"/></para>
|
||||
/// </summary>
|
||||
public static class Clipboard2
|
||||
{
|
||||
/// <inheritdoc cref="Clipboard.SetTextAsync(string)"/>
|
||||
public static async Task SetTextAsync(string? text)
|
||||
{
|
||||
if (Essentials.IsSupported)
|
||||
@@ -24,8 +25,10 @@ namespace System.Application
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Clipboard.SetTextAsync(string)"/>
|
||||
public static async void SetText(string? text) => await SetTextAsync(text);
|
||||
|
||||
/// <inheritdoc cref="Clipboard.GetTextAsync"/>
|
||||
public static async Task<string> GetTextAsync()
|
||||
{
|
||||
if (Essentials.IsSupported)
|
||||
@@ -38,6 +41,7 @@ namespace System.Application
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Clipboard.HasText"/>
|
||||
public static bool HasText
|
||||
{
|
||||
get
|
||||
|
||||
@@ -5,6 +5,7 @@ using XEDeviceIdiom = Xamarin.Essentials.DeviceIdiom;
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace System.Application
|
||||
{
|
||||
/// <inheritdoc cref="DeviceInfo"/>
|
||||
public static class DeviceInfo2
|
||||
{
|
||||
static readonly Lazy<IDeviceInfoPlatformService?> @interface = new(DI.Get_Nullable<IDeviceInfoPlatformService>);
|
||||
|
||||
@@ -8,18 +8,34 @@ using Xamarin.Essentials;
|
||||
namespace System.Application
|
||||
{
|
||||
/// <summary>
|
||||
/// 电子邮件,参考 Xamarin.Essentials.Email
|
||||
/// 电子邮件,参考 Xamarin.Essentials.Email。
|
||||
/// <para><see cref="https://docs.microsoft.com/zh-cn/xamarin/essentials/email"/></para>
|
||||
/// <para><see cref="https://github.com/xamarin/Essentials/blob/main/Xamarin.Essentials/Email/Email.shared.cs"/></para>
|
||||
/// </summary>
|
||||
public static class Email2
|
||||
{
|
||||
/// <summary>
|
||||
/// 打开默认电子邮件客户端以允许用户发送邮件。
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static Task ComposeAsync()
|
||||
=> ComposeAsync(null);
|
||||
|
||||
/// <summary>
|
||||
/// 打开默认的电子邮件客户端,允许用户发送带有所提供主题、正文和收件人的邮件。
|
||||
/// </summary>
|
||||
/// <param name="subject">电子邮件主题。</param>
|
||||
/// <param name="body">电子邮件正文。</param>
|
||||
/// <param name="to">电子邮件收件人。</param>
|
||||
/// <returns></returns>
|
||||
public static Task ComposeAsync(string subject, string body, params string[] to)
|
||||
=> ComposeAsync(new EmailMessage(subject, body, to));
|
||||
|
||||
/// <summary>
|
||||
/// 打开默认电子邮件客户端以允许用户发送邮件。
|
||||
/// </summary>
|
||||
/// <param name="message">电子邮件。</param>
|
||||
/// <returns></returns>
|
||||
public static async Task ComposeAsync(EmailMessage? message)
|
||||
{
|
||||
if (Essentials.IsSupported)
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
using Xamarin.Essentials;
|
||||
using BaseFilePickerFileType = Xamarin.Essentials.FilePickerFileType;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace System.Application
|
||||
{
|
||||
partial class FilePicker2
|
||||
{
|
||||
public class SaveOptions : PickOptions
|
||||
{
|
||||
public string? InitialFileName { get; set; }
|
||||
}
|
||||
|
||||
public class FilePickerFileType : BaseFilePickerFileType
|
||||
{
|
||||
sealed class FixedFilePickerFileType : FilePickerFileType
|
||||
{
|
||||
readonly IEnumerable<string> fileTypes;
|
||||
|
||||
public FixedFilePickerFileType(IEnumerable<string> fileTypes)
|
||||
{
|
||||
this.fileTypes = fileTypes;
|
||||
}
|
||||
|
||||
protected override IEnumerable<string> GetPlatformFileType(DevicePlatform _) => fileTypes;
|
||||
}
|
||||
|
||||
[return: NotNullIfNotNull("values")]
|
||||
public static FilePickerFileType? Parse(IEnumerable<string>? values) => values == null ? null : new FixedFilePickerFileType(values);
|
||||
|
||||
[return: NotNullIfNotNull("values")]
|
||||
public static implicit operator FilePickerFileType?(HashSet<string>? values) => Parse(values);
|
||||
|
||||
[return: NotNullIfNotNull("values")]
|
||||
public static implicit operator FilePickerFileType?(string[]? values) => Parse(values);
|
||||
|
||||
[return: NotNullIfNotNull("values")]
|
||||
public static implicit operator FilePickerFileType?(Collection<string>? values) => Parse(values);
|
||||
|
||||
[return: NotNullIfNotNull("values")]
|
||||
public static implicit operator FilePickerFileType?(List<string>? values) => Parse(values);
|
||||
|
||||
sealed class PlatformFilePickerFileType<TValue> : FilePickerFileType where TValue : IEnumerable<string>
|
||||
{
|
||||
readonly IEnumerable<KeyValuePair<Platform, TValue?>> fileTypes;
|
||||
|
||||
public PlatformFilePickerFileType(IEnumerable<KeyValuePair<Platform, TValue?>> fileTypes)
|
||||
{
|
||||
this.fileTypes = fileTypes;
|
||||
}
|
||||
|
||||
protected override IEnumerable<string>? GetPlatformFileType(DevicePlatform _)
|
||||
{
|
||||
var platform = DeviceInfo2.Platform;
|
||||
foreach (var fileType in fileTypes)
|
||||
{
|
||||
if (fileType.Key.HasFlag(platform))
|
||||
return fileType.Value;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
[return: NotNullIfNotNull("values")]
|
||||
public static FilePickerFileType? Parse<TValue>(IEnumerable<KeyValuePair<Platform, TValue?>> values) where TValue : IEnumerable<string> => values == null ? null : new PlatformFilePickerFileType<TValue>(values);
|
||||
|
||||
[return: NotNullIfNotNull("values")]
|
||||
public static implicit operator FilePickerFileType?(Dictionary<Platform, IEnumerable<string>?> values) => Parse(values);
|
||||
|
||||
[return: NotNullIfNotNull("values")]
|
||||
public static implicit operator FilePickerFileType?(Dictionary<Platform, string[]?> values) => Parse(values);
|
||||
|
||||
[return: NotNullIfNotNull("values")]
|
||||
public static implicit operator FilePickerFileType?(Dictionary<Platform, List<string>?> values) => Parse(values);
|
||||
|
||||
[return: NotNullIfNotNull("values")]
|
||||
public static implicit operator FilePickerFileType?(Dictionary<Platform, HashSet<string>?> values) => Parse(values);
|
||||
|
||||
[return: NotNullIfNotNull("values")]
|
||||
public static implicit operator FilePickerFileType?(Dictionary<Platform, Collection<string>?> values) => Parse(values);
|
||||
|
||||
public interface IFilePickerFileTypeWithName
|
||||
{
|
||||
IEnumerable<(string, IEnumerable<string>)> GetFileTypes();
|
||||
}
|
||||
|
||||
sealed class FixedFilePickerFileType<TValue> : FilePickerFileType, IFilePickerFileTypeWithName where TValue : IEnumerable<string>
|
||||
{
|
||||
readonly IEnumerable<(string name, TValue extensions)> fileTypes;
|
||||
|
||||
public FixedFilePickerFileType(IEnumerable<(string name, TValue extensions)> fileTypes)
|
||||
{
|
||||
this.fileTypes = fileTypes;
|
||||
}
|
||||
|
||||
protected override IEnumerable<string> GetPlatformFileType(DevicePlatform _) => fileTypes.SelectMany(x => x.extensions);
|
||||
|
||||
IEnumerable<(string, IEnumerable<string>)> IFilePickerFileTypeWithName.GetFileTypes()
|
||||
{
|
||||
foreach (var item in fileTypes)
|
||||
{
|
||||
yield return item;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[return: NotNullIfNotNull("values")]
|
||||
public static FilePickerFileType? Parse<TValue>(IEnumerable<(string name, TValue extensions)> values) where TValue : IEnumerable<string> => values == null ? null : new FixedFilePickerFileType<TValue>(values);
|
||||
|
||||
[return: NotNullIfNotNull("values")]
|
||||
public static implicit operator FilePickerFileType?((string name, IEnumerable<string> extensions)[] values) => Parse(values);
|
||||
|
||||
[return: NotNullIfNotNull("values")]
|
||||
public static implicit operator FilePickerFileType?((string name, List<string> extensions)[] values) => Parse(values);
|
||||
|
||||
[return: NotNullIfNotNull("values")]
|
||||
public static implicit operator FilePickerFileType?((string name, string[] extensions)[] values) => Parse(values);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Xamarin.Essentials;
|
||||
@@ -9,33 +10,12 @@ using _ThisAssembly = System.Properties.ThisAssembly;
|
||||
namespace System.Application
|
||||
{
|
||||
/// <summary>
|
||||
/// 文件选取器,参考 Xamarin.Essentials.FilePicker
|
||||
/// 文件选取器,参考 Xamarin.Essentials.FilePicker。
|
||||
/// <para><see cref="https://docs.microsoft.com/zh-cn/xamarin/essentials/file-picker"/></para>
|
||||
/// <para><see cref="https://github.com/xamarin/Essentials/blob/main/Xamarin.Essentials/FilePicker/FilePicker.shared.cs"/></para>
|
||||
/// </summary>
|
||||
public static class FilePicker2
|
||||
public static partial class FilePicker2
|
||||
{
|
||||
static readonly Lazy<bool> mIsSupportedFileExtensionFilter = new(() =>
|
||||
{
|
||||
if (Essentials.IsSupported)
|
||||
{
|
||||
return OperatingSystem2.IsWindows;
|
||||
}
|
||||
else
|
||||
{
|
||||
var s = IOpenFileDialogService.Instance;
|
||||
if (s != null)
|
||||
{
|
||||
return s.IsSupportedFileExtensionFilter;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
/// <summary>
|
||||
/// 是否支持文件扩展名过滤
|
||||
/// </summary>
|
||||
public static bool IsSupportedFileExtensionFilter => mIsSupportedFileExtensionFilter.Value;
|
||||
|
||||
static readonly Lazy<bool> mIsSupportedSaveFileDialog = new(() =>
|
||||
{
|
||||
var s = ISaveFileDialogService.Instance;
|
||||
@@ -43,27 +23,47 @@ namespace System.Application
|
||||
});
|
||||
|
||||
/// <summary>
|
||||
/// 是否支持保存文件对话框
|
||||
/// 是否支持保存文件对话框。
|
||||
/// </summary>
|
||||
public static bool IsSupportedSaveFileDialog => mIsSupportedSaveFileDialog.Value;
|
||||
|
||||
/// <summary>
|
||||
/// 启动文件选择器以选择单个文件。
|
||||
/// </summary>
|
||||
/// <param name="options">要使用的文件选择器选项,可能为空。</param>
|
||||
/// <returns>文件拾取结果对象,或当用户取消拾取时为空。</returns>
|
||||
/// <exception cref="PlatformNotSupportedException"></exception>
|
||||
public static async Task<FileResult?> PickAsync(PickOptions? options = null)
|
||||
{
|
||||
if (Essentials.IsSupported)
|
||||
try
|
||||
{
|
||||
return await FilePicker.PickAsync(options);
|
||||
}
|
||||
else
|
||||
{
|
||||
var s = IOpenFileDialogService.Instance;
|
||||
if (s != null)
|
||||
if (Essentials.IsSupported)
|
||||
{
|
||||
return (await s.PlatformPickAsync(options))?.FirstOrDefault();
|
||||
return await FilePicker.PickAsync(options);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
else
|
||||
{
|
||||
var s = IOpenFileDialogService.Instance;
|
||||
if (s != null)
|
||||
{
|
||||
return (await s.PlatformPickAsync(options))?.FirstOrDefault();
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 启动文件选择器以选择单个文件。
|
||||
/// </summary>
|
||||
/// <param name="action"></param>
|
||||
/// <param name="fileTypes"></param>
|
||||
/// <param name="title"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task PickAsync(Action<string> action, FilePickerFileType? fileTypes = null, string? title = _ThisAssembly.AssemblyTrademark)
|
||||
{
|
||||
try
|
||||
@@ -86,13 +86,13 @@ namespace System.Application
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Toast.Show(e.Message);
|
||||
Toast.Show(e, nameof(FilePicker2));
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (PermissionException e)
|
||||
{
|
||||
Toast.Show(e.Message);
|
||||
Toast.Show(e.Message); // Xamarin.Essentials.PermissionException
|
||||
}
|
||||
catch
|
||||
{
|
||||
@@ -100,6 +100,13 @@ namespace System.Application
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 启动文件选择器以选择单个文件。
|
||||
/// </summary>
|
||||
/// <param name="func"></param>
|
||||
/// <param name="fileTypes"></param>
|
||||
/// <param name="title"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task PickAsync(Func<string, Task> func, FilePickerFileType? fileTypes = null, string? title = _ThisAssembly.AssemblyTrademark)
|
||||
{
|
||||
try
|
||||
@@ -122,13 +129,13 @@ namespace System.Application
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Toast.Show(e.Message);
|
||||
Toast.Show(e, nameof(FilePicker2));
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (PermissionException e)
|
||||
{
|
||||
Toast.Show(e.Message);
|
||||
Toast.Show(e.Message); // Xamarin.Essentials.PermissionException
|
||||
}
|
||||
catch
|
||||
{
|
||||
@@ -136,24 +143,44 @@ namespace System.Application
|
||||
}
|
||||
}
|
||||
|
||||
public static async Task<IEnumerable<FileResult>> PickMultipleAsync(PickOptions? options = null)
|
||||
/// <summary>
|
||||
/// 启动文件选择器以选择多个文件。
|
||||
/// </summary>
|
||||
/// <param name="options">要使用的文件选择器选项,可能为空。</param>
|
||||
/// <returns>文件拾取结果对象,或当用户取消拾取时为空。</returns>
|
||||
/// <exception cref="PlatformNotSupportedException"></exception>
|
||||
public static async Task<IEnumerable<FileResult>?> PickMultipleAsync(PickOptions? options = null)
|
||||
{
|
||||
if (Essentials.IsSupported)
|
||||
try
|
||||
{
|
||||
return await FilePicker.PickMultipleAsync(options);
|
||||
}
|
||||
else
|
||||
{
|
||||
var s = IOpenFileDialogService.Instance;
|
||||
if (s != null)
|
||||
if (Essentials.IsSupported)
|
||||
{
|
||||
return await s.PlatformPickAsync(options ?? PickOptions.Default, true);
|
||||
return await FilePicker.PickMultipleAsync(options);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
else
|
||||
{
|
||||
var s = IOpenFileDialogService.Instance;
|
||||
if (s != null)
|
||||
{
|
||||
return await s.PlatformPickAsync(options ?? PickOptions.Default, true);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static async Task PickMultipleAsync(Action<IEnumerable<string>> action, FilePickerFileType? fileTypes = null, string? title = _ThisAssembly.AssemblyTrademark)
|
||||
/// <summary>
|
||||
/// 启动文件选择器以选择多个文件。
|
||||
/// </summary>
|
||||
/// <param name="action"></param>
|
||||
/// <param name="fileTypes"></param>
|
||||
/// <param name="title"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task PickMultipleAsync(Action<IEnumerable<string>?> action, FilePickerFileType? fileTypes = null, string? title = _ThisAssembly.AssemblyTrademark)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -175,13 +202,13 @@ namespace System.Application
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Toast.Show(e.Message);
|
||||
Toast.Show(e, nameof(FilePicker2));
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (PermissionException e)
|
||||
{
|
||||
Toast.Show(e.Message);
|
||||
Toast.Show(e.Message); // Xamarin.Essentials.PermissionException
|
||||
}
|
||||
catch
|
||||
{
|
||||
@@ -189,7 +216,14 @@ namespace System.Application
|
||||
}
|
||||
}
|
||||
|
||||
public static async Task PickMultipleAsync(Func<IEnumerable<string>, Task> func, FilePickerFileType? fileTypes = null, string? title = _ThisAssembly.AssemblyTrademark)
|
||||
/// <summary>
|
||||
/// 启动文件选择器以选择多个文件。
|
||||
/// </summary>
|
||||
/// <param name="func"></param>
|
||||
/// <param name="fileTypes"></param>
|
||||
/// <param name="title"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task PickMultipleAsync(Func<IEnumerable<string>?, Task> func, FilePickerFileType? fileTypes = null, string? title = _ThisAssembly.AssemblyTrademark)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -211,13 +245,13 @@ namespace System.Application
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Toast.Show(e.Message);
|
||||
Toast.Show(e, nameof(FilePicker2));
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (PermissionException e)
|
||||
{
|
||||
Toast.Show(e.Message);
|
||||
Toast.Show(e.Message); // Xamarin.Essentials.PermissionException
|
||||
}
|
||||
catch
|
||||
{
|
||||
@@ -225,92 +259,92 @@ namespace System.Application
|
||||
}
|
||||
}
|
||||
|
||||
public static async Task<FileResult?> SaveAsync(SaveOptions? options = null)
|
||||
/// <summary>
|
||||
/// 启动文件保存弹窗以保存单个文件
|
||||
/// </summary>
|
||||
/// <param name="options">要使用的文件保存弹窗选项,可能为空。</param>
|
||||
/// <returns>文件拾取结果对象,或当用户取消拾取时为空。</returns>
|
||||
/// <exception cref="PlatformNotSupportedException"></exception>
|
||||
public static async Task<SaveFileResult?> SaveAsync(SaveOptions? options = null)
|
||||
{
|
||||
var s = ISaveFileDialogService.Instance;
|
||||
if (s != null)
|
||||
try
|
||||
{
|
||||
return await s.PlatformSaveAsync(options);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
public class SaveOptions : PickOptions
|
||||
{
|
||||
public string? InitialFileName { get; set; }
|
||||
}
|
||||
|
||||
public class GeneralFilePickerFileType : FilePickerFileType
|
||||
{
|
||||
readonly IEnumerable<string> values;
|
||||
|
||||
public GeneralFilePickerFileType(IEnumerable<string> values) : base()
|
||||
{
|
||||
this.values = values;
|
||||
}
|
||||
|
||||
public static implicit operator GeneralFilePickerFileType(string[] values) => new(values);
|
||||
|
||||
public static implicit operator GeneralFilePickerFileType(List<string> values) => new(values);
|
||||
|
||||
protected override IEnumerable<string> GetPlatformFileType(DevicePlatform _) => values;
|
||||
}
|
||||
|
||||
public class FilePickerFileType2 : FilePickerFileType
|
||||
{
|
||||
readonly IReadOnlyDictionary<Platform, IEnumerable<string>> fileTypes;
|
||||
|
||||
public FilePickerFileType2(IReadOnlyDictionary<Platform, IEnumerable<string>> fileTypes) : base() => this.fileTypes = fileTypes;
|
||||
|
||||
public static implicit operator FilePickerFileType2(Dictionary<Platform, IEnumerable<string>> fileTypes) => new(fileTypes);
|
||||
|
||||
protected override IEnumerable<string> GetPlatformFileType(DevicePlatform _)
|
||||
{
|
||||
if (fileTypes.TryGetValue(DeviceInfo2.Platform, out var type))
|
||||
return type;
|
||||
|
||||
throw new PlatformNotSupportedException("This platform does not support this file type.");
|
||||
}
|
||||
}
|
||||
|
||||
public class FilePickerFilter : GeneralFilePickerFileType
|
||||
{
|
||||
public IEnumerable<(string name, IEnumerable<string> extensions)> Filters { get; }
|
||||
|
||||
public FilePickerFilter(IEnumerable<(string name, IEnumerable<string> extensions)> filters) : base(filters.SelectMany(x => x.extensions))
|
||||
{
|
||||
Filters = filters;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Images
|
||||
{
|
||||
static readonly Lazy<FilePickerFileType> _FileTypes = new(() =>
|
||||
{
|
||||
if (Essentials.IsSupported)
|
||||
var s = ISaveFileDialogService.Instance;
|
||||
if (s != null)
|
||||
{
|
||||
return FilePickerFileType.Images;
|
||||
return await s.PlatformSaveAsync(options);
|
||||
}
|
||||
else if (OperatingSystem2.IsWindows)
|
||||
{
|
||||
GeneralFilePickerFileType fileTypes = new[] { FileEx.PNG, FileEx.JPG, FileEx.JPEG, FileEx.GIF, FileEx.BMP };
|
||||
return fileTypes;
|
||||
}
|
||||
else
|
||||
{
|
||||
GeneralFilePickerFileType fileTypes = new[] { FileEx.PNG, FileEx.JPG, FileEx.JPEG, FileEx.GIF };
|
||||
return fileTypes;
|
||||
}
|
||||
});
|
||||
|
||||
/// <inheritdoc cref="FilePickerFileType.Images"/>
|
||||
public static FilePickerFileType FileTypes => _FileTypes.Value;
|
||||
|
||||
/// <inheritdoc cref="PickOptions.Images"/>
|
||||
public static PickOptions PickOptions => new()
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
FileTypes = FileTypes,
|
||||
};
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class SaveFileResult : IDisposable
|
||||
{
|
||||
readonly string? fullPath;
|
||||
readonly Stream? stream;
|
||||
readonly string? @string;
|
||||
bool disposedValue;
|
||||
|
||||
public SaveFileResult(string fullPath)
|
||||
{
|
||||
this.fullPath = fullPath;
|
||||
}
|
||||
|
||||
public SaveFileResult(Stream stream, string? @string = null)
|
||||
{
|
||||
this.stream = stream;
|
||||
this.@string = @string;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 打开写入流,在桌面平台上为 <see cref="FileStream"/>,在 Android 上为 Java.IO.OutputStream
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotSupportedException"></exception>
|
||||
public Stream OpenWrite()
|
||||
{
|
||||
if (fullPath != null)
|
||||
return new FileStream(fullPath, FileMode.OpenOrCreate, FileAccess.Write);
|
||||
if (stream != null)
|
||||
return stream;
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
if (fullPath != null)
|
||||
return fullPath;
|
||||
if (@string != null)
|
||||
return @string;
|
||||
return base.ToString();
|
||||
}
|
||||
|
||||
private void Dispose(bool disposing)
|
||||
{
|
||||
if (!disposedValue)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
// TODO: 释放托管状态(托管对象)
|
||||
stream?.Dispose();
|
||||
}
|
||||
|
||||
// TODO: 释放未托管的资源(未托管的对象)并重写终结器
|
||||
// TODO: 将大型字段设置为 null
|
||||
disposedValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// 不要更改此代码。请将清理代码放入“Dispose(bool disposing)”方法中
|
||||
Dispose(disposing: true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
using System.IO;
|
||||
#if NET35
|
||||
using WinFormsApplication = System.Windows.Forms.Application;
|
||||
#endif
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace System.Application
|
||||
{
|
||||
/// <summary>
|
||||
/// 提供了访问设备文件夹位置的简便方法。
|
||||
/// </summary>
|
||||
public sealed partial class FileSystem2 : IOPath.FileSystemBase
|
||||
{
|
||||
private FileSystem2() => throw new NotSupportedException();
|
||||
|
||||
public static class BaseDirectory
|
||||
{
|
||||
static string StartupPath
|
||||
{
|
||||
get
|
||||
{
|
||||
var appDataRootPath =
|
||||
#if NET35
|
||||
WinFormsApplication.StartupPath;
|
||||
#else
|
||||
IOPath.BaseDirectory;
|
||||
#endif
|
||||
return appDataRootPath;
|
||||
}
|
||||
}
|
||||
|
||||
public static string AppDataDirectory
|
||||
{
|
||||
get
|
||||
{
|
||||
var appDataPath = Path.Combine(StartupPath, IOPath.DirName_AppData);
|
||||
return appDataPath;
|
||||
}
|
||||
}
|
||||
|
||||
public static string CacheDirectory
|
||||
{
|
||||
get
|
||||
{
|
||||
var cachePath = Path.Combine(StartupPath, IOPath.DirName_Cache);
|
||||
return cachePath;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void InitFileSystemByBaseDirectory()
|
||||
{
|
||||
var appDataPath = BaseDirectory.AppDataDirectory;
|
||||
var cachePath = BaseDirectory.CacheDirectory;
|
||||
IOPath.DirCreateByNotExists(appDataPath);
|
||||
IOPath.DirCreateByNotExists(cachePath);
|
||||
InitFileSystem(GetAppDataDirectory, GetCacheDirectory);
|
||||
string GetAppDataDirectory() => appDataPath;
|
||||
string GetCacheDirectory() => cachePath;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,15 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Xamarin.Essentials;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace System.Application
|
||||
{
|
||||
public sealed class FileSystem2 : IOPath.FileSystemBase
|
||||
partial class FileSystem2
|
||||
{
|
||||
private FileSystem2() => throw new NotSupportedException();
|
||||
|
||||
/// <summary>
|
||||
/// 初始化文件系统
|
||||
/// </summary>
|
||||
@@ -23,7 +18,7 @@ namespace System.Application
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new PlatformNotSupportedException();
|
||||
InitFileSystemByBaseDirectory();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,12 +6,15 @@ using System.Application.Services;
|
||||
namespace System.Application
|
||||
{
|
||||
/// <summary>
|
||||
/// 适用于桌面端的主线程帮助类,参考 Xamarin.Essentials.MainThread
|
||||
/// 适用于桌面端的主线程帮助类,参考 Xamarin.Essentials.MainThread。
|
||||
/// <para><see cref="https://docs.microsoft.com/zh-cn/xamarin/essentials/main-thread"/></para>
|
||||
/// <para><see cref="https://github.com/xamarin/Essentials/blob/main/Xamarin.Essentials/MainThread/MainThread.shared.cs"/></para>
|
||||
/// </summary>
|
||||
public static class MainThread2
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取当前是否为主线程。
|
||||
/// </summary>
|
||||
public static bool IsMainThread
|
||||
{
|
||||
get
|
||||
@@ -27,6 +30,11 @@ namespace System.Application
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 调用应用程序主线程上的操作。
|
||||
/// </summary>
|
||||
/// <param name="action">要执行的操作。</param>
|
||||
/// <param name="priority"></param>
|
||||
public static void BeginInvokeOnMainThread(Action action, DispatcherPriority priority = DispatcherPriority.Normal)
|
||||
{
|
||||
if (Essentials.IsSupported)
|
||||
@@ -46,6 +54,12 @@ namespace System.Application
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 异步调用主线程。
|
||||
/// </summary>
|
||||
/// <param name="action"></param>
|
||||
/// <param name="priority"></param>
|
||||
/// <returns></returns>
|
||||
public static Task InvokeOnMainThreadAsync(Action action, DispatcherPriority priority = DispatcherPriority.Normal)
|
||||
{
|
||||
if (Essentials.IsSupported)
|
||||
@@ -83,6 +97,13 @@ namespace System.Application
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 异步调用主线程。
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="func"></param>
|
||||
/// <param name="priority"></param>
|
||||
/// <returns></returns>
|
||||
public static Task<T> InvokeOnMainThreadAsync<T>(Func<T> func, DispatcherPriority priority = DispatcherPriority.Normal)
|
||||
{
|
||||
if (Essentials.IsSupported)
|
||||
@@ -115,6 +136,12 @@ namespace System.Application
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 异步调用主线程。
|
||||
/// </summary>
|
||||
/// <param name="funcTask"></param>
|
||||
/// <param name="priority"></param>
|
||||
/// <returns></returns>
|
||||
public static Task InvokeOnMainThreadAsync(Func<Task> funcTask, DispatcherPriority priority = DispatcherPriority.Normal)
|
||||
{
|
||||
if (Essentials.IsSupported)
|
||||
@@ -148,6 +175,13 @@ namespace System.Application
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 异步调用主线程。
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="funcTask"></param>
|
||||
/// <param name="priority"></param>
|
||||
/// <returns></returns>
|
||||
public static Task<T> InvokeOnMainThreadAsync<T>(Func<Task<T>> funcTask, DispatcherPriority priority = DispatcherPriority.Normal)
|
||||
{
|
||||
if (Essentials.IsSupported)
|
||||
|
||||
@@ -0,0 +1,307 @@
|
||||
using System.Application.Services;
|
||||
using Xamarin.Essentials;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace System.Application
|
||||
{
|
||||
/// <inheritdoc cref="Preferences"/>
|
||||
public static class Preferences2
|
||||
{
|
||||
// https://github.com/xamarin/Essentials/blob/1.7.0/Xamarin.Essentials/Preferences/Preferences.shared.cs
|
||||
|
||||
// overloads
|
||||
|
||||
/// <inheritdoc cref="Preferences.ContainsKey(string)"/>
|
||||
public static bool ContainsKey(string key) =>
|
||||
ContainsKey(key, null);
|
||||
|
||||
/// <inheritdoc cref="Preferences.Remove(string)"/>
|
||||
public static void Remove(string key) =>
|
||||
Remove(key, null);
|
||||
|
||||
/// <inheritdoc cref="Preferences.Clear"/>
|
||||
public static void Clear() =>
|
||||
Clear(null);
|
||||
|
||||
/// <inheritdoc cref="Preferences.Get(string, string)"/>
|
||||
public static string? Get(string key, string? defaultValue) =>
|
||||
Get(key, defaultValue, null);
|
||||
|
||||
/// <inheritdoc cref="Preferences.Get(string, bool)"/>
|
||||
public static bool Get(string key, bool defaultValue) =>
|
||||
Get(key, defaultValue, null);
|
||||
|
||||
/// <inheritdoc cref="Preferences.Get(string, int)"/>
|
||||
public static int Get(string key, int defaultValue) =>
|
||||
Get(key, defaultValue, null);
|
||||
|
||||
/// <inheritdoc cref="Preferences.Get(string, double)"/>
|
||||
public static double Get(string key, double defaultValue) =>
|
||||
Get(key, defaultValue, null);
|
||||
|
||||
/// <inheritdoc cref="Preferences.Get(string, float)"/>
|
||||
public static float Get(string key, float defaultValue) =>
|
||||
Get(key, defaultValue, null);
|
||||
|
||||
/// <inheritdoc cref="Preferences.Get(string, long)"/>
|
||||
public static long Get(string key, long defaultValue) =>
|
||||
Get(key, defaultValue, null);
|
||||
|
||||
/// <inheritdoc cref="Preferences.Set(string, string)"/>
|
||||
public static void Set(string key, string value) =>
|
||||
Set(key, value, null);
|
||||
|
||||
/// <inheritdoc cref="Preferences.Set(string, bool)"/>
|
||||
public static void Set(string key, bool value) =>
|
||||
Set(key, value, null);
|
||||
|
||||
/// <inheritdoc cref="Preferences.Set(string, int)"/>
|
||||
public static void Set(string key, int value) =>
|
||||
Set(key, value, null);
|
||||
|
||||
/// <inheritdoc cref="Preferences.Set(string, double)"/>
|
||||
public static void Set(string key, double value) =>
|
||||
Set(key, value, null);
|
||||
|
||||
/// <inheritdoc cref="Preferences.Set(string, float)"/>
|
||||
public static void Set(string key, float value) =>
|
||||
Set(key, value, null);
|
||||
|
||||
/// <inheritdoc cref="Preferences.Set(string, long)"/>
|
||||
public static void Set(string key, long value) =>
|
||||
Set(key, value, null);
|
||||
|
||||
// shared -> platform
|
||||
|
||||
/// <inheritdoc cref="Preferences.ContainsKey(string, string)"/>
|
||||
public static bool ContainsKey(string key, string? sharedName)
|
||||
{
|
||||
if (Essentials.IsSupported)
|
||||
{
|
||||
return Preferences.ContainsKey(key, sharedName);
|
||||
}
|
||||
else
|
||||
{
|
||||
return IPreferencesPlatformService.Instance.PlatformContainsKey(key, sharedName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Preferences.Remove(string, string)"/>
|
||||
public static void Remove(string key, string? sharedName)
|
||||
{
|
||||
if (Essentials.IsSupported)
|
||||
{
|
||||
Preferences.Remove(key, sharedName);
|
||||
}
|
||||
else
|
||||
{
|
||||
IPreferencesPlatformService.Instance.PlatformRemove(key, sharedName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Preferences.Clear(string)"/>
|
||||
public static void Clear(string? sharedName)
|
||||
{
|
||||
if (Essentials.IsSupported)
|
||||
{
|
||||
Preferences.Clear(sharedName);
|
||||
}
|
||||
else
|
||||
{
|
||||
IPreferencesPlatformService.Instance.PlatformClear(sharedName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Preferences.Get(string, string, string)"/>
|
||||
public static string? Get(string key, string? defaultValue, string? sharedName)
|
||||
{
|
||||
if (Essentials.IsSupported)
|
||||
{
|
||||
return Preferences.Get(key, defaultValue, sharedName);
|
||||
}
|
||||
else
|
||||
{
|
||||
return IPreferencesPlatformService.Instance.PlatformGet(key, defaultValue, sharedName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Preferences.Get(string, bool, string)"/>
|
||||
public static bool Get(string key, bool defaultValue, string? sharedName)
|
||||
{
|
||||
if (Essentials.IsSupported)
|
||||
{
|
||||
return Preferences.Get(key, defaultValue, sharedName);
|
||||
}
|
||||
else
|
||||
{
|
||||
return IPreferencesPlatformService.Instance.PlatformGet(key, defaultValue, sharedName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Preferences.Get(string, int, string)"/>
|
||||
public static int Get(string key, int defaultValue, string? sharedName)
|
||||
{
|
||||
if (Essentials.IsSupported)
|
||||
{
|
||||
return Preferences.Get(key, defaultValue, sharedName);
|
||||
}
|
||||
else
|
||||
{
|
||||
return IPreferencesPlatformService.Instance.PlatformGet(key, defaultValue, sharedName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Preferences.Get(string, double, string)"/>
|
||||
public static double Get(string key, double defaultValue, string? sharedName)
|
||||
{
|
||||
if (Essentials.IsSupported)
|
||||
{
|
||||
return Preferences.Get(key, defaultValue, sharedName);
|
||||
}
|
||||
else
|
||||
{
|
||||
return IPreferencesPlatformService.Instance.PlatformGet(key, defaultValue, sharedName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Preferences.Get(string, float, string)"/>
|
||||
public static float Get(string key, float defaultValue, string? sharedName)
|
||||
{
|
||||
if (Essentials.IsSupported)
|
||||
{
|
||||
return Preferences.Get(key, defaultValue, sharedName);
|
||||
}
|
||||
else
|
||||
{
|
||||
return IPreferencesPlatformService.Instance.PlatformGet(key, defaultValue, sharedName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Preferences.Get(string, long, string)"/>
|
||||
public static long Get(string key, long defaultValue, string? sharedName)
|
||||
{
|
||||
if (Essentials.IsSupported)
|
||||
{
|
||||
return Preferences.Get(key, defaultValue, sharedName);
|
||||
}
|
||||
else
|
||||
{
|
||||
return IPreferencesPlatformService.Instance.PlatformGet(key, defaultValue, sharedName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Preferences.Get(string, string, string)"/>
|
||||
public static void Set(string key, string value, string? sharedName)
|
||||
{
|
||||
if (Essentials.IsSupported)
|
||||
{
|
||||
Preferences.Set(key, value, sharedName);
|
||||
}
|
||||
else
|
||||
{
|
||||
IPreferencesPlatformService.Instance.PlatformSet(key, value, sharedName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Preferences.Get(string, bool, string)"/>
|
||||
public static void Set(string key, bool value, string? sharedName)
|
||||
{
|
||||
if (Essentials.IsSupported)
|
||||
{
|
||||
Preferences.Set(key, value, sharedName);
|
||||
}
|
||||
else
|
||||
{
|
||||
IPreferencesPlatformService.Instance.PlatformSet(key, value, sharedName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Preferences.Get(string, int, string)"/>
|
||||
public static void Set(string key, int value, string? sharedName)
|
||||
{
|
||||
if (Essentials.IsSupported)
|
||||
{
|
||||
Preferences.Set(key, value, sharedName);
|
||||
}
|
||||
else
|
||||
{
|
||||
IPreferencesPlatformService.Instance.PlatformSet(key, value, sharedName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Preferences.Get(string, double, string)"/>
|
||||
public static void Set(string key, double value, string? sharedName)
|
||||
{
|
||||
if (Essentials.IsSupported)
|
||||
{
|
||||
Preferences.Set(key, value, sharedName);
|
||||
}
|
||||
else
|
||||
{
|
||||
IPreferencesPlatformService.Instance.PlatformSet(key, value, sharedName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Preferences.Get(string, float, string)"/>
|
||||
public static void Set(string key, float value, string? sharedName)
|
||||
{
|
||||
if (Essentials.IsSupported)
|
||||
{
|
||||
Preferences.Set(key, value, sharedName);
|
||||
}
|
||||
else
|
||||
{
|
||||
IPreferencesPlatformService.Instance.PlatformSet(key, value, sharedName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Preferences.Get(string, long, string)"/>
|
||||
public static void Set(string key, long value, string? sharedName)
|
||||
{
|
||||
if (Essentials.IsSupported)
|
||||
{
|
||||
Preferences.Set(key, value, sharedName);
|
||||
}
|
||||
else
|
||||
{
|
||||
IPreferencesPlatformService.Instance.PlatformSet(key, value, sharedName);
|
||||
}
|
||||
}
|
||||
|
||||
// DateTime
|
||||
|
||||
/// <inheritdoc cref="Preferences.Get(string, DateTime)"/>
|
||||
public static DateTime Get(string key, DateTime defaultValue) =>
|
||||
Get(key, defaultValue, null);
|
||||
|
||||
/// <inheritdoc cref="Preferences.Set(string, DateTime)"/>
|
||||
public static void Set(string key, DateTime value) =>
|
||||
Set(key, value, null);
|
||||
|
||||
/// <inheritdoc cref="Preferences.Get(string, DateTime, string)"/>
|
||||
public static DateTime Get(string key, DateTime defaultValue, string? sharedName)
|
||||
{
|
||||
if (Essentials.IsSupported)
|
||||
{
|
||||
return Preferences.Get(key, defaultValue, sharedName);
|
||||
}
|
||||
else
|
||||
{
|
||||
return DateTime.FromBinary(IPreferencesPlatformService.Instance.PlatformGet(key, defaultValue.ToBinary(), sharedName));
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Preferences.Set(string, DateTime, string)"/>
|
||||
public static void Set(string key, DateTime value, string? sharedName)
|
||||
{
|
||||
if (Essentials.IsSupported)
|
||||
{
|
||||
Preferences.Set(key, value, sharedName);
|
||||
}
|
||||
else
|
||||
{
|
||||
IPreferencesPlatformService.Instance.PlatformSet(key, value.ToBinary(), sharedName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
|
||||
// https://github.com/xamarin/Essentials/blob/1.7.0/Xamarin.Essentials/Types/Shared/PreserveAttribute.shared.cs
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace Xamarin.Essentials
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.All)]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
sealed class PreserveAttribute : Attribute
|
||||
{
|
||||
#pragma warning disable SA1401 // Fields should be private
|
||||
public bool AllMembers;
|
||||
public bool Conditional;
|
||||
#pragma warning restore SA1401 // Fields should be private
|
||||
|
||||
public PreserveAttribute(bool allMembers, bool conditional)
|
||||
{
|
||||
AllMembers = allMembers;
|
||||
Conditional = conditional;
|
||||
}
|
||||
|
||||
public PreserveAttribute()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
#if DEBUG
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace System.Application
|
||||
{
|
||||
[Obsolete("use System.Security.ISecureStorage.Instance", true)]
|
||||
public static class SecureStorage2
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,223 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Xamarin.Essentials;
|
||||
using _ThisAssembly = System.Properties.ThisAssembly;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace System.Application
|
||||
{
|
||||
/// <summary>
|
||||
/// 提供一种在设备上跟踪应用程序版本的简便方法。
|
||||
/// </summary>
|
||||
public static class VersionTracking2
|
||||
{
|
||||
// https://github.com/xamarin/Essentials/blob/1.7.0/Xamarin.Essentials/VersionTracking/VersionTracking.shared.cs
|
||||
// https://github.com/xamarin/Essentials/blob/1.7.0/Xamarin.Essentials/AppInfo/AppInfo.uwp.cs
|
||||
|
||||
const string versionsKey = "VersionTracking.Versions";
|
||||
const string sharedName = "steam++.xamarinessentials.versiontracking";
|
||||
|
||||
static readonly List<string>? versionTrail;
|
||||
|
||||
static VersionTracking2()
|
||||
{
|
||||
if (!Essentials.IsSupported)
|
||||
{
|
||||
IsFirstLaunchEver = !Preferences2.ContainsKey(versionsKey, sharedName);
|
||||
if (IsFirstLaunchEver)
|
||||
{
|
||||
versionTrail = new();
|
||||
}
|
||||
else
|
||||
{
|
||||
versionTrail = ReadHistory(versionsKey).ToList();
|
||||
}
|
||||
|
||||
IsFirstLaunchForCurrentVersion = !versionTrail.Contains(CurrentVersion);
|
||||
if (IsFirstLaunchForCurrentVersion)
|
||||
{
|
||||
versionTrail.Add(CurrentVersion);
|
||||
}
|
||||
|
||||
if (IsFirstLaunchForCurrentVersion)
|
||||
{
|
||||
WriteHistory(versionsKey, versionTrail);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static Func<string>? PlatformGetVersionString { private get; set; }
|
||||
|
||||
static string VersionString
|
||||
{
|
||||
get
|
||||
{
|
||||
if (PlatformGetVersionString != null) return PlatformGetVersionString();
|
||||
return _ThisAssembly.Version;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取应用程序的当前版本号。
|
||||
/// </summary>
|
||||
public static string CurrentVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Essentials.IsSupported)
|
||||
{
|
||||
return VersionTracking.CurrentVersion;
|
||||
}
|
||||
else
|
||||
{
|
||||
return VersionString;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取此设备上安装的应用程序的第一个版本的版本号。
|
||||
/// </summary>
|
||||
public static string FirstInstalledVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Essentials.IsSupported)
|
||||
{
|
||||
return VersionTracking.FirstInstalledVersion;
|
||||
}
|
||||
else
|
||||
{
|
||||
return versionTrail!.FirstOrDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static bool mIsFirstLaunchEver;
|
||||
/// <summary>
|
||||
/// 获取一个值,该值指示此应用是否首次在此设备上启动。
|
||||
/// </summary>
|
||||
public static bool IsFirstLaunchEver
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Essentials.IsSupported)
|
||||
{
|
||||
return VersionTracking.IsFirstLaunchEver;
|
||||
}
|
||||
else
|
||||
{
|
||||
return mIsFirstLaunchEver;
|
||||
}
|
||||
}
|
||||
private set
|
||||
{
|
||||
mIsFirstLaunchEver = value;
|
||||
}
|
||||
}
|
||||
|
||||
static bool mIsFirstLaunchForCurrentVersion;
|
||||
/// <summary>
|
||||
/// 获取一个值,该值指示这是否是当前版本号的应用程序的首次启动。
|
||||
/// </summary>
|
||||
public static bool IsFirstLaunchForCurrentVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Essentials.IsSupported)
|
||||
{
|
||||
return VersionTracking.IsFirstLaunchForCurrentVersion;
|
||||
}
|
||||
else
|
||||
{
|
||||
return mIsFirstLaunchForCurrentVersion;
|
||||
}
|
||||
}
|
||||
private set
|
||||
{
|
||||
mIsFirstLaunchForCurrentVersion = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取以前运行的版本的版本号。
|
||||
/// </summary>
|
||||
public static string? PreviousVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Essentials.IsSupported)
|
||||
{
|
||||
return VersionTracking.PreviousVersion;
|
||||
}
|
||||
else
|
||||
{
|
||||
return GetPrevious(versionTrail!);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取在此设备上运行的应用的版本号集合。
|
||||
/// </summary>
|
||||
public static IEnumerable<string> VersionHistory
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Essentials.IsSupported)
|
||||
{
|
||||
return VersionTracking.VersionHistory;
|
||||
}
|
||||
else
|
||||
{
|
||||
return versionTrail!.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 确定这是否是指定版本号的应用程序的首次启动。
|
||||
/// </summary>
|
||||
/// <param name="version"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public static bool IsFirstLaunchForVersion(string version)
|
||||
{
|
||||
if (Essentials.IsSupported)
|
||||
{
|
||||
return VersionTracking.IsFirstLaunchForVersion(version);
|
||||
}
|
||||
else
|
||||
{
|
||||
return CurrentVersion == version && IsFirstLaunchForCurrentVersion;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 开始跟踪版本信息。
|
||||
/// </summary>
|
||||
[Preserve]
|
||||
public static void Track()
|
||||
{
|
||||
if (Essentials.IsSupported)
|
||||
{
|
||||
VersionTracking.Track();
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// // 调用空函数触发当前类静态构造函数
|
||||
//}
|
||||
}
|
||||
|
||||
static string[] ReadHistory(string key)
|
||||
=> Preferences2.Get(key, null, sharedName)?.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries) ?? new string[0];
|
||||
|
||||
static void WriteHistory(string key, IEnumerable<string> history)
|
||||
=> Preferences2.Set(key, string.Join("|", history), sharedName);
|
||||
|
||||
static string? GetPrevious(List<string> trail)
|
||||
{
|
||||
return (trail.Count >= 2) ? trail[^2] : null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using Xamarin.Essentials;
|
||||
using static System.Application.FilePicker2;
|
||||
@@ -13,7 +14,7 @@ namespace System.Application.Services
|
||||
|
||||
public interface IServiceBase
|
||||
{
|
||||
protected static void FormatExtensions(IEnumerable<string>? extensions, Action<string> add, bool trimLeadingPeriod = false)
|
||||
protected static IEnumerable<string> FormatExtensions(IEnumerable<string>? extensions, bool trimLeadingPeriod = false)
|
||||
{
|
||||
var hasAtLeastOneType = false;
|
||||
|
||||
@@ -21,24 +22,33 @@ namespace System.Application.Services
|
||||
{
|
||||
foreach (var extension in extensions)
|
||||
{
|
||||
var ext = FileEx.Clean(extension, trimLeadingPeriod);
|
||||
var ext = Clean(extension, trimLeadingPeriod);
|
||||
static string Clean(string extension, bool trimLeadingPeriod = false)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(extension))
|
||||
return string.Empty;
|
||||
|
||||
if (extension.StartsWith('.'))
|
||||
{
|
||||
if (!trimLeadingPeriod) return extension;
|
||||
return extension.TrimStart('.');
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!trimLeadingPeriod) return "." + extension;
|
||||
return extension;
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(ext))
|
||||
{
|
||||
add(ext);
|
||||
yield return ext;
|
||||
hasAtLeastOneType = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!hasAtLeastOneType)
|
||||
add("*");
|
||||
}
|
||||
|
||||
protected static List<string> FormatExtensions(IEnumerable<string>? extensions, bool trimLeadingPeriod = false)
|
||||
{
|
||||
var list = new List<string>();
|
||||
FormatExtensions(extensions, list.Add, trimLeadingPeriod);
|
||||
return list;
|
||||
yield return "*";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,7 +65,7 @@ namespace System.Application.Services
|
||||
{
|
||||
static ISaveFileDialogService? Instance => DI.Get_Nullable<ISaveFileDialogService>();
|
||||
|
||||
Task<FileResult?> PlatformSaveAsync(SaveOptions? options);
|
||||
Task<SaveFileResult?> PlatformSaveAsync(SaveOptions? options);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
namespace System.Application.Services
|
||||
{
|
||||
public interface IPreferencesPlatformService
|
||||
{
|
||||
static IPreferencesPlatformService Instance => DI.Get<IPreferencesPlatformService>();
|
||||
|
||||
bool PlatformContainsKey(string key, string? sharedName);
|
||||
|
||||
void PlatformRemove(string key, string? sharedName);
|
||||
|
||||
void PlatformClear(string? sharedName);
|
||||
|
||||
T? PlatformGet<T>(string key, T? defaultValue, string? sharedName) where T : notnull, IConvertible;
|
||||
|
||||
void PlatformSet<T>(string key, T? value, string? sharedName) where T : notnull, IConvertible;
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
using System.Runtime.Versioning;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace System.Application.Services
|
||||
@@ -13,7 +14,7 @@ namespace System.Application.Services
|
||||
/// 获取当前设备的手机号码(Only Android)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
//[SupportedOSPlatform("Android")]
|
||||
[SupportedOSPlatform("Android")]
|
||||
Task<string?> GetPhoneNumberAsync();
|
||||
|
||||
/// <summary>
|
||||
@@ -21,7 +22,7 @@ namespace System.Application.Services
|
||||
/// </summary>
|
||||
/// <param name="textBoxText"></param>
|
||||
/// <returns></returns>
|
||||
//[SupportedOSPlatform("Android")]
|
||||
[SupportedOSPlatform("Android")]
|
||||
public static async Task<string?> GetAutoFillPhoneNumberAsync(string? textBoxText)
|
||||
{
|
||||
var value = await Instance.GetPhoneNumberAsync();
|
||||
|
||||
+192
@@ -0,0 +1,192 @@
|
||||
using SQLite;
|
||||
using System.Application.Entities;
|
||||
using System.Application.Repositories;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Globalization;
|
||||
using NotNull = System.Diagnostics.CodeAnalysis.NotNullAttribute;
|
||||
using SQLiteNotNull = SQLite.NotNullAttribute;
|
||||
using SQLiteTable = SQLite.TableAttribute;
|
||||
|
||||
namespace System.Application.Services.Implementation
|
||||
{
|
||||
internal sealed class PreferencesPlatformServiceImpl : IPreferencesPlatformService
|
||||
{
|
||||
readonly SQLiteConnection conn;
|
||||
|
||||
public PreferencesPlatformServiceImpl()
|
||||
{
|
||||
conn = Repository.GetDbConnectionSync<Entity>();
|
||||
}
|
||||
|
||||
static string GetId(string key) => $"{key}_K";
|
||||
|
||||
static string GetId(string key, string? sharedName)
|
||||
{
|
||||
if (sharedName == null) return GetId(key);
|
||||
return $"{key}_{sharedName}_S";
|
||||
}
|
||||
|
||||
public void PlatformClear(string? sharedName)
|
||||
{
|
||||
if (sharedName == null)
|
||||
{
|
||||
conn.Execute(Sql_Delete_All);
|
||||
}
|
||||
else
|
||||
{
|
||||
conn.Execute(Sql_Delete_Where_SharedName_Equals, sharedName);
|
||||
}
|
||||
}
|
||||
|
||||
//public void PlatformClear(string? sharedName)
|
||||
//{
|
||||
// if (sharedName == null)
|
||||
// {
|
||||
// conn.DeleteAll<Entity>();
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// var items = conn.Table<Entity>().Where(x => x.SharedName == sharedName).ToArray();
|
||||
// foreach (var item in items)
|
||||
// {
|
||||
// conn.Delete(item);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
//public bool PlatformContainsKey(string key, string? sharedName)
|
||||
//{
|
||||
// int r;
|
||||
// if (sharedName == null)
|
||||
// {
|
||||
// r = conn.Execute(Sql_Select_SharedName_Where_Key_Equals_And_SharedName_IsNull, GetId(key));
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// r = conn.Execute(Sql_Select_SharedName_Where_Key_Equals_And_SharedName_Equals, GetId(key, sharedName), sharedName);
|
||||
// }
|
||||
// return r > 0;
|
||||
//}
|
||||
|
||||
public bool PlatformContainsKey(string key, string? sharedName)
|
||||
{
|
||||
var id = GetId(key, sharedName);
|
||||
var item = conn.Table<Entity>().Where(x => x.Id == id && x.SharedName == sharedName).FirstOrDefault();
|
||||
return item != null;
|
||||
}
|
||||
|
||||
//public T? PlatformGet<T>(string key, T? defaultValue, string? sharedName) where T : notnull, IConvertible
|
||||
//{
|
||||
// string? r;
|
||||
// if (sharedName == null)
|
||||
// {
|
||||
// r = conn.ExecuteScalar<string?>(Sql_Select_Value_Where_Key_Equals_And_SharedName_IsNull, GetId(key));
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// r = conn.ExecuteScalar<string?>(Sql_Select_Value_Where_Key_Equals_And_SharedName_Equals, GetId(key, sharedName), sharedName);
|
||||
// }
|
||||
// if (r == null) return defaultValue;
|
||||
// var r2 = ConvertibleHelper.Convert<T>(r);
|
||||
// return r2;
|
||||
//}
|
||||
|
||||
public T? PlatformGet<T>(string key, T? defaultValue, string? sharedName) where T : notnull, IConvertible
|
||||
{
|
||||
var id = GetId(key, sharedName);
|
||||
var item = conn.Table<Entity>().Where(x => x.Id == id && x.SharedName == sharedName).FirstOrDefault();
|
||||
if (item == null) return defaultValue;
|
||||
var value = ConvertibleHelper.Convert<T>(item.Value);
|
||||
return value;
|
||||
}
|
||||
|
||||
//public void PlatformRemove(string key, string? sharedName)
|
||||
//{
|
||||
// if (sharedName == null)
|
||||
// {
|
||||
// conn.Execute(Sql_Delete_Where_Id_Equals_And_SharedName_IsNull, GetId(key));
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// conn.Execute(Sql_Delete_Where_Id_Equals_And_SharedName_Equals, GetId(key, sharedName), sharedName);
|
||||
// }
|
||||
//}
|
||||
|
||||
public void PlatformRemove(string key, string? sharedName)
|
||||
{
|
||||
var id = GetId(key, sharedName);
|
||||
conn.Delete<Entity>(id);
|
||||
}
|
||||
|
||||
public void PlatformSet<T>(string key, T? value, string? sharedName) where T : notnull, IConvertible
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
PlatformRemove(key, sharedName);
|
||||
}
|
||||
else
|
||||
{
|
||||
var id = GetId(key, sharedName);
|
||||
conn.InsertOrReplace(new Entity
|
||||
{
|
||||
Id = id,
|
||||
Value = value.ToString(CultureInfo.InvariantCulture),
|
||||
SharedName = sharedName,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
const string TableName = "0984415E";
|
||||
const string ColumnName_Id = "0F5E4BAA";
|
||||
const string ColumnName_Value = "4FC331D7";
|
||||
const string ColumnName_SharedName = "F6A739AA";
|
||||
|
||||
const string Sql_Delete_All =
|
||||
$"DELETE FROM \"{TableName}\"";
|
||||
|
||||
const string Sql_Delete_Where_SharedName_Equals =
|
||||
$"DELETE FROM \"{TableName}\" WHERE \"{ColumnName_SharedName}\" = ?";
|
||||
|
||||
//const string Sql_Delete_Where_Id_Equals_And_SharedName_IsNull =
|
||||
// $"DELETE FROM \"{TableName}\" WHERE \"{ColumnName_Id}\" = ? AND \"{ColumnName_SharedName}\" = NULL";
|
||||
|
||||
//const string Sql_Delete_Where_Id_Equals_And_SharedName_Equals =
|
||||
// $"DELETE FROM \"{TableName}\" WHERE \"{ColumnName_Id}\" = ? AND \"{ColumnName_SharedName}\" = ?";
|
||||
|
||||
//const string Sql_Select_SharedName_Where_Key_Equals_And_SharedName_IsNull =
|
||||
// $"SELECT \"{ColumnName_SharedName}\" FROM \"{TableName}\" WHERE \"{ColumnName_Id}\" = ? AND \"{ColumnName_SharedName}\" = NULL";
|
||||
|
||||
//const string Sql_Select_SharedName_Where_Key_Equals_And_SharedName_Equals =
|
||||
// $"SELECT \"{ColumnName_SharedName}\" FROM \"{TableName}\" WHERE \"{ColumnName_Id}\" = ? AND \"{ColumnName_SharedName}\" = ?";
|
||||
|
||||
//const string Sql_Select_Value_Where_Key_Equals_And_SharedName_IsNull =
|
||||
// $"SELECT \"{ColumnName_Value}\" FROM \"{TableName}\" WHERE \"{ColumnName_Id}\" = ? AND \"{ColumnName_SharedName}\" = NULL";
|
||||
|
||||
//const string Sql_Select_Value_Where_Key_Equals_And_SharedName_Equals =
|
||||
// $"SELECT \"{ColumnName_Value}\" FROM \"{TableName}\" WHERE \"{ColumnName_Id}\" = ? AND \"{ColumnName_SharedName}\" = ?";
|
||||
|
||||
[SQLiteTable(TableName)]
|
||||
[DebuggerDisplay("{DebuggerDisplay(),nq}")]
|
||||
public sealed class Entity : IEntity<string>
|
||||
{
|
||||
#pragma warning disable CS8618 // 在退出构造函数时,不可为 null 的字段必须包含非 null 值。请考虑声明为可以为 null。
|
||||
[Column(ColumnName_Id)]
|
||||
[PrimaryKey]
|
||||
[SQLiteNotNull]
|
||||
[NotNull, DisallowNull] // C# 8 not null
|
||||
public string? Id { get; set; }
|
||||
|
||||
[Column(ColumnName_Value)]
|
||||
[SQLiteNotNull]
|
||||
[NotNull, DisallowNull] // C# 8 not null
|
||||
public string? Value { get; set; }
|
||||
#pragma warning restore CS8618 // 在退出构造函数时,不可为 null 的字段必须包含非 null 值。请考虑声明为可以为 null。
|
||||
|
||||
[Column(ColumnName_SharedName)]
|
||||
public string? SharedName { get; set; }
|
||||
|
||||
string DebuggerDisplay() => SharedName == null ? $"{Id}, {Value}" : $"{Id}, {Value}, {SharedName}";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23,7 +23,8 @@
|
||||
<PackageReference Include="Splat" />
|
||||
<PackageReference Include="DynamicData" />
|
||||
<PackageReference Include="Xamarin.Essentials" />
|
||||
<ProjectReference Include="..\..\references\reactive\Rx.NET\Source\src\System.Reactive\System.Reactive.csproj" />
|
||||
<PackageReference Include="System.Reactive" Condition=" '$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' " />
|
||||
<ProjectReference Include="..\..\references\reactive\Rx.NET\Source\src\System.Reactive\System.Reactive.csproj" Condition=" '$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' != 'true' " />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -20,6 +20,6 @@ namespace System.Net.Http
|
||||
}
|
||||
}
|
||||
|
||||
public override Task<bool> IsConnectedAsync() => MainThread2.InvokeOnMainThreadAsync(() => IsConnected);
|
||||
//public override Task<bool> IsConnectedAsync() => MainThread2.InvokeOnMainThreadAsync(() => IsConnected);
|
||||
}
|
||||
}
|
||||
|
||||
+11
-7
@@ -6,20 +6,24 @@ using KeyValuePair = System.Application.Entities.KeyValuePair;
|
||||
|
||||
namespace System.Security
|
||||
{
|
||||
internal sealed class DesktopClientStorage : Repository<KeyValuePair, string>, IStorage
|
||||
/// <summary>
|
||||
/// 由 <see cref="Repository{TEntity, TPrimaryKey}"/> 实现的 <see cref="ISecureStorage"/>
|
||||
/// <para>加密由 <see cref="ISecurityService"/> 实现</para>
|
||||
/// </summary>
|
||||
internal sealed class RepositorySecureStorage : Repository<KeyValuePair, string>, ISecureStorage
|
||||
{
|
||||
readonly ISecurityService ss;
|
||||
|
||||
public DesktopClientStorage(ISecurityService ss)
|
||||
public RepositorySecureStorage(ISecurityService ss)
|
||||
{
|
||||
this.ss = ss;
|
||||
}
|
||||
|
||||
bool IStorage.IsNativeSupportedBytes => true;
|
||||
bool ISecureStorage.IsNativeSupportedBytes => true;
|
||||
|
||||
static string GetKey(string key) => Hashs.String.SHA256(key);
|
||||
|
||||
async Task<byte[]?> IStorage.GetBytesAsync(string key)
|
||||
async Task<byte[]?> ISecureStorage.GetBytesAsync(string key)
|
||||
{
|
||||
key = GetKey(key);
|
||||
var item = await FirstOrDefaultAsync(x => x.Id == key);
|
||||
@@ -38,7 +42,7 @@ namespace System.Security
|
||||
});
|
||||
}
|
||||
|
||||
Task IStorage.SetAsync(string key, byte[]? value)
|
||||
Task ISecureStorage.SetAsync(string key, byte[]? value)
|
||||
{
|
||||
key = GetKey(key);
|
||||
if (value == null || value.Length <= 0)
|
||||
@@ -51,14 +55,14 @@ namespace System.Security
|
||||
}
|
||||
}
|
||||
|
||||
async Task<bool> IStorage.RemoveAsync(string key)
|
||||
async Task<bool> ISecureStorage.RemoveAsync(string key)
|
||||
{
|
||||
key = GetKey(key);
|
||||
var result = await DeleteAsync(key);
|
||||
return result > 0;
|
||||
}
|
||||
|
||||
async Task<bool> IStorage.ContainsKeyAsync(string key)
|
||||
async Task<bool> ISecureStorage.ContainsKeyAsync(string key)
|
||||
{
|
||||
key = GetKey(key);
|
||||
var item = await FirstOrDefaultAsync(x => x.Id == key);
|
||||
+8
-7
@@ -4,18 +4,19 @@ using Xamarin.Essentials;
|
||||
namespace System.Security
|
||||
{
|
||||
/// <summary>
|
||||
/// https://docs.microsoft.com/zh-cn/xamarin/essentials/secure-storage
|
||||
/// 由 Xamarin.Essentials 实现的 <see cref="ISecureStorage"/>
|
||||
/// <para>https://docs.microsoft.com/zh-cn/xamarin/essentials/secure-storage</para>
|
||||
/// </summary>
|
||||
internal sealed class ClientStorage : IStorage
|
||||
internal sealed class XESecureStorage : ISecureStorage
|
||||
{
|
||||
bool IStorage.IsNativeSupportedBytes => false;
|
||||
bool ISecureStorage.IsNativeSupportedBytes => false;
|
||||
|
||||
Task<string?> IStorage.GetAsync(string key)
|
||||
Task<string?> ISecureStorage.GetAsync(string key)
|
||||
{
|
||||
return SecureStorage.GetAsync(key);
|
||||
}
|
||||
|
||||
Task IStorage.SetAsync(string key, string? value)
|
||||
Task ISecureStorage.SetAsync(string key, string? value)
|
||||
{
|
||||
if (string.IsNullOrEmpty(value))
|
||||
{
|
||||
@@ -25,13 +26,13 @@ namespace System.Security
|
||||
return SecureStorage.SetAsync(key, value);
|
||||
}
|
||||
|
||||
Task<bool> IStorage.RemoveAsync(string key)
|
||||
Task<bool> ISecureStorage.RemoveAsync(string key)
|
||||
{
|
||||
var result = SecureStorage.Remove(key);
|
||||
return Task.FromResult(result);
|
||||
}
|
||||
|
||||
async Task<bool> IStorage.ContainsKeyAsync(string key)
|
||||
async Task<bool> ISecureStorage.ContainsKeyAsync(string key)
|
||||
{
|
||||
var result = await SecureStorage.GetAsync(key);
|
||||
return result != null;
|
||||
@@ -26,19 +26,19 @@ namespace Microsoft.Extensions.DependencyInjection
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加由 Xamarin.Essentials.SecureStorage 或 Repository 实现的 <see cref="IStorage"/>
|
||||
/// 添加由 Xamarin.Essentials.SecureStorage 或 Repository 实现的 <see cref="ISecureStorage"/>
|
||||
/// </summary>
|
||||
/// <param name="services"></param>
|
||||
/// <returns></returns>
|
||||
public static IServiceCollection TryAddStorage(this IServiceCollection services)
|
||||
public static IServiceCollection TryAddSecureStorage(this IServiceCollection services)
|
||||
{
|
||||
if (DeviceInfo.Platform == DevicePlatform.Unknown)
|
||||
{
|
||||
services.TryAddSingleton<IStorage, DesktopClientStorage>();
|
||||
services.TryAddSingleton<ISecureStorage, RepositorySecureStorage>();
|
||||
}
|
||||
else
|
||||
{
|
||||
services.TryAddSingleton<IStorage, ClientStorage>();
|
||||
services.TryAddSingleton<ISecureStorage, XESecureStorage>();
|
||||
}
|
||||
return services;
|
||||
}
|
||||
@@ -73,5 +73,16 @@ namespace Microsoft.Extensions.DependencyInjection
|
||||
services.AddSingleton<ISecurityService, SecurityService>();
|
||||
return services;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加由 <see cref="PreferencesPlatformServiceImpl"/> 实现的 <see cref="IPreferencesPlatformService"/>
|
||||
/// </summary>
|
||||
/// <param name="services"></param>
|
||||
/// <returns></returns>
|
||||
public static IServiceCollection AddPreferences(this IServiceCollection services)
|
||||
{
|
||||
services.AddSingleton<IPreferencesPlatformService, PreferencesPlatformServiceImpl>();
|
||||
return services;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
using System.Application.Services;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System.Application.Services;
|
||||
using System.Text;
|
||||
|
||||
namespace System
|
||||
{
|
||||
@@ -18,5 +20,42 @@ namespace System
|
||||
var toast = DI.Get<IToast>();
|
||||
toast.Show(text, duration);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 通过 <see cref="Exception"/> 显示 Toast 并纪录日志,传入 <see cref="LogLevel.None"/> 可不写日志
|
||||
/// </summary>
|
||||
/// <param name="e"></param>
|
||||
/// <param name="tag"></param>
|
||||
/// <param name="level"></param>
|
||||
/// <param name="msg"></param>
|
||||
/// <param name="args"></param>
|
||||
public static void Show(Exception e, string? tag = null, LogLevel level = LogLevel.Error, string? msg = null, params string[] args)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(tag)) tag = nameof(Toast);
|
||||
var has_msg = !string.IsNullOrWhiteSpace(msg);
|
||||
var has_args = args.Any_Nullable();
|
||||
if (level < LogLevel.None)
|
||||
{
|
||||
var logger = Log.CreateLogger(tag);
|
||||
if (has_msg)
|
||||
{
|
||||
if (has_args)
|
||||
{
|
||||
logger.Log(level, e, msg!, args);
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.Log(level, e, msg!);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.Log(level, e, null);
|
||||
}
|
||||
}
|
||||
|
||||
var text = ExceptionExtensions.GetAllMessageCore(e, has_msg, has_args, msg, args);
|
||||
Show(text, ToastLength.Long);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Application.Entities;
|
||||
using System.Application.Entities;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
@@ -119,7 +119,7 @@ namespace System.Application.Repositories
|
||||
/// <exception cref="ArgumentNullException">
|
||||
/// 集合 或 <paramref name="predicate" /> 为 <see langword="null" />
|
||||
/// </exception>
|
||||
Task<TEntity?> FirstOrDefaultAsync(Expression<Func<TEntity, bool>> predicate);
|
||||
Task<TEntity?> FirstOrDefaultAsync(Expression<Func<TEntity, bool>> predicate, CancellationToken cancellation = default);
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace System.Application.Services
|
||||
string? requestUri,
|
||||
Func<HttpRequestMessage> requestFactory,
|
||||
string? accept,
|
||||
bool enableForward,
|
||||
//bool enableForward,
|
||||
CancellationToken cancellationToken,
|
||||
Action<HttpResponseMessage>? handlerResponse = null,
|
||||
Action<HttpResponseMessage>? handlerResponseByIsNotSuccessStatusCode = null,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
@@ -9,7 +9,7 @@ namespace System.Application.Services.Implementation
|
||||
/// <inheritdoc cref="IModelValidator"/>
|
||||
public class ModelValidator : IModelValidator
|
||||
{
|
||||
static readonly MethodInfo matchValidateMethod = typeof(ModelValidator).GetMethod(nameof(MatchValidate), BindingFlags.NonPublic | BindingFlags.Static);
|
||||
static readonly MethodInfo matchValidateMethod = typeof(ModelValidator).GetMethod(nameof(MatchValidate), BindingFlags.NonPublic | BindingFlags.Static)!;
|
||||
static readonly IDictionary<Type, object> validators = new Dictionary<Type, object>();
|
||||
|
||||
public static void AddColumnValidate<T>(Func<T, string?> validate)
|
||||
|
||||
@@ -5,7 +5,7 @@ using System.Diagnostics;
|
||||
namespace System.Application.Settings
|
||||
{
|
||||
[DebuggerDisplay("Value={Value}, Key={Key}, Default={Default}")]
|
||||
public class SerializableProperty<T> : INotifyPropertyChanged where T : notnull
|
||||
public class SerializableProperty<T> : INotifyPropertyChanged
|
||||
{
|
||||
protected T? _value;
|
||||
protected bool _cached;
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace System.Application.Settings
|
||||
return instances.TryGetValue(typeof(T), out var host) ? (T)host : new T();
|
||||
}
|
||||
|
||||
protected internal static SerializableProperty<T> GetProperty<T>(Func<string, string> getKey, ISerializationProvider provider, T? defaultValue, bool autoSave, string propertyName) where T : notnull => new(getKey(propertyName), provider, defaultValue) { AutoSave = autoSave };
|
||||
protected internal static SerializableProperty<T> GetProperty<T>(Func<string, string> getKey, ISerializationProvider provider, T? defaultValue, bool autoSave, string propertyName) => new(getKey(propertyName), provider, defaultValue) { AutoSave = autoSave };
|
||||
}
|
||||
|
||||
public static class SettingsHost
|
||||
@@ -85,7 +85,7 @@ namespace System.Application.Settings
|
||||
|
||||
static string GetKey(string propertyName) => $"{CategoryName}.{propertyName}";
|
||||
|
||||
public static SerializableProperty<T> GetProperty<T>(T? defaultValue, bool autoSave, [CallerMemberName] string propertyName = "") where T : notnull => GetProperty(GetKey, Local, defaultValue, autoSave, propertyName);
|
||||
public static SerializableProperty<T> GetProperty<T>(T? defaultValue, bool autoSave, [CallerMemberName] string propertyName = "") => GetProperty(GetKey, Local, defaultValue, autoSave, propertyName);
|
||||
}
|
||||
|
||||
///// <summary>
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace System.Application.UI.ViewModels
|
||||
int ItemViewType { get; }
|
||||
}
|
||||
|
||||
public interface IReadOnlyItemViewType<TItemViewType> : IReadOnlyItemViewType where TItemViewType : struct, IConvertible
|
||||
public interface IReadOnlyItemViewType<TItemViewType> : IReadOnlyItemViewType where TItemViewType : Enum
|
||||
{
|
||||
new TItemViewType ItemViewType { get; }
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netstandard2.1;netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
|
||||
<!--<TargetFrameworks>netstandard2.1;netcoreapp3.1;net5.0;net6.0</TargetFrameworks>-->
|
||||
<TargetFrameworks>netstandard2.1;net6.0</TargetFrameworks>
|
||||
<RootNamespace>System</RootNamespace>
|
||||
<AssemblyName>System.Common.CoreLib</AssemblyName>
|
||||
</PropertyGroup>
|
||||
@@ -16,6 +17,9 @@
|
||||
<PackageReference Include="gfoidl.Base64" />
|
||||
<PackageReference Include="MessagePack" />
|
||||
<PackageReference Include="Newtonsoft.Json" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition=" $(TargetFramework.StartsWith('netstandard')) ">
|
||||
<PackageReference Include="System.Text.Json" />
|
||||
<PackageReference Include="System.Text.Encodings.Web" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
using System.Globalization;
|
||||
using System.Linq.Expressions;
|
||||
|
||||
namespace System
|
||||
{
|
||||
public static class ConvertibleHelper
|
||||
{
|
||||
public static TOut Convert<TOut, TIn>(TIn value)
|
||||
{
|
||||
var parameter = Expression.Parameter(typeof(TIn));
|
||||
var dynamicMethod = Expression.Lambda<Func<TIn, TOut>>(
|
||||
Expression.Convert(parameter, typeof(TOut)),
|
||||
parameter);
|
||||
return dynamicMethod.Compile()(value);
|
||||
}
|
||||
|
||||
public static T? Convert<T>(IConvertible? value) where T : notnull
|
||||
{
|
||||
if (value == default) return default;
|
||||
var typeCode = Type.GetTypeCode(typeof(T));
|
||||
switch (typeCode)
|
||||
{
|
||||
case TypeCode.Boolean:
|
||||
return Convert<T, bool>(value.ToBoolean(CultureInfo.InvariantCulture));
|
||||
case TypeCode.Byte:
|
||||
return Convert<T, byte>(value.ToByte(CultureInfo.InvariantCulture));
|
||||
case TypeCode.Char:
|
||||
return Convert<T, char>(value.ToChar(CultureInfo.InvariantCulture));
|
||||
case TypeCode.DateTime:
|
||||
return Convert<T, DateTime>(value.ToDateTime(CultureInfo.InvariantCulture));
|
||||
case TypeCode.Decimal:
|
||||
return Convert<T, decimal>(value.ToDecimal(CultureInfo.InvariantCulture));
|
||||
case TypeCode.Double:
|
||||
return Convert<T, double>(value.ToDouble(CultureInfo.InvariantCulture));
|
||||
case TypeCode.Int16:
|
||||
return Convert<T, short>(value.ToInt16(CultureInfo.InvariantCulture));
|
||||
case TypeCode.Int32:
|
||||
return Convert<T, int>(value.ToInt32(CultureInfo.InvariantCulture));
|
||||
case TypeCode.Int64:
|
||||
return Convert<T, long>(value.ToInt64(CultureInfo.InvariantCulture));
|
||||
case TypeCode.SByte:
|
||||
return Convert<T, sbyte>(value.ToSByte(CultureInfo.InvariantCulture));
|
||||
case TypeCode.Single:
|
||||
return Convert<T, float>(value.ToSingle(CultureInfo.InvariantCulture));
|
||||
case TypeCode.UInt16:
|
||||
return Convert<T, ushort>(value.ToUInt16(CultureInfo.InvariantCulture));
|
||||
case TypeCode.UInt32:
|
||||
return Convert<T, uint>(value.ToUInt32(CultureInfo.InvariantCulture));
|
||||
case TypeCode.UInt64:
|
||||
return Convert<T, ulong>(value.ToUInt64(CultureInfo.InvariantCulture));
|
||||
case TypeCode.String:
|
||||
return Convert<T, string>(value.ToString(CultureInfo.InvariantCulture));
|
||||
case TypeCode.Object:
|
||||
var jsonString = value.ToString(CultureInfo.InvariantCulture);
|
||||
return Serializable.DJSON<T>(jsonString);
|
||||
case TypeCode.DBNull:
|
||||
case TypeCode.Empty:
|
||||
default:
|
||||
return default;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -29,5 +29,7 @@ namespace System
|
||||
public const string DateCN2 = "yyyy年M月d日";
|
||||
|
||||
public const string RFC1123 = "r";
|
||||
|
||||
public const string File = "yyyy-MM-dd HHmmssfffffff";
|
||||
}
|
||||
}
|
||||
+16
-22
@@ -31,16 +31,7 @@ namespace System
|
||||
public static IEnumerable<TEnum> FlagsSplit<TEnum>(TEnum resultant) where TEnum : struct, Enum
|
||||
=> GetAll<TEnum>().Where(x => resultant.HasFlag(x)).ToArray();
|
||||
|
||||
internal static TEnum ConvertToEnum<TEnum, TStruct>(this TStruct value)
|
||||
{
|
||||
var parameter = Expression.Parameter(typeof(TStruct));
|
||||
var dynamicMethod = Expression.Lambda<Func<TStruct, TEnum>>(
|
||||
Expression.Convert(parameter, typeof(TEnum)),
|
||||
parameter);
|
||||
return dynamicMethod.Compile()(value);
|
||||
}
|
||||
|
||||
public static int ConvertToInt32<TEnum>(TEnum value) where TEnum : Enum => ConvertToEnum<int, TEnum>(value);
|
||||
public static int ConvertToInt32<TEnum>(TEnum value) where TEnum : Enum => ConvertibleHelper.Convert<int, TEnum>(value);
|
||||
|
||||
/// <summary>
|
||||
/// 返回指定枚举值的描述(通过
|
||||
@@ -49,23 +40,26 @@ namespace System
|
||||
/// </summary>
|
||||
/// <param name="value">要获取描述的枚举值。</param>
|
||||
/// <returns>指定枚举值的描述。</returns>
|
||||
public static string? GetDescription<TEnum>(this TEnum value) where TEnum : struct, Enum
|
||||
public static string? GetDescription<TEnum>(this TEnum value) where TEnum : Enum
|
||||
{
|
||||
Type enumType = value.GetType();
|
||||
// 获取枚举常数名称。
|
||||
var name = Enum.GetName(enumType, value);
|
||||
if (name != null)
|
||||
if (value != null)
|
||||
{
|
||||
// 获取枚举字段。
|
||||
var fieldInfo = enumType.GetField(name);
|
||||
if (fieldInfo != null)
|
||||
Type enumType = value.GetType();
|
||||
// 获取枚举常数名称。
|
||||
var name = Enum.GetName(enumType, value);
|
||||
if (name != null)
|
||||
{
|
||||
if (Attribute.GetCustomAttribute(fieldInfo,
|
||||
typeof(DescriptionAttribute), false) is DescriptionAttribute description)
|
||||
// 获取枚举字段。
|
||||
var fieldInfo = enumType.GetField(name);
|
||||
if (fieldInfo != null)
|
||||
{
|
||||
if (description != null)
|
||||
if (Attribute.GetCustomAttribute(fieldInfo,
|
||||
typeof(DescriptionAttribute), false) is DescriptionAttribute description)
|
||||
{
|
||||
return description.Description;
|
||||
if (description != null)
|
||||
{
|
||||
return description.Description;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,8 +50,5 @@ namespace System
|
||||
}
|
||||
|
||||
// https://docs.microsoft.com/zh-cn/openspecs/windows_protocols/ms-lcid/a9eac961-e77d-41a6-90a5-ce1a8b0cdb9c
|
||||
|
||||
public const int LCID_zh_CN = 0x0804;
|
||||
public const int LCID_en_US = 0x0409;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// ReSharper disable once CheckNamespace
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace System
|
||||
{
|
||||
public static partial class EnumExtensions
|
||||
@@ -10,12 +10,68 @@ namespace System
|
||||
/// <returns>如果 enumType 中的某个常量的值等于 value,则为 <see langword="true"/>;否则为 <see langword="false"/></returns>
|
||||
public static bool IsDefined(this Enum value) => Enum.IsDefined(value.GetType(), value);
|
||||
|
||||
public static TEnum ConvertToEnum<TEnum>(this sbyte value)
|
||||
where TEnum : Enum
|
||||
=> ConvertibleHelper.Convert<TEnum, sbyte>(value);
|
||||
|
||||
public static TEnum ConvertToEnum<TEnum>(this byte value)
|
||||
where TEnum : Enum
|
||||
=> ConvertibleHelper.Convert<TEnum, byte>(value);
|
||||
|
||||
public static TEnum ConvertToEnum<TEnum>(this ushort value)
|
||||
where TEnum : Enum
|
||||
=> ConvertibleHelper.Convert<TEnum, ushort>(value);
|
||||
|
||||
public static TEnum ConvertToEnum<TEnum>(this short value)
|
||||
where TEnum : Enum
|
||||
=> ConvertibleHelper.Convert<TEnum, short>(value);
|
||||
|
||||
public static TEnum ConvertToEnum<TEnum>(this int value)
|
||||
where TEnum : struct, IConvertible
|
||||
=> Enum2.ConvertToEnum<TEnum, int>(value);
|
||||
where TEnum : Enum
|
||||
=> ConvertibleHelper.Convert<TEnum, int>(value);
|
||||
|
||||
public static TEnum ConvertToEnum<TEnum>(this uint value)
|
||||
where TEnum : Enum
|
||||
=> ConvertibleHelper.Convert<TEnum, uint>(value);
|
||||
|
||||
public static TEnum ConvertToEnum<TEnum>(this long value)
|
||||
where TEnum : Enum
|
||||
=> ConvertibleHelper.Convert<TEnum, long>(value);
|
||||
|
||||
public static TEnum ConvertToEnum<TEnum>(this ulong value)
|
||||
where TEnum : Enum
|
||||
=> ConvertibleHelper.Convert<TEnum, ulong>(value);
|
||||
|
||||
public static sbyte ConvertToSByte<TEnum>(this TEnum value)
|
||||
where TEnum : Enum
|
||||
=> ConvertibleHelper.Convert<sbyte, TEnum>(value);
|
||||
|
||||
public static byte ConvertToByte<TEnum>(this TEnum value)
|
||||
where TEnum : Enum
|
||||
=> ConvertibleHelper.Convert<byte, TEnum>(value);
|
||||
|
||||
public static ushort ConvertToUInt16<TEnum>(this TEnum value)
|
||||
where TEnum : Enum
|
||||
=> ConvertibleHelper.Convert<ushort, TEnum>(value);
|
||||
|
||||
public static short ConvertToInt16<TEnum>(this TEnum value)
|
||||
where TEnum : Enum
|
||||
=> ConvertibleHelper.Convert<short, TEnum>(value);
|
||||
|
||||
public static uint ConvertToUInt32<TEnum>(this TEnum value)
|
||||
where TEnum : Enum
|
||||
=> ConvertibleHelper.Convert<uint, TEnum>(value);
|
||||
|
||||
public static int ConvertToInt32<TEnum>(this TEnum value)
|
||||
where TEnum : struct, IConvertible
|
||||
=> Enum2.ConvertToEnum<int, TEnum>(value);
|
||||
where TEnum : Enum
|
||||
=> ConvertibleHelper.Convert<int, TEnum>(value);
|
||||
|
||||
public static ulong ConvertToUInt64<TEnum>(this TEnum value)
|
||||
where TEnum : Enum
|
||||
=> ConvertibleHelper.Convert<ulong, TEnum>(value);
|
||||
|
||||
public static long ConvertToInt64<TEnum>(this TEnum value)
|
||||
where TEnum : Enum
|
||||
=> ConvertibleHelper.Convert<long, TEnum>(value);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
using System.Properties;
|
||||
|
||||
@@ -15,7 +16,7 @@ namespace System
|
||||
/// <param name="first">一个用于比较 second 的 <see cref="IEnumerable{T}"/></param>
|
||||
/// <param name="second">要与第一个序列进行比较的 <see cref="IEnumerable{T}"/></param>
|
||||
/// <returns></returns>
|
||||
public static bool SequenceEqual_Nullable<TSource>(this IEnumerable<TSource>? first, IEnumerable<TSource>? second)
|
||||
public static bool SequenceEqual_Nullable<TSource>([NotNullWhen(true)] this IEnumerable<TSource>? first, IEnumerable<TSource>? second)
|
||||
{
|
||||
if (first == null) return second == null;
|
||||
if (second == null) return first == null;
|
||||
@@ -28,7 +29,7 @@ namespace System
|
||||
/// <typeparam name="TSource">source 的元素类型</typeparam>
|
||||
/// <param name="source">要检查是否为空的 <see cref="IEnumerable{T}"/></param>
|
||||
/// <returns>如果源序列包含任何元素,则为 <see langword="true"/>;否则为 <see langword="false"/></returns>
|
||||
public static bool Any_Nullable<TSource>(this IEnumerable<TSource>? source)
|
||||
public static bool Any_Nullable<TSource>([NotNullWhen(true)] this IEnumerable<TSource>? source)
|
||||
{
|
||||
if (source is null) return false;
|
||||
return source.Any();
|
||||
@@ -41,7 +42,7 @@ namespace System
|
||||
/// <param name="source"></param>
|
||||
/// <param name="predicate"></param>
|
||||
/// <returns></returns>
|
||||
public static bool Any_Nullable<TSource>(this IEnumerable<TSource>? source, Func<TSource, bool> predicate)
|
||||
public static bool Any_Nullable<TSource>([NotNullWhen(true)] this IEnumerable<TSource>? source, Func<TSource, bool> predicate)
|
||||
{
|
||||
if (source == null) return false;
|
||||
return source.Any(predicate);
|
||||
@@ -121,5 +122,33 @@ namespace System
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// 从 System.Collections.Generic.IEnumerable 创建 System.Collections.Generic.Dictionary (重复键使用第一个)
|
||||
/// </summary>
|
||||
/// <typeparam name="TElement"></typeparam>
|
||||
/// <typeparam name="TKey"></typeparam>
|
||||
/// <typeparam name="TValue"></typeparam>
|
||||
/// <param name="source"></param>
|
||||
/// <param name="keyGetter"></param>
|
||||
/// <param name="valueGetter"></param>
|
||||
/// <returns></returns>
|
||||
public static Dictionary<TKey, TValue> ToDictionaryIgnoreRepeat<TElement, TKey, TValue>(
|
||||
this IEnumerable<TElement> source,
|
||||
Func<TElement, TKey> keyGetter,
|
||||
Func<TElement, TValue> valueGetter)
|
||||
{
|
||||
var dict = new Dictionary<TKey, TValue>();
|
||||
foreach (var e in source)
|
||||
{
|
||||
var key = keyGetter(e);
|
||||
if (dict.ContainsKey(key))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
dict.Add(key, valueGetter(e));
|
||||
}
|
||||
return dict;
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user