Supporters update.
[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 ## Building on macOS/arm64
8
9 Build `osx-environment` in `$HOME`
10 ```
11 bash platform/osx/copy_resources.sh
12 source platform/osx/set_paths.sh
13 ./waf configure --target-macos-arm64
14 ```
15
16
17 ## Disk writer logging
18
19 As we have no `film' folder to log to during disk writes, the logs end up:
20
21 ### macOS
22
23 * Disk writer backend: `/var/log/dcpomatic_disk_writer_{out,err}.log`
24 * Disk writer frontend: `/Users/$USER/Library/Preferences/com.dcpomatic/2/2.16/disk.log`
25
26 ### Windows
27
28 * Disk writer backend: `c:\Users\$USER\AppData\Local\dcpomatic\2.16.0\disk_writer.log`
29 * Disk writer frontend: `c:\Users\$USER\AppData\Local\dcpomatic\2.16.0\disk.log`
30
31 ### Linux
32
33 * Disk writer backend: `/home/$USER/.config/dcpomatic/2.16.0/disk_writer.log`
34 * Disk writer frontend: `/home/$USER/.config/dcpomatic/2.16.0/disk.log`
35
36
37 ## Branches
38
39 The main dcpomatic repo has the following branches:
40
41 * `main` - the main development branch; contains 2.16.x versions
42 * `v2.17.x` - development branch for v2.17.x versions; `main` is merged into this branch.
43
44 The `test/data` submodule has the following branches:
45
46 * `v2.16.x` - branch for use with v2.16.x versions
47 * `v2.18.x` - branch for use with v2.17.x versions (as will become v2.18.x)
48
49
50 ## Player stress testing
51
52 If you configure DCP-o-matic with `--enable-player-stress-test` you can make a script which
53 will run and manipulate the player in predictable ways.  The script is a series of commands
54 read line-by-line, and each line can be one of:
55
56 * `O <path>`
57
58 Open a DCP, for example
59
60 ```O /home/carl/DCP/MyTestDCP```
61
62 * `P`
63
64 Start playing the currently-loaded DCP.
65
66 * `W <time-in-milliseconds>`
67
68 Wait for approximately the given time before carrying on, for example
69
70 ```W 14000```
71
72 to wait for 14 seconds.
73
74 * `S`
75
76 Stop any current playback.
77
78 * `K <position>`
79
80 Seek to some point in the current DCP, where 0 is the start and 4095 is the end; for example
81
82 ```K 2048```
83
84 seeks half-way through the DCP.
85
86 * `E`
87
88 Stops playback and closes the player.
89
90 The script can be run using something like
91
92 ```dcpomatic2_player -s stress```
93
94 to load a script file called `stress` and start executing it.
95
96
97 ## Adding a new language
98
99 - Edit `src/wx/config_dialog.cc` to add the language to languages.
100 - Add to `platform/windows/wscript`, `platform/osx/make_dmg.sh`, `cscript`.
101 - ./waf pot
102 - cp build/src/lib/libdcpomatic.pot src/lib/po/$LANG.po
103 - cp build/src/wx/libdcpomatic-wx.pot src/wx/po/$LANG.po
104 - cp build/src/tools/dcpomatic.pot src/tools/po/$LANG.po
105 - sed -i "s/CHARSET/UTF-8/" src/{lib,wx,tools}/po/$LANG.po
106 - Commit / push
107 - Add credit to `src/wx/about_dialog.cc` and database.
108 - Add to `i18n.php` on website and `update-i18n-stats` script, then run `update-i18n-stats` script.
109
110
111 ## Taking screenshots for the manual
112
113 The manual PDF looks nice if vector screenshots are used.  These can be taken as follows:
114
115 - Build `gtk-vector-screenshot.git` (using meson/ninja)
116 - Copy `libgtk-vector-screenshot.so` to `/usr/local/lib/gtk-3.0/modules/`
117 - Run DCP-o-matic using `run/dcpomatic --screenshot`
118 - Start `take-vector-screenshot`, click "Take screenshot" then click on the DCP-o-matic window.
119 - Find a PDF in `/tmp/dcpomatic2.pdf`
120 - Copy this to `doc/manual/raw-screenshots`