Module: SKLoc

Defined in:
lib/skloc.rb

Class Method Summary collapse

Class Method Details

.addDataToPlist(configObj) ⇒ Object



34
35
36
37
38
39
40
41
42
# File 'lib/skloc.rb', line 34

def self.addDataToPlist(configObj)
    configObj['Kernel']['Emulate']['Cpuid1Data'] = self.wData('')
    configObj['Kernel']['Emulate']['Cpuid1Mask'] = self.wData('')
    configObj['NVRAM']['Add']['4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14']['DefaultBackgroundColor'] = self.wData('AAAAAA==')
    configObj['NVRAM']['Add']['4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14']['UIScale'] = self.wData('AQ==')
    configObj['NVRAM']['Add']['7C436110-AB2A-4BBB-A880-FE41995C9F82']['SystemAudioVolume'] = self.wData('Rg==')
    configObj['NVRAM']['Add']['7C436110-AB2A-4BBB-A880-FE41995C9F82']['csr-active-config'] = self.wData('/wcAAA==')
    configObj['NVRAM']['Add']['7C436110-AB2A-4BBB-A880-FE41995C9F82']['prev-lang:kbd'] = self.wData('emgtSGFuczoyNTI=')
end

.cVersion(configObj, v) ⇒ Object



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/skloc.rb', line 18

def self.cVersion(configObj, v)
    if v == 'r'
        configObj['Misc']['Debug']['AppleDebug'] = false
        configObj['Misc']['Debug']['ApplePanic'] = false
        configObj['Misc']['Debug']['Target'] = 0
        configObj['Misc']['Security']['AllowNvramReset'] = false
        configObj['NVRAM']['Add']['7C436110-AB2A-4BBB-A880-FE41995C9F82']['boot-args'] = '-no_compat_check -wegnoegpu'
    else
        configObj['Misc']['Debug']['AppleDebug'] = true
        configObj['Misc']['Debug']['ApplePanic'] = true
        configObj['Misc']['Debug']['Target'] = 67
        configObj['Misc']['Security']['AllowNvramReset'] = true
        configObj['NVRAM']['Add']['7C436110-AB2A-4BBB-A880-FE41995C9F82']['boot-args'] = '-v dart=0 debug=0x100 ncpi=0x2000 keepsyms=1 -no_compat_check -wegnoegpu'
    end
    self.addDataToPlist(configObj)
end

.marshal(f) ⇒ Object



14
15
16
17
# File 'lib/skloc.rb', line 14

def self.marshal(f)
    config = YAML.ext_load_file "#{f}"
    return config
end

.runWritePlist(v = 'd') ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/skloc.rb', line 6

def self.runWritePlist(v='d')
    sPath = File::expand_path("#{__FILE__}../../../ext/skl.yml")
    yCt = YAML.ext_load_file sPath
    self.cVersion(yCt, v)
    pCt = yCt.to_plist
    pFile = File.new("config.plist", "w")
    pFile.syswrite(pCt) if pFile
end

.wData(ct) ⇒ Object



43
44
45
46
47
48
49
# File 'lib/skloc.rb', line 43

def self.wData(ct)
    dArg = ct.decode64
    io = StringIO.new
    io.write dArg
    io.rewind
    return io
end