Skip to content

Commit 65af775

Browse files
committed
v2.5
## 客户端 ### 新改动: - 框架升级到DotNet6,应该有一点性能提升,得问微软😄 - 窗口改为WPF,增加loading提示 - 启用动态端口,防止端口被占用无法使用 - 修改壁纸参数后立即生效,上个版本需要手动切一下 - 优化本地UI,在较小宽度也能完全显示 - 取消封面必填限制 - 分辨率变化后,壁纸也跟随变化 - 拉伸选项改为壁纸参数,不再提供全局拉伸设置 - 修改窗口后保存宽高信息,下次启动也保持这个大小 - 右键菜单增加客户端访问壁纸社区 - 本地壁纸文字优化,防止误导用户认为需要上传到服务器 - 修复本地大文件壁纸(30GB)创建失败问题 ### BUG修复: - 修复分组时间设置不了的BUG - 兼容Fences3,特别感谢 @stdinfo 提交问题并帮助定位 - 重启客户端壁纸没有播放声音问题 ## 服务端 ### 新改动: - 增加按下载热门排序壁纸 - 优化创建壁纸时截图等待时间过长问题 - 壁纸详情显示后缀名 - 资源文件全球加速 - 取消封面必填限制 - 点击返回按钮有时卡顿问题
1 parent 62cebcc commit 65af775

File tree

262 files changed

+2366
-1991
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

262 files changed

+2366
-1991
lines changed

LiveWallpaper.App/LiveWallpaper.App.wapproj

