更新安装指示,完成关于界面的编写,UI进一步制作中

This commit is contained in:
EillesWan 2022-03-26 12:24:00 +08:00
parent d21c26d632
commit c62806d470
9 changed files with 183 additions and 96 deletions

View File

@ -47,29 +47,35 @@ from shutil import rmtree, move
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'):
try:
urllib.request.urlretrieve(
"https://www.python.org/ftp/python/3.8.10/python-3.8.10.exe"
if architecture()[0] == "32bit"
else "https://www.python.org/ftp/python/3.8.10/python-3.8.10-amd64.exe",
"./pythonInstaller.exe",
print('\033[7m{}\033[0m'.format("正在下载python\nDownloading Python"))
try:
urllib.request.urlretrieve(
"https://www.python.org/ftp/python/3.8.10/python-3.8.10.exe"
if architecture()[0] == "32bit"
else "https://www.python.org/ftp/python/3.8.10/python-3.8.10-amd64.exe",
"./pythonInstaller.exe",
)
# urllib.request.urlretrieve("https://www.python.org/ftp/python/3.8.10/python-3.8.10.exe","./pythonInstaller.exe")
except Exception as E:
input(str(E) + "\n自动下载失败,按下回车取消")
exit()
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')
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'
)
# urllib.request.urlretrieve("https://www.python.org/ftp/python/3.8.10/python-3.8.10.exe","./pythonInstaller.exe")
except Exception as E:
input(str(E) + "\n自动下载失败,按下回车取消")
exit()
print('\033[0{}\033[0m'.format('正在安装python\nInstalling Python'+f'\n{nowpath}python38\\'))
remove('./pythonInstaller.exe')
# 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')
# print('\033[0{}\033[0m'.format("正在下载pip安装工具\nDownloading get-pip tool"))
# print('\033[7m{}\033[0m'.format("正在下载pip安装工具\nDownloading get-pip tool"))
# try:
# urllib.request.urlretrieve(
@ -79,33 +85,41 @@ if platform == "win32":
# input(str(E) + "\n自动下载失败按下回车取消")
# exit()
# print('\033[0{}\033[0m'.format("正在下载pip\nDownloading pip"))
# print('\033[7m{}\033[0m'.format("正在下载pip\nDownloading pip"))
# chdir('./python38')
# 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/'):
# move('./Lib/site-packages/'+dire,'./'+dire)
# print('\033[0{}\033[0m'.format("完成!"))
# print('\033[7m{}\033[0m'.format("完成!"))
# chdir('../')
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)
[0] 私有服务器<暂无> | Private Server<Haven't been built>
[1] Gitee
[2] Github\n:""")))
[2] Github\n:"""
)
)
)
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
myurl = ""
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 = (
myurl
@ -117,7 +131,7 @@ Please choose a download source of Musicreater(default 0)
else myurl
)
print('\033[0{}\033[0m'.format("正在下载音·创\nDownloading Musicreater"))
print('\033[7m{}\033[0m'.format("正在下载音·创\nDownloading Musicreater"))
try:
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自动下载失败,按下回车取消"))
exit()
print('\033[0{}\033[0m'.format("安装音·创\nInstalling Musicreater"))
print('\033[7m{}\033[0m'.format("安装音·创\nInstalling Musicreater"))
zipfile.ZipFile("./master.zip", "r").extractall()
remove("./master.zip")
remove('./pythonInstaller.exe')
try:
rmtree("./Musicreater")
@ -144,10 +157,16 @@ elif platform == 'linux':
srun("sudo apt-get install python3-pip")
srun("sudo apt-get install git")
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)
[1] Gitee
[2] Github\n:""")))
[2] Github\n:"""
)
)
)
except Exception as E:
print(str(E) + "\n将使用默认源\nUsing default source")
choseurl = 1
@ -162,37 +181,41 @@ Please choose a download source of Musicreater(default 1)
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":
srun("python3 -O -m compileall -b ./Musicreater/")
open('./Musicreater.sh','w',encoding='utf-8').write("cd ./Musicreater/\npython3 Musicreater.pyc")
elif platform == "win32":
chdir('./python38/')
srun("python.exe -O -m compileall -b ../Musicreater/")
chdir('../')
open('./Musicreater.bat','w').write('"./python38/python.exe" "./Musicreater/Musicreater.pyc"')
srun("python -O -m compileall -b ./Musicreater/")
for parent, dirnames, filenames in walk("./Musicreater"):
for filename in filenames:
if filename[-3:] == ".py":
fn = path.join(parent, filename)
remove(fn)
print('\033[0{}\033[0m'.format(f"删除文件 {fn}"))
print(f"删除文件 {fn}")
for dirname in dirnames:
if dirname == "__pycache__":
pn = path.join(parent, dirname)
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":
srun("python3 ./Musicreater/补全库.pyc")
elif platform == "win32":
chdir('./python38/')
srun(".\\python.exe ../Musicreater/补全库.pyc")
chdir('../')
srun("python ./Musicreater/补全库.pyc")

