Changeset 25

Show
Ignore:
Timestamp:
02/09/10 21:44:43 (7 months ago)
Author:
gabe
Message:

Added svn revision number, architecture and type of image import module to the file name of generated archives.

Location:
trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/build.xml

    r22 r25  
    44   </description> 
    55 
    6    <property name="version" value="1.0-mojito"/> 
     6   <property name="version.name" value="1.0-mojito"/> 
    77    
    88   <property environment="env"/> 
     
    136136   <property name="neko.library.path" value="."/> 
    137137 
     138   <!-- FreeType defaults --> 
    138139   <condition property="freetype.include.path" value="/usr/include"> 
    139140      <or> 
     
    160161      <equals arg1="${haxe.debug}" arg2="false"/> 
    161162   </condition> 
    162        
     163 
     164   <!-- NaturalDocs defaults --> 
    163165   <condition property="naturaldocs.executable" value="${naturaldocs.path}/NaturalDocs.bat"> 
    164166      <isset property="is-windows"/> 
     
    234236   </path> 
    235237   
    236    <!-- -init target: create directory structure --> 
     238   <!-- -init target: create directory structure and acquire actual svn revision number--> 
    237239   <target name="-init"> 
    238240      <mkdir dir="${objdir}"/> 
     
    245247      <mkdir dir="${demodir.bin.apps}"/> 
    246248      <mkdir dir="${distdir}"/> 
     249   </target> 
     250    
     251   <!-- -version target: set version related properties --> 
     252   <target name="-version"> 
     253      <!-- acquire svn revision --> 
     254      <exec executable="svn" dir="${basedir}" outputproperty="svn.info" resultproperty="svn.result" failonerror="false"> 
     255         <arg value="info"/> 
     256      </exec> 
     257       
     258      <loadresource property="svn.revision"> 
     259         <propertyresource name="svn.info"/> 
     260         <filterchain> 
     261            <linecontains> 
     262               <contains value="Revision:"/> 
     263            </linecontains> 
     264            <tokenfilter> 
     265               <stringtokenizer suppressdelims="true"/> 
     266               <containsregex pattern="[0-9]+"/> 
     267            </tokenfilter> 
     268         </filterchain> 
     269      </loadresource> 
     270       
     271      <condition property="version.revision" value="r${svn.revision}"> 
     272         <and> 
     273            <isset property="svn.result"/> 
     274            <not> 
     275               <equals arg1="svn.revision" arg2=""/> 
     276            </not> 
     277         </and> 
     278      </condition> 
     279      <property name="version.revision" value="unknown"/> 
     280       
     281      <!-- set architecture version property --> 
     282      <condition property="version.arch" value="win32"> 
     283         <isset property="is-windows"/> 
     284      </condition> 
     285    
     286      <condition property="version.arch" value="unix"> 
     287         <isset property="is-unix"/> 
     288      </condition> 
     289    
     290      <condition property="version.arch" value="osx"> 
     291         <isset property="is-osx"/> 
     292      </condition> 
     293       
     294      <!-- set image module version property --> 
     295      <condition property="version.image.module" value="ImageMagick"> 
     296         <isset property="is-imagemagick"/> 
     297      </condition> 
     298    
     299      <condition property="version.image.module" value="DevIL"> 
     300         <isset property="is-devil"/> 
     301      </condition> 
    247302   </target> 
    248303 
     
    601656 
    602657   <!-- dist target: build a binary distribution compressed with zip --> 
    603    <target name="dist" depends="samhaxe, doc" description="build binary distribution"> 
    604       <delete includeemptydirs="true"> 
    605          <fileset dir="${distdir}" includes="**/*"/> 
    606       </delete> 
    607  
    608       <property name="distdir.samhaxe" location="${distdir}/samhaxe-${version}"/> 
     658   <target name="dist" depends="samhaxe, doc, -version" description="build binary distribution"> 
     659      <property name="samhaxe.binary" value="samhaxe-${version.name}-${version.revision}-${version.arch}-${version.image.module}"/> 
     660      <property name="distdir.samhaxe" location="${distdir}/${samhaxe.binary}"/> 
    609661 
    610662      <mkdir dir="${distdir.samhaxe}"/> 
     
    621673         <fileset dir="${docdir}"/> 
    622674      </copy> 
    623       <zip basedir="${distdir}" destfile="${distdir}/samhaxe-${version}.zip"/> 
     675      <zip basedir="${distdir}" destfile="${distdir}/${samhaxe.binary}.zip" includes="${samhaxe.binary}/**"/> 
    624676 
    625677      <delete dir="${distdir.samhaxe}"/> 
    626678   </target> 
    627679    
    628    <target name="win32-installer" depends="samhaxe, doc" description="build win32 installer using NSIS (only under win32 with DevIL!)"> 
     680   <!-- win32-installer target: build a win32 installer using NSIS --> 
     681   <target name="win32-installer" depends="samhaxe, doc, -version" description="build win32 installer using NSIS (only under win32 with DevIL!)"> 
    629682      <fail unless="run.win32-installer" message="win32-installer target is vaild only under win32 with DevIL image module!"/> 
    630683      <exec executable="${nsis.path}/makensis" dir="${basedir}/win32"> 
     684         <arg value="/DVERSION=${version.name}-${version.revision}"/> 
    631685         <arg value="SamHaXe.nsi"/> 
    632686      </exec> 
  • trunk/win32/SamHaXe.nsi

    r24 r25  
    1 !define SamhaxeVersion "v1.0-mojito" 
    21!define DevilVersion "1.7.8" 
    32!define FreeTypeVersion "2.3.5-1" 
     
    1615 
    1716  Name "Sam HaXe" 
    18   OutFile "..\dist\samhaxe-${SamhaxeVersion}.exe" 
     17  OutFile "..\dist\samhaxe-${VERSION}.exe" 
    1918 
    2019  ;Default installation folder 
     
    6867        FindNext $0 $1 
    6968    ${EndWhile} 
    70     End: 
    7169FunctionEnd 
    7270