Skip to content

Commit

Permalink
Replaced convert-to-exe.bat with convert-to-exe.py
Browse files Browse the repository at this point in the history
This makes it much easier for anyone other than myself to build the source code into binaries, since the paths are all dynamically created.
  • Loading branch information
Ahsoka committed Jul 9, 2021
1 parent 8e080c5 commit 5efae92
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 deletions.
12 changes: 0 additions & 12 deletions convert-to-exe.bat

This file was deleted.

22 changes: 22 additions & 0 deletions convert-to-exe.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from PyInstaller.__main__ import run

import PyQt6
import pathlib

pyqt6_dir = pathlib.Path(PyQt6.__file__).parent

if __name__ == '__main__':
run([
'run.py',
'--name', 'Beskar',
'--clean',
'--noconfirm',
'--icon', r'beskar\images\beskar-icon.ico',
'--paths', f'{pyqt6_dir / "Qt6" / "bin"}',
f'--paths', f'{pyqt6_dir / "Qt6" / "plugins" / "platforms"}',
'--hidden-import', 'PyQt6.sip',
'--hidden-import', 'PyQt6.QtPrintSupport',
'--add-data', 'beskar\images;images',
'--add-data', f'{pyqt6_dir / "Qt6" / "plugins" / "platforms"};platforms',
'--add-data', f'{pyqt6_dir / "Qt6" / "plugins" / "styles"};styles'
])

0 comments on commit 5efae92

Please sign in to comment.