Changeset 4966

Show
Ignore:
Timestamp:
06/28/08 16:31:44 (5 months ago)
Author:
joonas.lehtinen@…
Message:

Corrected a bug in building on mac_leopard platform

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/build/build.xml

    r4965 r4966  
    4747        <target name="package-jar" depends="clean-all, init, libs" description="Create itmill-toolkit-x.y.z.jar file."> 
    4848        </target> 
    49          
     49 
    5050        <target name="package-war" depends="clean-all, init, build, docs, internal-package-mac, internal-package-war"> 
    5151        </target> 
     
    8686        </target> 
    8787 
    88     <!-- Find out which platform we are in --> 
     88        <!-- Find out which platform we are in --> 
    8989        <target name="init-platform"> 
    90         <if> 
    91             <contains string="${os.name}" substring="Windows" /> 
    92             <then> 
    93                 <property name="platform" value="windows" /> 
    94             </then> 
    95         </if> 
    96         <if> 
    97             <equals arg1="${os.name}" arg2="Linux" /> 
    98             <then> 
    99                 <property name="platform" value="linux" /> 
    100             </then> 
    101         </if> 
    102         <if> 
    103             <equals arg1="${os.name}" arg2="Mac OS X" /> 
    104             <then> 
    105                 <if> 
    106                         <contains string="${os.version}" substring="10.5." /> 
    107                         <then> 
    108                         <property name="platform" value="mac_leopard" /> 
     90                <if> 
     91                        <contains string="${os.name}" substring="Windows" /> 
     92                        <then> 
     93                                <property name="platform" value="windows" /> 
     94                        </then> 
     95                </if> 
     96                <if> 
     97                        <equals arg1="${os.name}" arg2="Linux" /> 
     98                        <then> 
     99                                <property name="platform" value="linux" /> 
     100                        </then> 
     101                </if> 
     102                <if> 
     103                        <equals arg1="${os.name}" arg2="Mac OS X" /> 
     104                        <then> 
     105                                <if> 
     106                                        <contains string="${os.version}" substring="10.5." /> 
     107                                        <then> 
     108                                                <property name="platform" value="mac_leopard" /> 
    109109                                        </then> 
    110                         <else> 
    111                         <property name="platform" value="mac" /> 
    112                         </else> 
    113                 </if> 
    114             </then> 
    115         </if> 
    116         </target> 
    117          
     110                                        <else> 
     111                                                <property name="platform" value="mac" /> 
     112                                        </else> 
     113                                </if> 
     114                        </then> 
     115                </if> 
     116        </target> 
     117 
    118118        <!-- Initialization - - - - - - - - - - - - - - - - - - - - - - - - --> 
    119119        <target name="init" depends="init-platform"> 
     
    124124 
    125125                <!-- Can run XEP only if license is available. --> 
    126         <available file="build/lib/XEP/license.xml" property="xep.license.available"/> 
     126                <available file="build/lib/XEP/license.xml" property="xep.license.available" /> 
    127127 
    128128                <!-- Create result dir unless already exists --> 
     
    130130 
    131131                <!-- required when compiling WebContent/ITMILL/widgetsets (and also Java server-side classes) --> 
    132                 <property name="lib-gwt-dev" value="gwt-dev-${platform}.jar" /> 
     132                <if> 
     133                        <equals arg1="${platform}" arg2="mac_leopard" /> 
     134                        <then> 
     135                                <property name="lib-gwt-dev" value="gwt-dev-mac.jar" /> 
     136                        </then> 
     137                        <else> 
     138                                <property name="lib-gwt-dev" value="gwt-dev-${platform}.jar" /> 
     139                        </else> 
     140                </if> 
    133141 
    134142                <echo>We are on ${platform} platform (${os.name} ${os.version}), using ${gwt-dir}/${platform}/${lib-gwt-dev}.</echo> 
     
    556564                        </fileset> 
    557565                </copy> 
    558         <copy todir="${output-dir}/WebContent/demo/lib"> 
    559             <fileset dir="lib"> 
    560                 <include name="portlet/**/*" /> 
    561             </fileset> 
    562         </copy> 
     566                <copy todir="${output-dir}/WebContent/demo/lib"> 
     567                        <fileset dir="lib"> 
     568                                <include name="portlet/**/*" /> 
     569                        </fileset> 
     570                </copy> 
    563571 
    564572                <!-- Add demo sources --> 
     
    598606                </copy> 
    599607                <java classname="com.itmill.toolkit.buildhelpers.PortletConfigurationGenerator" failonerror="yes" fork="yes" maxmemory="512m"> 
    600                     <arg value="${output-dir}/WebContent/WEB-INF" /> 
    601                     <arg value="com.itmill.toolkit.demo.reservation.gwt.ReservationWidgetSet" /> 
    602                     <classpath> 
    603                         <pathelement location="build/buildhelpers/" /> 
    604                     </classpath> 
     608                        <arg value="${output-dir}/WebContent/WEB-INF" /> 
     609                        <arg value="com.itmill.toolkit.demo.reservation.gwt.ReservationWidgetSet" /> 
     610                        <classpath> 
     611                                <pathelement location="build/buildhelpers/" /> 
     612                        </classpath> 
    605613                </java> 
    606614        </target> 
     
    618626                </javac> 
    619627        </target> 
    620          
    621         <target name="defaulttheme" > 
     628 
     629        <target name="defaulttheme"> 
    622630                <echo>Combining default themes css files</echo> 
    623631                <!-- ensure buildhelpers are compiled --> 
    624                 <javac source="1.4" target="1.4" srcdir="build/buildhelpers"/> 
     632                <javac source="1.4" target="1.4" srcdir="build/buildhelpers" /> 
    625633                <java classname="com.itmill.toolkit.buildhelpers.CompileDefaultTheme" failonerror="yes" fork="yes"> 
    626634                        <classpath> 
     
    634642        </target> 
    635643 
    636     <target name="compile-widgetset-default"> 
    637         <echo>Compiling src (client-side)</echo> 
    638         <echo>com.itmill.toolkit.terminal.gwt.DefaultWidgetSet</echo> 
    639         <java classname="com.google.gwt.dev.GWTCompiler" failonerror="yes" fork="yes" maxmemory="512m"> 
    640             <arg value="-out" /> 
    641             <arg value="${output-dir}/WebContent/ITMILL/widgetsets" /> 
    642             <arg value="com.itmill.toolkit.terminal.gwt.DefaultWidgetSet" /> 
    643             <arg value="-style" /> 
    644             <arg value="OBF" /> 
    645             <classpath> 
    646                 <pathelement location="${gwt-dir}/${platform}/gwt-user.jar" /> 
    647                 <pathelement location="${gwt-dir}/${platform}/${lib-gwt-dev}" /> 
    648                 <pathelement location="${result-path}/src" /> 
    649             </classpath> 
    650         </java> 
    651         <echo>Compiled DefaultWidgetSet</echo> 
    652     </target> 
    653  
    654     <target name="compile-widgetset-reserver"> 
    655         <condition property="googlemaps-jar" value="${output-dir}/WebContent/demo/lib/reservr/googlemaps_gwt.jar"> 
    656              <available file="${output-dir}/WebContent/demo/lib/reservr/googlemaps_gwt.jar"/> 
    657         </condition> 
    658         <condition property="googlemaps-jar" value="lib/reservr/googlemaps_gwt.jar"> 
    659             <available file="lib/reservr/googlemaps_gwt.jar"/> 
    660         </condition> 
    661         <echo>com.itmill.toolkit.demo.reservation.gwt.ReservationWidgetSet</echo> 
    662         <java classname="com.google.gwt.dev.GWTCompiler" failonerror="yes" fork="yes" maxmemory="512m"> 
    663             <arg value="-out" /> 
    664             <arg value="${output-dir}/WebContent/ITMILL/widgetsets" /> 
    665             <arg value="com.itmill.toolkit.demo.reservation.gwt.ReservationWidgetSet" /> 
    666             <arg value="-style" /> 
    667             <arg value="OBF" /> 
    668             <classpath> 
    669                 <pathelement location="${gwt-dir}/${platform}/gwt-user.jar" /> 
    670                 <pathelement location="${gwt-dir}/${platform}/${lib-gwt-dev}" /> 
    671                 <pathelement location="${result-path}/src" /> 
    672                 <!-- demo jars --> 
    673                 <pathelement location="${googlemaps-jar}" /> 
    674                 <!-- demo widgetset sources --> 
    675                 <pathelement path="${output-dir}/WebContent/WEB-INF/src" /> 
    676             </classpath> 
    677         </java> 
    678         <echo>Compiled ReservationWidgetSet</echo> 
    679     </target> 
    680  
    681     <target name="compile-widgetset-colorpicker"> 
    682         <echo>com.itmill.toolkit.demo.colorpicker.gwt.ColorPickerWidgetSet</echo> 
    683         <java classname="com.google.gwt.dev.GWTCompiler" failonerror="yes" fork="yes" maxmemory="512m"> 
    684             <arg value="-out" /> 
    685             <arg value="${output-dir}/WebContent/ITMILL/widgetsets" /> 
    686             <arg value="com.itmill.toolkit.demo.colorpicker.gwt.ColorPickerWidgetSet" /> 
    687             <arg value="-style" /> 
    688             <arg value="OBF" /> 
    689             <classpath> 
    690                 <pathelement location="${gwt-dir}/${platform}/gwt-user.jar" /> 
    691                 <pathelement location="${gwt-dir}/${platform}/${lib-gwt-dev}" /> 
    692                 <pathelement location="${result-path}/src" /> 
    693                 <!-- demo widgetset sources --> 
    694                 <pathelement path="${output-dir}/WebContent/WEB-INF/src" /> 
    695             </classpath> 
    696         </java> 
    697         <echo>Compiled ColorPickerWidgetSet</echo> 
    698     </target> 
     644        <target name="compile-widgetset-default"> 
     645                <echo>Compiling src (client-side)</echo> 
     646                <echo>com.itmill.toolkit.terminal.gwt.DefaultWidgetSet</echo> 
     647                <java classname="com.google.gwt.dev.GWTCompiler" failonerror="yes" fork="yes" maxmemory="512m"> 
     648                        <arg value="-out" /> 
     649                        <arg value="${output-dir}/WebContent/ITMILL/widgetsets" /> 
     650                        <arg value="com.itmill.toolkit.terminal.gwt.DefaultWidgetSet" /> 
     651                        <arg value="-style" /> 
     652                        <arg value="OBF" /> 
     653                        <classpath> 
     654                                <pathelement location="${gwt-dir}/${platform}/gwt-user.jar" /> 
     655                                <pathelement location="${gwt-dir}/${platform}/${lib-gwt-dev}" /> 
     656                                <pathelement location="${result-path}/src" /> 
     657                        </classpath> 
     658                </java> 
     659                <echo>Compiled DefaultWidgetSet</echo> 
     660        </target> 
     661 
     662        <target name="compile-widgetset-reserver"> 
     663                <condition property="googlemaps-jar" value="${output-dir}/WebContent/demo/lib/reservr/googlemaps_gwt.jar"> 
     664                        <available file="${output-dir}/WebContent/demo/lib/reservr/googlemaps_gwt.jar" /> 
     665                </condition> 
     666                <condition property="googlemaps-jar" value="lib/reservr/googlemaps_gwt.jar"> 
     667                        <available file="lib/reservr/googlemaps_gwt.jar" /> 
     668                </condition> 
     669                <echo>com.itmill.toolkit.demo.reservation.gwt.ReservationWidgetSet</echo> 
     670                <java classname="com.google.gwt.dev.GWTCompiler" failonerror="yes" fork="yes" maxmemory="512m"> 
     671                        <arg value="-out" /> 
     672                        <arg value="${output-dir}/WebContent/ITMILL/widgetsets" /> 
     673                        <arg value="com.itmill.toolkit.demo.reservation.gwt.ReservationWidgetSet" /> 
     674                        <arg value="-style" /> 
     675                        <arg value="OBF" /> 
     676                        <classpath> 
     677                                <pathelement location="${gwt-dir}/${platform}/gwt-user.jar" /> 
     678                                <pathelement location="${gwt-dir}/${platform}/${lib-gwt-dev}" /> 
     679                                <pathelement location="${result-path}/src" /> 
     680                                <!-- demo jars --> 
     681                                <pathelement location="${googlemaps-jar}" /> 
     682                                <!-- demo widgetset sources --> 
     683                                <pathelement path="${output-dir}/WebContent/WEB-INF/src" /> 
     684                        </classpath> 
     685                </java> 
     686                <echo>Compiled ReservationWidgetSet</echo> 
     687        </target> 
     688 
     689        <target name="compile-widgetset-colorpicker"> 
     690                <echo>com.itmill.toolkit.demo.colorpicker.gwt.ColorPickerWidgetSet</echo> 
     691                <java classname="com.google.gwt.dev.GWTCompiler" failonerror="yes" fork="yes" maxmemory="512m"> 
     692                        <arg value="-out" /> 
     693                        <arg value="${output-dir}/WebContent/ITMILL/widgetsets" /> 
     694                        <arg value="com.itmill.toolkit.demo.colorpicker.gwt.ColorPickerWidgetSet" /> 
     695                        <arg value="-style" /> 
     696                        <arg value="OBF" /> 
     697                        <classpath> 
     698                                <pathelement location="${gwt-dir}/${platform}/gwt-user.jar" /> 
     699                                <pathelement location="${gwt-dir}/${platform}/${lib-gwt-dev}" /> 
     700                                <pathelement location="${result-path}/src" /> 
     701                                <!-- demo widgetset sources --> 
     702                                <pathelement path="${output-dir}/WebContent/WEB-INF/src" /> 
     703                        </classpath> 
     704                </java> 
     705                <echo>Compiled ColorPickerWidgetSet</echo> 
     706        </target> 
    699707 
    700708        <!-- Builds the client-side engine, i.e., the widgetsets in parallel. --> 
     
    702710                <echo>Compiling widget sets in parallel.</echo> 
    703711                <parallel threadsperprocessor="1"> 
    704                 <subant antfile="build.xml" target="compile-widgetset-default" inheritall="true" buildpath="build"/> 
    705             <subant antfile="build.xml" target="compile-widgetset-reserver" inheritall="true" buildpath="build"/>  
    706             <subant antfile="build.xml" target="compile-widgetset-colorpicker" inheritall="true" buildpath="build"/> 
     712                        <subant antfile="build.xml" target="compile-widgetset-default" inheritall="true" buildpath="build" /> 
     713                        <subant antfile="build.xml" target="compile-widgetset-reserver" inheritall="true" buildpath="build" /> 
     714                        <subant antfile="build.xml" target="compile-widgetset-colorpicker" inheritall="true" buildpath="build" /> 
    707715                </parallel> 
    708716        </target> 
     
    710718        <!-- Definitions for building local components, i.e., not for an installation package. --> 
    711719        <target name="init-nonpackage" depends="init-platform"> 
    712         <property file="build/VERSION.properties" /> 
    713  
    714         <!-- Definitions for building the client-side. --> 
    715         <property name="output-dir" value="."/> 
    716          
    717         <!-- The "result-path" simply contains the sources. --> 
    718         <property name="result-path" value="."/> 
    719  
    720         <!-- Path to GWT directory. TODO: This should be read from build.properties file. --> 
    721         <property name="gwt-dir" value="build/gwt"/> 
    722  
    723         <!-- required when compiling WebContent/ITMILL/widgetsets (and also Java server-side classes) --> 
    724         <property name="lib-gwt-dev" value="gwt-dev-${platform}.jar" /> 
    725  
    726         <echo>We are on ${platform} platform, using ${gwt-dir}/${platform}/${lib-gwt-dev}.</echo> 
    727         <echo>GWT dir:    ${gwt-dir}</echo> 
    728         <echo>Output dir: ${output-dir}</echo> 
    729         </target> 
    730          
     720                <property file="build/VERSION.properties" /> 
     721 
     722                <!-- Definitions for building the client-side. --> 
     723                <property name="output-dir" value="." /> 
     724 
     725                <!-- The "result-path" simply contains the sources. --> 
     726                <property name="result-path" value="." /> 
     727 
     728                <!-- Path to GWT directory. TODO: This should be read from build.properties file. --> 
     729                <property name="gwt-dir" value="build/gwt" /> 
     730 
     731                <!-- required when compiling WebContent/ITMILL/widgetsets (and also Java server-side classes) --> 
     732                <property name="lib-gwt-dev" value="gwt-dev-${platform}.jar" /> 
     733 
     734                <echo>We are on ${platform} platform, using ${gwt-dir}/${platform}/${lib-gwt-dev}.</echo> 
     735                <echo>GWT dir:    ${gwt-dir}</echo> 
     736                <echo>Output dir: ${output-dir}</echo> 
     737        </target> 
     738 
    731739        <!-- Builds all widgetsets locally, i.e., not for an installation package. --> 
    732740        <target name="widgetsets" depends="init-nonpackage, compile-client-side"> 
    733741        </target> 
    734742 
    735     <!-- Builds the default widgetset locally, i.e., not for an installation package. --> 
    736     <target name="widgetset-default" depends="init-nonpackage, compile-widgetset-default"> 
    737     </target> 
    738  
    739     <!-- Builds the reservation widgetset locally, i.e., not for an installation package. --> 
    740     <target name="widgetset-reserver" depends="init-nonpackage, compile-widgetset-reserver"> 
    741     </target> 
    742  
    743     <!-- Builds the colorpicker widgetset locally, i.e., not for an installation package. --> 
    744     <target name="widgetset-colorpicker" depends="init-nonpackage, compile-widgetset-colorpicker"> 
    745     </target> 
     743        <!-- Builds the default widgetset locally, i.e., not for an installation package. --> 
     744        <target name="widgetset-default" depends="init-nonpackage, compile-widgetset-default"> 
     745        </target> 
     746 
     747        <!-- Builds the reservation widgetset locally, i.e., not for an installation package. --> 
     748        <target name="widgetset-reserver" depends="init-nonpackage, compile-widgetset-reserver"> 
     749        </target> 
     750 
     751        <!-- Builds the colorpicker widgetset locally, i.e., not for an installation package. --> 
     752        <target name="widgetset-colorpicker" depends="init-nonpackage, compile-widgetset-colorpicker"> 
     753        </target> 
    746754 
    747755        <target name="libs" depends="compile-java, webcontent, compile-client-side"> 
     
    799807                </copy> 
    800808        </target> 
    801          
     809 
    802810        <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
    803811  Documentation  
     
    871879 
    872880        <!-- Build PDF manual from sources or just copy it. --> 
    873     <target name="manual-pdf" depends="build-manual-pdf, copy-manual-pdf"> 
    874     </target> 
    875          
     881        <target name="manual-pdf" depends="build-manual-pdf, copy-manual-pdf"> 
     882        </target> 
     883 
    876884        <!-- Just copy a prebuilt PDF manual. --> 
    877     <target name="copy-manual-pdf" unless="xep.license.available"> 
    878         <echo>PDF Manual: No XEP license available, just copy a prebuilt PDF.</echo> 
    879         <copy file="doc/manual/book.pdf" tofile="${output-dir}/WebContent/doc/manual.pdf" /> 
    880     </target> 
     885        <target name="copy-manual-pdf" unless="xep.license.available"> 
     886                <echo>PDF Manual: No XEP license available, just copy a prebuilt PDF.</echo> 
     887                <copy file="doc/manual/book.pdf" tofile="${output-dir}/WebContent/doc/manual.pdf" /> 
     888        </target> 
    881889 
    882890        <!-- XEP-based FO building -->