ooo-build r14296 - in trunk/extensions/coooder: . ant php



Author: cbosdo
Date: Mon Oct 13 10:42:51 2008
New Revision: 14296
URL: http://svn.gnome.org/viewvc/ooo-build?rev=14296&view=rev

Log:
Added an ant script to build the extension without Eclipse


Added:
   trunk/extensions/coooder/ant/
   trunk/extensions/coooder/ant/build.properties
   trunk/extensions/coooder/ant/build.xml
   trunk/extensions/coooder/ant/manifest.xml
Modified:
   trunk/extensions/coooder/   (props changed)
   trunk/extensions/coooder/package.properties
   trunk/extensions/coooder/php/   (props changed)
   trunk/extensions/coooder/php/convert.sh

Added: trunk/extensions/coooder/ant/build.properties
==============================================================================
--- (empty file)
+++ trunk/extensions/coooder/ant/build.properties	Mon Oct 13 10:42:51 2008
@@ -0,0 +1,6 @@
+office.program.dir=/usr/lib/openoffice/program
+office.unotypes.rdb=/usr/lib/openoffice/program/types.rdb
+#office.offapi.rdb
+
+sdk.dir=/usr/lib/openoffice/sdk
+sdk.bin.dir=linux/bin
\ No newline at end of file

Added: trunk/extensions/coooder/ant/build.xml
==============================================================================
--- (empty file)
+++ trunk/extensions/coooder/ant/build.xml	Mon Oct 13 10:42:51 2008
@@ -0,0 +1,161 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ *   OpenOffice.org extension for syntax highlighting
+ *   Copyright (C) 2008  CÃdric Bosdonnat cedricbosdo openoffice org
+ *
+ *   This library is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU Library General Public
+ *   License as published by the Free Software Foundation; 
+ *   version 2 of the License.
+ *
+ *   This library is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *   Library General Public License for more details.
+ *
+ *   You should have received a copy of the GNU Library General Public
+ *   License along with this library; if not, write to the Free
+ *   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ -->
+<project name="COOoder" default="package-oxt" basedir="..">
+
+
+	<target name="init-env">
+		<!-- set variables for the project structure -->
+		<property file=".unoproject"/>
+		<property file="package.properties"/>
+		<dirname property="project.dir" file="package.properties"/>
+		
+		<property name="build.dir" value="${project.build}"/>
+		<property name="build.classes.dir" value="${build.dir}/classes"/>
+		<property name="dist.dir" value="${build.dir}/dist"/>
+		
+		<!-- set variables from SDK and Office -->
+        <echo message="setting up UNO environment ..."/>
+        <property file="ant/build.properties"/>
+        	
+        <property name="office.unopkg" value="${office.program.dir}${file.separator}unopkg"/>
+        <property name="office.soffice" value="${office.program.dir}${file.separator}soffice"/>
+
+		<property environment="env"/>
+		<property name="office.tool.path" value="${env.PATH}${path.separator}${office.program.dir}"/>
+    
+        <property name="sdk.idl.dir" location="${sdk.dir}${file.separator}idl"/> 
+        <property name="sdk.idlc" value="${sdk.dir}${file.separator}${sdk.bin.dir}${file.separator}idlc"/>
+        <property name="sdk.regmerge" value="${sdk.dir}${file.separator}${sdk.bin.dir}${file.separator}regmerge"/>
+        <property name="sdk.javamaker" value="${sdk.dir}${file.separator}${sdk.bin.dir}${file.separator}javamaker"/>
+    
+        <property name="uno.package.name" value="${project.dir}${file.separator}${dist.dir}${file.separator}${ant.project.name}.oxt"/>
+        <property name="src.dir.absolute" value="${project.dir}${project.srcdir}"/>
+		<property name="idl.dir" value="${project.dir}${project.idl}"/>
+    
+        <property name="idl.out" value="${project.dir}${file.separator}${build.dir}${file.separator}idl"/>
+        <property name="idl.out.urd" value="${idl.out}${file.separator}urd"/>
+        <property name="idl.out.rdb" value="${idl.out}${file.separator}rdb"/>
+        <property name="idl.rdb.name" value="types.rdb"/>
+        <property name="idl.rdb.fullpath" value="${idl.out.rdb}${file.separator}${idl.rdb.name}"/>
+    
+		<mkdir dir="${build.dir}" />
+        <mkdir dir="${idl.out}"/>
+        <mkdir dir="${idl.out.urd}"/>
+        <mkdir dir="${idl.out.rdb}"/>
+		<mkdir dir="${build.classes.dir}"/>
+		<mkdir dir="${dist.dir}"/>
+	</target>
+    
+    <target name="clean" depends="init-env">
+        <delete dir="${build.dir}"/>
+    </target>
+	
+    <target name="package-oxt" depends="package-jar">
+    	<!-- The manifest.xml file is extracted from the package build with Eclipse -->
+    	
+    	<zip destfile="${uno.package.name}" includes="${contents}">
+    		<fileset dir="." includes="${contents}"/>
+    		<zipfileset dir="descriptions" includes="**/*.txt" prefix="descriptions"/>
+    		<zipfileset file="ant/manifest.xml" fullpath="META-INF/manifest.xml"/>
+    		<zipfileset file="${dist.dir}/${ant.project.name}.jar" 
+    			fullpath="${ant.project.name}.jar"/>
+    		<zipfileset file="${idl.rdb.fullpath}" fullpath="types.rdb"/>
+    	</zip>
+    </target>
+	
+	<target name="package-jar" depends="compile-java">
+		<jar destfile="${dist.dir}/${ant.project.name}.jar">
+			<manifest>
+				<attribute name="RegistrationClassName" value="${regclassname}"/>
+			</manifest>
+			<fileset dir="${build.classes.dir}">
+				<include name="**/*.class"/>
+			</fileset>
+			<fileset dir="${src.dir.absolute}">
+				<exclude name="**/*.java"/>
+			</fileset>
+		</jar>
+	</target>
+	
+	<target name="compile-java" depends="types">
+		<echo message="build classes: ${build.classes.dir}"/>
+		<javac srcdir="${src.dir.absolute}" source="1.4" target="1.4" encoding="UTF-8"
+			destdir="${build.classes.dir}" excludes="**/*Test*">
+			<classpath>
+				<fileset dir="${office.program.dir}${file.separator}classes">
+					<include name="*.jar"/>
+				</fileset>
+				<pathelement location="${build.classes.dir}"/>
+			</classpath>
+		</javac>
+	</target>
+	
+	<target name="types" depends="merge-urd">
+		<echo message="Generating java class files from rdb..."/>
+		<condition property="args.offapi" value=" -X${office.offapi.rdb}" else="">
+			<length string="${office.offapi.rdb}" when="equal" length="0" trim="true"/>
+		</condition>
+
+        <exec executable="${sdk.javamaker}" dir="${office.program.dir}" failonerror="true">
+            <env key="PATH" path="${office.tool.path}"/>    
+            <env key="LD_LIBRARY_PATH" path="${office.tool.path}"/>
+            <env key="DYLD_LIBRARY_PATH" path="${office.tool.path}"/>
+			<arg value="-nD"/>
+			<arg value="-Gc"/>
+            <arg value="-BUCR"/>
+            <arg value="-O"/>
+            <arg value="${project.dir}${file.separator}${build.classes.dir}"/>
+            <arg file="${idl.rdb.fullpath}"/>
+            <arg value="-X${office.unotypes.rdb}${args.offapi}"/>
+        </exec>
+	</target>
+	
+	<target name="merge-urd" depends="compile-idl">
+		<delete file="${idl.rdb.fullpath}"/>    
+        <apply executable="${sdk.regmerge}" dir="${office.program.dir}" failonerror="true">
+            <env key="PATH" path="${office.tool.path}"/>
+            <env key="LD_LIBRARY_PATH" path="${office.tool.path}"/>
+            <env key="DYLD_LIBRARY_PATH" path="${office.tool.path}"/> 
+            <arg file="${idl.rdb.fullpath}"/>
+            <arg value="/UCR"/>
+            <fileset dir="${idl.out.urd}" includes="**/*.urd" casesensitive="yes"/>
+        </apply>
+	</target>
+	
+	<target name="compile-idl" depends="init-env">
+		<echo message="${sdk.idlc}"/>
+        <echo message="${office.tool.path}"/>
+
+        <apply executable="${sdk.idlc}" dir="${office.program.dir}" failonerror="true">
+            <env key="PATH" path="${office.tool.path}"/>
+            <env key="LD_LIBRARY_PATH" path="${office.tool.path}"/>
+            <env key="DYLD_LIBRARY_PATH" path="${office.tool.path}"/>
+            <arg value="-C"/>
+            <arg value="-O"/>
+            <arg value="${idl.out.urd}"/>
+            <arg value="-I"/>
+            <arg value="${idl.dir}"/>
+            <arg value="-I"/>
+            <arg value="${sdk.idl.dir}"/>
+            <fileset dir="${idl.dir}" includes="**/*.idl" casesensitive="yes"/>
+        </apply>
+	</target>
+	
+</project>

