完善帮助文档

This commit is contained in:
2022-02-11 19:25:47 +08:00
parent 35fc896aaa
commit 5e31ca90c5
96 changed files with 1825 additions and 202 deletions

View File

@@ -3,7 +3,7 @@
###########################################################################################
# 作者gfdgd xi
# 版本1.5.3
# 更新时间2021年12月12日DDUC11了)
# 更新时间2022年02月07日要开学了)
# 感谢anbox、deepin 和 统信
# 基于 Python3 的 tkinter 构建
###########################################################################################
@@ -67,7 +67,10 @@ def BuildApkDeb(apkPath):
RunCommandShow("mkdir -pv '{}/usr/share/uengine/icons'".format(tempPath))
RunCommandShow("echo '写入文件,因为写入过程过于复杂,不显示写入命令……'")
apkPackageName = GetApkPackageName(apkPath, False)
apkPackageNameNew = GetApkPackageName(apkPath, True)
if qianZhui.get():
apkPackageNameNew = GetApkPackageName(apkPath, True)
else:
apkPackageNameNew = GetApkPackageName(apkPath, False)
apkPackageVersion = GetApkVersion(apkPath)
apkChineseLabel = GetApkChineseLabel(apkPath)
apkActivityName = GetApkActivityName(apkPath)
@@ -285,6 +288,8 @@ def GetApkVersion(apkFilePath):
return line
def BuildUengineDesktop(packageName, activityName, showName, iconPath, savePath):
if showName == "" or showName == None:
showName = "未知应用"
things = '''
[Desktop Entry]
Categories=app;
@@ -308,17 +313,6 @@ def GetApkChineseLabel(apkFilePath):
line = line.replace("'", "")
return line
#def GetApkIconInApk(apkFilePath):
# info = GetApkInformation(apkFilePath)
# for line in info.split('\n'):
# if "application:" in line:
# line = line[line.index("icon='"): -1]
# line = line.replace("icon='", "")
# if "'" in line:
# line = line[0: line.index("'")]
# return line
# return line
#合并两个函数到一起
def SaveApkIcon(apkFilePath, iconSavePath)->"获取 apk 文件的图标":
try:
@@ -335,18 +329,14 @@ def SaveApkIcon(apkFilePath, iconSavePath)->"获取 apk 文件的图标":
iconData = zip.read(xmlpath)
with open(iconSavePath, 'w+b') as saveIconFile:
saveIconFile.write(iconData)
return
print("Show defult icon")
shutil.copy(programPath + "/defult.png", iconSavePath)
except:
traceback.print_exc()
print("Error, show defult icon")
shutil.copy(programPath + "/defult.png", iconSavePath)
#def SaveApkIcon(apkFilePath, iconSavePath):
# zip = zipfile.ZipFile(apkFilePath)
# iconData = zip.read(GetApkIconInApk(apkFilePath))
# with open(iconSavePath, 'w+b') as saveIconFile:
# saveIconFile.write(iconData)
def TextboxAddText1(message):
global textbox1
textbox1.configure(state=tk.NORMAL)
@@ -383,7 +373,7 @@ if not lang in langFile.keys():
information = json.loads(readtxt(programPath + "/information.json"))
version = information["Version"]
title = "{} {}".format(langFile[lang]["Uengine Apk Builder"]["Title"], version)
iconPath = "{}/icon.png".format(os.path.split(os.path.realpath(__file__))[0])
iconPath = "{}/builer.png".format(os.path.split(os.path.realpath(__file__))[0])
###########################
# 加载配置