Add splash screen to make the new long unpacking process seem active
New unpacking delay is because of the CUDNN install of PyTorch, used by Demucs. At some point I'll make a fork without CUDNN and that won't need this but will still have it :)
This commit is contained in:
parent
b512642c9b
commit
849a7e7571
4 changed files with 9 additions and 2 deletions
|
|
@ -39,6 +39,7 @@ pyinstaller `
|
|||
--noconfirm `
|
||||
--console `
|
||||
--icon ".\assets\icon.ico" `
|
||||
--splash ".\assets\splash.png" `
|
||||
--name "Drum Track Converter" `
|
||||
--add-data ".\src;src/" `
|
||||
--add-data=".\assets;assets/" `
|
||||
|
|
|
|||
BIN
assets/splash.afphoto
Normal file
BIN
assets/splash.afphoto
Normal file
Binary file not shown.
BIN
assets/splash.png
Normal file
BIN
assets/splash.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 111 KiB |
10
src/gui.py
10
src/gui.py
|
|
@ -2,6 +2,7 @@
|
|||
@author: Jose Stovall | github.com/oitsjustjose | bsky||@oitsjustjose.com
|
||||
"""
|
||||
|
||||
import importlib
|
||||
import os
|
||||
import platform
|
||||
import subprocess
|
||||
|
|
@ -91,8 +92,6 @@ class MainWindow(QMainWindow):
|
|||
prefix = "start /wait" if platform.system() == "Windows" else ""
|
||||
command = f"{prefix} {cli} {self.input_dir} {self.output_dir} -m {self.model_name}"
|
||||
|
||||
print(f"{command=}")
|
||||
|
||||
self.__child_proc = subprocess.Popen(command.split(" "), shell=True, creationflags=subprocess.CREATE_NEW_CONSOLE)
|
||||
self.__child_proc.wait()
|
||||
|
||||
|
|
@ -240,6 +239,13 @@ def main() -> None:
|
|||
When the app is closed, the exit code is stored for sys.exit() while
|
||||
in the meantime the off-thread processing (if any) is stopped.
|
||||
"""
|
||||
# Tell the PyInstaller GUI that we're done loading
|
||||
if "_PYI_SPLASH_IPC" in os.environ and importlib.util.find_spec("pyi_splash"):
|
||||
import pyi_splash
|
||||
|
||||
pyi_splash.update_text("Done Loading!")
|
||||
pyi_splash.close()
|
||||
|
||||
app = QApplication(sys.argv)
|
||||
|
||||
icon = QIcon()
|
||||
|
|
|
|||
Loading…
Reference in a new issue