Show
Ignore:
Timestamp:
20.10.2014 20:50:49 (5 years ago)
Author:
sjm84
Message:

Related to commit 29387. Changes to allow the release-kits to preserve the source code, to better enable debugging of differences in the release-kits. Tested with GS3 on the 32 bit linux: without setting the new KEEP_SRC env var in bin/rk, it still removes the src code as before and produces a binary of the same size as before. With the KEEP_SRC env var set to true in bin/rk, src code (gs2build/common-src, gli/src and GS3/src) is preserved. Untested on Windows or with gs2 since the gs2 binary generation on linux 32 is not working at present.

Location:
main/trunk/release-kits
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/release-kits/bin/rk

    r23575 r29393  
    4646toexec="ant -lib \"`pwd`/installer/classes\" -f \"$RK_HOME/kits/$rk_name/ant-scripts/build.xml\" \"-Dbasedir=`pwd`\" \"-Drk.home=$RK_HOME\" \"-Drk.name=$rk_name\"" 
    4747 
     48# Generally, an ant property can be true|on|yes vs false|off|no (or left unset) 
     49# see https://ant.apache.org/manual/properties.html#if+unless 
     50# However, the release-kit code requires envvar KEEP_SRC to be "true" in order to stop it deleting source code 
     51#KEEP_SRC=true 
     52if test -n $KEEP_SRC ; then 
     53    toexec="$toexec \"-Dkeep.src=$KEEP_SRC\"" 
     54fi 
     55 
    4856#pass on the arguments 
    4957while [ "$1" != "" ]; do 
  • main/trunk/release-kits/kits/rk2/ant-scripts/compile.xml

    r28515 r29393  
    251251 
    252252        <!-- Delete all but the lib folder and the setup.bash script of the gnome support library --> 
    253         <if><bool><or><equals arg1="${rk.os}" arg2="mac"/><equals arg1="${rk.os}" arg2="linux"/></or></bool> 
     253        <if><bool><and> 
     254          <not><equals arg1="${keep.src}" arg2="true"/></not> 
     255          <or><equals arg1="${rk.os}" arg2="mac"/><equals arg1="${rk.os}" arg2="linux"/></or> 
     256        </and></bool> 
    254257            <delete dir="${basedir}/compiled/ext/gnome-lib-minimal/${os.shell}/bin"/> 
    255258            <delete dir="${basedir}/compiled/ext/gnome-lib-minimal/${os.shell}/include"/> 
     
    308311        </if></else></if> 
    309312 
    310         <delete dir="compiled/gli/jar"/> 
    311         <delete dir="compiled/gli/classes/org"/> 
     313        <if><bool><not><equals arg1="${keep.src}" arg2="true"/></not></bool> 
     314          <delete dir="compiled/gli/jar"/> 
     315          <delete dir="compiled/gli/classes/org"/> 
     316        </if> 
    312317        <move file="compiled/gli/GLIServer.jar" todir="compiled/bin/java"/> 
    313318 
     
    316321 
    317322        <!-- delete the source code --> 
    318         <delete><fileset dir="compiled" includes="Makefile,config.cache,config.h,config.log,stamp-h,config.status"/></delete> 
    319         <delete dir="compiled/common-src"/> 
    320         <delete dir="compiled/build-src"/> 
    321         <delete dir="compiled/runtime-src"/> 
    322         <delete><fileset dir="compiled" includes="Install.txt,acconfig.h,aclocal.m4,config.guess,config.sub,configtest.pl,configure,configure.in,install-sh,Makefile.in,micotest.cpp,config.h.in,win32.mak,win32cfg.h,lib/**/*.a"/></delete> 
     323        <if><bool><not><equals arg1="${keep.src}" arg2="true"/></not></bool>         
     324          <delete><fileset dir="compiled" includes="Makefile,config.cache,config.h,config.log,stamp-h,config.status"/></delete> 
     325          <delete dir="compiled/common-src"/> 
     326          <delete dir="compiled/build-src"/> 
     327          <delete dir="compiled/runtime-src"/> 
     328          <delete><fileset dir="compiled" includes="Install.txt,acconfig.h,aclocal.m4,config.guess,config.sub,configtest.pl,configure,configure.in,install-sh,Makefile.in,micotest.cpp,config.h.in,win32.mak,win32cfg.h,lib/**/*.a"/></delete> 
     329        </if> 
    323330 
    324331        <!-- strip .svn working-copy dirs --> 
  • main/trunk/release-kits/kits/rk3/ant-scripts/compile.xml

    r29313 r29393  
    8888            <propertyset refid="forward.properties"/> 
    8989            <property name="properties.accepted" value="true"/> 
     90            <property name="properties.keep.src" value="${keep.src}"/> 
    9091        </ant> 
    9192 
  • main/trunk/release-kits/shared/core/ant-scripts/shared.xml

    r29251 r29393  
    236236 
    237237    <!-- a target to strip any directory of .svn folders --> 
    238     <target name="strip-svn-dirs"> 
     238    <target name="strip-svn-dirs" unless="${keep.src}"> 
    239239        <delete includeemptydirs="true"> 
    240240            <fileset dir="${dir}" defaultexcludes="false"> 
     
    380380 
    381381    <!-- target to tidy gli up for distribution --> 
    382     <target name="gli-tidy-for-dist"> 
     382    <target name="gli-tidy-for-dist" unless="${keep.src}"> 
    383383        <!-- delete unneeded things --> 
    384384        <delete file="${glibasedir}/.greenstonestore"/>