OSDN Git Service

Evernoteサムネイルの取得に失敗する問題を修正した
[neighbornote/NeighborNote.git] / build.xml
index 5a3f99e..9cb182c 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -1,11 +1,11 @@
 <?xml version='1.0' encoding='utf-8'?>
 <project default="jar" basedir=".">
   <!-- program name -->
-  <property name="project.name" value="nevernote"/>
+  <property name="project.name" value="neighbornote"/>
   <property name="application.name" value="sandbox"/>
 
   <!-- targeted QtJambi library version  -->
-  <property name="qtjambi.ver" value="4.6.3"/>
+  <property name="qtjambi.ver" value="4.5.2_01"/>
 
   <!-- project directory hierarchy -->
   <property name="src.dir" value="src"/>
@@ -17,8 +17,6 @@
   <property name="tr.dir" value="translations"/>
 
   <!-- needed for running -->
-  <property name="db.dir" value="db"/>
-  <property name="logs.dir" value="logs"/>
 
   <!-- debug -->
   <property name="javac.debug" value="true"/>
   <property name="jvm.gcs" value="incgc"/><!-- GC strategy -->
 
   <!-- product jar file -->
-  <property name="jar.name" value="nevernote.jar"/>
+  <property name="jar.name" value="neighbornote.jar"/>
 
   <!-- product exec command -->
-  <property name="shell.command" value="nevernote.sh"/>
-  <property name="bat.command" value="nevernote.bat"/>
+  <property name="shell.command" value="neighbornote.sh"/>
+  <property name="bat.command" value="neighbornote.bat"/>
 
   <!-- qt utils -->
   <property name="linguist.update" value="lupdate"/>
   <property name="linguist.release" value="lrelease"/>
 
   <!-- translations -->
-  <property name="linguist.project" value="nevernote.pro"/>
+  <property name="linguist.project" value="neighbornote.pro"/>
 
   <!-- documents -->
   <property name="doc.changelog" value="changelog.txt"/>
       <os name="Mac OS X" />
   </condition>
 
+  <!-- flexible looking for qtjambi library path -->
+  <target name="set-jambi-path32" depends="set-jambi-path" unless="qtlib.dir">
+      <available file="../qtjambi-linux32-lgpl-${qtjambi.ver}"
+                 property="qtlib.dir" value="../qtjambi-linux32-lgpl-${qtjambi.ver}"/>
+      <available file="../qtjambi-linux32-community-${qtjambi.ver}"
+                 property="qtlib.dir" value="../qtjambi-linux32-community-${qtjambi.ver}"/>
+  </target>
+  <target name="set-jambi-path64" depends="set-jambi-path" unless="qtlib.dir">
+      <available file="../qtjambi-linux64-lgpl-${qtjambi.ver}"
+                 property="qtlib.dir" value="../qtjambi-linux64-lgpl-${qtjambi.ver}"/>
+      <available file="../qtjambi-linux64-community-${qtjambi.ver}"
+                 property="qtlib.dir" value="../qtjambi-linux64-community-${qtjambi.ver}"/>
+  </target>
+  <target name="set-jambi-pathmac" depends="set-jambi-path" unless="qtlib.dir">
+      <available file="../qtjambi-macosx-lgpl-${qtjambi.ver}"
+                 property="qtlib.dir" value="../qtjambi-macosx-lgpl-${qtjambi.ver}"/>
+      <available file="../qtjambi-macosx-community-${qtjambi.ver}"
+                 property="qtlib.dir" value="../qtjambi-macosx-community-${qtjambi.ver}"/>
+  </target>
+  <target name="set-jambi-path" unless="qtlib.dir">
+      <available file="${user.home}/lib/qtjambi/qtjambi-${qtjambi.ver}.jar" 
+                 property="qtlib.dir" value="${user.home}/lib/qtjambi"/>
+      <available file="${user.home}/lib/qtjambi-${qtjambi.ver}.jar" 
+                 property="qtlib.dir" value="${user.home}/lib"/>
+      <available file="lib/qtjambi-${qtjambi.ver}.jar"
+                 property="qtlib.dir" value="lib"/>
+  </target>
+
   <!-- os dependent library path and lib file -->
   <target name="check_syslib_path" depends="lib-if_windows, lib-if_linux, lib-if_linux64"/>
 
       <property name="qtjambi-platform" value="win32-msvc2005"/>
   </target>
 
-  <target name="lib-if_linux" if="isLinux">
+  <target name="lib-if_linux" depends="set-jambi-path32" if="isLinux">
       <property name="system.lib.dir" value="/usr/share/java"/>
-      <property name="qtlib.dir" value="/home/miurahr/lib/qtjambi"/>
       <property name="qtjambi.platform" value="linux32-gcc"/>
+      <echo message="use qtjambi library at ${qtlib.dir}"/>
   </target>
-  <target name="lib-if_linux64" if="isLinux64">
+  <target name="lib-if_linux64" depends="set-jambi-path64" if="isLinux64">
       <property name="system.lib.dir" value="/usr/share/java"/>
-      <property name="qtlib.dir" value="lib"/>
       <property name="qtjambi.platform" value="linux64-gcc"/>
+      <echo message="use qtjambi library at ${qtlib.dir}"/>
   </target>
