Add zip packaging and MD5 checksum generation to build.sh

- After successful binary creation, create mbetterc_latest.zip containing the executable
- Generate MD5 checksum of the zip file as mbetter_latest.md5.txt
- Both files are created in the dist directory for easy distribution
parent b2e00a12
...@@ -79,6 +79,37 @@ fi ...@@ -79,6 +79,37 @@ fi
echo "🔨 Starting build process..." echo "🔨 Starting build process..."
python3 build.py python3 build.py
# Check if build was successful and create zip package
if [ -d "dist" ] && [ "$(ls -A dist)" ]; then
echo "📦 Build successful, creating latest zip package..."
# Find the main executable (should be MbetterClient on Unix systems)
EXECUTABLE_NAME="MbetterClient"
if [ -f "dist/$EXECUTABLE_NAME" ]; then
echo " 📁 Found executable: $EXECUTABLE_NAME"
# Create zip file
cd dist
zip -r mbetterc_latest.zip "$EXECUTABLE_NAME"
echo " 📦 Created: mbetterc_latest.zip"
# Generate MD5 checksum
if command -v md5sum &> /dev/null; then
md5sum mbetterc_latest.zip > mbetter_latest.md5.txt
echo " 🔐 Generated MD5 checksum: mbetter_latest.md5.txt"
else
echo " ⚠️ md5sum command not available, skipping checksum generation"
fi
cd ..
else
echo " ⚠️ Executable $EXECUTABLE_NAME not found in dist directory"
fi
else
echo "❌ Build failed or dist directory is empty"
exit 1
fi
# Restore MBetterDiscovery.exe if backup exists # Restore MBetterDiscovery.exe if backup exists
if [ -f "/tmp/MBetterDiscovery.exe.backup" ]; then if [ -f "/tmp/MBetterDiscovery.exe.backup" ]; then
echo "📦 Restoring MBetterDiscovery.exe..." echo "📦 Restoring MBetterDiscovery.exe..."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment