"warning: unterminated string literal" in utils/buildcat.py. + Discussion on directory structure
Bug #1397500 reported by
GunChleoc
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
widelands |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
When running utils/buildcat.py, we get some "warning: unterminated string literal" messages.
The script doesn't like strings like this in the .cc files:
const char kTerrainFragmen
#version 120
uniform sampler2D u_terrain_texture;
varying float var_brightness;
varying vec2 var_texture_
void main() {
vec4 clr = texture2D(
clr.rgb *= var_brightness;
gl_FragColor = clr;
}
)";
Related branches
lp:~widelands-dev/widelands/bug-1397500
- SirVer: Approve
-
Diff: 737 lines (+243/-280)21 files modifieddata/shaders/blit.fp (+28/-0)
data/shaders/blit.vp (+21/-0)
data/shaders/dither.fp (+24/-0)
data/shaders/dither.vp (+24/-0)
data/shaders/draw_line.fp (+7/-0)
data/shaders/draw_line.vp (+12/-0)
data/shaders/fill_rect.fp (+7/-0)
data/shaders/fill_rect.vp (+12/-0)
data/shaders/road.fp (+13/-0)
data/shaders/road.vp (+18/-0)
data/shaders/terrain.fp (+26/-0)
data/shaders/terrain.vp (+21/-0)
src/graphic/CMakeLists.txt (+2/-0)
src/graphic/gl/blit_program.cc (+1/-56)
src/graphic/gl/dither_program.cc (+1/-59)
src/graphic/gl/draw_line_program.cc (+1/-26)
src/graphic/gl/fill_rect_program.cc (+1/-30)
src/graphic/gl/road_program.cc (+1/-42)
src/graphic/gl/terrain_program.cc (+2/-61)
src/graphic/gl/utils.cc (+18/-3)
src/graphic/gl/utils.h (+3/-3)
Changed in widelands: | |
assignee: | nobody → GunChleoc (gunchleoc) |
Changed in widelands: | |
status: | Incomplete → In Progress |
milestone: | none → build19-rc1 |
Changed in widelands: | |
assignee: | GunChleoc (gunchleoc) → nobody |
Changed in widelands: | |
status: | In Progress → Fix Committed |
Changed in widelands: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
This is a gettext bug. cpp11 does define these strings as valid and gettext should parse them. I did not find a bug report for gettext or release notes for latest versions but maybe this is already fixed in newer versions.
We can work around the issue easily though: The shaders can be pulled out into data files (<program name>.vp for vertex shader and <program name>.fp for the fragment shade) and loaded at run time - that is how it is usually done and might be useful in the future when we need to modify them anyways on the fly for desktop GL und GL ES. It would also clean up the program files a bit. In which directory should they be put though?