mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-07 20:56:31 +02:00
added create_clean_lazarus_directory.sh
git-svn-id: trunk@5801 -
This commit is contained in:
parent
2fc2b2d52b
commit
7f206eeda3
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -1473,6 +1473,7 @@ tools/getallmofiles.sh -text svneol=native#application/x-sh
|
|||||||
tools/getallpofiles.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_fpc_rpm.sh -text svneol=native#application/x-sh
|
||||||
tools/install/build_fpcsrc_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_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_export_tgz.sh -text svneol=native#application/x-sh
|
||||||
tools/install/create_fpc_tgz_from_local_dir.sh -text svneol=native#application/x-sh
|
tools/install/create_fpc_tgz_from_local_dir.sh -text svneol=native#application/x-sh
|
||||||
|
@ -129,20 +129,20 @@ Mac OS X:
|
|||||||
Creating the DMG packages for FPC and Lazarus:
|
Creating the DMG packages for FPC and Lazarus:
|
||||||
|
|
||||||
1. create a temp directory with a usr/local hierarchy under it, owned
|
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)
|
2. cd fpc (your fpc source directory)
|
||||||
3. make all
|
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
|
(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
|
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
|
those files to belong to the user that happens to have the same uid as
|
||||||
you have)
|
you have)
|
||||||
5. cd compiler
|
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,
|
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"
|
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 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",
|
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
|
add in the "Introduction.txt" and "ReadMe.txt" files from the dmg you
|
||||||
already downloaded and create a (compressed or not doesn't really
|
already downloaded and create a (compressed or not doesn't really
|
||||||
|
59
tools/install/create_clean_lazarus_directory.sh
Normal file
59
tools/install/create_clean_lazarus_directory.sh
Normal 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.
|
||||||
|
|
@ -15,13 +15,11 @@ if [ ! -d $LazSrcDir/designer ]; then
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "copy $LazSrcDir to /tmp/lazarus ..."
|
echo "remove /tmp/lazarus ..."
|
||||||
cd /tmp
|
cd /tmp
|
||||||
rm -rf /tmp/lazarus
|
rm -rf /tmp/lazarus
|
||||||
cd -
|
cd -
|
||||||
cp -a $LazSrcDir /tmp/lazarus
|
sh create_clean_lazarus_directory.sh $LazSrcDir /tmp/lazarus
|
||||||
|
|
||||||
sh clean_lazaru_directory.sh $LazSrcDir
|
|
||||||
|
|
||||||
# pack
|
# pack
|
||||||
echo "packing ..."
|
echo "packing ..."
|
||||||
|
Loading…
Reference in New Issue
Block a user