hackmac 1.5.1 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +8 -0
- data/README.md +55 -0
- data/VERSION +1 -1
- data/bin/efi +1 -1
- data/bin/gfxmon +3 -2
- data/hackmac.gemspec +4 -4
- data/img/gfxmon.png +0 -0
- data/lib/hackmac/graph.rb +11 -5
- data/lib/hackmac/hackmac.yml +1 -2
- data/lib/hackmac/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9e7cfe2bc42ae2f7aee8ac43d49c52814629c99c119eb96ac20a5e932cd3831
|
4
|
+
data.tar.gz: 9f85ee573b12bca903db7bfa12e090d5fab5d5037a81f76fb29269ff908ca5a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3ff124867aec02b6b9270d80471773be1a7af032caf4262935e1241a1d7b49d6c1c6d2952902c70a690ed16a28fb56a75349ca54b10f518c396bde537e37e56
|
7
|
+
data.tar.gz: e133326410563546d46235ceca5d1519e05cd3fc983386679460b95fbda59b6dcdc802d06558e00812815b2d76b854c5890ca25c66fedef9977822fbf8158ac2
|
data/LICENSE
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
Copyright 2019-2023 Florian Frank
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
4
|
+
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
6
|
+
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
8
|
+
|
data/README.md
CHANGED
@@ -0,0 +1,55 @@
|
|
1
|
+
# HackMac
|
2
|
+
|
3
|
+
## Description
|
4
|
+
|
5
|
+
Some ruby tools for working with a Hackintosh, which also might be (partially)
|
6
|
+
useful an a regular Mac.
|
7
|
+
|
8
|
+
## Tools
|
9
|
+
|
10
|
+
- `efi` is a tool to work with OpenCore EFI partitions, that is upgrading
|
11
|
+
OpenCore and Kexts and commiting to its git repository.
|
12
|
+
- `usb` can be used to create a bootable USB containing a MacOs release and
|
13
|
+
uses an EFI partition cloned from a git repository.
|
14
|
+
- `gfxmon` dispays performance statistics for your AMD GPU in the terminal,
|
15
|
+
that is temperature, clock rate, fan rotations, memory and power usage as
|
16
|
+
provided by MacOS, see the screenshot:
|
17
|
+
![gfxmon Screenshot](./img/gfxmon.png "gfxmon Screenshot")
|
18
|
+
|
19
|
+
|
20
|
+
## Installation
|
21
|
+
|
22
|
+
You can use rubygems to fetch the gem and install it for you:
|
23
|
+
|
24
|
+
# gem install hackmac
|
25
|
+
|
26
|
+
You can also put this line into your Gemfile
|
27
|
+
|
28
|
+
gem 'hackmac'
|
29
|
+
|
30
|
+
# Configuration
|
31
|
+
|
32
|
+
First start `efi` without arguments this will display the available commands,
|
33
|
+
but also initializes a default configuration file in
|
34
|
+
`~/.config/hackmac/hackmac.yml` to get you started. If you want work with
|
35
|
+
multiple configuration files you can change the path by setting
|
36
|
+
|
37
|
+
```
|
38
|
+
$ export HACKMAC_CONFIG=~/config/hackmac/other.yml
|
39
|
+
```
|
40
|
+
|
41
|
+
in your shell.
|
42
|
+
|
43
|
+
## Download
|
44
|
+
|
45
|
+
The homepage of this library is located at
|
46
|
+
|
47
|
+
* https://github.com/flori/complex_config
|
48
|
+
|
49
|
+
## Author
|
50
|
+
|
51
|
+
[Florian Frank](mailto:flori@ping.de)
|
52
|
+
|
53
|
+
## License
|
54
|
+
|
55
|
+
This software is licensed under the MIT license.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.6.0
|
data/bin/efi
CHANGED
data/bin/gfxmon
CHANGED
@@ -39,8 +39,9 @@ end
|
|
39
39
|
def list(ps)
|
40
40
|
max = ps.keys.max_by(&:size)&.size&.to_i
|
41
41
|
include Hackmac::Graph::Formatters
|
42
|
-
puts ps.map { |n, v|
|
43
|
-
|
42
|
+
puts ps.sort_by(&:first).map { |n, v|
|
43
|
+
c = derive_color_from_string(n)
|
44
|
+
("%-#{max}s" % n).color(15).on_color(c) + " " + ("%12s" % send(derive_formatter(n), v)).bold
|
44
45
|
}
|
45
46
|
end
|
46
47
|
|
data/hackmac.gemspec
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: hackmac 1.
|
2
|
+
# stub: hackmac 1.6.0 ruby lib
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "hackmac".freeze
|
6
|
-
s.version = "1.
|
6
|
+
s.version = "1.6.0"
|
7
7
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
9
9
|
s.require_paths = ["lib".freeze]
|
10
10
|
s.authors = ["Florian Frank".freeze]
|
11
|
-
s.date = "2023-05-
|
11
|
+
s.date = "2023-05-29"
|
12
12
|
s.description = "This ruby gem provides some useful tools for working with a Hackintosh.".freeze
|
13
13
|
s.email = "flori@ping.de".freeze
|
14
14
|
s.executables = ["efi".freeze, "gfxmon".freeze, "usb".freeze]
|
15
15
|
s.extra_rdoc_files = ["README.md".freeze, "lib/hackmac.rb".freeze, "lib/hackmac/asset_tools.rb".freeze, "lib/hackmac/config.rb".freeze, "lib/hackmac/disks.rb".freeze, "lib/hackmac/github_source.rb".freeze, "lib/hackmac/graph.rb".freeze, "lib/hackmac/graph/display.rb".freeze, "lib/hackmac/ioreg.rb".freeze, "lib/hackmac/kext.rb".freeze, "lib/hackmac/kext_upgrader.rb".freeze, "lib/hackmac/oc.rb".freeze, "lib/hackmac/oc_upgrader.rb".freeze, "lib/hackmac/oc_validator.rb".freeze, "lib/hackmac/plist.rb".freeze, "lib/hackmac/url_download.rb".freeze, "lib/hackmac/utils.rb".freeze, "lib/hackmac/version.rb".freeze]
|
16
|
-
s.files = [".gitignore".freeze, "Gemfile".freeze, "README.md".freeze, "Rakefile".freeze, "VERSION".freeze, "bin/efi".freeze, "bin/gfxmon".freeze, "bin/usb".freeze, "hackmac.gemspec".freeze, "lib/hackmac.rb".freeze, "lib/hackmac/asset_tools.rb".freeze, "lib/hackmac/config.rb".freeze, "lib/hackmac/disks.rb".freeze, "lib/hackmac/github_source.rb".freeze, "lib/hackmac/graph.rb".freeze, "lib/hackmac/graph/display.rb".freeze, "lib/hackmac/hackmac.yml".freeze, "lib/hackmac/ioreg.rb".freeze, "lib/hackmac/kext.rb".freeze, "lib/hackmac/kext_upgrader.rb".freeze, "lib/hackmac/oc.rb".freeze, "lib/hackmac/oc_upgrader.rb".freeze, "lib/hackmac/oc_validator.rb".freeze, "lib/hackmac/plist.rb".freeze, "lib/hackmac/url_download.rb".freeze, "lib/hackmac/utils.rb".freeze, "lib/hackmac/version.rb".freeze]
|
16
|
+
s.files = [".gitignore".freeze, "Gemfile".freeze, "LICENSE".freeze, "README.md".freeze, "Rakefile".freeze, "VERSION".freeze, "bin/efi".freeze, "bin/gfxmon".freeze, "bin/usb".freeze, "hackmac.gemspec".freeze, "img/gfxmon.png".freeze, "lib/hackmac.rb".freeze, "lib/hackmac/asset_tools.rb".freeze, "lib/hackmac/config.rb".freeze, "lib/hackmac/disks.rb".freeze, "lib/hackmac/github_source.rb".freeze, "lib/hackmac/graph.rb".freeze, "lib/hackmac/graph/display.rb".freeze, "lib/hackmac/hackmac.yml".freeze, "lib/hackmac/ioreg.rb".freeze, "lib/hackmac/kext.rb".freeze, "lib/hackmac/kext_upgrader.rb".freeze, "lib/hackmac/oc.rb".freeze, "lib/hackmac/oc_upgrader.rb".freeze, "lib/hackmac/oc_validator.rb".freeze, "lib/hackmac/plist.rb".freeze, "lib/hackmac/url_download.rb".freeze, "lib/hackmac/utils.rb".freeze, "lib/hackmac/version.rb".freeze]
|
17
17
|
s.homepage = "http://github.com/flori/hackmac".freeze
|
18
18
|
s.rdoc_options = ["--title".freeze, "Hackmac - Some useful tools for working with a Hackintosh".freeze, "--main".freeze, "README.md".freeze]
|
19
19
|
s.rubygems_version = "3.3.26".freeze
|
data/img/gfxmon.png
ADDED
Binary file
|
data/lib/hackmac/graph.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'term/ansicolor'
|
2
2
|
require 'tins'
|
3
|
+
require 'digest/md5'
|
3
4
|
|
4
5
|
class Hackmac::Graph
|
5
6
|
include Term::ANSIColor
|
@@ -26,6 +27,15 @@ class Hackmac::Graph
|
|
26
27
|
value.to_s
|
27
28
|
end
|
28
29
|
|
30
|
+
def derive_color_from_string(string)
|
31
|
+
cs = (21..226).select { |d|
|
32
|
+
Term::ANSIColor::Attribute[d].to_rgb_triple.to_hsl_triple.
|
33
|
+
lightness < 40
|
34
|
+
}
|
35
|
+
s = Digest::MD5.digest(string).unpack('Q*')
|
36
|
+
cs[ (s.first ^ s.last) % cs.size ]
|
37
|
+
end
|
38
|
+
|
29
39
|
self
|
30
40
|
end
|
31
41
|
|
@@ -144,11 +154,7 @@ class Hackmac::Graph
|
|
144
154
|
when Proc
|
145
155
|
@color.(@title)
|
146
156
|
when nil
|
147
|
-
|
148
|
-
Term::ANSIColor::Attribute[d].to_rgb_triple.to_hsl_triple.
|
149
|
-
lightness < 40
|
150
|
-
}
|
151
|
-
cs[ @title.bytes.reduce(0, :+) % cs.size ]
|
157
|
+
derive_color_from_string(@title)
|
152
158
|
else
|
153
159
|
@color
|
154
160
|
end
|
data/lib/hackmac/hackmac.yml
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
efi:
|
3
3
|
source: 'storage.gate.ping.de:/git/EFI-hacmaxi.git'
|
4
4
|
usb:
|
5
|
-
os: '/Volumes/Install macOS
|
5
|
+
os: '/Volumes/Install macOS Ventura/Install macOS Ventura.app'
|
6
6
|
mp: '/Volumes/USB'
|
7
7
|
devices:
|
8
8
|
main:
|
@@ -53,4 +53,3 @@ kext:
|
|
53
53
|
# github: 'Mieze/LucyRTL8125Ethernet'
|
54
54
|
USBToolBox:
|
55
55
|
github: 'USBToolBox/kext'
|
56
|
-
|
data/lib/hackmac/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hackmac
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florian Frank
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-05-
|
11
|
+
date: 2023-05-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gem_hadar
|
@@ -179,6 +179,7 @@ extra_rdoc_files:
|
|
179
179
|
files:
|
180
180
|
- ".gitignore"
|
181
181
|
- Gemfile
|
182
|
+
- LICENSE
|
182
183
|
- README.md
|
183
184
|
- Rakefile
|
184
185
|
- VERSION
|
@@ -186,6 +187,7 @@ files:
|
|
186
187
|
- bin/gfxmon
|
187
188
|
- bin/usb
|
188
189
|
- hackmac.gemspec
|
190
|
+
- img/gfxmon.png
|
189
191
|
- lib/hackmac.rb
|
190
192
|
- lib/hackmac/asset_tools.rb
|
191
193
|
- lib/hackmac/config.rb
|