INSTALL 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. Compilation instructions! Temporary quick compilation instructions!
  2. Will give better instructions later when things are in a more complete state.
  3. Windows:
  4. - NOTE: OBS on windows currently requires VS2013, as obs-studio uses C99 and
  5. C++11. Express might not be supported at this time (though I'll fix it at
  6. some point).
  7. - Clone the repo. After cloning, run the following git commands:
  8. git submodule init
  9. git submodule update
  10. which will download submodules.
  11. - Download (or build) development packages of FFmpeg, x264, Qt5.
  12. - Download windows version of cmake from: http://www.cmake.org/
  13. - Add windows environment variables:
  14. FFMpegPath (path to FFmpeg include directory)
  15. x264Path (path to x264 include directory)
  16. QTDIR (path to Qt build base directory)
  17. NOTE: Each of these environment variables can specify 32bit and 64bit by
  18. appending 32 and 64 to the end of the environment variable names.
  19. So if you want to separate locations for 32bit or 64bit, you can set:
  20. FFmpegPath32, FFmpegPath64, x264Path32, x264Path64, QTDIR32, QTDIR64, etc.
  21. NOTE: These variables are optional and these can be entered in to cmake
  22. while generating, but having these variables makes life much easier in case
  23. you need to regenerate your cmake data from scratch for whatever reason.
  24. NOTE: An example Qt directory you would use here if you installed Qt5 to
  25. D:\Qt would usually look something like this for the 32bit version:
  26. D:\Qt\5.3\msvc2013
  27. And something like this for the 64bit version
  28. D:\Qt\5.3\msvc2013_64
  29. NOTE: Search paths and search order for FFmpeg and x264 library/binary
  30. files, relative to their include directories:
  31. Library files
  32. ../lib
  33. ../lib32 (if 32bit)
  34. ../lib64 (if 64bit)
  35. ./lib
  36. ./lib32 (if 32bit)
  37. ./lib64 (if 64bit)
  38. Binary files:
  39. ../bin
  40. ../bin32 (if 32bit)
  41. ../bin64 (if 64bit)
  42. ./bin
  43. ./bin32 (if 32bit)
  44. ./bin64 (if 64bit)
  45. - Run cmake-gui. In "where is the source code", enter in the repo directory
  46. (example: D:/obs). In "where to build the binaries", enter the repo
  47. directory path with the 'build' subdirectory (example: D:/obs/build).
  48. NOTE: The subdirectories 'build', 'release', and 'debug' are meant for
  49. builds, and are excluded from the repo in .gitignore, so they are safe to
  50. use for building.
  51. - Press 'Configure', then enable the COPY_DEPENDENCIES option, then press
  52. 'Configure' again, and then press 'Generate' to generate visual studio
  53. project files in the 'build' subdirectory.
  54. - Open obs-studio.sln from the 'build' subdirectory, and it should run and
  55. be good to go. All required dependencies should be copied on compile and
  56. it should be a fully fuctional build environment.
  57. Mac OSX
  58. - Use macports or homebrew and install FFmpeg, x264, Qt5, and cmake.
  59. NOTE: Qt5 can also be downloaded/installed via the Qt website, though keep
  60. in mind that you will have to set the QTDIR environment variable to the
  61. Qt5 build base directory.
  62. - Make sure to have the OSX 10.9 or newer SDK installed (comes with recent
  63. versions of Xcode)
  64. - In a terminal, go to the obs-studio directory create a 'build' sub
  65. directory and change to it, then to build, type:
  66. - on OSX 10.9 or newer:
  67. cmake .. && make
  68. - on OSX 10.8:
  69. MACOSX_DEPLOYMENT_TARGET=10.8 cmake -DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/ .. && make
  70. - It builds in a modular structure by default. To run it via terminal, go to
  71. build/rundir/RelWithDebInfo/bin, then type ./obs to run.
  72. NOTE: If you are running via command prompt, you *must* be in the 'bin'
  73. directory specified above, otherwise it will not be able to find its files
  74. relative to the binary.
  75. - To create an app bundle instead, use the command: make package
  76. This will create a .dmg file with an app bundle inside.
  77. Linux
  78. - You need a fairly recent Linux distribution.
  79. Ubuntu 14.04 or a similar recent Linux distribution works fine, but
  80. anything that's up-to-date should work.
  81. Ubuntu 13.10 or older will _not_ work because of the ancient
  82. version of libav they use.
  83. - Because Ubuntu and Debian come with libav instead of ffmpeg, you have
  84. to get the original ffmpeg. Recommended:
  85. For Ubuntu 14.04:
  86. https://launchpad.net/~jon-severinsson/+archive/ubuntu/ffmpeg
  87. For Debian:
  88. http://www.deb-multimedia.org/
  89. - There is also a ppa available in case you do not want to compile
  90. yourself(Ubuntu 14.04 only):
  91. https://launchpad.net/~obsproject/+archive/ubuntu/obs-studio
  92. - Build dependencies on Ubuntu 14.04 with ffmpeg ppa from above:
  93. cmake libpulse-dev qtbase5-dev libqt5x11extras5-dev libavcodec-dev
  94. libavformat-dev libswscale-dev libx264-dev libswresample-dev
  95. libfdk-aac-dev libxinerama-dev libxcomposite-dev libxrandr-dev
  96. - Building in portable mode(assuming you are in a terminal in the
  97. obs-studio base dir):
  98. mkdir build && cd build
  99. cmake -DUNIX_STRUCTURE=0 -DCMAKE_INSTALL_PREFIX="${HOME}/obs-studio-portable" ..
  100. make -j4 && make install
  101. - After that you should have a portable install in ~/obs-studio-portable
  102. Change to bin/64bit or bin/32bit and run ./obs to run it.
  103. - If you want to install obs-studio into your system, it's recommended
  104. to use checkinstall instead of a plain make install. It allows for a
  105. clean uninstall and allows the package manager to keep track of the
  106. installed files:
  107. sudo apt-get install checkinstall
  108. mkdir build && cd build
  109. cmake -DUNIX_STRUCTURE=1 -DCMAKE_INSTALL_PREFIX=/usr ..
  110. make -j4
  111. sudo checkinstall