Difference between revisions of "Compile EiffelStudio with Automatic Build Scripts"

m
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
[[Category:Compiler]]
 
[[Category:Compiler]]
[[Category:EiffelStudio]]
+
[[Category:Build Scripts]]
  
 
'''WARNING!'''
 
'''WARNING!'''
Line 53: Line 53:
 
'''(don't restart the terminal during the compilation, all variables will be lost!)'''
 
'''(don't restart the terminal during the compilation, all variables will be lost!)'''
 
<pre>
 
<pre>
export EIFFEL_SRC= home/user/eiffel/trunk/Src
+
export EIFFEL_SRC=/home/user/eiffel/trunk/Src
export ISE_EIFFEL= home/user/eiffel/Eiffel60
+
export ISE_EIFFEL=/home/user/eiffel/Eiffel60
 
export ISE_PLATFORM=linux-x86
 
export ISE_PLATFORM=linux-x86
 
export ISE_LIBRARY=${EIFFEL_SRC}
 
export ISE_LIBRARY=${EIFFEL_SRC}
export PATH=${PATH}:${ISE_EIFFEL}/studio/spec/${ISE_PLATFORM}/bin:${EIFFEL_SRC}/library/gobo/bin
+
export GOBO=${EIFFEL_SRC}/library/gobo/svn
 +
export PATH=${PATH}:${ISE_EIFFEL}/studio/spec/${ISE_PLATFORM}/bin:${EIFFEL_SRC}/library/gobo/svn/bin
 
</pre>
 
</pre>
  
Line 63: Line 64:
 
edit your /home/user/.bashrc and add these lines:
 
edit your /home/user/.bashrc and add these lines:
 
<pre>
 
<pre>
 +
EIFFEL_SRC="/home/user/eiffel/trunk/Src"
 
ISE_EIFFEL="/home/user/eiffel/Eiffel60"
 
ISE_EIFFEL="/home/user/eiffel/Eiffel60"
 
ISE_PLATFORM="linux-x86"
 
ISE_PLATFORM="linux-x86"
EIFFEL_SRC="/home/user/eiffel/trunk/Src"
 
 
ISE_LIBRARY="${EIFFEL_SRC}"
 
ISE_LIBRARY="${EIFFEL_SRC}"
PATH=${PATH}:${ISE_EIFFEL}/studio/spec/${ISE_PLATFORM}/bin:${EIFFEL_SRC}/library/gobo/svn/bin
 
 
GOBO="/home/user/eiffel/trunk/Src/library/gobo/svn
 
GOBO="/home/user/eiffel/trunk/Src/library/gobo/svn
 +
PATH=${PATH}:${ISE_EIFFEL}/studio/spec/${ISE_PLATFORM}/bin:${EIFFEL_SRC}/library/gobo/svn/bin
 
export ISE_EIFFEL ISE_PLATFORM EIFFEL_SRC ISE_LIBRARY PATH GOBO
 
export ISE_EIFFEL ISE_PLATFORM EIFFEL_SRC ISE_LIBRARY PATH GOBO
 
</pre>
 
</pre>
 
'''IMPORTANT: You need to restart the terminal for the changes to take effect'''
 
'''IMPORTANT: You need to restart the terminal for the changes to take effect'''
 
  
 
== Compiling and Installing Gobo tools ==
 
== Compiling and Installing Gobo tools ==
  
 
The Gobo tools source code is already included in the SVN checkout of the Eiffel source. But we still need to bootstrap it.  
 
The Gobo tools source code is already included in the SVN checkout of the Eiffel source. But we still need to bootstrap it.  
For further information about the different valid compiler please read the Readme.txt in the bootstrap directory or execute the bootstrap script with any arguments
+
For further information about the different valid compilers please read the Readme.txt in the bootstrap directory or execute the bootstrap script without any arguments.
 
<pre>
 
<pre>
 
cd $GOBO/work/bootstrap
 
cd $GOBO/work/bootstrap
Line 83: Line 83:
 
</pre>
 
</pre>
  
 +
(this will take a while)
  
 
== Compiling EiffelStudio ==
 
== Compiling EiffelStudio ==
 +
 
Now go to trunk/Src and run the check_setup script
 
Now go to trunk/Src and run the check_setup script
  
Line 96: Line 98:
 
<pre>
 
<pre>
 
cd $EIFFEL_SRC
 
cd $EIFFEL_SRC
make build_dev
+
make build_delivery
 
</pre>
 
</pre>
 +
 +
(this will take a while)
 +
  
 
GOOD LUCK!
 
GOOD LUCK!
Line 107: Line 112:
 
== Prerequisites ==
 
== Prerequisites ==
  
