Skip to content

Commit d7e09a0

Browse files
committed
fix: build version
1 parent c28fea1 commit d7e09a0

7 files changed

Lines changed: 32 additions & 91 deletions

File tree

.gitmodules

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@
2222
path = third-party/nanors
2323
url = https://github.com/sleepybishop/nanors.git
2424
branch = master
25-
[submodule "third-party/nlohmann_json"]
26-
path = third-party/nlohmann_json
27-
url = https://github.com/nlohmann/json
28-
branch = master
2925
[submodule "third-party/nv-codec-headers"]
3026
path = third-party/nv-codec-headers
3127
url = https://github.com/FFmpeg/nv-codec-headers

cmake/dependencies/common.cmake

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,6 @@ pkg_check_modules(CURL REQUIRED libcurl)
1919
pkg_check_modules(MINIUPNP miniupnpc REQUIRED)
2020
include_directories(SYSTEM ${MINIUPNP_INCLUDE_DIRS})
2121

22-
# nlohmann_json
23-
if(SUNSHINE_SYSTEM_NLOHMANN_JSON)
24-
pkg_check_modules(NLOHMANN_JSON nlohmann_json>=3.9.0 REQUIRED IMPORTED_TARGET)
25-
set(JSON_LIBRARIES PkgConfig::NLOHMANN_JSON)
26-
else()
27-
add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/nlohmann_json")
28-
set(JSON_LIBRARIES nlohmann_json::nlohmann_json)
29-
endif()
30-
3122
# ffmpeg pre-compiled binaries
3223
if(NOT DEFINED FFMPEG_PREPARED_BINARIES)
3324
if(WIN32)
@@ -89,4 +80,4 @@ elseif(UNIX)
8980
else()
9081
include("${CMAKE_MODULE_PATH}/dependencies/linux.cmake")
9182
endif()
92-
endif()
83+
endif()

cmake/prep/build_version.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ if((DEFINED ENV{BRANCH}) AND (DEFINED ENV{BUILD_VERSION}) AND (DEFINED ENV{COMMI
1313
# https://github.com/nocnokneo/cmake-git-versioning-example/blob/master/LICENSE
1414
else()
1515
find_package(Git)
16+
string(TIMESTAMP COMPILE_TIME "%Y.%m%d.%H%M%S")
17+
set(PROJECT_VERSION ${COMPILE_TIME})
1618
if(GIT_EXECUTABLE)
1719
MESSAGE("${CMAKE_SOURCE_DIR}")
1820
get_filename_component(SRC_DIR "${CMAKE_SOURCE_DIR}" DIRECTORY)
@@ -43,7 +45,7 @@ else()
4345
MESSAGE("Sunshine Version: ${GIT_DESCRIBE_VERSION}")
4446
endif()
4547
if(GIT_IS_DIRTY)
46-
set(PROJECT_VERSION ${PROJECT_VERSION}.dirty)
48+
set(PROJECT_VERSION ${PROJECT_VERSION}.杂鱼)
4749
MESSAGE("Git tree is dirty!")
4850
endif()
4951
else()

src_assets/common/assets/web/configs/tabs/audiovideo/NewDisplayOutputSelector.vue

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -48,21 +48,6 @@ const displayDevices = computed(() =>
4848
<template #macos> </template>
4949
</PlatformLayout>
5050
</div>
51-
</div>
52-
<label for="output_name" class="form-label">{{
53-
$t("config.output_name_win")
54-
}}</label>
55-
<select id="output_name" class="form-select" v-model="config.output_name">
56-
<option value="">{{ $t("_common.autodetect") }}</option>
57-
<option
58-
v-for="device in displayDevices"
59-
:value="device.id"
60-
:key="device.id"
61-
>
62-
{{ device.name }}
63-
</option>
64-
</select>
65-
<div class="form-text">{{ $t("config.output_name_desc_win") }}<br /></div>
6651
</div>
6752
<div class="mb-3" v-if="platform === 'linux' || platform === 'macos'">
6853
<label for="output_name" class="form-label">{{
@@ -94,5 +79,5 @@ const displayDevices = computed(() =>
9479
</pre
9580
>
9681
</div>
97-
</div> -->
82+
</div>
9883
</template>

src_assets/common/assets/web/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ <h3>{{githubVersion.release.name}}</h3>
134134
if (!this.preReleaseVersion || !this.githubVersion || !this.version) {
135135
return false;
136136
}
137-
return this.preReleaseVersion.isGreater(this.version) && this.preReleaseVersion.isGreater(this.githubVersion);
137+
return this.preReleaseVersion.isGreater(this.version);
138138
},
139139
buildVersionIsDirty() {
140140
return this.version.version?.split(".").length === 5 &&

src_assets/common/assets/web/public/assets/locale/zh.json

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -148,23 +148,23 @@
148148
"controller_desc": "允许客户端使用游戏手柄控制主机系统",
149149
"credentials_file": "登录凭据文件",
150150
"credentials_file_desc": "将用户名/密码与 Sunshine 的状态文件分开保存。",
151-
"display_device_options_note_desc_win": "Windows 会记忆当前活动显示器的每个组合的各种显示设置。\nSunshine 的设置是应用这些组合状态。\n如果断开 Sunshine 应用设置时处于活动状态的设备,则无法恢复预期的显示组合状态,除非在 Sunshine 尝试恢复更改时可以再次激活该组合。\n若不慎应用了错误的设置导致实体显示器无法显示,可在sunshine故障排除页面中重置记忆显示设备设置,或在非串流下按两次 WIN+P 直到实体显示器恢复显示。",
152-
"display_device_options_note_win": "如何设置串流开始/退出时的显示器组合态",
153-
"display_device_options_win": "显示设备设置",
154-
"display_device_prep_ensure_active_win": "自动激活指定显示器",
155-
"display_device_prep_ensure_only_display_win": "禁用其他显示器,只启用指定显示器",
156-
"display_device_prep_ensure_primary_win": "自动激活指定显示器并设置为主显示器",
157-
"display_device_prep_no_operation_win": "无操作",
158-
"display_device_prep_win": "串流时显示器组合状态设定",
159-
"display_mode_remapping_default_mode_desc_win": "At least one \"received\" and one \"final\" value must be specified.\nEmpty field in \"received\" section means \"match any\". Empty field in \"final\" section means \"keep received value\".\nYou can match specific FPS value to specific resolution if you wish so...\n\nNote: if \"Optimize game settings\" option is not enabled on the Moonlight client, the rows containing resolution value(-s) are ignored.",
160-
"display_mode_remapping_desc_win": "Specify how a specific resolution and/or refresh rate should be remapped to other values.\nYou can stream at lower resolution, while rendering at higher resolution on host for a supersampling effect.\nOr you can stream at higher FPS while limiting the host to the lower refresh rate.\nMatching is performed top to bottom. Once the entry is matched, others are no longer checked, but still validated.",
161-
"display_mode_remapping_final_refresh_rate_win": "Final refresh rate",
162-
"display_mode_remapping_final_resolution_win": "Final resolution",
151+
"display_device_options_note_desc_windows": "Windows 会记忆当前活动显示器的每个组合的各种显示设置。\nSunshine 的设置是应用这些组合状态。\n如果断开 Sunshine 应用设置时处于活动状态的设备,则无法恢复预期的显示组合状态,除非在 Sunshine 尝试恢复更改时可以再次激活该组合。\n若不慎应用了错误的设置导致实体显示器无法显示,可在sunshine故障排除页面中重置记忆显示设备设置,或在非串流下按两次 WIN+P 直到实体显示器恢复显示。",
152+
"display_device_options_note_windows": "如何设置串流开始/退出时的显示器组合态",
153+
"display_device_options_windows": "显示设备设置",
154+
"display_device_prep_ensure_active_windows": "自动激活指定显示器",
155+
"display_device_prep_ensure_only_display_windows": "禁用其他显示器,只启用指定显示器",
156+
"display_device_prep_ensure_primary_windows": "自动激活指定显示器并设置为主显示器",
157+
"display_device_prep_no_operation_windows": "无操作",
158+
"display_device_prep_windows": "串流时显示器组合状态设定",
159+
"display_mode_remapping_default_mode_desc_windows": "At least one \"received\" and one \"final\" value must be specified.\nEmpty field in \"received\" section means \"match any\". Empty field in \"final\" section means \"keep received value\".\nYou can match specific FPS value to specific resolution if you wish so...\n\nNote: if \"Optimize game settings\" option is not enabled on the Moonlight client, the rows containing resolution value(-s) are ignored.",
160+
"display_mode_remapping_desc_windows": "Specify how a specific resolution and/or refresh rate should be remapped to other values.\nYou can stream at lower resolution, while rendering at higher resolution on host for a supersampling effect.\nOr you can stream at higher FPS while limiting the host to the lower refresh rate.\nMatching is performed top to bottom. Once the entry is matched, others are no longer checked, but still validated.",
161+
"display_mode_remapping_final_refresh_rate_windows": "Final refresh rate",
162+
"display_mode_remapping_final_resolution_windows": "Final resolution",
163163
"display_mode_remapping_optional": "optional",
164-
"display_mode_remapping_received_fps_win": "Received FPS",
165-
"display_mode_remapping_received_resolution_win": "Received resolution",
166-
"display_mode_remapping_resolution_only_mode_desc_win": "Note: if \"Optimize game settings\" option is not enabled on the Moonlight client, the remapping is disabled.",
167-
"display_mode_remapping_win": "Remap display modes",
164+
"display_mode_remapping_received_fps_windows": "Received FPS",
165+
"display_mode_remapping_received_resolution_windows": "Received resolution",
166+
"display_mode_remapping_resolution_only_mode_desc_windows": "Note: if \"Optimize game settings\" option is not enabled on the Moonlight client, the remapping is disabled.",
167+
"display_mode_remapping_windows": "Remap display modes",
168168
"ds4_back_as_touchpad_click": "映射回/选择触摸板点击",
169169
"ds4_back_as_touchpad_click_desc": "强制使用 DS4 仿真时,地图返回/选择触摸板点击",
170170
"encoder": "强制指定编码器",
@@ -296,12 +296,12 @@
296296
"qsv_slow_hevc": "允许慢速 HEVC 编码",
297297
"qsv_slow_hevc_desc": "这可以在较旧的 Intel GPU 上启用 HEVC 编码,但代价是 GPU 占用率更高,性能更差。",
298298
"res_fps_desc": "由 Sunshine 通告的显示模式。 某些版本的 Moonlight,如 Moonlight-nx (Switch),依靠这些清单来确保支持所请求的分辨率和 fps。 此设置不会改变屏幕串流送至 Moonlight 的方式。",
299-
"resolution_change_automatic_win": "使用客户端要求的分辨率",
300-
"resolution_change_manual_desc_win": "\"优化游戏设置\" 必须在 Moonlight 客户端上启用选项才能生效。",
301-
"resolution_change_manual_win": "手动指定分辨率",
302-
"resolution_change_no_operation_win": "忽略客户端的分辨率要求",
303-
"resolution_change_ogs_desc_win": "\"优化游戏设置\" 必须在 Moonlight 客户端上启用选项才能生效。",
304-
"resolution_change_win": "分辨率调整",
299+
"resolution_change_automatic_windows": "使用客户端要求的分辨率",
300+
"resolution_change_manual_desc_windows": "\"优化游戏设置\" 必须在 Moonlight 客户端上启用选项才能生效。",
301+
"resolution_change_manual_windows": "手动指定分辨率",
302+
"resolution_change_no_operation_windows": "忽略客户端的分辨率要求",
303+
"resolution_change_ogs_desc_windows": "\"优化游戏设置\" 必须在 Moonlight 客户端上启用选项才能生效。",
304+
"resolution_change_windows": "分辨率调整",
305305
"resolutions": "通告分辨率",
306306
"restart_note": "正在重启阳光以应用更改。",
307307
"sunshine_name": "Sunshine 主机名称",
@@ -399,10 +399,10 @@
399399
"logs": "日志",
400400
"logs_desc": "查看 Sunshine 上传的日志",
401401
"logs_find": "查找...",
402-
"reset_display_device_desc_win": "如果 Sunshine 无法按预期恢复更改的显示设备设置,您可以重置设置并继续手动恢复显示状态。\n发生这种情况的原因有多种:设备不再可用、插入了不同的端口等。",
403-
"reset_display_device_error_win": "Error while resetting persistence!",
404-
"reset_display_device_success_win": "Success resetting persistence!",
405-
"reset_display_device_win": "重置记忆显示设备组合态",
402+
"reset_display_device_desc_windows": "如果 Sunshine 无法按预期恢复更改的显示设备设置,您可以重置设置并继续手动恢复显示状态。\n发生这种情况的原因有多种:设备不再可用、插入了不同的端口等。",
403+
"reset_display_device_error_windows": "Error while resetting persistence!",
404+
"reset_display_device_success_windows": "Success resetting persistence!",
405+
"reset_display_device_windows": "重置记忆显示设备组合态",
406406
"restart_sunshine": "重启 Sunhine",
407407
"restart_sunshine_desc": "如果 Sunshine 无法正常工作,可以尝试重新启动。这将终止任何正在运行的会话。",
408408
"restart_sunshine_success": "Sunhine 正在重启",

src_assets/common/assets/web/troubleshooting.html

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,6 @@ <h2 id="reset_display_device">{{ $t('troubleshooting.reset_display_device_window
9393
</button>
9494
</div>
9595
</div>
96-
<ul id="client-list" class="list-group list-group-flush list-group-item-light" v-if="clients && clients.length > 0">
97-
<div v-for="client in clients" class="list-group-item d-flex">
98-
<div class="p-2 flex-grow-1">{{client.name != "" ? client.name : $t('troubleshooting.unpair_single_unknown')}}</div><div class="me-2 ms-auto btn btn-danger" @click="unpairSingle(client.uuid)"><i class="fas fa-trash"></i></div>
99-
</div>
100-
</ul>
101-
<ul v-else class="list-group list-group-flush list-group-item-light">
102-
<div class="list-group-item p-3 text-center"><em>{{ $t('troubleshooting.unpair_single_no_devices') }}</em></div>
103-
</ul>
10496

10597
</div>
10698
<!-- Logs -->
@@ -166,7 +158,6 @@ <h2 id="logs">{{ $t('troubleshooting.logs') }}</h2>
166158
this.refreshLogs();
167159
}, 5000);
168160
this.refreshLogs();
169-
this.refreshClients();
170161
},
171162
beforeDestroy() {
172163
clearInterval(this.logInterval);
@@ -201,32 +192,8 @@ <h2 id="logs">{{ $t('troubleshooting.logs') }}</h2>
201192
setTimeout(() => {
202193
this.resetDisplayDeviceStatus = null;
203194
}, 5000);
204-
this.refreshClients();
205-
});
206-
},
207-
unpairSingle(uuid) {
208-
fetch("/api/clients/unpair", { method: "POST", body: JSON.stringify({ uuid }) }).then(() => {
209-
this.showApplyMessage = true;
210-
this.refreshClients();
211-
});
212-
},
213-
refreshClients() {
214-
fetch("/api/clients/list")
215-
.then((response) => response.json())
216-
.then((response) => {
217-
const clientList = document.querySelector("#client-list");
218-
if (response.status === 'true' && response.named_certs && response.named_certs.length) {
219-
this.clients = response.named_certs.sort((a, b) => {
220-
return (a.name.toLowerCase() > b.name.toLowerCase() || a.name == "" ? 1 : -1)
221-
});
222-
} else {
223-
this.clients = [];
224-
}
225195
});
226196
},
227-
clickedApplyBanner() {
228-
this.showApplyMessage = false;
229-
},
230197
copyLogs() {
231198
navigator.clipboard.writeText(this.actualLogs);
232199
},

0 commit comments

Comments
 (0)