2019-01-11 21:27:26 +03:00
|
|
|
# Development notes
|
|
|
|
|
|
|
|
Find packages to upgrade: `cargo outdated -R`
|
2019-01-14 22:29:06 +03:00
|
|
|
|
|
|
|
Diff screencaps: http://www.imagemagick.org/Usage/compare/#methods
|
2019-01-15 01:36:46 +03:00
|
|
|
|
2019-01-24 09:27:32 +03:00
|
|
|
Debug OpenGL calls:
|
2019-03-13 02:31:54 +03:00
|
|
|
|
|
|
|
```
|
|
|
|
apitrace trace --api gl ../target/debug/editor ../data/raw_maps/montlake.abst
|
|
|
|
qapitrace editor.trace
|
|
|
|
apitrace dump editor.trace
|
|
|
|
```
|
2019-03-12 00:01:06 +03:00
|
|
|
|
2019-05-20 02:13:19 +03:00
|
|
|
Understand XML: just use firefox
|
|
|
|
|
2019-03-12 00:01:06 +03:00
|
|
|
## Profiling
|
|
|
|
|
2019-03-13 02:31:54 +03:00
|
|
|
`apt-get install google-perftools libgoogle-perftools-dev`
|
2019-03-12 00:01:06 +03:00
|
|
|
|
|
|
|
Follow Usage from https://crates.io/crates/cpuprofiler
|
|
|
|
|
2019-03-13 02:31:54 +03:00
|
|
|
Run editor or headless with `--enable_profiler`
|
|
|
|
|
|
|
|
```
|
2019-03-12 00:01:06 +03:00
|
|
|
google-pprof --no_strip_temp ../target/debug/editor profile
|
|
|
|
google-pprof --no_strip_temp ../target/release/headless profile
|
|
|
|
top30 --cum
|
2019-03-13 02:31:54 +03:00
|
|
|
```
|
2019-03-12 02:23:39 +03:00
|
|
|
|
|
|
|
## Building releases
|
|
|
|
|
2019-03-16 01:14:31 +03:00
|
|
|
Cross-compilation notes: https://github.com/rust-embedded/cross Or use
|
|
|
|
https://github.com/japaric/trust
|
|
|
|
|
|
|
|
Initially have to:
|
|
|
|
|
|
|
|
```shell
|
|
|
|
rustup target add x86_64-pc-windows-gnu
|
|
|
|
```
|
|
|
|
|
|
|
|
Then:
|
2019-03-12 02:23:39 +03:00
|
|
|
|
2019-03-13 02:31:54 +03:00
|
|
|
```
|
2019-04-10 20:55:53 +03:00
|
|
|
sudo systemctl start docker
|
2019-03-12 02:23:39 +03:00
|
|
|
cross build --release --target x86_64-pc-windows-gnu --bin editor
|
2019-04-10 20:55:53 +03:00
|
|
|
wine target/x86_64-pc-windows-gnu/release/editor.exe data/maps/montlake.abst
|
2019-03-13 02:31:54 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
## Markdown
|
|
|
|
|
|
|
|
For formatting:
|
|
|
|
|
|
|
|
```
|
|
|
|
sudo apt-get install npm
|
|
|
|
cd ~; mkdir npm; cd npm
|
|
|
|
npm init --yes
|
|
|
|
npm install prettier --save-dev --save-exact
|
|
|
|
```
|
|
|
|
|
|
|
|
Use https://github.com/joeyespo/grip to render. Doesn't seem to work with the
|
|
|
|
graphviz image.
|
2019-04-16 23:06:01 +03:00
|
|
|
|
2019-04-18 00:49:51 +03:00
|
|
|
https://github.com/ekalinin/github-markdown-toc for table of contents
|
|
|
|
|
2019-04-16 23:06:01 +03:00
|
|
|
## Videos
|
|
|
|
|
|
|
|
```
|
|
|
|
# Fullscreen
|
|
|
|
ffmpeg -f x11grab -r 25 -s 1920x1080 -i :0.0 -vcodec huffyuv raw.avi
|
|
|
|
# Default window
|
2019-05-14 03:24:22 +03:00
|
|
|
ffmpeg -f x11grab -r 25 -s 1800x800 -i :0.0+28,92 -vcodec huffyuv raw.avi
|
2019-04-16 23:06:01 +03:00
|
|
|
|
|
|
|
ffmpeg -ss 10.0 -t 5.0 -i raw.avi -f gif -filter_complex "[0:v] fps=12,scale=1024:-1,split [a][b];[a] palettegen [p];[b][p] paletteuse" screencast.gif
|
|
|
|
```
|