View File

@ -8,13 +8,14 @@
### 介绍
音·创 Musicreater 是由凌天之云创新应用软件开发团队开发的一款免费开源的 **《我的世界:基岩版》** 音乐制作软件
欢迎加群861684859
### 作者
金羿 (Eilles):主要作者,开发了音·创主体,及其前身“函数音乐生成器”、“世界音创”
金羿 Eilles我的世界基岩版指令师个人开发者B站不知名UP主在校高中生
bgArray “诸葛亮与八卦阵”修复bug改进代码美观度增加新功能更改数据格式等。
@ -29,14 +30,16 @@ bgArray “诸葛亮与八卦阵”修复bug改进代码美观度增加
### 安装教程
正在到来。
下载音·创自动安装器,将其放在你希望安装音·创的位置,运行后将自动安装。
提示下载源最好选择2GitHub。
### 从源代码运行教程
#### Windows7+
0. [Gitee下载需要登陆](https://gitee.com/EillesWan/Musicreater/repository/archive/master.zip)
[Github下载](https://github.com/EillesWan/Musicreater/archive/refs/heads/master.zip)本程序源代码
0. [Gitee下载需要登陆](https://gitee.com/EillesWan/Musicreater)
[Github下载](https://github.com/EillesWan/Musicreater)本程序源代码
1. 安装Python 3.8.10
[下载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)

View File

@ -3,8 +3,10 @@
[![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-%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
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
@ -26,7 +28,10 @@ Support Windows7+ && Linux (that supports Python3.8)
### 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

View File

@ -25,29 +25,34 @@ LANGUAGELIST = {
# 第三个是语言的本地名称和地区
'zh-CN': (
"简体中文 中国大陆",
"Simplified Chinese, Chinese Mainland",
"Simplified Chinese - China Mainland",
"简体中文 中国大陆",
),
'zh-TW': (
"繁体中文 台湾省",
"Traditional Chinese, Taiwan Province",
"正體中文,台灣省",
"繁体中文 中国台湾省",
"Traditional Chinese - Taiwan, China",
"正體中文,中国台灣省",
),
# 'zh-HK': (
# "繁体中文 香港",
# "Traditional Chinese, the Hong Kong Special Administrative Region",
# "Traditional Chinese - the Hong Kong Special Administrative Region",
# "繁體中文,香港特別行政區",
# ),
# 'zh-MO': (
# "繁体中文 澳门",
# "Traditional Chinese, the Macao Special Administrative Region",
# "Traditional Chinese - the Macao Special Administrative Region",
# "繁體中文,澳門特別行政區",
# ),
'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"
"喵喵喵~ 祖国喵~"
)
}
# 对于旧版本音·创的语言支持

View File

@ -2,7 +2,7 @@
# 使用 空格 把键与对应文本隔开
# 使用 井字符 在每一行的开头编写注释
# 注意!井字符请开头放,切勿含有空格
# 或者在正文结尾放!
# 也切勿在正文结尾放!
LANGKEY zh-CN
LANGCHINESENAME 简体中文 中国大陆
LANGENGLIFHNAME Simplified Chinese, Chinese Mainland
@ -10,3 +10,7 @@ LANGLOCALNAME 简体中文 中国大陆
MSCT 音·创
F音创 音·创 Musicreater
关于 音·创 - 关于
凌云pairs 凌天之云创新我的世界开发团队\n×\n凌天之云创新计算机应用软件开发团队
开发者 - 开发人员 -
译者 - 翻译人员 -
确定 确定

17
languages/zh-ME.lang Normal file
View 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凌天之云创新计算机应用软件开发团队
开发者 ~ 主人们 ~
译者 ~ 爸爸妈妈们 ~
确定 好哒~

View File

@ -87,6 +87,7 @@ class disp:
self.initWidget(wordView, buttons, settingBox, notemap)
# 设定函数部分
def setTitle(self, title: str = '', debug: bool = False) -> None:
'''设置窗口标题'''
self.root.title = title
@ -147,7 +148,7 @@ class disp:
self.RootMenu[menuName] = menu
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
菜单的根菜单即所属的菜单上的文字
@ -197,51 +198,73 @@ class disp:
def setWordView(self, text: str) -> None:
self._wordviewBar['text'] = text
# 预置函数部分
def authorMenu(
authors: tuple = (
('金羿', 'Email EillesWan@outlook.com', 'QQ 2647547478'),
('诸葛亮与八卦阵', 'QQ 474037765'),
),
translaters: tuple = None,
):
'''自定义作者界面'''
from languages.lang import _
from languages.lang import DEFAULTLANGUAGE
from msctLib.buildIN import version
def authorMenu(
authors: tuple = (('金羿', 'EillesWan@outlook.com'), ('诸葛亮与八卦阵', '474037765'))
):
'''自定义作者界面'''
from languages.lang import _
from msctLib.buildIN import version
aabw = tk.Tk()
aabw.title(_('关于'))
aabw.geometry('550x600') # 像素
tk.Label(aabw, text='', font=('', 15)).pack()
tk.Label(aabw, text=_('F音创'), font=('', 35)).pack()
tk.Label(
aabw,
text='{} {}'.format(version.version[1] + version.version[0]),
font=('', 15),
).pack()
# pack 的side可以赋值为LEFT RTGHT TOP BOTTOM
# grid 的row 是列数、column是行排注意这是针对空间控件本身大小来的即是指向当前控件的第几个。
# 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]:
aabw = tk.Tk()
aabw.title(_('关于'))
aabw.geometry('550x600') # 像素
tk.Label(aabw, text='', font=('', 15)).pack()
tk.Label(aabw, text=_('F音创'), font=('', 35)).pack()
tk.Label(
aabw, text=i[0], font=('', 17 if i[1] else 15, 'bold' if i[1] else '')
aabw,
text='{} {}'.format(version.version[1] + version.version[0]),
font=('', 15),
).pack()
tk.Label(aabw, text='', font=('', 5)).pack()
if DEFAULTLANGUAGE != 'zh-CN':
tk.Label(aabw, text=READABLETEXT[16], font=('', 15)).pack()
for i in READABLETEXT['Translator']:
tk.Label(
aabw, text=i[0], font=('', 17 if i[1] else 15, 'bold' if i[1] else '')
).pack()
# pack 的side可以赋值为LEFT RTGHT TOP BOTTOM
# grid 的row 是列数、column是行排注意这是针对空间控件本身大小来的即是指向当前控件的第几个。
# place的 x、y是(x,y)坐标
tk.Label(
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()
tk.Label(aabw, text='', font=('', 5)).pack()
if DEFAULTLANGUAGE != 'zh-CN':
tk.Label(aabw, text=_('译者'), font=('', 15)).pack()
for i in _('TRANSLATERS').split(';'):
for j in i.split(','):
tk.Label(
aabw,
text=j,
font=(
'',
17 if i.split(',').index(j) == 0 else 15,
'bold' if i.split(',').index(j) == 0 else '',
),
).pack()
def exitAboutWindow():
aabw.destroy()
def exitAboutWindow():
aabw.destroy()
tk.Button(aabw, text=READABLETEXT[13], command=exitAboutWindow).pack()
tk.Button(aabw, text=_('确定'), command=exitAboutWindow).pack()
aabw.mainloop()
aabw.mainloop()
class ProgressBar:
@ -265,3 +288,10 @@ class ProgressBar:
:param debug : bool
是否输出日志到控制台'''
self.root = root
if __name__ == '__mian__':
import os
os.chdir('../')
disp.authorMenu()

View File

Before

Width:  |  Height:  |  Size: 86 KiB

After

Width:  |  Height:  |  Size: 86 KiB