[data] Refactor resources folder

Signed-off-by: Andrei Shkrob <github@shkrob.dev>
This commit is contained in:
Andrei Shkrob
2025-07-08 18:38:28 +02:00
committed by Konstantin Pastbin
parent 04246a55f2
commit 8f5c8a5bd7
71 changed files with 62 additions and 283 deletions

6
.gitignore vendored
View File

@@ -14,10 +14,10 @@ stxxl.errlog
stxxl.log
screenlog.0
data/resources-*_design
data/symbols/*/design/
# symbols png/sdf are now generated at build
data/resources-*_*/symbols.png
data/resources-*_*/symbols.sdf
data/symbols/**/symbols.png
data/symbols/**/symbols.sdf
data/colors_design.txt
data/patterns_design.txt
data/bookmarks

View File

@@ -1 +0,0 @@
../../../../../data/resources-6plus_dark

View File

@@ -1 +0,0 @@
../../../../../data/resources-6plus_light

View File

@@ -1 +0,0 @@
../../../../../data/resources-default

View File

@@ -1 +0,0 @@
../../../../../data/resources-hdpi_dark

View File

@@ -1 +0,0 @@
../../../../../data/resources-hdpi_light

View File

@@ -1 +0,0 @@
../../../../../data/resources-mdpi_dark

View File

@@ -1 +0,0 @@
../../../../../data/resources-mdpi_light

View File

@@ -1 +0,0 @@
../../../../../data/resources-xhdpi_dark

View File

@@ -1 +0,0 @@
../../../../../data/resources-xhdpi_light

View File

@@ -1 +0,0 @@
../../../../../data/resources-xxhdpi_dark

View File

@@ -1 +0,0 @@
../../../../../data/resources-xxhdpi_light

View File

@@ -1 +0,0 @@
../../../../../data/resources-xxxhdpi_dark

View File

@@ -1 +0,0 @@
../../../../../data/resources-xxxhdpi_light

View File

@@ -0,0 +1 @@
../../../../../data/symbols

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 298 B

After

Width:  |  Height:  |  Size: 298 B

View File

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

View File

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

View File

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 826 B

After

Width:  |  Height:  |  Size: 826 B

View File

Before

Width:  |  Height:  |  Size: 932 B

After

Width:  |  Height:  |  Size: 932 B

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 62 KiB

View File

Before

Width:  |  Height:  |  Size: 598 B

After

Width:  |  Height:  |  Size: 598 B

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -83,14 +83,9 @@ function(copy_resources)
endfunction()
copy_resources(
fonts
symbols
countries-strings
resources-default
resources-mdpi_light
resources-hdpi_light
resources-xhdpi_light
resources-xxhdpi_light
resources-xxxhdpi_light
resources-6plus_light
vulkan_shaders
categories.txt
@@ -109,23 +104,6 @@ copy_resources(
types.txt
World.mwm
WorldCoasts.mwm
fonts/blacklist.txt
fonts/whitelist.txt
fonts/unicode_blocks.txt
fonts/00_NotoNaskhArabic-Regular.ttf
fonts/00_NotoSansBengali-Regular.ttf
fonts/00_NotoSansHebrew-Regular.ttf
fonts/00_NotoSansMalayalam-Regular.ttf
fonts/00_NotoSansThai-Regular.ttf
fonts/00_NotoSerifDevanagari-Regular.ttf
fonts/01_dejavusans.ttf
fonts/02_droidsans-fallback.ttf
fonts/03_jomolhari-id-a3d.ttf
fonts/04_padauk.ttf
fonts/05_khmeros.ttf
fonts/06_code2000.ttf
fonts/07_roboto_medium.ttf
)
if (NOT PLATFORM_LINUX)

View File

@@ -43,13 +43,14 @@ Automatically generated:
### Styles and icons
- `resources-default/` -
- `resources-svg/` - social networks icons
- `symbols/` - symbols for different screen DPIs
- `symbols/default/` - default resources used on all sceen DPIs
- `symbols-svg/` - social networks icons
- `search-icons/svg/` - source SVG files for search categories icons
- `styles/` - map [style files](STYLES.md#files)
Automatically [generated](STYLES.md#technical-details):
- `resources-*/` - icons skin files in various resolutions for `dark` and `clear` (light) themes.
- `symbols/` - icons skin files in various resolutions for `dark` and `light` themes.
- `drules_proto*` - binary drawing rules files.
- `colors.txt`,`patterns.txt`,`visibility.txt`

View File

@@ -288,7 +288,7 @@ ReaderPtr<Reader> ResolveGuiSkinFile(std::string const & deviceType)
std::unique_ptr<Reader> reader;
try
{
reader = pl.GetReader("resources-default/" + deviceType + ".ui");
reader = pl.GetReader("symbols/default/" + deviceType + ".ui");
}
catch(FileAbsentException & e)
{
@@ -299,7 +299,7 @@ ReaderPtr<Reader> ResolveGuiSkinFile(std::string const & deviceType)
{
try
{
reader = pl.GetReader("resources-default/default.ui");
reader = pl.GetReader("symbols/default/default.ui");
}
catch(FileAbsentException & e)
{

View File

@@ -7,8 +7,8 @@
namespace
{
std::string const kSuffixDark = "_dark";
std::string const kSuffixLight = "_light";
std::string const kSuffixDark = "dark";
std::string const kSuffixLight = "light";
std::string const kSuffixDefaultDark = "_default_dark";
std::string const kSuffixDefaultLight = "_default_light";
std::string const kSuffixVehicleDark = "_vehicle_dark";
@@ -42,7 +42,7 @@ std::string GetStyleRulesSuffix(MapStyle mapStyle)
case MapStyleOutdoorsDark:
return kSuffixOutdoorsDark;
case MapStyleMerged:
return std::string();
return {};
case MapStyleCount:
break;
@@ -70,7 +70,7 @@ std::string GetStyleResourcesSuffix(MapStyle mapStyle)
case MapStyleOutdoorsLight:
return kSuffixLight;
case MapStyleMerged:
return std::string();
return {};
case MapStyleCount:
break;
@@ -122,9 +122,7 @@ ReaderPtr<Reader> StyleReader::GetDrawingRulesReader() const
ReaderPtr<Reader> StyleReader::GetResourceReader(std::string const & file,
std::string_view density) const
{
std::string const resourceDir =
std::string("resources-").append(density) + GetStyleResourcesSuffix(GetCurrentStyle());
std::string resFile = base::JoinPath(resourceDir, file);
std::string resFile = base::JoinPath("symbols", std::string{density}, GetStyleResourcesSuffix(GetCurrentStyle()), file);
auto overriddenResFile = base::JoinPath(GetPlatform().WritableDir(), kStylesOverrideDir, resFile);
if (GetPlatform().IsFileExistsByFullPath(overriddenResFile))
@@ -140,7 +138,7 @@ ReaderPtr<Reader> StyleReader::GetResourceReader(std::string const & file,
ReaderPtr<Reader> StyleReader::GetDefaultResourceReader(std::string const & file) const
{
return GetPlatform().GetReader(base::JoinPath("resources-default", file));
return GetPlatform().GetReader(base::JoinPath("symbols/default", file));
}
StyleReader & GetStyleReader()

View File

@@ -9,6 +9,7 @@
/* Begin PBXBuildFile section */
039371B62C5B68CD00708377 /* UIFont+monospaced.swift in Sources */ = {isa = PBXBuildFile; fileRef = 039371B52C5B68CD00708377 /* UIFont+monospaced.swift */; };
165953742CB1D85500CFED7C /* fonts in Resources */ = {isa = PBXBuildFile; fileRef = 165953732CB1D83700CFED7C /* fonts */; };
165953942CB44B5600CFED7C /* symbols in Resources */ = {isa = PBXBuildFile; fileRef = 165953932CB44B3B00CFED7C /* symbols */; };
1DFA2F6A20D3B57400FB2C66 /* UIColor+PartnerColor.m in Sources */ = {isa = PBXBuildFile; fileRef = 1DFA2F6920D3B57400FB2C66 /* UIColor+PartnerColor.m */; };
270C9C282E16AB6F00ABA688 /* Profile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 270C9C252E16AB6300ABA688 /* Profile.swift */; };
272F1F392E0EE09000FA52EF /* ExistingProfileView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 272F1F382E0EE08A00FA52EF /* ExistingProfileView.swift */; };
@@ -202,8 +203,6 @@
408645FC21495EB1000A4A1D /* categories_cuisines.txt in Resources */ = {isa = PBXBuildFile; fileRef = 408645FB21495EB1000A4A1D /* categories_cuisines.txt */; };
44360A0D2A7D34990016F412 /* TransportRuler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44360A0C2A7D34990016F412 /* TransportRuler.swift */; };
44360A112A7D35440016F412 /* TransportRuler.xib in Resources */ = {isa = PBXBuildFile; fileRef = 44360A102A7D35440016F412 /* TransportRuler.xib */; };
4501B1942077C35A001B9173 /* resources-xxxhdpi_light in Resources */ = {isa = PBXBuildFile; fileRef = 4501B1922077C35A001B9173 /* resources-xxxhdpi_light */; };
4501B1952077C35A001B9173 /* resources-xxxhdpi_dark in Resources */ = {isa = PBXBuildFile; fileRef = 4501B1932077C35A001B9173 /* resources-xxxhdpi_dark */; };
4554B6EC1E55F0EF0084017F /* drules_proto_vehicle_light.bin in Resources */ = {isa = PBXBuildFile; fileRef = 4554B6E81E55F02B0084017F /* drules_proto_vehicle_light.bin */; };
4554B6EE1E55F0F30084017F /* drules_proto_vehicle_dark.bin in Resources */ = {isa = PBXBuildFile; fileRef = 4554B6E91E55F02B0084017F /* drules_proto_vehicle_dark.bin */; };
462452E92BD052C0004C85E1 /* MWMEditorSegmentedTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 462452E72BD052C0004C85E1 /* MWMEditorSegmentedTableViewCell.mm */; };
@@ -281,31 +280,23 @@
6741A9421BF340DE002C974C /* sound-strings in Resources */ = {isa = PBXBuildFile; fileRef = 5605022E1B6211E100169CAD /* sound-strings */; };
6741A9451BF340DE002C974C /* classificator.txt in Resources */ = {isa = PBXBuildFile; fileRef = EE026F0511D6AC0D00645242 /* classificator.txt */; };
6741A9491BF340DE002C974C /* countries.txt in Resources */ = {isa = PBXBuildFile; fileRef = FA46DA2B12D4166E00968C36 /* countries.txt */; };
6741A94A1BF340DE002C974C /* resources-6plus_light in Resources */ = {isa = PBXBuildFile; fileRef = 4A23D1571B8B4DD700D4EB6F /* resources-6plus_light */; };
6741A94D1BF340DE002C974C /* resources-xxhdpi_light in Resources */ = {isa = PBXBuildFile; fileRef = 4A23D15A1B8B4DD700D4EB6F /* resources-xxhdpi_light */; };
6741A94F1BF340DE002C974C /* MWMDefaultAlert.xib in Resources */ = {isa = PBXBuildFile; fileRef = F64F198C1AB81A00006EAF7E /* MWMDefaultAlert.xib */; };
6741A9511BF340DE002C974C /* MWMDownloaderDialogHeader.xib in Resources */ = {isa = PBXBuildFile; fileRef = F64F4B701B4A41D40081A24A /* MWMDownloaderDialogHeader.xib */; };
6741A9521BF340DE002C974C /* World.mwm in Resources */ = {isa = PBXBuildFile; fileRef = FAFF42291347F101009BBB14 /* World.mwm */; };
6741A9551BF340DE002C974C /* resources-xxhdpi_dark in Resources */ = {isa = PBXBuildFile; fileRef = 4A7D89C41B2EBF3B00AC843E /* resources-xxhdpi_dark */; };
6741A95C1BF340DE002C974C /* categories.txt in Resources */ = {isa = PBXBuildFile; fileRef = FAAFD696139D9BE2000AE70C /* categories.txt */; };
6741A95D1BF340DE002C974C /* types.txt in Resources */ = {isa = PBXBuildFile; fileRef = FA64D9A813F975AD00350ECF /* types.txt */; };
6741A9601BF340DE002C974C /* MWMRoutingDisclaimerAlert.xib in Resources */ = {isa = PBXBuildFile; fileRef = F63774E61B59375E00BCF54D /* MWMRoutingDisclaimerAlert.xib */; };
6741A9611BF340DE002C974C /* resources-xhdpi_dark in Resources */ = {isa = PBXBuildFile; fileRef = 4A7D89C31B2EBF3B00AC843E /* resources-xhdpi_dark */; };
6741A9681BF340DE002C974C /* faq.html in Resources */ = {isa = PBXBuildFile; fileRef = 978D4A30199A11E600D72CA7 /* faq.html */; };
6741A96C1BF340DE002C974C /* MWMDownloadTransitMapAlert.xib in Resources */ = {isa = PBXBuildFile; fileRef = F64F19981AB81A00006EAF7E /* MWMDownloadTransitMapAlert.xib */; };
6741A96D1BF340DE002C974C /* MWMLocationAlert.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6BBF2C71B4FFB8C000CF8E2 /* MWMLocationAlert.xib */; };
6741A9711BF340DE002C974C /* copyright.html in Resources */ = {isa = PBXBuildFile; fileRef = 97A5967E19B9CD47007A963F /* copyright.html */; };
6741A9741BF340DE002C974C /* resources-6plus_dark in Resources */ = {isa = PBXBuildFile; fileRef = 4A7D89C11B2EBF3B00AC843E /* resources-6plus_dark */; };
6741A9751BF340DE002C974C /* WorldCoasts.mwm in Resources */ = {isa = PBXBuildFile; fileRef = FA459EB314327AF700B5BB3C /* WorldCoasts.mwm */; };
6741A9761BF340DE002C974C /* packed_polygons.bin in Resources */ = {isa = PBXBuildFile; fileRef = FA85F632145DDDC20090E1A0 /* packed_polygons.bin */; };
6741A97D1BF340DE002C974C /* synonyms.txt in Resources */ = {isa = PBXBuildFile; fileRef = FAAEA7D0161BD26600CCD661 /* synonyms.txt */; };
6741A97E1BF340DE002C974C /* drules_proto_default_dark.bin in Resources */ = {isa = PBXBuildFile; fileRef = 4A00DBDE1AB704C400113624 /* drules_proto_default_dark.bin */; };
6741A97F1BF340DE002C974C /* resources-mdpi_light in Resources */ = {isa = PBXBuildFile; fileRef = 4A23D1581B8B4DD700D4EB6F /* resources-mdpi_light */; };
6741A9871BF340DE002C974C /* drules_proto_default_light.bin in Resources */ = {isa = PBXBuildFile; fileRef = 4A23D1561B8B4DD700D4EB6F /* drules_proto_default_light.bin */; };
6741A98B1BF340DE002C974C /* MWMCircularProgress.xib in Resources */ = {isa = PBXBuildFile; fileRef = 349A35771B53D4C9009677EE /* MWMCircularProgress.xib */; };
6741A9901BF340DE002C974C /* resources-mdpi_dark in Resources */ = {isa = PBXBuildFile; fileRef = 4A7D89C21B2EBF3B00AC843E /* resources-mdpi_dark */; };
6741A9951BF340DE002C974C /* MWMDownloaderDialogCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F64F4B6E1B46A5380081A24A /* MWMDownloaderDialogCell.xib */; };
6741A9981BF340DE002C974C /* resources-xhdpi_light in Resources */ = {isa = PBXBuildFile; fileRef = 4A23D1591B8B4DD700D4EB6F /* resources-xhdpi_light */; };
6741A9991BF340DE002C974C /* MWMAlertViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F64F19831AB81A00006EAF7E /* MWMAlertViewController.xib */; };
6741A9A31BF340DE002C974C /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.mm */; };
6741A9A51BF340DE002C974C /* MWMShareActivityItem.mm in Sources */ = {isa = PBXBuildFile; fileRef = 340837151B72451A00B5C185 /* MWMShareActivityItem.mm */; };
@@ -329,7 +320,6 @@
674A7E301C0DB10B003D48E1 /* MWMMapWidgets.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34FE4C441BCC013500066718 /* MWMMapWidgets.mm */; };
676507601C10559800830BB3 /* patterns.txt in Resources */ = {isa = PBXBuildFile; fileRef = 451950391B7A3E070085DA05 /* patterns.txt */; };
676507611C10559B00830BB3 /* colors.txt in Resources */ = {isa = PBXBuildFile; fileRef = 452FCA3A1B6A3DF7007019AB /* colors.txt */; };
677A2DE21C0DD50900635A00 /* resources-default in Resources */ = {isa = PBXBuildFile; fileRef = A367C93A1B17334800E2B6E7 /* resources-default */; };
6B9978361C89A316003B8AA0 /* editor.config in Resources */ = {isa = PBXBuildFile; fileRef = 6B9978341C89A316003B8AA0 /* editor.config */; };
8C4FB9C72BEFEFF400D44877 /* CarPlayWindowScaleAdjuster.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C4FB9C62BEFEFF400D44877 /* CarPlayWindowScaleAdjuster.swift */; };
8CB13C3B2BF1276A004288F2 /* CarplayPlaceholderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CB13C3A2BF1276A004288F2 /* CarplayPlaceholderView.swift */; };
@@ -547,8 +537,6 @@
EDF838C42C00B9D6007E4E67 /* FileManagerMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = EDF838B32C00B9C7007E4E67 /* FileManagerMock.swift */; };
EDFDFB482B7139670013A44C /* Social Media.swift in Sources */ = {isa = PBXBuildFile; fileRef = EDFDFB472B7139670013A44C /* Social Media.swift */; };
EDFE1A4A2DF1989700FDEA38 /* UIAlertController+UnknownCurrentPosition.swift in Sources */ = {isa = PBXBuildFile; fileRef = EDFE1A492DF1989700FDEA38 /* UIAlertController+UnknownCurrentPosition.swift */; };
F607C1881C032A8800B53A87 /* resources-hdpi_light in Resources */ = {isa = PBXBuildFile; fileRef = F607C1831C032A8800B53A87 /* resources-hdpi_light */; };
F607C18A1C032A8800B53A87 /* resources-hdpi_dark in Resources */ = {isa = PBXBuildFile; fileRef = F607C1841C032A8800B53A87 /* resources-hdpi_dark */; };
F623DA6C1C9C2731006A3436 /* opening_hours_how_to_edit.html in Resources */ = {isa = PBXBuildFile; fileRef = F623DA6A1C9C2731006A3436 /* opening_hours_how_to_edit.html */; };
F623DA6F1C9C2E62006A3436 /* MWMAddPlaceNavigationBar.xib in Resources */ = {isa = PBXBuildFile; fileRef = F653CE171C71F62400A453F1 /* MWMAddPlaceNavigationBar.xib */; };
F62607FD207B790300176C5A /* SpinnerAlert.swift in Sources */ = {isa = PBXBuildFile; fileRef = F62607FC207B790300176C5A /* SpinnerAlert.swift */; };
@@ -764,6 +752,7 @@
/* Begin PBXFileReference section */
039371B52C5B68CD00708377 /* UIFont+monospaced.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIFont+monospaced.swift"; sourceTree = "<group>"; };
165953732CB1D83700CFED7C /* fonts */ = {isa = PBXFileReference; lastKnownFileType = folder; name = fonts; path = ../../data/fonts; sourceTree = "<group>"; };
165953932CB44B3B00CFED7C /* symbols */ = {isa = PBXFileReference; lastKnownFileType = folder; name = symbols; path = ../../data/symbols; sourceTree = "<group>"; };
1D3623240D0F684500981E51 /* MapsAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = MapsAppDelegate.h; sourceTree = "<group>"; tabWidth = 2; };
1D3623250D0F684500981E51 /* MapsAppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MapsAppDelegate.mm; sourceTree = "<group>"; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
1DFA2F6820D3B52F00FB2C66 /* UIColor+PartnerColor.h */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = "UIColor+PartnerColor.h"; sourceTree = "<group>"; tabWidth = 2; };
@@ -1119,8 +1108,6 @@
408645FB21495EB1000A4A1D /* categories_cuisines.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = categories_cuisines.txt; path = ../../data/categories_cuisines.txt; sourceTree = "<group>"; };
44360A0C2A7D34990016F412 /* TransportRuler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TransportRuler.swift; sourceTree = "<group>"; };
44360A102A7D35440016F412 /* TransportRuler.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = TransportRuler.xib; sourceTree = "<group>"; };
4501B1922077C35A001B9173 /* resources-xxxhdpi_light */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "resources-xxxhdpi_light"; path = "../../data/resources-xxxhdpi_light"; sourceTree = "<group>"; };
4501B1932077C35A001B9173 /* resources-xxxhdpi_dark */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "resources-xxxhdpi_dark"; path = "../../data/resources-xxxhdpi_dark"; sourceTree = "<group>"; };
451950391B7A3E070085DA05 /* patterns.txt */ = {isa = PBXFileReference; lastKnownFileType = text; name = patterns.txt; path = ../../data/patterns.txt; sourceTree = "<group>"; };
452FCA3A1B6A3DF7007019AB /* colors.txt */ = {isa = PBXFileReference; lastKnownFileType = text; name = colors.txt; path = ../../data/colors.txt; sourceTree = "<group>"; };
4554B6E81E55F02B0084017F /* drules_proto_vehicle_light.bin */ = {isa = PBXFileReference; lastKnownFileType = archive.macbinary; name = drules_proto_vehicle_light.bin; path = ../../data/drules_proto_vehicle_light.bin; sourceTree = "<group>"; };
@@ -1213,15 +1200,7 @@
49AB95972CB2FE5300468EA2 /* UIButton+ImagePadding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIButton+ImagePadding.swift"; sourceTree = "<group>"; };
4A00DBDE1AB704C400113624 /* drules_proto_default_dark.bin */ = {isa = PBXFileReference; lastKnownFileType = archive.macbinary; name = drules_proto_default_dark.bin; path = ../../data/drules_proto_default_dark.bin; sourceTree = "<group>"; };
4A23D1561B8B4DD700D4EB6F /* drules_proto_default_light.bin */ = {isa = PBXFileReference; lastKnownFileType = archive.macbinary; name = drules_proto_default_light.bin; path = ../../data/drules_proto_default_light.bin; sourceTree = "<group>"; };
4A23D1571B8B4DD700D4EB6F /* resources-6plus_light */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "resources-6plus_light"; path = "../../data/resources-6plus_light"; sourceTree = "<group>"; };
4A23D1581B8B4DD700D4EB6F /* resources-mdpi_light */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "resources-mdpi_light"; path = "../../data/resources-mdpi_light"; sourceTree = "<group>"; };
4A23D1591B8B4DD700D4EB6F /* resources-xhdpi_light */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "resources-xhdpi_light"; path = "../../data/resources-xhdpi_light"; sourceTree = "<group>"; };
4A23D15A1B8B4DD700D4EB6F /* resources-xxhdpi_light */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "resources-xxhdpi_light"; path = "../../data/resources-xxhdpi_light"; sourceTree = "<group>"; };
4A300ED31C6DCFD400140018 /* countries-strings */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "countries-strings"; path = "../../data/countries-strings"; sourceTree = "<group>"; };
4A7D89C11B2EBF3B00AC843E /* resources-6plus_dark */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "resources-6plus_dark"; path = "../../data/resources-6plus_dark"; sourceTree = "<group>"; };
4A7D89C21B2EBF3B00AC843E /* resources-mdpi_dark */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "resources-mdpi_dark"; path = "../../data/resources-mdpi_dark"; sourceTree = "<group>"; };
4A7D89C31B2EBF3B00AC843E /* resources-xhdpi_dark */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "resources-xhdpi_dark"; path = "../../data/resources-xhdpi_dark"; sourceTree = "<group>"; };
4A7D89C41B2EBF3B00AC843E /* resources-xxhdpi_dark */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "resources-xxhdpi_dark"; path = "../../data/resources-xxhdpi_dark"; sourceTree = "<group>"; };
4B4153B42BF9695500EE4B02 /* MWMTextToSpeechTests.mm */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMTextToSpeechTests.mm; sourceTree = "<group>"; tabWidth = 2; };
4B83AE472C2E59F800B0C3BC /* TTSTester.h */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = TTSTester.h; sourceTree = "<group>"; tabWidth = 2; };
4B83AE482C2E59F800B0C3BC /* TTSTester.mm */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.cpp.objcpp; path = TTSTester.mm; sourceTree = "<group>"; tabWidth = 2; };
@@ -1345,7 +1324,6 @@
99F8B4C523B644A6009FF0B4 /* MapStyleSheet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapStyleSheet.swift; sourceTree = "<group>"; };
99F9A0E42462CA0E00AE21E0 /* DownloadAllView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DownloadAllView.swift; sourceTree = "<group>"; };
99F9A0E62462CA1700AE21E0 /* DownloadAllView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = DownloadAllView.xib; sourceTree = "<group>"; };
A367C93A1B17334800E2B6E7 /* resources-default */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "resources-default"; path = "../../data/resources-default"; sourceTree = "<group>"; };
A630D1E9207CA95900976DEA /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = ar; path = ar.lproj/Localizable.stringsdict; sourceTree = "<group>"; };
A630D1EB207CA96700976DEA /* cs */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = cs; path = cs.lproj/Localizable.stringsdict; sourceTree = "<group>"; };
A630D1EC207CA96D00976DEA /* da */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = da; path = da.lproj/Localizable.stringsdict; sourceTree = "<group>"; };
@@ -1551,8 +1529,6 @@
EDFE1A492DF1989700FDEA38 /* UIAlertController+UnknownCurrentPosition.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIAlertController+UnknownCurrentPosition.swift"; sourceTree = "<group>"; };
EE026F0511D6AC0D00645242 /* classificator.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = classificator.txt; path = ../../data/classificator.txt; sourceTree = SOURCE_ROOT; };
EED10A4411F78D120095FAD4 /* MapViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MapViewController.mm; sourceTree = "<group>"; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
F607C1831C032A8800B53A87 /* resources-hdpi_light */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "resources-hdpi_light"; path = "../../data/resources-hdpi_light"; sourceTree = "<group>"; };
F607C1841C032A8800B53A87 /* resources-hdpi_dark */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "resources-hdpi_dark"; path = "../../data/resources-hdpi_dark"; sourceTree = "<group>"; };
F607C18C1C047FDC00B53A87 /* MWMSegue.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = MWMSegue.h; sourceTree = "<group>"; tabWidth = 2; };
F607C18D1C047FDC00B53A87 /* MWMSegue.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; path = MWMSegue.m; sourceTree = "<group>"; tabWidth = 2; };
F623DA6A1C9C2731006A3436 /* opening_hours_how_to_edit.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = opening_hours_how_to_edit.html; path = ../../data/opening_hours_how_to_edit.html; sourceTree = "<group>"; };
@@ -3947,6 +3923,7 @@
isa = PBXGroup;
children = (
165953732CB1D83700CFED7C /* fonts */,
165953932CB44B3B00CFED7C /* symbols */,
47AEF83F2231249E00D20538 /* categories_brands.txt */,
408645FB21495EB1000A4A1D /* categories_cuisines.txt */,
FAAFD696139D9BE2000AE70C /* categories.txt */,
@@ -3968,19 +3945,6 @@
F623DA6A1C9C2731006A3436 /* opening_hours_how_to_edit.html */,
FA85F632145DDDC20090E1A0 /* packed_polygons.bin */,
451950391B7A3E070085DA05 /* patterns.txt */,
4A23D1571B8B4DD700D4EB6F /* resources-6plus_light */,
4A7D89C11B2EBF3B00AC843E /* resources-6plus_dark */,
A367C93A1B17334800E2B6E7 /* resources-default */,
F607C1831C032A8800B53A87 /* resources-hdpi_light */,
F607C1841C032A8800B53A87 /* resources-hdpi_dark */,
4A23D1581B8B4DD700D4EB6F /* resources-mdpi_light */,
4A7D89C21B2EBF3B00AC843E /* resources-mdpi_dark */,
4A23D1591B8B4DD700D4EB6F /* resources-xhdpi_light */,
4A7D89C31B2EBF3B00AC843E /* resources-xhdpi_dark */,
4A23D15A1B8B4DD700D4EB6F /* resources-xxhdpi_light */,
4A7D89C41B2EBF3B00AC843E /* resources-xxhdpi_dark */,
4501B1922077C35A001B9173 /* resources-xxxhdpi_light */,
4501B1932077C35A001B9173 /* resources-xxxhdpi_dark */,
FAAEA7D0161BD26600CCD661 /* synonyms.txt */,
BB25B1A51FB32767007276FA /* transit_colors.txt */,
FA64D9A813F975AD00350ECF /* types.txt */,
@@ -4202,6 +4166,7 @@
buildActionMask = 2147483647;
files = (
165953742CB1D85500CFED7C /* fonts in Resources */,
165953942CB44B5600CFED7C /* symbols in Resources */,
47AEF8402231249E00D20538 /* categories_brands.txt in Resources */,
F6C3A1B221AC22810060EEC8 /* Alert 5.m4a in Resources */,
3404F49A2028A20D0090E401 /* BMCCategoryCell.xib in Resources */,
@@ -4233,7 +4198,6 @@
993DF0CA23F6BD0600AC231A /* ElevationDetailsViewController.xib in Resources */,
F623DA6F1C9C2E62006A3436 /* MWMAddPlaceNavigationBar.xib in Resources */,
6741A9991BF340DE002C974C /* MWMAlertViewController.xib in Resources */,
4501B1942077C35A001B9173 /* resources-xxxhdpi_light in Resources */,
3467CEB7202C6FA900D3C670 /* BMCNotificationsCell.xib in Resources */,
4761BE2B252D3DB900EE2DE4 /* SubgroupCell.xib in Resources */,
99F9A0E72462CA1700AE21E0 /* DownloadAllView.xib in Resources */,
@@ -4304,7 +4268,6 @@
34AB66231FC5AA330078E451 /* MWMiPadRoutePreview.xib in Resources */,
BB25B1A71FB32767007276FA /* transit_colors.txt in Resources */,
34AB66681FC5AA330078E451 /* TransportTransitPedestrian.xib in Resources */,
4501B1952077C35A001B9173 /* resources-xxxhdpi_dark in Resources */,
F6D67CDE2062BBA60032FD38 /* MWMBCCreateCategoryAlert.xib in Resources */,
3490D2E31CE9DD2500D0B838 /* MWMSideButtonsView.xib in Resources */,
F6E2FE2E1E097BA00083EBEC /* MWMStreetEditorEditTableViewCell.xib in Resources */,
@@ -4312,20 +4275,9 @@
F623DA6C1C9C2731006A3436 /* opening_hours_how_to_edit.html in Resources */,
6741A9761BF340DE002C974C /* packed_polygons.bin in Resources */,
676507601C10559800830BB3 /* patterns.txt in Resources */,
6741A94A1BF340DE002C974C /* resources-6plus_light in Resources */,
9989273D2449E60200260CE2 /* BottomMenuViewController.xib in Resources */,
6741A9741BF340DE002C974C /* resources-6plus_dark in Resources */,
677A2DE21C0DD50900635A00 /* resources-default in Resources */,
F607C1881C032A8800B53A87 /* resources-hdpi_light in Resources */,
F607C18A1C032A8800B53A87 /* resources-hdpi_dark in Resources */,
FA637ED229A500BE00D8921A /* drules_proto_outdoors_light.bin in Resources */,
6741A97F1BF340DE002C974C /* resources-mdpi_light in Resources */,
6741A9901BF340DE002C974C /* resources-mdpi_dark in Resources */,
6741A9981BF340DE002C974C /* resources-xhdpi_light in Resources */,
6741A9611BF340DE002C974C /* resources-xhdpi_dark in Resources */,
6741A94D1BF340DE002C974C /* resources-xxhdpi_light in Resources */,
3404F49E2028A2430090E401 /* BMCActionsCell.xib in Resources */,
6741A9551BF340DE002C974C /* resources-xxhdpi_dark in Resources */,
44360A112A7D35440016F412 /* TransportRuler.xib in Resources */,
6741A9421BF340DE002C974C /* sound-strings in Resources */,
F69018BD1E9F7CB600B3C10B /* MWMAutoupdateController.xib in Resources */,

View File

@@ -1,7 +1,6 @@
project(platform_tests)
set(SRC
apk_test.cpp
country_file_tests.cpp
distance_tests.cpp
duration_tests.cpp

View File

@@ -1,126 +0,0 @@
#include "testing/testing.hpp"
#include "platform/platform.hpp"
#include "coding/zip_reader.hpp"
#include "coding/internal/file_data.hpp"
#include "base/file_name_utils.hpp"
#include "base/thread.hpp"
#include "base/thread_pool.hpp"
#include "base/logging.hpp"
#include <cstdint>
#include <memory>
#include <numeric>
#include <string>
namespace apk_test
{
using std::string, std::vector;
char const * arrFiles[] = {
"copyright.html",
"resources-mdpi_light/symbols.sdf",
"resources-mdpi_light/symbols.png",
"resources-hdpi_light/symbols.sdf",
"resources-hdpi_light/symbols.png",
"resources-xhdpi_light/symbols.sdf",
"resources-xhdpi_light/symbols.png",
"categories.txt",
"categories_cuisines.txt",
"classificator.txt",
"types.txt",
"fonts/blacklist.txt",
"fonts/whitelist.txt",
"fonts/unicode_blocks.txt",
"languages.txt",
"drules_proto_default_light.bin",
"packed_polygons.bin",
"countries.txt"
};
class ApkTester : public threads::IRoutine
{
static const int COUNT = ARRAY_SIZE(arrFiles);
string const & m_cont;
public:
explicit ApkTester(string const & cont) : m_cont(cont), m_hashes(COUNT)
{
}
virtual void Do()
{
string const prefix("assets/");
while (true)
{
size_t ind = rand() % COUNT;
if (m_hashes[ind] != 0)
{
ind = COUNT;
for (size_t i = 0; i < COUNT; ++i)
if (m_hashes[i] == 0)
{
ind = i;
break;
}
}
if (ind == COUNT)
break;
try
{
ZipFileReader reader(m_cont, prefix + arrFiles[ind]);
size_t const size = reader.Size();
vector<char> buffer(size);
reader.Read(0, &buffer[0], size);
m_hashes[ind] = accumulate(buffer.begin(), buffer.end(), static_cast<uint64_t>(0));
}
catch (Reader::Exception const & ex)
{
LOG(LERROR, (ex.Msg()));
break;
}
}
}
vector<uint64_t> m_hashes;
};
/*
UNIT_TEST(ApkReader_Multithreaded)
{
/// @todo Update test with current apk path.
string const path = base::JoinPath(GetPlatform().WritableDir(), "../android/MapsWithMePro/bin/MapsWithMePro-production.apk");
uint64_t size;
if (!base::GetFileSize(path, size))
{
LOG(LINFO, ("Apk not found"));
return;
}
srand(static_cast<unsigned>(size));
size_t const count = 20;
base::thread_pool::routine_simple::ThreadPool pool(count);
for (size_t i = 0; i < count; ++i)
pool.Add(make_unique<ApkTester>(path));
pool.Join();
typedef ApkTester const * PtrT;
PtrT etalon = dynamic_cast<PtrT>(pool.GetRoutine(0));
for (size_t i = 1; i < count; ++i)
{
PtrT p = dynamic_cast<PtrT>(pool.GetRoutine(i));
TEST_EQUAL(etalon->m_hashes, p->m_hashes, ());
}
*/
} // namespace apk_test

View File

@@ -68,7 +68,7 @@ UNIT_TEST(GetReader)
{
char const * NON_EXISTING_FILE = "mgbwuerhsnmbui45efhdbn34.tmp";
char const * arr[] = {
"resources-mdpi_light/symbols.sdf",
"symbols/mdpi/light/symbols.sdf",
"classificator.txt",
"minsk-pass.mwm"
};

View File

@@ -109,13 +109,7 @@ endfunction()
copy_resources(
countries-strings
fonts
resources-default
resources-mdpi_light
resources-hdpi_light
resources-xhdpi_light
resources-xxhdpi_light
resources-xxxhdpi_light
resources-6plus_light
symbols
welcome.html
categories.txt
@@ -185,12 +179,12 @@ endif()
if (BUILD_DESIGNER)
execute_process(
COMMAND cp -rf ${OMIM_ROOT}/data/resources-mdpi_light/ ${OMIM_ROOT}/data/resources-mdpi_design/
COMMAND cp -rf ${OMIM_ROOT}/data/resources-hdpi_light/ ${OMIM_ROOT}/data/resources-hdpi_design/
COMMAND cp -rf ${OMIM_ROOT}/data/resources-xhdpi_light/ ${OMIM_ROOT}/data/resources-xhdpi_design/
COMMAND cp -rf ${OMIM_ROOT}/data/resources-xxhdpi_light/ ${OMIM_ROOT}/data/resources-xxhdpi_design/
COMMAND cp -rf ${OMIM_ROOT}/data/resources-6plus_light/ ${OMIM_ROOT}/data/resources-6plus_design/
COMMAND cp -rf ${OMIM_ROOT}/data/resources-xxxhdpi_light/ ${OMIM_ROOT}/data/resources-xxxhdpi_design/
COMMAND cp -rf ${OMIM_ROOT}/data/symbols/mdpi/light/ ${OMIM_ROOT}/data/symbols/mdpi/design/
COMMAND cp -rf ${OMIM_ROOT}/data/symbols/hdpi/light/ ${OMIM_ROOT}/data/symbols/hdpi/design/
COMMAND cp -rf ${OMIM_ROOT}/data/symbols/xhdpi/light/ ${OMIM_ROOT}/data/symbols/xhdpi/design/
COMMAND cp -rf ${OMIM_ROOT}/data/symbols/xxhdpi/light/ ${OMIM_ROOT}/data/symbols/xxhdpi/design/
COMMAND cp -rf ${OMIM_ROOT}/data/symbols/6plus/light/ ${OMIM_ROOT}/data/symbols/6plus/design/
COMMAND cp -rf ${OMIM_ROOT}/data/symbols/xxxhdpi/light/ ${OMIM_ROOT}/data/symbols/xxxhdpi/design/
COMMAND cp -f ${OMIM_ROOT}/data/drules_proto_default_light.bin ${OMIM_ROOT}/data/drules_proto_default_design.bin
COMMAND cp -f ${OMIM_ROOT}/data/colors.txt ${OMIM_ROOT}/data/colors_design.txt
COMMAND cp -f ${OMIM_ROOT}/data/patterns.txt ${OMIM_ROOT}/data/patterns_design.txt
@@ -202,12 +196,12 @@ if (BUILD_DESIGNER)
mapcss-dynamic.txt
mapcss-mapping.csv
patterns_design.txt
resources-mdpi_design
resources-hdpi_design
resources-xhdpi_design
resources-xxhdpi_design
resources-xxxhdpi_design
resources-6plus_design
symbols/mdpi/design
symbols/hdpi/design
symbols/xhdpi/design
symbols/xxhdpi/design
symbols/xxxhdpi/design
symbols/6plus/design
)
execute_process(

View File

@@ -177,7 +177,7 @@ void BuildSkins(QString const & styleDir, QString const & outputDir)
for (SkinType s : g_skinTypes)
{
QString const suffix = SkinSuffix(s);
QString const outputSkinDir = JoinPathQt({outputDir, "resources-" + suffix + "_design"});
QString const outputSkinDir = JoinPathQt({outputDir, "symbols", suffix, "design"});
int const size = resolution2size.at(suffix.toStdString()); // SkinSize(s);
bool const colorCorrection = SkinCoorrectColor(s);
@@ -192,8 +192,8 @@ void ApplySkins(QString const & outputDir)
for (SkinType s : g_skinTypes)
{
QString const suffix = SkinSuffix(s);
QString const outputSkinDir = JoinPathQt({outputDir, "resources-" + suffix + "_design"});
QString const resourceSkinDir = JoinPathQt({resourceDir, "resources-" + suffix + "_design"});
QString const outputSkinDir = JoinPathQt({outputDir, "symbols", suffix, "design"});
QString const resourceSkinDir = JoinPathQt({resourceDir, "symbols", suffix, "design"});
if (!QFileInfo::exists(resourceSkinDir) && !QDir().mkdir(resourceSkinDir))
throw std::runtime_error("Cannot create resource skin directory: " + resourceSkinDir.toStdString());

View File

@@ -67,44 +67,39 @@ function BuildSkin() {
ln -s "$STYLE_PATH/$resourceName$symbolsSuffix" "$PNG_PATH"
# Run skin generator
"$SKIN_GENERATOR" --symbolWidth $symbolSize --symbolHeight $symbolSize --symbolsDir "$STYLE_PATH/$symbolsFolder" \
--skinName "$DATA_PATH/resources-$resourceName$suffix/basic" --skinSuffix="$symbolsSuffix"
--skinName "$DATA_PATH/symbols/$resourceName/$suffix/basic" --skinSuffix="$symbolsSuffix"
# Reset environment
rm -r "$PNG_PATH" || true
}
symbols_name=(6plus mdpi hdpi xhdpi xxhdpi xxxhdpi)
# Cleanup
cleanup=(resources-{{6plus,mdpi,hdpi,xhdpi,xxhdpi,xxxhdpi}{_dark,_light}})
for item in ${cleanup[*]}
do
rm -rf "$DATA_PATH/$item" || true
mkdir "$DATA_PATH/$item"
done
rm -rf "$DATA_PATH"/symbols/*/*/symbols.*
# Build styles
BuildSkin default dark mdpi 18 _dark symbols
BuildSkin default dark hdpi 27 _dark symbols
BuildSkin default dark xhdpi 36 _dark symbols
BuildSkin default dark 6plus 43 _dark symbols
BuildSkin default dark xxhdpi 54 _dark symbols
BuildSkin default dark xxxhdpi 64 _dark symbols
BuildSkin default dark mdpi 18 dark symbols
BuildSkin default dark hdpi 27 dark symbols
BuildSkin default dark xhdpi 36 dark symbols
BuildSkin default dark 6plus 43 dark symbols
BuildSkin default dark xxhdpi 54 dark symbols
BuildSkin default dark xxxhdpi 64 dark symbols
BuildSkin default light mdpi 18 _light symbols
BuildSkin default light hdpi 27 _light symbols
BuildSkin default light xhdpi 36 _light symbols
BuildSkin default light 6plus 43 _light symbols
BuildSkin default light xxhdpi 54 _light symbols
BuildSkin default light xxxhdpi 64 _light symbols
BuildSkin default light mdpi 18 light symbols
BuildSkin default light hdpi 27 light symbols
BuildSkin default light xhdpi 36 light symbols
BuildSkin default light 6plus 43 light symbols
BuildSkin default light xxhdpi 54 light symbols
BuildSkin default light xxxhdpi 64 light symbols
rm -rf "$OMIM_PATH"/data/resources-{*}
rm -rf "$OMIM_PATH"/data/resources-*_design
for i in mdpi hdpi xhdpi xxhdpi xxxhdpi 6plus; do
optipng -zc9 -zm8 -zs0 -f0 "$OMIM_PATH"/data/resources-${i}_light/symbols.png
optipng -zc9 -zm8 -zs0 -f0 "$OMIM_PATH"/data/resources-${i}_dark/symbols.png
for i in ${symbols_name[*]}; do
optipng -zc9 -zm8 -zs0 -f0 "$DATA_PATH"/symbols/"${i}"/light/symbols.png
optipng -zc9 -zm8 -zs0 -f0 "$DATA_PATH"/symbols/"${i}"/dark/symbols.png
done
for i in mdpi hdpi xhdpi xxhdpi xxxhdpi 6plus; do
cp -r "$OMIM_PATH"/data/resources-${i}_light/ "$OMIM_PATH"/data/resources-${i}_design/
rm -rf "$DATA_PATH"/symbols/*/design/
for i in ${symbols_name[*]}; do
cp -r "$DATA_PATH"/symbols/"${i}"/light/ "$DATA_PATH"/symbols/"${i}"/design/
done