mirror of
https://github.com/TriM-Organization/Musicreater.git
synced 2024-11-14 11:27:42 +08:00
更新安装指示,完成关于界面的编写,UI进一步制作中
This commit is contained in:
parent
d21c26d632
commit
c62806d470
Binary file not shown.
@ -47,9 +47,11 @@ from shutil import rmtree, move
|
|||||||
|
|
||||||
if platform == "win32":
|
if platform == "win32":
|
||||||
|
|
||||||
nowpath = __file__[:len(__file__) - __file__[len(__file__)::-1].index('\\')]
|
nowpath = __file__[: len(__file__) - __file__[len(__file__) :: -1].index('\\')]
|
||||||
|
|
||||||
print('\033[0{}\033[0m'.format("正在下载python\nDownloading Python"))
|
if srun('python -V'):
|
||||||
|
|
||||||
|
print('\033[7m{}\033[0m'.format("正在下载python\nDownloading Python"))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
urllib.request.urlretrieve(
|
urllib.request.urlretrieve(
|
||||||
@ -63,13 +65,17 @@ if platform == "win32":
|
|||||||
input(str(E) + "\n自动下载失败,按下回车取消")
|
input(str(E) + "\n自动下载失败,按下回车取消")
|
||||||
exit()
|
exit()
|
||||||
|
|
||||||
print('\033[0{}\033[0m'.format('正在安装python\nInstalling Python'+f'\n{nowpath}python38\\'))
|
print('正在安装python\nInstalling Python')
|
||||||
|
|
||||||
# open('install.bat','w').write(f'.\\pythonInstaller.exe /passive InstallAllUsers=0 TargetDir="{nowpath}python38" DefaultJustForMeTargetDir="{nowpath}python38" AssociateFiles=0 CompileAll=1 PrependPath=0 Shortcuts=0 Include_doc=0 Include_launcher=0 InstallLauncherAllUsers=0 Include_test=0 Include_tools=0')
|
# open('install.bat','w').write(f'.\\pythonInstaller.exe /passive InstallAllUsers=0 TargetDir="{nowpath}python38" DefaultJustForMeTargetDir="{nowpath}python38" AssociateFiles=0 CompileAll=1 PrependPath=0 Shortcuts=0 Include_doc=0 Include_launcher=0 InstallLauncherAllUsers=0 Include_test=0 Include_tools=0')
|
||||||
|
|
||||||
srun(f'.\\pythonInstaller.exe /passive InstallAllUsers=0 TargetDir="{nowpath}python38" DefaultJustForMeTargetDir="{nowpath}python38" AssociateFiles=0 CompileAll=1 PrependPath=0 Shortcuts=0 Include_doc=0 Include_launcher=0 InstallLauncherAllUsers=0 Include_test=0 Include_tools=0')
|
srun(
|
||||||
|
f'.\\pythonInstaller.exe /passive InstallAllUsers=1 AssociateFiles=1 CompileAll=1 PrependPath=1 Shortcuts=1 Include_doc=0 Include_exe=1 Include_pip=1 Include_lib=1 Include_tcltk=1 Include_launcher=1 InstallLauncherAllUsers=1 Include_test=0 Include_tools=0'
|
||||||
|
)
|
||||||
|
|
||||||
# print('\033[0{}\033[0m'.format("正在下载pip安装工具\nDownloading get-pip tool"))
|
remove('./pythonInstaller.exe')
|
||||||
|
|
||||||
|
# print('\033[7m{}\033[0m'.format("正在下载pip安装工具\nDownloading get-pip tool"))
|
||||||
|
|
||||||
# try:
|
# try:
|
||||||
# urllib.request.urlretrieve(
|
# urllib.request.urlretrieve(
|
||||||
@ -79,33 +85,41 @@ if platform == "win32":
|
|||||||
# input(str(E) + "\n自动下载失败,按下回车取消")
|
# input(str(E) + "\n自动下载失败,按下回车取消")
|
||||||
# exit()
|
# exit()
|
||||||
|
|
||||||
# print('\033[0{}\033[0m'.format("正在下载pip\nDownloading pip"))
|
# print('\033[7m{}\033[0m'.format("正在下载pip\nDownloading pip"))
|
||||||
|
|
||||||
# chdir('./python38')
|
# chdir('./python38')
|
||||||
# srun(r'".\python.exe get-pip.py')
|
# srun(r'".\python.exe get-pip.py')
|
||||||
|
|
||||||
# print('\033[0{}\033[0m'.format('正在安装pip\nInstalling pip'))
|
# print('\033[7m{}\033[0m'.format('正在安装pip\nInstalling pip'))
|
||||||
|
|
||||||
# for dire in listdir('./Lib/site-packages/'):
|
# for dire in listdir('./Lib/site-packages/'):
|
||||||
# move('./Lib/site-packages/'+dire,'./'+dire)
|
# move('./Lib/site-packages/'+dire,'./'+dire)
|
||||||
|
|
||||||
# print('\033[0{}\033[0m'.format("完成!"))
|
# print('\033[7m{}\033[0m'.format("完成!"))
|
||||||
|
|
||||||
# chdir('../')
|
# chdir('../')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
choseurl = int(input('\033[0{}\033[0m'.format("""请选择 音·创 下载源,默认为0
|
choseurl = int(
|
||||||
|
input(
|
||||||
|
'\033[7m{}\033[0m'.format(
|
||||||
|
"""请选择 音·创 下载源,默认为0
|
||||||
Please choose a download source of Musicreater(default 0)
|
Please choose a download source of Musicreater(default 0)
|
||||||
[0] 私有服务器<暂无> | Private Server<Haven't been built>
|
[0] 私有服务器<暂无> | Private Server<Haven't been built>
|
||||||
[1] Gitee
|
[1] Gitee
|
||||||
[2] Github\n:""")))
|
[2] Github\n:"""
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
except Exception as E:
|
except Exception as E:
|
||||||
print('\033[0{}\033[0m'.format(str(E) + "\n将使用默认源\nUsing default source"))
|
print('\033[7m{}\033[0m'.format(str(E) + "\n将使用默认源\nUsing default source"))
|
||||||
choseurl = 0
|
choseurl = 0
|
||||||
|
|
||||||
myurl = ""
|
myurl = ""
|
||||||
Giteeurl = "https://gitee.com/EillesWan/Musicreater/repository/blazearchive/master.zip?Expires=1647771436&Signature=%2BkqLHwmvzScCd4cPQDP0LHLpqeZUxOrOv17QpRy%2FTzs%3D"
|
Giteeurl = "https://gitee.com/EillesWan/Musicreater/repository/blazearchive/master.zip?Expires=1647771436&Signature=%2BkqLHwmvzScCd4cPQDP0LHLpqeZUxOrOv17QpRy%2FTzs%3D"
|
||||||
Githuburl = "https://codeload.github.com/EillesWan/Musicreater/zip/refs/heads/master"
|
Githuburl = (
|
||||||
|
"https://codeload.github.com/EillesWan/Musicreater/zip/refs/heads/master"
|
||||||
|
)
|
||||||
|
|
||||||
url = (
|
url = (
|
||||||
myurl
|
myurl
|
||||||
@ -117,7 +131,7 @@ Please choose a download source of Musicreater(default 0)
|
|||||||
else myurl
|
else myurl
|
||||||
)
|
)
|
||||||
|
|
||||||
print('\033[0{}\033[0m'.format("正在下载音·创\nDownloading Musicreater"))
|
print('\033[7m{}\033[0m'.format("正在下载音·创\nDownloading Musicreater"))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
urllib.request.urlretrieve(url, "./master.zip")
|
urllib.request.urlretrieve(url, "./master.zip")
|
||||||
@ -125,12 +139,11 @@ Please choose a download source of Musicreater(default 0)
|
|||||||
input('\033[0{}\033[0m'.format(str(E) + "\n自动下载失败,按下回车取消"))
|
input('\033[0{}\033[0m'.format(str(E) + "\n自动下载失败,按下回车取消"))
|
||||||
exit()
|
exit()
|
||||||
|
|
||||||
print('\033[0{}\033[0m'.format("安装音·创\nInstalling Musicreater"))
|
print('\033[7m{}\033[0m'.format("安装音·创\nInstalling Musicreater"))
|
||||||
|
|
||||||
zipfile.ZipFile("./master.zip", "r").extractall()
|
zipfile.ZipFile("./master.zip", "r").extractall()
|
||||||
|
|
||||||
remove("./master.zip")
|
remove("./master.zip")
|
||||||
remove('./pythonInstaller.exe')
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
rmtree("./Musicreater")
|
rmtree("./Musicreater")
|
||||||
@ -144,10 +157,16 @@ elif platform == 'linux':
|
|||||||
srun("sudo apt-get install python3-pip")
|
srun("sudo apt-get install python3-pip")
|
||||||
srun("sudo apt-get install git")
|
srun("sudo apt-get install git")
|
||||||
try:
|
try:
|
||||||
choseurl = int(input('\033[0{}\033[0m'.format("""请选择 音·创 下载源,默认为1
|
choseurl = int(
|
||||||
|
input(
|
||||||
|
'\033[0{}\033[0m'.format(
|
||||||
|
"""请选择 音·创 下载源,默认为1
|
||||||
Please choose a download source of Musicreater(default 1)
|
Please choose a download source of Musicreater(default 1)
|
||||||
[1] Gitee
|
[1] Gitee
|
||||||
[2] Github\n:""")))
|
[2] Github\n:"""
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
except Exception as E:
|
except Exception as E:
|
||||||
print(str(E) + "\n将使用默认源\nUsing default source")
|
print(str(E) + "\n将使用默认源\nUsing default source")
|
||||||
choseurl = 1
|
choseurl = 1
|
||||||
@ -162,37 +181,41 @@ Please choose a download source of Musicreater(default 1)
|
|||||||
srun(f"sudo git clone {url}")
|
srun(f"sudo git clone {url}")
|
||||||
|
|
||||||
|
|
||||||
print('\033[0{}\033[0m'.format("编译音·创\nCompiling Musicreater"))
|
print('\033[7m{}\033[0m'.format("编译音·创\nCompiling Musicreater"))
|
||||||
|
|
||||||
if platform == "linux":
|
if platform == "linux":
|
||||||
srun("python3 -O -m compileall -b ./Musicreater/")
|
srun("python3 -O -m compileall -b ./Musicreater/")
|
||||||
open('./Musicreater.sh','w',encoding='utf-8').write("cd ./Musicreater/\npython3 Musicreater.pyc")
|
|
||||||
elif platform == "win32":
|
elif platform == "win32":
|
||||||
chdir('./python38/')
|
srun("python -O -m compileall -b ./Musicreater/")
|
||||||
srun("python.exe -O -m compileall -b ../Musicreater/")
|
|
||||||
chdir('../')
|
|
||||||
open('./Musicreater.bat','w').write('"./python38/python.exe" "./Musicreater/Musicreater.pyc"')
|
|
||||||
|
|
||||||
for parent, dirnames, filenames in walk("./Musicreater"):
|
for parent, dirnames, filenames in walk("./Musicreater"):
|
||||||
for filename in filenames:
|
for filename in filenames:
|
||||||
if filename[-3:] == ".py":
|
if filename[-3:] == ".py":
|
||||||
fn = path.join(parent, filename)
|
fn = path.join(parent, filename)
|
||||||
remove(fn)
|
remove(fn)
|
||||||
print('\033[0{}\033[0m'.format(f"删除文件 {fn}"))
|
print(f"删除文件 {fn}")
|
||||||
for dirname in dirnames:
|
for dirname in dirnames:
|
||||||
if dirname == "__pycache__":
|
if dirname == "__pycache__":
|
||||||
pn = path.join(parent, dirname)
|
pn = path.join(parent, dirname)
|
||||||
rmtree(pn)
|
rmtree(pn)
|
||||||
print('\033[0{}\033[0m'.format(f"删除目录 {pn}"))
|
print(f"删除目录 {pn}")
|
||||||
|
|
||||||
|
|
||||||
print('\033[0{}\033[0m'.format("您可以开始使用音·创了\n我们将在后台为您安装各项支持库"))
|
print(
|
||||||
|
'\033[7m{}\033[0m'.format(
|
||||||
|
"""您可以开始使用音·创了
|
||||||
|
我们将在后台为您安装各项支持库
|
||||||
|
您可以运行Musicreater文件夹中的Musicreater.pyc文件来运行音·创
|
||||||
|
|
||||||
|
You can use Musicreater now,
|
||||||
|
We will setup the libraries ineed for you in background,
|
||||||
|
You can now open Musicreater.PYC in the directory of ./Musicreater to run Musicreater
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
if platform == "linux":
|
if platform == "linux":
|
||||||
srun("python3 ./Musicreater/补全库.pyc")
|
srun("python3 ./Musicreater/补全库.pyc")
|
||||||
elif platform == "win32":
|
elif platform == "win32":
|
||||||
chdir('./python38/')
|
srun("python ./Musicreater/补全库.pyc")
|
||||||
srun(".\\python.exe ../Musicreater/补全库.pyc")
|
|
||||||
chdir('../')
|
|
||||||
|
11
README.md
11
README.md
@ -8,13 +8,14 @@
|
|||||||
|
|
||||||
|
|
||||||
### 介绍
|
### 介绍
|
||||||
|
|
||||||
音·创 Musicreater 是由凌天之云创新应用软件开发团队开发的一款免费开源的 **《我的世界:基岩版》** 音乐制作软件
|
音·创 Musicreater 是由凌天之云创新应用软件开发团队开发的一款免费开源的 **《我的世界:基岩版》** 音乐制作软件
|
||||||
|
|
||||||
欢迎加群:861684859
|
欢迎加群:861684859
|
||||||
|
|
||||||
### 作者
|
### 作者
|
||||||
|
|
||||||
金羿 (Eilles):主要作者,开发了音·创主体,及其前身“函数音乐生成器”、“世界音创”。
|
金羿 Eilles:我的世界基岩版指令师,个人开发者,B站不知名UP主,在校高中生。
|
||||||
|
|
||||||
bgArray “诸葛亮与八卦阵”:修复bug,改进代码美观度,增加新功能,更改数据格式等。
|
bgArray “诸葛亮与八卦阵”:修复bug,改进代码美观度,增加新功能,更改数据格式等。
|
||||||
|
|
||||||
@ -29,14 +30,16 @@ bgArray “诸葛亮与八卦阵”:修复bug,改进代码美观度,增加
|
|||||||
|
|
||||||
### 安装教程
|
### 安装教程
|
||||||
|
|
||||||
正在到来。
|
下载音·创自动安装器,将其放在你希望安装音·创的位置,运行后将自动安装。
|
||||||
|
|
||||||
|
提示:下载源最好选择2GitHub。
|
||||||
|
|
||||||
### 从源代码运行教程
|
### 从源代码运行教程
|
||||||
|
|
||||||
#### Windows7+
|
#### Windows7+
|
||||||
|
|
||||||
0. [Gitee下载(需要登陆)](https://gitee.com/EillesWan/Musicreater/repository/archive/master.zip)
|
0. [Gitee下载(需要登陆)](https://gitee.com/EillesWan/Musicreater)
|
||||||
[Github下载(慢)](https://github.com/EillesWan/Musicreater/archive/refs/heads/master.zip)本程序源代码
|
[Github下载(慢)](https://github.com/EillesWan/Musicreater)本程序源代码
|
||||||
1. 安装Python 3.8.10
|
1. 安装Python 3.8.10
|
||||||
[下载64位Python安装包](https://www.python.org/ftp/python/3.8.10/python-3.8.10-amd64.exe)
|
[下载64位Python安装包](https://www.python.org/ftp/python/3.8.10/python-3.8.10-amd64.exe)
|
||||||
[下载32位Python安装包](https://www.python.org/ftp/python/3.8.10/python-3.8.10.exe)
|
[下载32位Python安装包](https://www.python.org/ftp/python/3.8.10/python-3.8.10.exe)
|
||||||
|
@ -3,8 +3,10 @@
|
|||||||
[![Licence: Apache (shields.io)](https://img.shields.io/badge/Licence-Apache-blueviolet)](https://choosealicense.com/licenses/apache-2.0/)
|
[![Licence: Apache (shields.io)](https://img.shields.io/badge/Licence-Apache-blueviolet)](https://choosealicense.com/licenses/apache-2.0/)
|
||||||
[![Bilibili: 凌云金羿 (shields.io)]( https://img.shields.io/badge/Bilibili-%E5%87%8C%E4%BA%91%E9%87%91%E7%BE%BF-blueviolet)](https://space.bilibili.com/397369002/)
|
[![Bilibili: 凌云金羿 (shields.io)]( https://img.shields.io/badge/Bilibili-%E5%87%8C%E4%BA%91%E9%87%91%E7%BE%BF-blueviolet)](https://space.bilibili.com/397369002/)
|
||||||
[![Bilibili: 诸葛亮与八卦阵 (shields.io)](https://img.shields.io/badge/Bilibili-%E8%AF%B8%E8%91%9B%E4%BA%AE%E4%B8%8E%E5%85%AB%E5%8D%A6%E9%98%B5-blueviolet)](https://space.bilibili.com/604072474)
|
[![Bilibili: 诸葛亮与八卦阵 (shields.io)](https://img.shields.io/badge/Bilibili-%E8%AF%B8%E8%91%9B%E4%BA%AE%E4%B8%8E%E5%85%AB%E5%8D%A6%E9%98%B5-blueviolet)](https://space.bilibili.com/604072474)
|
||||||
|
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
|
||||||
|
|
||||||
### Introduction
|
### Introduction
|
||||||
|
|
||||||
Musicreater(音·创) is an Eilles(*W-YI*)'s app that is used for creating musics in **Minecraft: Bedrock Edition**.
|
Musicreater(音·创) is an Eilles(*W-YI*)'s app that is used for creating musics in **Minecraft: Bedrock Edition**.
|
||||||
|
|
||||||
Welcome to join our QQ group: 861684859
|
Welcome to join our QQ group: 861684859
|
||||||
@ -26,7 +28,10 @@ Support Windows7+ && Linux (that supports Python3.8)
|
|||||||
|
|
||||||
### Installation
|
### Installation
|
||||||
|
|
||||||
Comming soon...
|
Download the *[MSCT Auto Installer]()*, put it in a directory that you want to install *Musicreater* into.
|
||||||
|
Then run the auto installer and it will help you to install the *Musicreator*
|
||||||
|
|
||||||
|
Tips: You'd better choose the 2GitHub download source
|
||||||
|
|
||||||
### Run with Source Code
|
### Run with Source Code
|
||||||
|
|
||||||
|
@ -25,29 +25,34 @@ LANGUAGELIST = {
|
|||||||
# 第三个是语言的本地名称和地区
|
# 第三个是语言的本地名称和地区
|
||||||
'zh-CN': (
|
'zh-CN': (
|
||||||
"简体中文 中国大陆",
|
"简体中文 中国大陆",
|
||||||
"Simplified Chinese, Chinese Mainland",
|
"Simplified Chinese - China Mainland",
|
||||||
"简体中文 中国大陆",
|
"简体中文 中国大陆",
|
||||||
),
|
),
|
||||||
'zh-TW': (
|
'zh-TW': (
|
||||||
"繁体中文 台湾省",
|
"繁体中文 中国台湾省",
|
||||||
"Traditional Chinese, Taiwan Province",
|
"Traditional Chinese - Taiwan, China",
|
||||||
"正體中文,台灣省",
|
"正體中文,中国台灣省",
|
||||||
),
|
),
|
||||||
# 'zh-HK': (
|
# 'zh-HK': (
|
||||||
# "繁体中文 香港",
|
# "繁体中文 香港",
|
||||||
# "Traditional Chinese, the Hong Kong Special Administrative Region",
|
# "Traditional Chinese - the Hong Kong Special Administrative Region",
|
||||||
# "繁體中文,香港特別行政區",
|
# "繁體中文,香港特別行政區",
|
||||||
# ),
|
# ),
|
||||||
# 'zh-MO': (
|
# 'zh-MO': (
|
||||||
# "繁体中文 澳门",
|
# "繁体中文 澳门",
|
||||||
# "Traditional Chinese, the Macao Special Administrative Region",
|
# "Traditional Chinese - the Macao Special Administrative Region",
|
||||||
# "繁體中文,澳門特別行政區",
|
# "繁體中文,澳門特別行政區",
|
||||||
# ),
|
# ),
|
||||||
'en-GB': (
|
'en-GB': (
|
||||||
"英语 英国",
|
"英语 英国",
|
||||||
"British English, the United Kingdom",
|
"British English - the United Kingdom",
|
||||||
"British English, the United Kingdom",
|
"British English - the United Kingdom",
|
||||||
),
|
),
|
||||||
|
'zh-ME' : (
|
||||||
|
"喵喵文 中国大陆",
|
||||||
|
"Meow Catsese - China Mainland"
|
||||||
|
"喵喵喵~ 祖国喵~"
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
# 对于旧版本音·创的语言支持
|
# 对于旧版本音·创的语言支持
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# 使用 空格 把键与对应文本隔开
|
# 使用 空格 把键与对应文本隔开
|
||||||
# 使用 井字符 在每一行的开头编写注释
|
# 使用 井字符 在每一行的开头编写注释
|
||||||
# 注意!井字符请开头放,切勿含有空格
|
# 注意!井字符请开头放,切勿含有空格
|
||||||
# 或者在正文结尾放!
|
# 也切勿在正文结尾放!
|
||||||
LANGKEY zh-CN
|
LANGKEY zh-CN
|
||||||
LANGCHINESENAME 简体中文 中国大陆
|
LANGCHINESENAME 简体中文 中国大陆
|
||||||
LANGENGLIFHNAME Simplified Chinese, Chinese Mainland
|
LANGENGLIFHNAME Simplified Chinese, Chinese Mainland
|
||||||
@ -10,3 +10,7 @@ LANGLOCALNAME 简体中文 中国大陆
|
|||||||
MSCT 音·创
|
MSCT 音·创
|
||||||
F音创 音·创 Musicreater
|
F音创 音·创 Musicreater
|
||||||
关于 音·创 - 关于
|
关于 音·创 - 关于
|
||||||
|
凌云pairs 凌天之云创新我的世界开发团队\n×\n凌天之云创新计算机应用软件开发团队
|
||||||
|
开发者 - 开发人员 -
|
||||||
|
译者 - 翻译人员 -
|
||||||
|
确定 确定
|
17
languages/zh-ME.lang
Normal file
17
languages/zh-ME.lang
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# 音创创喵的 本地化语言文件
|
||||||
|
# 使用 空格 把键与对应文本隔开
|
||||||
|
# 使用 井字符 在每一行的开头编写注释
|
||||||
|
# 注意!井字符请开头放,切勿含有空格
|
||||||
|
# 也切勿在正文结尾放!
|
||||||
|
LANGKEY zh-ME
|
||||||
|
LANGCHINESENAME 喵喵文 中国大陆
|
||||||
|
LANGENGLIFHNAME Meow Catsese, China Mainland
|
||||||
|
LANGLOCALNAME 喵喵喵~ 祖国喵~
|
||||||
|
TRANSLATERS 金羿,Email EillesWan@outlook.com,QQ 2647547478
|
||||||
|
MSCT 音创创喵~
|
||||||
|
F音创 音·创 Musicreater
|
||||||
|
关于 音创创喵的主人们
|
||||||
|
凌云pairs 凌天之云创新我的世界开发团队\n×\n凌天之云创新计算机应用软件开发团队
|
||||||
|
开发者 ~ 主人们 ~
|
||||||
|
译者 ~ 爸爸妈妈们 ~
|
||||||
|
确定 好哒~
|
@ -87,6 +87,7 @@ class disp:
|
|||||||
|
|
||||||
self.initWidget(wordView, buttons, settingBox, notemap)
|
self.initWidget(wordView, buttons, settingBox, notemap)
|
||||||
|
|
||||||
|
# 设定函数部分
|
||||||
def setTitle(self, title: str = '', debug: bool = False) -> None:
|
def setTitle(self, title: str = '', debug: bool = False) -> None:
|
||||||
'''设置窗口标题'''
|
'''设置窗口标题'''
|
||||||
self.root.title = title
|
self.root.title = title
|
||||||
@ -147,7 +148,7 @@ class disp:
|
|||||||
self.RootMenu[menuName] = menu
|
self.RootMenu[menuName] = menu
|
||||||
self.root.config(menu=self.mainMenuBar)
|
self.root.config(menu=self.mainMenuBar)
|
||||||
|
|
||||||
def addMenu(self, menuRoot: str = '', menuLabel: str = '', menuCommand = None):
|
def addMenu(self, menuRoot: str = '', menuLabel: str = '', menuCommand=None):
|
||||||
'''增加一个菜单项
|
'''增加一个菜单项
|
||||||
:param menuRoot : str
|
:param menuRoot : str
|
||||||
菜单的根菜单,即所属的菜单上的文字
|
菜单的根菜单,即所属的菜单上的文字
|
||||||
@ -197,12 +198,17 @@ class disp:
|
|||||||
def setWordView(self, text: str) -> None:
|
def setWordView(self, text: str) -> None:
|
||||||
self._wordviewBar['text'] = text
|
self._wordviewBar['text'] = text
|
||||||
|
|
||||||
|
# 预置函数部分
|
||||||
def authorMenu(
|
def authorMenu(
|
||||||
authors: tuple = (('金羿', 'EillesWan@outlook.com'), ('诸葛亮与八卦阵', '474037765'))
|
authors: tuple = (
|
||||||
):
|
('金羿', 'Email EillesWan@outlook.com', 'QQ 2647547478'),
|
||||||
|
('诸葛亮与八卦阵', 'QQ 474037765'),
|
||||||
|
),
|
||||||
|
translaters: tuple = None,
|
||||||
|
):
|
||||||
'''自定义作者界面'''
|
'''自定义作者界面'''
|
||||||
from languages.lang import _
|
from languages.lang import _
|
||||||
|
from languages.lang import DEFAULTLANGUAGE
|
||||||
from msctLib.buildIN import version
|
from msctLib.buildIN import version
|
||||||
|
|
||||||
aabw = tk.Tk()
|
aabw = tk.Tk()
|
||||||
@ -218,28 +224,45 @@ def authorMenu(
|
|||||||
# pack 的side可以赋值为LEFT RTGHT TOP BOTTOM
|
# pack 的side可以赋值为LEFT RTGHT TOP BOTTOM
|
||||||
# grid 的row 是列数、column是行排,注意,这是针对空间控件本身大小来的,即是指向当前控件的第几个。
|
# grid 的row 是列数、column是行排,注意,这是针对空间控件本身大小来的,即是指向当前控件的第几个。
|
||||||
# place的 x、y是(x,y)坐标
|
# place的 x、y是(x,y)坐标
|
||||||
# pic = tk.PhotoImage(file='./bin/pics/Ryoun_S.png')
|
|
||||||
# tk.Label(aabw, image=pic, width=200, height=200).pack()
|
|
||||||
# del pic
|
|
||||||
tk.Label(aabw, text='', font=('', 5)).pack()
|
|
||||||
tk.Label(aabw, text=READABLETEXT[12], font=('', 20)).pack()
|
|
||||||
tk.Label(aabw, text='', font=('', 15)).pack()
|
|
||||||
for i in READABLETEXT[15]:
|
|
||||||
tk.Label(
|
tk.Label(
|
||||||
aabw, text=i[0], font=('', 17 if i[1] else 15, 'bold' if i[1] else '')
|
aabw,
|
||||||
|
image=tk.PhotoImage(file='./resources/RyounLogo.png'),
|
||||||
|
width=200,
|
||||||
|
height=200,
|
||||||
|
).pack()
|
||||||
|
tk.Label(aabw, text=_('凌云pairs'), font=('', 20)).pack()
|
||||||
|
tk.Label(aabw, text='', font=('', 15)).pack()
|
||||||
|
tk.Label(aabw, text=_('开发者'), font=('', 15)).pack()
|
||||||
|
for i in authors:
|
||||||
|
for j in i:
|
||||||
|
tk.Label(
|
||||||
|
aabw,
|
||||||
|
text=j,
|
||||||
|
font=(
|
||||||
|
'',
|
||||||
|
17 if i.index(j) == 0 else 15,
|
||||||
|
'bold' if i.index(j) == 0 else '',
|
||||||
|
),
|
||||||
).pack()
|
).pack()
|
||||||
tk.Label(aabw, text='', font=('', 5)).pack()
|
tk.Label(aabw, text='', font=('', 5)).pack()
|
||||||
if DEFAULTLANGUAGE != 'zh-CN':
|
if DEFAULTLANGUAGE != 'zh-CN':
|
||||||
tk.Label(aabw, text=READABLETEXT[16], font=('', 15)).pack()
|
tk.Label(aabw, text=_('译者'), font=('', 15)).pack()
|
||||||
for i in READABLETEXT['Translator']:
|
for i in _('TRANSLATERS').split(';'):
|
||||||
|
for j in i.split(','):
|
||||||
tk.Label(
|
tk.Label(
|
||||||
aabw, text=i[0], font=('', 17 if i[1] else 15, 'bold' if i[1] else '')
|
aabw,
|
||||||
|
text=j,
|
||||||
|
font=(
|
||||||
|
'',
|
||||||
|
17 if i.split(',').index(j) == 0 else 15,
|
||||||
|
'bold' if i.split(',').index(j) == 0 else '',
|
||||||
|
),
|
||||||
).pack()
|
).pack()
|
||||||
|
|
||||||
def exitAboutWindow():
|
def exitAboutWindow():
|
||||||
aabw.destroy()
|
aabw.destroy()
|
||||||
|
|
||||||
tk.Button(aabw, text=READABLETEXT[13], command=exitAboutWindow).pack()
|
tk.Button(aabw, text=_('确定'), command=exitAboutWindow).pack()
|
||||||
|
|
||||||
aabw.mainloop()
|
aabw.mainloop()
|
||||||
|
|
||||||
@ -265,3 +288,10 @@ class ProgressBar:
|
|||||||
:param debug : bool
|
:param debug : bool
|
||||||
是否输出日志到控制台'''
|
是否输出日志到控制台'''
|
||||||
self.root = root
|
self.root = root
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__mian__':
|
||||||
|
import os
|
||||||
|
|
||||||
|
os.chdir('../')
|
||||||
|
disp.authorMenu()
|
||||||
|
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 86 KiB |
Loading…
Reference in New Issue
Block a user