Skip to content

Commit 3109a33

Browse files
committed
Fix to allow module access from inside packaged AppImage
1 parent b2e4c7a commit 3109a33

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

src/common/plugins.c

Lines changed: 7 additions & 0 deletions
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);

src/platform/console/Makefile.am

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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 = 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 \
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[Desktop Entry]
2+
Name=SmallBASIC
3+
Exec=sbasic
4+
Icon=sb-desktop-128x128
5+
Terminal=false
6+
Type=Application
7+
Categories=Development;
8+
MimeType=application/bas
9+
NoDisplay=false

0 commit comments

Comments
 (0)