mirror of
https://github.com/TriM-Organization/Musicreater.git
synced 2025-09-05 11:56:23 +00:00
慢慢更新。
This commit is contained in:
BIN
msctLib/bugExecution.exe
Normal file
BIN
msctLib/bugExecution.exe
Normal file
Binary file not shown.
50
msctLib/buildIN.py
Normal file
50
msctLib/buildIN.py
Normal file
@ -0,0 +1,50 @@
|
||||
# -*- coding: UTF-8 -*-
|
||||
"""音·创的核心内置组件功能集合"""
|
||||
|
||||
|
||||
|
||||
class version:
|
||||
libraries = (
|
||||
'mido', 'amulet', 'amulet-core', 'amulet-nbt', 'piano_transcription_inference', 'pypinyin',
|
||||
'pyinstaller', 'py7zr','websockets', 'torch', 'requests'
|
||||
)
|
||||
"""当前所需库"""
|
||||
|
||||
version = ('0.2.0', 'Delta',)
|
||||
"""当前版本"""
|
||||
|
||||
def __init__(self) -> None:
|
||||
|
||||
self.libraries = version.libraries
|
||||
"""当前所需库"""
|
||||
|
||||
self.version = version.version
|
||||
"""当前版本"""
|
||||
|
||||
|
||||
def installLibraries(self,index:str = 'https://pypi.tuna.tsinghua.edu.cn/simple'):
|
||||
"""安装全部开发用库"""
|
||||
from sys import platform
|
||||
import os
|
||||
if platform == 'win32':
|
||||
import shutil
|
||||
try:
|
||||
shutil.rmtree(os.getenv('APPDATA') + '\\Musicreater\\')
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
for i in self.libraries:
|
||||
print("安装库:" + i)
|
||||
os.system(f"python -m pip install {i} -i {index}")
|
||||
elif platform == 'linux':
|
||||
os.system("sudo apt-get install python3-pip")
|
||||
os.system("sudo apt-get install python3-tk")
|
||||
os.system("sudo apt-get install python3-tkinter")
|
||||
for i in self.libraries:
|
||||
print("安装库:" + i)
|
||||
os.system(f"sudo python3 -m pip install {i} -i {index}")
|
||||
|
||||
|
||||
def __call__(self):
|
||||
'''直接安装库,顺便返回一下当前版本'''
|
||||
self.installLibraries()
|
||||
return self.version
|
@ -172,13 +172,13 @@ class disp:
|
||||
def authorMenu(authors: tuple = (('金羿', 'EillesWan@outlook.com'), ('诸葛亮与八卦阵', '474037765'))):
|
||||
'''自定义作者界面'''
|
||||
from languages.lang import _
|
||||
|
||||
aabw = tk.Tk()
|
||||
aabw.title(_('关于'))
|
||||
aabw.geometry('550x600') # 像素
|
||||
tk.Label(aabw, text='', font=('', 15)).pack()
|
||||
tk.Label(aabw, text=READABLETEXT[10], font=('', 35)).pack()
|
||||
tk.Label(aabw, text=READABLETEXT[11].format(
|
||||
VER[1] + VER[0]), font=('', 15)).pack()
|
||||
tk.Label(aabw, text=_('F音创'), font=('', 35)).pack()
|
||||
tk.Label(aabw, text='{} {}'.format(VER[1] + VER[0]), font=('', 15)).pack()
|
||||
# pack 的side可以赋值为LEFT RTGHT TOP BOTTOM
|
||||
# grid 的row 是列数、column是行排,注意,这是针对空间控件本身大小来的,即是指向当前控件的第几个。
|
||||
# place的 x、y是(x,y)坐标
|
||||
|
Reference in New Issue
Block a user