diff --git a/.gitignore b/.gitignore index a92495f..0ad13aa 100644 --- a/.gitignore +++ b/.gitignore @@ -30,7 +30,7 @@ MANIFEST # Usually these files are written by a python script from a template # before PyInstaller builds the exe, so as to inject date/other infos into it. *.manifest -*.spec +#*.spec # Installer logs pip-log.txt diff --git a/MANIFEST.in b/MANIFEST.in index 7ab5cc0..e1f41ef 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,2 +1 @@ -include yafi/ui/*.ui include yafi/yafi.gresource diff --git a/README.md b/README.md index 5362bcd..56671a6 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Yet Another Framework Interface YAFI is another GUI for the Framework Laptop Embedded Controller. -It is written in Python with a GTK4 Adwaita theme, and uses the `CrOS_EC_Python` library to communicate with the EC. +It is written in Python with a GTK4 Adwaita theme, and uses the [`CrOS_EC_Python`](https://github.com/Steve-Tech/CrOS_EC_Python) library to communicate with the EC. It has support for fan control, temperature monitoring, LED control, and battery limiting. diff --git a/pyinstaller/winyafi.py b/pyinstaller/winyafi.py new file mode 100644 index 0000000..f71916c --- /dev/null +++ b/pyinstaller/winyafi.py @@ -0,0 +1,5 @@ +import os +os.environ["GDK_SCALE"] = "2" + +from yafi import main +main() diff --git a/pyinstaller/winyafi.spec b/pyinstaller/winyafi.spec new file mode 100644 index 0000000..6dd9f56 --- /dev/null +++ b/pyinstaller/winyafi.spec @@ -0,0 +1,43 @@ +# -*- mode: python ; coding: utf-8 -*- +from PyInstaller.utils.hooks import collect_data_files + +datas = [] +datas += collect_data_files('yafi') + + +a = Analysis( + ['winyafi.py'], + pathex=[], + binaries=[('WinRing0x64.dll', '.')], + datas=datas, + hiddenimports=['cros_ec_python'], + hookspath=[], + hooksconfig={"gi":{"module-versions": {"Gtk": "4.0"}}}, + runtime_hooks=[], + excludes=[], + noarchive=False, + optimize=0, +) +pyz = PYZ(a.pure) + +exe = EXE( + pyz, + a.scripts, + a.binaries, + a.datas, + [], + name='winyafi', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir=None, + console=False, + disable_windowed_traceback=False, + argv_emulation=False, + target_arch=None, + codesign_identity=None, + entitlements_file=None, + uac_admin=True, +) diff --git a/pyproject.toml b/pyproject.toml index 8893d34..3d158bc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ description = "Yet Another Framework Interface" readme = "README.md" requires-python = ">=3.10" dependencies = [ - "cros_ec_python >= 0.0.2", + "cros_ec_python >= 0.0.3", "PyGObject" ] classifiers = [