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

Apps that need to be in /Applications to work #12858

Open
vitorgalvao opened this issue Jul 26, 2015 · 18 comments
Open

Apps that need to be in /Applications to work #12858

vitorgalvao opened this issue Jul 26, 2015 · 18 comments
Labels
good first issue Issue which is easy to tackle for first-time contributors. help wanted

Comments

@vitorgalvao
Copy link
Member

vitorgalvao commented Jul 26, 2015

Not apps that ask to be moved, but the ones that are broken if not there (even if a symlink works, it should still be included). Maintainers should feel free to edit and add to the list.

@tsparber
Copy link
Contributor

Removed caveats from casks in this list (when there was one). So I think this issue can also be closed 🎉

@vitorgalvao
Copy link
Member Author

This can’t be closed, as users can still pick a custom directory for installing. In #13201, these are the cases that will need a :required_location (see the New stanzas/keys/flags to enhance these changes section).
image

@tsparber
Copy link
Contributor

Sorry, forgot about that. 😐
gnubg can be added to the list.

@vitorgalvao
Copy link
Member Author

Not to worry. Added gnubg to the list, thank you.

@allanchau
Copy link

Hi, while google-chrome itself works, some extensions such as 1Password break when chrome is not in the Applications folder.

@vitorgalvao
Copy link
Member Author

@allanchau That’s a good point, but the list is focused on the application itself breaking.

@stale stale bot added the stale Issue which has not received any feedback for some time. label Feb 7, 2019
@vitorgalvao vitorgalvao removed the stale Issue which has not received any feedback for some time. label Feb 8, 2019
@stale stale bot added the stale Issue which has not received any feedback for some time. label Mar 1, 2019
@vitorgalvao vitorgalvao removed the stale Issue which has not received any feedback for some time. label Mar 1, 2019
@Homebrew Homebrew deleted a comment from stale bot Mar 1, 2019
@Homebrew Homebrew deleted a comment from stale bot Mar 1, 2019
@stale stale bot added the stale Issue which has not received any feedback for some time. label Mar 22, 2019
@Homebrew Homebrew deleted a comment from stale bot Mar 22, 2019
@stale stale bot removed the stale Issue which has not received any feedback for some time. label Mar 22, 2019
@reitermarkus reitermarkus added good first issue Issue which is easy to tackle for first-time contributors. and removed future labels Aug 13, 2019
@vitorgalvao
Copy link
Member Author

Edited the list to remove casks we no longer have.

@AnansiOmega
Copy link

Hi, is this an issue I can work on? I'm very new to open source contribution, but I would love to help.

@vitorgalvao
Copy link
Member Author

Hi, is this an issue I can work on?

Hi! Sure! No one’s working on it and it’s low priority, so please go ahead. Though looking at it now, it might benefit from a simpler approach:

Add :required_location. Example: app 'FontForge.app', required_location: '/Applications'. It means the artifact needs to be in a certain location to function correctly and as such the installation will fail if the target directory is a different location.

Pseudo-code for :required_location, considering an app:

if (cask has :required_location) and (REQUIRED_LOCATION != APPDIR_DESTINATION) and (not using --force)
    print_warning "This app needs to be in REQUIRED_LOCATION to work properly. Use `--force` to install to APPDIR_DESTINATION or `--appdir APPDIR_DESTINATION` to install to the proper location."
end

That’s way simpler and doesn’t surprise the user by installing somewhere unexpected by default. Note that APPDIR_DESTINATION is either the default when it’s unset (/Applications) or whatever the user decided with --appdir. Realistically, I don’t think :required_destination will ever be anything other than /Applications, but it doesn’t hurt to have the flexibility.

Bonus points if the feature is versatile enough to be repurposed to binary at a later time if needed (though don’t worry about it yet if you don’t want to or it makes it too complex).

Thank you for offering!

@AnansiOmega
Copy link

Hey @vitorgalvao is there any way to run tests on where the application downloads? I've been trying to get a lay of the land. I noticed some documentation that recommends:

$ brew /Users/anansi/Development/code/openSource/homebrew-cask/Casks/fontforge.rb google-chrome

