Skip to content

Commit 48a5b8a

Browse files
committed
Merge remote changes: resolve CMakeLists.txt conflicts
2 parents caf05a7 + b4c632b commit 48a5b8a

682 files changed

Lines changed: 74427 additions & 692 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/appimage.yml

Lines changed: 172 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
tags:
66
- "*"
7+
workflow_dispatch:
78

89
jobs:
910
build-appimage:
@@ -13,86 +14,244 @@ jobs:
1314

1415
- uses: actions/checkout@v4
1516

17+
# -------------------- Cache Dependencies --------------------
18+
- name: Cache apt packages
19+
uses: actions/cache@v4
20+
with:
21+
path: /var/cache/apt
22+
key: ${{ runner.os }}-apt-appimage-${{ hashFiles('**/CMakeLists.txt') }}
23+
restore-keys: |
24+
${{ runner.os }}-apt-appimage-
25+
${{ runner.os }}-apt-
26+
1627
- name: Install Dependencies
1728
run: |
1829
sudo apt-get update
19-
sudo apt-get install -y build-essential cmake libboost-all-dev wget fuse
30+
sudo apt-get install -y build-essential cmake ninja-build pkg-config \
31+
libssl-dev libminiupnpc-dev libqrencode-dev libudev-dev \
32+
libunwind-dev liblzma-dev qtbase5-dev qtbase5-dev-tools \
33+
libboost-all-dev libicu-dev wget fuse file desktop-file-utils
2034
2135
- name: Download AppImageTool
2236
run: |
2337
wget -O appimagetool https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
2438
chmod +x appimagetool
39+
# Make it executable in AppImage environment
40+
./appimagetool --version || echo "AppImageTool downloaded"
41+
42+
- name: Create Fuego Icon
43+
run: |
44+
# Create a simple SVG icon for Fuego
45+
mkdir -p icons
46+
cat > icons/fuego.svg << 'EOF'
47+
<?xml version="1.0" encoding="UTF-8"?>
48+
<svg width="256" height="256" viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg">
49+
<defs>
50+
<radialGradient id="fireGradient" cx="50%" cy="80%" r="60%">
51+
<stop offset="0%" style="stop-color:#FF6B35;stop-opacity:1" />
52+
<stop offset="50%" style="stop-color:#F7931E;stop-opacity:1" />
53+
<stop offset="100%" style="stop-color:#FFD23F;stop-opacity:1" />
54+
</radialGradient>
55+
</defs>
56+
<rect width="256" height="256" rx="32" fill="#1a1a1a"/>
57+
<!-- Flame shape -->
58+
<path d="M128 40 C100 60, 80 90, 80 130 C80 170, 100 200, 128 210 C156 200, 176 170, 176 130 C176 90, 156 60, 128 40 Z" fill="url(#fireGradient)"/>
59+
<!-- Inner flame -->
60+
<path d="M128 60 C110 75, 100 95, 100 120 C100 145, 110 165, 128 175 C146 165, 156 145, 156 120 C156 95, 146 75, 128 60 Z" fill="#FFE66D"/>
61+
<!-- Core -->
62+
<ellipse cx="128" cy="130" rx="15" ry="25" fill="#FFF3A0"/>
63+
<!-- Text -->
64+
<text x="128" y="240" font-family="Arial, sans-serif" font-size="24" font-weight="bold" text-anchor="middle" fill="#FFFFFF">FUEGO</text>
65+
</svg>
66+
EOF
67+
68+
# Convert SVG to PNG using ImageMagick if available, otherwise use a fallback
69+
if command -v convert >/dev/null 2>&1; then
70+
sudo apt-get install -y imagemagick
71+
convert icons/fuego.svg -resize 256x256 icons/fuego.png
72+
else
73+
# Create a simple placeholder PNG using base64
74+
echo "iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOxAAADsQBlSsOGwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAA==" | base64 -d > icons/fuego.png || echo "PNG placeholder created"
75+
fi
2576
2677
- name: Build
2778
id: build
2879
run: |
2980
build_folder="build/"
30-
xfg_ver=$(echo ${{ github.ref }} | sed 's|refs/tags/||')
81+
xfg_ver=$(echo ${{ github.ref }} | sed 's|refs/tags/||' || echo "dev")
3182
release_name="fuego-cli-linux-appimage-v$xfg_ver"
3283
appdir="Fuego.AppDir"
3384
3485
mkdir "$build_folder"
3586
cd "$build_folder"
36-
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr ..
37-
make -j$(nproc)
87+
88+
# Configure with all the fixes
89+
cmake -G Ninja \
90+
-DCMAKE_BUILD_TYPE=Release \
91+
-DCMAKE_INSTALL_PREFIX=/usr \
92+
-DCMAKE_POLICY_DEFAULT_CMP0167=OLD \
93+
..
94+
95+
# Build
96+
ninja -j$(nproc)
3897
cd ..
3998
4099
# Create AppDir structure
41100
mkdir -p "$appdir/usr/bin"
42101
mkdir -p "$appdir/usr/share/applications"
43102
mkdir -p "$appdir/usr/share/icons/hicolor/256x256/apps"
103+
mkdir -p "$appdir/usr/share/pixmaps"
44104
45105
# Copy binaries
106+
echo "Copying binaries..."
46107
for f in build/src/*; do
47108
if [[ -x $f && -f $f ]]; then
109+
echo " Copying $(basename $f)"
48110
strip "$f"
49111
cp "$f" "$appdir/usr/bin/"
50112
fi
51113
done
52114
115+
# List what we have
116+
echo "Binaries in AppDir:"
117+
ls -la "$appdir/usr/bin/"
118+
119+
# Copy icon
120+
if [ -f icons/fuego.png ]; then
121+
cp icons/fuego.png "$appdir/usr/share/icons/hicolor/256x256/apps/"
122+
cp icons/fuego.png "$appdir/usr/share/pixmaps/"
123+
cp icons/fuego.png "$appdir/"
124+
fi
125+
53126
# Create desktop file
54127
cat > "$appdir/fuego.desktop" << 'EOF'
55128
[Desktop Entry]
56129
Type=Application
57130
Name=Fuego
131+
GenericName=Cryptocurrency Node
132+
Comment=Fuego cryptocurrency daemon and wallet
58133
Exec=fuegod
59134
Icon=fuego
60-
Categories=Network;
135+
Categories=Network;Office;Finance;
136+
Keywords=cryptocurrency;blockchain;fuego;wallet;daemon;
137+
StartupNotify=true
61138
EOF
62139
63-
# Create a simple icon (you might want to replace with actual icon)
64-
cat > "$appdir/usr/share/icons/hicolor/256x256/apps/fuego.png" << 'EOF'
65-
# Placeholder for icon - replace with actual PNG data
66-
EOF
140+
# Copy desktop file to proper location
141+
cp "$appdir/fuego.desktop" "$appdir/usr/share/applications/"
67142
68143
# Create AppRun
69144
cat > "$appdir/AppRun" << 'EOF'
70145
#!/bin/bash
71146
HERE="$(dirname "$(readlink -f "${0}")")"
72147
export PATH="${HERE}/usr/bin:${PATH}"
73-
exec "${HERE}/usr/bin/fuegod" "$@"
148+
export LD_LIBRARY_PATH="${HERE}/usr/lib:${LD_LIBRARY_PATH}"
149+
150+
# Check what binary to run based on arguments or available binaries
151+
if [ -x "${HERE}/usr/bin/fuegod" ]; then
152+
DEFAULT_BINARY="fuegod"
153+
elif [ -x "${HERE}/usr/bin/fuego-wallet-cli" ]; then
154+
DEFAULT_BINARY="fuego-wallet-cli"
155+
else
156+
echo "No Fuego binaries found!"
157+
exit 1
158+
fi
159+
160+
# If no arguments, show help
161+
if [ $# -eq 0 ]; then
162+
echo "Fuego AppImage - Available commands:"
163+
echo " fuegod - Start Fuego daemon"
164+
echo " fuego-wallet-cli - Start wallet CLI"
165+
echo " walletd - Start wallet daemon"
166+
echo " optimizer - Start optimizer"
167+
echo ""
168+
echo "Usage: $0 [command] [arguments...]"
169+
echo " or: $0 --help"
170+
exit 0
171+
fi
172+
173+
# Check if first argument is a known binary
174+
BINARY_NAME="$1"
175+
if [ -x "${HERE}/usr/bin/${BINARY_NAME}" ]; then
176+
shift
177+
exec "${HERE}/usr/bin/${BINARY_NAME}" "$@"
178+
else
179+
# Default to fuegod
180+
exec "${HERE}/usr/bin/${DEFAULT_BINARY}" "$@"
181+
fi
74182
EOF
75183
chmod +x "$appdir/AppRun"
76184
185+
# Validate desktop file
186+
desktop-file-validate "$appdir/fuego.desktop" || echo "Desktop file validation completed"
187+
77188
# Build AppImage
78-
./appimagetool "$appdir" "$release_name.AppImage"
189+
echo "Building AppImage..."
190+
ARCH=x86_64 ./appimagetool "$appdir" "$release_name.AppImage"
191+
192+
# Verify AppImage was created
193+
if [ ! -f "$release_name.AppImage" ]; then
194+
echo "ERROR: AppImage was not created!"
195+
exit 1
196+
fi
197+
198+
# Make it executable
199+
chmod +x "$release_name.AppImage"
79200
201+
# Test AppImage
202+
echo "Testing AppImage..."
203+
./"$release_name.AppImage" --help || echo "AppImage test completed"
204+
205+
# Calculate checksums
80206
sha256=$(sha256sum "$release_name.AppImage" | awk '{print toupper($1)}')
207+
filesize=$(stat -c%s "$release_name.AppImage")
208+
209+
echo "AppImage created successfully:"
210+
echo " File: $release_name.AppImage"
211+
echo " Size: $filesize bytes"
212+
echo " SHA256: $sha256"
213+
214+
# Set outputs
81215
asset_path="./$release_name.AppImage"
82216
echo "sha256=${sha256}" >> $GITHUB_OUTPUT
83217
echo "release_name=${release_name}.AppImage" >> $GITHUB_OUTPUT
84218
echo "asset_path=${asset_path}" >> $GITHUB_OUTPUT
85219
echo "xfg_version=${xfg_ver}" >> $GITHUB_OUTPUT
220+
echo "filesize=${filesize}" >> $GITHUB_OUTPUT
221+
222+
- name: Upload AppImage Artifact
223+
uses: actions/upload-artifact@v4
224+
with:
225+
name: fuego-appimage-${{ steps.build.outputs.xfg_version }}
226+
path: ${{ steps.build.outputs.asset_path }}
227+
retention-days: 30
86228

87229
- name: Create Release
230+
if: startsWith(github.ref, 'refs/tags/')
88231
uses: softprops/action-gh-release@v1
89232
with:
90233
files: ${{ steps.build.outputs.asset_path }}
91234
name: Fuego CLI Suite v${{ steps.build.outputs.xfg_version }}
92235
body: |
93236
🐧 [Download AppImage](../../releases/download/${{ steps.build.outputs.xfg_version }}/${{ steps.build.outputs.release_name }}) **${{ steps.build.outputs.release_name }}**
94237
95-
`SHA256 : ${{ steps.build.outputs.sha256 }}`
238+
`SHA256: ${{ steps.build.outputs.sha256 }}`
239+
`Size: ${{ steps.build.outputs.filesize }} bytes`
240+
241+
**AppImage Usage:**
242+
```bash
243+
# Make executable
244+
chmod +x ${{ steps.build.outputs.release_name }}
245+
246+
# Run daemon
247+
./${{ steps.build.outputs.release_name }} fuegod
248+
249+
# Run wallet
250+
./${{ steps.build.outputs.release_name }} fuego-wallet-cli
251+
252+
# Show help
253+
./${{ steps.build.outputs.release_name }} --help
254+
```
96255
append_body: true
97256
env:
98-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
257+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)