+11-64
Original file line numberDiff line numberDiff line change
@@ -20,61 +20,25 @@
2020
<Configuration>Release</Configuration>
2121
<Platform>x64</Platform>
2222
</ProjectConfiguration>
23-
<ProjectConfiguration Include="Debug|ARM">
24-
<Configuration>Debug</Configuration>
25-
<Platform>ARM</Platform>
26-
</ProjectConfiguration>
27-
<ProjectConfiguration Include="Release|ARM">
28-
<Configuration>Release</Configuration>
29-
<Platform>ARM</Platform>
30-
</ProjectConfiguration>
31-
<ProjectConfiguration Include="Debug|ARM64">
32-
<Configuration>Debug</Configuration>
33-
<Platform>ARM64</Platform>
34-
</ProjectConfiguration>
35-
<ProjectConfiguration Include="Release|ARM64">
36-
<Configuration>Release</Configuration>
37-
<Platform>ARM64</Platform>
38-
</ProjectConfiguration>
39-
<ProjectConfiguration Include="Debug|AnyCPU">
40-
<Configuration>Debug</Configuration>
41-
<Platform>AnyCPU</Platform>
42-
</ProjectConfiguration>
43-
<ProjectConfiguration Include="Release|AnyCPU">
44-
<Configuration>Release</Configuration>
45-
<Platform>AnyCPU</Platform>
46-
</ProjectConfiguration>
4723
</ItemGroup>
4824
<PropertyGroup>
4925
<WapProjPath Condition="'$(WapProjPath)'==''">$(MSBuildExtensionsPath)\Microsoft\DesktopBridge\</WapProjPath>
5026
</PropertyGroup>
5127
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.props" />
5228
<PropertyGroup>
5329
<ProjectGuid>ffd18cde-91f1-493a-a249-2f6ac2a9b7c8</ProjectGuid>
54-
<TargetPlatformVersion>10.0.19041.0</TargetPlatformVersion>
30+
<TargetPlatformVersion>10.0.22000.0</TargetPlatformVersion>
5531
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
5632
<DefaultLanguage>zh-CN</DefaultLanguage>
57-
<AppxPackageSigningEnabled>True</AppxPackageSigningEnabled>
33+
<AppxPackageSigningEnabled>false</AppxPackageSigningEnabled>
34+
<NoWarn>$(NoWarn);NU1702</NoWarn>
35+
<EntryPointProjectUniqueName>..\LiveWallpaper.Shell\LiveWallpaper.Shell.csproj</EntryPointProjectUniqueName>
5836
<GenerateAppInstallerFile>False</GenerateAppInstallerFile>
59-
<AppxPackageSigningTimestampDigestAlgorithm>SHA256</AppxPackageSigningTimestampDigestAlgorithm>
60-
<GenerateTemporaryStoreCertificate>True</GenerateTemporaryStoreCertificate>
61-
<!--<PackageCertificateThumbprint>A16CDCC9A72EE6D43A669DCF0E5BE35951B915C1</PackageCertificateThumbprint>-->
62-
<!--<PackageCertificateThumbprint>16C485B3AD663226D82AC45A21AA8C6A524BC4DC</PackageCertificateThumbprint>-->
63-
<!--<PackageCertificateThumbprint>5E45915E1A14F5325493813152D9C469DB25ED81</PackageCertificateThumbprint>-->
64-
<AppxAutoIncrementPackageRevision>True</AppxAutoIncrementPackageRevision>
37+
<AppxAutoIncrementPackageRevision>False</AppxAutoIncrementPackageRevision>
6538
<GenerateTestArtifacts>True</GenerateTestArtifacts>
6639
<AppxBundlePlatforms>x86|x64</AppxBundlePlatforms>
67-
<AppInstallerUri>https://livewallpaper.giantapp.cn/</AppInstallerUri>
40+
<GenerateTemporaryStoreCertificate>True</GenerateTemporaryStoreCertificate>
6841
<HoursBetweenUpdateChecks>0</HoursBetweenUpdateChecks>
69-
<EntryPointProjectUniqueName>..\LiveWallpaper\LiveWallpaper.csproj</EntryPointProjectUniqueName>
70-
</PropertyGroup>
71-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
72-
<AppxBundle>Always</AppxBundle>
73-
<DefaultLanguage>en</DefaultLanguage>
74-
</PropertyGroup>
75-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
76-
<AppxBundle>Always</AppxBundle>
77-
<DefaultLanguage>en</DefaultLanguage>
7842
</PropertyGroup>
7943
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x86'">
8044
<AppxBundle>Always</AppxBundle>
@@ -84,38 +48,19 @@
8448
<AppxBundle>Always</AppxBundle>
8549
<DefaultLanguage>en</DefaultLanguage>
8650
</PropertyGroup>
87-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
88-
<AppxBundle>Always</AppxBundle>
89-
<DefaultLanguage>en</DefaultLanguage>
90-
</PropertyGroup>
91-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
92-
<AppxBundle>Always</AppxBundle>
93-
<DefaultLanguage>en</DefaultLanguage>
94-
</PropertyGroup>
9551
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x86'">
9652
<AppxBundle>Always</AppxBundle>
9753
<DefaultLanguage>en</DefaultLanguage>
9854
</PropertyGroup>
99-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
100-
<AppxBundle>Always</AppxBundle>
101-
<DefaultLanguage>en</DefaultLanguage>
102-
</PropertyGroup>
10355
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
10456
<AppxBundle>Always</AppxBundle>
10557
<DefaultLanguage>en</DefaultLanguage>
10658
</PropertyGroup>
107-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
108-
<AppxBundle>Always</AppxBundle>
109-
<DefaultLanguage>en</DefaultLanguage>
110-
</PropertyGroup>
11159
<ItemGroup>
11260
<AppxManifest Include="Package.appxmanifest">
11361
<SubType>Designer</SubType>
11462
</AppxManifest>
11563
</ItemGroup>
116-
<ItemGroup>
117-
<None Include="Package.StoreAssociation.xml" />
118-
</ItemGroup>
11964
<ItemGroup>
12065
<Content Include="Images\AppList\AppList.scale-100.png" />
12166
<Content Include="Images\AppList\AppList.scale-125.png" />
@@ -167,13 +112,15 @@
167112
<Content Include="Images\Wide\Wide310x150Logo.scale-150.png" />
168113
<Content Include="Images\Wide\Wide310x150Logo.scale-200.png" />
169114
<Content Include="Images\Wide\Wide310x150Logo.scale-400.png" />
115+
<None Include="Package.StoreAssociation.xml" />
170116
<PRIResource Include="Strings\zh-chs-Hans\Resources.resw" />
171117
<PRIResource Include="Strings\en\Resources.resw" />
172118
</ItemGroup>
173119
<ItemGroup>
174-
<ProjectReference Include="..\LiveWallpaper\LiveWallpaper.csproj">
175-
<SkipGetTargetFrameworkProperties>True</SkipGetTargetFrameworkProperties>
176-
</ProjectReference>
120+
<ProjectReference Include="..\LiveWallpaper.Shell\LiveWallpaper.Shell.csproj" />
177121
</ItemGroup>
178122
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.targets" />
123+
<ItemGroup>
124+
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22000.196" PrivateAssets="all" />
125+
</ItemGroup>
179126
</Project>

