Quantcast

SWT Gtk developer scripts

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

SWT Gtk developer scripts

Leo Ufimtsev-2
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.
[hidden email] | http://DeveloperBlog.RedHat.com/

_______________________________________________
platform-swt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: SWT Gtk developer scripts

Daniel Megert
Nice. I suggest you add this to a wiki page.

Dani



From:        Leo Ufimtsev <[hidden email]>
To:        "Eclipse Platform SWT component developers list." <[hidden email]>
Date:        12.04.2017 16:36
Subject:        [platform-swt-dev] SWT Gtk developer scripts
Sent by:        [hidden email]




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@...| http://DeveloperBlog.RedHat.com/
_______________________________________________
platform-swt-dev mailing list
[hidden email]
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
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: SWT Gtk developer scripts

Andrey Loskutov
In reply to this post by Leo Ufimtsev-2
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" <[hidden email]>
An: "Eclipse Platform SWT component developers list." <[hidden email]>
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.
[hidden email] | http://DeveloperBlog.RedHat.com/
_______________________________________________ platform-swt-dev mailing list [hidden email] 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
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: SWT Gtk developer scripts

Leo Ufimtsev-2
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 <[hidden email]> 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" <[hidden email]>
An: "Eclipse Platform SWT component developers list." <[hidden email]>
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.
[hidden email] | http://DeveloperBlog.RedHat.com/
_______________________________________________ platform-swt-dev mailing list [hidden email] 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
[hidden email]
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.
[hidden email] | http://DeveloperBlog.RedHat.com/

_______________________________________________
platform-swt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: SWT Gtk developer scripts

Leo Ufimtsev-2
In reply to this post by Daniel Megert
I've added a note about updating the Wiki business. I'll tryna shape up the wiki after Oxygen release.

Wiki be here:
https://wiki.eclipse.org/SWT/Devel/Gtk

On Wed, Apr 12, 2017 at 10:40 AM, Daniel Megert <[hidden email]> wrote:
Nice. I suggest you add this to a wiki page.

Dani



From:        Leo Ufimtsev <[hidden email]>
To:        "Eclipse Platform SWT component developers list." <[hidden email]>
Date:        12.04.2017 16:36
Subject:        [platform-swt-dev] SWT Gtk developer scripts
Sent by:        [hidden email]




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.

[hidden email]| http://DeveloperBlog.RedHat.com/
_______________________________________________
platform-swt-dev mailing list
[hidden email]
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
[hidden email]
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.
[hidden email] | http://DeveloperBlog.RedHat.com/

_______________________________________________
platform-swt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: SWT Gtk developer scripts

Ian Pun
In reply to this post by Leo Ufimtsev-2

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.
[hidden email] | http://DeveloperBlog.RedHat.com/


_______________________________________________
platform-swt-dev mailing list
[hidden email]
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
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
Loading...