Closed kc1awv closed 4 years ago
I really don't like the idea of putting mvoice in /usr/local/bin. Besides, creating ~/.mvoice with 'sudo make install' is going to cause some problems. I have pushed up a fix changing the ln to a cp for the .glade file. That should make @g4klx and @nostar happy. Also, there is no consensus for ~/.app-name. Some use that and others use ~/.config/app-name and some use ~/.local as a hidden form of /usr/local.
99% of users won't really care if it installs in ~/bin and ~/etc, and if a user does care, s/he can easily copy Makefile to makefile and then modify two lines in the new makefile. Also the reflector list and database don't need to persist across updates. They regenerate from scratch whenever mvoice starts. The config file is just not that complicated to worry about, especially since most times you don't need to do a 'make uninstall' before a version upgrade.
I'm open to discussion if you think I'm making a bad decision, but for now, I'm closing this PR.
In my fork, the ~/.mvoice folder is created by the mvoice program, not the install process (MainWindow.cpp lines 623-629). That way, if you have multiple users on the machine, they won't share config files - only the binary and the glade file.
I can see arguments for both sides, installing in the user's home folder or installing in /usr/local. By installing to the home folder, in order to run the mvoice program, you either need to modify your $PATH, type the path to the executable, or change directory to where the executable is. Generally speaking, when compiling and installing other programs in Linux, they install themselves to /usr/local - placing the executable in the user's $PATH without needing modification. Then again, least privilege policy does say that putting all the files in the home folder would be safer.
Either way, the idea was to satisfy the requests of a few users, nothing more. This PR can remain closed.
This is a refactor of the install process to make it more *nix-like, placing glade and binary into /usr/local folders, and user config files into ~/.mvoice - reflector list, user config, and qn.db persist through source updates and uninstalls. Config files can be removed by deleting ~/.mvoice
This satisfies requests by @g4klx and @nostar.