diff --git a/AutoInstaller/MSCT Auto Installer.exe b/AutoInstaller/MSCT Auto Installer.exe index cc097a5..08dc593 100644 Binary files a/AutoInstaller/MSCT Auto Installer.exe and b/AutoInstaller/MSCT Auto Installer.exe differ diff --git a/AutoInstaller/MSCT Auto Installer.py b/AutoInstaller/MSCT Auto Installer.py index e726b8f..7ae2148 100644 --- a/AutoInstaller/MSCT Auto Installer.py +++ b/AutoInstaller/MSCT Auto Installer.py @@ -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 [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") diff --git a/README.md b/README.md index 5e71955..7578ad7 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/README_en.md b/README_en.md index 68433ce..0e5efcd 100644 --- a/README_en.md +++ b/README_en.md @@ -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 diff --git a/languages/lang.py b/languages/lang.py index 54ea3b7..4ed2ab4 100644 --- a/languages/lang.py +++ b/languages/lang.py @@ -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" + "喵喵喵~ 祖国喵~" + ) } # 对于旧版本音·创的语言支持 diff --git a/languages/zh-CN.lang b/languages/zh-CN.lang index bfbd30b..1a260fb 100644 --- a/languages/zh-CN.lang +++ b/languages/zh-CN.lang @@ -2,7 +2,7 @@ # 使用 空格 把键与对应文本隔开 # 使用 井字符 在每一行的开头编写注释 # 注意!井字符请开头放,切勿含有空格 -# 或者在正文结尾放! +# 也切勿在正文结尾放! LANGKEY zh-CN LANGCHINESENAME 简体中文 中国大陆 LANGENGLIFHNAME Simplified Chinese, Chinese Mainland @@ -10,3 +10,7 @@ LANGLOCALNAME 简体中文 中国大陆 MSCT 音·创 F音创 音·创 Musicreater 关于 音·创 - 关于 +凌云pairs 凌天之云创新我的世界开发团队\n×\n凌天之云创新计算机应用软件开发团队 +开发者 - 开发人员 - +译者 - 翻译人员 - +确定 确定 \ No newline at end of file diff --git a/languages/zh-ME.lang b/languages/zh-ME.lang new file mode 100644 index 0000000..614cb97 --- /dev/null +++ b/languages/zh-ME.lang @@ -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凌天之云创新计算机应用软件开发团队 +开发者 ~ 主人们 ~ +译者 ~ 爸爸妈妈们 ~ +确定 好哒~ diff --git a/msctLib/display.py b/msctLib/display.py index fefc637..5440959 100644 --- a/msctLib/display.py +++ b/msctLib/display.py @@ -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() diff --git a/resources/Ryoun2_Alpha.png b/resources/RyounLogo.png similarity index 100% rename from resources/Ryoun2_Alpha.png rename to resources/RyounLogo.png