Changeset 9890


Ignore:
Timestamp:
Mar 26, 2011, 8:48:04 PM (13 years ago)
Author:
mlg
Message:

Updates build script

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/jiwigo/trunk/install/create_executables.sh

    r7007 r9890  
    22## this script generates executables for jiwigo
    33## to use it, you have to download the "work" directory
    4 ## here : http://www.le-guevel.com/jiwigo/downloads/work.tar.gz
     4## here : http://www.jiwigo.com/downloads/work.tar.gz
    55## you just have to change work_path to indicate the path to "work"
    66## and "project_path" to the path of the project.
     
    88## the mvn command is writter in the install file of the project : install/install.txt
    99## all the generated files will be moved to the "generation" directory.
    10 work_path='/home/mael/Documents/Jiwigo/travail'
     10## the package dpkg-dev must be installed
     11work_path='/home/mael/Documents/jiwigo/work'
    1112project_path='/home/mael/workspace/jiwigo'
    1213target_path=$project_path/target
     14
     15
    1316
    1417###############################################################################################
     
    1619###############################################################################################
    1720
     21
     22echo '#####         building deb...         #####'
     23cd $work_path
     24
     25
    1826#Calculate size and version to complete debian's control file
    1927size=`du -cs jiwigo`
    2028size=`echo $size | cut -d ' ' -f 1`
    2129version=`find $target_path -type f -name \*with-dependencies.jar | xargs -I file echo file | cut -d '-' -f 2`
    22 cp $work_path/control $work_path/temp
     30cp $work_path/templates/control_template $work_path/temp
    2331echo Version: $version >> $work_path/temp
    2432echo Installed-Size: $size >> $work_path/temp
     
    5765###############################################################################################
    5866
     67echo '#####        building exe...          #####'
     68cd $work_path
     69work_path_for_sed="$(echo $work_path | sed 's/\//\\\//g')"
     70sed 's/#jar_location/'$work_path_for_sed'\/jiwigo\/usr\/share\/jiwigo\/jiwigo.jar/g' templates/launch4j_template.xml > launch4j_tmp.xml
     71sed 's/#exe_location/'$work_path_for_sed'\/jiwigo.exe/g' launch4j_tmp.xml > launch4j.xml
     72rm launch4j_tmp.xml
    5973$work_path/launch4j/launch4j $work_path/launch4j.xml
     74rm launch4j.xml
     75
    6076
    6177###############################################################################################
     
    6379###############################################################################################
    6480
     81echo '##### completing generation folder... #####'
    6582rm $work_path/generation/*
    66 cp $work_path/jiwigo.exe $work_path/generation/
     83mv $work_path/jiwigo.exe $work_path/generation/
    6784cp $work_path/depot/jiwigo.deb $work_path/generation/
    6885cp $work_path/jiwigo/usr/share/jiwigo/jiwigo.jar $work_path/generation/
    69 tar -zcf $work_path/generation/jiwigo-src.tar.gz $project_path/src/*
     86cd $project_path/
     87tar -zcf $work_path/generation/jiwigo-src.tar.gz --exclude '.*' src pom.xml install
     88echo '#####             Done                #####'
Note: See TracChangeset for help on using the changeset viewer.