/docs/src/user-guide/installation.md

https://github.com/owickstrom/komposition · Markdown · 175 lines · 128 code · 47 blank · 0 comment · 0 complexity · 8c600cb4bd739c0b0e5cd4b3ab138580 MD5 · raw file

  1. # Installation
  2. Komposition runs on Linux, macOS, and Windows. The main way to install
  3. Komposition is from source, but binary packages are [available for
  4. macOS from Homebrew](https://formulae.brew.sh/formula/komposition).
  5. ## Binary Packages
  6. ### Homebrew
  7. Komposition is available for macOS through [a Homebrew
  8. formula](https://formulae.brew.sh/formula/komposition). Given that you
  9. have Homebrew installed, run the following in your terminal to install
  10. Komposition:
  11. ```shell
  12. brew install komposition
  13. ```
  14. Komposition is now on your `PATH` and can be run from a terminal:
  15. ```shell
  16. komposition
  17. ```
  18. !!! note
  19. There's currently no application launcher in the Homebrew formula,
  20. but that might be added in the future.
  21. ## Install from Source Code
  22. Komposition can be built on macOS, Windows, and Linux. If you're not
  23. an experienced Haskell developer, it's recommended to use
  24. [Stack](https://docs.haskellstack.org/en/stable/README/) to build the
  25. application. The following instructions will be based on Stack, so go
  26. ahead and [install that
  27. first](https://docs.haskellstack.org/en/stable/README/#how-to-install).
  28. !!! note "Using another build tool"
  29. If you know your way around building Haskell programs, you might want to
  30. build it using Nix or regular Cabal, instead.
  31. ### Getting the Source Code
  32. Next, clone the source code repository using Git.
  33. ```shell
  34. git clone https://github.com/owickstrom/komposition.git
  35. cd komposition
  36. ```
  37. Alternatively, if you're not using Git, download a [ZIP
  38. archive](https://github.com/owickstrom/komposition/archive/master.zip):
  39. ```shell
  40. wget https://github.com/owickstrom/komposition/archive/master.zip -O komposition-master.zip
  41. unzip komposition-master.zip
  42. cd komposition-master
  43. ```
  44. You now have the source code. Jump on to the instructions below specific to
  45. your operating system.
  46. ### Debian/Ubuntu
  47. First, install the required dependencies:
  48. ```shell
  49. sudo apt-get install \
  50. ffmpeg \
  51. sox \
  52. libgmp-dev \
  53. libavutil-dev \
  54. libavformat-dev \
  55. libavcodec-dev \
  56. libswscale-dev \
  57. libavdevice-dev \
  58. libgirepository1.0-dev \
  59. libgtk-3-dev \
  60. libpango1.0-dev \
  61. libgdk-pixbuf2.0-dev \
  62. libgstreamer1.0-dev \
  63. gstreamer1.0-libav \
  64. gstreamer1.0-gtk3 \
  65. gstreamer1.0-plugins-base \
  66. gstreamer1.0-plugins-good \
  67. gstreamer1.0-plugins-bad
  68. ```
  69. !!! warning
  70. If you find additional packages that needs to be installed, please [submit
  71. an issue on GitHub](https://github.com/owickstrom/komposition).
  72. Next, build and install the application using Stack:
  73. ```shell
  74. stack install
  75. ```
  76. You should now have Komposition available:
  77. ```shell
  78. ~/.local/bin/komposition
  79. ```
  80. If you have added `~/.local/bin` to your `PATH`, run:
  81. ```shell
  82. komposition
  83. ```
  84. !!! warning "Older GTK+ Versions"
  85. If you see an error like the following when installing, it means your
  86. version of GTK+ is too old:
  87. ```
  88. Not in scope: data constructor ‘Gtk.FileChooserNative’
  89. ```
  90. This has been detected on Ubuntu 16.04. You may fix the issue by
  91. upgrading to Ubuntu 18.04, or by compiling and installing a newer version of
  92. GTK+ from source.
  93. ### macOS
  94. ```shell
  95. brew install pkg-config gobject-introspection gtk+3 ffmpeg sox gstreamer libffi gst-plugins-base gst-plugins-good gst-libav
  96. export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"
  97. # if you get an error in the next step about 'happy' not being on your
  98. # PATH, run this command first:
  99. stack build happy
  100. stack install
  101. ```
  102. ### Windows
  103. Komposition can be built on Windows in an MSYS2 environment. The
  104. precise instructions are not available in this documentation yet, but
  105. you should be able to install the dependencies using a command like
  106. the following, and then compile and run Komposition using Stack.
  107. ```
  108. # something like this...
  109. pacman -S mingw-w64-x86_64-gstreamer mingw-w64-x86_64-gst-libav mingw-w64-x86_64-gst-plugins-{base,good,bad}
  110. # TODO: also gtk+3, ffmpeg, and sox
  111. ```
  112. ### Nix/NixOS
  113. Komposition is not yet in [nixpkgs](https://github.com/NixOS/nixpkgs), but it
  114. can be installed with Nix from an archive on GitHub.
  115. First, consider installing [Cachix](https://cachix.org/) and using the
  116. Komposition binary cache. It's not strictly required, but will save you time
  117. waiting on compilation.
  118. ```shell
  119. cachix use komposition
  120. ```
  121. Next, use `nix-env` to install Komposition from the `master` branch:
  122. ```shell
  123. nix-env -iA komposition -f https://github.com/owickstrom/komposition/archive/master.tar.gz
  124. ```
  125. Run it from the command line:
  126. ```shell
  127. komposition
  128. ```