Part 5 of 7 · Visa Manager App

The Difference Between Working and Finished

The cockpit worked on my machine, launched from a terminal, inside my Python environment, and none of that survives contact with an office computer. Shipping a desktop app means one double-clickable thing that needs no Python, no pip, and no console window, and this post is that packaging step with PyInstaller, plus the polish details that separate a script from a product.

PyInstaller reads a Python entry point, follows every import, and bundles the interpreter, the libraries, and the code into a native executable. For this app the whole build is one command:

# pip install pyinstaller
pyinstaller --onefile --windowed --name "UAE_Visa_Manager" --icon app.ico main.py

Each flag is a decision. onefile packs everything into a single executable instead of a folder of hundreds of files, slower to start by a moment, vastly cleaner to distribute, one file is one thing to copy. windowed is the pythonw lesson from the shop software living on, no console window behind the app, and with the console hidden the same obligation follows, errors must surface in the interface, the app’s exception hook shows a dialog instead of dying silently. The name flag stamps the executable properly, and the icon flag is disproportionately important, the .ico appears in the title bar, the taskbar, and the desktop shortcut, and it is most of what makes the app read as real software to the person using it daily.

The honest quirks of packaging an app this size, learned in the build-fix loop. The web engine makes the bundle heavy, QtWebEngine drags Chromium along, so the executable weighs well over a hundred megabytes, normal for this architecture and worth saying out loud so nobody hunts a nonexistent mistake. First launches can trip antivirus heuristics, unsigned single-file executables that unpack themselves look suspicious to scanners, expected, and the reason commercial software buys code-signing certificates. And the test that matters is not the build succeeding, it is the executable running on a machine that has never seen Python, the office computer is the only judge whose verdict counts.

The final polish is the launch experience as the user meets it, the executable on the desktop with its icon, double-click, the app’s own login gate, and the cockpit exactly as it was left yesterday, sessions alive thanks to the persistent profile. No terminal, no environment, no ceremony, the distance between runs on my machine and lives on theirs is exactly these details, and crossing it is what shipping means for desktop software.

A few things people ask me about this

Why is my PyInstaller executable so large? You are shipping an interpreter, your libraries, and, with QtWebEngine, a whole browser engine. Over a hundred megabytes is normal for this architecture, not a packaging mistake.

My windowed app just vanishes on errors, why? The console that used to show tracebacks is gone. Install an excepthook that shows a dialog, windowed mode makes visible error handling mandatory.

Next

One capability was still missing from the cockpit, the credentials themselves, remembered and filled without ever sitting in a plain text file. The encrypted password manager is the next post.

Leave a Reply

Your email address will not be published. Required fields are marked *