Skip to content

Commit

Permalink
Merge pull request #782 from ywmoyue/dev
Browse files Browse the repository at this point in the history
4.7.2
  • Loading branch information
ywmoyue authored Aug 21, 2024
2 parents efda680 + 7cec99d commit 6ece755
Show file tree
Hide file tree
Showing 49 changed files with 596 additions and 125 deletions.
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ body:
label: 日志
description: 如果可以,提交日志更有助于我们分析问题。但请注意,日志可能泄露你的敏感信息,如果介意,可以在提交完issue后将日志文件发送至开发者邮箱
placeholder: |
日志文件在应用的设置页帮助页最底下可以找到
日志文件在应用的设置页开发者选项页可以找到
如果是闪退问题,需要将日志级别设置为Trace并复现问题后提供日志
开发者邮箱在应用设置页关于页可以找到
- type: textarea
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ jobs:
git clone https://github.com/ywmoyue/OnlinePageToPDF-Node.git
cd OnlinePageToPDF-Node
npm install
node index.js --waitTime=35000 --pageUrl="http://markdown.muyan233.top:352/?fileUrl=https%3A%2F%2Fraw.githubusercontent.com%2Fywmoyue%2Fbiliuwp-lite%2Fmaster%2Fdocument%2Finstall-readme.md" --pdfFilePath="安装教程.pdf"
node index.js --waitTime=35000 --pageUrl="http://markdown.muyan233.top:352/?fileUrl=https%3A%2F%2Fraw.githubusercontent.com%2Fywmoyue%2Fbiliuwp-lite%2Fdev%2Fdocument%2Finstall-readme.md" --pdfFilePath="安装教程.pdf"
cd ..
cp ./OnlinePageToPDF-Node/安装教程.pdf C:\Package\安装教程.pdf
Expand Down
Binary file modified document/_img/check-ps1-permission-01.drawio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 35 additions & 19 deletions document/install-readme.md
Original file line number Diff line number Diff line change
@@ -1,68 +1,84 @@
# Biliuwp-lite安装教程
<link rel="stylesheet" href="https://support.microsoft.com/css/glyphs/glyphs.css?v=N9jMfMIoO_s7OATN0j5LYqmO9MCqHDjfpaUV2RuaEy8"/> <!-- <p>先别删这行,在测试显示windowslogo</p> -->
<link rel="stylesheet" href="https://support.microsoft.com/css/fonts/site-fonts.css?v=4M_1wOASateOs9zdphCtIqMvtKo366Gf6pkOjDqzkYo">

# Biliuwp-lite安装教程
- [Windows10 安装教程](install-readme.md#Windows10)
- [Windows11 安装教程](install-readme.md#Windows11)
- [常见问题](install-readme.md#其他问题)
- [网络/代理问题](install-readme.md#网络代理问题)
## 安装要求系统版本信息

1. Windows10 1903及以上
- Windows10 1903及以上

## Windows10 安装教程

> Win10系统请勿直接运行msix安装包进行安装,可能导致奇怪的问题
> Win11系统请往下翻
## Windows10

> Win10系统请勿直接运行`.msix`安装包进行安装,可能导致奇怪的问题
### 启用开发者模式

1. 如图所示在系统设置中操作
1. 点<kbd>Windows</kbd><span class="icon-fluent icon-windowslogo" aria-hidden="true"></span>+<kbd>I</kbd>键打开 `Windows设置` 按图所示操作
![](./_img/win10-developer-mode-01.drawio.png)
![](./_img/win10-developer-mode-02.drawio.png)

### 安装证书

1双击打开.cer 证书文件如果没有.cer 证书文件则右键.appx 文件-属性-数字签名-详细
1. 双击打开 `.cer` 证书文件. 如果没有 `.cer` 证书文件则右键 `.appx` 文件-属性-数字签名-详细
信息-查看证书
![](./_img/install-cert-01.drawio.png)

2点击安装证书,将证书安装到本地计算机
2. 点击安装证书,将证书安装到本地计算机

![](./_img/install-cert-02.drawio.png)

3选择受信任的根证书颁发机构,下一步,完成即可
3. 选择受信任的根证书颁发机构,下一步,完成即可

![](./_img/install-cert-03.drawio.png)

### 检查脚本执行权限

1. 以管理员身份启动powershell
1. 点<kbd>Windows</kbd>+<kbd>X</kbd>键并选择以管理员身份启动 终端/PowerShell

![](./_img/check-ps1-permission-01.drawio.png)

2. 执行命令`get-ExecutionPolicy`, 如果输出`Restricted`表示禁止执行脚本,如果输出`RemoteSigned`表示可以执行脚本
2. 执行命令 `get-ExecutionPolicy`, 如果输出 `Restricted` 表示 禁止执行脚本,如果输出 `RemoteSigned` 表示 可以执行脚本

![](./_img/check-ps1-permission-02.drawio.png)

3. 执行命令`Set-ExecutionPolicy -ExecutionPolicy RemoteSigned`并按Y启用脚本执行权限
3. 执行命令`Set-ExecutionPolicy -ExecutionPolicy RemoteSigned`并按<kbd>Y</kbd>键启用脚本执行权限

### 运行安装脚本

1. 在安装包解压目录中按住键盘shift并单击鼠标右键打开powershell,执行脚本`.\Install.ps1`开始安装
1. 在安装包解压目录中按住键盘shift并单击鼠标右键打开powershell,执行脚本 `.\Install.ps1` 开始安装

![](./_img/run-ps1-script.drawio.png)

## Windows11 安装教程

## Windows11
### 安装证书

1、双击打开.cer 证书文件。如果没有.cer 证书文件则右键.appx 文件-属性-数字签名-详细
信息-查看证书
1. 双击打开 `.cer` 证书文件. 如果没有 `.cer` 证书文件则 **右键 `.appx` 文件-属性-数字签名-详细信息-查看证书**
![](./_img/install-cert-01.drawio.png)

2点击安装证书,将证书安装到本地计算机
2. 点击安装证书,将证书安装到`本地计算机`

![](./_img/install-cert-02.drawio.png)

3、选择受信任的根证书颁发机构,下一步,完成即可
3. 选择受`信任的根证书颁发机构`,下一步,完成即可

![](./_img/install-cert-03.drawio.png)

### 运行Msix安装包

![](./_img/install-msix.drawio.png)
![](./_img/install-msix.drawio.png)

## 其他问题:
### 网络/代理问题
1. 脚本安装后无法在 Clash For Windows<sup>1</sup> 中解除对此UWP应用的联网限制
- 可尝试再脚本安装后再使用`.msix`安装包包 Reinstall 一遍(此解决方案仅限 Windows11, WIndows10 未经测试)
- 如有更好解决方案可[点此前往 Github](https://github.com/ywmoyue/biliuwp-lite/issues/new/choose)提交 issue

---
#### 注1: [Clash For Windows](https://github.com/Z-Siqi/Clash-for-Windows_Chinese) 是一款基于Clash核心的图形界面代理软件,它通过提供一个友好的界面来帮助你简单配置和管理网络代理,让你可以更自由、灵活地浏览全球互联网内容。


28 changes: 7 additions & 21 deletions src/BiliLite.UWP/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Navigation;
using BiliLite.Pages;
using BiliLite.ViewModels.Download;
using Microsoft.Extensions.DependencyInjection;

Expand Down Expand Up @@ -65,7 +66,7 @@ private void CurrentDomain_UnhandledException(object sender, System.UnhandledExc
}
else
{
logger.Log("程序运行出现错误:"+e.ExceptionObject, LogType.Error);
logger.Log("程序运行出现错误:" + e.ExceptionObject, LogType.Error);
}
}

Expand Down Expand Up @@ -176,27 +177,12 @@ private async void Navigation(object arguments, bool prelaunch = false)
{
if (rootFrame.Content == null)
{
// 当导航堆栈尚未还原时,导航到第一页,
// 并通过将所需信息作为导航参数传入来配置
// 参数

var mode = SettingService.GetValue<int>(SettingConstants.UI.DISPLAY_MODE, 0);
if (mode == 0)
{
rootFrame.Navigate(typeof(MainPage), arguments);
}
else
{
rootFrame.Navigate(typeof(NoTabMainPage), arguments);
}
var mainPage = ServiceProvider.GetRequiredService<IMainPage>();
rootFrame.Content = mainPage;
}
else
if (arguments != null && !string.IsNullOrEmpty(arguments.ToString()))
{
if (arguments != null && !string.IsNullOrEmpty(arguments.ToString()))
{
await MessageCenter.HandelUrl(arguments.ToString());
}

await MessageCenter.HandelUrl(arguments.ToString());
}
// 确保当前窗口处于活动状态
Window.Current.Activate();
Expand Down Expand Up @@ -296,7 +282,7 @@ private void RegisterService()
}
catch (Exception ex)
{
logger.Error("Start Host Error",ex);
logger.Error("Start Host Error", ex);
}
}
}
Expand Down
16 changes: 11 additions & 5 deletions src/BiliLite.UWP/BiliLite.UWP.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project ToolsVersion="15.0" DefaultTargets="Build"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props"
Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
Expand Down Expand Up @@ -51,7 +53,7 @@
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
<UseDotNetNativeToolchain>False</UseDotNetNativeToolchain>
<AppxSymbolPackageEnabled>False</AppxSymbolPackageEnabled>
<DebugSymbols>false</DebugSymbols>
</PropertyGroup>
Expand Down Expand Up @@ -194,6 +196,7 @@
</Compile>
<Compile Include="Extensions\BizServicesExtensions.cs" />
<Compile Include="Extensions\ControlsExtensions.cs" />
<Compile Include="Extensions\FileExtensions.cs" />
<Compile Include="Extensions\QrCodeExtensions.cs" />
<Compile Include="Extensions\RegexExtensions.cs" />
<Compile Include="Extensions\DynamicExtensions.cs" />
Expand Down Expand Up @@ -255,6 +258,7 @@
<Compile Include="Models\Functions\ToggleFullWindowShortcutFunction.cs" />
<Compile Include="Models\Functions\ToggleMiniWindowShortcutFunction.cs" />
<Compile Include="Services\BiliLiteDbContext.cs" />
<Compile Include="ViewModels\Common\MainPageViewModel.cs" />
<Compile Include="ViewModels\Common\PieControlViewModel.cs" />
<Compile Include="ViewModels\Settings\CDNServerItemViewModel.cs" />
<Compile Include="Pages\ISavablePage.cs" />
Expand Down Expand Up @@ -1559,10 +1563,12 @@
<Name>Windows Desktop Extensions for the UWP</Name>
</SDKReference>
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
<PropertyGroup
Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
<VisualStudioVersion>14.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
<Import
Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
7 changes: 4 additions & 3 deletions src/BiliLite.UWP/Controls/Settings/DevSettingsControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@

<StackPanel Orientation="Vertical"
MaxWidth="1200">
<controls:SettingsCard>
<controls:SettingsCard
Description="需要定位闪退问题时,请将日志级别设置为Trace">
<controls:SettingsCard.HeaderIcon>
<font:FontAwesome Icon="Solid_Broom"></font:FontAwesome>
<font:FontAwesome Icon="Solid_FileCode"></font:FontAwesome>
</controls:SettingsCard.HeaderIcon>
<controls:SettingsCard.Header>
<Button Click="BtnOpenLogFolder_OnClick">打开日志文件夹</Button>
Expand Down Expand Up @@ -49,7 +50,7 @@
</controls:SettingsCard>

<controls:SettingsCard Header="日志级别"
Description="需要定位问题时,请设置为Trace级别">
Description="需要定位闪退问题时,请设置为Trace级别">
<controls:SettingsCard.HeaderIcon>
<font:FontAwesome Icon="Solid_FileMedical"></font:FontAwesome>
</controls:SettingsCard.HeaderIcon>
Expand Down
5 changes: 5 additions & 0 deletions src/BiliLite.UWP/Controls/Settings/LiveSettingsControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@
<font:FontAwesome Icon="Solid_Filter"></font:FontAwesome>
</controls:SettingsExpander.HeaderIcon>

<StackPanel Orientation="Horizontal">
<Button Click="DanmuSettingFilterImport_OnClick">导入</Button>
<Button Click="BtnExportDanmuFilter_OnClick" >导出</Button>
</StackPanel>

<controls:SettingsExpander.Items>
<controls:SettingsCard>
<controls:SettingsCard.Header>
Expand Down
10 changes: 10 additions & 0 deletions src/BiliLite.UWP/Controls/Settings/LiveSettingsControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,15 @@ private void RemoveLiveDanmuWord_Click(object sender, RoutedEventArgs e)
m_viewModel.LiveShieldWords.Remove(word);
SettingService.SetValue(SettingConstants.Live.SHIELD_WORD, m_viewModel.LiveShieldWords);
}

private async void DanmuSettingFilterImport_OnClick(object sender, RoutedEventArgs e)
{
await m_viewModel.ImportDanmuFilter();
}

private async void BtnExportDanmuFilter_OnClick(object sender, RoutedEventArgs e)
{
await m_viewModel.ExportDanmuFilter();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public sealed partial class ShortcutKeySettingsControl : UserControl
private readonly IMapper m_mapper;
private ShortcutFunctionViewModel m_recordingKeysShortcutFunction;
private bool m_isRecording;
private static readonly ILogger _logger = GlobalLogger.FromCurrentType();

public ShortcutKeySettingsControl()
{
Expand Down Expand Up @@ -49,6 +50,17 @@ private void UpdateShortcutFunctions(ShortcutFunctionViewModel viewModel)

private void ShortcutKeyService_OnRecordKeyDown(object sender, InputKey e)
{
if (m_recordingKeysShortcutFunction == null)
{
_logger.Warn("m_recordingKeysShortcutFunction is null");
return;
}

if (m_recordingKeysShortcutFunction.Keys == null)
{
_logger.Warn("m_recordingKeysShortcutFunction.Keys is null");
m_recordingKeysShortcutFunction.Keys = new ObservableCollection<InputKey>();
}
m_recordingKeysShortcutFunction.Keys.Add(e);
m_recordingKeysShortcutFunction.UpdateKeysString();
UpdateShortcutFunctions(m_recordingKeysShortcutFunction);
Expand Down
22 changes: 22 additions & 0 deletions src/BiliLite.UWP/Controls/Settings/UISettingsControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,28 @@
<ToggleSwitch x:Name="swOpenUrlWithBrowser" ></ToggleSwitch>
</controls:SettingsCard>

<controls:SettingsExpander Header="标签页"
Description="标签页样式自定义"
IsExpanded="True">
<controls:SettingsExpander.HeaderIcon>
<font:FontAwesome Icon="Solid_Tablet"></font:FontAwesome>
</controls:SettingsExpander.HeaderIcon>

<controls:SettingsExpander.Items>
<controls:SettingsCard Header="固定标签宽度"
Description="是否固定标签页宽度(下次打开应用生效)">
<ToggleSwitch x:Name="SwitchTabItemFixedWidth" >
</ToggleSwitch>
</controls:SettingsCard>

<controls:SettingsCard Header="固定标签宽度大小"
Description="固定标签宽度时宽度值(下次打开应用生效)">
<controls1:NumberBox x:Name="NumTabItemFixedWidth"
Minimum="20"></controls1:NumberBox>
</controls:SettingsCard>
</controls:SettingsExpander.Items>
</controls:SettingsExpander>

<controls:SettingsCard Header="视频底部显示进度条"
Description="是否在视频底部实时显示进度条">
<controls:SettingsCard.HeaderIcon>
Expand Down
22 changes: 22 additions & 0 deletions src/BiliLite.UWP/Controls/Settings/UISettingsControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,28 @@ private void LoadUI()
});
});

//固定标签宽度
SwitchTabItemFixedWidth.IsOn =
SettingService.GetValue(SettingConstants.UI.ENABLE_TAB_ITEM_FIXED_WIDTH,
SettingConstants.UI.DEFAULT_ENABLE_TAB_ITEM_FIXED_WIDTH);
SwitchTabItemFixedWidth.Loaded += (sender, e) =>
{
SwitchTabItemFixedWidth.Toggled += (obj, args) =>
{
SettingService.SetValue(SettingConstants.UI.ENABLE_TAB_ITEM_FIXED_WIDTH, SwitchTabItemFixedWidth.IsOn);
};
};

// 固定标签宽度大小
NumTabItemFixedWidth.Value = SettingService.GetValue(SettingConstants.UI.TAB_ITEM_FIXED_WIDTH, SettingConstants.UI.DEFAULT_TAB_ITEM_FIXED_WIDTH);
NumTabItemFixedWidth.Loaded += (sender, e) =>
{
NumTabItemFixedWidth.ValueChanged += (obj, args) =>
{
SettingService.SetValue(SettingConstants.UI.TAB_ITEM_FIXED_WIDTH, NumTabItemFixedWidth.Value);
};
};

//显示视频底部进度条
SwShowVideoBottomProgress.IsOn = SettingService.GetValue(SettingConstants.UI.SHOW_VIDEO_BOTTOM_VIRTUAL_PROGRESS_BAR, SettingConstants.UI.DEFAULT_SHOW_VIDEO_BOTTOM_VIRTUAL_PROGRESS_BAR);
SwShowVideoBottomProgress.Loaded += (sender, e) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@
</controls:SettingsExpander.HeaderIcon>

<StackPanel Orientation="Horizontal">
<Button x:Name="DanmuSettingSyncWords" Click="DanmuSettingSyncWords_Click" Margin="0 16 0 0">同步弹幕屏蔽</Button>
<Button x:Name="DanmuSettingFilterImport" Click="DanmuSettingFilterImport_OnClick" Margin="0 16 0 0">导入弹幕屏蔽</Button>
<Button x:Name="DanmuSettingSyncWords" Click="DanmuSettingSyncWords_Click">同步弹幕屏蔽</Button>
<Button x:Name="DanmuSettingFilterImport" Click="DanmuSettingFilterImport_OnClick">导入</Button>
<Button Click="BtnExportDanmuFilter_OnClick">导出</Button>
</StackPanel>

<controls:SettingsExpander.Items>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,5 +152,10 @@ private async void DanmuSettingAddUser_Click(object sender, RoutedEventArgs e)
Notify.ShowMessageToast("已经添加到本地,但远程同步失败");
}
}

private async void BtnExportDanmuFilter_OnClick(object sender, RoutedEventArgs e)
{
await m_viewModel.ExportDanmuFilter();
}
}
}
Loading

0 comments on commit 6ece755

Please sign in to comment.