racket / drracket

DrRacket, IDE for Racket
http://www.racket-lang.org/
Other
445 stars 93 forks source link

[Question] On MacOS raco installs DrRacket in ~/Library how do you install into /Applications when you have installed Racket from minium source ? #565

Closed andrewcrook closed 2 years ago

andrewcrook commented 2 years ago

Installing DrRacket via raco it places DrRacket.app in the folder ~/Library/Racket/8.5/

Note: I am not sure if this matters but I install racket via racket-minimal-8.5-src-builtpkgs.tgz then install packages via raco as and when needed.

sorawee commented 2 years ago

Are there any other applications that modify /Applications after the initial installation? My understanding is that it's a convention that /Applications should not be touched again after the installation. So I think Racket does the right thing already.

andrewcrook commented 2 years ago

@sorawee Thanks for getting back to me

convention

But its not a convention to install a MacOS app into ~/Library as you say it should be in /Applications

The precompiled version of racket the I have alway dragged the Racket XXX folder into /Applications and it worked.

When using racket-minimal-8.5-src-builtpkgs.tgz and then raco, whether the ~/Library/Racket/8.5/DrRacket.app can be just moved into /Applications or whether it needs to be built differently I don't know. I just know it is not in right location at the moment.

sorawee commented 2 years ago

The main application should be installed to /Applications. Any other "extensions" should go somewhere else. In Minimal Racket, you essentially install DrRacket as an extension.

Take a look at Visual Studio Code as an example. The main program is installed at /Applications/Visual Studio Code.app, then it's never modified again. Any other extensions would then be installed to ~/.vscode/extensions.

sorawee commented 2 years ago

Actually scratch that. Perhaps raco pkg install -i drracket work for your case?

-i will modify the /Applications directory, if I understand correctly (I keep forgetting that this option exists).

I personally don't like this, but perhaps it's what you want.

mflatt commented 2 years ago

To elaborate on what @sorawee says (because I was already typing it):

If you install packages with just raco pkg or with raco pkg -u, then applications will go to a user-specific dierctory,. Use raco pkg -i to install into the Racket installation (instead of a user specific place), and then applications will be part of that installation.

So, if your Rackt installation is in /Applications, then raco pkg -i will put things like DrRacket.app there. But if your installation is in something like /usr/local/racket, then DrRacket.app will go there, instead.

You can change where installation applications are written by modifying racket/etc/config.rktd. Specifically, set gui-bin-dir as described at https://docs.racket-lang.org/raco/config-file.html to control where an application like DrRacket.app will go.

andrewcrook commented 2 years ago

@sorawee and @mflatt Thank you both for your help.

In order to make it work I had to define gui-bin-dir in racket/etc/config.rktd and use the-i argument with raco

I have renamed issue for future searches if anyone else has same issue.