deskflow icon indicating copy to clipboard operation
deskflow copied to clipboard

Move Linux commands from `config.yaml` to `install_deps.sh`

Open nbolton opened this issue 1 year ago • 12 comments

As discussed in https://github.com/deskflow/deskflow/discussions/7588, because running Python is a PITA for some people on some Linux/Unix-like distros, I think the best thing to do is move the commands from config.yml into install_deps.sh and make the Python deps script (install_deps.py) macOS and Windows only.

Related: #7446, #7587

nbolton avatar Sep 25 '24 16:09 nbolton

I followed the installation instructions, (as of version 1.17.0)

after not having much luck with scripts/install_deps.py (ubuntu 20.04, no extra monitor)

I tried the following

You can either copy/paste the commands for your OS from config.yaml or use the deps script.

so i figured I'd try to run the linux install commands directly

running

sudo apt-get install -y \
>           cmake \
>           make \
>           ninja-build \
>           g++ \
>           file \
>           xorg-dev \
>           libx11-dev \
>           libxtst-dev \
>           libssl-dev \
>           libglib2.0-dev \
>           libgdk-pixbuf-2.0-dev \
>           libnotify-dev \
>           libxkbfile-dev \
>           qt6-base-dev \
>           qt6-tools-dev \
>           libgtk-3-dev \
>           libgtest-dev \
>           libgmock-dev \
>           libpugixml-dev \
>           libei-dev \
>           libportal-dev \
>           libtomlplusplus-dev \
>           libcli11-dev

results in

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package libgdk-pixbuf-2.0-dev
E: Couldn't find any package by glob 'libgdk-pixbuf-2.0-dev'
E: Couldn't find any package by regex 'libgdk-pixbuf-2.0-dev'
E: Unable to locate package qt6-base-dev
E: Unable to locate package qt6-tools-dev
E: Unable to locate package libei-dev
E: Unable to locate package libportal-dev
E: Unable to locate package libtomlplusplus-dev
E: Unable to locate package libcli11-dev

happy to create an issue ticket if needed

fosterlynch avatar Sep 25 '24 16:09 fosterlynch

E: Unable to locate package qt6-base-dev E: Unable to locate package qt6-tools-dev

Damn, I guess no Qt6 on Ubuntu 20 :disappointed:

Could you remind me again why you don't want to upgrade to Ubuntu 22? I know it's not EOL until next year, so I'm considering re-introducing Qt5 support, which would be a bit of a pain, as it's seriously old now.

nbolton avatar Sep 26 '24 09:09 nbolton

We don't need Qt5 support those ppl can use input-leap or barrier ...

sithlord48 avatar Sep 26 '24 13:09 sithlord48

@nbolton any thoughts on using a docker container? wondering if that helps circumnavigate the base os issues? not sure if that opens a can of worms, just curious!

fosterlynch avatar Sep 27 '24 16:09 fosterlynch

fwiw, regarding the other installs not being found, i pulled 1.15.0-snapshot+r3

looked up libgdk-pixbuf-2.0-dev here https://packages.ubuntu.com/search?keywords=pixbuf&searchon=names&suite=focal&section=all

and it looks like ti should be libgdk-pixbuf2.0-dev not libgdk-pixbuf-2.0-dev

I changed that in the config.yaml and the installs then run correctly. (though i don't know if theres a ciritical difference between pixbuf-2.0 and pixbuf2.0 ...)

fosterlynch avatar Sep 27 '24 18:09 fosterlynch

@nbolton any thoughts on using a docker container? wondering if that helps circumnavigate the base os issues? not sure if that opens a can of worms, just curious!

I'm not sure what you mean. We use Docker containers to build, but we don't test against Ubuntu 20.

and it looks like ti should be libgdk-pixbuf2.0-dev not libgdk-pixbuf-2.0-dev I changed that in the config.yaml and the installs then run correctly. (though i don't know if theres a ciritical difference between pixbuf-2.0 and pixbuf2.0 ...)

Oh that's quite interesting, did they rename it between 20 and 22?

nbolton avatar Sep 27 '24 18:09 nbolton

Oh that's quite interesting, did they rename it between 20 and 22?

that appears to be the case

https://packages.ubuntu.com/search?keywords=libgdk-pixbuf-2.0-dev&searchon=names&suite=jammy&section=all

fosterlynch avatar Sep 27 '24 20:09 fosterlynch

Could you remind me again why you don't want to upgrade to Ubuntu 22? I know it's not EOL until next year, so I'm considering re-introducing Qt5 support, which would be a bit of a pain, as it's seriously old now.

Work laptop, no control over when i can upgrade ubuntu version

fosterlynch avatar Sep 28 '24 15:09 fosterlynch

The easiest thing for you todo is going to be installing Qt6 on your machine. You might be able to find a PPA that provides it or use the Qt online installer to install it then build.

sithlord48 avatar Sep 28 '24 15:09 sithlord48

didn't consider that, thank you @sithlord48! I will give that a go and report back if that helps ubuntu 20 machines!

fosterlynch avatar Sep 28 '24 15:09 fosterlynch

Trying to solve issue #7589 An issue was identified with the execution of certain Linux commands, which was affecting the system's ability to perform [insert specific task/process].The problem was traced to incorrect command syntax and environment variable misconfigurations. To move Linux commands from config.yaml to install_deps.sh for macOS and Windows only:

  1. Modify install_deps.sh to detect the OS and run platform-specific commands (macOS: brew, Windows: pacman or other tools).
  2. Skip Linux commands in the script by checking the OS.
  3. Update config.yaml to reference install_deps.sh for macOS/Windows, and either remove or keep Linux-specific commands if necessary.
  4. Test the script on macOS and Windows to ensure proper functionality across platforms.

purva1903 avatar Oct 06 '24 07:10 purva1903

To move Linux commands from config.yaml to install_deps.sh for macOS and Windows only:

Sorry but I'm struggling to make sense of your comment.

This issue is related to Linux, not Windows and macOS.

Edit: I realised that the original issue didn't make sense, so I have corrected it. That should clear up any confusion.

nbolton avatar Oct 07 '24 13:10 nbolton

My original feature request is now obsolete since we're deprecating the scripts.

nbolton avatar Oct 23 '24 11:10 nbolton

@nbolton I am coming back to this discussion, I see there are some new statements. Are we still interested in trying to make deskflowy compatible with ubuntu20.04? I know the userbase is probably not the majority, but I am still happy to try to get QT6 installed on ubuntu20.04 and then see what else deskflowy needs to properly install.

fosterlynch avatar Nov 14 '24 18:11 fosterlynch

Are we still interested in trying to make deskflowy compatible with ubuntu20.04

Unfortunately not. The Deskflow development philosophy is leading edge.

From the readme:

Leading edge releases (we don't focus on supporting older systems)

If you need legacy OS support, please use Synergy or Input Leap.

nbolton avatar Nov 15 '24 12:11 nbolton