loading...

Discussion on: Flutter for Desktop

Collapse
lietux profile image
Janne "Lietu" Enberg

c:\Program files is where installers should put applications in. If there was a Flutter installer and it set up the thing, it would be appropriate for it to go under C:\Program files. You should definitely not check out Git repositories there randomly.

The common practice is to add the bin folder to your PATH when it's necessary. It's not all that much work.

One good option on Windows is to set up e.g. c:\tools and put your tools under that, downloading a release for that there would end up with e.g. C:\tools\flutter\bin to add to your path. Another option is to use %USERPROFILE% or %APPDATA%, so you end up with %USERPROFILE%\flutter\bin or %APPDATA%\flutter\bin in your path.

I've been working on the concept of a "standard development environment" incl. this kind of paths recently and should probably add something about this there 🤔

On Linux it's pretty common to use $HOME for all user owned things, if you want to make it globally available for the machine and owned by root, then e.g. /opt/flutter would be appropriate. I believe a lot of things like Android SDK get installed under /opt.

One of the important things to keep in mind with these paths is that it's actually important where your files go for the security model of the OS.

C:\Program files is supposed to not be editable with the user permissions, and require Administrator access instead just as /opt, /etc, etc. are supposed to require root access. You're not running everything as root in Linux, you shouldn't be running without UAC or everything as Administrator on Windows.