Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. Getting/Installing ``dds``
  2. ##########################
  3. ``dds`` ships as a single statically linked executable. It does not have any
  4. installer or distribution package.
  5. Downloading
  6. ***********
  7. Downloads are available on `the main dds website <https://dds.pizza/downloads>`_
  8. as well as
  9. `the GitHub Releases page <https://github.com/vector-of-bool/dds/releases>`_. Select the executable appropriate for your platform.
  10. Alternatively, the appropriate executable can be downloaded directly from the
  11. command-line with an easy-to-remember URL. Using ``curl``:
  12. .. code-block:: sh
  13. # For Linux, writes a file in the working directory called "dds"
  14. curl dds.pizza/get/linux -Lo dds
  15. # For macOS, writes a file in the working directory called "dds"
  16. curl dds.pizza/get/macos -Lo dds
  17. Or using PowerShell on Windows:
  18. .. code-block:: powershell
  19. # Writes a file in the working directory called "dds.exe"
  20. Invoke-WebRequest dds.pizza/get/windows -OutFile dds.exe
  21. **On Linux, macOS, or other Unix-like system**, you will need to mark the
  22. downloaded file as executable:
  23. .. code-block:: sh
  24. # Add the executable bit to the file mode for the file named "dds"
  25. chmod +x dds
  26. Installing
  27. **********
  28. Note that it is not necessary to "install" ``dds`` before it can be used.
  29. ``dds`` is a single standalone executable that can be executed in whatever
  30. directory it is placed. If you are running a CI process and need ``dds``, it is
  31. viable to simply download the executable and place it in your source tree and
  32. execute it from that directory.
  33. **However:** If you want to be able to execute ``dds`` with an unqualified
  34. command name from any shell interpreter, you will need to place ``dds`` on a
  35. directory on your shell's ``PATH`` environment variable.
  36. Easy Mode: ``install-yourself``
  37. ===============================
  38. ``dds`` includes a subcommand "``install-yourself``" that will move its own
  39. executable to a predetermined directory and ensure that it exists on your
  40. ``PATH`` environment variable. It is simple enough to run the command::
  41. $ ./dds install-yourself
  42. This will copy the executable ``./dds`` into a user-local directory designated
  43. for containing user-local executable binaries. On Unix-like systems, this is
  44. ``~/.local/bin``, and on Windows this is ``%LocalAppData%/bin``. ``dds`` will
  45. also ensure that the destination directory is available on the ``PATH``
  46. environment variable for your user profile.
  47. .. note::
  48. If ``dds`` reports that is has modified your PATH, you will need to restart
  49. your command line and any other applications that wish to see ``dds`` on your
  50. ``PATH``.
  51. Manually: On Unix-like Systems
  52. ==============================
  53. For an **unprivileged, user-specific installation (preferred)**, we recommend
  54. placing ``dds`` in ``~/.local/bin`` (Where ``~`` represents the ``$HOME``
  55. directory of the current user).
  56. Although not officially standardized,
  57. `the XDG Base Directory specification <https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html>`_
  58. recommends several related directories to live within ``~/.local`` (and ``dds``
  59. itself follows those recommendations for the most part).
  60. `The systemd file heirarchy <https://www.freedesktop.org/software/systemd/man/file-hierarchy.html>`_
  61. also recommends placing user-local binaries in ``~/.local/bin``, and several
  62. Linux distribution's shell packages add ``~/.local/bin`` to the startup
  63. ``$PATH``.
  64. Placing a file in ``~/.local/bin`` requires no privileges beyond what the
  65. current user can execute, and gives a good isolation to other users on the
  66. system. Other tools (e.g. ``pip``) will also use ``~/.local/bin`` for the
  67. installation of user-local scripts and commands.
  68. .. note::
  69. On some shells, ``~/.local/bin`` is not an entry on ``$PATH`` by default.
  70. Check if your shell's default ``$PATH`` environment variable contains
  71. ``.local/bin``. If it does not, refer to your shell's documentation on how to
  72. add this directory to the startup ``$PATH``.
  73. For a **system-wide installation**, place the downloaded ``dds`` executable
  74. within the ``/usr/local/bin/`` directory. This will be a directory on the
  75. ``PATH`` for any Unix-like system.
  76. .. note::
  77. **DO NOT** place ``dds`` in ``/usr/bin`` or ``/bin``: These are reserved for
  78. your system's package management utilities.
  79. Manually: On Windows
  80. ====================
  81. Unlike Unix-like systems, Windows does not have a directory designated for
  82. user-installed binaries that lives on the ``PATH``. If you have a directory that
  83. you use for custom binaries, simply place ``dds.exe`` in that directory.
  84. If you are unfamiliar with placing binaries and modifying your ``PATH``, read
  85. on:
  86. For an **unprivileged, user-specific installation**, ``dds`` should be placed in
  87. a user-local directory, and that directory should be added to the user ``PATH``.
  88. To emulate what ``dds install-yourself`` does, follow the following steps:
  89. #. Create a directory ``%LocalAppData%\bin\`` if it does not exist.
  90. For ``cmd.exe``
  91. .. code-block:: batch
  92. md %LocalAppData%\bin
  93. Or for PowerShell:
  94. .. code-block:: powershell
  95. md $env:LocalAppData\bin
  96. #. Copy ``dds.exe`` into the ``%LocalAppData%\bin`` directory.
  97. #. Go to the Start Menu, and run "Edit environment variables for your account"
  98. #. In the upper area, find and open the entry for the "Path" variable.
  99. #. Add an entry in "Path" for ``%LocalAppData%\bin``.
  100. #. Confirm your edits.
  101. #. Restart any applications that require the modified environment, including
  102. command-lines.
  103. If the above steps are performed successfully, you should be able to open a new
  104. command window and execute ``dds --help`` to get the help output.