LiveWallpaper.App/Package.appxmanifest

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
xmlns:com="http://schemas.microsoft.com/appx/manifest/com/windows10"
99
xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10"
1010
IgnorableNamespaces="uap mp rescap com desktop">
11-
<Identity Name="24765mscoder.107453A6A4A17" Publisher="CN=49BC8659-1B4C-4520-B1FB-ED98CFA366C4" Version="2.4.102.0" />
11+
<Identity Name="24765mscoder.107453A6A4A17" Publisher="CN=49BC8659-1B4C-4520-B1FB-ED98CFA366C4" Version="2.5.1.0" />
1212
<Properties>
1313
<DisplayName>ms-resource:Resources/PackageDisplayName</DisplayName>
1414
<PublisherDisplayName>Giantapp Studio</PublisherDisplayName>
@@ -29,7 +29,7 @@
2929
</uap:DefaultTile>
3030
</uap:VisualElements>
3131
<Extensions>
32-
<uap5:Extension Category="windows.startupTask" Executable="LiveWallpaper\LiveWallpaper.exe" EntryPoint="Windows.FullTrustApplication">
32+
<uap5:Extension Category="windows.startupTask" Executable="LiveWallpaper.Shell\LiveWallpaper.exe" EntryPoint="Windows.FullTrustApplication">
3333
<uap5:StartupTask TaskId="LiveWallpaper" Enabled="true" DisplayName="LiveWallpaper" />
3434
</uap5:Extension>
3535
<uap:Extension Category="windows.protocol">
@@ -47,7 +47,7 @@
4747
<!--Register COM CLSID LocalServer32 registry key-->
4848
<com:Extension Category="windows.comServer">
4949
<com:ComServer>
50-
<com:ExeServer Executable="LiveWallpaper\LiveWallpaper.exe" Arguments="-ToastActivated" DisplayName="Toast activator">
50+
<com:ExeServer Executable="LiveWallpaper.Shell\LiveWallpaper.exe" Arguments="-ToastActivated" DisplayName="Toast activator">
5151
<com:Class Id="dec74eb7-0834-4c07-9656-e510e7d71f7a" DisplayName="Toast activator"/>
5252
</com:ExeServer>
5353
</com:ComServer>
@@ -58,7 +58,7 @@
5858
<Capabilities>
5959
<Capability Name="internetClient" />
6060
<uap:Capability Name="videosLibrary" />
61-
<rescap:Capability Name="runFullTrust" />
61+
<rescap:Capability Name="runFullTrust" />
6262
<!--允许管理员权限--><!--
6363
<rescap:Capability Name="allowElevation" />-->
6464
</Capabilities>

LiveWallpaper.App/Strings/en/Resources.resw

+2-2
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,10 @@
121121
<value>An open source Windows10 wallpaper software that supports live wallpaper. the source code : https://github.com/giant-app/LiveWallpaper</value>
122122
</data>
123123
<data name="ApplicationDisplayName" xml:space="preserve">
124-
<value>LiveWallpaper Beta</value>
124+
<value>LiveWallpaper Insider</value>
125125
</data>
126126
<data name="PackageDisplayName" xml:space="preserve">
127-
<value>LiveWallpaper Beta</value>
127+
<value>LiveWallpaper Insider</value>
128128
</data>
129129
<data name="PublisherDisplayName" xml:space="preserve">
130130
<value>Giantapp Studio</value>

LiveWallpaper.App/Strings/zh-chs-Hans/Resources.resw

+2-2
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,10 @@
121121
<value>一个开源的Windows10壁纸软件,支持动态壁纸。 源代码: https://github.com/giant-app/LiveWallpaper</value>
122122
</data>
123123
<data name="ApplicationDisplayName" xml:space="preserve">
124-
<value>巨应壁纸 Beta</value>
124+
<value>巨应壁纸 预览版</value>
125125
</data>
126126
<data name="PackageDisplayName" xml:space="preserve">
127-
<value>巨应壁纸 Beta</value>
127+
<value>巨应壁纸 预览版</value>
128128
</data>
129129
<data name="PublisherDisplayName" xml:space="preserve">
130130
<value>巨应工作室</value>

LiveWallpaper.LocalServer/AppManager.cs

+23-14
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ static AppManager()
3939
{
4040
ConfigDir = $"{Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)}\\{AppName}\\";
4141
}
42-
CacheDir = $"{ConfigDir}Cache\\";
42+
//https://github.com/MicrosoftEdge/WebView2Feedback/issues/1900
43+
//CacheDir = $"{ConfigDir}Cache\\"; 配置路径过长导致webview2 service worker出bug
44+
CacheDir = $"{Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)}\\{AppName}\\Cache\\";
4345
RunningDataFilePath = $"{ConfigDir}Config\\runningData.json";
4446
UserSettingFilePath = $"{ConfigDir}Config\\userSetting.json";
4547
LogDir = $"{ConfigDir}/Logs";
@@ -130,6 +132,7 @@ public static FileDownloader PlayerDownloader
130132
public static RunningData RunningData { get; private set; }
131133
public static UserSetting UserSetting { get; private set; }
132134
public static bool Initialized { get; private set; }
135+
public static string EntryVersion { get; private set; }
133136
public static event EventHandler CultureChanged;
134137
#endregion
135138

