mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-06 09:22:26 +00:00
adding splash screen support to terminal.spec and terminal.py
This commit is contained in:
14
build/conda/conda-3-8-env-full.yaml
vendored
14
build/conda/conda-3-8-env-full.yaml
vendored
@@ -1,14 +0,0 @@
|
||||
channels:
|
||||
- conda-forge
|
||||
- defaults
|
||||
dependencies:
|
||||
- python=3.8
|
||||
- pip
|
||||
- poetry=1.1.12
|
||||
- numpy=1.21.2
|
||||
- cvxpy=1.2.0
|
||||
- pytest
|
||||
- black=22.1.0
|
||||
- sphinx=4.1.1
|
||||
- charset-normalizer=2.0.12
|
||||
- rich=10.16.2
|
||||
14
build/conda/conda-3-8-env.yaml
vendored
14
build/conda/conda-3-8-env.yaml
vendored
@@ -1,14 +0,0 @@
|
||||
channels:
|
||||
- conda-forge
|
||||
- defaults
|
||||
dependencies:
|
||||
- python=3.8
|
||||
- pip
|
||||
- poetry=1.1.12
|
||||
- numpy=1.21.2
|
||||
- cvxpy=1.2.0
|
||||
- pytest
|
||||
- black=22.1.0
|
||||
- sphinx=4.1.1
|
||||
- charset-normalizer=2.0.12
|
||||
- rich=10.16.2
|
||||
11
build/pyinstaller/terminal.spec
vendored
11
build/pyinstaller/terminal.spec
vendored
@@ -48,15 +48,23 @@ a = Analysis(
|
||||
)
|
||||
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
|
||||
|
||||
splash = Splash('../../images/splashscreen.png',
|
||||
binaries=a.binaries,
|
||||
datas=a.datas,
|
||||
text_pos=(200, 400),
|
||||
text_size=12,
|
||||
text_color='black')
|
||||
|
||||
exe = EXE(
|
||||
pyz,
|
||||
a.scripts,
|
||||
splash,
|
||||
splash.binaries,
|
||||
a.binaries,
|
||||
a.zipfiles,
|
||||
a.datas,
|
||||
[],
|
||||
name="terminal",
|
||||
name="GameStonk",
|
||||
debug=False,
|
||||
bootloader_ignore_signals=False,
|
||||
strip=False,
|
||||
@@ -68,6 +76,7 @@ exe = EXE(
|
||||
target_arch="x86_64",
|
||||
codesign_identity=None,
|
||||
entitlements_file=None,
|
||||
icon = "../../images/gst_app.ico",
|
||||
)
|
||||
|
||||
|
||||
|
||||
19
terminal.py
19
terminal.py
@@ -39,6 +39,25 @@ from gamestonk_terminal.terminal_helper import (
|
||||
welcome_message,
|
||||
)
|
||||
|
||||
# This imports the package needed for the installer - Wrapped in try/except because
|
||||
# it's not needed on the normal launch of project.
|
||||
try:
|
||||
import pyi_splash
|
||||
except:
|
||||
pass
|
||||
# Below line tells the splash screen to go away on .exe launch when terminal is loaded.
|
||||
try:
|
||||
# Update the text on the splash screen
|
||||
pyi_splash.update_text("Terminal Loaded!")
|
||||
# Close the splash screen. It does not matter when the call
|
||||
# to this function is made, the splash screen remains open until
|
||||
# this function is called or the Python program is terminated.
|
||||
pyi_splash.close()
|
||||
except Exception as e:
|
||||
print(e)
|
||||
pass
|
||||
|
||||
|
||||
# pylint: disable=too-many-public-methods,import-outside-toplevel,too-many-branches
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
Reference in New Issue
Block a user