0

assetmanager: rename icons dir to markers, symlink

This fixes a name collision with Apache's default config.

Closes #1773. Install nginx already.
This commit is contained in:
Nicolas F
2020-06-24 17:57:12 +02:00
parent 07e6be4b43
commit cadb24a015
22 changed files with 14 additions and 6 deletions

View File

@@ -98,10 +98,10 @@ top-level directory.
'defaultMarker': 'signpost.png',
'signMarker': 'signpost_icon.png',
'bedMarker': 'bed.png',
'spawnMarker': 'icons/marker_home.png',
'spawnMarker2x': 'icons/marker_home_2x.png',
'queryMarker': 'icons/marker_location.png',
'queryMarker2x': 'icons/marker_location_2x.png'
'spawnMarker': 'markers/marker_home.png',
'spawnMarker2x': 'markers/marker_home_2x.png',
'queryMarker': 'markers/marker_location.png',
'queryMarker2x': 'markers/marker_location_2x.png'
}
dump['CONST']['mapDivId'] = 'mcmap'
dump['CONST']['UPPERLEFT'] = world.UPPER_LEFT
@@ -174,6 +174,14 @@ top-level directory.
mirror_dir(self.custom_assets_dir, self.outputdir, capabilities=self.fs_caps,
force_writable=True)
# symlink old icons dir because apache sux
if (os.name == "posix" and os.symlink in os.supports_dir_fd and
not os.path.islink(os.path.join(self.outputdir, "icons"))):
od_fd = os.open(self.outputdir, os.O_DIRECTORY)
try:
os.symlink("markers", "icons", target_is_directory=True, dir_fd=od_fd)
finally:
os.close(od_fd)
# write a dummy baseMarkers.js if none exists
basemarkers_path = os.path.join(self.outputdir, "baseMarkers.js")
if not os.path.exists(basemarkers_path):

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

Before

Width:  |  Height:  |  Size: 948 B

After

Width:  |  Height:  |  Size: 948 B

View File

Before

Width:  |  Height:  |  Size: 948 B

After

Width:  |  Height:  |  Size: 948 B

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1020 B

After

Width:  |  Height:  |  Size: 1020 B

View File

Before

Width:  |  Height:  |  Size: 826 B

After

Width:  |  Height:  |  Size: 826 B

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 773 B

After

Width:  |  Height:  |  Size: 773 B

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB