Skip to content

Commit

Permalink
Remove .idea files, tk86t.dll files, update icons and some minor tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
R-YaTian committed Dec 30, 2024
1 parent 50a8887 commit 474a1e8
Show file tree
Hide file tree
Showing 23 changed files with 12 additions and 117 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ __pycache__/

# Distribution / packaging
.Python
.idea/
build/
develop-eggs/
dist/
Expand Down
6 changes: 0 additions & 6 deletions .idea/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion .idea/.name

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/TWLMagician-main.iml

This file was deleted.

56 changes: 0 additions & 56 deletions .idea/inspectionProfiles/Custom.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/inspectionProfiles/profiles_settings.xml

This file was deleted.

7 changes: 0 additions & 7 deletions .idea/misc.xml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

10 changes: 0 additions & 10 deletions .idea/vcs.xml

This file was deleted.

File renamed without changes.
File renamed without changes.
Binary file added Res/version.bin
Binary file not shown.
17 changes: 9 additions & 8 deletions TWLMagician.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# coding=utf-8

# TWLMagician
# Version 1.3.2
# Version 1.3.3
# Author: R-YaTian
# Original "HiyaCFW-Helper" Author: mondul <[email protected]>

Expand Down Expand Up @@ -35,19 +35,19 @@
ssl._create_default_https_context = ssl._create_unverified_context
ntime_tmp = None
downloadfile = False
version_number = 130
version_number = 133


# Check Update
def get_version():
if loc == 'zh_cn' or (loca == 'zh_hans' and region == 'cn'):
version_url = 'https://gitee.com/ryatian/mirrors/raw/master/'
else:
version_url = 'https://raw.githubusercontent.com/R-YaTian/TWLMagician/main/'
version_url = 'https://raw.githubusercontent.com/R-YaTian/TWLMagician/main/Res/'
try:
with urlopen(version_url + 'version.bin') as src0, open('version.bin', 'wb') as dst0:
copyfileobj(src0, dst0, show_progress=False)
with open('version.bin', 'r') as ftmp:
with open('version.bin', 'rb') as ftmp:
version_str = ftmp.read()
remove('version.bin')
return int(version_str)
Expand All @@ -70,6 +70,8 @@ def WriteRestartCmd():

def check_update():
printl(_('检查更新中...'))
if path.isfile('OTA.exe'):
remove('OTA.exe')
new_version = get_version()
if new_version == -1:
printl(_('检查更新失败'))
Expand All @@ -90,10 +92,8 @@ def check_update():
if loc == 'zh_cn' or (loca == 'zh_hans' and region == 'cn'):
ota_url = 'https://gitee.com/ryatian/mirrors/releases/download/Res/'
else:
ota_url = 'https://raw.githubusercontent.com/R-YaTian/TWLMagician/main/patches/'
ota_url = 'https://raw.githubusercontent.com/R-YaTian/TWLMagician/main/Res/'
try:
if path.isfile('OTA.exe'):
remove('OTA.exe')
with urlopen(ota_url + ota_fname) as src0, open('OTA.exe', 'wb') as dst0:
copyfileobj(src0, dst0)
WriteRestartCmd()
Expand Down Expand Up @@ -1972,7 +1972,7 @@ def unlaunch_proc(self):
) as src, open(filename, 'wb') as dst:
copyfileobj(src, dst)
else:
with urlopen('https://raw.githubusercontent.com/R-YaTian/TWLMagician/main/unlaunch.zip'
with urlopen('https://raw.githubusercontent.com/R-YaTian/TWLMagician/main/Res/unlaunch.zip'
) as src, open(filename, 'wb') as dst:
copyfileobj(src, dst)
except SystemExit:
Expand Down Expand Up @@ -2458,6 +2458,7 @@ def transfer_main(self):

check_update()
root = Tk(className="Magician") if sysname == 'Linux' else Tk()
root.iconbitmap("icon.ico")
printl(_('TWLMagician启动中...'))

selfPath = path.dirname(path.abspath(argv[0]))
Expand Down
1 change: 0 additions & 1 deletion build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,5 @@ del *.pyd

rmdir /S /Q C:\Users\Public\Run_TWLMagician.dist
copy /Y ..\pack\x64\TaskbarLib.dll .\dist\TaskbarLib.dll
copy /Y ..\pack\x64\tk86t.dll .\dist\tk86t.dll
copy /Y ..\pack\x64\api-ms-win-core-path-l1-1-0.dll .\dist\api-ms-win-core-path-l1-1-0.dll
pause
2 changes: 1 addition & 1 deletion build32.bat
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ call nuitka37.bat --msvc=14.1 --module --no-pyi-file --remove-output --nowarn-mn
call nuitka37.bat --msvc=14.1 --module --no-pyi-file --remove-output --nowarn-mnemonic=old-python-windows-console --output-dir=bootstrap pyutils.py

cd bootstrap
call nuitka37.bat --standalone --onefile --onefile-no-compression --noinclude-dlls=tk86t.dll --include-data-files=../pack/x86/TaskbarLib.dll=TaskbarLib.dll --include-data-files=../pack/x86/tk86t.dll=tk86t.dll --msvc=14.1 --remove-output --enable-plugin=tk-inter --nofollow-import-to=dbm --nofollow-import-to=distutils --nofollow-import-to=py_compile --nofollow-import-to=argparse --nowarn-mnemonic=old-python-windows-console --windows-icon-from-ico=..\icon.ico Run_TWLMagician.py
call nuitka37.bat --standalone --onefile --onefile-no-compression --include-data-files=../pack/x86/TaskbarLib.dll=TaskbarLib.dll --msvc=14.1 --remove-output --enable-plugin=tk-inter --nofollow-import-to=dbm --nofollow-import-to=distutils --nofollow-import-to=py_compile --nofollow-import-to=argparse --nowarn-mnemonic=old-python-windows-console --windows-icon-from-ico=..\icon.ico Run_TWLMagician.py

rename .\Run_TWLMagician.exe TWLMagician.exe
rmdir /S /Q py_langs
Expand Down
Binary file modified icon.icns
Binary file not shown.
Binary file modified icon.ico
Binary file not shown.
Binary file added icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 0 additions & 3 deletions pack/after.cmd

This file was deleted.

Binary file removed pack/x64/tk86t.dll
Binary file not shown.
Binary file removed pack/x86/tk86t.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion py_langs
Submodule py_langs updated 1 files
+31 −1 langs.py
1 change: 0 additions & 1 deletion version.bin

This file was deleted.

0 comments on commit 474a1e8

Please sign in to comment.