[brailleblaster] push by john.bo...@xxxxxxxxxxxxxxxxx - Updating BUILD.xml file on 2012-03-14 20:34 GMT

  • From: brailleblaster@xxxxxxxxxxxxxx
  • To: brailleblaster@xxxxxxxxxxxxx
  • Date: Wed, 14 Mar 2012 20:35:09 +0000

Revision: 75e5c35f17ff
Author:   John Boyer <john.boyer@xxxxxxxxxxxxxxxxx>
Date:     Wed Mar 14 13:33:55 2012
Log:      Updating BUILD.xml file
http://code.google.com/p/brailleblaster/source/detail?r=75e5c35f17ff

Modified:
 /BUILD.txt
 /build.xml
 /src/main/org/brailleblaster/settings/Welcome.java
 /src/main/org/brailleblaster/wordprocessor/DocumentManager.java
 /src/main/org/brailleblaster/wordprocessor/NewDocument.java

=======================================
--- /BUILD.txt  Sun Mar 11 04:51:16 2012
+++ /BUILD.txt  Wed Mar 14 13:33:55 2012
@@ -2,11 +2,10 @@
 to read that file to get an idea of the structure and operation of
 BrailleBlaster.

-BrailleBlaster was written using Java 5, because that was what was
-available. It can be compiled and run on Java 7. However, if compiled on
-Java 7 it will not run on Java 6. Similarly, if compiled on Java 6 it
-will not run on Java 5 or any previous version. The developers may move
-to Java 7 if it contains new usable features.
+BrailleBlaster was written using Java 6, because that was what was
+available. The Ant build.xml file enables compilation on Java 5, 6 and
+7. The jar files produced should run on any of these versions. The
+developers may move to Java 7 if it contains new usable features.

 The best way to build BrailleBlaster is to clone the Mercurial
 reopsitory and then place native and jar files in their proper
@@ -21,7 +20,10 @@
 commons-exec-1.1.jar
 jliblouisutdml.jar (bindings)
 xom.jar
-(others as time goes on)
+(others as time goes on)
+
+These .jar files can be downloaded from the "for developers" page at
+httP://www.brailleblaster.org

 Then run ant. This will place brailleblaster.jar in the dist directory.

@@ -30,15 +32,14 @@

 liblouis
 liblouisutdml
+libxml2
 (Others as time goes on)

-The compilation should place command-line toolls in the bin
-sibdirectory, libraries in the lib subdirectory and platform-independent
-files in the programData subdirectory. It may also produce a number of
-other subdirectories. These are not necessary for BrailleBlaster and
-should be deleted. The binary components may also be compiled into their
-default locations and the necessary parts copied into the appropriate
-BrailleBlaster locations.
+On Linux and Mac compiled libraries should be copied into the
+dist/native/lib subdirectory. Linux sustems usually have libxml2
+installed, so it need not be compiled. On Windows systems compiled
+libraries should be placed in the dist directory along with the
+brailleblaster.jar file created by Ant. This may change in the future.

 Rename the dist directory brailleblaster and package it in a way
 suitable for your platform. you may want to place a shortcut with the
=======================================
--- /build.xml  Tue Mar 13 08:09:18 2012
+++ /build.xml  Wed Mar 14 13:33:55 2012
@@ -14,7 +14,7 @@

 <target name="compile" depends="init">
 <javac srcdir="${srcdir}" destdir="${builddir}"
-includeantruntime="false" target="1.5">
+includeantruntime="false" source="1.5" target="1.5">
 <classpath>
 <pathelement path="${classpath}"/>
 <pathelement location="${classpath}/swt.jar"/>
@@ -27,11 +27,11 @@
 </target>

 <target name="dist" depends="compile">
-<jar jarfile="${distdir}/brailleblaster.jar"
+<jar jarfile="${distdir}/brailleblaster.jar"
 basedir="${builddir}">
 <manifest>
 <attribute name="Main-Class" value="org.brailleblaster.Main"/>
-<attribute name="Class-Path" value="lib/commons-exec-1.1.jar
+<attribute name="Class-Path" value="lib/commons-exec-1.1.jar
 lib/jliblouisutdml.jar
 lib/swt.jar
 lib/xom-1.2.6.jar
=======================================
--- /src/main/org/brailleblaster/settings/Welcome.java Sun Mar 11 04:51:16 2012 +++ /src/main/org/brailleblaster/settings/Welcome.java Wed Mar 14 13:33:55 2012
@@ -51,7 +51,7 @@
 + "\n\n"
 + "In this release you can type in the left-hand pane (DAISY view)\n"
 + "Then use Translate, followed by SaveAs or EmbossNow\n"
