Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] SWT Gtk developer scripts

Note, the scripts don't use maven.

It goes directly and runs bash commands. The reason is maven is kinda slow and waiting for a minute for a rebuild for me is not something I want to do many times a day. On my machine the rebuild*.sh script runs in about 2 seconds.

Note, the rebuild script is not intended for use by a server, it's really designed for the SWT developer who rebuilds SWT bindings many times a day. E.x
- changes in OS.java,
- run older version of SWT for bisecting
- test patches that involve native changes

I don't know enough about maven/custom swt to answer your question, but in general the script doesn't look at any of the java/pom baseline stuff. It just looks at the '.c & .h' files and produces libraries. After if you do a git status in the binary repo, you will see new '.so' libs.

With that said, if there are requests, I could build something maven related.
For example the following rebuilds bindings via maven:

cd ~/git/eclipse.platform.swt.binaries/bundles/org.eclipse.swt.gtk.linux.x86_64
            mvn clean verify -Pbuild-individual-bundles -Dnative=gtk.linux.x86_64

Faster:
mvn -Pbuild-individual-bundles -Dnative=gtk.linux.x86_64


On Wed, Apr 12, 2017 at 10:51 AM, Andrey Loskutov <loskutov@xxxxxx> wrote:
Wiki would be great, definitly.
 
Do this scripts also allow to build a SDK package with a custom SWT build (NOT from eclipse.org)? I've failed to do this, see the my question and discussion at https://dev.eclipse.org/mhonarc/lists/platform-swt-dev/msg08208.html.
 
Kind regards,
Andrey Loskutov

http://google.com/+AndreyLoskutov
 
 
Gesendet: Mittwoch, 12. April 2017 um 16:36 Uhr
Von: "Leo Ufimtsev" <Leonidas@xxxxxxxxxx>
An: "Eclipse Platform SWT component developers list." <platform-swt-dev@xxxxxxxxxxx>
Betreff: [platform-swt-dev] SWT Gtk developer scripts
Hello folks,
 
Compiling gtk/swt custom code and debugging stuff can be cumbersome. To automate the whole process I added a few bash script to make gtk development easier:

~/git/eclipse.platform.swt/bundles/org.eclipse.swt.tools/gtk/
 
1) Building Gtk from sources
./clone_build_gtk_debug.sh
This is useful if you have to:
- Debug gtk part of swt
- Run SWT against various gtk versions

This guy clones the gtk repository and builds gtk with debugging support for you.
It then pulls out all of the 'so' libs (gtk & gdk) and puts them into:
$HOME/gnomeso/curr
After, you can run SWT snippets with env var:
LD_LIBRARY_PATH=$HOME/gnomeso/curr
 
2) Install dependencies for gtk compilation
./install_sysdeps.sh
At least on fedora, this automatically installs everything you need to build gtk from sources and being able to compile swt glue code.
 
On non-fedora, it prints required packages. (ubuntu..) and you can install them manually with your package manager.
(non-fedora contributions are welcome).
 
3) Rebuild swt natives
./rebuild_swt_natives.sh
This is the script you'd probably be running many times a day.
 
This automatically rebuilds swt native code and puts it into your swt binary folder. For both,gtk2 and gtk3. It builds them with debugging support, you you can set breakpoints in os_custom.c and debug the native code (yay).
 
It cleans out git binary folder from old .so libs, to avoid wrong libs being loaded during bisect.
 
It fixes .classpath for swt & snippet project, which helps overcome folder/classpath changes.
 
Also prints current number of compile warnings :-).
 
------
 
Each script has instructions at the top and it prints further instructions at the end.
 
I hope they're helpful.
 
Please let me know if you have any questions.
 
Related bug:
Bug 514509 – [Gtk] Organise swt gtk developer scripts and add build scripts
https://bugs.eclipse.org/bugs/show_bug.cgi?id=514509

--
Leo Ufimtsev
Software Engineer, Eclipse team.
Toronto, Canada

Red Hat, Inc.
Leonidas@xxxxxxxxxx | http://DeveloperBlog.RedHat.com/
_______________________________________________ platform-swt-dev mailing list platform-swt-dev@xxxxxxxxxxx To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/platform-swt-dev

_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev



--
Leo Ufimtsev
Software Engineer, Eclipse team.
Toronto, Canada

Red Hat, Inc.
Leonidas@xxxxxxxxxx | http://DeveloperBlog.RedHat.com/

Back to the top