Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
MBetterc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mbetter
MBetterc
Commits
330ec622
Commit
330ec622
authored
Jun 08, 2026
by
Your Name
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix PyInstaller Qt platform plugin collection
parent
45f9d58b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
14 deletions
+43
-14
build.py
build.py
+40
-11
main.py
main.py
+1
-1
settings.py
mbetterclient/config/settings.py
+1
-1
app.py
mbetterclient/web_dashboard/app.py
+1
-1
No files found.
build.py
View file @
330ec622
...
...
@@ -14,7 +14,7 @@ from typing import List, Dict, Any
# Build configuration
BUILD_CONFIG
=
{
'app_name'
:
'MbetterClient'
,
'app_version'
:
'1.0.3
4
'
,
'app_version'
:
'1.0.3
7
'
,
'description'
:
'Cross-platform multimedia client application'
,
'author'
:
'MBetter Team'
,
'entry_point'
:
'main.py'
,
...
...
@@ -426,14 +426,29 @@ def collect_binaries() -> List[tuple]:
"""Collect binary files that need to be included in the build"""
binaries
=
[]
def
add_existing_binary
(
source
:
str
,
destination
:
str
,
label
:
str
=
"binary"
):
source_path
=
Path
(
source
)
if
source_path
.
exists
():
binaries
.
append
((
str
(
source_path
),
destination
))
else
:
print
(
f
" ⚠️ Skipping missing {label}: {source}"
)
# Add Qt platform plugins and minimal X11 libraries for Linux
if
platform
.
system
()
==
'Linux'
:
# Qt platform plugins - must be in 'platforms/' directory for Qt to find them
qt_platform_plugins
=
[
(
'/usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqxcb.so'
,
'platforms/'
),
(
'/usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqwayland-egl.so'
,
'platforms/'
),
(
'/usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqwayland-generic.so'
,
'platforms/'
),
(
'/usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqoffscreen.so'
,
'platforms/'
),
# Qt platform plugins - must be in 'platforms/' directory for Qt to find them.
# Qt 6 packages differ by distro: some ship libqwayland.so, others split it
# into libqwayland-egl.so/libqwayland-generic.so. Treat Wayland plugins as
# optional so the build does not fail on systems that only ship XCB/offscreen.
qt_platform_plugin_dirs
=
[
Path
(
'/usr/lib/x86_64-linux-gnu/qt6/plugins/platforms'
),
get_project_root
()
/
'venv/lib/python3.13/site-packages/PyQt6/Qt6/plugins/platforms'
,
]
qt_platform_plugin_names
=
[
'libqxcb.so'
,
'libqwayland.so'
,
'libqwayland-egl.so'
,
'libqwayland-generic.so'
,
'libqoffscreen.so'
,
]
# Essential Qt6 libraries that need to be bundled - use venv libraries instead of system ones
...
...
@@ -473,10 +488,24 @@ def collect_binaries() -> List[tuple]:
(
'/usr/lib/x86_64-linux-gnu/libgstpbutils-1.0.so.0'
,
'.'
),
]
binaries
.
extend
(
qt_platform_plugins
)
binaries
.
extend
(
qt6_libraries
)
binaries
.
extend
(
essential_x11_libraries
)
binaries
.
extend
(
gstreamer_libraries
)
added_platform_plugins
=
set
()
for
plugin_dir
in
qt_platform_plugin_dirs
:
for
plugin_name
in
qt_platform_plugin_names
:
plugin_path
=
plugin_dir
/
plugin_name
if
plugin_name
not
in
added_platform_plugins
and
plugin_path
.
exists
():
binaries
.
append
((
str
(
plugin_path
),
'platforms/'
))
added_platform_plugins
.
add
(
plugin_name
)
for
plugin_name
in
(
'libqxcb.so'
,
'libqoffscreen.so'
):
if
plugin_name
not
in
added_platform_plugins
:
print
(
f
" ⚠️ Qt platform plugin not found: {plugin_name}"
)
for
source
,
destination
in
qt6_libraries
:
add_existing_binary
(
source
,
destination
,
'Qt library'
)
for
source
,
destination
in
essential_x11_libraries
:
add_existing_binary
(
source
,
destination
,
'X11 library'
)
for
source
,
destination
in
gstreamer_libraries
:
add_existing_binary
(
source
,
destination
,
'GStreamer library'
)
print
(
" 📦 Including Qt6, X11, and GStreamer libraries for self-contained binary"
)
print
(
" 💡 This ensures the binary works on systems without Qt6/GStreamer installed"
)
...
...
main.py
View file @
330ec622
...
...
@@ -217,7 +217,7 @@ Examples:
parser
.
add_argument
(
'--version'
,
action
=
'version'
,
version
=
'MbetterClient 1.0.3
4
'
version
=
'MbetterClient 1.0.3
7
'
)
# Timer options
...
...
mbetterclient/config/settings.py
View file @
330ec622
...
...
@@ -403,7 +403,7 @@ class AppSettings:
timer
:
TimerConfig
=
field
(
default_factory
=
TimerConfig
)
# Application settings
version
:
str
=
"1.0.3
4
"
version
:
str
=
"1.0.3
7
"
debug_mode
:
bool
=
False
dev_message
:
bool
=
False
# Enable debug mode showing only message bus messages
debug_messages
:
bool
=
False
# Show all messages passing through the message bus on screen
...
...
mbetterclient/web_dashboard/app.py
View file @
330ec622
...
...
@@ -247,7 +247,7 @@ class WebDashboard(ThreadedComponent):
def
inject_globals
():
return
{
'app_name'
:
'MbetterClient'
,
'app_version'
:
'1.0.3
4
'
,
'app_version'
:
'1.0.3
7
'
,
'current_time'
:
time
.
time
(),
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment