Skip to content

feat: tray tooltip fix, View Logs, connection status, GStreamer PATH fix - #27

Open
aayushprsingh wants to merge 1 commit into
leapbtw:x64from
aayushprsingh:main
Open

feat: tray tooltip fix, View Logs, connection status, GStreamer PATH fix#27
aayushprsingh wants to merge 1 commit into
leapbtw:x64from
aayushprsingh:main

Conversation

@aayushprsingh

Copy link
Copy Markdown

Summary of Changes

Fixes

  • Tray tooltip newline: Removed the literal \n that was rendering as a broken newline in the tray icon tooltip
  • GStreamer DLL PATH: UxPlay was crashing on startup because GStreamer plugins couldn't find their DLL dependencies. Added the uxplay bin directory to PATH before launching.
  • Windows path parsing: Fixed shlex.split() corrupting Windows paths (C:\Users becomes C:Users). Replaced with simple whitespace split + quote stripping.

Features

  • View Logs: New menu item that opens uxplay-windows.log in Notepad for easy debugging
  • Connection Status: Tray tooltip now updates every 5 seconds to show if UxPlay server is Running or Stopped (with exit code if crashed)

Known Limitation

  • Recording (removed): The Record Screen (MP4) feature was removed because it requires UxPlay 1.73+ which has no pre-built Windows binary. The bundled uxplay.exe is UxPlay 1.71.1 which does not support the -mp4 flag. Manual recording can still be enabled via Edit Arguments when a compatible binary is bundled.

@aayushprsingh

Copy link
Copy Markdown
Author

Update (2026-04-05)

GUI Log Viewer reverted to Notepad: The Tkinter-based log viewer had font/scrollbar rendering issues when packaged with PyInstaller on Windows. View Logs now opens the log file in Notepad, which is reliable. A web-based approach may be revisited in a future release.

@aayushprsingh

Copy link
Copy Markdown
Author

Update 2 (2026-04-05)

View Logs now works correctly: Fixed to use subprocess.Popen(['notepad.exe', path]) instead of os.startfile(). The .log file association on Windows was preventing os.startfile from opening Notepad.

@leapbtw

leapbtw commented Apr 5, 2026

Copy link
Copy Markdown
Owner

as i wrote in the README i am working on other branches and i'm rewriting uxplay-windows from scratch. I'll still take a look at your work but merging is unlikely

@aayushprsingh

Copy link
Copy Markdown
Author

Thanks for the update! I understand about the rewrite.

A few questions:

  1. Would you be interested in cherry-picking any of the specific fixes into the new rewrite? The most valuable ones are:

    • The GStreamer PATH fix (setting PATH before launching uxplay.exe)
    • The connection status monitoring
    • The Windows path parsing fix (shlex.split corrupts backslashes)
  2. I'd be happy to contribute to the rewrite if you need help. Happy to work on Python packaging, Tkinter UI, or the tray app layer. Let me know if you'd like a hand.

@leapbtw

leapbtw commented Apr 6, 2026

Copy link
Copy Markdown
Owner

Happy to work on Python packaging, Tkinter UI, or the tray app layer. Let me know if you'd like a hand

I’m currently rewriting the project in C++ in the cpp-rewrite branch.
As part of that work, I turned uxplay into a library (libuxplay) and embed it directly into another window.

The rewrite is working quite well so far. One of my goals is to drop Bonjour as a dependency, since managing its installation on Windows is an hassle and it's old and unreliable software in my experience.

The C++ version already works without Bonjour by using BLE pairing. However, that’s not a complete replacement because some desktop PCs may only have LAN and no wireless/BLE hardware.

Ideally I’d like to use Apple’s mDNSResponder, which is essentially the core component of Bonjour and is open source. The issue is that it’s built with MSVC while this project uses MSYS2, so it’s not straightforward to integrate as-is.

If you have the time and interest, this might be an area where help would be very welcome. There are also some forks of mDNSResponder around, but I’d prefer either using Apple’s upstream code directly or maintaining a minimal fork tailored to what uxplay-windows actually needs.

Copilot AI review requested due to automatic review settings June 3, 2026 10:11
@aayushprsingh

Copy link
Copy Markdown
Author

Hi @leapbtw! I have resolved the merge conflicts caused by the C++ rewrite by porting the dynamic status action, tray tooltip connection status, and 'View Logs' features directly into the new C++ GUI codebase (main/mainwindow). All checks should now build and run cleanly. Could you please review and merge? Thank you!

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds basic end-user observability by persisting Qt log output to a file and exposing runtime status + log access via the system tray.

Changes:

  • Add a “Status” tray menu item and keep tray tooltip/menu status in sync with server state.
  • Add a “View Logs” tray action that opens the on-disk log file.
  • Install a global Qt message handler to append logs to uxplay.log under the app’s data directory.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

File Description
src/mainwindow.h Adds a new slot for opening logs from the tray menu.
src/mainwindow.cpp Updates tray UI (status/tooltip) and adds “View Logs” action implementation.
src/main.cpp Adds a custom Qt message handler writing logs to AppDataLocation/uxplay.log.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/main.cpp
Comment on lines +18 to +36
void customMessageHandler(QtMsgType type, const QMessageLogContext &/*context*/, const QString &msg) {
QString txt;
switch (type) {
case QtDebugMsg:
txt = QString("Debug: %1").arg(msg);
break;
case QtInfoMsg:
txt = QString("Info: %1").arg(msg);
break;
case QtWarningMsg:
txt = QString("Warning: %1").arg(msg);
break;
case QtCriticalMsg:
txt = QString("Critical: %1").arg(msg);
break;
case QtFatalMsg:
txt = QString("Fatal: %1").arg(msg);
break;
}
Comment thread src/main.cpp
fprintf(stderr, "%s\n", msg.toLocal8Bit().constData());
}

int main(int argc, char *argv[]) {
Comment thread src/main.cpp
Comment on lines 60 to 63
QApplication app(argc, argv);
qInstallMessageHandler(customMessageHandler);
app.setOrganizationName("leapbtw");
app.setApplicationName("uxplay-windows");
Comment thread src/main.cpp
Comment on lines +37 to +43
QString logPath = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/uxplay.log";
QFile outFile(logPath);
if (outFile.open(QIODevice::WriteOnly | QIODevice::Append | QIODevice::Text)) {
QTextStream ts(&outFile);
ts << QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss.zzz ") << txt << Qt::endl;
outFile.close();
}
Comment thread src/main.cpp
Comment on lines +37 to +39
QString logPath = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/uxplay.log";
QFile outFile(logPath);
if (outFile.open(QIODevice::WriteOnly | QIODevice::Append | QIODevice::Text)) {
Comment thread src/mainwindow.cpp
Comment on lines +564 to +567
void MainWindow::viewLogs() {
QString logPath = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/uxplay.log";
QDesktopServices::openUrl(QUrl::fromLocalFile(logPath));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants