MakePkg Installation and Usage HOWTO #################################### This document explains how to set up your development environment in order to use the SysToMath package builder command makepkg installed by the setup program MakePkgSetup-.exe. 1 Download and install the package documentation, script files and executables ============================================================================== - Download the Win32 package installer MakePkgSetup-.exe from SysToMath (see http://www.SysToMath.com/etc/html/libraries.html). - Environment Variable LOCROOT This environment variable shall reside in the system environment (Settings, Control Panel, System, Enhanced, Environment, System Variables). As the Win32 executables and DLLs are installed in %LOCROOT%\bin\w32, it is recommended to add the value %LOCROOT%\bin\w32 to the system path. This has the advantage that all programs and DLLs located in %LOCROOT%\bin\w32 are found without stating an explicit directory path. It is further recommended that %LOCROOT% does not contain spaces and target an initially empty directory on a NTFS partition with at least 4 GB of free space. If the partition of that directory is no NTFS partition, file hard links will be replaced by copies of the files concerned. The directory %LOCROOT% serves as the installation path of all SysToMath packages installed on the system. - Install the package with the installation path %LOCROOT% by executing the Win32 package installer MakePkgSetup.exe. - Environment Variable DEVLROOT This environment variable shall reside in the system environment (Settings, Control Panel, System, Enhanced, Environment, System Variables). %DEVLROOT% shall be different from %LOCROOT% and also the last directory of the path %DEVLROOT% shall be differerent from the last directory of the path %LOCROOT%. It is further recommended that %DEVLROOT% does not contain spaces and target an initially empty directory on a partition with at least 4 GB of free space. 2 Download and install the SysToMath package sources (optional) =============================================================== - Download the SysToMath package source archive MakePkgSrc-.tgz from SysToMath (see http://www.SysToMath.com/etc/html/libraries.html). - Expand the package source archive into the directory %DEVLROOT% or into a subdirectory thereof. For the correct functioning of the command makepkg it is important that all SysToMath package source archives are installed somewhere in the tree rooted by %DEVLROOT%. - Read the file ReleaseHowto.txt of the package source archive to learn about the procedures necessary to maintain and build the package. 3 Usage prerequisits ==================== - Environment variable CYGWINROOT This environment variable shall reside in the system environment (Settings, Control Panel, System, Enhanced, Environment, System Variables). The directory %CYGWINROOT% serves as Cygwin root directory. It is assumed that Cygwin (www.cygwin.com) with at least the complete packages Base, Devel, Net and Text is installed in %CYGWINROOT% for all users with default text file type set to UNIX/binary and that the values %CYGWINROOT%\usr\local\bin and %CYGWINROOT%\bin are contained in the system executable path before %SYSTEMROOT%\system32 in the above order. - Environment variable LOCPROG This environment variable shall reside in the system environment (Settings, Control Panel, System, Enhanced, Environment, System Variables). The directory %LOCPROG% serves as local program files root and may be equal to %PROGRAMFILES%. - Microsoft Visual Studio 6.0 (www.microsoft.com). It is assumed that the software is installed in %PROGRAMFILES% or %LOCPROG% and the environment variable %VS60ROOT% points to its insatllation directory. - Microsoft Visual Studio .NET 2003 (www.microsoft.com). It is assumed that the software is installed in %PROGRAMFILES% or %LOCPROG%. - Microsoft Visual Studio 2005 (www.microsoft.com). It is assumed that the software is installed in %PROGRAMFILES% or %LOCPROG%. - Microsoft Visual Studio 2008 (www.microsoft.com). It is assumed that the software is installed in %PROGRAMFILES% or %LOCPROG%. - Microsoft HTML Help Workshop (www.microsoft.com). It is assumed that the software is installed in %PROGRAMFILES%. - Microsoft Help 2.0 SDK (www.microsoft.com/downloads/details.aspx?familyid= ce1b26dc-d6af-42a1-a9a4-88c4eb456d87&displaylang=en) It is assumed that the software is installed in %PROGRAMFILES%. - Inno Setup 5 (www.innosetup.com). It is assumed that the software is installed in %LOCPROG%. - If the optional Windows command line Subversion client CollabNet Subversion (www.collab.net) shall to used by MakePkg instead of the Cygwin command line Subversion client used by default, ensure that it is installed in %LOCPROG% and its installation path "%LOCPROG%\CollabNet Subversion" is contained in the system executable path before %CYGWINROOT%\bin. - If the optional Windows GUI Subversion client TortoiseSVN (tortoisesvn.tigris.org) is used, ensure that its version is compatible with that of the command line Subversion client used by MakePkg. - Graphviz (http://www.graphviz.org/Download_windows.php). It is assumed that during the Graphviz installation the bin subdirectory of the installation directory (typically %PROGRAMFILES%\ATT\Graphviz) is added to the system executable path. Do not install version 2.12 which is buggy. Version 2.8 is known to work. Install Graphviz prior to Doxygen, oterwise you cannot compile doxygen. - The most recent version of doxygen (www.doxygen.org). It is assumed that the source code is downloaded from www.doxygen.org, untared, configured, compiled and installed under cygwin in a bash console like this: ./configure --platform win32-g++; make; make install As a result doxygen is installed in %CYGWINROOT%/usr/local/bin. - Ensure that the development environment is set up propperly according to the file ReleaseHowto.txt of the package to be built. 4 Supported Tool Families ========================= The SysToMath package builder package MakePkg is designed to support the tool families: - Microsoft Visual Studio Tool Family on Win32 - GNU Tool Family on Win32 - GNU Tool Family on Linux 4.1 Microsoft Visual Studio Tool Family on Win32 ------------------------------------------------ The Microsoft Visual Studio tool family on Win32 consists of the tool sets: - Microsoft Visual Studio 6.0 (vc60) - Microsoft Visual Studio .NET 2003 (vc71) - Microsoft Visual Studio 2005 (vc80) - Microsoft Visual Studio 2008 (vc90) 4.2 GNU Tool Family on Win32 ---------------------------- The GNU tool family on Win 32 consists of the tool sets: - GNU gcc for POSIX environment (cygwin) - GNU gcc for Microsoft environment (cygming) The tool set cygwin (chosen by gcc or g++ without option -mno-cygwin) produces libraries depending on the GPL licensed dynamic library cygwin1.dll and therefore is restricted to free open source software projects, whereas the tool set cygming (chosen by gcc or g++ with option -mno-cygwin) produces libraries only depending on the Microsoft runtime libraries and thus also allows commercial closed source software projects. In order to build packages with the GNU Tool Family on Win32 the command makepkg uses gcc and g++ from within a bash shell with the following additional environment: export locroot=$(cygpath -u "${LOCROOT//\\//}") 4.3 GNU Tool Family on Linux ---------------------------- The GNU tool family on Linux consists of the tool sets: - GNU gcc for glibc version >= 2.3 (libc23) - GNU gcc for glibc version >= 2.4 (libc24) In order to build packages with the GNU Tool Family on Linux is assumed that the directory trees rooted by the Win32 environment variables LOCROOT and DEVLROOT have been NFS exported to the Linux system by means of the Cygwin NFS server. Doing so translates the lnk files on the Win32 side to symbolic links on the Linux side. In the following x stands for 3 or 4 for the toolsets libc23 and libc24, respectively. 4.3.1 Access of the Linux system for the toolset libc23 and libc24 .................................................................. The Linux system used to build packages for the toolset libc2x shall be accessible via ssh. In order to accomplish that, makepkg assumes that the Win32 environment variables L32LIBC2xACCESS and L32LIBC2xPREFIX are set such that from within a bash shell on the Windows system the command export L32LocRoot=${L32LIBC2xPREFIX}/${LOCROOT##*\\} export L32DevlRoot=${L32LIBC2xPREFIX}/${DEVLROOT##*\\} ssh ${L32LIBC2xACCESS} yields a bash shell on the Linux system without prompting for a password, and that the directory trees rooted by the Win32 environment variables LOCROOT and DEVLROOT NFS exported on the Windows system are NFS mounted on the Linux system at the mount points ${L32LocRoot} and ${L32DevlRoot}, respectively. 4.3.2 Legacy access of the Linux system for the toolsets libc23 and libc24 .......................................................................... For backwards compatibility reasons, if there is an environment variable L32LIBC2xROOT, the Cygwin environment variables L32LocRoot and L32DevlRoot mentioned in 4.3.1 are defined as follows export L32LocRoot=${L32LIBC2xROOT}/local export L32DevlRoot=${L32LIBC2xROOT}/Development