Browse Source

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
tags/v3.20f
kenunix 3 years ago
parent
commit
392bffc737
3 changed files with 21 additions and 12 deletions
  1. +18
    -9
      Makefile
  2. +1
    -1
      bwbasic.desktop
  3. +2
    -2
      bwbasic.sh

+ 18
- 9
Makefile View File

@@ -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


+ 1
- 1
bwbasic.desktop View File

@@ -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


+ 2
- 2
bwbasic.sh View File

@@ -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

Loading…
Cancel
Save