summaryrefslogtreecommitdiffstats
path: root/petitboot.c
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2007-04-02 13:54:11 +1000
committerJeremy Kerr <jk@ozlabs.org>2007-04-02 13:54:11 +1000
commitdb8001f511f8e8d928aa82113431067f968f4966 (patch)
treeebaff8f3ee26574b29f444674814987c604db10d /petitboot.c
parent49d43d590027df23d45d3cd99f83517eeab67a43 (diff)
downloadtalos-petitboot-db8001f511f8e8d928aa82113431067f968f4966.tar.gz
talos-petitboot-db8001f511f8e8d928aa82113431067f968f4966.zip
Make petitboot installable
Add an install target and PREFIX= option the makefile, and change the artwork loading code to use the prefixed-path. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'petitboot.c')
-rw-r--r--petitboot.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/petitboot.c b/petitboot.c
index e69353e..44e1cc8 100644
--- a/petitboot.c
+++ b/petitboot.c
@@ -14,6 +14,7 @@
#include <libtwin/twin_png.h>
#include "petitboot.h"
+#include "petitboot-paths.h"
#define _USE_X11
@@ -845,6 +846,7 @@ static void sigint(int sig)
int main(int argc, char **argv)
{
twin_pixmap_t *pic;
+ const char *background_path;
atexit(exitfunc);
signal(SIGINT, sigint);
@@ -868,7 +870,8 @@ int main(int argc, char **argv)
#endif
if (pboot_fbdev != NULL) {
- pboot_cursor = twin_load_X_cursor("artwork/cursor", 2,
+ char *cursor_path = artwork_pathname("cursor");
+ pboot_cursor = twin_load_X_cursor(cursor_path, 2,
&pboot_cursor_hx,
&pboot_cursor_hy);
if (pboot_cursor == NULL)
@@ -878,8 +881,9 @@ int main(int argc, char **argv)
}
/* Set background pixmap */
- LOG("loading background...");
- pic = twin_png_to_pixmap("artwork/background.png", TWIN_ARGB32);
+ background_path = artwork_pathname("background.png");
+ LOG("loading background: %s...", background_path);
+ pic = twin_png_to_pixmap(background_path, TWIN_ARGB32);
LOG("%s\n", pic ? "ok" : "failed");
if (pic)
twin_screen_set_background(pboot_screen, pic);
OpenPOWER on IntegriCloud