Skip to content

Commit 4221b7d

Browse files
committed
Feat: Add pre-release update channel
1 parent 35601b9 commit 4221b7d

8 files changed

Lines changed: 80 additions & 10 deletions

File tree

.github/workflows/publish_version.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ jobs:
6060
# Fallback URL for legacy clients (pointing to X64)
6161
URL=$URL_X64
6262
63-
jq -n \
63+
IS_PRERELEASE="${{ github.event.release.prerelease }}"
64+
65+
JSON_DATA=$(jq -n \
6466
--arg v "$VERSION" \
6567
--arg u "$URL" \
6668
--arg u_x64 "$URL_X64" \
@@ -69,11 +71,18 @@ jobs:
6971
--arg sha_arm "$SHA_ARM64" \
7072
--arg d "$DATE" \
7173
--arg c "$RELEASE_BODY" \
72-
'{version: $v, url: $u, url_x64: $u_x64, url_arm64: $u_arm, sha256_x64: $sha_x64, sha256_arm64: $sha_arm, date: $d, changelog: $c}' \
73-
> public/version.json
74+
'{version: $v, url: $u, url_x64: $u_x64, url_arm64: $u_arm, sha256_x64: $sha_x64, sha256_arm64: $sha_arm, date: $d, changelog: $c}')
7475
75-
echo "=== Generated JSON Content ==="
76-
cat public/version.json
76+
if [ "$IS_PRERELEASE" = "true" ]; then
77+
echo "$JSON_DATA" > public/version-prerelease.json
78+
echo "=== Generated Pre-release JSON Content ==="
79+
cat public/version-prerelease.json
80+
else
81+
echo "$JSON_DATA" > public/version.json
82+
echo "$JSON_DATA" > public/version-prerelease.json
83+
echo "=== Generated Stable JSON Content ==="
84+
cat public/version.json
85+
fi
7786
7887
- name: Deploy to GitHub Pages
7988
uses: peaceiris/actions-gh-pages@v3

.github/workflows/winget.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010

1111
jobs:
1212
winget:
13+
if: github.event.release.prerelease == false
1314
name: Submit to WinGet
1415
runs-on: ubuntu-latest
1516
steps:

QuickView/AppStrings.cpp

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ const wchar_t *Settings_Group_Habits = nullptr;
5757
const wchar_t *Settings_Label_Language = nullptr;
5858
const wchar_t *Settings_Label_SingleInstance = nullptr;
5959
const wchar_t *Settings_Label_CheckUpdates = nullptr;
60+
const wchar_t *Settings_Label_UpdateChannel = nullptr;
61+
const wchar_t *Settings_Option_UpdateStable = nullptr;
62+
const wchar_t *Settings_Option_UpdatePreRelease = nullptr;
63+
const wchar_t *Settings_Tooltip_PreRelease = nullptr;
6064
const wchar_t *Settings_Label_NavLoopMode = nullptr;
6165
const wchar_t *Settings_Label_SortOrder = nullptr;
6266
const wchar_t *Settings_Label_SortDescending = nullptr;
@@ -543,6 +547,10 @@ struct LanguageTable {
543547
const wchar_t *Settings_Label_Language;
544548
const wchar_t *Settings_Label_SingleInstance;
545549
const wchar_t *Settings_Label_CheckUpdates;
550+
const wchar_t *Settings_Label_UpdateChannel;
551+
const wchar_t *Settings_Option_UpdateStable;
552+
const wchar_t *Settings_Option_UpdatePreRelease;
553+
const wchar_t *Settings_Tooltip_PreRelease;
546554
const wchar_t *Settings_Label_NavLoopMode;
547555
const wchar_t *Settings_Label_SortOrder;
548556
const wchar_t *Settings_Label_SortDescending;
@@ -1026,6 +1034,10 @@ static const LanguageTable Table_EN = {
10261034
L"Language", // Settings_Label_Language
10271035
L"Single Instance", // Settings_Label_SingleInstance
10281036
L"Check Updates", // Settings_Label_CheckUpdates
1037+
L"Update Channel", // Settings_Label_UpdateChannel
1038+
L"Stable", // Settings_Option_UpdateStable
1039+
L"Pre-release", // Settings_Option_UpdatePreRelease
1040+
L"Stable: Published after a preview version proves stable.\nPre-release: Delivers the latest code changes immediately to collect your feedback. Note: These changes are not strictly tested.", // Settings_Tooltip_PreRelease
10291041
L"Loop", // Settings_Label_NavLoopMode
10301042
L"Sort Order", // Settings_Label_SortOrder
10311043
L"Descending", // Settings_Label_SortDescending
@@ -1509,6 +1521,10 @@ static const LanguageTable Table_CN = {
15091521
L"语言", // Settings_Label_Language
15101522
L"单实例模式", // Settings_Label_SingleInstance
15111523
L"检查更新", // Settings_Label_CheckUpdates
1524+
L"更新通道", // Settings_Label_UpdateChannel
1525+
L"正式版", // Settings_Option_UpdateStable
1526+
L"预览版 (Pre-release)", // Settings_Option_UpdatePreRelease
1527+
L"正式版:预览版发布一段时间后未收到Bug报告,将发布正式版。\n预览版:第一时间发布最新的代码修改,用于收集您的测试反馈。注意,这些修改并未经过严格测试。", // Settings_Tooltip_PreRelease
15121528
L"循环播放", // Settings_Label_NavLoopMode
15131529
L"列表排序方式", // Settings_Label_SortOrder
15141530
L"降序", // Settings_Label_SortDescending
@@ -1992,6 +2008,10 @@ static const LanguageTable Table_TW = {
19922008
L"語言", // Settings_Label_Language
19932009
L"單一實例模式", // Settings_Label_SingleInstance
19942010
L"檢查更新", // Settings_Label_CheckUpdates
2011+
L"更新通道", // Settings_Label_UpdateChannel
2012+
L"正式版", // Settings_Option_UpdateStable
2013+
L"預覽版 (Pre-release)", // Settings_Option_UpdatePreRelease
2014+
L"正式版:預覽版發布一段時間後未收到Bug報告,將發布正式版。\n預覽版:第一時間發布最新的代碼修改,用於收集您的測試反饋。注意,這些修改並未經過嚴格測試。", // Settings_Tooltip_PreRelease
19952015
L"循環導覽", // Settings_Label_NavLoopMode
19962016
L"排序方式", // Settings_Label_SortOrder
19972017
L"降冪", // Settings_Label_SortDescending
@@ -2475,6 +2495,10 @@ static const LanguageTable Table_JA = {
24752495
L"言語", // Settings_Label_Language
24762496
L"単一インスタンス", // Settings_Label_SingleInstance
24772497
L"更新確認", // Settings_Label_CheckUpdates
2498+
L"アップデートチャンネル", // Settings_Label_UpdateChannel
2499+
L"安定版", // Settings_Option_UpdateStable
2500+
L"プレリリース (Pre-release)", // Settings_Option_UpdatePreRelease
2501+
L"安定版: プレリリース版が一定期間安定して動作した後に公開されます。\nプレリリース: 最新の変更をいち早くお届けし、フィードバックを収集します。これらの変更は厳密なテストを受けていないことにご注意ください。", // Settings_Tooltip_PreRelease
24782502
L"ループナビゲーション", // Settings_Label_NavLoopMode
24792503
L"並べ替え順序", // Settings_Label_SortOrder
24802504
L"降順", // Settings_Label_SortDescending
@@ -2958,6 +2982,10 @@ static const LanguageTable Table_RU = {
29582982
L"Язык", // Settings_Label_Language
29592983
L"Один экземпляр", // Settings_Label_SingleInstance
29602984
L"Проверка обновлений", // Settings_Label_CheckUpdates
2985+
L"Канал обновлений", // Settings_Label_UpdateChannel
2986+
L"Стабильный", // Settings_Option_UpdateStable
2987+
L"Предварительный (Pre-release)", // Settings_Option_UpdatePreRelease
2988+
L"Стабильный: Выпускается после того, как предварительная версия доказала свою стабильность.\nПредварительный (Pre-release): Моментальная доставка последних изменений для сбора отзывов. Внимание: эти изменения не прошли строгую проверку.", // Settings_Tooltip_PreRelease
29612989
L"Циклическая навигация", // Settings_Label_NavLoopMode
29622990
L"Порядок сортировки", // Settings_Label_SortOrder
29632991
L"По убыванию", // Settings_Label_SortDescending
@@ -3441,6 +3469,10 @@ static const LanguageTable Table_DE = {
34413469
L"Sprache", // Settings_Label_Language
34423470
L"Einzelinstanz", // Settings_Label_SingleInstance
34433471
L"Updates prüfen", // Settings_Label_CheckUpdates
3472+
L"Update-Kanal", // Settings_Label_UpdateChannel
3473+
L"Stabil", // Settings_Option_UpdateStable
3474+
L"Vorabversion (Pre-release)", // Settings_Option_UpdatePreRelease
3475+
L"Stabil: Wird veröffentlicht, nachdem sich eine Vorabversion als stabil erwiesen hat.\nVorabversion (Pre-release): Liefert sofort die neuesten Code-Änderungen, um Ihr Feedback zu sammeln. Hinweis: Diese Änderungen sind nicht streng getestet.", // Settings_Tooltip_PreRelease
34443476
L"Endlosnavigation", // Settings_Label_NavLoopMode
34453477
L"Sortierreihenfolge", // Settings_Label_SortOrder
34463478
L"Absteigend", // Settings_Label_SortDescending
@@ -3924,6 +3956,10 @@ static const LanguageTable Table_ES = {
39243956
L"Idioma", // Settings_Label_Language
39253957
L"Instancia única", // Settings_Label_SingleInstance
39263958
L"Buscar actualizaciones", // Settings_Label_CheckUpdates
3959+
L"Canal de actualización", // Settings_Label_UpdateChannel
3960+
L"Estable", // Settings_Option_UpdateStable
3961+
L"Versión preliminar (Pre-release)", // Settings_Option_UpdatePreRelease
3962+
L"Estable: Se publica después de que una versión preliminar demuestre ser estable.\nVersión preliminar (Pre-release): Entrega los últimos cambios de código de inmediato para recopilar sus comentarios. Nota: Estos cambios no han sido probados estrictamente.", // Settings_Tooltip_PreRelease
39273963
L"Navegación en bucle", // Settings_Label_NavLoopMode
39283964
L"Orden de clasificación", // Settings_Label_SortOrder
39293965
L"Descendente", // Settings_Label_SortDescending
@@ -4407,6 +4443,10 @@ static const LanguageTable Table_FR = {
44074443
L"Language", // Settings_Label_Language
44084444
L"Single Instance", // Settings_Label_SingleInstance
44094445
L"Check Updates", // Settings_Label_CheckUpdates
4446+
L"Canal de mise à jour", // Settings_Label_UpdateChannel
4447+
L"Stable", // Settings_Option_UpdateStable
4448+
L"Pré-version (Pre-release)", // Settings_Option_UpdatePreRelease
4449+
L"Stable : Publié après qu'une pré-version se soit avérée stable.\nPré-version (Pre-release) : Fournit immédiatement les dernières modifications pour recueillir vos retours. Remarque : Ces modifications ne sont pas strictement testées.", // Settings_Tooltip_PreRelease
44104450
L"Loop", // Settings_Label_NavLoopMode
44114451
L"Sort Order", // Settings_Label_SortOrder
44124452
L"Descending", // Settings_Label_SortDescending
@@ -4890,6 +4930,10 @@ void Apply(const LanguageTable& t) {
48904930
Settings_Label_Language = t.Settings_Label_Language;
48914931
Settings_Label_SingleInstance = t.Settings_Label_SingleInstance;
48924932
Settings_Label_CheckUpdates = t.Settings_Label_CheckUpdates;
4933+
Settings_Label_UpdateChannel = t.Settings_Label_UpdateChannel;
4934+
Settings_Option_UpdateStable = t.Settings_Option_UpdateStable;
4935+
Settings_Option_UpdatePreRelease = t.Settings_Option_UpdatePreRelease;
4936+
Settings_Tooltip_PreRelease = t.Settings_Tooltip_PreRelease;
48934937
Settings_Label_NavLoopMode = t.Settings_Label_NavLoopMode;
48944938
Settings_Label_SortOrder = t.Settings_Label_SortOrder;
48954939
Settings_Label_SortDescending = t.Settings_Label_SortDescending;

QuickView/AppStrings.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,10 @@ namespace AppStrings {
245245
extern const wchar_t* Settings_Label_Language;
246246
extern const wchar_t* Settings_Label_SingleInstance;
247247
extern const wchar_t* Settings_Label_CheckUpdates;
248+
extern const wchar_t* Settings_Label_UpdateChannel;
249+
extern const wchar_t* Settings_Option_UpdateStable;
250+
extern const wchar_t* Settings_Option_UpdatePreRelease;
251+
extern const wchar_t* Settings_Tooltip_PreRelease;
248252
extern const wchar_t* Settings_Label_NavLoopMode;
249253
extern const wchar_t* Settings_Label_SortOrder;
250254
extern const wchar_t* Settings_Label_SortDescending;

QuickView/EditState.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,7 @@ struct AppConfig {
462462
int Language = 0; // 0=Auto, 1=EN, 2=CN
463463
bool SingleInstance = false;
464464
bool CheckUpdates = true;
465+
int UpdateChannel = 0; // 0=Stable, 1=Pre-release
465466
bool NavLoop = true; // Loop at limits (Global or Folder)
466467
bool NavTraverse = false; // Reach outside current folder (Subfolders)
467468
int SortOrder = 0; // 0=Auto(Name), 1=Name, 2=Modified, 3=DateTaken, 4=Size, 5=Type

QuickView/QuickView.rc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212

1313
// Version Information - This sets the display name in Windows
1414
VS_VERSION_INFO VERSIONINFO
15-
FILEVERSION 6,10,13,0
16-
PRODUCTVERSION 6,10,13,0
15+
FILEVERSION 6,10,13,1
16+
PRODUCTVERSION 6,10,13,1
1717
FILEFLAGSMASK 0x3fL
1818
FILEFLAGS 0x0L
1919
FILEOS 0x40004L
@@ -26,12 +26,12 @@ BEGIN
2626
BEGIN
2727
VALUE "CompanyName", "QuickView"
2828
VALUE "FileDescription", "QuickView"
29-
VALUE "FileVersion", "6.10.13.0"
29+
VALUE "FileVersion", "6.10.13.1"
3030
VALUE "InternalName", "QuickView"
3131
VALUE "LegalCopyright", "Copyright (C) 2026"
3232
VALUE "OriginalFilename", "QuickView.exe"
3333
VALUE "ProductName", "QuickView"
34-
VALUE "ProductVersion", "6.10.13.0"
34+
VALUE "ProductVersion", "6.10.13.1"
3535
END
3636
END
3737
BLOCK "VarFileInfo"

QuickView/SettingsOverlay.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -973,6 +973,14 @@ void SettingsOverlay::BuildMenu() {
973973

974974
tabGeneral.items.push_back({ AppStrings::Settings_Label_CheckUpdates, OptionType::Toggle, &g_config.CheckUpdates });
975975

976+
SettingsItem itemUpdateChannel;
977+
itemUpdateChannel.label = AppStrings::Settings_Label_UpdateChannel;
978+
itemUpdateChannel.type = OptionType::ComboBox;
979+
itemUpdateChannel.pIntVal = &g_config.UpdateChannel;
980+
itemUpdateChannel.options = { AppStrings::Settings_Option_UpdateStable, AppStrings::Settings_Option_UpdatePreRelease };
981+
itemUpdateChannel.tooltipText = AppStrings::Settings_Tooltip_PreRelease;
982+
tabGeneral.items.push_back(itemUpdateChannel);
983+
976984
// Pro Habits
977985
tabGeneral.items.push_back({ AppStrings::Settings_Group_Habits, OptionType::Header });
978986

QuickView/UpdateManager.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
#include <shellapi.h>
99
#include <shlwapi.h>
1010
#include <wincrypt.h>
11+
#include "EditState.h"
1112

13+
extern AppConfig g_config;
1214

1315
#pragma comment(lib, "winhttp.lib")
1416
#pragma comment(lib, "shlwapi.lib")
@@ -201,7 +203,8 @@ bool UpdateManager::CheckVersion() {
201203

202204
// Timestamp for cache busting
203205
std::time_t now = std::time(nullptr);
204-
std::wstring path = L"/QuickView/version.json?t=" + std::to_wstring(now);
206+
std::wstring jsonName = (g_config.UpdateChannel == 1) ? L"version-prerelease.json" : L"version.json";
207+
std::wstring path = L"/QuickView/" + jsonName + L"?t=" + std::to_wstring(now);
205208

206209
std::string response = HttpGet(L"justnullname.github.io", path);
207210
if (response.empty()) return false;

0 commit comments

Comments
 (0)