In this example we use the example directory C:\Programme\EiffelSoftware\. That means the binary EiffelStudio would be installed at C:\Programme\EiffelSoftware\Eiffel60 and the trunk at C:\Programme\EiffelSoftware\trunk. This documentation will have these paths as examples, so please replace them if you use different paths.
+
In this example we use the example directory C:\Programme\EiffelSoftware\. That means the binary EiffelStudio would be installed at C:\Programme\EiffelSoftware\Eiffel60 and the trunk at C:\Programme\EiffelSoftware\trunk. Cygwin is located in C:\cygwin. This documentation will have these paths as examples, so please replace them if you use different paths.
  
At first you need a C compiler on your system. We recommend to install Microsoft Visual Studio .NET as it has all included and is easy to install. Instead you can install the Microsoft SDK from http://download.microsoft.com/download/a/7/7/a7767f09-0136-4a96-a1f8-276bf0ee31fa/Setup.exe
+
At first you need a C compiler on your system. We recommend to install Microsoft Visual Studio .NET as it has all included and is easy to install. Instead you can install the Microsoft SDK from http://download.microsoft.com/download/a/7/7/a7767f09-0136-4a96-a1f8-276bf0ee31fa/Setup.exe . Please also see the documentation that is available under [[Installing Microsoft C compiler]].
  
 
To compile EiffelStudio, you need an already working EiffelStudio compiler (which comes with the precompiled EiffelStudio installation) on your machine. The current source tree requires at least version 6.0 of EiffelStudio. You can download the precompiled version from http://eiffelsoftware.origo.ethz.ch/downloads/builds/. Read the existing documentation to install EiffelStudio.
 
To compile EiffelStudio, you need an already working EiffelStudio compiler (which comes with the precompiled EiffelStudio installation) on your machine. The current source tree requires at least version 6.0 of EiffelStudio. You can download the precompiled version from http://eiffelsoftware.origo.ethz.ch/downloads/builds/. Read the existing documentation to install EiffelStudio.
Line 115: Line 120:
 
To checkout the latest source code from the repository, you need a subversion client installed (for example TortoiseSVN).
 
To checkout the latest source code from the repository, you need a subversion client installed (for example TortoiseSVN).
  
As the compilation needs a working bash on the system you need to install cygwin. It is important that you choose Unix/binary as Default Text File Type during the installation and select a bash version 3.1-6 (in the package selection screen --> Shells /bash, click on version number to change)
+
As the compilation needs a working bash on the system you need to install cygwin. It is important that you choose Unix/binary as Default Text File Type during the installation and select a bash version 3.1-6 (in the package selection screen --> Shells /bash, click on version number to change). The latest version of Bash (while writing this documentation) had some troubles with Windows newlines. Future versions should be fine, too, but if you have trouble running the scripts, this might be the first thing to check.
 
+
  
 
== Downloading Source Code ==
 
== Downloading Source Code ==
Line 134: Line 138:
 
== Setting Environmental Variables ==
 
== Setting Environmental Variables ==
  
These environmental variables need to be set: ISE_EIFFEL, ISE_PLATFORM (these two should already be set from EiffelStudio installation), ISE_LIBRARY, EIFFEL_SRC, ISE_C_COMPILER, GOBO. As well the binary-paths for gobo and EiffelStudio need to be added to the PATH variable.
+
These environmental variables need to be set: ISE_EIFFEL, ISE_PLATFORM (these two should already be set from EiffelStudio installation), ISE_LIBRARY, EIFFEL_SRC, ISE_C_COMPILER, GOBO. As well the binary-paths for gobo, cygwin and EiffelStudio need to be added to the PATH variable.
  
Goto Systemsteuerung, open the 'System' Dialogue, in 'erweitert' you can click on 'Umgebungsvariabeln' In the upper Box enter the new environmental variables by clicking new:
+
Goto Systemsteuerung, open the 'System' Dialogue, in 'erweitert' you can click on 'Umgebungsvariabeln' In the upper Box enter each of the new environmental variables by clicking new:
 +
 
 +
<pre>
 +
name value
 +
 
 +
EIFFEL_SRC C:\Programme\EiffelSoftware\trunk\Src
 +
ISE_EIFFEL C:\Programme\EiffelSoftware\Eiffel60
 +
ISE_PLATFORM windows
 +
ISE_LIBRARY %EIFFEL_SRC%
 +
ISE_C_COMPILER msc
 +
GOBO C:\Programme\EiffelSoftware\trunk\Src\library\gobo\svn
 +
Path %Path%;%ISE_EIFFEL%\studio\spec\%ISE_PLATFORM%\bin;%GOBO%\bin;C:\cygwin\bin;
 +
