Skip to content

Commit 0e34f0d

Browse files
authored
Merge pull request #78 from chrisws/0_12_15
0 12 15
2 parents 7ba209c + 7896575 commit 0e34f0d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+12907
-2083
lines changed

ChangeLog

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,37 @@
1+
2019-06-22 (0.12.15)
2+
FLTK: reactivated the FLTK port using FLTK v1.4
3+
4+
2019-03-02 (0.12.15)
5+
COMMON: Implemented - FOR character IN string
6+
7+
2019-03-02 (0.12.15)
8+
ANDROID: In editor, hide status when scrolled
9+
10+
2019-02-26 (0.12.15)
11+
ANDROID: Fix POINT returning transposed red + blue
12+
13+
2019-02-23 (0.12.15)
14+
ANDROID: Fix crash entering c,v in edit control mode
15+
16+
2019-02-14 (0.12.15)
17+
ANDROID: fix crash passing negative duration to SOUND command
18+
19+
2019-02-11 (0.12.15)
20+
UI: ALT+F4 from edit/run now returns to edit
21+
UI: avoid flicker from with ALT+F4 -e edit startup
22+
23+
2019-02-02 (0.12.15)
24+
UI: Edit enter now continues prior line comment
25+
26+
2019-01-21 (0.12.15.1)
27+
ANDROID: fix setup screen colour display
28+
ANDROID: show link to android page in about
29+
30+
2019-01-19 (0.12.15)
31+
UI: added kill-word editor command (alt+d)
32+
UI: added select-word editor command (alt+w)
33+
UI: find command primed from editor selection
34+
135
2018-12-28 (0.12.15)
236
Fix crash when using GOTO with a non-existent label
337
Fix crash in editor when double tapping empty document

Makefile.am

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@ test:
1616
leak-test:
1717
(cd src/platform/console && make leak-test)
1818

19+
fuzz-test:
20+
(cd src/platform/console && make fuzz-test)
21+
1922
cppcheck:
20-
(cppcheck --quiet --enable=all src/common src/ui src/platform/android/jni src/platform/sdl)
23+
(cppcheck --quiet --enable=all src/common src/ui src/platform/android/jni src/platform/sdl src/platform/fltk)
2124

