Changeset 9731:612bb5f19096 in orange


Ignore:
Timestamp:
02/06/12 15:31:23 (2 years ago)
Author:
ales_erjavec
Branch:
default
Children:
9732:470857cc675f, 10262:2cdd88c3ea67
rebase_source:
2d6720fa9d5c43e9ba5489cc50f966f8a5d7ef00
Message:

Using hg repo in mac osx bundle building scripts.

Location:
install-scripts/mac
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • install-scripts/mac/bundle-daily-build.sh

    r8908 r9731  
    1919    exit 2 
    2020fi 
     21 
     22# Clone hg repo if not yet local. 
     23if [ ! -e orange ]; then 
     24    hg clone https://bitbucket.org/biolab/orange 
     25fi 
     26 
     27cd orange 
     28hg pull --update 
     29 
     30if [ -e ../orange_archive ]; then 
     31    rm -rf ../orange_archive 
     32fi 
     33 
     34hg archive ../orange_archive 
     35cd .. 
     36 
     37ORANGE_REPO=`pwd`/orange 
     38ORANGE_ARCHIVE=`pwd`/orange_archive 
    2139 
    2240# Defaults are current latest revisions in stable branch and trunk 
     
    3250    STABLE_REVISION=$STABLE_REVISION_2 
    3351fi 
    34 DAILY_REVISION_1=${2:-`svn info --non-interactive http://orange.biolab.si/svn/orange/trunk/ | grep 'Last Changed Rev:' | cut -d ' ' -f 4`} 
    35 # svn info does not return proper exit status on an error so we check it this way 
    36 [ "$DAILY_REVISION_1" ] || exit 4 
    37 DAILY_REVISION_2=${2:-`svn info --non-interactive http://orange.biolab.si/svn/orange/externals/trunk/ | grep 'Last Changed Rev:' | cut -d ' ' -f 4`} 
    38 # svn info does not return proper exit status on an error so we check it this way 
    39 [ "$DAILY_REVISION_2" ] || exit 4 
    40 if [[ $DAILY_REVISION_1 -gt $DAILY_REVISION_2 ]]; then 
    41     DAILY_REVISION=$DAILY_REVISION_1 
    42 else 
    43     DAILY_REVISION=$DAILY_REVISION_2 
    44 fi 
     52 
     53DAILY_REVISION_1 = `hg log -l1 daily | grep 'changeset:' | cut -d ' ' -f 4 | cut -d ':' -f 1` 
     54 
     55#TODO: versions of hg and svn repos are no longer in sync 
     56 
     57#DAILY_REVISION_2=${2:-`svn info --non-interactive http://orange.biolab.si/svn/orange/externals/trunk/ | grep 'Last Changed Rev:' | cut -d ' ' -f 4`} 
     58## svn info does not return proper exit status on an error so we check it this way 
     59#[ "$DAILY_REVISION_2" ] || exit 4 
     60#if [[ $DAILY_REVISION_1 -gt $DAILY_REVISION_2 ]]; then 
     61#    DAILY_REVISION=$DAILY_REVISION_1 
     62#else 
     63#    DAILY_REVISION=$DAILY_REVISION_2 
     64#fi 
    4565 
    4666echo "Preparing temporary directory." 
     
    5474export CXXFLAGS="-arch ppc -arch i386" 
    5575export LDFLAGS="-arch ppc -arch i386" 
     76 
     77 
     78########################### 
     79# Stable orange-1.0  bundle 
     80########################### 
    5681 
    5782if [ ! -e /Volumes/download/orange-bundle-1.0b.$STABLE_REVISION.dmg ]; then 
     
    174199/Users/ailabc/mount-dirs.sh 
    175200 
    176 if [ ! -e /Volumes/download/orange-bundle-svn-0.0.$DAILY_REVISION.dmg ]; then 
     201######################### 
     202# Daily orange 2.* bundle 
     203######################### 
     204 
     205if [ ! -e /Volumes/download/orange-bundle-hg-0.0.$DAILY_REVISION.dmg ]; then 
    177206    echo "Downloading bundle template." 
    178207    svn export --non-interactive --revision $DAILY_REVISION http://orange.biolab.si/svn/orange/externals/trunk/install-scripts/mac/bundle/ /private/tmp/bundle/ 
    179208     
    180     echo "Downloading Orange daily source code revision $DAILY_REVISION." 
    181     svn export --non-interactive --revision $DAILY_REVISION http://orange.biolab.si/svn/orange/trunk/orange/ /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/orange/ 
    182     svn export --non-interactive --revision $DAILY_REVISION http://orange.biolab.si/svn/orange/trunk/source/ /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/orange/source/ 
    183     svn export --non-interactive --revision $DAILY_REVISION http://orange.biolab.si/svn/orange/trunk/add-ons/orngCRS/src/ /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/orange/source/crs/ 
    184      
    185     [ -e /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/orange/doc/COPYING ] || svn export --non-interactive --revision $DAILY_REVISION http://orange.biolab.si/svn/orange/trunk/COPYING /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/orange/doc/COPYING 
    186     [ -e /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/orange/doc/LICENSES ] || svn export --non-interactive --revision $DAILY_REVISION http://orange.biolab.si/svn/orange/trunk/LICENSES /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/orange/doc/LICENSES 
    187      
    188     ln -s ../Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/orange/ /private/tmp/bundle/Orange.app/Contents/Resources/orange 
    189     ln -s ../Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/orange/doc/ /private/tmp/bundle/Orange.app/Contents/Resources/doc 
    190      
    191     echo "Compiling." 
    192     cd /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/orange/source/ 
    193     make EXCLUDE_ORANGEQT=1 
    194     cd /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/orange/source/crs/ 
    195     make 
    196     mv _orngCRS.so ../../ 
    197     cd /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/orange/ 
    198      
    199     echo "Correcting install names for modules." 
    200     for module in *.so ; do 
    201         [ -L $module ] && continue 
    202          
    203         install_name_tool -id @executable_path/../Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/orange/$module $module 
    204          
    205         perl -MFile::Spec::Functions=abs2rel -e ' 
    206         for (`/usr/bin/otool -L -X $ARGV[0]`) { 
    207             next unless m|^\s+(/private/tmp/bundle/Orange.app/.*) \(.*\)$|; 
    208             system("/usr/bin/install_name_tool", "-change", $1, "\@loader_path/" . abs2rel($1), $ARGV[0]);  
    209         } 
    210         ' $module 
    211     done 
    212      
    213     echo "Cleaning up." 
    214     rm -rf source/ c45.dll liborange_include.a updateOrange.py 
     209    echo "Building and installing orange into the bundle." 
     210    cd $ORANGE_ARCHIVE 
     211    /private/tmp/bundle/Orange.app/Contents/MacOS/python setup.py install 
     212         
     213#   echo "Correcting install names for modules." 
     214#   for module in *.so ; do 
     215#       [ -L $module ] && continue 
     216#        
     217#       install_name_tool -id @executable_path/../Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/orange/$module $module 
     218#        
     219#       perl -MFile::Spec::Functions=abs2rel -e ' 
     220#       for (`/usr/bin/otool -L -X $ARGV[0]`) { 
     221#           next unless m|^\s+(/private/tmp/bundle/Orange.app/.*) \(.*\)$|; 
     222#           system("/usr/bin/install_name_tool", "-change", $1, "\@loader_path/" . abs2rel($1), $ARGV[0]);  
     223#       } 
     224#       ' $module 
     225#   done 
     226     
     227#   echo "Cleaning up." 
     228#   rm -rf source/ c45.dll liborange_include.a updateOrange.py 
    215229     
    216230    # Installation registration 
    217     echo "orange" > /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/orange.pth 
    218      
     231#   echo "orange" > /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/orange.pth 
     232     
     233    # TODO: hg repos for addons 
    219234    for addon in $DAILY_ADDONS ; do 
    220235        echo "Downloading Orange add-on $addon daily source code revision $DAILY_REVISION." 
     
    245260        fi 
    246261         
    247         echo "Cleaning up." 
    248         rm -rf source/ setup.py 
     262#       echo "Cleaning up." 
     263#       rm -rf source/ setup.py 
    249264         
    250265        # Installation registration 
     
    282297     
    283298    echo "Converting temporary image to a compressed image." 
    284     rm -f /private/tmp/orange-bundle-svn-0.0.$DAILY_REVISION.dmg 
    285     hdiutil convert /private/tmp/bundle.dmg -format UDZO -imagekey zlib-level=9 -o /private/tmp/orange-bundle-svn-0.0.$DAILY_REVISION.dmg 
     299    rm -f /private/tmp/orange-bundle-hg-0.0.$DAILY_REVISION.dmg 
     300    hdiutil convert /private/tmp/bundle.dmg -format UDZO -imagekey zlib-level=9 -o /private/tmp/orange-bundle-hg-0.0.$DAILY_REVISION.dmg 
    286301     
    287302    echo "Cleaning up." 
     
    295310echo "Removing old versions of bundles." 
    296311# (Keeps last 5 versions.) 
    297 perl -e 'unlink ((reverse sort </Volumes/download/orange-bundle-svn-0*.dmg>)[5..10000])' 
     312perl -e 'unlink ((reverse sort </Volumes/download/orange-bundle-hg-0*.dmg>)[5..10000])' 
    298313perl -e 'unlink ((reverse sort </Volumes/download/orange-bundle-1*.dmg>)[5..10000])' 
    299314 
    300 if [ -e /private/tmp/orange-bundle-svn-0.0.$DAILY_REVISION.dmg ] || [ -e /private/tmp/orange-bundle-svn-0.0.$DAILY_REVISION.dmg ]; then 
     315if [ -e /private/tmp/orange-bundle-hg-0.0.$DAILY_REVISION.dmg ] || [ -e /private/tmp/orange-bundle-hg-0.0.$DAILY_REVISION.dmg ]; then 
    301316    echo "Moving bundles to the download directory." 
    302317    [ -e /private/tmp/orange-bundle-1.0b.$STABLE_REVISION.dmg ] && mv /private/tmp/orange-bundle-1.0b.$STABLE_REVISION.dmg /Volumes/download/ 
    303     [ -e /private/tmp/orange-bundle-svn-0.0.$DAILY_REVISION.dmg ] && mv /private/tmp/orange-bundle-svn-0.0.$DAILY_REVISION.dmg /Volumes/download/ 
     318    [ -e /private/tmp/orange-bundle-hg-0.0.$DAILY_REVISION.dmg ] && mv /private/tmp/orange-bundle-hg-0.0.$DAILY_REVISION.dmg /Volumes/download/ 
    304319     
    305320    echo "Setting permissions." 
    306321    chmod +r /Volumes/download/orange-bundle-1.0b.$STABLE_REVISION.dmg 
    307     chmod +r /Volumes/download/orange-bundle-svn-0.0.$DAILY_REVISION.dmg 
    308      
    309     echo "Registering new bundles." 
    310     egrep -v '^(MAC_STABLE|MAC_DAILY)=' /Volumes/download/filenames_mac.set > /Volumes/download/filenames_mac.set.new 
    311     echo "MAC_STABLE=orange-bundle-1.0b.$STABLE_REVISION.dmg" >> /Volumes/download/filenames_mac.set.new 
    312     echo "MAC_DAILY=orange-bundle-svn-0.0.$DAILY_REVISION.dmg" >> /Volumes/download/filenames_mac.set.new 
    313     mv /Volumes/download/filenames_mac.set.new /Volumes/download/filenames_mac.set 
    314 fi 
     322    chmod +r /Volumes/download/orange-bundle-hg-0.0.$DAILY_REVISION.dmg 
     323 
     324# Don't register the bundles until hg version stabilizes 
     325     
     326#   echo "Registering new bundles." 
     327#   egrep -v '^(MAC_STABLE|MAC_DAILY)=' /Volumes/download/filenames_mac.set > /Volumes/download/filenames_mac.set.new 
     328#   echo "MAC_STABLE=orange-bundle-1.0b.$STABLE_REVISION.dmg" >> /Volumes/download/filenames_mac.set.new 
     329#   echo "MAC_DAILY=orange-bundle-svn-0.0.$DAILY_REVISION.dmg" >> /Volumes/download/filenames_mac.set.new 
     330#   mv /Volumes/download/filenames_mac.set.new /Volumes/download/filenames_mac.set 
     331fi 
  • install-scripts/mac/update-all-scripts.sh

    r7694 r9731  
    44# 
    55 
    6 curl --silent --output update-all-scripts.sh http://orange.biolab.si/svn/orange/trunk/install-scripts/mac/update-all-scripts.sh 
    7 curl --silent --output bundle-64bit-daily-build.sh http://orange.biolab.si/svn/orange/trunk/install-scripts/mac/bundle-64bit-daily-build.sh 
    8 curl --silent --output bundle-daily-build.sh http://orange.biolab.si/svn/orange/trunk/install-scripts/mac/bundle-daily-build.sh 
    9 curl --silent --output dailyrun.sh http://orange.biolab.si/svn/orange/trunk/install-scripts/mac/dailyrun.sh 
    10 curl --silent --output dailyrun-finkonly-withsource.sh http://orange.biolab.si/svn/orange/trunk/install-scripts/mac/dailyrun-finkonly-withsource.sh 
    11 curl --silent --output dailyrun-finkonly.sh http://orange.biolab.si/svn/orange/trunk/install-scripts/mac/dailyrun-finkonly.sh 
    12 curl --silent --output dailyrun-bundleonly.sh http://orange.biolab.si/svn/orange/trunk/install-scripts/mac/dailyrun-bundleonly.sh 
    13 curl --silent --output fink-daily-build.sh http://orange.biolab.si/svn/orange/trunk/install-scripts/mac/fink-daily-build.sh 
    14 curl --silent --output fink-restore-selections.sh http://orange.biolab.si/svn/orange/trunk/install-scripts/mac/fink-restore-selections.sh 
    15 curl --silent --output fink-selfupdate-orange.sh http://orange.biolab.si/svn/orange/trunk/install-scripts/mac/fink-selfupdate-orange.sh 
    16 curl --silent --output force-fink-daily-build.sh http://orange.biolab.si/svn/orange/trunk/install-scripts/mac/force-fink-daily-build.sh 
    17 curl --silent --output mount-dirs.sh http://orange.biolab.si/svn/orange/trunk/install-scripts/mac/mount-dirs.sh 
     6# Clone the orange repo if not already present 
     7if [ ! -e orange ]; then 
     8    hg clone https://bitbucket.org/biolab/orange 
     9fi 
     10 
     11# Pull all changesets and update to latest 
     12cd orange 
     13hg pull --update 
     14cd .. 
     15 
     16cp orange/install-scripts/mac/update-all-scripts.sh ./ 
     17cp orange/install-scripts/mac/bundle-64bit-daily-build.sh ./ 
     18cp orange/install-scripts/mac/bundle-daily-build.sh ./ 
     19cp orange/install-scripts/mac/dailyrun.sh ./ 
     20cp orange/install-scripts/mac/dailyrun-finkonly-withsource.sh ./ 
     21cp orange/install-scripts/mac/dailyrun-finkonly.sh ./ 
     22cp orange/install-scripts/mac/dailyrun-bundleonly.sh ./ 
     23cp orange/install-scripts/mac/fink-daily-build.sh ./ 
     24cp orange/install-scripts/mac/fink-restore-selections.sh ./ 
     25cp orange/install-scripts/mac/fink-selfupdate-orange.sh ./ 
     26cp orange/install-scripts/mac/force-fink-daily-build.sh ./ 
     27cp orange/install-scripts/mac/mount-dirs.sh ./ 
    1828 
    1929chmod +x *.sh 
Note: See TracChangeset for help on using the changeset viewer.