zackelia / bclm

macOS command-line utility to limit max battery charge
MIT License
1.79k stars 87 forks source link

support for mac os versions earlier than catalina #2

Closed hkennyv closed 4 years ago

hkennyv commented 4 years ago

Hey there,

Just wondering if this is possible. I didn't see anything in the README mentioning it, so I thought it couldn't hurt to ask

Cheers!

zackelia commented 4 years ago

Hello @hkennyv! First of all, thanks for your interest in my project!

To clarify, are you asking if there is support or have you run it and it doesn't work pre-Catalina? I'll be willing to take a look into it either way though.

hkennyv commented 4 years ago

no problem! thank you for your work!

I have not run it yet. I can give it a shot in the next couple of days probably

hkennyv commented 4 years ago

so unfortunately, it seems like the answer to this is no. I'm unable to build your package on mojave because mojave doesn't support the xcode version required to use Swift 5.2! I'm stuck on Swift 5.1 unfortunately :(

zackelia commented 4 years ago

After a little research, it seems that while you won't be able to build my project as is, you might be able to run a copy of bclm that I've built. Would you mind downloading bclm from the releases section and using the release instructions? If that doesn't work I'll keep looking though!

hkennyv commented 4 years ago

thanks @zackelia! i'm able to run it!

khuynh@kmbp:~/Downloads $ sudo ./bclm write 80
khuynh@kmbp:~/Downloads $ sudo ./bclm read
80

My battery is pretty much full right now so i'll continue to use it so i can verify it's working as expected

hkennyv commented 4 years ago

and it seems to work! thanks so much for your work!

zackelia commented 4 years ago

Glad it's working now! I've updated the README accordingly for future users.