-  <target name="lib-if_macosx" if="isMacOSX">
+  <target name="lib-if_macosx" depends="set-jambi-pathmac" if="isMacOSX">
       <property name="system.lib.dir" value="/Library/Java/Extensions"/>
-      <property name="qtlib.dir" value="lib"/>
       <property name="qtjambi.platform" value="macosx-gcc"/>
+      <echo message="use qtjambi library at ${qtlib.dir}"/>
   </target>
 
   <!-- compiler classpath -->
   <target name="set_classpath" depends="check_syslib_path">
     <path id="java.classpath">
-      <!-- system third party library -->
-      <pathelement location="${system.lib.dir}/pdfrenderer.jar"/>
-      <pathelement location="${system.lib.dir}/log4j-1.2.jar"/>
-      <pathelement location="${lib.dir}/h2-1.2.136.jar"/>
       <!-- bundled library -->
-      <pathelement location="${lib.dir}/evernote.jar"/>
+      <pathelement location="${lib.dir}/apache-mime4j-0.6.jar"/>
+      <pathelement location="${lib.dir}/commons-codec-1.5.jar"/>
+      <pathelement location="${lib.dir}/commons-compress-1.2.jar"/>
+      <pathelement location="${lib.dir}/commons-lang3-3.0.jar"/>
+      <pathelement location="${lib.dir}/commons-logging-1.1.1.jar"/>
+      <pathelement location="${lib.dir}/evernote-api-1.25.0.jar"/>
       <pathelement location="${lib.dir}/libthrift.jar"/>
+      <pathelement location="${lib.dir}/log4j-1.2.14.jar"/>
+      <pathelement location="${lib.dir}/h2-1.3.158.jar"/>
+      <pathelement location="${lib.dir}/jtidy-r938.jar"/>
+      <pathelement location="${lib.dir}/httpclient-4.1.1.jar"/>
+      <pathelement location="${lib.dir}/httpcore-4.1.jar"/>
+      <pathelement location="${lib.dir}/httpmime-4.1.1.jar"/>
+      <pathelement location="${lib.dir}/jaxen-1.1.3.jar"/>
+      <pathelement location="${lib.dir}/jazzy.jar"/>
+      <pathelement location="${lib.dir}/pdfbox-app-1.6.0.jar"/>
+      <pathelement location="${lib.dir}/poi-3.7-20101029.jar"/>
+      <pathelement location="${lib.dir}/poi-ooxml-3.7.jar"/>
+      <pathelement location="${lib.dir}/poi-ooxml-schemas-3.7-20101029.jar"/>
+      <pathelement location="${lib.dir}/poi-scratchpad-3.7-20101029.jar"/>
+      <pathelement location="${lib.dir}/scribe-1.3.0.jar"/>
+      <pathelement location="${lib.dir}/tika.jar"/>
+      <pathelement location="${lib.dir}/xmlbeans-2.3.0.jar"/>
+      <pathelement location="${lib.dir}/xsdlib-20060615.jar"/>
       <!-- dependent library -->
       <pathelement location="${qtlib.dir}/qtjambi-${qtjambi.ver}.jar"/>
       <pathelement location="${qtlib.dir}/qtjambi-${qtjambi.platform}-${qtjambi.ver}.jar"/>
   <target name="compile" depends="init">
     <javac srcdir="${src.dir}"
        destdir="${classes.dir}"
-       debug="${javac.debug}">
+       debug="${javac.debug}"
+       includeantruntime="false">
        <classpath refid="java.classpath"/>
     </javac>
   </target>
 
-  <target name="resources" depends="init">
+  <target name="resources" depends="init,release-tr">
       <mkdir dir="${classes.dir}/cx/fbn/nevernote/icons"/>
       <copy todir="${classes.dir}/cx/fbn/nevernote/icons">
          <fileset dir="${src.dir}/cx/fbn/nevernote/icons"/>
       </copy>
-      <copy file="${src.dir}/com/swabunga/spell/engine/configuration.properties"
-            todir="${classes.dir}/com/swabunga/spell/engine/"/>
       <mkdir dir="${classes.dir}/translations"/>
       <copy todir="${classes.dir}/translations">
           <fileset file="translations/*.qm"/>
     <mkdir dir="${dist.dir}/lib"/>
     <mkdir dir="${dist.dir}/bin"/>
     <mkdir dir="${dist.dir}/doc"/>
-    <mkdir dir="${dist.dir}/db"/>
-    <mkdir dir="${dist.dir}/logs"/>
   </target>
 
   <target name="dist" depends="jar, dist-init">
        <fileset dir="${doc.dir}"/>
      </copy>
      <exec dir="dist" executable="tar">
-         <arg line="czf ../../nevernote-bin.tar.gz ."/>
+         <arg line="czf ../../neighbornote-bin.tar.gz ."/>
      </exec>
   </target>
 
   <!-- test run -->
-  <target name="run-init" depends="init, jar">
+  <target name="run-init" depends="init, resources, jar">
     <tstamp/>
-    <mkdir dir="${logs.dir}"/>
-    <mkdir dir="${db.dir}"/>
     <mkdir dir="res"/>
   </target>
 
     <delete dir="${logs.dir}" />
     <delete dir="${db.dir}" />
     <delete file="secure.txt"/>
+    <delete>
+          <fileset file="${tr.dir}/*.qm"/>
+          <fileset file="${tr.dir}/*.po"/>
+    </delete>
     <delete dir="res"/>
   </target>