-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
136 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import ctypes | ||
import json | ||
import os | ||
import sys | ||
# import requests | ||
|
||
# from tkinter import * | ||
from tkinter import Tk,font | ||
|
||
import Functions | ||
import MainWindowOldStyle as OldStyle | ||
import MusyncSavDecodeGUI as NewStyle | ||
|
||
version = '1.2.7rc2' | ||
isPreRelease = True | ||
preVersion = "1.2.7pre2" | ||
# isPreRelease = False | ||
|
||
def launcher(): | ||
root = Tk() | ||
ctypes.windll.shcore.SetProcessDpiAwareness(1) | ||
fonts = list(font.families()) | ||
Functions.CheckFileBeforeStarting(fonts) | ||
# del fonts | ||
Functions.CheckConfig() | ||
with open('./musync_data/ExtraFunction.cfg','r',encoding='utf8') as cfg: | ||
cfg = json.load(cfg) | ||
if cfg['ChangeConsoleStyle']: | ||
Functions.ChangeConsoleStyle() | ||
root.tk.call('tk', 'scaling', 1.25) | ||
root.resizable(False, True) #允许改变窗口高度,不允许改变窗口宽度 | ||
# 强制仅旧版UI | ||
window = OldStyle.MusyncSavDecodeGUI(root=root,version=version,preVersion=preVersion,isPreRelease=isPreRelease) | ||
# if cfg['EnableFramelessWindow']: | ||
# root.overrideredirect(1) | ||
# window = NewStyle.MusyncSavDecodeGUI(root=root) | ||
# else: | ||
# window = OldStyle.MusyncSavDecodeGUI(root=root,version=version,preVersion=preVersion,isPreRelease=isPreRelease) | ||
root.update() | ||
root.mainloop() | ||
|
||
|
||
if __name__ == '__main__': | ||
if sys.argv[-1] == "debug": | ||
launcher() | ||
else: | ||
try: | ||
launcher() | ||
except Exception as e: | ||
print(repr(e)) | ||
os.system("pause") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters