Skip to content

Commit eead23a

Browse files
committed
* update 加入AppImage图标为默认图标
1 parent 250b25b commit eead23a

File tree

5 files changed

+12
-5
lines changed

5 files changed

+12
-5
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## python tools V1.2.6
1+
## python tools V1.3.2
22
* 不使用第三方wheel包
33

44

@@ -44,3 +44,5 @@ pip wheel --wheel-dir=./wheel_dir ./
4444
* update 支持python3.7进行打包
4545
* update 路径转换无需判断路径是否真实存在
4646
* update 打包的时候支持文件夹导入
47+
* update 打包成AppImage时候无需icon图标
48+
* update 加入AppImage图标为默认图标

jade/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import os
33
file_path = os.path.abspath(os.path.dirname(os.path.realpath(__file__)))
44
AppRunPath = "{}/AppRun".format(file_path)
5+
LogoPath = "{}/app_logo.png".format(file_path)
56
from jade.jade_logging import *
67
from jade.jade_packing import *
78
from jade.jade_tools import *

jade/app_logo.png

2.15 KB
Loading

jade/jade_packing.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# @Email : jadehh@1ive.com
77
# @Software : Samples
88
# @Desc :
9-
from jade import AppRunPath
9+
from jade import AppRunPath,LogoPath
1010
from jade.jade_tools import CreateSavePath, GetTimeStamp,GetLastDir,GetYear,getOperationSystem,GetPreviousDir
1111
from jade.jade_progress_bar import ProgressBar
1212
import os
@@ -334,6 +334,7 @@ def writeSpec(args):
334334
pass
335335
else:
336336
icon_path = ""
337+
337338
if getOperationSystem() == "Darwin":
338339
with open("{}.spec".format(get_app_name(args)),"wb") as f:
339340
f.write(("# -*- mode: python ; coding: utf-8 -*-\n\n\n"
@@ -729,7 +730,10 @@ def packAppImage(args):
729730
for content in conetent_list:
730731
with open(os.path.join(save_path, "AppRun"), "a", encoding="utf-8") as f:
731732
f.write(content + "\n")
732-
shutil.copy("icons/app_logo.png", save_path)
733+
if os.path.exists("icons/app_logo.png"):
734+
shutil.copy("icons/app_logo.png", save_path)
735+
else:
736+
shutil.copy(LogoPath,save_path)
733737
with open(os.path.join(save_path, get_app_name(args) + ".desktop"), "w", encoding="utf-8") as f:
734738
f.write("[Desktop Entry]\n"
735739
"Version={}\n"

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
find_packages("jade", pack_list)
1313
setup(
1414
name="jade",
15-
version="1.2.6",
15+
version="1.3.2",
1616
keywords=("pip", "jade", ""),
1717
description="jade",
1818
long_description="",
@@ -22,7 +22,7 @@
2222
author_email="jadehh@live.com",
2323

2424
packages=pack_list,
25-
package_data={'': ['*Run']},
25+
package_data={'': ['*Run','*png']},
2626
include_package_data=True,
2727
platforms="any",
2828
install_requires=["easycython","pyinstaller"] # 这个项目需要的第三方库

0 commit comments

Comments
 (0)