dvershinin / green-recorder

A simple screen recorder for Linux desktop. Supports Wayland & Xorg
GNU General Public License v3.0
57 stars 3 forks source link

Install issue #8

Closed lfom closed 3 years ago

lfom commented 3 years ago

Hello, again!

Thanks for the update that enables MP4, it seems to work fine here. But the installation issue still persists on my side.

When I try to install following the instruction in README:

python setup.py install

the problem is that all the files go inside the egg folder, so no icon in the launcher: the .desktop and icon files are not copied to the appropriate locations. Also, launching the app only works from the cloned repo because it is the only way it can find ui.glade.

By the other hand, using

pip install .

everything goes to the right place. But I would suggest that you replace the line you have added in commit 3f02ab65e2c09893b1ef8d0b7d5eb430e42c0e65 and use this instead, so the all will also look for the ui file inside ~/.local:

os.path.join(os.path.expanduser("~"), ".local", "share", "green-recorder", "ui.glade")

From what I have seen, it should work with any Python version. Another benefit is that it can be easily uninstalled with pip uninstall green-recorder.

dvershinin commented 3 years ago

The best is just to remove that many "tries" to locate ui.glade. The unnecessary complexity is with data_files which are handled not well, and this is one of the many reasons packages are preferred, and they will be surely done when I have time for Debian-related things.

Updated README.md to indicate a preference to run pip3 install --user . as a regular user. This will work fine where packages aren't available and is far safer than running pip as root.

The install prefix will be detected at run-time, and so the only possible location for ui.glade is _installprefix/share/green-recorder/ui.glade. Except for when it's installed in a virtualenv, in which case only we will try "./ui/ui.glade" as well.

lfom commented 3 years ago

"pip[3] install" already installs the package to ~/.local so "--user" is not needed, and pip defaults to pip3 as long as Python3 is installed as far as I know. The problem is that the current code does not look for ui.glade in the ~/.local/share.

dvershinin commented 3 years ago

The problem is that the current code does not look for ui.glade in the ~/.local/share.

Please check with the latest commit. It should.

lfom commented 3 years ago

3f02ab65e2c09893b1ef8d0b7d5eb430e42c0e65 didn't fix the problem, I do not see any commit after that that is related.

dvershinin commented 3 years ago

You are mentioning things from yesterday. I am referring to changes from today: https://github.com/dvershinin/green-recorder/commit/307b61e1d77b80a56f2a65511c414d3e37768b32#diff-5f386b0007fc0f2884c4ff65eb98097e8a9ef601fd942f5372a5e2cd8b6ddc2eR424-R429

lfom commented 3 years ago

My bad, I did not see the changes to the source code, I thought they were just tests. I did a pull and it seems to be working now. Thanks.