mirror of
https://github.com/yusufipk/dikte.git
synced 2026-09-11 19:06:11 +00:00
The releases page had nothing for Windows, so the only way in was a checkout, a Python and a pip install. What goes out now is one setup program per release: PyInstaller's directory, the pinned ffmpeg the disk image already uses, and Inno Setup around both. It installs for the account alone, so no administrator is asked for. Two executables over the one program there, because a windowed one on Windows has no standard output at all: Dikte.exe for the Start Menu and dikte.exe for the terminal, sharing everything they carry. The icon is drawn by Dikte itself into an .ico, the way the Mac's .icns and Linux's PNGs already are, so there is still no image file in the repository. Starting at sign-in is a registry value rather than a Startup shortcut, which is what lets the setup program, the uninstaller and `dikte integrate` all mean the same thing: the wizard asks once, and typing the command changes the answer later. The three builds move into build.yml, which release.yml now calls instead of holding its own copy, and which a pull request touching the packaging runs on its own. A broken build is then a red pull request rather than a failed release.
27 lines
1.1 KiB
Python
27 lines
1.1 KiB
Python
"""What the AppImage, the disk image and the Windows setup start.
|
|
|
|
dikte/__main__.py is written for a checkout: it puts the directory above the
|
|
package on the import path, which a build has neither the need for nor a
|
|
directory to point at. What is left over is one thing a checkout never sees.
|
|
The Finder hands a double-clicked application a -psn_0_… argument naming the
|
|
process serial number, which argparse reads as a flag it has never heard of and
|
|
exits over, and no one clicking an icon would ever find out why. Nothing else
|
|
here is one platform's: the same file is both Windows executables as well.
|
|
|
|
The three environment lines have to run before anything starts a process,
|
|
opens a connection or reaches for ffmpeg, and before is easier to be sure of
|
|
here than anywhere further in.
|
|
"""
|
|
|
|
import sys
|
|
|
|
from dikte import integrate
|
|
from dikte.app import main
|
|
|
|
if __name__ == "__main__":
|
|
integrate.restore_library_path()
|
|
integrate.use_system_certificates()
|
|
integrate.add_bundled_tools()
|
|
sys.argv[1:] = [arg for arg in sys.argv[1:] if not arg.startswith("-psn_")]
|
|
sys.exit(main())
|