This extension for RetroShare shows your friends on a map or globe.
This product uses GeoLite data created by MaxMind.
- Shows your friends on an interactive globe or flat map (based on Marble)
- Locates friends by their public IPv4 address using a GeoIP City database
- Every location (node) of a friend is shown with its name
- Online friends are drawn in green, offline friends in red
- Optional friend avatars on the map
- Optional links between friends who know each other (from RetroShare discovery)
- Three projections: Spherical (globe), Equirectangular and Mercator
- Several map themes: Blue Marble, OpenStreetMap, City Lights, Schagen 1689 and Plain, or any other Marble theme
- Optional map layers: grid, borders, cities, ice, clouds, city lights and sun shading (day/night)
- Settings apply immediately and are saved
- Optional standalone window: the map only opens on request and uses no resources while closed
- Finds Marble and the GeoIP data automatically; paths can also be set by hand
Qt version: the plugin, RetroShare and Marble must all use the same Qt major version. A Qt 5 RetroShare cannot load a Qt 6 Marble, and the other way round.
Qt Marble Library linked Qt 6 current Marble (KDE Gear 24.02 and later) libmarblewidget-qt6Qt 5 Marble release/23.08(last Qt 5 series)libmarblewidget-qt5
FriendMap.propicks the right library automatically from the Qt version of theqmakeyou run.
sudo apt-get install qt6-base-dev qt6-svg-dev libmarble-dev libgeoip-devRecent distributions (Debian 13, Ubuntu 25.04 and later) ship Marble built with Qt 6
(libmarblewidget-qt6). Check with:
ls /usr/lib/*/libmarblewidget-qt*If your distribution only has libmarblewidget-qt5, build RetroShare and the plugin with Qt 5
instead (use qmake / qmake-qt5 in the steps below).
To build Marble with Qt 6 from source instead:
git clone https://invent.kde.org/education/marble.git
cd marble && mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local \
-DBUILD_MARBLE_APPS=OFF -DBUILD_MARBLE_TESTS=OFF -DBUILD_MARBLE_EXAMPLES=OFF
make -j$(nproc)
sudo make installcd RetroShare/plugins/
git clone https://github.com/RetroShare/FriendsMap.git FriendsMapRetroShare itself must also be built with Qt 6.
cd FriendsMap
qmake6
make clean
makecp libFriendMap.so.1.0.0 ~/.retroshare/extensions/libFriendMap.soThe steps below use Qt 5. For Qt 6, see Windows with Qt 6 at the end of this section.
All commands below are run in the MSYS2 MINGW64 shell.
FriendMap.pro expects GeoIP and Marble to sit next to the RetroShare checkout:
GitHub/
├── RetroShare/
│ └── plugins/FriendsMap/
├── geoip-api-c/
└── marble/
├── build/
└── install/ <- created by "make install"
pacman -S --needed mingw-w64-x86_64-cmake mingw-w64-x86_64-extra-cmake-modules \
mingw-w64-x86_64-qt5-base mingw-w64-x86_64-qt5-svg \
mingw-w64-x86_64-qt5-tools mingw-w64-x86_64-qt5-declarativeOnly the source files are needed — the plugin compiles GeoIP.c, GeoIPCity.c and
GeoIP_deprecated.c directly, so there is no need to build the library.
cd /c/Users/<you>/Documents/GitHub
git clone https://github.com/maxmind/geoip-api-c.gitcd /c/Users/<you>/Documents/GitHub
git -c core.autocrlf=false clone --branch release/23.08 --depth 1 \
https://invent.kde.org/education/marble.git marble
cd marble
mkdir build && cd build
cmake .. -G "MSYS Makefiles" \
-DCMAKE_BUILD_TYPE=Release \
-DQT_MAJOR_VERSION=5 \
-DCMAKE_INSTALL_PREFIX=/c/Users/<you>/Documents/GitHub/marble/install \
-DCMAKE_DISABLE_FIND_PACKAGE_Protobuf=TRUE \
-DBUILD_MARBLE_APPS=OFF -DBUILD_MARBLE_TESTS=OFF -DBUILD_MARBLE_EXAMPLES=OFF
make -j8
make installNotes:
- Check the CMake output says it found Qt5. If it picks Qt 6, delete
build/and try again. - If you already have a Marble checkout on master, switching with
git checkout release/23.08can fail with "Your local changes ... would be overwritten" (usually only line endings). Simplest fix: delete themarblefolder and clone again with the command above. - If a configure step failed, remove
build/CMakeCache.txtandbuild/CMakeFilesbefore runningcmakeagain. -DCMAKE_DISABLE_FIND_PACKAGE_Protobuf=TRUEbuilds Marble's OSM plugin without.osm.pbfsupport (FriendsMap does not need it). Marble 23.08 does not link with the current MSYS2 protobuf; without this option the build stops with *"undefined reference to__emutls_v._ZN6google8protobuf8internal15ThreadSafeArena13thread_cache_E'"* inOsmPlugin.dll`.- Always set
CMAKE_INSTALL_PREFIX. Without it Marble tries to install intoC:\Program Files (x86)\marbleand fails with "Maybe need administrative privileges". make installis required: it collects the headers intoinstall/include/marble/and copies the generatedmarble_export.h. Without it you getfatal error: marble/MarbleWidget.h: No such file or directory.
After installing you should have:
marble/install/include/marble/MarbleWidget.h
marble/install/lib/libmarblewidget-qt5.dll.a
Only use this if RetroShare itself is built with Qt 6.
Dependencies:
pacman -S --needed mingw-w64-x86_64-cmake mingw-w64-x86_64-extra-cmake-modules \
mingw-w64-x86_64-qt6-base mingw-w64-x86_64-qt6-svg \
mingw-w64-x86_64-qt6-tools mingw-w64-x86_64-qt6-declarativeBuild Marble from master (no branch checkout, no QT_MAJOR_VERSION):
cd /c/Users/<you>/Documents/GitHub/marble
git checkout master
rm -rf build && mkdir build && cd build
cmake .. -G "MSYS Makefiles" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/c/Users/<you>/Documents/GitHub/marble/install \
-DBUILD_MARBLE_APPS=OFF -DBUILD_MARBLE_TESTS=OFF -DBUILD_MARBLE_EXAMPLES=OFF
make -j8
make installThis gives install/lib/libmarblewidget-qt6.dll.a. Build the plugin with the Qt 6 qmake
(qmake6) instead of qmake; everything else is the same.
Add the plugin to RetroShare/plugins/plugins.pro:
FriendsMap \
Or build it on its own:
cd RetroShare/plugins/FriendsMap
qmake # Qt 5 (use qmake6 for Qt 6)
mingw32-makeRe-run qmake whenever FriendMap.pro or the Marble paths change.
In Qt Creator open RetroShare.pro (not FriendMap.pro); you can then rebuild only this plugin once
the other RetroShare components are built.
Run the deploy script from the FriendsMap folder (in a normal cmd window):
deploy-friendsmap.bat "C:\path\to\RetroShare"(the folder that contains retroshare.exe). It copies:
- the plugin DLL to
Data\extensions6(portable) or%APPDATA%\RetroShare\extensions6, - the Marble DLLs next to
retroshare.exe, - Marble
dataandpluginstoRetroShare\marble\, - missing MinGW/Qt runtime DLLs from MSYS2 (found with
ldd), GeoLiteCity.datto the extensions folder (downloaded once, see below).
Edit MSYS2_DIR / MARBLE_DIR at the top of the script if your paths differ.
MaxMind no longer publishes the legacy GeoLiteCity.dat. The plugin still uses the legacy
GeoIP format, so use a GeoLite2 database converted to legacy format, e.g. from
https://www.miyuru.lk/geoiplegacy — City, MaxMind, IPv4 (maxmind4.dat.gz).
Unpack it and rename it to GeoLiteCity.dat. The deploy script does this automatically and keeps a
copy next to the script; delete that copy to get a newer one.
Attribution: Geolocation database of MaxMind converted by Miyuru Sankalpa.
Start RetroShare. The first start can be slow. If needed, set the correct paths under Options → FriendMap.
FriendMap needs Marble's data and plugins. Either ask users to install Marble, or ship these files with RetroShare:
- Create a
marblefolder inside the RetroShare folder. - Copy
marble\install\datatoRetroShare\marble\data. - Copy
marble\install\pluginstoRetroShare\marble\plugins. marble.exeand the other Marble apps are not needed.
- Nyfor — original author
- Chozabu — updates and maintenance
Contributors:
- Morpheus Being
- hunbernd