Skip to content

Commit

Permalink
v0.9.5 - XML creation AP stage, various fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Coopydood committed Aug 14, 2023
1 parent 97ca80b commit d1e04ed
Show file tree
Hide file tree
Showing 13 changed files with 513 additions and 109 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ internal/*
resources/.webversion
ovmf/OVMF_CODE.fd
ovmf/OVMF_VARS.fd
ovmf/user_store/OVMF_VARS.fd
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.9.4
0.9.5
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# ultimate-macOS-KVM

### v0.9.4
### v0.9.5

Helping you build the ultimate macOS virtual machine, powered by KVM.

*[What's new?](https://github.com/Coopydood/ultimate-macOS-KVM/blob/main/docs/changelogs/v0-9-4.md)*
*[What's new?](https://github.com/Coopydood/ultimate-macOS-KVM/blob/main/docs/changelogs/v0-9-5.md)*

[![GitHub](https://img.shields.io/github/license/Coopydood/ultimate-macOS-KVM?label=Licence&logo=unlicense&logoColor=white&style=for-the-badge)](https://github.com/Coopydood/ultimate-macOS-KVM/blob/main/LICENSE) [![GitHub repo size](https://img.shields.io/github/repo-size/Coopydood/ultimate-macOS-KVM?label=Size&logo=envoy-proxy&logoColor=white&style=for-the-badge)](https://github.com/Coopydood/ultimate-macOS-KVM) [![Discord](https://img.shields.io/discord/574943603466436628?color=7d86ff&label=Discord&logo=discord&logoColor=white&style=for-the-badge)](https://sl.coopydood.com/discord)

Expand Down
10 changes: 10 additions & 0 deletions docs/AutoPilot.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,16 @@ Custom values are not supported. When inputting a value at this stage, you will
|:-----------:|:-----------------------------------------------------------------------------------------------:|:---------------------:|
| 1280x720 | 800x600<br>1024x768<br>1280x720<br>1280x1024<br>1440x900<br>1920x1080<br>2560x1440<br>3840x2160 | 1024x768<br>1920x1080 |

***
## 13. Generate XML file
As of [v0.9.3](https://github.com/Coopydood/ultimate-macOS-KVM/releases/tag/v0.9.3), XML files can be generated through conversion of a valid AutoPilot config file using the **XML Conversion tool**. This can be accessed through the **Extras** menu.

However, with the [v0.9.5](https://github.com/Coopydood/ultimate-macOS-KVM/releases/tag/v0.9.5) update, this functionality is also built right in as an AutoPilot stage.

If you choose, you can have AutoPilot automatically create an XML file alongside your regular boot config script as part of the AutoPilot flow. You'll then be prompted to import it upon completion, for use within Virtual Machine Manager (virt-manager), for easy GUI access.

This stage is completely optional and can be skipped. You can always use the standalone XML conversion tool to convert an AutoPilot script at any time, from the Extras menu.

***
## Review your preferences
You'll now get a chance to see your choices displayed in the form of a summary screen. An example of this screen can be found below:
Expand Down
24 changes: 24 additions & 0 deletions docs/changelogs/v0-9-5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## v0.9.5

### Minor update • 14/08/2023

This update includes the following features / fixes / changes:

- Added option to generate XML file as part of AutoPilot flow
- AutoPilot stage flow updated to support XML file generation
- AutoPilot now saves a new blob containing the target OS' friendly name
- XML conversion tool can now be used with arguments
- Fixed an issue where the new AP download flow would crash with a newer target OS
- Fixed GPU listing for macOS Sonoma in the GPU checker
- More consistent help and escape menu flow keybinding
- Improved menu handling, including extreme value bounceback
- Backup of OVMF vars file is now performed during AutoPilot flow
- Resetting vNVRAM will now use local OVMF backup, to preserve user resolution settings
- Detected boot script main menu entries now use the OS release (friendly) name
- Main script is now subject to an OS platform compatibility check
- Main script arguments have been updated
- *snort*

To see individual code changes, visit the project's commits page at <https://github.com/Coopydood/ultimate-macOS-KVM/commits/main>

Remember, commits by Coopydood will always be signed as **4CD28348A3DD016F** or GitHub's public key.
51 changes: 40 additions & 11 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@
import json
import sys
import argparse
import platform

sys.path.insert(0, 'scripts')

parser = argparse.ArgumentParser("setup")
parser.add_argument("-svmc", "--skip-vm-check", dest="svmc", help="Skip the arbitrary VM check",action="store_true")
parser = argparse.ArgumentParser("main")
parser.add_argument("--skip-vm-check", dest="svmc", help="Skip the arbitrary VM check",action="store_true")
parser.add_argument("--skip-os-check", dest="sosc", help="Skip the OS platform check",action="store_true")

args = parser.parse_args()

Expand Down Expand Up @@ -75,27 +77,31 @@ def startup():

if isVM == True:
print(color.YELLOW+" ⚠ Virtual machine detected, functionality may be limited\n"+color.END)
if os.path.exists("blobs/USR_CFG.apb"):
if os.path.exists("blobs/user/USR_CFG.apb"):
tainted = 1
else:
print(" This project can assist you in some often-tedious setup, including\n processes like"+color.BOLD,"checking your GPU, checking your system, downloading macOS,\n "+color.END+"and more. Think of it like your personal KVM swiss army knife.\n")
#print(color.BOLD+"\n"+"Profile:"+color.END,"https://github.com/Coopydood")
#print(color.BOLD+" Repo:"+color.END,"https://github.com/Coopydood/ultimate-macOS-KVM")
print(" Select an option to continue.")
if os.path.exists("./blobs/USR_CFG.apb"):
if os.path.exists("./blobs/user/USR_CFG.apb"):
global apFilePath
apFilePath = open("./blobs/USR_CFG.apb")
apFilePath = open("./blobs/user/USR_CFG.apb")
apFilePath = apFilePath.read()
macOSVer = open("./blobs/USR_TARGET_OS.apb")
macOSVer = macOSVer.read()
if int(macOSVer) >= 999:
macOSVer = str(int(macOSVer) / 100)
if os.path.exists("./blobs/user/USR_TARGET_OS_NAME.apb"):
macOSVer = open("./blobs/user/USR_TARGET_OS_NAME.apb")
macOSVer = macOSVer.read()
else:
macOSVer = open("./blobs/user/USR_TARGET_OS.apb")
macOSVer = macOSVer.read()
if int(macOSVer) >= 999:
macOSVer = str(int(macOSVer) / 100)
if os.path.exists("./"+apFilePath):
apFile = open("./"+apFilePath,"r")

if "APC-RUN" in apFile.read():
print(color.BOLD+"\n B. Boot macOS "+macOSVer+"")
print(color.END+" Start macOS using the detected "+apFilePath+" script.")
print(color.END+" Start macOS using the detected\n "+apFilePath+" script file.")
print(color.END+"\n 1. AutoPilot")

else:
Expand Down Expand Up @@ -164,8 +170,14 @@ def clear(): print("\n" * 150)
if "Bochs" in vmc1 or "Sea BIOS" in vmc1 or "SeaBIOS" in vmc1:
detected = 1

if platform.system() != "Linux":
detected = 2


clear()

#detected = 2 # FORCE DETECTION OF INCOMPATIBLE OS FOR DEBUG

if detected == 1:
if args.svmc == True:
clear()
Expand All @@ -187,6 +199,21 @@ def clear(): print("\n" * 150)
elif stageSelect == "2":
clear()
startup()
elif detected == 2:
if args.sosc == True:
clear()
startup()
else:
print("\n "+color.BOLD+color.RED+"✖ INCOMPATIBLE OPERATING SYSTEM"+color.END)
print(" "+platform.system()+" detected")
print("\n I've determined that you're using "+platform.system()+". \n Put simply, this project won't work on here.\n To save you further disappointment, I'm instead\n throwing you this error.\n\n Sorry :/"+color.END)

print("\n "+color.BOLD+color.RED+"PROBLEM:",color.END+"well... not Linux... ¯\_(ツ)_/¯"+color.END)
print("\n\n\n")
time.sleep(5)
sys.exit


else:
clear()
startup()
Expand Down Expand Up @@ -230,4 +257,6 @@ def clear(): print("\n" * 150)
exit
elif detectChoice == "b" or detectChoice == "B":
clear()
os.system("./"+apFilePath)
os.system("./"+apFilePath)
else:
startup()
Empty file added ovmf/user_store/.store_control
Empty file.
3 changes: 2 additions & 1 deletion resources/.upgrade
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
0.9.1
0.9.2
0.9.3
0.9.4
0.9.4
0.9.5
3 changes: 2 additions & 1 deletion resources/UPGRADEPATH
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
0.9.1
0.9.2
0.9.3
0.9.4
0.9.4
0.9.5
Loading

0 comments on commit d1e04ed

Please sign in to comment.