Skip to content

Commit 7634e03

Browse files
authored
Merge pull request #145 from chrisws/12_24
12 24
2 parents c410df4 + b085b21 commit 7634e03

12 files changed

+101
-7
lines changed

Diff for: src/common/plugins.c

+7
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,13 @@ static int slib_find_path(char *path, const char *file) {
210210
result = sys_search_path(rel_path, file, path);
211211
}
212212
}
213+
// find in AppImage
214+
if (!result && getenv("APPDIR")) {
215+
char rel_path[PATH_SIZE];
216+
strlcpy(rel_path, getenv("APPDIR"), PATH_SIZE);
217+
strlcat(rel_path, "/usr/lib", PATH_SIZE);
218+
result = sys_search_path(rel_path, file, path);
219+
}
213220
// find in modpath
214221
if (!result && opt_modpath[0]) {
215222
result = sys_search_path(opt_modpath, file, path);

Diff for: src/platform/android/app/src/main/java/net/sourceforge/smallbasic/MainActivity.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@ private String getExternalStorage() {
792792
} else if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
793793
// https://commonsware.com/blog/2019/06/07/death-external-storage-end-saga.html
794794
File[] dirs = getExternalMediaDirs();
795-
result = dirs[0].getAbsolutePath();
795+
result = dirs != null && dirs.length > 0 ? dirs[0].getAbsolutePath() : getInternalStorage();
796796
} else {
797797
result = getInternalStorage();
798798
}