Added: trunk/extensions/coooder/ant/manifest.xml
==============================================================================
--- (empty file)
+++ trunk/extensions/coooder/ant/manifest.xml	Mon Oct 13 10:42:51 2008
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<manifest:manifest>
+	<manifest:file-entry manifest:full-path="COOoder.jar" manifest:media-type="application/vnd.sun.star.uno-component;type=Java"/>
+	<manifest:file-entry manifest:full-path="config/org/openoffice/Coooder.xcu" manifest:media-type="application/vnd.sun.star.configuration-data"/>
+	<manifest:file-entry manifest:full-path="types.rdb" manifest:media-type="application/vnd.sun.star.uno-typelibrary;type=RDB"/>
+	<manifest:file-entry manifest:full-path="config/org/openoffice/Coooder.xcs" manifest:media-type="application/vnd.sun.star.configuration-schema"/>
+	<manifest:file-entry manifest:full-path="descriptions/descr.txt" manifest:media-type="application/vnd.sun.star.package-bundle-description;locale=en"/>
+	<manifest:file-entry manifest:full-path="Addons.xcu" manifest:media-type="application/vnd.sun.star.configuration-data"/>
+</manifest:manifest>

Modified: trunk/extensions/coooder/package.properties
==============================================================================
--- trunk/extensions/coooder/package.properties	(original)
+++ trunk/extensions/coooder/package.properties	Mon Oct 13 10:42:51 2008
@@ -1,4 +1,4 @@
 #Written by the OOEclipseIntegration
