Skip to content

Commit 0411eab

Browse files
committed
Add more info about Windows installation
1 parent 98fed70 commit 0411eab

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

dev/dev-docs/creating-a-splash-screen.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ When Foliage runs on Windows, it shows a splash screen when it first starts up.
55

66
## Splash screens in PyInstaller
77

8-
On Windows, it is possible to make a PyInstaller-produced application [show a splash screen](https://pyinstaller.readthedocs.io/en/stable/usage.html#splash-screen-experimental) while an application is starting. This splash screen is shown by the loader that PyInstaller creates, and it's shown before your application's code is unpacked and loaded at run-time, so the screen shows up almost immediately after a user starts the application. This is a good thing, because PyInstaller-built binaries tend to take a long time to start.
8+
On Windows, it is possible to make a PyInstaller-produced application [show a splash screen](https://pyinstaller.readthedocs.io/en/stable/usage.html#splash-screen-experimental) while an application is starting. This splash screen is shown by the loader that PyInstaller creates, and it's shown before your application's code is unpacked and loaded at run-time, so the screen shows up almost immediately after a user starts your application. This is a good thing, because PyInstaller-built binaries tend to take a long time to start.
99

10-
The application does not need to do anything to start the splash screen (this is done by putting appropriate configuration values into the [PyInstaller specification file](../../pyinstaller-win32.spec)), but the application _does_ need to do something to make the splash screen disappear. This is accomplished by running the following bit of PyInstaller code at an appropriate time:
10+
Your application code does not need to do anything to start the splash screen; the use of the splash screen is achieved by putting appropriate configuration values into the [PyInstaller specification file](../../pyinstaller-win32.spec)). However, your application _does_ need to do something to make the splash screen _disappear_. This is accomplished by running the following bit of PyInstaller code at an appropriate time:
1111

1212
```python
1313
import pyi_splash
1414

15-
# The splash screen remains open until this function is called
15+
# The splash screen remains visible until this next function is called
1616
# or the Python program is terminated.
1717
pyi_splash.close()
1818
```
1919

20-
In Foliage, this code is wrapped up in another function defined in `ui.py`, and _that_ function is invoked by the main Foliage loop after the application creates the main Foliage window.
20+
In Foliage, the code above code is wrapped up in another function defined in `ui.py`, and _that_ function is invoked by the main Foliage loop (in `__main__.py`) after the application creates the main Foliage window.
2121

2222

2323
## Generating a splash screen a build time
@@ -37,3 +37,10 @@ I automated this process using code in the subdirectory [`dev/splash-screen`](..
3737
3. The PyInstaller [specification file](../../pyinstaller-win32.spec) points to the `.png` file in the splash screen configuration, so that PyInstaller reads an image with an up-to-date version number.
3838

3939
The splash screen image for a given Foliage release is static. The small program is run at application build time, not at run-time. The image is embedded in the self-contained Foliage application created by PyInstaller.
40+
41+
42+
## Setting up Windows to make this all work
43+
44+
To make the above process work, I had to intall two things in my Windows environment:
45+
* [ImageMagick](https://imagemagick.org/script/download.php#windows).
46+
* The [Google Noto Sans](https://fonts.google.com/noto/specimen/Noto+Sans) font. To install a font in Windows 10: download the font file, unzip it, locate the file, right-click on it, and select _Install_ from the menu. (I think I installed the TrueType version but can't remember anymore.)

0 commit comments

Comments
 (0)