saturn49g

This commit is contained in:
Gwenhael Le Moine 2024-08-25 17:39:50 +02:00
parent a71472b997
commit 63ee568e9f
No known key found for this signature in database
GPG key ID: FDFE3669426707A7
5 changed files with 45 additions and 15 deletions

View file

@ -146,6 +146,8 @@ install: dist/saturn dist/pack dist/saturn.cat dist/Saturn.ad manual
install -c -m 755 dist/saturn $(DESTDIR)$(PREFIX)/bin/saturn
sed "s|@PREFIX@|$(PREFIX)|g" dist/saturn48gx > $(DESTDIR)$(PREFIX)/bin/saturn48gx
chmod 755 $(DESTDIR)$(PREFIX)/bin/saturn48gx
sed "s|@PREFIX@|$(PREFIX)|g" dist/saturn49g > $(DESTDIR)$(PREFIX)/bin/saturn49g
chmod 755 $(DESTDIR)$(PREFIX)/bin/saturn49g
install -c -m 644 dist/saturn.cat $(DESTDIR)$(PREFIX)/bin/saturn.cat #FIXME
# install -m 755 -d -- $(DESTDIR)$(PREFIX)/share/locale/C/LC_MESSAGES
@ -164,3 +166,4 @@ install: dist/saturn dist/pack dist/saturn.cat dist/Saturn.ad manual
install -m 755 -d -- $(DESTDIR)$(PREFIX)/share/applications
sed "s|@PREFIX@|$(PREFIX)|g" dist/saturn48gx.desktop > $(DESTDIR)$(PREFIX)/share/applications/saturn48gx.desktop
sed "s|@PREFIX@|$(PREFIX)|g" dist/saturn49g.desktop > $(DESTDIR)$(PREFIX)/share/applications/saturn49g.desktop

23
dist/ROMs/Makefile vendored
View file

@ -1,22 +1,11 @@
.PHONY: get-roms mrproper
get-roms: sxrom-a sxrom-b sxrom-c sxrom-d sxrom-e sxrom-j gxrom-l gxrom-m gxrom-p gxrom-r
get-roms: gxrom-l gxrom-m gxrom-p gxrom-r
mrproper:
-rm sxrom-a sxrom-b sxrom-c sxrom-d sxrom-e sxrom-j gxrom-l gxrom-m gxrom-p gxrom-r
rm -f gxrom-l gxrom-m gxrom-p gxrom-r
sxrom-a:
curl "https://www.hpcalc.org/hp48/pc/emulators/sxrom-a.zip" --output - | funzip > "sxrom-a"
sxrom-b:
curl "https://www.hpcalc.org/hp48/pc/emulators/sxrom-b.zip" --output - | funzip > "sxrom-b"
sxrom-c:
curl "https://www.hpcalc.org/hp48/pc/emulators/sxrom-c.zip" --output - | funzip > "sxrom-c"
sxrom-d:
curl "https://www.hpcalc.org/hp48/pc/emulators/sxrom-d.zip" --output - | funzip > "sxrom-d"
sxrom-e:
curl "https://www.hpcalc.org/hp48/pc/emulators/sxrom-e.zip" --output - | funzip > "sxrom-e"
sxrom-j:
curl "https://www.hpcalc.org/hp48/pc/emulators/sxrom-j.zip" --output - | funzip > "sxrom-j"
# HP 48Gx
gxrom-l:
curl "https://www.hpcalc.org/hp48/pc/emulators/gxrom-l.zip" --output - | funzip > "gxrom-l"
gxrom-m:
@ -25,3 +14,9 @@ gxrom-p:
curl "https://www.hpcalc.org/hp48/pc/emulators/gxrom-p.zip" --output - | funzip > "gxrom-p"
gxrom-r:
curl "https://www.hpcalc.org/hp48/pc/emulators/gxrom-r.zip" --output - | funzip > "gxrom-r"
# HP 49
rom.49g:
curl "https://www.hpcalc.org/hp49/pc/rom/beta1196.zip" --output rom-49g.zip
unzip rom-49g.zip rom.49g
rm rom-49g.zip

2
dist/saturn48gx vendored
View file

@ -25,4 +25,4 @@ fi
# export XAPPLRESDIR=/etc/X11/app-defaults/
# export NLSPATH=@PREFIX@/share/locale/C/LC_MESSAGES/
@PREFIX@/bin/saturn -face hp48 -hw hp48 -stateDir "$STATEDIR" -rom gxrom-r $RAM -port1 port1 -port2 port2
@PREFIX@/bin/saturn -face hp48 -hw hp48 -stateDir "$STATEDIR" -rom gxrom-r $RAM -port1 port1 -port2 port2 "$@"

23
dist/saturn49g vendored Executable file
View file

@ -0,0 +1,23 @@
#!/bin/bash -eu
STATE_HOME=${XDG_STATE_HOME:-$HOME/.local/state}
STATEDIR=$STATE_HOME/saturn/49g
mkdir -p "$STATEDIR"
if [ ! -e "$STATEDIR"/rom.49g ]; then
if [ ! -d @PREFIX@/share/saturn/ROMs/ ]; then
echo "Error: No ROMs/ dir found"
exit 1
fi
cp -R @PREFIX@/share/saturn/ROMs/ "$STATEDIR"/ROMs
make -C "$STATEDIR"/ROMs get-roms
cp "$STATEDIR"/ROMs/rom.49g "$STATEDIR"/rom.49g
fi
RAM=''
if [ ! -e "$STATEDIR"/ram ]; then
RAM=-reset
fi
@PREFIX@/bin/saturn -face hp49 -hw hp49 -stateDir "$STATEDIR" -rom rom.49g $RAM "$@"

9
dist/saturn49g.desktop vendored Normal file
View file

@ -0,0 +1,9 @@
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Terminal=false
Exec=@PREFIX@/bin/saturn49g
Name=saturn49g
Icon=@PREFIX@/share/saturn/hplogo.png
Categories=Utility;