but that gives me an error: " undefined method `cask' for main:Object " ( also, I've run brew upgrade and brew update to see if that would fix it, but to no avail )

Also, for clarity. All of the items listed on the original post are the ones that need the change? ( asking because I can't find, cdock, cmpl, and gnubg. I assume they no longer exist, because this post is incredibly old. )

@vitorgalvao
Copy link
Member Author

is there any way to run tests on where the application downloads?

I don’t understand the question. Are you looking for brew fetch?

I noticed some documentation that recommends

That command doesn’t make sense, because after brew there should always be a verb, not a cask name or path. If you found that in official documentation, please let me know where so I can fix it.

All of the items listed on the original post are the ones that need the change?

The ones we know about, yes.

asking because I can't find, cdock, cmpl, and gnubg. I assume they no longer exist, because this post is incredibly old.

You are correct. That’s also why I said this is low priority. But it should also be simple enough to get a feel for the codebase if you plan on contributing larger changes later on. If you’d prefer something more challenging or that would make a larger impact, I can point you to something as well!

@AnansiOmega
Copy link

I don’t understand the question. Are you looking for brew fetch?

I think so, I'll play around with it more. ( I'm still incredibly lost on how everything works, but I'll figure it out. )

That command doesn’t make sense, because after brew there should always be a verb, not a cask name or path. If you found that in official documentation, please let me know where so I can fix it.

I might be in the wrong here, but the link is: https://github.com/Homebrew/homebrew-cask/blob/master/doc/development/hacking.md

If you’d prefer something more challenging or that would make a larger impact, I can point you to something as well!

I'd love to, but I'd like to get a handle of working within homebrew first, and being able to tackle problems without having anyone hold my hand throughout the process.

@AnansiOmega
Copy link

@vitorgalvao Hey, I can't figure out how to create a new stanza.

@vitorgalvao
Copy link
Member Author

I might be in the wrong here, but the link is: https://github.com/Homebrew/homebrew-cask/blob/master/doc/development/hacking.md

Thank you. Notice that in that case it’s calling a subcommand through its path, and you were invoking a cask. Different thing. But ignore that file because it’s outdated. Any documentation you look at for changing the core should be in https://github.com/Homebrew/brew.

I can't figure out how to create a new stanza.

You don’t want to create a new stanza, but rather a new parameter of an existing stanza. You want required_location to be added to the app stanza, which already supports the target parameter, so that might help.

@AnansiOmega
Copy link

I apologize for asking so many questions, but I have more. If there's any resource I can go to ask simple questions like these please let me know so that I don't take up all of your time.

When it comes to adding required_location as a parameter to a stanza I think I found the file where the changes would need to be made, but I'd like to be certain. In Homebrew the path to the file is Library/Homebrew/cask/artifact/relocated.rb ? In other words the file that I need to add in the method of required_location should be in the relocated.rb ?

If that's the case, I have a follow up question because I know this will be a problem I'll stumble upon. How would I be able to invoke the method of 'required_location' to make sure that it's doing the right thing. I'm accustomed to using byebug, and then invoking the file. Thank you.

@AnansiOmega
Copy link

I apologize for asking so many questions, but I have more. If there's any resource I can go to ask simple questions like these please let me know so that I don't take up all of your time.

When it comes to adding required_location as a parameter to a stanza I think I found the file where the changes would need to be made, but I'd like to be certain. In Homebrew the path to the file is Library/Homebrew/cask/artifact/relocated.rb ? In other words the file that I need to add in the method of required_location should be in the relocated.rb ?

If that's the case, I have a follow up question because I know this will be a problem I'll stumble upon. How would I be able to invoke the method of 'required_location' to make sure that it's doing the right thing. I'm accustomed to using byebug, and then invoking the file. Thank you.

@vitorgalvao If you have a chance.

@vitorgalvao
Copy link
Member Author

If there's any resource I can go to ask simple questions like these

https://github.com/Homebrew/discussions might work.

@thoran
Copy link

thoran commented Feb 6, 2023

I just opened this which is similar: Homebrew/brew#14517.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Issue which is easy to tackle for first-time contributors. help wanted
Projects
None yet
Development

No branches or pull requests

7 participants
@thoran @reitermarkus @tsparber @vitorgalvao @allanchau @AnansiOmega and others