Skip to content

[suggestion] You need to segragate read-only vs. writeable directories, and make the installed structure unix-like #107

@yurivict

Description

@yurivict

Currently you install everything under $(PREFIX)/viewtouch/. This isn't how software is installed on unix-like systems. About every package there is installs binaries into $(PREFIX)/bin, data into $(PREFIX)/share/{name}. These two are read-only. The writable data can't go under $(PREFIX), it normally goes either into /var/db/{name}/, or is written into the home directory, or is written into some specifically designated, separate directory.

The above discrepancy is why no linux distros created a package for ViewTouch - it doesn't fit the way how they do things.

Here's what you can do to adjust:

  1. Expose the variable VIEWTOUCH_INSTALL_PATH as a cmake option, have "/usr/viewtouch" as a default. Install all read-only files under it, with data going into ${VIEWTOUCH_INSTALL_PATH}/share/ViewTouch, and executables - into ${VIEWTOUCH_INSTALL_PATH}/bin,
  2. Expose the variable VIEWTOUCH_DB_PATH for writable files. Keep the default of "/usr/viewtouch/dat", but this would allow people to set it to "/var/db/ViewTouch", for example.
  3. It writes into bin/.vtpos_command, this also should go under the writeable directory VIEWTOUCH_DB_PATH, etc.
  4. Ideally, you could also have a variable USE_HOME_DIR_FOR_DB, in which case it would just write the DB into a home directory.

If you make alterations that I am suggesting in the above instructions, it would be possible to install it into a single directory, like before, and in a way how unix-like systems install software.

I've ported ViewTouch, but encountered these discrepancies that prevent me from creating a port at this point.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions