Skip to content

Commit 129c446

Browse files
committed
add ARM64 Linux support, consolidate raylib to 5.5, build infrastructure
- Add pre-built raylib for linux-arm64. Makefile auto-detects aarch64 and links against the right lib. - Consolidate all platforms to raylib 5.5 stable (was a mix of 5.0, 5.6-dev, and 6.0-dev). Migrate DrawRectangleRoundedLines calls to DrawRectangleRoundedLinesEx to match the 5.5 API. - Add scripts/raylib-build.sh with platform auto-detection and per-platform patch pipeline (patches/raylib/{all,linux,windows, macos}/). make raylib rebuilds for the current platform. - Add Docker crossbuild (make raylib-crossbuild) to rebuild raylib for all platforms in one command. - Add Linux ARM64 CI job using cyberjunk/gha-ubuntu-cross for multi-arch apt setup. All CI targets now build raylib from source. - Update README to note ARM64 Linux support.
1 parent d347cdd commit 129c446

29 files changed

Lines changed: 30516 additions & 19880 deletions

File tree

.github/workflows/build.yml

Lines changed: 56 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ jobs:
2828
sudo apt-get update
2929
sudo apt-get install -y gcc make libasound2-dev libx11-dev libxrandr-dev libxi-dev libgl1-mesa-dev libglu1-mesa-dev libxcursor-dev libxinerama-dev libwayland-dev libxkbcommon-dev libcurl4-openssl-dev
3030
31+
- name: Build raylib
32+
run: make raylib
33+
3134
- name: Compile and Bundle Linux
3235
run: make linux
3336

@@ -38,6 +41,44 @@ jobs:
3841
path: dist/TLEscope-Linux-Portable/
3942
retention-days: 14
4043

44+
build-linux-arm64:
45+
name: Build Linux ARM64
46+
runs-on: ubuntu-latest
47+
steps:
48+
- name: Checkout Repository
49+
uses: actions/checkout@v4
50+
51+
- name: Setup ARM64 Cross-Compile
52+
uses: cyberjunk/gha-ubuntu-cross@v5
53+
with:
54+
arch: arm64
55+
56+
- name: Install ARM64 Build Dependencies
57+
run: |
58+
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
59+
sudo apt-get install -y -o Dpkg::Options::="--force-overwrite" \
60+
libcurl4-openssl-dev:arm64 libgl-dev:arm64 libx11-dev:arm64 \
61+
libxrandr-dev:arm64 libxi-dev:arm64 libxcursor-dev:arm64 \
62+
libxinerama-dev:arm64 libwayland-dev:arm64 libxkbcommon-dev:arm64
63+
64+
- name: Build raylib for ARM64
65+
run: ./scripts/raylib-build.sh linux-arm64
66+
67+
- name: Compile and Bundle Linux ARM64
68+
run: |
69+
make linux \
70+
CC_LINUX=aarch64-linux-gnu-gcc \
71+
LIB_LIN_PATH="-Ilib/raylib_lin_arm64/include -Llib/raylib_lin_arm64/lib" \
72+
LDFLAGS_LIN="-Ilib/raylib_lin_arm64/include -Llib/raylib_lin_arm64/lib -lraylib -lcurl -lGL -lm -lpthread -ldl -lrt -lX11" \
73+
DIST_LINUX=dist/TLEscope-Linux-arm64-Portable
74+
75+
- name: Upload Linux ARM64 Artifact
76+
uses: actions/upload-artifact@v4
77+
with:
78+
name: TLEscope-Linux-arm64-Portable
79+
path: dist/TLEscope-Linux-arm64-Portable/
80+
retention-days: 14
81+
4182
build-windows:
4283
name: Build Windows
4384
runs-on: windows-latest
@@ -55,6 +96,7 @@ jobs:
5596
update: true
5697
install: >-
5798
make
99+
git
58100
mingw-w64-x86_64-gcc
59101
mingw-w64-x86_64-curl
60102
mingw-w64-x86_64-ngtcp2
@@ -66,6 +108,9 @@ jobs:
66108
mingw-w64-x86_64-nsis
67109
mingw-w64-x86_64-imagemagick
68110
111+
- name: Build raylib
112+
run: make raylib
113+
69114
- name: Compile and Bundle Windows
70115
run: make win-installer MINGW_PREFIX=/mingw64 PKG_CONFIG_WIN=pkg-config
71116

@@ -99,6 +144,8 @@ jobs:
99144
msystem: CLANGARM64
100145
update: true
101146
install: >-
147+
make
148+
git
102149
mingw-w64-clang-aarch64-make
103150
mingw-w64-clang-aarch64-clang
104151
mingw-w64-clang-aarch64-curl
@@ -109,6 +156,9 @@ jobs:
109156
mingw-w64-clang-aarch64-openssl
110157
mingw-w64-clang-aarch64-pkgconf
111158
159+
- name: Build raylib
160+
run: make raylib
161+
112162
- name: Compile and Bundle Windows ARM64
113163
run: mingw32-make windows-arm64
114164

@@ -121,7 +171,7 @@ jobs:
121171

