added create_clean_lazarus_directory.sh

git-svn-id: trunk@5801 -
This commit is contained in:
mattias 2004-08-16 12:17:49 +00:00
parent 2fc2b2d52b
commit 7f206eeda3
4 changed files with 66 additions and 8 deletions

1
.gitattributes vendored
View File

@ -1473,6 +1473,7 @@ tools/getallmofiles.sh -text svneol=native#application/x-sh
tools/getallpofiles.sh -text svneol=native#application/x-sh
tools/install/build_fpc_rpm.sh -text svneol=native#application/x-sh
tools/install/build_fpcsrc_rpm.sh -text svneol=native#application/x-sh
tools/install/create_clean_lazarus_directory.sh -text svneol=native#application/x-sh
tools/install/create_fpc_deb.sh -text svneol=native#application/x-sh
tools/install/create_fpc_export_tgz.sh -text svneol=native#application/x-sh
tools/install/create_fpc_tgz_from_local_dir.sh -text svneol=native#application/x-sh

View File

@ -129,20 +129,20 @@ Mac OS X:
Creating the DMG packages for FPC and Lazarus:
1. create a temp directory with a usr/local hierarchy under it, owned
by root (e.g. sudo mkdir -p ~/pascal/fpcinst/usr/local)
by root (e.g. sudo mkdir -p ~/fpcinst/usr/local)
2. cd fpc (your fpc source directory)
3. make all
4. sudo make install INSTALL_PREFIX=~/pascal/fpcinst/usr/local
4. sudo make install INSTALL_PREFIX=~/fpcinst/usr/local
(it's very important that you use sudo, because the ownership info will be
the same when it's installed on the user's computer and you don't want
those files to belong to the user that happens to have the same uid as
you have)
5. cd compiler
sudo make installsymlink INSTALL_PREFIX=~/pascal/fpcinst/usr/local
sudo make installsymlink INSTALL_PREFIX=~/fpcinst/usr/local
6. unzip the <lazarus>/tools/install/macosx/fpc_installer_info.zip somewhere,
open "fpc 1.9.5.pmsp" (it will open in PackageMaker) change the "resources"
path so it points to the unzipped fpc_resources directory and the "files"
path so it points to ~/pascal/fpcinst and then choose File->Create Package
path so it points to ~/fpcinst and then choose File->Create Package
7. Put the package in a directory called "Free Pascal Compiler 1.9.5",
add in the "Introduction.txt" and "ReadMe.txt" files from the dmg you
already downloaded and create a (compressed or not doesn't really

View File

@ -0,0 +1,59 @@
#!/usr/bin/env bash
set -x
set -e
LazSrcDir=$1
LazDestDir=$2
LazSrcDir=$(echo $LazSrcDir | sed -e 's#//#/#' -e 's#/$##')
LazDestDir=$(echo $LazDestDir | sed -e 's#//#/#' -e 's#/$##')
if [ "x$LazSrcDir" = "x" ]; then
echo "Usage: $0 <lazarus_source_directory> <lazarus_destination_directory>"
exit
fi
if [ "x$LazDestDir" = "x" ]; then
echo "Usage: $0 <lazarus_source_directory> <lazarus_destination_directory>"
exit
fi
if [ "x$LazDestDir" = "x/" ]; then
echo "Usage: $0 <lazarus_source_directory> <lazarus_destination_directory>"
exit
fi
if [ ! -d $LazSrcDir/designer ]; then
echo "The directory does not look like a lazarus source directory (lazarus/)"
exit
fi
echo "copy $LazSrcDir to $LazDestDir ..."
if [ `which rsync` ]; then
rsync -va --exclude="CVS" --exclude=".cvsignore" \
--exclude="*.ppu" --exclude="*.ppw" --exclude="*.ppl" \
--exclude="*.o" --exclude="*.ow" --exclude="*.a" --exclude="*.rst" \
--exclude=".#*" --exclude="*.~*" --exclude="*.bak" \
--exclude="*.orig" --exclude="*.rej" --exclude="*.bak" \
--exclude=".xvpics" --exclude="*.compiled" --exclude="killme*" \
$LazSrcDir $LazDestDir
else
echo cp -a $LazSrcDir $LazDestDir
fi
echo "cleaning up (CVS, ppu, o) ..."
cd $LazDestDir
make clean
make -C examples clean
make -C tools clean
for Ext in ppu ppw ppl o ow rst cvsignore bak orig rej xvpics; do
find . -name "*.$Ext" -exec rm -f {} \;
done
find . -name "*.~*" -exec rm -f {} \;
find . -name "*.#*" -exec rm -f {} \;
find . -name "CVS" -exec rm -rf {} \;
rm -rf tools/install/*.tgz
rm -rf tools/install/*.*.spec
cd -
# end.

View File

@ -15,13 +15,11 @@ if [ ! -d $LazSrcDir/designer ]; then
exit
fi
echo "copy $LazSrcDir to /tmp/lazarus ..."
echo "remove /tmp/lazarus ..."
cd /tmp
rm -rf /tmp/lazarus
cd -
cp -a $LazSrcDir /tmp/lazarus
sh clean_lazaru_directory.sh $LazSrcDir
sh create_clean_lazarus_directory.sh $LazSrcDir /tmp/lazarus
# pack
echo "packing ..."