3 Commits
0.1 ... 0.2

Author SHA1 Message Date
Stephen Horvath
8b33f75b86 Release 0.2 2025-03-24 21:38:13 +10:00
Stephen Horvath
076f903fbc Add PyInstaller spec for Windows 2025-03-24 20:50:34 +10:00
Stephen Horvath
d65a033523 Fix led colours being added multiple times 2025-03-24 20:47:26 +10:00
8 changed files with 66 additions and 12 deletions

2
.gitignore vendored
View File

@@ -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

View File

@@ -1,2 +1 @@
include yafi/ui/*.ui
include yafi/yafi.gresource

View File

@@ -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.
@@ -36,6 +36,11 @@ Install the package with `pip install yafi`.
Pipx is also supported.
### Windows
It is possible to run YAFI on Windows using [gvsbuild](https://github.com/wingtk/gvsbuild/) and installing YAFI via pip. You will also need to copy `WinRing0x64.dll` and `WinRing0x64.sys` to either the same
directory as `python.exe`, or to `C:\Windows\System32`.
## Screenshots
### Fan Control and Temperature Monitoring

5
pyinstaller/winyafi.py Normal file
View File

@@ -0,0 +1,5 @@
import os
os.environ["GDK_SCALE"] = "2"
from yafi import main
main()

43
pyinstaller/winyafi.spec Normal file
View File

@@ -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,
)

View File

@@ -1,6 +1,6 @@
[project]
name = "yafi"
version = "0.1"
version = "0.2"
authors = [
{ name="Steve-Tech" }
]
@@ -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.4",
"PyGObject"
]
classifiers = [

View File

@@ -95,6 +95,8 @@ class LedsPage(Gtk.Box):
all_colours = ["Red", "Green", "Blue", "Yellow", "White", "Amber"]
def add_colours(strings, led_id):
# Auto and Off should already be present
if strings.get_n_items() <= 2:
supported_colours = ec_commands.leds.led_control_get_max_values(
app.cros_ec, led_id
)

View File

@@ -121,7 +121,7 @@ class YafiApplication(Adw.Application):
developers=["Stephen Horvath"],
issue_url="https://github.com/Steve-Tech/YAFI/issues",
license_type=Gtk.License.GPL_2_0,
version="0.1.0",
version="0.2",
website="https://github.com/Steve-Tech/YAFI",
)
about.add_acknowledgement_section(None, ["Framework Computer Inc. https://frame.work/"])