You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by pa...@apache.org on 2006/12/20 14:51:02 UTC

svn commit: r489087 - in /directory/sandbox/pamarcelot/ldapstudio: build.xml ldapstudio-rcp/build.xml

Author: pamarcelot
Date: Wed Dec 20 05:51:01 2006
New Revision: 489087

URL: http://svn.apache.org/viewvc?view=rev&rev=489087
Log:
Updating the build script to be able to specify the target operating system and architecture.

Modified:
    directory/sandbox/pamarcelot/ldapstudio/build.xml
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-rcp/build.xml

Modified: directory/sandbox/pamarcelot/ldapstudio/build.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/build.xml?view=diff&rev=489087&r1=489086&r2=489087
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/build.xml (original)
+++ directory/sandbox/pamarcelot/ldapstudio/build.xml Wed Dec 20 05:51:01 2006
@@ -1,33 +1,47 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
 <project name="ldapstudio-complete" default="bundle">
     <property name="project.name" value="ldapstudio-complete" />
     <property name="project.version" value="1.0.0" />
-    
     <property name="ldapstudio-complete.output" value="${basedir}/target" />
     <property name="ldapstudio-complete.build" value="${ldapstudio-complete.output}/LDAP Studio" />    
     
+    <!-- Setting up OS Name-->
     <condition property="ldapstudio-rcp.os.name" value="macosx" >
-        <and>
-            <os family="unix" />
             <os name="Mac OS X"/>
-        </and>
     </condition>
-    <condition property="ldapstudio-rcp.os.extension" value=".app" >
-        <and>
+    <condition property="ldapstudio-rcp.os.name" value="linux" >
             <os family="unix" />
-            <os name="Mac OS X"/>
-        </and>
     </condition>
-    <condition property="ldapstudio-rcp.os.name" value="linux" >
-        <os family="unix" />
+    <condition property="ldapstudio-rcp.os.name" value="win32">
+            <os family="windows" />
     </condition>
-    <condition property="ldapstudio-rcp.os.extension" value="" >
-        <os family="unix" />
+
+    <!-- Setting up OS Extension-->
+    <condition property="ldapstudio-rcp.os.extension" value=".app" >
+        <equals arg1="${ldapstudio-rcp.os.name}" arg2="macosx"/>
     </condition>
-    <condition property="ldapstudio-rcp.os.name" value="win32">
-        <os family="windows" />
+    <condition property="ldapstudio-rcp.os.extension" value="" >
+        <equals arg1="${ldapstudio-rcp.os.name}" arg2="linux"/>
     </condition>
     <condition property="ldapstudio-rcp.os.extension" value=".exe">
-        <os family="windows" />
+        <equals arg1="${ldapstudio-rcp.os.name}" arg2="win32"/>
     </condition>
 
     <!-- ================================== -->
@@ -35,10 +49,17 @@
     <!-- ================================== -->
     <target name="help" description="Shows help">
         <echo>Available commands:</echo>
-	<echo>    bundle - Generate and bundles a complete version of LDAP Studio</echo>
-        <echo>    clean - Deletes any generated file (javadoc, classes, jars, distribution)</echo>
-        <echo>    javadoc - Generate Javadoc files</echo>
-	<echo>    resolve - Resolves the library dependencies using Ivy</echo>
+	<echo>  bundle - Generate and bundles a complete version of LDAP Studio</echo>
+	<echo>      When bundling you can specify the target operating system using this option:</echo>
+	<echo>          o -Dldapstudio-rcp.os.name=macosx for Mac OS X</echo>
+	<echo>          o -Dldapstudio-rcp.os.name=linux for Linux</echo>
+	<echo>          o -Dldapstudio-rcp.os.name=win32 for Windows</echo>
+	<echo>      and the target architecture using this option:</echo>
+	<echo>          o -Dldapstudio-rcp.os.arch=i386 for i386 architecture</echo>
+	<echo>          o -Dldapstudio-rcp.os.arch=ppc for PowerPC architecture</echo>
+        <echo>  clean - Delete any generated file (javadoc, classes, jars, distribution)</echo>
+        <echo>  javadoc - Generate Javadoc files</echo>
+	<echo>  resolve - Resolves the library dependencies using Ivy</echo>
     </target>
 
     <!-- ================================== -->
@@ -109,7 +130,7 @@
     </target>
 
     <target name="setPermission_win32" description="Sets the right permissions on Windows">
-        <chmod file="${ldapstudio-rcp.application}/LDAP Studio${ldapstudio-rcp.os.extension}" perm="755" />
+        <chmod file="${ldapstudio-complete.build}/LDAP Studio.exe" perm="755" />
     </target>
 
     <!-- ================================== -->

