Building the Eclipse Launcher and SWT Libraries for Other Architectures
This is a process for compiling the Eclipse Launcher and SWT libraries
on systems without supported binary distributions.
-
In order to build the required libraries and run Eclipse,
you will require a JDK (Java Development Kit) of version 1.3 or later.
-
Download an Eclipse distribution from
http://www.eclipse.org/downloads/index.php.
-
Unzip the distribution. This will create a directory called eclipse.
This directory is subsequently referred to as ECLIPSE_HOME.
-
Change directory to
ECLIPSE_HOME/plugins/org.eclipse.platform.source_X.X.X/src/org.eclipse.platform_X.X.X
and unzip the file launchersrc.zip.
This will create a directory called library.
-
Change directory into library/WS (where WS is the name of the windowing system e.g. win32, motif, gtk, photon, or carbon).
Modify any incorrect _HOME variables defined at the top of the appropriate .mak file.
-
Run the build command (csh build.csh for unix and linux, build.bat for Windows).
This will create an executable launcher called eclipse.
Move this eclipse executable to ECLIPSE_HOME.
-
Change directory to
ECLIPSE_HOME/plugins/org.eclipse.platform.WS.source_X.X.X/src/org.eclipse.swt.WS_X.X.X/ws/WS
(where WS is the name of the windowing system such as win32, motif, gtk, photon, carbon).
Unzip contained file swtsrc.zip, which will create a directory called library.
-
Change directory into library and modify any incorrect _HOME
variables defined at the top of the appropriate .mak file.
Note that contained variable JAVA_HOME should be set to point
to the root directory of your installed JDK.
-
Run the build command (csh build.csh for unix and linux platforms, build.bat for Windows).
This will create the appropriate library file(s) in the current directory.
On windows, this will create a swt_XXXX.dll file. On linux motif this will create a libswt_XXXX.so file.
On some platforms, more than one library will be created.
-
Move these library file(s) to somewhere on your library path.
A common place to put them is in the Eclipse root directory, assuming that
"." is on your library path.
Alternately, you can put the libraries in ECLIPSE_HOME/plugins/org.eclipse.swt.WS_X.X.X/os/OS/ARCH
(where WS is the windowing system name, OS is the operating system name and ARCH is the architecture name).
For example on linux GTK running on PC the location is
ECLIPSE_HOME/plugins/org.eclipse.swt.gtk_X.X.X/os/linux/x86. The value of
ARCH can be determined using System.out.println(System.getProperty("os.arch"));
-
Change directories to the Eclipse root and run the command
./eclipse -vm VM -ws WS -os OS -arch ARCH,
where VM points to the JRE (Java Runtime Environment) contained in your installed JDK
and WS, OS and ARCH are as described above.
If you encounter problems following these steps then you can refer to the
Eclipse
newsgroups or the platform-swt-dev
mailing list and its archives.
This document was originally contributed by Colin R Devilbiss.