2225
covcheck:
2326
(make clean -s && \

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ SmallBASIC is a fast and easy to learn BASIC language interpreter ideal for ever
44

55
Initial setup on linux
66
```
7-
$ sudo apt-get install git autotools-dev automake gcc g++ libsdl2-dev libfreetype6-dev libfontconfig1-dev
7+
$ sudo apt-get install git autotools-dev automake gcc g++ libsdl2-dev libfreetype6-dev libfontconfig1-dev xxd
88
$ git clone https://github.com/smallbasic/SmallBASIC.git
99
$ cd SmallBASIC
1010
$ sh autogen.sh
@@ -117,6 +117,25 @@ Useful adb commands for debugging:
117117
adb shell dumpsys cpuinfo
118118
adb shell top -m 10
119119

120+
### Building the FLTK version
121+
122+
1. Install and build FLTK 1.4
123+
124+
```
125+
$ cd ~/github
126+
$ git clone https://github.com/fltk/fltk.git
127+
$ sudo make install
128+
129+
```
130+
131+
2. Build
132+
133+
```
134+
$ cd ~/github/SmallBASIC
135+
$ ./configure --enable-fltk
136+
$ make -s
137+
```
138+
120139
### .indent.pro settings
121140
```
122141
-brf -nbap -br -brs -cdb -cdw -ce -cli0 -fca -i2 -l110 -lc110 -lp

configure.ac

Lines changed: 71 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
dnl
22
dnl Configure script for SmallBASIC
33
dnl
4-
dnl Copyright(C) 2001-2018 Chris Warren-Smith.
4+
dnl Copyright(C) 2001-2019 Chris Warren-Smith.
55
dnl
66
dnl This program is distributed under the terms of the GPL v2.0
77
dnl Download the GNU Public License (GPL) from www.gnu.org
@@ -39,6 +39,11 @@ AC_ARG_ENABLE(web,
3939
[ac_build_web="yes"],
4040
[ac_build_web="no"])
4141

42+
AC_ARG_ENABLE(fltk,
43+
AS_HELP_STRING([--enable-fltk],[build fltk version(default=no)]),
44+
[ac_build_fltk="yes"],
45+
[ac_build_fltk="no"])
46+
4247
AC_ARG_ENABLE(dist,
4348
AS_HELP_STRING([--enable-dist],[prepare to run make dist(default=no)]),
4449
[ac_build_dist="yes"],
@@ -156,6 +161,11 @@ function buildSDL() {
156161
AC_MSG_ERROR([libfreetype6-dev not installed: configure failed.])
157162
fi
158163

164+
AC_CHECK_PROG(have_xxd, xxd, [yes], [no])
165+
if test "${have_xxd}" = "no" ; then
166+
AC_MSG_ERROR([xxd command not installed: configure failed.])
167+
fi
168+
159169
case "${host_os}" in
160170
*mingw* | cygwin*)
161171
dnl avoid using MSCRT versions of printf for long double
@@ -206,15 +216,13 @@ function buildSDL() {
206216
dnl preconfigured values for SDL build
207217
AC_DEFINE(_SDL, 1, [Defined when building SDL version])
208218
AC_DEFINE(_UnixOS, 1, [Building under Unix like systems.])
209-
AC_DEFINE(IMPL_DEV_DELAY, 1, [Driver implements dev_delay()])
210-
AC_DEFINE(IMPL_LOG_WRITE, 1, [Driver implements lwrite()])
211219
AC_DEFINE(IMPL_DEV_READ, 1, [Implement dev_read()])
220+
AC_DEFINE(IMPL_DEV_DELAY, 1, [Driver implements dev_delay()])
212221
AC_DEFINE(IMPL_LOG_WRITE, 1, [Driver implements lwrite()])
213222

214223
BUILD_SUBDIRS="src/common src/platform/sdl"
215224
AC_SUBST(BUILD_SUBDIRS)
216225
(cd src/platform/android/app/src/main/assets && xxd -i main.bas > ../../../../../../../src/platform/sdl/main_bas.h)
217-
(cd documentation && g++ -o build_kwp build_kwp.cpp && ./build_kwp > ../src/ui/kwp.h)
218226
}
219227

220228
function buildAndroid() {
@@ -233,8 +241,6 @@ function buildAndroid() {
233241

234242
TEST_DIR="src/platform/android"
235243
AC_SUBST(TEST_DIR)
236-
237-
(cd documentation && g++ -o build_kwp build_kwp.cpp && ./build_kwp > ../src/ui/kwp.h)
238244
}
239245

240246
function buildConsole() {
@@ -294,8 +300,6 @@ function buildConsole() {
294300
fi
295301

296302
AC_SUBST(BUILD_SUBDIRS)
297-
298-
(cd documentation && g++ -o build_kwp build_kwp.cpp && ./build_kwp > ../src/ui/kwp.h)
299303
}
300304

301305
function buildWeb() {
@@ -321,16 +325,74 @@ function buildWeb() {
321325
AC_SUBST(BUILD_SUBDIRS)
322326
}
323327

328+
function buildFLTK() {
329+
TARGET="Building FLTK version."
330+
331+
dnl Checks for FLTK 1.x
332+
AC_CHECK_PROG(have_fltk, fltk-config, [yes], [no])
333+
334+
AC_CHECK_PROG(have_xxd, xxd, [yes], [no])
335+
if test "${have_xxd}" = "no" ; then
336+
AC_MSG_ERROR([xxd command not installed: configure failed.])
337+
fi
338+
339+
dnl avoid using MSCRT versions of printf for long double
340+
case "${host_os}" in
341+
*mingw* | cygwin*)
342+
PACKAGE_CFLAGS="${PACKAGE_CFLAGS} -D__USE_MINGW_ANSI_STDIO"
343+
esac
344+
345+
FLTK_CXXFLAGS="${PACKAGE_CFLAGS} `fltk-config --cxxflags`"
346+
FLTK_CXXFLAGS="${FLTK_CXXFLAGS} -fno-exceptions -fno-rtti -std=c++11 -Wno-unknown-pragmas"
347+
PACKAGE_LIBS="${PACKAGE_LIBS} `fltk-config --ldstaticflags --use-images`"
348+
349+
dnl do not depend on cygwin.dll under cygwin build
350+
case "${host_os}" in
351+
*mingw* | cygwin*)
352+
FLTK_CXXFLAGS="${FLTK_CXXFLAGS} -mms-bitfields"
353+
PACKAGE_LIBS="-Wl,-Bstatic ${PACKAGE_LIBS} -lwsock32 -lws2_32 -static-libgcc -static-libstdc++"
354+
AC_DEFINE(_Win32, 1, [Windows build])
355+
;;
356+
357+
*)
358+
(cd images && xxd -i sb-desktop-128x128.png > ../src/platform/fltk/icon.h)
359+
xxd
360+
esac
361+
362+
defaultConditionals
363+
364+
dnl preconfigured values for FLTK build
365+
AC_DEFINE(_UnixOS, 1, [Building under Unix like systems.])
366+
AC_DEFINE(_FLTK, 1, [Defined for FLTK build.])
367+
AC_DEFINE(IMPL_DEV_READ, 1, [Implement dev_read()])
368+
AC_DEFINE(IMPL_DEV_DELAY, 1, [Driver implements dev_delay()])
369+
AC_DEFINE(IMPL_LOG_WRITE, 1, [Driver implements lwrite()])
370+
371+
BUILD_SUBDIRS="src/common src/platform/fltk"
372+
AC_SUBST(BUILD_SUBDIRS)
373+
AC_SUBST(FLTK_CXXFLAGS)
374+
375+
desktopentrydir='$(datarootdir)'/applications
376+
AC_SUBST(desktopentrydir)
377+
378+
dnl generate kwp.h
379+
(cd src/platform/fltk && g++ -o build_kwp build_kwp.cxx && ./build_kwp)
380+
}
381+
324382
if test x$ac_build_sdl = xyes; then
325383
buildSDL
326384
elif test x$ac_build_android = xyes; then
327385
buildAndroid
328386
elif test x$ac_build_web = xyes; then
329387
buildWeb
388+
elif test x$ac_build_fltk = xyes; then
389+
buildFLTK
330390
else
331391
buildConsole
332392
fi
333393

394+
(cd documentation && g++ -o build_kwp build_kwp.cpp && ./build_kwp > ../src/ui/kwp.h)
395+
334396
checkPCRE
335397
checkTermios
336398
checkDebugMode
@@ -363,6 +425,7 @@ src/platform/android/Makefile
363425
src/platform/console/Makefile
364426
src/platform/sdl/Makefile
365427
src/platform/web/Makefile
428+
src/platform/fltk/Makefile
366429
])
367430
AC_OUTPUT
368431

debian/changelog

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ smallbasic (0.12.15) unstable; urgency=low
66
smallbasic (0.12.14) unstable; urgency=low
77
* Various see web site
88

9-
-- Chris Warren-Smith <cwarrensmith@gmail.com> Sat, 15 Sept 2018 09:45:25 +1000
9+
-- Chris Warren-Smith <cwarrensmith@gmail.com> Sat, 15 Sep 2018 09:45:25 +1000
1010

1111
smallbasic (0.12.13) unstable; urgency=low
1212
* Various see web site

images/mainmenu.png

-71 Bytes
Loading

images/sb-desktop-128x128.png

-36 Bytes
Loading

images/sb-desktop-32x32.png

-2 Bytes
Loading

images/sb-desktop-64x64.png

-12 Bytes
Loading

images/sb16x16.png

-7 Bytes
Loading

0 commit comments

Comments
 (0)