Diff for: src/platform/android/jni/display.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ void Canvas::fillRect(int left, int top, int width, int height, pixel_t drawColo
8686
break;
8787
} else if (posY >= dtY) {
8888
pixel_t *line = getLine(posY);
89-
for (int x = 0; x < width; x++) {
89+
for (int x = 0; x < width && line; x++) {
9090
int posX = x + left;
9191
if (posX == _w) {
9292
break;

Diff for: src/platform/console/Makefile.am

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# SmallBASIC command line version
2-
# Copyright(C) 2001-2018 Chris Warren-Smith.
2+
# Copyright(C) 2001-2022 Chris Warren-Smith.
33
#
44
# This program is distributed under the terms of the GPL v2.0 or later
55
# Download the GNU Public License (GPL) from www.gnu.org
@@ -25,6 +25,11 @@ endif
2525

2626
sbasic_DEPENDENCIES = $(top_srcdir)/src/common/libsb_common.a
2727

28+
iconsdir = $(datadir)/icons/hicolor/128x128/apps
29+
icons_DATA = ../../../images/sb-desktop-128x128.png
30+
desktopdir = $(datadir)/applications
31+
desktop_DATA = io.github.smallbasic.desktop
32+
2833
TEST_DIR=../../../samples/distro-examples/tests
2934
UNIT_TESTS=array break byref eval-test iifs matrices metaa ongoto \
3035
uds hash pass1 call_tau short-circuit strings stack-test \
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<component type="desktop-application">
3+
<id>io.github.smallbasic</id>
4+
<name>SmallBASIC</name>
5+
<summary>SmallBASIC is a fast and easy to learn BASIC language interpreter ideal for everyday calculations, scripts and prototypes</summary>
6+
<metadata_license>MIT</metadata_license>
7+
<project_license>GPL-2.0-or-later</project_license>
8+
<description>
9+
<p>
10+
SmallBASIC is a fast and easy to learn BASIC language interpreter ideal for everyday calculations, scripts and prototypes.
11+
SmallBASIC includes trigonometric, matrices and algebra functions, a built in IDE, a powerful string library, system,
12+
sound, and graphic commands along with structured programming syntax. SmallBASIC is licensed under the GPL.
13+
</p>
14+
</description>
15+
<launchable type="desktop-id">io.github.smallbasic.desktop</launchable>
16+
<screenshots>
17+
<screenshot type="default">
18+
<image>https://smallbasic.github.io/images/screenshots/sbasic.png</image>
19+
</screenshot>
20+
<screenshot>
21+
<image>https://smallbasic.github.io/images/screenshots/gold.png</image>
22+
</screenshot>
23+
</screenshots>
24+
</component>

Diff for: src/platform/console/io.github.smallbasic.desktop

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[Desktop Entry]
2+
Name=SmallBASIC
3+
Exec=sbasic
4+
Icon=sb-desktop-128x128
5+
Terminal=true
6+
Type=Application
7+
Categories=Development
8+
MimeType=application/bas
9+
NoDisplay=false
10+

Diff for: src/platform/fltk/Makefile.am

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ sbasici_DEPENDENCIES = $(top_srcdir)/src/common/libsb_common.a
4949
iconsdir = $(datadir)/icons/hicolor/128x128/apps
5050
icons_DATA = ../../../images/sb-desktop-128x128.png
5151
desktopdir = $(datadir)/applications
52-
desktop_DATA = smallbasic.desktop
52+
desktop_DATA = io.github.smallbasic.desktop
5353

5454
if WITH_WIN32
5555
sbasici_LDADD += win.res

Diff for: src/platform/fltk/io.github.smallbasic.appdata.xml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<component type="desktop-application">
3+
<id>io.github.smallbasic</id>
4+
<name>SmallBASIC</name>
5+
<summary>SmallBASIC is a fast and easy to learn BASIC language interpreter ideal for everyday calculations, scripts and prototypes</summary>
6+
<metadata_license>MIT</metadata_license>
7+
<project_license>GPL-2.0-or-later</project_license>
8+
<description>
9+
<p>
10+
SmallBASIC is a fast and easy to learn BASIC language interpreter ideal for everyday calculations, scripts and prototypes.
11+
SmallBASIC includes trigonometric, matrices and algebra functions, a built in IDE, a powerful string library, system,
12+
sound, and graphic commands along with structured programming syntax. SmallBASIC is licensed under the GPL.
13+
</p>
14+
</description>
15+
<launchable type="desktop-id">io.github.smallbasic.desktop</launchable>
16+
<screenshots>
17+
<screenshot type="default">
18+
<image>https://smallbasic.github.io/images/screenshots/sbasici.png</image>
19+
</screenshot>
20+
<screenshot>
21+
<image>https://smallbasic.github.io/images/screenshots/bb.gif</image>
22+
</screenshot>
23+
</screenshots>
24+
</component>

Diff for: src/platform/fltk/smallbasic.desktop renamed to src/platform/fltk/io.github.smallbasic.desktop

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ Exec=sbasici
44
Icon=sb-desktop-128x128
55
Terminal=false
66
Type=Application
7-
Categories=Development;
7+
Categories=Development
88
MimeType=application/bas
99
NoDisplay=false

Diff for: src/platform/sdl/Makefile.am

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ sbasicg_DEPENDENCIES = $(top_srcdir)/src/common/libsb_common.a
3838
iconsdir = $(datadir)/icons/hicolor/128x128/apps
3939
icons_DATA = ../../../images/sb-desktop-128x128.png
4040
desktopdir = $(datadir)/applications
41-
desktop_DATA = smallbasic.desktop
41+
desktop_DATA = io.github.smallbasic.desktop
4242

4343
if WITH_WIN32
4444
sbasicg_LDADD += win.res

Diff for: src/platform/sdl/io.github.smallbasic.appdata.xml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<component type="desktop-application">
3+
<id>io.github.smallbasic</id>
4+
<name>SmallBASIC</name>
5+
<summary>SmallBASIC is a fast and easy to learn BASIC language interpreter ideal for everyday calculations, scripts and prototypes</summary>
6+
<metadata_license>MIT</metadata_license>
7+
<project_license>GPL-2.0-or-later</project_license>
8+
<description>
9+
<p>
10+
SmallBASIC is a fast and easy to learn BASIC language interpreter ideal for everyday calculations, scripts and prototypes.
11+
SmallBASIC includes trigonometric, matrices and algebra functions, a built in IDE, a powerful string library, system,
12+
sound, and graphic commands along with structured programming syntax. SmallBASIC is licensed under the GPL.
13+
</p>
14+
</description>
15+
<launchable type="desktop-id">io.github.smallbasic.desktop</launchable>
16+
<screenshots>
17+
<screenshot type="default">
18+
<image>https://smallbasic.github.io/images/screenshots/sbasicg.png</image>
19+
</screenshot>
20+
<screenshot>
21+
<image>https://smallbasic.github.io/images/screenshots/bowling.png</image>
22+
</screenshot>
23+
</screenshots>
24+
</component>

Diff for: src/platform/sdl/smallbasic.desktop renamed to src/platform/sdl/io.github.smallbasic.desktop

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ Exec=sbasicg
44
Icon=sb-desktop-128x128
55
Terminal=false
66
Type=Application
7-
Categories=Development;
7+
Categories=Development
88
MimeType=application/bas
99
NoDisplay=false

0 commit comments

Comments
 (0)