renamed to hpemung

This commit is contained in:
Gwenhael Le Moine 2024-04-15 13:59:42 +02:00
parent 87765b2b92
commit 21e5e00cf1
No known key found for this signature in database
GPG key ID: FDFE3669426707A7
9 changed files with 28 additions and 31 deletions

4
.gitignore vendored
View file

@ -1,4 +1,2 @@
/src/*.o
/dist/hpemu
/dist/port*
/dist/ram
/dist/hpemung

View file

@ -1,5 +1,5 @@
PREFIX = /usr
DOCDIR = $(PREFIX)/doc/hpemu
DOCDIR = $(PREFIX)/doc/hpemung
CC = gcc
LIBS = $(shell pkg-config --libs sdl2 SDL2_ttf)
@ -7,9 +7,9 @@ CFLAGS = -Wall -Werror -O3 -Wno-error=unused-function -Wno-error=unused-variable
.PHONY: all clean clean-all pretty-code install mrproper get-roms
all: dist/hpemu
all: dist/hpemung
dist/hpemu: src/bus.o \
dist/hpemung: src/bus.o \
src/cpu.o \
src/display.o \
src/emulator.o \
@ -30,7 +30,7 @@ clean:
-rm src/*.o
mrproper: clean
-rm dist/hpemu
-rm dist/hpemung
clean-all: mrproper
@ -44,16 +44,16 @@ get-roms:
install: all get-roms
install -m 755 -d -- $(DESTDIR)$(PREFIX)/bin
install -c -m 755 dist/hpemu $(DESTDIR)$(PREFIX)/bin/hpemu
install -c -m 755 dist/hpemung $(DESTDIR)$(PREFIX)/bin/hpemung
install -m 755 -d -- $(DESTDIR)$(PREFIX)/share/hpemu
install -c -m 644 dist/hplogo.png $(DESTDIR)$(PREFIX)/share/hpemu/hplogo.png
cp -R dist/ROMs/ $(DESTDIR)$(PREFIX)/share/hpemu/
sed "s|@PREFIX@|$(PREFIX)|g" dist/setup-hpemu-home.sh > $(DESTDIR)$(PREFIX)/share/hpemu/setup-hpemu-home.sh
chmod 755 $(DESTDIR)$(PREFIX)/share/hpemu/setup-hpemu-home.sh
install -m 755 -d -- $(DESTDIR)$(PREFIX)/share/hpemung
install -c -m 644 dist/hplogo.png $(DESTDIR)$(PREFIX)/share/hpemung/hplogo.png
cp -R dist/ROMs/ $(DESTDIR)$(PREFIX)/share/hpemung/
sed "s|@PREFIX@|$(PREFIX)|g" dist/setup-hpemung-home.sh > $(DESTDIR)$(PREFIX)/share/hpemung/setup-hpemung-home.sh
chmod 755 $(DESTDIR)$(PREFIX)/share/hpemung/setup-hpemung-home.sh
install -m 755 -d -- $(DESTDIR)$(DOCDIR)
cp -R ./*.txt $(DESTDIR)$(DOCDIR)
install -m 755 -d -- $(DESTDIR)$(PREFIX)/share/applications
sed "s|@PREFIX@|$(PREFIX)|g" dist/hpemu.desktop > $(DESTDIR)$(PREFIX)/share/applications/hpemu.desktop
sed "s|@PREFIX@|$(PREFIX)|g" dist/hpemung.desktop > $(DESTDIR)$(PREFIX)/share/applications/hpemung.desktop

View file

@ -3,7 +3,7 @@ Encoding=UTF-8
Version=1.0
Type=Application
Terminal=false
Exec=@PREFIX@/bin/hpemu
Name=hpemu
Exec=@PREFIX@/bin/hpemung
Name=hpemung
Icon=@PREFIX@/share/hpemu/hplogo.png
Categories=Utility;

1
dist/rom vendored
View file

@ -1 +0,0 @@
../ROMs/gxrom-r

View file

@ -1,11 +0,0 @@
#!/usr/bin/env sh
DOTHPEMU=${DOTHPEMU:-.config/hpemu}
ROM=${ROM:-gxrom-r}
mkdir -p ~/"${DOTHPEMU}"
[ -e ~/"${DOTHPEMU}"/rom ] && rm ~/"${DOTHPEMU}"/rom
ln -s @PREFIX@/share/hpemu/ROMs/"$ROM" ~/"${DOTHPEMU}"/rom
cd ~/"${DOTHPEMU}"

11
dist/setup-hpemung-home.sh vendored Executable file
View file

@ -0,0 +1,11 @@
#!/usr/bin/env sh
DOTHPEMUNG=${DOTHPEMUNG:-.config/hpemung}
ROM=${ROM:-gxrom-r}
mkdir -p ~/"${DOTHPEMUNG}"
[ -e ~/"${DOTHPEMUNG}"/rom ] && rm ~/"${DOTHPEMUNG}"/rom
ln -s @PREFIX@/share/hpemung/ROMs/"$ROM" ~/"${DOTHPEMUNG}"/rom
cd ~/"${DOTHPEMUNG}"

View file

@ -1,7 +1,7 @@
#include "config.h"
Config config = {
.progname = "hpemu",
.progname = "hpemung",
.ui_font = "/usr/share/fonts/TTF/unifont.ttf",
.real_speed = true,
.verbose = true,

View file

@ -45,7 +45,7 @@ void emulator_init( char* fn_rom, char* fn_ram, char* fn_port1, char* fn_port2 )
{
static bool locked = false;
get_absolute_working_dir_path( "hpemu" );
get_absolute_working_dir_path( "hpemung" );
rom_init( fn_rom );
ram_init( fn_ram );
ports_init( fn_port1, fn_port2 );

View file

@ -1509,7 +1509,7 @@ bool gui_init( void )
int window_width = ( LCD_WIDTH + ( 2 * UI_PADDING ) ) * UI_SCALE;
int window_height = ( UI_KB_OFFSET_Y + UI_KB_HEIGHT ) + 2 * UI_PADDING;
window = SDL_CreateWindow( "hpemu", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, window_width, window_height, SDL_WINDOW_SHOWN );
window = SDL_CreateWindow( "hpemung", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, window_width, window_height, SDL_WINDOW_SHOWN );
if ( window == NULL ) {
printf( "Window could not be created! SDL_Error: %s\n", SDL_GetError() );
return false;