C:\Programme\Microsoft Visual Studio .NET 2003\Vc7\bin
 +
</pre>
 +
 
 +
 
 +
== Compiling and Installing Gobo tools ==
 +
 
 +
You should really use the Command Prompt included in Microsoft Visual Studio .NET. The regular Windows Command Prompt should work as well but you had to set all the binary paths for Visual Studio.
 +
 
 +
The Gobo tools source code is already included in the SVN checkout of the Eiffel source. But we still need to bootstrap it. For further information about the different valid compilers please read the Readme.txt in the bootstrap directory or execute the bootstrap script without any arguments.
 +
 
 +
<pre>
 +
cd %GOBO%\work\bootstrap
 +
bootstrap.bat msc ise
 +
</pre>
 +
 
 +
(this will take a while)
 +
 
 +
 
 +
== Compiling EiffelStudio ==
 +
 
 +
Now go to C:\Programme\EiffelSoftware\trunk\Src and run the check_setup script
 +
 
 +
<pre>
 +
cd %EIFFEL_SRC%
 +
Makefile.bat check_setup
 +
</pre>
 +
 
 +
If all tests were successful, it says "Setup check complete. Your configuration seems ok!" Now you can start compiling. Otherwise check the error messages and fix the problems.
 +
 
 +
<pre>
 +
cd %EIFFEL_SRC%
 +
Makefile.bat build_delivery
 +
</pre>
 +
 
 +
(this will take a while)
 +
 
 +
 
 +
GOOD LUCK!

Latest revision as of 14:16, 30 April 2008


WARNING!

THIS DOCUMENT IS UNDER HEAVY DEVELOPMENT AND CORRESPONDS ONLY TO THE ES-MAKE BRANCH



Linux-x86

Prerequisites

In this example we use the example directory /home/user/eiffel. That means the binary EiffelStudio would be installed at /home/user/eiffel/Eiffel60 and the trunk at /home/user/eiffel/trunk. This documentation will have these paths as examples, so please replace them if you use different paths.

To compile EiffelStudio, you need an already working EiffelStudio compiler (which comes with the precompiled EiffelStudio installation) on your machine. The current source tree requires at least version 6.0 of EiffelStudio. You can download the precompiled version from http://eiffelsoftware.origo.ethz.ch/downloads/builds/. Read the existing documentation to install EiffelStudio.

To checkout the latest source code from the repository, you need subversion installed.

Also be sure to have the the gtk2.0 development library (for Ubuntu it would be the package libgtk2.0-dev) and the xtst development library (ubuntu: libxtst-dev) installed


Downloading Source Code

Go to the directory where you want to have the EiffelStudio source code (/home/user/eiffel). Now check out the sources from the repository.

cd /home/user/eiffel
svn co https://eiffelsoftware.origo.ethz.ch/svn/es/branches/es-make trunk


Setting Environmental Variables

These environmental variables need to be set: ISE_EIFFEL, ISE_PLATFORM (these two should already be set from EiffelStudio installation), ISE_LIBRARY, EIFFEL_SRC, GOBO. As well the binary paths for gobo and EiffelStudio need to be added to the PATH variable.