-+ "Instead of typing in text you can open a file";
++ "Instead of typing in text you can open a file.\n";

 public Welcome() {
 Display display = BBIni.getDisplay();
=======================================
--- /src/main/org/brailleblaster/wordprocessor/DocumentManager.java Tue Mar 13 08:09:18 2012 +++ /src/main/org/brailleblaster/wordprocessor/DocumentManager.java Wed Mar 14 13:33:55 2012
@@ -81,8 +81,7 @@
 String configFileList = null;
 String tempPath;
 boolean haveOpenedFile = false;
-String UTDMLTranslation = null;
-String BRFTranslation = null;
+String translatedFileName = null;
 liblouisutdml louisutdml;
 String logFile = "Translate.log";
 String configSettings = null;
@@ -305,16 +304,16 @@
 new Notify ("could not write to " + saveTo);
 return;
 }
-if (BRFTranslation == null) {
+if (translatedFileName == null) {
 new Notify ("There is no translated file to be saved.");
 return;
 }
 FileInputStream inFile = null;
 FileOutputStream outFile = null;
 try {
-inFile = new FileInputStream (BRFTranslation);
+inFile = new FileInputStream (translatedFileName);
 } catch (FileNotFoundException e) {
-new Notify ("Could not open " + BRFTranslation);
+new Notify ("Could not open " + translatedFileName);
 return;
 }
 try {
@@ -329,7 +328,7 @@
 try {
 length = inFile.read (buffer, 0, buffer.length);
 } catch (IOException e) {
-new Notify ("Problem reading " + BRFTranslation);
+new Notify ("Problem reading " + translatedFileName);
 break;
 }
 if (length == -1) {
@@ -354,15 +353,15 @@
 BufferedReader translation = null;
 try {
 translation = new BufferedReader (new FileReader
-(BRFTranslation));
+(translatedFileName));
 } catch (FileNotFoundException e) {
-new Notify ("Could not fine " + BRFTranslation);
+new Notify ("Could not fine " + translatedFileName);
 }
 for (int i = 0; i < 20; i++) {
 try {
 line = translation.readLine();
 } catch (IOException e) {
-new Notify ("Problem reading " + BRFTranslation);
+new Notify ("Problem reading " + translatedFileName);
 return;
 }
 if (line == null) {
@@ -390,7 +389,7 @@
 configSettings = "formatFor utd\n";
 }
 String docFile = tempPath + docID + "-tempdoc.xml";
-BRFTranslation = tempPath + docID + "-doc.brl";
+translatedFileName = tempPath + docID + "-doc.brl";
 FileOutputStream writer = null;
 try {
 writer = new FileOutputStream (docFile);
@@ -406,7 +405,7 @@
 return;
 }
 boolean result = louisutdml.translateFile (configFileList, docFile,
-BRFTranslation, logFile, configSettings, mode);
+translatedFileName, logFile, configSettings, mode);
 if (!result) {
 new Notify ("Translation failed.");
 return;
@@ -415,10 +414,10 @@
 }

 void fileEmbossNow () {
-if (BRFTranslation == null) {
+if (translatedFileName == null) {
 translate();
 }
-if (BRFTranslation == null) {
+if (translatedFileName == null) {
 return;
 }
 Shell shell = new Shell (display, SWT.DIALOG_TRIM);
@@ -428,7 +427,7 @@
 if (data == null || data.equals("")) {
 return;
 }
-File translatedFile = new File (BRFTranslation);
+File translatedFile = new File (translatedFileName);
 PrinterDevice embosserDevice;
 try {
 embosserDevice = new PrinterDevice (data.name, true);
=======================================
--- /src/main/org/brailleblaster/wordprocessor/NewDocument.java Tue Nov 22 17:05:56 2011 +++ /src/main/org/brailleblaster/wordprocessor/NewDocument.java Wed Mar 14 13:33:55 2012
@@ -147,8 +147,10 @@
 } else {
 endParagraph = length;
 }
+if (beginParagraph >= 0 && endParagraph >= 0) {
 paragraph.appendChild (text.substring (beginParagraph, endParagraph));
 sectionAdd.appendChild (paragraph);
+}
 paragraph = null;
 beginParagraph = i;
 }

Other related posts: