Make darling-stub-gen detect username

This commit is contained in:
Andrew Hyatt
2019-05-25 19:10:47 -04:00
committed by GitHub
parent c1a8a7cf0c
commit c47c0cedf9
+7 -2
View File
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
import sys, os, subprocess, re
import sys, os, subprocess, re, getpass
# Data
library = False
@@ -12,7 +12,11 @@ library_prefix = "/usr/lib/"
framework_prefix = "/System/Library/Frameworks/"
private_framework_prefix = "/System/Library/PrivateFrameworks/"
class_dump = "/Users/andrewhyatt/bin/class-dump"
#######################################################
##### SET THIS TO WHERE YOUR class-dump BINARY IS #####
#######################################################
username = getpass.getuser()
class_dump = "/Users/" + username + "/bin/class-dump"
copyright = """/*
This file is part of Darling.
@@ -128,6 +132,7 @@ for line in c_func_out.splitlines():
if line == "":
continue
print(line)
if len(line.split(" ")) == 3:
address, id, name = line.split(" ")
# Remove the underscore