There are two different ways for doing this: either set it temporary for this session (don't restart the terminal) or set it permanently in your .bashrc

  • Temporary

(don't restart the terminal during the compilation, all variables will be lost!)

export EIFFEL_SRC=/home/user/eiffel/trunk/Src
export ISE_EIFFEL=/home/user/eiffel/Eiffel60
export ISE_PLATFORM=linux-x86
export ISE_LIBRARY=${EIFFEL_SRC}
export GOBO=${EIFFEL_SRC}/library/gobo/svn
export PATH=${PATH}:${ISE_EIFFEL}/studio/spec/${ISE_PLATFORM}/bin:${EIFFEL_SRC}/library/gobo/svn/bin
  • Permanent

edit your /home/user/.bashrc and add these lines:

EIFFEL_SRC="/home/user/eiffel/trunk/Src"
ISE_EIFFEL="/home/user/eiffel/Eiffel60"
ISE_PLATFORM="linux-x86"
ISE_LIBRARY="${EIFFEL_SRC}"
GOBO="/home/user/eiffel/trunk/Src/library/gobo/svn
PATH=${PATH}:${ISE_EIFFEL}/studio/spec/${ISE_PLATFORM}/bin:${EIFFEL_SRC}/library/gobo/svn/bin
export ISE_EIFFEL ISE_PLATFORM EIFFEL_SRC ISE_LIBRARY PATH GOBO

IMPORTANT: You need to restart the terminal for the changes to take effect

Compiling and Installing Gobo tools

The Gobo tools source code is already included in the SVN checkout of the Eiffel source. But we still need to bootstrap it. For further information about the different valid compilers please read the Readme.txt in the bootstrap directory or execute the bootstrap script without any arguments.

cd $GOBO/work/bootstrap
sh bootstrap.sh gcc ise

(this will take a while)

Compiling EiffelStudio

Now go to trunk/Src and run the check_setup script

cd $EIFFEL_SRC
make check_setup

If all tests were successful, it says „Setup check complete. Your configuration seems ok!“ Now you can start compiling.Otherwise check the error messages and fix the problems.

cd $EIFFEL_SRC
make build_delivery

(this will take a while)


GOOD LUCK!


Windows

Prerequisites

In this example we use the example directory C:\Programme\EiffelSoftware\. That means the binary EiffelStudio would be installed at C:\Programme\EiffelSoftware\Eiffel60 and the trunk at C:\Programme\EiffelSoftware\trunk. Cygwin is located in C:\cygwin. This documentation will have these paths as examples, so please replace them if you use different paths.

At first you need a C compiler on your system. We recommend to install Microsoft Visual Studio .NET as it has all included and is easy to install. Instead you can install the Microsoft SDK from http://download.microsoft.com/download/a/7/7/a7767f09-0136-4a96-a1f8-276bf0ee31fa/Setup.exe . Please also see the documentation that is available under Installing Microsoft C compiler.

To compile EiffelStudio, you need an already working EiffelStudio compiler (which comes with the precompiled EiffelStudio installation) on your machine. The current source tree requires at least version 6.0 of EiffelStudio. You can download the precompiled version from http://eiffelsoftware.origo.ethz.ch/downloads/builds/. Read the existing documentation to install EiffelStudio.

To checkout the latest source code from the repository, you need a subversion client installed (for example TortoiseSVN).

As the compilation needs a working bash on the system you need to install cygwin. It is important that you choose Unix/binary as Default Text File Type during the installation and select a bash version 3.1-6 (in the package selection screen --> Shells /bash, click on version number to change). The latest version of Bash (while writing this documentation) had some troubles with Windows newlines. Future versions should be fine, too, but if you have trouble running the scripts, this might be the first thing to check.

Downloading Source Code

Go to the directory where you want to have the EiffelStudio source code (C:\Programme\EiffelSoftware\). Now check out the sources from the repository.

right-click in the folder, choose SVN Checkout
URL of repository: https://eiffelsoftware.origo.ethz.ch/svn/es/branches/es-make
Checkout directory: C:\Programme\EiffelSoftware\trunk

possibly you need to kill TSVNcache.exe ... memory leak


Setting Environmental Variables

These environmental variables need to be set: ISE_EIFFEL, ISE_PLATFORM (these two should already be set from EiffelStudio installation), ISE_LIBRARY, EIFFEL_SRC, ISE_C_COMPILER, GOBO. As well the binary-paths for gobo, cygwin and EiffelStudio need to be added to the PATH variable.

Goto Systemsteuerung, open the 'System' Dialogue, in 'erweitert' you can click on 'Umgebungsvariabeln' In the upper Box enter each of the new environmental variables by clicking new:

		name					value

	EIFFEL_SRC				C:\Programme\EiffelSoftware\trunk\Src
	ISE_EIFFEL				C:\Programme\EiffelSoftware\Eiffel60
	ISE_PLATFORM				windows
	ISE_LIBRARY				%EIFFEL_SRC%
	ISE_C_COMPILER				msc
	GOBO					C:\Programme\EiffelSoftware\trunk\Src\library\gobo\svn
	Path					%Path%;%ISE_EIFFEL%\studio\spec\%ISE_PLATFORM%\bin;%GOBO%\bin;C:\cygwin\bin;
						C:\Programme\Microsoft Visual Studio .NET 2003\Vc7\bin


Compiling and Installing Gobo tools

You should really use the Command Prompt included in Microsoft Visual Studio .NET. The regular Windows Command Prompt should work as well but you had to set all the binary paths for Visual Studio.

The Gobo tools source code is already included in the SVN checkout of the Eiffel source. But we still need to bootstrap it. For further information about the different valid compilers please read the Readme.txt in the bootstrap directory or execute the bootstrap script without any arguments.

cd %GOBO%\work\bootstrap
bootstrap.bat msc ise

(this will take a while)


Compiling EiffelStudio

Now go to C:\Programme\EiffelSoftware\trunk\Src and run the check_setup script

cd %EIFFEL_SRC%
Makefile.bat check_setup

If all tests were successful, it says "Setup check complete. Your configuration seems ok!" Now you can start compiling. Otherwise check the error messages and fix the problems.

cd %EIFFEL_SRC%
Makefile.bat build_delivery

(this will take a while)


GOOD LUCK!