Skip to content

Commit 4effbfc

Browse files
committed
update version to v2.2.0
1 parent fad84a8 commit 4effbfc

File tree

3 files changed

+33
-11
lines changed

3 files changed

+33
-11
lines changed

COMTool/plugins/protocol.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,24 @@ def onInit(self, config, plugins):
7878
"sendEscape" : False,
7979
"code": defaultProtocols.copy(),
8080
"currCode": "default",
81-
"customSendItems": []
81+
"customSendItems": [
82+
{
83+
"text": "\\x01\\x03\\x03\\x03\\x03\\x01",
84+
"remark": "pre"
85+
},
86+
{
87+
"text": "\\x01\\x04\\x04\\x04\\x04\\x01",
88+
"remark": "next"
89+
},
90+
{
91+
"text": "\\x01\\x01\\x01\\x01\\x01\\x01",
92+
"remark": "ok"
93+
},
94+
{
95+
"text": "\\x01\\x02\\x02\\x02\\x02\\x01",
96+
"remark": "ret"
97+
}
98+
]
8299
}
83100
self.config = config
84101
for k in default:

COMTool/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
major = 2
3-
minor = 1
3+
minor = 2
44
dev = 0
55

66
__version__ = "{}.{}.{}".format(major, minor, dev)

pack.py

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,15 @@ def zip(out, path):
2525
target.write(os.path.join(i[0],n))
2626
os.chdir(cwd)
2727

28-
def upadte_spec_plist(spec_path, items={}):
28+
def upadte_spec_bundle(spec_path, items = {}, plist_items={}):
2929
with open(spec_path) as f:
3030
spec = f.read()
3131
def BUNDLE(*args, **kw_args):
32+
kw_args.update(items)
3233
if "info_plist" in kw_args:
33-
kw_args["info_plist"].update(items)
34+
kw_args["info_plist"].update(plist_items)
3435
else:
35-
kw_args["info_plist"] = items
36+
kw_args["info_plist"] = plist_items
3637
bundle_str_args = ""
3738
for arg in args:
3839
if type(arg) == str and arg != "exe" and arg != "coll":
@@ -81,9 +82,13 @@ def pack():
8182
# macos not case insensitive, so can not contain comtool file and COMTool dir, so we copy to binary root dir
8283
cmd = 'pyi-makespec --hidden-import babel.numbers -p "COMTool" --add-data="COMTool/assets:assets" --add-data="COMTool/locales:locales" --add-data="README_ZH.MD:./" --add-data="README.MD:./" -i="COMTool/assets/logo.icns" -w COMTool/Main.py -n comtool'
8384
os.system(cmd)
84-
upadte_spec_plist("comtool.spec", {
85-
"LSMultipleInstancesProhibited": False,
86-
"CFBundleShortVersionString": version.__version__
85+
upadte_spec_bundle("comtool.spec",
86+
items = {
87+
"version": version.__version__
88+
},
89+
plist_items = {
90+
"LSMultipleInstancesProhibited": False,
91+
"CFBundleShortVersionString": version.__version__
8792
}) # enable multi instance support
8893
cmd = 'pyinstaller comtool.spec'
8994
else:
@@ -92,11 +97,11 @@ def pack():
9297
os.system(cmd)
9398

9499
if sys.platform.startswith("darwin"):
95-
if os.path.exists("./dist/comtool 0.0.0.dmg"):
96-
os.remove("./dist/comtool 0.0.0.dmg")
100+
if os.path.exists(f"./dist/comtool {version.__version__}.dmg"):
101+
os.remove(f"./dist/comtool {version.__version__}.dmg")
97102

98103
os.system('npm install --global create-dmg && create-dmg ./dist/comtool.app ./dist')
99-
shutil.copyfile("./dist/comtool 0.0.0.dmg", macos_out)
104+
shutil.copyfile(f"./dist/comtool {version.__version__}.dmg", macos_out)
100105
elif sys.platform.startswith("win32"):
101106
zip(windows_out, "dist/comtool")
102107
else:

0 commit comments

Comments
 (0)