@@ -165,16 +168,16 @@ public static async Task Initialize(int hostPort)
165168
}
166169
//更新端口号
167170
RunningData.HostPort = hostPort;
168-
var version = Assembly.GetEntryAssembly().GetName().Version.ToString();
171+
EntryVersion = Assembly.GetEntryAssembly().GetName().Version.ToString();
169172

170173
if (RunningData.CurrentVersion == null)
171174
{
172175
_ = ShowGuidToastAsync();//第一次启动
173176
}
174177

175-
if (RunningData.CurrentVersion != version)
178+
if (RunningData.CurrentVersion != EntryVersion)
176179
{
177-
RunningData.CurrentVersion = version;
180+
RunningData.CurrentVersion = EntryVersion;
178181
RunningData.CurrentVersionLaunchedCount = 0;
179182
RunningData.CurrentVersionReviewed = false;
180183
}
@@ -185,7 +188,7 @@ public static async Task Initialize(int hostPort)
185188

186189
await JsonHelper.JsonSerializeAsync(RunningData, RunningDataFilePath);
187190

188-
if (!RunningData.CurrentVersionReviewed && RunningData.CurrentVersionLaunchedCount > 0 && RunningData.CurrentVersionLaunchedCount % 30 == 0)
191+
if (!RunningData.CurrentVersionReviewed && RunningData.CurrentVersionLaunchedCount > 0 && RunningData.CurrentVersionLaunchedCount % 15 == 0)
189192
{
190193
ShowReviewToast();
191194
}
@@ -209,8 +212,14 @@ public static async Task Initialize(int hostPort)
209212
{
210213
foreach (var item in RunningData.CurrentWalpapers)
211214
{
212-
var r = await WallpaperApi.ShowWallpaper(item.Value, item.Key);
213-
System.Diagnostics.Debug.WriteLine($"{r.Ok},{r.Error}");
215+
string screen = item.Key;
216+
if (item.Value != null && item.Value.RunningData != null && item.Value.RunningData.Dir != null)
217+
{
218+
//重新读取模型,有可能保存的是脏数据
219+
var wallpaper = await WallpaperApi.CreateWallpaperModelFromDir(item.Value.RunningData.Dir, true);
220+
var r = await WallpaperApi.ShowWallpaper(wallpaper, screen);
221+
System.Diagnostics.Debug.WriteLine($"{r.Ok},{r.Error}");
222+
}
214223
}
215224
}
216225
}
@@ -229,9 +238,9 @@ public static async Task ShowGuidToastAsync()
229238
string appDir = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
230239
string imgPath = Path.Combine(appDir, "Assets\\guide.gif");
231240
new ToastContentBuilder()
232-
.AddText(await GetText("client.started"))
241+
.AddText(await GetText("clientStarted"))
233242
.AddHeroImage(new Uri(imgPath))
234-
.AddButton(new ToastButtonDismiss(await GetText("common.ok")))
243+
.AddButton(new ToastButtonDismiss(await GetText("ok")))
235244
.Show();
236245
}
237246

@@ -247,11 +256,11 @@ private static async void ShowReviewToast()
247256
{
248257
new AdaptiveText()
249258
{
250-
Text =await GetText("common.reviewTitle")
259+
Text =await GetText("reviewTitle")
251260
},
252261
new AdaptiveText()
253262
{
254-
Text = await GetText("common.reviewContent")
263+
Text = await GetText("reviewContent")
255264
}
256265
}
257266
}
@@ -260,11 +269,11 @@ private static async void ShowReviewToast()
260269
{
261270
Buttons =
262271
{
263-
new ToastButton(await GetText("common.thumbUp"), "action=review")
272+
new ToastButton(await GetText("thumbUp"), "action=review")
264273
{
265274
ActivationType = ToastActivationType.Background
266275
},
267-
new ToastButtonDismiss(await GetText("common.close"))
276+
new ToastButtonDismiss(await GetText("close"))
268277
}
269278
},
270279
Launch = "action=viewEvent&eventId=63851"
@@ -309,7 +318,7 @@ internal static async Task SaveCurrentWalpapers()
309318
await SaveRunningData(RunningData);
310319
}
311320

