DEV Community

Discussion on: Flutter for Desktop

Collapse
 
erebos-manannan profile image
Erebos Manannán

I'm sorry but this post is really poorly written. It's making a lot of weird assumptions and not explaining a lot of things in not enough detail. Add to that you've got some really weird ideas here.

Clone the repo into folder like /etc/bin for linux, or C:\Program Files\ for windows.

You should never install anything to /etc/bin, that's not a standard location, you should definitely not check out any Git repos to c:\Program Files. If you're checking out Git repos try $HOME/src or C:\Source or %USERPROFILE%\Documents\source or whatever else but do not use system folders for things they are not intended for.

Then you jump into this:

Rerun the Microsoft visual studio Build tools. Select modify option.
Then select the following components.

Rerun what? You've not explained anything about how to install it the first time. I know how to install it, you might know how to install it, many people reading this have no clue what you're talking about.

degit google/flutter-desktop-embedding desktop_app

Suddenly assuming people have installed I guess the degit NPM package globally?

It's great that you try to write guides for cool things like Flutter, but please, try and double check what you write is actually generic and explained.

Collapse
 
droidmakk profile image
Afroze Kabeer Khan. M

Thanks for pointing this out. There will be a re-edited version of this.

But since this is a binary file I think it's better to keep it in Program files folder.

Collapse
 
erebos-manannan profile image
Erebos Manannán

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.