I want to add support for pdf-tools on "My Fav OS". How do I do that?
I’m working on automating
pdf-tools installation as much as possible, in order to improve the installation experience. If you want to add support for a new / currently unsupported Operating System, please modify the
server/autobuild script. Say you want to support a new Operating System called MyFavOS. You need to do the following work:
- Search for the
Figure out where we aresection. Here, add a call to
handle_optionsat the end of the existing call chain. Here we try and pick up the correct Operating System and install the relevant dependencies.
- Add handling for the
myfavos, so that the appropriate function can be called to install pre-requisites.
--osis the argument that we pass to the script from the command-line to indicate which OS we are on.
- Create a
os_myfavosfunction. This function checks if we are running on MyFavOS. If we are running on MyFavOS, it sets up
PACKAGESvariables so that the appropriate package manager can install the dependencies as part of the rest of the
- If you are adding support for your favorite operating system, consider adding automated testing support as well, to help me ensure that
epdfinfocontinues to compile correctly. See for more details.
The idea here is to make the
server/autobuild file the single place from which installation can happen on any Operating System. This makes building
pdf-tools dead simple via the
This seems like a lot of work, but it is not. If you need a reference, search for
os_debian in the
server/autobuild file and see how these are setup and used. The functions are used to install dependencies on Gentoo and Debian respectively, and are simple to copy / change.
When you make your changes, please be sure to testas well as as described in the linked articles.