Pergunta

I'd like to have multiple copies of Xamarin Studio running simultaneously. Once one copy is running, double-clicking the Xamarin Studio icon in /Applications or clicking the currently-running Dock icon simply brings the current one to the foreground.

Foi útil?

Solução

Just want a tool?

If you just want to download something that does this for you, there is also the MS Solution Launcher or the older Xamarin Studio Launcher v3. Presumably, it does something similar to the script below but comes in a nice pre-built app with a distinct icon you just copy to your Application folder. As well, it can even be set up as a target for opening .sln files, allowing you to launch a new Xamarin Studio instance when you double-click a solution file.

Do it yourself

Just like described for MonoDevelop, you can force a new instance from the command line. As well, with an AppleScript side-trip described for MonoDevelop, you can get this in the form of an app icon.

The only difference between the MonoDevelop script and the new Xamarin Studio version is the requirement of an additional escape character since the new app has a space in its name.

  1. Open AppleScript Editor and enter the following (note the doubly-escaped space to get the space to the shell unmolested).

    do shell script "open -n /Applications/Xamarin\\ Studio.app/"

  2. Save with a name like "Xamarin Studio Launcher" and make sure to specify Application for the file format.

  3. Drag the icon to your dock.

Each run of this new "app" will launch a new instance of Xamarin Studio.

From there, as described in a comment from the MonoDevelop answer, you can use the Xamarin Studio icon instead of the default applet icon.

  1. Right-click the original Xamarin Studio app and choose "Show Package Contents".

  2. Navigate to /Contents/Resources/ and copy the XamarinStudio.icns file (or monodevelop.icns, for older XS releases).

  3. Right-click the launcher app you created and choose "Show Package Contents".

  4. Navigate to its /Contents/Resources/ and paste a new copy of that icns file.

  5. Delete the original applet.icns icon and rename the new monodevelop.icns to applet.icns to take its place.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top