-
Notifications
You must be signed in to change notification settings - Fork 856
/
INSTALL
89 lines (67 loc) · 3.63 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
---------------------------------------------
Compiling
---------------------------------------------
Required (and included) libraries:
libmp3lame - MP3 encoder - obs/lame
libfaac - AAC encoder - obs/libfaac
librtmp - RTMP protocol - obs/librtmp
libsamplerate - audio resampler - obs/libsamplerate
libx264 - x264 encoder - obs/x264
To compile OBS and all its sub-libraries, you can use OBS-All.sln
and compile everything all at once, or you can compile everything
individually yourself. x264 and libmp3lame are pre-compiled for
convenience.
Required environment variables:
WindowsSDK80Path - Points to windows sdk path. Must include ending
backslash.
DXSDK_DIR - Points to DirectX SDK path. Must include ending
backslash.
---------------------------------------------
Windows SDK
---------------------------------------------
It requires the latest windows SDK, as it uses features from
windows vista, windows 7 and 8. The windows 8 SDK should also come
with the latest DirectX includes and libraries
---------------------------------------------
Compiling LAME (if desired)
---------------------------------------------
I compile lame through the VC makefile.
Command line: nmake -f Makefile.MSVC CPU=P3
Get nasm if you want to compile with assembly, otherwise use ASM=NO
command line option. Use MSVCVER=Win64 to compile 64bit. View
lame/makefile.msvc for more info.
---------------------------------------------
Compiling x264 (if desired)
---------------------------------------------
x264 is slightly more troublesome, primarily because it's written in
C99, yasm, and compile configuration is totally dependent on bash
scripts. Usually it's recommended to cross-compile on linux, but I just
used msys and mingw for windows. There's a guide on how to get x264
compiled on windows at http://doom10.org/index.php?topic=26.0
Make sure to use the --enable-win32thread configuration option,
though I suppose you could make it use posix threads with a bit of work,
but it's fairly pointless and you'd probably have to add some more stuff
to the Hacks.cpp file.
If compiling static (which I don't do anymore), please make sure to
include the static libgcc.a that your mingw provides. Depending on your
mingw version you may need to add/remove stuff from Hacks.cpp to get it
properly working. It sucks, I know, but I'm not the one who decided to
make x264 uncompilable on microsoft's (admittedly worthless) C compiler.
---------------------------------------------
Other notes
---------------------------------------------
You may have noted that every single library I use is statically linked.
Even the CRT is static on all projects. Personally, I despise having any
outside DLL dependencies. Having to install the damn visual studio
runtimes every single time you install an application is the most annoying
thing on earth. Sure, I understand why they're used, and I know that there
are often vulnerabilities that need to be patched, but I personally go
around it by centralizing all such stuff in the utility library (see the
Utility files in OBSApi). Generally when I get an application I like it
to work right from the start with as little setup as possible. It's a
personal preference.
If you need to allocate, use the Allocate and Free functions. new and
delete is automatically wrapped to these as well.
At some point in time I will get around to some proper documentation of
the utility library, but in the mean time, look around in the utility files
of OBSApi if you wish.