Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [platform-swt-dev] building native libraries for Linux/PPC

> >>>>> "Arnaud" == Installe Arnaud <Installe_Arnaud@xxxxxxx> writes:
> 
> Arnaud> That's my problem: I can't find swtsrc.zip anywhere in the
> Arnaud> source distribution.  I can't find the
> Arnaud> plugins/org.eclipse.gtk.* either, for that matter.  The CVS
> Arnaud> way didn't work for me either: if I do "ant -buildfile
> Arnaud> build.xml" from within the org.eclipse.swt project I checked
> Arnaud> out, no bin directory gets created.
> 
> When the top-level build.xml checks out org.eclipse.swt, I see an
> `Eclipse SWT PI' subdirectory.  Underneath this is C source for the
> Gtk port, in `Eclipse SWT PI/gtk/library/'.

Thanks a bunch !  I compiled it, then also found the C-code to the
update-core, core, and platform-launcher, and eclipse now works on my Apple
running Linux !  :)))

I'll just add in my experiences here with the 2.0.1 codebase:

1. Building libswt*.so:

I've had to copy over the files from

	plugins/org.eclipse.swt/Eclipse SWT/common/library

to

	plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library

before things compiled.  I've also had to remove the "bin" at the end of the
default definition of the JAVA_JNI variable, and the IVE_HOME to the
location of the IBM-JDK on my machine.  Then just run: make -f make_gtk.mak.

Copied over the resulting libraries to

	plugins/org.eclipse.swt.gtk/os/linux/x86

2. Building libupdate.so:

Run ant in the directory plugins/org.eclipse.update.core.linux/src.

3. Building libcore:

Run make in plugins/org.eclipse.core.resources/library/linux.  Copy the
resulting library over to
plugins/org.eclipse.core.resources.linux/os/linux/x86.

4. Building platform launcher:

Run 

	export PLATFORM_OUTPUT=eclipse
	export PLATFORM_NAME=eclipse
	make -f make_linux.mak

in plugins/platform-launcher/library/motif.  You'll probably need to change
the MOTIF_HOME variable in make_linux.mak before you do.  Copy over the
resulting "eclipse" binary over to plugins/platform-launcher/bin/linux/gtk.
(It really doesn't use motif, but this is so eclipse finds the correct
platform launcher at startup.)

5. Build the java classes:

Run

	export PATH=/usr/share/ant/bin:$PATH
	export JAVA_HOME=<your JDK's path>
	export ANT_HOME=/usr/share/ant
	./build -os linux -ws gtk -target compile
	./build -os linux -ws gtk -target install

in the eclipse root.

6. Run eclipse:

	./eclipse -arch x86
			^^

We need to specify x86 here because we chose to install the libraries in the
existing x86 directories.  It'd have been cleaner to create new directories
for the real platform (I suppose it'd be detected as "ppc" ?), and create
associated files in features/org.eclipse..., but libcore is only subdivided
by OS, and not by architecture, which isn't really clean either, so I didn't
take the trouble to make it cleaner.

Again, thanks a bunch !  Great IDE !

	
Arnaud

> Note that the ant build does not compile the C code :-(.
> This means that you must compile it by hand.
> You'll have to do this whereever there is native code.
> 
> We're working on patches to change this, since we want to be able to
> have a way to build the entire tree, including the native code, from
> scratch.  However, our patches aren't ready yet.  We'll be submitting
> them once they are.
> 
> Tom
> _______________________________________________
> platform-swt-dev mailing list
> platform-swt-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/platform-swt-dev
> 


Back to the top