-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage_miyoo.sh
More file actions
71 lines (59 loc) · 1.72 KB
/
Copy pathpackage_miyoo.sh
File metadata and controls
71 lines (59 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/bash
# Configuration
APP_NAME="NotepadInc"
VERSION="1.0.0"
DIST_DIR="dist/$APP_NAME"
echo "📦 Packaging $APP_NAME for Miyoo Mini Plus..."
# 1. Clean previous build
make clean
rm -rf dist
# 2. Build for Miyoo (Cross-Compile)
# Check if compiler exists
if command -v arm-linux-gnueabihf-g++ &> /dev/null; then
echo "🛠 Compiling with arm-linux-gnueabihf-g++..."
make miyoo
else
echo "⚠️ Cross-compiler not found! Building generic host binary instead for testing."
echo " (To build for device, ensure arm-linux-gnueabihf-g++ is in your PATH)"
make all
fi
# 3. Create Directory Structure
echo "📂 Creating directory structure..."
mkdir -p "$DIST_DIR"
mkdir -p "$DIST_DIR/assets/fonts"
mkdir -p "$DIST_DIR/notes"
mkdir -p "$DIST_DIR/.sys_cache"
# 4. Copy Files
echo "📄 Copying files..."
if [ -f "$APP_NAME" ]; then
cp "$APP_NAME" "$DIST_DIR/"
else
echo "❌ Error: Binary not found!"
exit 1
fi
# Copy assets if they exist
if [ -d "assets" ]; then
cp -r assets/* "$DIST_DIR/assets/"
else
echo "⚠️ Warning: assets directory not found. Creating placeholder."
# We need a font for SDL_ttf
# Assuming user has one or we should check
fi
# Create launch script (optional but good for Onion OS)
cat > "$DIST_DIR/launch.sh" << EOL
#!/bin/sh
cd \$(dirname "\$0")
./$APP_NAME
EOL
chmod +x "$DIST_DIR/launch.sh"
# Create icon placeholder
touch "$DIST_DIR/icon.png"
# Create config.json / settings.cfg placeholder
touch "$DIST_DIR/settings.cfg"
# 5. Zip it up
echo "🤐 Zipping package..."
cd dist
zip -r "$APP_NAME-$VERSION-Miyoo.zip" "$APP_NAME"
cd ..
echo "✅ Done! Package available at: dist/$APP_NAME-$VERSION-Miyoo.zip"
echo " Unzip this to /mnt/SDCARD/App/ on your Miyoo Mini Plus."