Skip to content

Commit d8de22c

Browse files
committed
release:2.2.0d6rel
1 parent 5cf414c commit d8de22c

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

CHANGELOG.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
## 新特性
1+
## Bug修复
22

3-
- 支持在软件内注册URL Scheme
4-
5-
注册完成后可以通过`namepicker://`调起没有浮窗的NamePicker(和附加`noshortcut`参数效果相同)
3+
- 修复URL Scheme注册异常的问题喵
64

75
## 已知Bug
86

file.reg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ Windows Registry Editor Version 5.00
99
[HKEY_CURRENT_USER\Software\Classes\namepicker\Shell\Open]
1010

1111
[HKEY_CURRENT_USER\Software\Classes\namepicker\Shell\Open\command]
12-
@="d:\NamePicker\main.py noshortcut"
12+
@="D:\NamePicker\.venv\Scripts\main.exe noshortcut"

main.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import time
33
import base64
44
import hashlib
5+
import pathlib
56
import socket
67
import os
78
import sys
@@ -18,16 +19,17 @@
1819
import network
1920
if os.name == 'nt':
2021
from win32com.client import Dispatch
21-
22+
print(os.path.abspath(__file__))
2223
# 作为主力开发者,我只需要夹带致死量私货就行了
2324
# 但是别的贡献者和Pylint要考虑的可就多了
25+
# 如果你正在阅读这段文字,请不要在使用源代码运行的情况下注册URL协议!会坏掉的
2426

2527
temp_dir = tempfile.gettempdir()
2628
err_info = ""
2729
err_dialog = ""
28-
VERSION = "v2.2.0d5rel"
30+
VERSION = "v2.2.0d6rel"
2931
CODENAME = "Fugue"
30-
VER_NO = 9
32+
VER_NO = 10
3133
APIVER = 2
3234
SEXFAVOR_ALL = NUMFAVOR_BOTH = -1
3335
SEXFAVOR_BOY = NUMFAVOR_1 = 0
@@ -418,7 +420,7 @@ def getStat(self) -> str:
418420

419421
@Slot()
420422
def registerURL(self) -> None:
421-
current_file_path = os.path.abspath(__file__)
423+
current_file_path = os.path.dirname(sys.executable)
422424
logger.debug(current_file_path)
423425
content = f"""Windows Registry Editor Version 5.00
424426
@@ -431,7 +433,7 @@ def registerURL(self) -> None:
431433
[HKEY_CURRENT_USER\Software\Classes\\namepicker\Shell\Open]
432434
433435
[HKEY_CURRENT_USER\Software\Classes\\namepicker\Shell\Open\command]
434-
@="{current_file_path.replace("/",r"\\")} noshortcut"
436+
@="{current_file_path.replace("/",r"\\")+"\\main.exe"} noshortcut"
435437
"""
436438
with open("file.reg","w",encoding="utf-8") as f:
437439
f.write(content)

pages/Settings.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ FluentPage {
452452
SettingCard {
453453
width: parent.width
454454
title: qsTr("注册URL协议")
455-
description: qsTr("注册成功后,即可通过namepicker://调起没有浮窗的NamePicker\n什么你问怎么取消注册?抱歉我没做,自行删除对应的注册表条目即可")
455+
description: qsTr("注册后,即可通过namepicker://调起没有浮窗的NamePicker\n什么你问怎么取消注册?抱歉我没做,自行删除对应的注册表条目即可\n请不要擅自移动或重命名主程序,否则会导致协议失效!")
456456
icon: "ic_fluent_key_reset_20_regular"
457457
content: Button{
458458
text: qsTr("点击注册")

version.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"version_rel": "v2.2.0d5rel",
3-
"VERNO_rel":9,
4-
"version_dev": "v2.2.0d5rel",
5-
"VERNO_dev":9
2+
"version_rel": "v2.2.0d6rel",
3+
"VERNO_rel":10,
4+
"version_dev": "v2.2.0d6rel",
5+
"VERNO_dev":10
66
}

0 commit comments

Comments
 (0)