Skip to content

Commit

Permalink
Update libcpr; Release v0.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
xfangfang committed Nov 5, 2022
1 parent a260924 commit ab057d4
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 32 deletions.
11 changes: 1 addition & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ endif ()
project(wiliwili)
set(VERSION_MAJOR "0")
set(VERSION_MINOR "4")
set(VERSION_REVISION "1")
set(VERSION_REVISION "2")
set(PROJECT_TITLEID "0x010FF000FFFF0001")
set(PROJECT_AUTHOR "xfangfang")
set(PROJECT_ICON ${CMAKE_CURRENT_SOURCE_DIR}/resources/icon/bilibili.jpg)
Expand Down Expand Up @@ -131,22 +131,13 @@ if (PLATFORM_DESKTOP)
)
add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}.data)
else ()
set_target_properties(
${PROJECT_NAME} PROPERTIES
LINK_FLAGS_RELEASE -s
LINK_FLAGS "-Wl,-no-as-needed -Wl,-Map,.map"
)
add_custom_target(${PROJECT_NAME}.nro
DEPENDS ${PROJECT_NAME}
COMMAND ${NX_NACPTOOL_EXE} --create "${PROJECT_NAME}"
"${PROJECT_AUTHOR}" "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}"
${PROJECT_NAME}.nacp --titleid=${PROJECT_TITLEID}
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PROJECT_RESOURCES} ${CMAKE_BINARY_DIR}/resources
COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_BINARY_DIR}/resources/icon/wiliwili.ico
COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_BINARY_DIR}/resources/test.flv
COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_BINARY_DIR}/resources/Illegal-Font.ttf
COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_BINARY_DIR}/resources/Wingdings.ttf
COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_BINARY_DIR}/resources/inter
COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_BINARY_DIR}/resources/font
COMMAND ${NX_ELF2NRO_EXE} ${PROJECT_NAME}.elf ${PROJECT_NAME}.nro --icon=${PROJECT_ICON}
--nacp=${PROJECT_NAME}.nacp --romfsdir=${CMAKE_BINARY_DIR}/resources
Expand Down
21 changes: 17 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,23 @@ wiliwili 拥有非常接近官方PC客户端的B站浏览体验,
- [x] 播放页新增分集与UP主最新投稿
- [ ] 完善视频播放页用户评论内容
- [ ] 重构图片异步加载逻辑
- [ ] 解决收藏夹、搜索页某些情况导致闪退的问题
- [ ] 完善搜索页:番剧、影视 转为竖图
- [x] 解决收藏夹、搜索页某些情况导致闪退的问题
- [x] 完善搜索页:番剧、影视 转为竖图
- [x] 完善播放页投稿列表:调整结构、自动加载下一页
- [ ] 播放页展示合集与推荐
- [x] 添加动态页
- [x] 添加视频检索页
- [x] 完善设置页
- [ ] 弹幕相关设置
- [ ] 点赞、投币、收藏
- [ ] 拖拽调节进度、长按快速调节进度
- [ ] 增加单手模式使用一个手柄来控制播放器
- [ ] 安装图标时检查wiliwili位置
- [ ] NSP forwarder自动检查多个位置的nro文件,避免无法打开
- [ ] 增加设置使首页无法通过返回退出,避免误触
- [ ] 使用教程添加未指明的快捷键说明
- [ ] 重压摇杆临时快进
- [ ] 增加平板模式与电视模式页面样式的切换

<br>

Expand Down Expand Up @@ -114,6 +124,8 @@ make wiliwili -j

##### Windows

可以从 [Github-Actions](https://github.com/xfangfang/wiliwili/actions) 下载自动构建的测试版客户端

```shell
# Windows: install dependencies (MSYS2 MinGW64)
pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake mingw-w64-x86_64-make \
Expand All @@ -126,7 +138,7 @@ mingw32-make wiliwili -j

### 交叉编译 Switch 可执行文件

稍后会制作一个docker镜像来更便捷的构建
稍后会制作一个docker镜像来更便捷地构建

```shell
# 安装devkitpro环境: https://github.com/devkitPro/pacman/releases
Expand Down Expand Up @@ -172,7 +184,8 @@ make wiliwili.nro -j
- Cpasjuste and proconsule
- https://github.com/Cpasjuste/pplay
- https://github.com/proconsule/nxmp
- https://github.com/whoshuu/cpr
- https://github.com/libcpr/cpr
- https://github.com/nlohmann/json
- https://github.com/nayuki/QR-Code-generator
- https://github.com/BYVoid/OpenCC
- https://github.com/progschj/ThreadPool
5 changes: 2 additions & 3 deletions library/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.15)

