Commit f049eaa
committed
fix(desktop): don't regenerate bindings on a shipped debug build
A debug build runs export_generated() on startup to refresh the frontend's
generated files. The write paths are the build machine's
(CARGO_MANIFEST_DIR/../frontend/src/generated), so a debug build run from
anywhere else — e.g. a portable folder on another machine — panicked on
startup (the window flashed and vanished). Guard the regeneration on the
source tree actually existing, so a shipped debug build just skips it.
Release builds never ran this (it's cfg(debug_assertions)).1 parent afa87d2 commit f049eaa
1 file changed
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
155 | 158 | | |
156 | | - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
157 | 167 | | |
158 | 168 | | |
159 | 169 | | |
| |||
0 commit comments