Modified: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-rcp/build.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-rcp/build.xml?view=diff&rev=489087&r1=489086&r2=489087
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-rcp/build.xml (original)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-rcp/build.xml Wed Dec 20 05:51:01 2006
@@ -17,49 +17,46 @@
   under the License.
 -->
 <project name="ldapstudio-rcp" default="product" xmlns:ivy="antlib:fr.jayasoft.ivy.ant">
-	<property name="project.name" value="org.apache.directory.ldapstudio" />
-	<property name="project.version" value="0.1" />
+    <property name="project.name" value="org.apache.directory.ldapstudio" />
+    <property name="project.version" value="0.1" />
 
-	<property name="ldapstudio-rcp.output" value="${basedir}/target" />
-	<property name="ldapstudio-rcp.build" value="${ldapstudio-rcp.output}/build" />
-	<property name="ldapstudio-rcp.src" value="${basedir}/src/main/java" />
-	<property name="lib.dir" value="lib" />
-
-
-	<property name="repository.dir" location="../dependencies/externals/" />
-
-	<!-- Configuring Ivy (Needs to be AFTER the $repository.dir declaration) -->
-	<ivy:configure file="../tools/ivyconf.xml" />
-
-	<property name="ldapstudio-rcp.eclipse.dir" value="../dependencies/eclipse" />
-	<property name="ldapstudio-rcp.eclipse.version" value="3.2" />
-	<condition property="ldapstudio-rcp.os.name" value="macosx">
-		<and>
-			<os family="unix" />
-			<os name="Mac OS X" />
-		</and>
-	</condition>
-	<condition property="ldapstudio-rcp.os.extension" value=".app">
-		<and>
-			<os family="unix" />
-			<os name="Mac OS X" />
-		</and>
-	</condition>
-	<condition property="ldapstudio-rcp.os.name" value="linux">
-		<os family="unix" />
-	</condition>
-	<condition property="ldapstudio-rcp.os.extension" value="">
-		<os family="unix" />
-	</condition>
-	<condition property="ldapstudio-rcp.os.name" value="win32">
-			<os family="windows" />
-	</condition>
-	<condition property="ldapstudio-rcp.os.extension" value=".exe">
-		<os family="windows" />
-	</condition>
-
-	<property name="ldapstudio-rcp.os.arch" value="${os.arch}" />
+    <property name="ldapstudio-rcp.output" value="${basedir}/target" />
+    <property name="ldapstudio-rcp.build" value="${ldapstudio-rcp.output}/build" />
+    <property name="ldapstudio-rcp.src" value="${basedir}/src/main/java" />
+    <property name="lib.dir" value="lib" />
+
+    <property name="repository.dir" location="../dependencies/externals/" />
+
+    <!-- Configuring Ivy (Needs to be AFTER the $repository.dir declaration) -->
+    <ivy:configure file="../tools/ivyconf.xml" />
+
+    <property name="ldapstudio-rcp.eclipse.dir" value="../dependencies/eclipse" />
+    <property name="ldapstudio-rcp.eclipse.version" value="3.2" />
+
+	    <!-- Setting up OS Name-->
+    <condition property="ldapstudio-rcp.os.name" value="macosx" >
+            <os name="Mac OS X"/>
+    </condition>
+    <condition property="ldapstudio-rcp.os.name" value="linux" >
+            <os family="unix" />
+    </condition>
+    <condition property="ldapstudio-rcp.os.name" value="win32">
+            <os family="windows" />
+    </condition>
+
+    <!-- Setting up OS Extension-->
+    <condition property="ldapstudio-rcp.os.extension" value=".app" >
+        <equals arg1="${ldapstudio-rcp.os.name}" arg2="macosx"/>
+    </condition>
+    <condition property="ldapstudio-rcp.os.extension" value="" >
+        <equals arg1="${ldapstudio-rcp.os.name}" arg2="linux"/>
+    </condition>
+    <condition property="ldapstudio-rcp.os.extension" value=".exe">
+        <equals arg1="${ldapstudio-rcp.os.name}" arg2="win32"/>
+    </condition>
 
+    <!-- Setting up OS Architecture-->
+    <property name="ldapstudio-rcp.os.arch" value="${os.arch}" />
 
 	<!-- ================================== -->
 	<!--              RESOLVE               -->
@@ -190,7 +187,7 @@
 	</target>
 	
 	<target name="setPermission_win32" description="Sets the right permissions on windows">
-			<chmod file="${ldapstudio-rcp.application}/LDAP Studio${ldapstudio-rcp.os.extension}" perm="755" />
+			<chmod file="${ldapstudio-rcp.application}/LDAP Studio.exe" perm="755" />
 	</target>
 
 	<!-- ================================== -->