| 1 |
|
| 2 |
import os |
| 3 |
|
| 4 |
""" |
| 5 |
python -m nuitka --help |
| 6 |
# Windows: |
| 7 |
python -m nuitka --onefile --plugin-enable=pyside6 -o "ResistorDecoder.exe" --windows-disable-console --windows-icon-from-ico=icons\resistor_decoder.png --output-dir=nuitka_build src\main.py |
| 8 |
# Linux AppImage: |
| 9 |
python -m nuitka --onefile --plugin-enable=pyside6 -o "ResistorDecoder-1.0.appimage" --windows-disable-console --linux-onefile-icon=icons/resistor_decoder.png --output-dir=nuitka_build src/main.py |
| 10 |
""" |
| 11 |
|
| 12 |
|
| 13 |
os.environ['QT_QPA_PLATFORM_PLUGIN_PATH'] = "." |
| 14 |
|
| 15 |
import sys |
| 16 |
import PySide6.QtWidgets as Qw |
| 17 |
import PySide6.QtCore as Qc |
| 18 |
from ResistorDecoder.src.driver_resistance_calc import ResistanceCalc |
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
def main(): |
| 23 |
Qw.QApplication.setAttribute(Qc.Qt.AA_EnableHighDpiScaling, True) |
| 24 |
Qw.QApplication.setAttribute(Qc.Qt.AA_UseHighDpiPixmaps, True) |
| 25 |
|
| 26 |
app = Qw.QApplication(sys.argv) |
| 27 |
|
| 28 |
window = ResistanceCalc() |
| 29 |
window.show() |
| 30 |
|
| 31 |
sys.exit(app.exec()) |
| 32 |
|
| 33 |
|
| 34 |
if __name__ == "__main__": |
| 35 |
main() |