zhuzichu520 / PySide6-FluentUI-QML

FluentUI for PySide6 and QML
251 stars 46 forks source link

Make qrc2py.py portable & change folder name "resource" to avoid conflict with standard Python package #25

Closed tongkl1 closed 7 months ago

tongkl1 commented 7 months ago

There exists a Python standard package named "resource" which PyInstaller on Linux will use instead of our custom folder for "resource.example_rc". As a result the packaged binary cannot run and will prompt the following

import resource.example_rc as rc
ModuleNotFoundError: No module named 'resource.example_rc'; 'resource' is not a package

Changing resource to resources avoids the issue. More PRs on the way to make the package able to deploy on Linux without manually re-compiling and replacing the binary.

I also changed qrc2py.py to make it runnable on Linux. Should also run on Mac OS but cannot test it cuz I don't use Mac

zhuzichu520 commented 7 months ago

谢谢您提交的代码,目前代码已经废弃,正在重新写个全部都是python的版本,不采用调用dll形式