Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Xamarin Platform v5.0.1 (build 3) #5099

Closed
wants to merge 2 commits into from
Closed

Add Xamarin Platform v5.0.1 (build 3) #5099

wants to merge 2 commits into from

Conversation

martinbjeldbak
Copy link
Contributor

Xamarin's new app installer to install version 5 (and above) of Xamarin Studio with Xamarin iOS,
Xamarin Android, and Xamarin Mac. This is meant as a replacement for the current Xamarin casks: xamarin-android, xamarin-ios, and xamarin-studio, locked at version 4.

I need help with the uninstall logic. I need to remove folders /Applications/Xamarin Studio.app and ~/Library/Developer/Xamarin. It's currently giving an error upon running brew cask uninstall xamarin-platform

Xamarin's new app installer to install Xamarin Studio with Xamarin iOS,
XamarinAndroid, and Xamarin Mac.
@nanoxd
Copy link
Contributor

nanoxd commented Jun 27, 2014

Based on the url, this should follow a version 'latest' scheme. Please modify the cask to use:

  version 'latest'
  sha256 :no_check

There are scripts and documentation geared for that. Have you read through them yet?

@martinbjeldbak
Copy link
Contributor Author

Done... is adding a new commit okay? I have read through all of it, missed the version stuff, though! The commented out lines are based upon what I read in the documentation. But I get the following error every time I attempt to uninstall it with the uninstall lines uncommented: Unexpected method ' ' called on XamarinPlatform.

@nanoxd
Copy link
Contributor

nanoxd commented Jun 27, 2014

We usually ask for a cask commit to be in a single commit. I just noticed though that there is no install stanza. Is an app linked in this case?

@martinbjeldbak
Copy link
Contributor Author

Okay. I'll try to figure out how to squash the two commits. But the folders that need to be removed upon uninstalling are still there. So right now, running brew cask uninstall xamarin-platform does absolutely nothing.

Yeah, the Install_Xamarin script is run inside the Install Xamarin.app folder, which runs a guided installer, much like a `.pkg' installer.

@nanoxd
Copy link
Contributor

nanoxd commented Jun 27, 2014

Here is a good article on squashing your commits

@nanoxd
Copy link
Contributor

nanoxd commented Jun 27, 2014

@Fapper trying it on my own machine caused a GUI to pop up to continue the installation. Traditionally, we don't accept installers of this king, @caskroom/maintainers, should we allow this in?

Also, it can't be called directly via install '*.app/Contents/MacOS/Install_Xamarin failing with this error
1 tmux users nano developer code nanofiles tmux 2014-06-27 08-59-11 2014-06-27 08-59-15

@martinbjeldbak
Copy link
Contributor Author

Interesting... I stole most of the code from the mactex cask, as it has the exact same install procedure. And I'm not calling it with the install stanza, because Install_Xamarin is a binary file.

@nanoxd
Copy link
Contributor

nanoxd commented Jun 27, 2014

@Fapper I know, I experimented with getting it to work directly via install instead of after_install

MacTex also installs via a .pkg file that requires a password but no GUI interaction to continue the installation.

@vitorgalvao
Copy link
Member

The issue you’re experiencing with uninstalling is known, and should be fixed in the future. It occurs when a cask has an uninstall stanza, but not an install one. The (intentionally) undocumented fix is to add a caskroom_only true stanza.

If it’s calling a GUI, then no, we shouldn’t (last paragraph). At least not until (if) we change that policy, though. The after_install block should then be removed. Calling it via install or any other way isn’t the issue.

The cask is also missing a caveats informing that java is a requirement.

On a final note, how will this interact with XamarinStudio? It seems like it’s installing an app of the same name. Is that not a problem (i.e., a user of this would only ever be interested in installing one or the other; or does it take care of the conflict itself; or some other option)?

@martinbjeldbak
Copy link
Contributor Author

@nanoxd I think install only works with .pkgs, as far as I can see in the documentation. I might be wrong, though!

@vitorgalvao Gotcha, will add those workarounds for now. The policy of no GUI installers definitely makes sense, but I spent some time trying other solutions... it seems as if Xamarin really don't want you to just exclusively install Xamarin Studio, forcing all users to use this installer if they want to use Xamarin Studio.

You're right about fact that the application names would be exatly the same. Hadn't thought of that. I'm not sure how to tackle this situation. Should I inject some ruby code that runs brew cask list and checks to see if any of the other Xamarin casks are installed?

@vitorgalvao
Copy link
Member

Forgot to mention that in these cases, you should use manual_installer to warn the user of what app they need to manually call to install the cask (example).

Setting up such a conditional strikes me as something that could easily break, even by changing something about homebrew-cask’s internals — it shouldn’t be too dependent on that. It seems like what XamarinPlatform does is simply facilitate the install of some SDKs, while installing XamarinStudio (the same from the other cask) at the same time. Can you confirm that to be the case? If it is, we could possibly not have to worry much about that.

@martinbjeldbak
Copy link
Contributor Author

Looking at and playing with manual_installer now.

I originally created the XamarinPlatform cask because XamarinStudio is stuck at version 4.2.4, and seemingly will never be able to be updated past that because Xamarin have started to use this new installer that my cask uses, installing Xamarin Studio version 5 and above (I assume).

@vitorgalvao
Copy link
Member

That seems to be the case. Going to the website, they say “Xamarin Studio comes with Xamarin”, and if you try to download it, you’ll get this same download. This means we can scrape the XamarinStudio cask from this repo, and move it to caskroom versions.

This cask you’re submitting should also be renamed to xamarin.rb with class Xamarin, it seems to me.

@martinbjeldbak
Copy link
Contributor Author

I believe the Casks xamarin-android, xamarin-ios, and xamarin-studio should all be scraped, since they are now bundled into this new installer.

Sounds good. Would it be easiest if I submitted a new pull request with the xamarin cask as you propose, updated with manual_installer and working uninstall?

I can also look into adding these three to caskroom-versions.

@vitorgalvao
Copy link
Member

I believe the Casks xamarin-android, xamarin-ios, and xamarin-studio should all be scraped, since they are now bundled into this new installer.

Agreed.

Would it be easiest if I submitted a new pull request with the xamarin cask as you propose, updated with manual_installer and working uninstall?

Whatever works best for you. I’ll leave that to what you find easier/faster for you.

I can also look into adding these three to caskroom-versions.

That would be appreciated. You can do it all in a single pull request.

Let me know if you have any trouble with any of the steps. And thank you for the contribution, and working so fast with us on it.

@martinbjeldbak
Copy link
Contributor Author

Will attempt to do it all in one pull request in a little bit. Still very new to contributing to GitHub repos, so we'll see how it goes. 😄

Thanks a ton for your help, too!

@rolandwalker
Copy link
Contributor

@Fapper thanks for bringing the knowledge on Xamarin. @vitorgalvao is right, you need to add

  caskroom_only true

to convince uninstall to fire. But that hack will be addressed soon via #4865.

@martinbjeldbak martinbjeldbak deleted the xamarin-platform branch July 2, 2014 21:41
@Homebrew Homebrew locked and limited conversation to collaborators May 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants