organicmaps
organicmaps copied to clipboard
[data] Refactor resources folder
New folder structure From
- resources-mdpi-clear
- resources-mdpi-dark
- resources-xhdpi-clear
- resources-xhdpi-dark
To
symbols
├── 6plus
│ ├── clear
│ │ ├── symbols.png
│ │ └── symbols.sdf
│ ├── dark
│ │ ├── symbols.png
│ │ └── symbols.sdf
│ └── design
│ ├── symbols.png
│ └── symbols.sdf
├── hdpi
│ ├── clear
│ │ ├── symbols.png
│ │ └── symbols.sdf
│ ├── dark
│ │ ├── symbols.png
│ │ └── symbols.sdf
│ └── design
│ ├── symbols.png
│ ├── symbols.sdf
Moved area-hatching.png
and traffic-arrow.png
from {dpi}/{clear|dark}
to symbols/default
folder as all these files are the same and not regenerated.
Unfortunately, Xcode doesn't allow a resources
folder in the root directory. I had to rename the folder from resources
to symbols
.
More info: https://stackoverflow.com/questions/33993741/codesign-failed-with-exit-code-1-failing-to-build-copy-resources/40167588#40167588
I cannot place resources-svg
in symbols/svg
due to another Xcode problem. It doesn't allow to have a reference folder and exclude one of the subfolders from the project.
@AndrewShkrob did you see this one? WDYT? https://github.com/organicmaps/organicmaps/pull/7264
@AndrewShkrob did you see this one? WDYT? #7264
light/dark
is much better than clear/dark
We can postpone this PR until the #7264 is merged. I'll rebase it later.
Moved
area-hatching.png
andtraffic-arrow.png
from{dpi}/{clear|dark}
tosymbols/default
folder as all these files are the same and not regenerated.
So traffic arrows are different (compare mdpi to xxxhdpi).
area-hatching.png
is the same for all dpis indeed.
But its very likely we'll expand handling of it to support other more complex textures like forest, shrub, hospital, etc. and they're likely to be dpi-dependent.. @vng WDYT?
Thanks for this PR, its a great companion to #7264!
Please check https://github.com/organicmaps/organicmaps/pull/7264#issuecomment-1987756789
i.e. there are dpi-specific folders in data/styles/clear/style-clear/
which would be great to move too!
Please check #7264 (comment) i.e. there are dpi-specific folders in
data/styles/clear/style-clear/
which would be great to move too!
Though I'm not sure it'll be a good idea to put them into symbols/hdpi/...
you've created.
Probably makes sense to keep "resource files" (included directly into apps) and "source files" separately, esp. given the Xcode restriction you've mentioned. Sometimes "sources" are identical to "resources" (there is no processing before app inclusion). In that case they should reside in "resources" directly or could be symlinked there (better for logical organisation of files and more future proof).
The https://github.com/organicmaps/organicmaps/pull/7264 is merged, so this PR could be updated.
The #7264 is merged, so this PR could be updated.
@AndrewShkrob could you please update the PR one you have time?
Rebased
I verified it again on all platforms.
Please, pay attention to generate_symbols.sh
script during the review.
And I'd like to ask somebody (@pastk probably) to check locally that nothing is broken and works as it should.