Skip to content

Adding a new emulated machine

Jesús A. Álvarez edited this page Mar 26, 2021 · 3 revisions

To add a new variant, follow these easy steps:

Duplicate target

screenshot

Duplicate one of the framework targets and rename it.

Rename duplicated scheme

screenshot

Rename the duplicated scheme that is created automatically.

Duplicate source folder

screenshot

In Finder, duplicate the source folder, and also rename it.

Add to project

screenshot

Add it to the Xcode project as a group under Mini vMac/Emulator Bundles. Unmark Copy items if needed and all targets.

Make new target use its own resources

screenshot

In the Copy Bundle Resources phase of the new target, remove the resources (only icon PNGs for now) from the old target, and add the new ones.

Fix Info.plist path

screenshot

When duplicating the target, Xcode will create a new Info.plist for it, but we want to use the shared one and run it through the preprocessor:

  • Delete the duplicate Info.plist (something copy-Info.plist) file from the project.
  • In build settings, change the Info.plist file setting to $(SRCROOT)/Mini vMac/PlugIn-Info.plist.

Add to app

screenshot

In the Mini vMac target's Build Phases, add the new framework to the Embed Frameworks phase

Customise

Now you can change the CNFUDALL.h, CNFUDOSG.h and CNFUDPIC.h for the new bundle, and choose the files from mnvm_core it should compile. The files generated by the Mini vMac build system are helpful for figuring this out.

To change the text shown in the Settings list of machines, edit the MNVMBundleDisplayName and MNVMBundleGetInfoString macros in CNFUDALL.h, they will be inserted into the Info.plist by the preprocessor, so they shouldn't have quotes around them, or they will show up with quotes in the UI. You can also change the Icon.