assetmanager: rename icons dir to markers, symlink
This fixes a name collision with Apache's default config. Closes #1773. Install nginx already.
@@ -156,7 +156,7 @@ Here is a more complex example where not every marker of a certain id has a cert
|
||||
'y':85,
|
||||
'z':-234,
|
||||
'name':'Bar'}],
|
||||
'markers': [dict(name="Towns", filterFunction=townFilter, icon="icons/marker_town.png")],
|
||||
'markers': [dict(name="Towns", filterFunction=townFilter, icon="markers/marker_town.png")],
|
||||
### Note: The 'icon' parameter allows you to specify a custom icon, as per
|
||||
### standard markers. This icon must exist in the same folder as your
|
||||
### custom webassets or in the same folder as the generated index.html
|
||||
@@ -271,7 +271,7 @@ Marker Icons Overviewer ships by default
|
||||
========================================
|
||||
|
||||
Overviewer comes with multiple small icons that you can use for your markers.
|
||||
You can find them in the ``overviewer_core/data/web_assets/icons`` directory.
|
||||
You can find them in the ``overviewer_core/data/web_assets/markers`` directory.
|
||||
|
||||
If you want to make your own in the same style, you can use the provided
|
||||
``marker_base_plain.svg`` and ``marker_base_plain_red.svg`` as template, with
|
||||
|
||||
@@ -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):
|
||||
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 948 B After Width: | Height: | Size: 948 B |
|
Before Width: | Height: | Size: 948 B After Width: | Height: | Size: 948 B |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1020 B After Width: | Height: | Size: 1020 B |
|
Before Width: | Height: | Size: 826 B After Width: | Height: | Size: 826 B |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 773 B After Width: | Height: | Size: 773 B |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |