Skip to content

Commit

Permalink
Fix verbose typo and add support for PT presence
Browse files Browse the repository at this point in the history
  • Loading branch information
Coopydood committed Sep 23, 2023
1 parent feeacdd commit a374119
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 9 deletions.
3 changes: 2 additions & 1 deletion resources/baseConfig
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ ULTMOS_VERSION=0.0.0
IGNORE_FILE=0
REQUIRES_SUDO=0
VFIO_PTA=0
VFIO_DEVICES=0
GEN_EPOCH=000000000
VERBOSE=1
DISCORD_RPC=1
Expand Down Expand Up @@ -117,7 +118,7 @@ echo \ \ \ \ \ Built with ULTMOS v$ULTMOS_VERSION
echo \ \ \ \ \ Using $CPU_MODEL CPU model
if [ $REQUIRES_SUDO = 1 ]
then
echo \ \ \ \ \ Superuser priviledges enabled
echo \ \ \ \ \ Superuser privileges enabled
fi
if [ $VFIO_PTA = 1 ]
then
Expand Down
42 changes: 34 additions & 8 deletions scripts/drpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
except:
None
osVer = "Unknown"
ptCount = 0

version = open("./.version")
version = version.read()
Expand All @@ -32,10 +33,17 @@

parser = argparse.ArgumentParser("main")
parser.add_argument("--os", dest="osVer",action="store")
parser.add_argument("--pt", dest="pt",action="store")

args = parser.parse_args()

#args.pt = "0"

osVer = args.osVer
try:
ptCount = int(args.pt)
except:
None


client_id = "1149434759152422922"
Expand Down Expand Up @@ -69,11 +77,29 @@
RPC.update(large_image="ultmos",large_text=projectVer,details="Loading...",buttons=([{"label": "View on GitHub", "url": "https://github.com/Coopydood/ultimate-macOS-KVM"}]))
except:
exit
time.sleep(4)
try:
RPC.update(small_image="ultmoslite",large_image=osOpt,large_text=osName,small_text=projectVer,details=osName,start=startTime,buttons=([{"label": "View on GitHub", "url": "https://github.com/Coopydood/ultimate-macOS-KVM"}]))
#RPC.update(small_image=osOpt,large_image="ultmos",large_text=osName,small_text=projectVer,details=osName,start=startTime,buttons=([{"label": "View on GitHub", "url": "https://github.com/Coopydood/ultimate-macOS-KVM"}]))
while True:
time.sleep(15)
except:
exit
time.sleep(2)

if ptCount == 1:
try:
RPC.update(small_image="ultmoslite",large_image=osOpt,large_text=osName,small_text=projectVer,details=osName,state="Passthrough with "+str(ptCount)+" device",start=startTime,buttons=([{"label": "View on GitHub", "url": "https://github.com/Coopydood/ultimate-macOS-KVM"}]))
#RPC.update(small_image=osOpt,large_image="ultmos",large_text=osName,small_text=projectVer,details=osName,start=startTime,buttons=([{"label": "View on GitHub", "url": "https://github.com/Coopydood/ultimate-macOS-KVM"}]))
while True:
time.sleep(15)
except:
exit
elif ptCount > 1:
try:
RPC.update(small_image="ultmoslite",large_image=osOpt,large_text=osName,small_text=projectVer,details=osName,state="Passthrough with "+str(ptCount)+" devices",start=startTime,buttons=([{"label": "View on GitHub", "url": "https://github.com/Coopydood/ultimate-macOS-KVM"}]))
#RPC.update(small_image=osOpt,large_image="ultmos",large_text=osName,small_text=projectVer,details=osName,start=startTime,buttons=([{"label": "View on GitHub", "url": "https://github.com/Coopydood/ultimate-macOS-KVM"}]))
while True:
time.sleep(15)
except:
exit
else:
try:
RPC.update(small_image="ultmoslite",large_image=osOpt,large_text=osName,small_text=projectVer,details=osName,start=startTime,buttons=([{"label": "View on GitHub", "url": "https://github.com/Coopydood/ultimate-macOS-KVM"}]))
#RPC.update(small_image=osOpt,large_image="ultmos",large_text=osName,small_text=projectVer,details=osName,start=startTime,buttons=([{"label": "View on GitHub", "url": "https://github.com/Coopydood/ultimate-macOS-KVM"}]))
while True:
time.sleep(15)
except:
exit
1 change: 1 addition & 0 deletions scripts/extras/vfio-passthrough.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ def manualAPSelect():
apFileM = apFileM.replace("#-display none","-display none")
apFileM = apFileM.replace("REQUIRES_SUDO=0","REQUIRES_SUDO=1")
apFileM = apFileM.replace("VFIO_PTA=0","VFIO_PTA=1")
apFileM = apFileM.replace("VFIO_DEVICES=0","VFIO_DEVICES="+str(slotCount))
apFileM = apFileM.replace("-device qxl-vga,vgamem_mb=128,vram_size_mb=128","#-device qxl-vga,vgamem_mb=128,vram_size_mb=128 # DISABLED BY VFIO-PCI PASSTHROUGH ASSISTANT")
os.system("cp resources/ovmf/OVMF_CODE.fd ovmf/OVMF_CODE.fd")
os.system("cp resources/ovmf/OVMF_VARS_PT.fd ovmf/OVMF_VARS.fd")
Expand Down

0 comments on commit a374119

Please sign in to comment.