Skip to content

Commit

Permalink
posix: Add snek.desktop
Browse files Browse the repository at this point in the history
Runs snek in a terminal window

Signed-off-by: Keith Packard <keithp@keithp.com>
  • Loading branch information
keith-packard committed Mar 5, 2019
1 parent 02979d6 commit 3da6aba
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
1 change: 1 addition & 0 deletions posix/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
snek
snek.desktop
12 changes: 9 additions & 3 deletions posix/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ SNEK_LOCAL_SRC = \
SNEK_LOCAL_INC = snek-posix.h
SNEK_LOCAL_BUILTINS = snek-posix.builtin

all: snek

include $(SNEK_ROOT)/snek.defs

OPT=-O0
Expand All @@ -34,14 +32,22 @@ CFLAGS=-DSNEK_MEM_INCLUDE_NAME $(OPT) -g -I. $(SNEK_CFLAGS) -Werror

LIBS=-lreadline -lm

all: snek snek.desktop

snek: $(SNEK_OBJ)
$(CC) $(CFLAGS) -o $@ $(SNEK_OBJ) $(LIBS)

install: snek snek.1
install -d $(DESTDIR)$(BINDIR)
install snek $(DESTDIR)$(BINDIR)
install -d $(DESTDIR)$(APPDIR)
install snek.desktop $(DESTDIR)$(APPDIR)
install -d $(DESTDIR)$(MANDIR)/man1
install snek.1 $(DESTDIR)$(MANDIR)/man1

snek.desktop: snek.desktop.in
$(SNEK_SED) $^ > $@


clean::
rm -f snek
rm -f snek snek.desktop
11 changes: 11 additions & 0 deletions posix/snek.desktop.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Desktop Entry]
Type=Application
Version=1.0
Name=Snek
GenericName=Programming Language
Comment=Snek Programming Language
Icon=@ICONDIR@/snek.svg
Exec=@BINDIR@/snek
Terminal=true
Categories=Education;Electronics;
Keywords=Arduino;Snek;Python;

0 comments on commit 3da6aba

Please sign in to comment.