-#Tue Sep 16 07:52:50 CEST 2008
+#Mon Oct 13 12:04:14 CEST 2008
+contents=Addons.xcu, config, config/org, config/org/openoffice, config/org/openoffice/Coooder.xcs, config/org/openoffice/Coooder.xcu, config/org/openoffice/langs, config/org/openoffice/langs/abap.xml, config/org/openoffice/langs/actionscript.xml, config/org/openoffice/langs/actionscript3.xml, config/org/openoffice/langs/ada.xml, config/org/openoffice/langs/apache.xml, config/org/openoffice/langs/applescript.xml, config/org/openoffice/langs/apt_sources.xml, config/org/openoffice/langs/asm.xml, config/org/openoffice/langs/asp.xml, config/org/openoffice/langs/autoit.xml, config/org/openoffice/langs/bash.xml, config/org/openoffice/langs/basic4gl.xml, config/org/openoffice/langs/blitzbasic.xml, config/org/openoffice/langs/bnf.xml, config/org/openoffice/langs/boo.xml, config/org/openoffice/langs/c.xml, config/org/openoffice/langs/c_mac.xml, config/org/openoffice/langs/caddcl.xml, config/org/openoffice/langs/cadlisp.xml, config/org/openoffice/langs/cfdg.xml, config/org/openoffice/l
 angs/cfm.xml, config/org/openoffice/langs/cil.xml, config/org/openoffice/langs/cobol.xml, config/org/openoffice/langs/cpp-qt.xml, config/org/openoffice/langs/cpp.xml, config/org/openoffice/langs/csharp.xml, config/org/openoffice/langs/css.xml, config/org/openoffice/langs/d.xml, config/org/openoffice/langs/delphi.xml, config/org/openoffice/langs/diff.xml, config/org/openoffice/langs/div.xml, config/org/openoffice/langs/dos.xml, config/org/openoffice/langs/dot.xml, config/org/openoffice/langs/eiffel.xml, config/org/openoffice/langs/fortran.xml, config/org/openoffice/langs/freebasic.xml, config/org/openoffice/langs/genero.xml, config/org/openoffice/langs/gettext.xml, config/org/openoffice/langs/glsl.xml, config/org/openoffice/langs/gml.xml, config/org/openoffice/langs/gnuplot.xml, config/org/openoffice/langs/groovy.xml, config/org/openoffice/langs/haskell.xml, config/org/openoffice/langs/html4strict.xml, config/org/openoffice/langs/idl.xml, config/org/openoffice/langs/ini.xml, 
 config/org/openoffice/langs/inno.xml, config/org/openoffice/langs/io.xml, config/org/openoffice/langs/java.xml, config/org/openoffice/langs/java5.xml, config/org/openoffice/langs/javascript.xml, config/org/openoffice/langs/kixtart.xml, config/org/openoffice/langs/klonec.xml, config/org/openoffice/langs/klonecpp.xml, config/org/openoffice/langs/latex.xml, config/org/openoffice/langs/lisp.xml, config/org/openoffice/langs/lotusformulas.xml, config/org/openoffice/langs/lotusscript.xml, config/org/openoffice/langs/lua.xml, config/org/openoffice/langs/m68k.xml, config/org/openoffice/langs/matlab.xml, config/org/openoffice/langs/mirc.xml, config/org/openoffice/langs/mpasm.xml, config/org/openoffice/langs/mxml.xml, config/org/openoffice/langs/mysql.xml, config/org/openoffice/langs/nsis.xml, config/org/openoffice/langs/objc.xml, config/org/openoffice/langs/ocaml-brief.xml, config/org/openoffice/langs/ocaml.xml, config/org/openoffice/langs/oobas.xml, config/org/openoffice/langs/oracle
 8.xml, config/org/openoffice/langs/pascal.xml, config/org/openoffice/langs/per.xml, config/org/openoffice/langs/perl.xml, config/org/openoffice/langs/php-brief.xml, config/org/openoffice/langs/php.xml, config/org/openoffice/langs/pic16.xml, config/org/openoffice/langs/plsql.xml, config/org/openoffice/langs/povray.xml, config/org/openoffice/langs/powershell.xml, config/org/openoffice/langs/progress.xml, config/org/openoffice/langs/python.xml, config/org/openoffice/langs/qbasic.xml, config/org/openoffice/langs/rails.xml, config/org/openoffice/langs/reg.xml, config/org/openoffice/langs/robots.xml, config/org/openoffice/langs/ruby.xml, config/org/openoffice/langs/sas.xml, config/org/openoffice/langs/scala.xml, config/org/openoffice/langs/scheme.xml, config/org/openoffice/langs/sdlbasic.xml, config/org/openoffice/langs/smalltalk.xml, config/org/openoffice/langs/smarty.xml, config/org/openoffice/langs/sql.xml, config/org/openoffice/langs/tcl.xml, config/org/openoffice/langs/text.x
 ml, config/org/openoffice/langs/thinbasic.xml, config/org/openoffice/langs/tsql.xml, config/org/openoffice/langs/typoscript.xml, config/org/openoffice/langs/vb.xml, config/org/openoffice/langs/vbnet.xml, config/org/openoffice/langs/verilog.xml, config/org/openoffice/langs/vhdl.xml, config/org/openoffice/langs/visualfoxpro.xml, config/org/openoffice/langs/winbatch.xml, config/org/openoffice/langs/xml.xml, config/org/openoffice/langs/xorg_conf.xml, config/org/openoffice/langs/xpp.xml, config/org/openoffice/langs/z80.xml, description.xml, icons, icons/image1_16.bmp, icons/image1_16h.bmp, icons/image1_26.bmp, icons/image1_26h.bmp, language.xsd, registration, registration/lgpl.txt
 description-en=descriptions/descr.txt
