I did some searching for this but didn’t find anything. What I would like to do is in my PostBuild script on Mac OS X, send a command into VMWare Fusion for something to start. For example, I’d like for the post build script to send the command into the Windows VM to run InnoSetup, change a property (build number) and compile it.
Right now I have to do that manually in Windows. Would love to automate it. Anyone have any ideas?
If I have to build it, I will, but I’m looking for existing solutions, if possible.
Just an idea…
What if you use TCP to communicate.
The Host could send a message to a listener running on the VM side…
You can do everything you want and more with the VMware VIX API. Visit https://www.vmware.com/support/developer/vix-api/ for documentation.
You can also visit http://fwroller.com/vmclipboard/ and use the OS X build of vmCLIpboard to generate the VMware VIX API commands you need to “Start” the Windows VM, “CopyFileFromHostToGuest” and “RunProgramInGuest”. The latter is for launching InnoSetup with the appropriate command line parameters. “RunScriptInGuest” may also be of use depending on how much automation you seek.
vmCLIpboard and vmProcessStrobe were designed primarily for vSphere admins of many VMs but they can also be useful for developers like yourself with just a dozen or so VMs that want to build, deploy, test and monitor their apps in different OS environments. The core functionality is free which will let you build the commands you need, copy them to the clipboard, from which they can be pasted into scripts, and then watch the action in your VMs.
Hopefully that helps. Happy scripting!
Thanks, Fred! Sounds just like what I was looking for. I will check it out soon!
Bob, the poor man’s version of this that I use is:
- set up the VM with a shared folder
- on the mac side, include a build script which makes a windows batch file in the shared folder with all the Innosetup commands.
- during the Xojo build, pause with a message box saying “Ok, now go to Windows and run build.batch. Click OK when the process is done”
- finish up the build process on the mac side.
That said, the VIX API looks like the way to do it and make it fully automated
The vmClipboard was the final piece of the solution!
My build script builds the Mac app, puts necessary files into resources bundle, adds the necessary Framework files, set up Sparkle (if selected) in the Plist file, send it to AppWrapper to get codesigned and then put it into disk image.
On the Windows side (built from the Mac) it creates an Inno Setup script, copies it into a shared directory (with VMWare), then using the VMWare commands, starts the Inno Setup script to codesign and create the installer/uninstaller.
All with one click! Loads better than doing everything manually. It turns a 30 minute process into a 3 minute operation while I go get a drink.