From 392bffc737b7525b7d4ac6a66c1e9ab8b566614d Mon Sep 17 00:00:00 2001 From: kenunix Date: Sat, 2 Oct 2021 14:38:38 -0400 Subject: [PATCH] added addgui, delgui to Makefile see more after make sudo make install addgui will put bwbasic.desktop in users Desktop DO NOT run as sudo make addgui use make addgui fixed typos in Makefile fixed typo bwbasic.sh changed dest to /usr/local/bin --- Makefile | 27 ++++++++++++++++++--------- bwbasic.desktop | 2 +- bwbasic.sh | 4 ++-- 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 6743378..c06c13e 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,10 @@ # -# Makefile for bwbasic on Linux 8-9-2020 +# Makefile for bwbasic on Linux 10-02-2021 kenunix # Now version bwbasic-3.20d # +# 10-02-2021 kenunix add addgui and delgui and corrected typos. +# set DEST to /usr/local/bin +# # Tested on Ubuntu 18.04 Had to fix compatabily issues # Ubuntu 20.04 Had to fix compatabily issues # Debian 10 Buster @@ -10,7 +13,7 @@ # Linux Mint LMDE4 # Linux Lite 4.8 # -# ken.at.github@gmail.com +# ken.unix.guy@gmail.com # CC=gcc # If running on a Beaglebone you might want to replace @@ -18,7 +21,7 @@ CC=gcc # to have a smaller runtime size CFLAGS=-s -ansi LIB=-lm -DEST=/usr/bin +DEST=/usr/local/bin # HOME=$HOME bwbasic: @@ -26,26 +29,23 @@ bwbasic: $(CC) $(CFLAGS) -o renum renum.c $(LIB) ls -l bwbasic renum -# bwbasic and renum runtime. editfl temp file created by renum +# bwbasic and renum runtime. editfl.bas temp file created by renum clean: - rm -f *.o bwbasic renum editfl core + rm -f *.o bwbasic renum editfl.bas core install: ls -l bwbasic renum cp bwbasic renum bwbasic.sh $(DEST)/. ls -l $(DEST)/bwbasic $(DEST)/renum $(DEST)/bwbasic.sh mkdir -p /usr/share/bwbasic - mkdir -p /usr/share/doc/cbwbasic + mkdir -p /usr/share/doc/bwbasic mkdir -p /usr/share/doc/bwbasic/docs - mkdir -p $HOME/Desktop cp BAS-EXAMPLES/* /usr/share/bwbasic/. cp DOCS/* /usr/share/doc/bwbasic/docs/. cp README READMEFIRST /usr/share/doc/bwbasic/. cp COPYING /usr/share/doc/bwbasic/. cp bwbasic.png /usr/share/pixmaps/. cp bwbasic.desktop /usr/share/applications/bwbasic.desktop - # cp bwbasic.desktop $HOME/Desktop/. - # chmod 666 $HOME/Desktop/bwbasic/desktop remove: rm $(DEST)/bwbasic $(DEST)/renum $(DEST)/bwbasic.sh @@ -67,3 +67,12 @@ run: runlocal: ./bwbasic +# Must do as user not root +addgui: + cp bwbasic.desktop ${HOME}/Desktop/bwbasic.desktop + ls -l ${HOME}/Desktop/bwbasic.desktop + +# Must do as user not root +delgui: + rm -f ${HOME}/Desktop/bwbasic.desktop + diff --git a/bwbasic.desktop b/bwbasic.desktop index 1c81de9..5574292 100755 --- a/bwbasic.desktop +++ b/bwbasic.desktop @@ -4,7 +4,7 @@ Encoding=UTF-8 Name=Bywater BASIC GenericName=Bywater BASIC Type=Application -Exec=/usr/bin/bwbasic.sh +Exec=/usr/local/bin/bwbasic.sh Icon=/usr/share/pixmaps/bwbasic.png StartupNotify=true Terminal=true diff --git a/bwbasic.sh b/bwbasic.sh index cdbdf67..971a125 100755 --- a/bwbasic.sh +++ b/bwbasic.sh @@ -4,8 +4,8 @@ [ -z "$BWBASIC" ] && BWBASIC="$HOME/bwbasic" [ ! -d "$BWBASIC" ] && mkdir "$BWBASIC" cd "$BWBASIC" -trap 'echo " "; echo "PROGRAM INTERRUPTED"; echo "Press Enter "; read j; exit 1' INT +trap '/bin/echo " "; /bin/echo -e "PROGRAM INTERRUPTED. \007Press Enter "; read j; exit 1' INT bwbasic "$@" # -n = no newline -e interpret special octel numbers \007 = Bell -/bin/echo -n -e "Bwbasic terminated. Press Enter \007" +/bin/echo -n "Bwbasic terminated. Press Enter " read j