feat: add AppImage build pipeline with desktop integration and dependency bundling

Implement full AppImage packaging support including AppRun entry point, .desktop launcher, icon asset, and recursive shared library collection via collect_so_files.sh. The Makefile build target now generates a portable Linux executable by assembling the directory structure, copying the binary to AppImage/usr/bin/r, running the dependency collector, and invoking appimagetool to produce a self-contained AppImage binary. Also update .gitignore to exclude the AppImage build directory and add shell scripts to the ignore list.
This commit is contained in:
2025-04-08 22:00:21 +00:00
parent 0f43cd435c
commit 606bc27834
7 changed files with 61 additions and 11 deletions
+18 -11
View File
@@ -1,8 +1,8 @@
all: build build_rd build_free build_rpylib run build_mingw
all: build build_rpylib run build_mingw
# Variables for compiler and flags
CC = gcc
CFLAGS = -Ofast -Werror -Wall -lreadline -lncurses -lcurl -lssl -lcrypto -ljson-c -lm -lsqlite3
CFLAGS = -Ofast -Werror -Wall -lreadline -lncurses -lcurl -lgnutls -ljson-c -lsqlite3 -lm $(pkg-config --cflags --libs gnutls gmp) -lnettle -lssl -lcrypto
# MinGW Variables
MINGW_CC = x86_64-w64-mingw32-gcc # Change to x86_64-w64-mingw32-gcc for 64-bit
@@ -10,17 +10,24 @@ MINGW_CFLAGS = -Ofast -Werror -Wall -lreadline -lcurl -lssl -lcrypto -ljson-c -l
# Targets
build:
$(CC) main.c $(CFLAGS) -o r
$(CC) main.c $(CFLAGS) -o bin/r
-@rm -rf AppImage
mkdir -p AppImage
mkdir -p AppImage/usr
mkdir -p AppImage/usr/bin
mkdir -p AppImage/lib
cp AppRun AppImage/AppRun
cp r.desktop AppImage/r.desktop
cp r.png AppImage/r.png
cp bin/r AppImage/usr/bin/r
./collect_so_files.sh
#./prepare_app_image AppImage/usr/bin/r AppImage
appimagetool-x86_64.AppImage AppImage
mv r-x86_64.AppImage r
publish:
-@publish r
build_free:
$(CC) -DOLLAMA main.c $(CFLAGS) -o rf
@publish rf
build_rd:
$(CC) -DRD main.c $(CFLAGS) -o rd
publish rd
build_rpylib:
$(CC) -shared -o rpylib.so -fPIC rpylib.c -lpython3.12 `python3-config --includes` -I/usr/include/CL -ljson-c -lcurl -lsqlite3
publish rpylib.so