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

Thanks for doing this Leo! +1


On 12/04/17 10:36 AM, Leo Ufimtsev wrote:
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


Back to the top