312-
internal static async Task<BaseApiResult> SaveUserSetting(UserSetting setting)
321+
public static async Task<BaseApiResult> SaveUserSetting(UserSetting setting)
313322
{
314323
try
315324
{

LiveWallpaper.LocalServer/Controllers/LiveWallpaperController.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using Giantapp.LiveWallpaper.Engine;
22
using Microsoft.AspNetCore.Http;
33
using Microsoft.AspNetCore.Mvc;
4+
using System;
45
using System.IO;
56
using System.Reflection;
67
using System.Threading.Tasks;
@@ -15,8 +16,8 @@ public IActionResult Version()
1516
return Content(version.ToString());
1617
}
1718

18-
[RequestSizeLimit(10L * 1024L * 1024L * 1024L)]
19-
[RequestFormLimits(MultipartBodyLengthLimit = 10L * 1024L * 1024L * 1024L)]
19+
[RequestSizeLimit(long.MaxValue)]
20+
[RequestFormLimits(MultipartBodyLengthLimit = long.MaxValue)]
2021
public async Task<BaseApiResult<string>> UploadFile(IFormCollection fc)
2122
{
2223
string distDir = fc["distDir"];
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,25 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

3-
<PropertyGroup>
4-
<TargetFramework>net5.0-windows10.0.17763.0</TargetFramework>
5-
<OutputType>Library</OutputType>
6-
<Platforms>x64;x86</Platforms>
7-
</PropertyGroup>
3+
<PropertyGroup>
4+
<TargetFramework>net6.0-windows10.0.22000.0</TargetFramework>
5+
<SupportedOSPlatformVersion>10.0.17763.0</SupportedOSPlatformVersion>
6+
<OutputType>Library</OutputType>
7+
<Platforms>x64;x86</Platforms>
8+
</PropertyGroup>
89

9-
<ItemGroup>
10-
<Compile Remove="Controllers\WallpaperController.cs" />
11-
</ItemGroup>
10+
<ItemGroup>
11+
<Compile Remove="Controllers\WallpaperController.cs" />
12+
</ItemGroup>
1213

13-
<ItemGroup>
14-
<PackageReference Include="DesktopBridge.Helpers" Version="1.2.2" />
15-
<PackageReference Include="DotNetUtil.Common" Version="2.0.13" />
16-
<PackageReference Include="Microsoft.Toolkit.Uwp.Notifications" Version="7.1.0" />
17-
<PackageReference Include="NLog" Version="4.7.11" />
18-
<PackageReference Include="Xabe.FFmpeg" Version="5.0.2" />
19-
</ItemGroup>
14+
<ItemGroup>
15+
<PackageReference Include="DesktopBridge.Helpers" Version="1.2.2" />
16+
<PackageReference Include="DotNetUtil.Common" Version="2.0.13" />
17+
<PackageReference Include="Microsoft.Toolkit.Uwp.Notifications" Version="7.1.2" />
18+
<PackageReference Include="NLog" Version="4.7.13" />
19+
<PackageReference Include="Xabe.FFmpeg" Version="5.0.2" />
20+
</ItemGroup>
2021

21-
<ItemGroup>
22-
<ProjectReference Include="..\LiveWallpaperEngineAPI\LiveWallpaperEngineAPI.csproj" />
23-
</ItemGroup>
24-
25-
<ItemGroup>
26-
<Content Update="wwwroot\**\*.*">
27-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
28-
</Content>
29-
</ItemGroup>
30-
</Project>
22+
<ItemGroup>
23+
<ProjectReference Include="..\LiveWallpaperEngineAPI\LiveWallpaperEngineAPI.csproj" />
24+
</ItemGroup>
25+
</Project>

LiveWallpaper.LocalServer/Models/UserSetting.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ public string ThirdpartToolsDir
4040
_ThirdpartToolsDir = value;
4141
}
4242
}
43+
public string WindowHeight { get; set; }
44+
public string WindowWidth { get; set; }
45+
public string WindowState { get; set; }
4346

4447
public static string GetDefaultThirdpartToolsDir()
4548
{
@@ -75,7 +78,7 @@ public void FixScreenOptions()
7578
if (ScreenOptions == null)
7679
ScreenOptions = new List<ScreenOption>();
7780

78-
if (WallpaperApi.Screens == null)
81+
if (WallpaperApi.Screens == null)
7982
return;
8083

8184
foreach (var screenItem in WallpaperApi.Screens)

LiveWallpaper.LocalServer/wwwroot/_nuxt/082a81b.js

-2
This file was deleted.

0 commit comments

Comments
 (0)