Skip to content

Commit

Permalink
get application zip file from outsite the build dir
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://svn.psi-im.org/home/psi/svn/win-installer/trunk@36 2d3a5ac0-73f9-4639-b284-2310bd1da355
  • Loading branch information
mircea committed May 26, 2008
1 parent 5141337 commit 154642f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ languages:

files:
@# detect zip file in build dir and use it
@f=$$(ls -1 build/*.zip | head -n1); cd tools; ./prepfiles ../$$f
@f=$$(ls -1 app/*.zip | head -n1); cd tools; ./prepfiles ../$$f

build:
cd src; makensis psi.nsi
Expand Down
21 changes: 13 additions & 8 deletions tools/prepfiles
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,17 @@

infile=$1
echo $infile
yes A | unzip -q $infile # | grep -v "warning" | grep -v "chmod"

mkdir -p ../build/tmp
cp $infile ../build/tmp/

cd ../build/tmp/
yes A | unzip -q $(basename $infile) # | grep -v "warning" | grep -v "chmod"

indir=$(find . -type d | grep '/' | head -n 1 | sed 's|./||g')

find $indir -type d > directories.list

[ ! -d ../build ] && mkdir ../build

out_inst="psi_files_install.nsh"
echo ";" > $out_inst
echo "; List of files to be INSTALLED (Base section)" >> $out_inst
Expand Down Expand Up @@ -49,14 +52,16 @@ cat directories.list | sort -r | while read cdir; do
echo -e "\tRMDir \"$outpath\"" >> $out_uninst
done

sed 's|/|/|g' $out_inst > ../build/$out_inst
sed 's|/|\\|g' $out_uninst > ../build/$out_uninst
sed 's|/|/|g' $out_inst > ../$out_inst
sed 's|/|\\|g' $out_uninst > ../$out_uninst

rm -f directories.list

rm -rf ../build/psi_app
cp -r $indir ../build/psi_app
rm -rf $indir
rm -rf ../psi_app
mv $indir ../psi_app

rm $out_inst
rm $out_uninst

cd ../
rm -rf tmp

0 comments on commit 154642f

Please sign in to comment.