Limit the size of the recipient file name in the screen dialog.
[dcpomatic.git] / DEVELOP.md
1 # DCP-o-matic development notes
2
3 This file collects a few notes relevant to DCP-o-matic developers.  There is also some information
4 [on the web site](https://dcpomatic.com/development).
5
6
7 ## Branches
8
9 The main dcpomatic repo has the following branches:
10
11 * `main` - the main development branch; contains 2.16.x versions
12 * `v2.17.x` - development branch for v2.17.x versions; periodically rebased onto `main`
13
14 The `test/data` submodule has the following branches:
15
16 * `v2.16.x` - branch for use with v2.16.x versions
17 * `v2.18.x` - branch for use with v2.17.x versions (as will become v2.18.x)
18
19
20 ## Player stress testing
21
22 If you configure DCP-o-matic with `--enable-player-stress-test` you can make a script which
23 will run and manipulate the player in predictable ways.  The script is a series of commands
24 read line-by-line, and each line can be one of:
25
26 * `O <path>`
27
28 Open a DCP, for example
29
30 ```O /home/carl/DCP/MyTestDCP```
31
32 * `P`
33
34 Start playing the currently-loaded DCP.
35
36 * `W <time-in-milliseconds>`
37
38 Wait for approximately the given time before carrying on, for example
39
40 ```W 14000```
41
42 to wait for 14 seconds.
43
44 * `S`
45
46 Stop any current playback.
47
48 * `K <position>`
49
50 Seek to some point in the current DCP, where 0 is the start and 4095 is the end; for example
51
52 ```K 2048```
53
54 seeks half-way through the DCP.
55
56 * `E`
57
58 Stops playback and closes the player.
59
60 The script can be run using something like
61
62 ```dcpomatic2_player -s stress```
63
64 to load a script file called `stress` and start executing it.
65
66
67 ## Adding a new language
68
69 - Edit `src/wx/config_dialog.cc` to add the language to languages.
70 - Add to `platform/windows/wscript`, `platform/osx/make_dmg.sh`, `cscript`.
71 - ./waf pot
72 - cp build/src/lib/libdcpomatic.pot src/lib/po/$LANG.po
73 - cp build/src/wx/libdcpomatic-wx.pot src/wx/po/$LANG.po
74 - cp build/src/tools/libdcpomatic-wx.pot src/tools/po/$LANG.po
75 - sed -i "s/CHARSET/UTF-8/" src/{lib,wx,tools}/po/$LANG.po
76 - Commit / push
77 - Add credit to `src/wx/about_dialog.cc` and database.
78 - Add to `i18n.php` on website and `update-i18n-stats` script, then run `update-i18n-stats` script.
79
80
81 ## Taking screenshots for the manual
82
83 The manual PDF looks nice if vector screenshots are used.  These can be taken as follows:
84
85 - Build `gtk-vector-screenshot.git` (using meson/ninja)
86 - Copy `libgtk-vector-screenshot.so` to `/usr/local/lib/gtk-3.0/modules/`
87 - Run DCP-o-matic using `run/dcpomatic --screenshot`
88 - Start `take-vector-screenshot`, click "Take screenshot" then click on the DCP-o-matic window.
89 - Find a PDF in `/tmp/dcpomatic2.pdf`
90 - Copy this to `doc/manual/raw-screenshots`