Skip to content

Commit 39aae41

Browse files
authored
Clean up developer quickstart (#717)
- formatting was confusing the table of contents. This should look nice now. - Also add syntax highlighting for code examples Co-authored-by: ssteinbach <[email protected]>
1 parent 995f101 commit 39aae41

File tree

1 file changed

+41
-39
lines changed

1 file changed

+41
-39
lines changed

docs/tutorials/quickstart.md

Lines changed: 41 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -24,71 +24,71 @@ By default, when you install OTIO you will only get the "Core" adapters, which i
2424

2525
Once you have pip installed OpenTimelineIO, you should be able to run:
2626

27-
otioview path/to/your/file.edl
28-
27+
+ `otioview path/to/your/file.edl`
2928

3029
# Developer Quickstart
3130

32-
0. Get the source and submodules:
33-
+ `git clone [email protected]:PixarAnimationStudios/OpenTimelineIO.git`
34-
35-
1. To build OTIO for C++ development:
36-
37-
### Linux/Mac
31+
Get the source and submodules:
32+
+ `git clone [email protected]:PixarAnimationStudios/OpenTimelineIO.git`
3833

39-
+ `mkdir build`
40-
+ `cd build`
41-
+ `cmake .. { options }`
42-
+ `make install`
34+
## To build OTIO for C++ development:
4335

44-
### Windows - in an "x64 Native Tools Command Prompt" for Visual Studio
36+
### Linux/Mac
4537

46-
+ `mkdir build`
47-
+ `cd build`
48-
+ `cmake .. -DCMAKE_INSTALL_PREFIX={path/to/install/location} { options }`
49-
+ `cmake --build . --target install --config Release`
38+
```bash
39+
mkdir build
40+
cd build
41+
cmake .. { options }
42+
make install
43+
```
5044
51-
The CMAKE_INSTALL_PREFIX variable must be set to a path with no spaces in it, because CMake's default install location is in C:\Program Files, which won't work with OpenTimelineIO due to spaces in the path.
45+
### Windows - in an "x64 Native Tools Command Prompt" for Visual Studio
5246
53-
2. To build OTIO for Python development:
47+
```bash
48+
mkdir build
49+
cd build
50+
cmake .. -DCMAKE_INSTALL_PREFIX={path/to/install/location} { options }
51+
cmake --build . --target install --config Release
52+
```
5453
55-
### Linux
54+
The CMAKE_INSTALL_PREFIX variable must be set to a path with no spaces in it, because CMake's default install location is in C:\Program Files, which won't work with OpenTimelineIO due to spaces in the path.
5655
57-
+ `python setup.py install`
56+
## To build OTIO for Python development:
5857
59-
### Mac
58+
### Linux
6059
61-
+ `python setup.py install --user`
60+
+ `python setup.py install`
6261
63-
The `--user` option is not necessary if the build is done within a virtualenv.
62+
### Mac
6463
65-
### Windows - in an "x64 Native Tools Command Prompt" for Visual Studio
64+
+ `python setup.py install --user`
6665
67-
+ `python setup.py install --cxx-install-root=C:/path/to/install/cpp`
66+
The `--user` option is not necessary if the build is done within a virtualenv.
6867
68+
### Windows - in an "x64 Native Tools Command Prompt" for Visual Studio
6969
70+
`python setup.py install --cxx-install-root=C:/path/to/install/cpp`
7071
71-
3. To build OTIO for both C++ and Python development:
72+
## To build OTIO for both C++ and Python development:
7273
73-
The first time setup.py is run, cmake scripts will be created, and the headers and libraries will be installed where you specify. If the C++ or Python sources are subsequently modified, running this command again will build and update everything appropriately.
74+
The first time setup.py is run, cmake scripts will be created, and the headers and libraries will be installed where you specify. If the C++ or Python sources are subsequently modified, running this command again will build and update everything appropriately.
7475
75-
### Linux
76+
### Linux
7677
77-
+ `python setup.py install --cxx-install-root=/home/someone/cxx-otio-root`
78+
+ `python setup.py install --cxx-install-root=/home/someone/cxx-otio-root`
7879
79-
### Mac
80+
### Mac
8081
81-
+ `python setup.py install --cxx-install-root=/home/someone/cxx-otio-root --user`
82+
+ `python setup.py install --cxx-install-root=/home/someone/cxx-otio-root --user`
8283
83-
The `--user` option is not necessary if the build is done within a virtualenv.
84-
85-
### Windows - in an "x64 Native Tools Command Prompt" for Visual Studio
86-
87-
+ `python setup.py install --cxx-install-root=C:/path/to/install/cpp`
84+
The `--user` option is not necessary if the build is done within a virtualenv.
8885
86+
### Windows - in an "x64 Native Tools Command Prompt" for Visual Studio
8987
88+
+ `python setup.py install --cxx-install-root=C:/path/to/install/cpp`
9089
9190
To compile your own C++ file referencing the OTIO headers from your C++ build using gcc or clang, add the following -I flags:
91+
9292
+ `c++ -c source.cpp -I/home/someone/cxx-otio-root/include -I/home/someone/cxx-otio-root/include/opentimelineio/deps`
9393
9494
To link your own program against your OTIO build using gcc or clang, add the following -L/-l flags:
@@ -111,12 +111,14 @@ You can then attach GDB to python and run your program:
111111
112112
Or LLDB:
113113
114-
+ lldb -- python script_you_want_to_debug.py
114+
+ `lldb -- python script_you_want_to_debug.py`
115115
116116
One handy tip is that you can trigger a breakpoint in gdb by inserting a SIGINT:
117117
118+
```c++
118119
#include <csignal>
119-
...
120+
// ...
120121
std::raise(SIGINT);
122+
```
121123
122124
GDB will automatically break when it hits the SIGINT line.

0 commit comments

Comments
 (0)