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修复
2
2
3
- - 支持在软件内注册URL Scheme
4
-
5
- 注册完成后可以通过` namepicker:// ` 调起没有浮窗的NamePicker(和附加` noshortcut ` 参数效果相同)
3
+ - 修复URL Scheme注册异常的问题喵
6
4
7
5
## 已知Bug
8
6
Original file line number Diff line number Diff line change @@ -9,4 +9,4 @@ Windows Registry Editor Version 5.00
9
9
[HKEY_CURRENT_USER \Software\Classes\namepicker\Shell\Open]
10
10
11
11
[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 2
2
import time
3
3
import base64
4
4
import hashlib
5
+ import pathlib
5
6
import socket
6
7
import os
7
8
import sys
18
19
import network
19
20
if os .name == 'nt' :
20
21
from win32com .client import Dispatch
21
-
22
+ print ( os . path . abspath ( __file__ ))
22
23
# 作为主力开发者,我只需要夹带致死量私货就行了
23
24
# 但是别的贡献者和Pylint要考虑的可就多了
25
+ # 如果你正在阅读这段文字,请不要在使用源代码运行的情况下注册URL协议!会坏掉的
24
26
25
27
temp_dir = tempfile .gettempdir ()
26
28
err_info = ""
27
29
err_dialog = ""
28
- VERSION = "v2.2.0d5rel "
30
+ VERSION = "v2.2.0d6rel "
29
31
CODENAME = "Fugue"
30
- VER_NO = 9
32
+ VER_NO = 10
31
33
APIVER = 2
32
34
SEXFAVOR_ALL = NUMFAVOR_BOTH = - 1
33
35
SEXFAVOR_BOY = NUMFAVOR_1 = 0
@@ -418,7 +420,7 @@ def getStat(self) -> str:
418
420
419
421
@Slot ()
420
422
def registerURL (self ) -> None :
421
- current_file_path = os .path .abspath ( __file__ )
423
+ current_file_path = os .path .dirname ( sys . executable )
422
424
logger .debug (current_file_path )
423
425
content = f"""Windows Registry Editor Version 5.00
424
426
@@ -431,7 +433,7 @@ def registerURL(self) -> None:
431
433
[HKEY_CURRENT_USER\Software\Classes\\ namepicker\Shell\Open]
432
434
433
435
[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"
435
437
"""
436
438
with open ("file.reg" ,"w" ,encoding = "utf-8" ) as f :
437
439
f .write (content )
Original file line number Diff line number Diff line change @@ -452,7 +452,7 @@ FluentPage {
452
452
SettingCard {
453
453
width: parent .width
454
454
title: qsTr (" 注册URL协议" )
455
- description: qsTr (" 注册成功后 ,即可通过namepicker://调起没有浮窗的NamePicker\n 什么你问怎么取消注册?抱歉我没做,自行删除对应的注册表条目即可" )
455
+ description: qsTr (" 注册后 ,即可通过namepicker://调起没有浮窗的NamePicker\n 什么你问怎么取消注册?抱歉我没做,自行删除对应的注册表条目即可\n 请不要擅自移动或重命名主程序,否则会导致协议失效! " )
456
456
icon: " ic_fluent_key_reset_20_regular"
457
457
content: Button{
458
458
text: qsTr (" 点击注册" )
Original file line number Diff line number Diff line change 1
1
{
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
6
6
}
You can’t perform that action at this time.
0 commit comments