-contents=Addons.xcu, config, config/org, config/org/openoffice, config/org/openoffice/Coooder.xcs, config/org/openoffice/Coooder.xcu, config/org/openoffice/langs, config/org/openoffice/langs/actionscript.xml, config/org/openoffice/langs/ada.xml, config/org/openoffice/langs/apache.xml, config/org/openoffice/langs/applescript.xml, config/org/openoffice/langs/asm.xml, config/org/openoffice/langs/asp.xml, config/org/openoffice/langs/autoit.xml, config/org/openoffice/langs/bash.xml, config/org/openoffice/langs/blitzbasic.xml, config/org/openoffice/langs/bnf.xml, config/org/openoffice/langs/c.xml, config/org/openoffice/langs/c_mac.xml, config/org/openoffice/langs/caddcl.xml, config/org/openoffice/langs/cadlisp.xml, config/org/openoffice/langs/cfdg.xml, config/org/openoffice/langs/cfm.xml, config/org/openoffice/langs/cpp-qt.xml, config/org/openoffice/langs/cpp.xml, config/org/openoffice/langs/csharp.xml, config/org/openoffice/langs/css.xml, config/org/openoffice/langs/d.xml, config
 /org/openoffice/langs/delphi.xml, config/org/openoffice/langs/diff.xml, config/org/openoffice/langs/div.xml, config/org/openoffice/langs/dos.xml, config/org/openoffice/langs/eiffel.xml, config/org/openoffice/langs/fortran.xml, config/org/openoffice/langs/freebasic.xml, config/org/openoffice/langs/gml.xml, config/org/openoffice/langs/groovy.xml, config/org/openoffice/langs/html4strict.xml, config/org/openoffice/langs/idl.xml, config/org/openoffice/langs/ini.xml, config/org/openoffice/langs/inno.xml, config/org/openoffice/langs/io.xml, config/org/openoffice/langs/java.xml, config/org/openoffice/langs/java5.xml, config/org/openoffice/langs/javascript.xml, config/org/openoffice/langs/latex.xml, config/org/openoffice/langs/lisp.xml, config/org/openoffice/langs/lua.xml, config/org/openoffice/langs/matlab.xml, config/org/openoffice/langs/mirc.xml, config/org/openoffice/langs/mpasm.xml, config/org/openoffice/langs/mysql.xml, config/org/openoffice/langs/nsis.xml, config/org/openoffic
 e/langs/objc.xml, config/org/openoffice/langs/ocaml-brief.xml, config/org/openoffice/langs/ocaml.xml, config/org/openoffice/langs/oobas.xml, config/org/openoffice/langs/oracle8.xml, config/org/openoffice/langs/pascal.xml, config/org/openoffice/langs/perl.xml, config/org/openoffice/langs/php-brief.xml, config/org/openoffice/langs/php.xml, config/org/openoffice/langs/plsql.xml, config/org/openoffice/langs/python.xml, config/org/openoffice/langs/qbasic.xml, config/org/openoffice/langs/rails.xml, config/org/openoffice/langs/reg.xml, config/org/openoffice/langs/robots.xml, config/org/openoffice/langs/ruby.xml, config/org/openoffice/langs/sas.xml, config/org/openoffice/langs/scheme.xml, config/org/openoffice/langs/sdlbasic.xml, config/org/openoffice/langs/smalltalk.xml, config/org/openoffice/langs/smarty.xml, config/org/openoffice/langs/sql.xml, config/org/openoffice/langs/tcl.xml, config/org/openoffice/langs/text.xml, config/org/openoffice/langs/thinbasic.xml, config/org/openoffi
 ce/langs/tsql.xml, config/org/openoffice/langs/vb.xml, config/org/openoffice/langs/vbnet.xml, config/org/openoffice/langs/vhdl.xml, config/org/openoffice/langs/visualfoxpro.xml, config/org/openoffice/langs/winbatch.xml, config/org/openoffice/langs/xml.xml, config/org/openoffice/langs/xpp.xml, config/org/openoffice/langs/z80.xml, description.xml, icons, icons/image1_16.bmp, icons/image1_16h.bmp, icons/image1_26.bmp, icons/image1_26h.bmp, language.xsd, registration, registration/lgpl.txt

Modified: trunk/extensions/coooder/php/convert.sh
==============================================================================
--- trunk/extensions/coooder/php/convert.sh	(original)
+++ trunk/extensions/coooder/php/convert.sh	Mon Oct 13 10:42:51 2008
@@ -20,14 +20,14 @@
 OUTPUT_DIR=../config/org/openoffice/langs
 GESHI_VERSION=1.0.8
 
-## TODO Change this to fetch the latest language definitions from GeSHi's website
-orig_dir=`pwd`
-cd ../build
-wget http://surfnet.dl.sourceforge.net/sourceforge/geshi/geshi-$GESHI_VERSION.tar.bz2
-tar xjf geshi-$GESHI_VERSION.tar.bz2
-cd $orig_dir
+## Change this to fetch the latest language definitions from GeSHi's website
+if [ ! -e geshi-$GESHI_VERSION.tar.bz2 ]
+then
+    wget http://surfnet.dl.sourceforge.net/sourceforge/geshi/geshi-$GESHI_VERSION.tar.bz2
+    tar xjf geshi-$GESHI_VERSION.tar.bz2
+fi
 
-GESHI_DIR=../build/geshi/geshi
+GESHI_DIR=geshi/geshi
 
 mkdir -p $OUTPUT_DIR
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]