Merge branch 'tasiaiso-nix'

This commit is contained in:
Tasia Iso 2025-02-23 22:37:26 +01:00
commit 1e2b0dda2f
Signed by: tasiaiso
SSH key fingerprint: SHA256:KiRjUay5C9i6objsEOIycygBHn54pDBB3Lj7fyJ0Elw
3 changed files with 37 additions and 2 deletions

View file

@ -74,6 +74,17 @@ As WSL does not have an X server built in, you will need to install a 3rd party
```
* Start viz1090 as described below.
#### Nix
Run without installing
```bash
nix shell git+https://git.vulpecula.zone/tasiaiso/viz1090
```
TODO docs
A shell is now open with viz1090 in the path
### RUNNING
1. Start dump1090 (http://www.github.com/MalcolmRobb/dump1090) locally in network mode:

View file

@ -49,7 +49,6 @@ in
cp ${provinces}/* mapdata
cp ${places}/* mapdata
cp ${airports}/* mapdata
# ls -al mapdata
python3 mapconverter.py \
--mapfile mapdata/ne_10m_admin_1_states_provinces.shp \
@ -59,11 +58,13 @@ in
'';
installPhase = ''
mkdir -p $out
mkdir -p $out $out/font
cp airportdata.bin $out
cp airportnames $out
cp mapdata.bin $out
cp mapnames $out
cp font/* $out/font
'';
}

View file

@ -79,6 +79,29 @@ index cd798ec..c5736bd 100644
while (std::getline(infile, line))
diff --git a/View.cpp b/View.cpp
index d5dace7..90f6165 100644
--- a/View.cpp
+++ b/View.cpp
@@ -174,13 +174,13 @@ void View::closeFont(TTF_Font *font)
void View::font_init() {
- mapFont = loadFont(\"font/TerminusTTF-4.46.0.ttf\", 12 * screen_uiscale);
- mapBoldFont = loadFont(\"font/TerminusTTF-Bold-4.46.0.ttf\", 12 * screen_uiscale);
+ mapFont = loadFont(\"${viz1090-mapdata}/font/TerminusTTF-4.46.0.ttf\", 12 * screen_uiscale);
+ mapBoldFont = loadFont(\"${viz1090-mapdata}/font/TerminusTTF-Bold-4.46.0.ttf\", 12 * screen_uiscale);
- listFont = loadFont(\"font/TerminusTTF-4.46.0.ttf\", 12 * screen_uiscale);
+ listFont = loadFont(\"${viz1090-mapdata}/font/TerminusTTF-4.46.0.ttf\", 12 * screen_uiscale);
- messageFont = loadFont(\"font/TerminusTTF-Bold-4.46.0.ttf\", 12 * screen_uiscale);
- labelFont = loadFont(\"font/TerminusTTF-Bold-4.46.0.ttf\", 12 * screen_uiscale);
+ messageFont = loadFont(\"${viz1090-mapdata}/font/TerminusTTF-Bold-4.46.0.ttf\", 12 * screen_uiscale);
+ labelFont = loadFont(\"${viz1090-mapdata}/font/TerminusTTF-Bold-4.46.0.ttf\", 12 * screen_uiscale);
mapFontWidth = 5 * screen_uiscale;
mapFontHeight = 12 * screen_uiscale;
" | git apply -
cat Map.cpp | grep mapdata