Advertisement
Guest User

Untitled

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