Makefile fix(1), More stdout info on --X-photo(2):
authorNiki Roo <roo.niki@gmail.com>
Tue, 29 Mar 2016 10:08:25 +0000 (12:08 +0200)
committerNiki Roo <roo.niki@gmail.com>
Tue, 29 Mar 2016 10:08:25 +0000 (12:08 +0200)
1: recompile lanterna when sources change
2: display "Loading xxx" and "Saving xxx" for each file

Makefile
src/be/nikiroo/jvcard/launcher/Main.java

index 93b55b9474a9832784099ad1fe5f672ee9c83ce1..83242cc2e6d4763f9db181b1a01d490cfb91c674 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -30,7 +30,6 @@ mrpropre: clean
        @rm -f jvcard.jar jvcard-`grep "APPLICATION_VERSION" src/be/nikiroo/jvcard/launcher/Main.java | head -n1 | cut -d'"' -f2`.jar
 
 jvcard.jar: bin/be/nikiroo/jvcard/launcher/Main.class src/be/nikiroo/jvcard/*/* src/be/nikiroo/jvcard/*
-       @mkdir -p bin/
        @echo 'Main-Class: be.nikiroo.jvcard.launcher.Main' > bin/manifest
        @echo >> bin/manifest
        @echo Creating jar file jvcard-`grep "APPLICATION_VERSION" src/be/nikiroo/jvcard/launcher/Main.java | head -n1 | cut -d'"' -f2`.jar...
@@ -71,7 +70,7 @@ bin/files: src/be/nikiroo/jvcard/*/* src/be/nikiroo/jvcard/*
        @mkdir -p bin/
        @find src/be/ -name '*.java' > bin/files
 
-bin/lanterna:
+bin/lanterna: src/com/googlecode/lanterna/* src/com/googlecode/lanterna/*/* src/com/googlecode/lanterna/*/*/*
        @mkdir -p bin/
        @find src/com/ -name '*.java' > bin/lanterna
        javac -encoding UTF-8 -source 5 @bin/lanterna -d bin/ || rm bin/lanterna
index 66625f7e37d892f9585c4a21a041191dd1f7e945..080223d07251b8b54e561c5b917e2dbe477def19 100644 (file)
@@ -316,6 +316,7 @@ public class Main {
                                                File f = new File(dir, filename);
 
                                                if (f.exists()) {
+                                                       System.out.println("Loading " + f);
                                                        try {
                                                                String b64 = StringUtils.fromImage(ImageIO
                                                                                .read(f));
@@ -356,6 +357,7 @@ public class Main {
                                                if (photo != null) {
                                                        String filename = contact.toString(format, "");
                                                        File f = new File(dir, filename + ".png");
+                                                       System.out.println("Saving " + f);
                                                        try {
                                                                ImageIO.write(
                                                                                StringUtils.toImage(photo.getValue()),