# import cpr
set(CPR_FORCE_USE_SYSTEM_CURL ON)
set(CPR_USE_SYSTEM_CURL ON)
if (PLATFORM_DESKTOP)
if (APPLE)
set(CPR_FORCE_DARWINSSL_BACKEND ON)
Expand All @@ -17,8 +17,7 @@ endif ()
set(BUILD_SHARED_LIBS OFF)
FetchContent_Declare(cpr
GIT_REPOSITORY https://github.com/libcpr/cpr.git
GIT_TAG f88fd7737de3e640c61703eb57a0fa0ce00c60cd) # cpr 1.9.2
#7a02d679308a19220e3b75616c18ff9e8deb5f9a # cpr 1.9.1
GIT_TAG 142a496e49bc71dc1be85a3ce47bb25573670000) # 2022/11/04
FetchContent_MakeAvailable(cpr)

#import lunasvg
Expand Down
3 changes: 2 additions & 1 deletion resources/i18n/en-US/hints.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
"current": "Current",
"success": "Success",
"failed": "Failed",
"exit_hint": "Are you going to exit the application?"
"exit_hint": "Are you going to exit the application?",
"loading": "Loading"
}
4 changes: 2 additions & 2 deletions resources/i18n/en-US/version.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": "v0.4.1",
"version": "v0.4.2",
"version_major": 0,
"version_minor": 4,
"version_revision": 1
"version_revision": 2
}
3 changes: 2 additions & 1 deletion resources/i18n/zh-Hans/hints.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
"current": "当前",
"success": "成功",
"failed": "失败",
"exit_hint": "退出wiliwili?"
"exit_hint": "退出wiliwili?",
"loading": "加载中"
}
6 changes: 6 additions & 0 deletions resources/i18n/zh-Hans/version.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"version": "v0.4.2",
"version_major": 0,
"version_minor": 4,
"version_revision": 2
}
3 changes: 2 additions & 1 deletion resources/i18n/zh-Hant/hints.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
"current": "當前",
"success": "成功",
"failed": "失敗",
"exit_hint": "退出wiliwili?"
"exit_hint": "退出wiliwili?",
"loading": "載入中"
}
22 changes: 12 additions & 10 deletions wiliwili/source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,19 @@ int main(int argc, char* argv[]) {

if (brls::Application::getPlatform()->isApplicationMode()) {
brls::Application::pushActivity(new MainActivity());
// use these activities for debugging
// brls::Application::pushActivity(new PlayerActivity("BV1A44y1u7PF"));
// brls::Application::pushActivity(new PlayerActivity("BV1434y1D7hB"), brls::TransitionAnimation::NONE);
// brls::Application::pushActivity(new PlayerActivity("BV1U3411c7Qx"), brls::TransitionAnimation::NONE);
// Use these activities to debug
// brls::Application::pushActivity(new PlayerActivity("BV18W4y1q72C")); // wiliwili介绍
// brls::Application::pushActivity(new PlayerActivity("BV1dx411c7Av")); // flv拼接视频
// brls::Application::pushActivity(new PlayerActivity("BV15z4y1Z734")); // 4K HDR 视频
// brls::Application::pushActivity(new PlayerActivity("BV1A44y1u7PF"), brls::TransitionAnimation::NONE); // 测试FFMPEG在switch上的bug(加载时间过长)
// brls::Application::pushActivity(new PlayerActivity("BV1U3411c7Qx"), brls::TransitionAnimation::NONE); // 测试长标题
// brls::Application::pushActivity(new PlayerActivity("BV1fG411W7Px"), brls::TransitionAnimation::NONE); // 测试弹幕
// brls::Application::pushActivity(new SearchActivity("qq"));
// brls::Application::pushActivity(new SplashActivity());
// brls::Application::pushActivity(new HintActivity());
// brls::Application::pushActivity(new PGCIndexActivity("/page/home/pgc/more?type=2&index_type=2&area=2&order=2&season_status=-1&season_status=3,6"));
// brls::Application::pushActivity(new SettingActivity());
// brls::Application::pushActivity(new LiveActivity(1942240));
// brls::Application::pushActivity(new SearchActivity("哈利波特")); // 测试搜索影片
// brls::Application::pushActivity(new SplashActivity()); // 首屏页面(暂时未使用)
// brls::Application::pushActivity(new HintActivity()); // 应用开启教程页面
// brls::Application::pushActivity(new PGCIndexActivity("/page/home/pgc/more?type=2&index_type=2&area=2&order=2&season_status=-1&season_status=3,6")); // 影片分类索引
// brls::Application::pushActivity(new SettingActivity()); // 设置页面
// brls::Application::pushActivity(new LiveActivity(1942240)); // 直播页面
} else {
brls::Application::pushActivity(new HintActivity());
}
Expand Down

0 comments on commit ab057d4

Please sign in to comment.