Update README.md and fix icon path

This commit is contained in:
rdanbrook 2021-03-21 16:33:20 -04:00
parent 80ec3ea21f
commit d8ef374c54
2 changed files with 15 additions and 7 deletions

View file

@ -4,9 +4,7 @@ Linux port. The purpose of the project is to make sure people who want
a standalone GUI for the Nestopia emulator have this option available.
Current Project Goals:
* Move the GTK build to a simple UI on top of a community maintained core
* Merge win32 sources back into main project and set up CI builds for Windows binaries
* Allow loading different forks/revisions of the emulator core (Maybe)
* Maintain a functional GUI for the Nestopia emulator on Linux, BSD, and Windows platforms
Contributing/Issues:
* Contributions will be reviewed for anything related to the standalone GUI builds
@ -22,15 +20,15 @@ libretro community. For libretro-specific issues, please use the libretro reposi
https://github.com/libretro/nestopia
This project depends on the following libraries:
gtk3, libsdl2, libepoxy, libarchive, zlib
FLTK 1.3, SDL2, libarchive, zlib
## Installing Dependencies
Install dependencies required for building on Debian-based Linux distributions:
```
apt-get install build-essential autoconf autoconf-archive automake autotools-dev libgtk-3-dev libsdl2-dev libepoxy-dev libarchive-dev zlib1g-dev
apt-get install build-essential autoconf autoconf-archive automake autotools-dev libfltk1.3-dev libsdl2-dev libarchive-dev zlib1g-dev
```
## GTK Build
## FLTK Build
To build using Autotools (optional arguments in square brackets):
```
autoreconf -vif

View file

@ -21,6 +21,7 @@
*/
#include <cstdio>
#include <sys/stat.h>
#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
@ -301,7 +302,16 @@ static void fltkui_about(Fl_Widget* w, void* userdata) {
Fl_Box text5(0, 360, 460, 24, "Icon based on drawing by Trollekop");
text5.labelsize(10);
Fl_PNG_Image nsticon("nestopia.png");
// Set up the icon
char iconpath[512];
snprintf(iconpath, sizeof(iconpath), "%s/icons/hicolor/128x128/apps/nestopia.png", DATAROOTDIR);
// Load the SVG from local source dir if make install hasn't been done
struct stat svgstat;
if (stat(iconpath, &svgstat) == -1) {
snprintf(iconpath, sizeof(iconpath), "icons/128/nestopia.png");
}
Fl_PNG_Image nsticon(iconpath);
iconbox.image(nsticon);
Fl_Button close(360, 400, 80, 24, "&Close");