File tree Expand file tree Collapse file tree 5 files changed +15
-15
lines changed
Expand file tree Collapse file tree 5 files changed +15
-15
lines changed Original file line number Diff line number Diff line change 1- ## 新特性
1+ ## Bug修复
22
3- - 支持在软件内注册URL Scheme
4-
5- 注册完成后可以通过` namepicker:// ` 调起没有浮窗的NamePicker(和附加` noshortcut ` 参数效果相同)
3+ - 修复URL Scheme注册异常的问题喵
64
75## 已知Bug
86
Original file line number Diff line number Diff 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"
Original file line number Diff line number Diff line change 22import time
33import base64
44import hashlib
5+ import pathlib
56import socket
67import os
78import sys
1819import network
1920if os .name == 'nt' :
2021 from win32com .client import Dispatch
21-
22+ print ( os . path . abspath ( __file__ ))
2223# 作为主力开发者,我只需要夹带致死量私货就行了
2324# 但是别的贡献者和Pylint要考虑的可就多了
25+ # 如果你正在阅读这段文字,请不要在使用源代码运行的情况下注册URL协议!会坏掉的
2426
2527temp_dir = tempfile .gettempdir ()
2628err_info = ""
2729err_dialog = ""
28- VERSION = "v2.2.0d5rel "
30+ VERSION = "v2.2.0d6rel "
2931CODENAME = "Fugue"
30- VER_NO = 9
32+ VER_NO = 10
3133APIVER = 2
3234SEXFAVOR_ALL = NUMFAVOR_BOTH = - 1
3335SEXFAVOR_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 )
Original file line number Diff line number Diff 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 (" 点击注册" )
Original file line number Diff line number Diff line change 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}
You can’t perform that action at this time.
0 commit comments