Skip to content

Instantly share code, notes, and snippets.

@mustafakibar
Forked from opatut/love-android-package
Created April 26, 2018 19:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mustafakibar/61b7c92ac0f386dc69f778897c306eea to your computer and use it in GitHub Desktop.
Save mustafakibar/61b7c92ac0f386dc69f778897c306eea to your computer and use it in GitHub Desktop.
Android Löve2D debugging helper
#!/bin/bash
GAME=$1
DIR="/sdcard/love"
MIME="application/x-love-game"
INTENT="org.love2d.android/.GameActivity"
if [[ -z "$1" ]]; then
GAME="game.love"
echo "Creating game package at $GAME"
zip -r "$GAME" * --exclude "$GAME" .\* > /dev/null
fi
echo "Sending package"
adb shell mkdir -p $DIR
adb push $GAME $DIR/ 2> /dev/null
echo "Restarting application"
adb shell am start -S -n "$INTENT" -d "file://$DIR/$GAME" -t "$MIME" -a android.intent.action.VIEW > /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment