From bc2f79f652659843e448f56ab438c412263575b3 Mon Sep 17 00:00:00 2001 From: Andy Spencer Date: Mon, 15 Apr 2013 05:55:20 +0000 Subject: [PATCH] Add rules for card images For now, the cards are left in branches so we can change them easily without cluttering up the history. --- .gitignore | 4 ++++ makefile | 19 ++++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 756a502..a9c24c6 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,7 @@ bin/ gen/ obj/ + +# Leave out cards for now +res/drawable/card_*.png +opt/drawable/card_*.svg diff --git a/makefile b/makefile index 8771130..e0a1d30 100644 --- a/makefile +++ b/makefile @@ -28,7 +28,6 @@ logcat: run: bin/install.stamp adb shell am start -W -a android.intent.action.MAIN -n $(PACKAGE)/.Main - install bin/install.stamp: $(OUTPUT) adb install -r $+ @@ -38,6 +37,24 @@ uninstall: adb uninstall $(PACKAGE) rm bin/install.stamp +png-cards: + git checkout cards-png -- 'res/drawable/card_*.png' + git reset HEAD -- 'res/drawable/card_*.png' + +svg-cards: + git checkout cards-svg -- 'opt/drawable/card_*.svg' + git reset HEAD -- 'opt/drawable/card_*.svg' + +convert: + for svg in opt/drawable/*.svg; do \ + png=$${svg/svg/png}; \ + png=$${png/opt/res}; \ + rsvg-convert -w 2048 -h 2048 \ + $$svg -o $$png; \ + convert -trim -resize '256x256!' \ + $$png $$png; \ + done + # Rules %.apk: %.dex %.res | bin @echo "APK $@.in" -- 2.43.2