2
votes

I am developing a cross-platform app in Visual Studio. I need to get the installer as .exe for MS-Windows and also provide an application or installer inside a .dmg file for MacOSX.

I am asked to use Cake-build to create Windows installer & a .dmg. This works fine for generating .exe installers.

When I run the same script for OSX, I am getting .app and .pkg in Mac. But my requirement is to get the installer/and or the app inside a DMG.

Is it possible to create a dmg from cake? Is yes please direct me towards the right path?

1

1 Answers

3
votes

Out of the box Visual Studio, and down stream MSBuild do not offer any packaging mechanism for MacOS. DMG is a file type that is typically a software installer. Cake generally abstracts .NET tools, but can truly be extended to any command line tool. That said, there is no inherent way to do this in Cake today.

There are a few command line tools that I found (have not used) to handle this scenario of taking build output and creating a DMG.

Xamarin Mac DMG is a link I found that outlines the process.

It may be worth creating a Cake.Dmg add-in that does this for us by wrapping the CLI tool for use in the Cake DSL.

That said in the interim, you can use StartProcess in the Cake DSL to pipe out to one of these CLI tools.

NOTE: You are responsible for making sure the CLI tool is in a location Cake can read from before executing your script.