lazarus/tools/install
vincents d27c0f63f7 version 0.9.15
git-svn-id: trunk@9051 -
2006-03-30 11:03:52 +00:00
..
cross_unix reduced debugging output and extended debugging of lcl 2006-01-19 18:36:07 +00:00
debian_fpc-src renamed fpcsrc to fpc-src 2006-01-23 10:35:53 +00:00
debian_lazarus added ide directory to COPYING 2006-01-20 13:53:42 +00:00
macosx added iceberg (http://s.sudre.free.fr/Software/Iceberg.html) templates for MAC OS X installer 2006-01-29 11:43:53 +00:00
rpm renamed gnome.ide.desktop to lazarus.desktop 2006-03-29 19:08:03 +00:00
win32 version 0.9.15 2006-03-30 11:03:52 +00:00
build_fpc_rpm.sh updated cross compilation hints 2005-09-17 12:20:47 +00:00
build_fpc_snaphot_rpm.sh made start compiler configurable, fixes for use of svn2revisioninc 2005-10-09 19:20:24 +00:00
build_fpc-src_rpm.sh renamed fpcsrc to fpc-src 2006-01-23 10:35:53 +00:00
create_clean_fpcsrc_directory.sh set +x attribute for scripts 2005-07-27 09:18:33 +00:00
create_clean_lazarus_directory.sh set +x attribute for scripts 2005-07-27 09:18:33 +00:00
create_fpc_deb.sh renamed fpcsrc to fpc-src 2006-01-23 10:35:53 +00:00
create_fpc_export_tgz.sh set +x attribute for scripts 2005-07-27 09:18:33 +00:00
create_fpc_tgz_from_local_dir.sh create_lazarus_rpm.sh can now build the rpm without being root 2005-09-17 11:58:38 +00:00
create_lazarus_deb.sh version 0.9.14 2006-03-30 10:52:46 +00:00
create_lazarus_export_tgz.sh fixed extracting lazarus svn for release directories 2006-02-03 21:17:53 +00:00
create_lazarus_rpm.sh fixed lazarus rpm create 2006-01-23 21:30:46 +00:00
create_lazarus_snapshot_rpm.sh use get_lazarus_version.sh to retrieve version form aboutfrm.pas 2006-02-09 12:03:26 +00:00
create_lazarus_tgz_from_local_dir.sh set +x attribute for scripts 2005-07-27 09:18:33 +00:00
cvsexportlocal.pas undid svn adds, replaced cvsexportlocal in build_fpc_rpm.sh 2005-06-09 20:43:30 +00:00
do_nothing.sh set +x attribute for scripts 2005-07-27 09:18:33 +00:00
download_and_build_fpc_rpm.sh renamed fpcsrc to fpc-src 2006-01-23 10:35:53 +00:00
file_filter.sh set +x attribute for scripts 2005-07-27 09:18:33 +00:00
fpc-src.spec renamed fpcsrc to fpc-src 2006-01-23 10:35:53 +00:00
fpcsrc-patch fixed create fpc rpm 2002-08-18 04:56:58 +00:00
get_lazarus_version.sh fixed getversion 2006-01-21 18:11:07 +00:00
README version 0.9.14 2006-03-30 10:52:46 +00:00
replace_in_files.pl fixed ambigious with ambiguous 2005-03-23 10:45:06 +00:00
setup.sh renamed fpcsrc to fpc-src 2006-01-23 10:35:53 +00:00
smart_strip.sh set +x attribute for scripts 2005-07-27 09:18:33 +00:00

Installation tools
==================

This document describes how to create the various packages for lazarus
including the required freepascal packages (fpc and fpc-src).

--------------------------------------------------------------------------------
TGZ

Creating the fpc-src tgz:

  There are two ways to do it and so there are two scripts. The first downloads
  the fpc svn and packs it. The second uses an existing fpc svn directory,
  copies it, remove unnecessary files and packs it. The second script is
  therefore much faster, but it may miss removing every old, unnecessary files.
  
  The download and pack script:
  The script create_fpc_export_tgz.sh makes a svn export of the fpc.

  For 2.1.x: ./create_fpc_export_tgz.sh devel 05/20/04

  The 05/20/04 means may 20th 2004.
  
  The copy and pack script:
  The script create_fpc_tgz_from_local_dir.sh needs as parameter the fpc cvs
  directory and compresses it to a tgz. For example
  ./create_fpc_tgz_from_local_dir.sh ~/pascal/fpc fpc-2.0.1.tgz


Creating the lazarus tgz:

  There are two ways to do it and so there are two scripts. The first downloads
  the fpc cvs and packs it. The second uses an existing fpc cvs directory,
  copies it, remove unnecessary files and packs it. The second script is
  therefore much faster, but it may miss removing all old, unnecessary files.

  The download and pack script:
  The script create_lazarus_export_tgz.sh makes a cvs export of lazarus and
  compress it. For example:
  ./create_lazarus_export_tgz.sh lazarus-20030316.tgz
  
  The copy and pack script:
  The script create_lazarus_tgz_from_local_dir.sh needs as parameter the
  lazarus cvs directory and compress it to lazarus-0.8.5.tgz.

--------------------------------------------------------------------------------

RPM:

How to create RPM packages as normal user / non root:

  You don't need to be root to built rpm packages.
  You only need a ~/.rpmacros file overriding some values. The script
  <lazarusdir>/tools/install/rpm/create_nonroot_macros.sh will setup one. Do:

    []$ cd <lazarusdir>/tools/install/rpm
    []$ ./create_nonroot_macros.sh

  From now all new rpms will be built in ~/rpm/.


Creating the fpc and the fpc-src rpm:

  There are two versions of the compiler: the old 2.0.x and the new (but not
  yet released) developer version 2.1.x. To build them, you must install fpc
  first. Install the stable fpc release (2.0.x).
  Note: The 2.0.x can not be built with a 2.1.x compiler and the recommended
  startup compiler for the 2.1.x is the released fpc 2.0.x.

  If you have your own fpc sources you can build the fpc rpm with:

  []$ cd <lazarus_directory>/tools/install
  []$ ./build_fpc_rpm.sh nodocs /path/to/your/fpc/sources/fpc

  Then build the fpc-src rpm:

  []$ ./build_fpc-src_rpm.sh /path/to/your/fpc/sources/fpc

  Normally you can find the rpms under /usr/src/redhat/RPMS/i386/
  and /usr/src/redhat/SRPMS/.
  Or if you have a ~/.rpmmacros file the new rpm will be in ~/rpm/RPMS/i386/
  and ~/rpm/SRPMS/.


Creating the lazarus rpm:

  Important:
  If you have created a new fpc RPM, then you should install it *before* you
  build the lazarus RPM. Otherwise the compiled lazarus RPM is not compatible
  to the fpc RPM.

  []$ ./create_lazarus_rpm.sh.


Creating other system specific rpms:

  rpm --rebuild lazarus-0.9.14.src.rpm


--------------------------------------------------------------------------------

Debian:

Creating the debian fpc and fpc-src packages:

  There are two versions of the compiler: the stable 2.0.x and the unstable
  developer version 2.1.x. To build them, you must install fpc first. Install the
  stable fpc release (2.0.x). Note: The 2.0.x can not be built with a 2.1.x
  compiler.
  The create_fpc_deb.sh works nearly automatically. Become root and execute it.
  For 2.0.x: ./create_fpc_deb.sh stable
  For 2.1.x: ./create_fpc_deb.sh devel

  What it does: First it checks if the fpc source tgz is already created and
  if not, it automatically downloads it. The script does not use the current
  version, but the latest known to work with lazarus. Then it unpacks the
  source, compiles it and builds the debs. Normally you can find the debs under
  /usr/src/ and the current directory.


Creating the debian lazarus package:

  Important:
  If you have created new fpc debs, then you should install them, *before* you
  build the lazarus deb. Otherwise the compiled lazarus deb is not compatible
  to the fpc debs.

  As root:
  Execute create_lazarus_deb.sh.

--------------------------------------------------------------------------------

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 ~/fpcinst/usr/local)
2. cd fpc   (your fpc source directory)
3. make all
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=~/fpcinst/usr/local
   Fix sym link:
   sudo ln -sf /usr/local/lib/fpc/2.1.1/ppcppc ~/fpcinst/usr/local/bin/ppcppc
6. unzip the <lazarus>/tools/install/macosx/fpc_installer_info.zip somewhere,
   open "fpc 2.1.1.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 ~/fpcinst and then choose File->Create Package
7. Put the package in a directory called "Free Pascal Compiler 2.1.1",
   add in the "Introduction.txt" and "ReadMe.txt" files from the dmg you
   already downloaded and create a (compressed or not doesn't really
   matter, the package is already compressed) disk image from the folder
   with Disk Copy (if you're under 10.1/10.2), Disk Utility (10.3) or
   hdiutil (command line, see manpage for how to do it).

Unfortunaly, there does not seem to be a command line program that can
create an installer package starting from a .pmsp file and PackageMaker
is not AppleScriptable... It could still be automated using GUI
scripting of course).