122172
release:
123173
name: Publish Release
124-
needs: [build-linux, build-windows, build-windows-arm64]
174+
needs: [build-linux, build-linux-arm64, build-windows, build-windows-arm64]
125175
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v'))
126176
runs-on: ubuntu-latest
127177
permissions:
@@ -141,8 +191,10 @@ jobs:
141191
cd artifacts
142192
# The Makefile bundles into subdirectories, so we zip those folders
143193
chmod +x TLEscope-Linux-Portable/TLEscope
144-
194+
chmod +x TLEscope-Linux-arm64-Portable/TLEscope
195+
145196
zip -r ../TLEscope-Linux-Portable.zip TLEscope-Linux-Portable/
197+
zip -r ../TLEscope-Linux-arm64-Portable.zip TLEscope-Linux-arm64-Portable/
146198
zip -r ../TLEscope-Win-Portable.zip TLEscope-Win-Portable/
147199
zip -r ../TLEscope-Win-arm64-Portable.zip TLEscope-Win-arm64-Portable/
148200
@@ -179,6 +231,7 @@ jobs:
179231
prerelease: true
180232
files: |
181233
TLEscope-Linux-Portable.zip
234+
TLEscope-Linux-arm64-Portable.zip
182235
TLEscope-Win-Portable.zip
183236
TLEscope-Win-arm64-Portable.zip
184237
TLEscope-Installer.exe
@@ -190,6 +243,7 @@ jobs:
190243
generate_release_notes: true
191244
files: |
192245
TLEscope-Linux-Portable.zip
246+
TLEscope-Linux-arm64-Portable.zip
193247
TLEscope-Win-Portable.zip
194248
TLEscope-Win-arm64-Portable.zip
195249
TLEscope-Installer.exe

Makefile

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@ else
1717
LIB_WIN_PATH = -Ilib/raylib_win/include -Llib/raylib_win/lib -I$(MINGW_PREFIX)/include -L$(MINGW_PREFIX)/lib
1818
endif
1919

20+
UNAME_M := $(shell uname -m)
21+
ifeq ($(UNAME_M),aarch64)
22+
LIB_LIN_PATH = -Ilib/raylib_lin_arm64/include -Llib/raylib_lin_arm64/lib
23+
else
2024
LIB_LIN_PATH = -Ilib/raylib_lin/include -Llib/raylib_lin/lib
25+
endif
2126

2227
SRC = src/main.c src/astro.c src/config.c src/ui.c
2328
OBJ = $(SRC:src/%.c=build/%.o)
@@ -40,7 +45,7 @@ RAYLIB_LIBS = $(shell pkg-config --libs raylib 2>/dev/null)
4045
LDFLAGS_MACOS = $(RAYLIB_LIBS) -lcurl -framework IOKit -framework Cocoa -framework OpenGL
4146
DIST_MACOS = dist/TLEscope-macOS-Portable
4247

43-
.PHONY: all linux macos windows windows-arm64 win-installer clean build bin install uninstall
48+
.PHONY: all linux macos windows windows-arm64 win-installer clean build bin install uninstall raylib raylib-crossbuild
4449

4550
all: linux
4651

@@ -117,6 +122,16 @@ build:
117122
bin:
118123
mkdir -p bin
119124

125+
raylib:
126+
./scripts/raylib-build.sh
127+
128+
raylib-%:
129+
./scripts/raylib-build.sh $*
130+
131+
raylib-crossbuild:
132+
docker build -f scripts/raylib-crossbuild.Dockerfile -t tlescope-crossbuild .
133+
docker run --rm -v "$(PWD)/lib:/build/lib" tlescope-crossbuild
134+
120135
clean:
121136
rm -rf build bin dist
122137

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ TLEscope comes equipped with tools designed for RF engineers, satellite operator
3333

3434
- **Minimal Footprint and High Performance**: Developed in pure C utilizing the Raylib framework, TLEscope maintains a minimal footprint. The application provides high-performance rendering that is likely more efficient than your standard system file browser, even with hundreds or thousands of satellites on-screen.
3535

36-
- **​Native OS Support**: Built for Linux, macOS, and Windows.
36+
- **​Native OS Support**: Built for Linux (x86_64 and ARM64), macOS, and Windows.
3737

3838
### **Design Philosophy**
3939
​Most existing orbital tracking software suffers from dated, unintuitive interfaces. TLEscope bridges this gap by prioritizing both visual clarity and ease of use.

lib/raygui.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4967,11 +4967,7 @@ static void GuiDrawRectangle(Rectangle rec, int borderWidth, Color borderColor,
49674967
if (borderWidth > 0)
49684968
{
49694969
// Draw rectangle border lines with color
4970-
#if (defined(_WIN32) || defined(_WIN64)) && !defined(_M_ARM64)
4971-
DrawRectangleRoundedLines(rec, roundness, segments, (float)borderWidth, GuiFade(borderColor, guiAlpha));
4972-
#else
4973-
DrawRectangleRoundedLines(rec, roundness, segments, GuiFade(borderColor, guiAlpha));
4974-
#endif
4970+
DrawRectangleRoundedLinesEx(rec, roundness, segments, (float)borderWidth, GuiFade(borderColor, guiAlpha));
49754971
}
49764972

49774973
#if defined(RAYGUI_DEBUG_RECS_BOUNDS)

0 commit comments

Comments
 (0)