v0.1.0 - New minor version
This commit is contained in:
@@ -60,7 +60,7 @@ show_usage() {
|
||||
echo " - Git add, commit, push, and create Gitea release"
|
||||
echo ""
|
||||
echo "Requirements for Release Mode:"
|
||||
echo " - ARM64 cross-compiler: sudo apt install gcc-aarch64-linux-gnu"
|
||||
echo " - For ARM64 builds: make install-arm64-deps (optional - will build x86_64 only if missing)"
|
||||
echo " - Gitea token in ~/.gitea_token for release uploads"
|
||||
}
|
||||
|
||||
@@ -148,16 +148,6 @@ compile_project() {
|
||||
fi
|
||||
}
|
||||
|
||||
# Check for ARM64 cross-compiler
|
||||
check_cross_compiler() {
|
||||
if ! command -v aarch64-linux-gnu-gcc > /dev/null 2>&1; then
|
||||
print_error "ARM64/AArch64 cross-compiler not found!"
|
||||
print_error "Install with: sudo apt install gcc-aarch64-linux-gnu"
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
# Function to build release binaries
|
||||
build_release_binaries() {
|
||||
print_status "Building release binaries..."
|
||||
@@ -165,9 +155,9 @@ build_release_binaries() {
|
||||
# Build x86_64 version
|
||||
print_status "Building x86_64 version..."
|
||||
make clean > /dev/null 2>&1
|
||||
if make CC=gcc > /dev/null 2>&1; then
|
||||
if [[ -f "src/main" ]]; then
|
||||
cp src/main c-relay-x86_64
|
||||
if make x86 > /dev/null 2>&1; then
|
||||
if [[ -f "build/c_relay_x86" ]]; then
|
||||
cp build/c_relay_x86 c-relay-x86_64
|
||||
print_success "x86_64 binary created: c-relay-x86_64"
|
||||
else
|
||||
print_error "x86_64 binary not found after compilation"
|
||||
@@ -178,25 +168,19 @@ build_release_binaries() {
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check for ARM64 cross-compiler
|
||||
if check_cross_compiler; then
|
||||
# Build ARM64 version
|
||||
print_status "Building ARM64 version..."
|
||||
make clean > /dev/null 2>&1
|
||||
if make CC=aarch64-linux-gnu-gcc > /dev/null 2>&1; then
|
||||
if [[ -f "src/main" ]]; then
|
||||
cp src/main c-relay-arm64
|
||||
print_success "ARM64 binary created: c-relay-arm64"
|
||||
else
|
||||
print_error "ARM64 binary not found after compilation"
|
||||
exit 1
|
||||
fi
|
||||
# Try to build ARM64 version
|
||||
print_status "Attempting ARM64 build..."
|
||||
make clean > /dev/null 2>&1
|
||||
if make arm64 > /dev/null 2>&1; then
|
||||
if [[ -f "build/c_relay_arm64" ]]; then
|
||||
cp build/c_relay_arm64 c-relay-arm64
|
||||
print_success "ARM64 binary created: c-relay-arm64"
|
||||
else
|
||||
print_error "ARM64 build failed"
|
||||
exit 1
|
||||
print_warning "ARM64 binary not found after compilation"
|
||||
fi
|
||||
else
|
||||
print_warning "ARM64 cross-compiler not available, skipping ARM64 build"
|
||||
print_warning "ARM64 build failed - ARM64 cross-compilation not properly set up"
|
||||
print_status "Only x86_64 binary will be included in release"
|
||||
fi
|
||||
|
||||
# Restore normal build
|
||||
|
||||
Reference in New Issue
Block a user