diff options
Diffstat (limited to 'plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCGTKAutotoolsProject/src')
11 files changed, 204 insertions, 0 deletions
diff --git a/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCGTKAutotoolsProject/src/Basename.c b/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCGTKAutotoolsProject/src/Basename.c new file mode 100644 index 0000000..e40fd64 --- /dev/null +++ b/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCGTKAutotoolsProject/src/Basename.c | |||
@@ -0,0 +1,50 @@ | |||
1 | #include <gtk/gtk.h> | ||
2 | |||
3 | static void | ||
4 | hello (GtkWidget * widget, gpointer data) | ||
5 | { | ||
6 | g_print ("Hello World!\n"); | ||
7 | } | ||
8 | |||
9 | static gboolean | ||
10 | delete_event (GtkWidget * widget, GdkEvent * event, gpointer data) | ||
11 | { | ||
12 | g_print ("delete event occurred\n"); | ||
13 | return TRUE; | ||
14 | } | ||
15 | |||
16 | static void | ||
17 | destroy (GtkWidget * widget, gpointer data) | ||
18 | { | ||
19 | gtk_main_quit (); | ||
20 | } | ||
21 | |||
22 | int | ||
23 | main (int argc, char *argv[]) | ||
24 | { | ||
25 | GtkWidget *window; | ||
26 | GtkWidget *button; | ||
27 | |||
28 | gtk_init (&argc, &argv); | ||
29 | window = gtk_window_new (GTK_WINDOW_TOPLEVEL); | ||
30 | |||
31 | g_signal_connect (G_OBJECT (window), "delete_event", | ||
32 | G_CALLBACK (delete_event), NULL); | ||
33 | g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (destroy), NULL); | ||
34 | |||
35 | gtk_container_set_border_width (GTK_CONTAINER (window), 10); | ||
36 | button = gtk_button_new_with_label ("Hello World!"); | ||
37 | |||
38 | g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (hello), NULL); | ||
39 | g_signal_connect_swapped (G_OBJECT (button), "clicked", | ||
40 | G_CALLBACK (gtk_widget_destroy), | ||
41 | G_OBJECT (window)); | ||
42 | |||
43 | gtk_container_add (GTK_CONTAINER (window), button); | ||
44 | gtk_widget_show (button); | ||
45 | gtk_widget_show (window); | ||
46 | |||
47 | gtk_main (); | ||
48 | |||
49 | return 0; | ||
50 | } | ||
diff --git a/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCGTKAutotoolsProject/src/Basename.desktop.in.src b/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCGTKAutotoolsProject/src/Basename.desktop.in.src new file mode 100644 index 0000000..e96420f --- /dev/null +++ b/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCGTKAutotoolsProject/src/Basename.desktop.in.src | |||
@@ -0,0 +1,9 @@ | |||
1 | [Desktop Entry] | ||
2 | Version=@VERSION@ | ||
3 | Encoding=UTF-8 | ||
4 | Name=$(projectName) | ||
5 | Comment=A "$(message)" | ||
6 | Type=Application | ||
7 | Categories=Application | ||
8 | Exec=$(projectName) | ||
9 | Name[en_US]=$(message) | ||
diff --git a/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCGTKAutotoolsProject/src/ChangeLog b/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCGTKAutotoolsProject/src/ChangeLog new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCGTKAutotoolsProject/src/ChangeLog | |||
diff --git a/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCGTKAutotoolsProject/src/INSTALL b/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCGTKAutotoolsProject/src/INSTALL new file mode 100644 index 0000000..b8b0535 --- /dev/null +++ b/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCGTKAutotoolsProject/src/INSTALL | |||
@@ -0,0 +1,9 @@ | |||
1 | Building: | ||
2 | $ ./autogen.sh [--enable-gtk-doc] [--prefix=/usr] | ||
3 | $ make | ||
4 | |||
5 | Installing: | ||
6 | $ sudo make install | ||
7 | |||
8 | Running: | ||
9 | $ $(projectName) \ No newline at end of file | ||
diff --git a/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCGTKAutotoolsProject/src/Makefile.am.src b/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCGTKAutotoolsProject/src/Makefile.am.src new file mode 100644 index 0000000..5ac2885 --- /dev/null +++ b/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCGTKAutotoolsProject/src/Makefile.am.src | |||
@@ -0,0 +1,8 @@ | |||
1 | |||
2 | bin_PROGRAMS = $(projectName) | ||
3 | $(projectName)_SOURCES = $(projectName).c | ||
4 | |||
5 | AM_CFLAGS = @$(projectName)_CFLAGS@ | ||
6 | AM_LDFLAGS = @$(projectName)_LIBS@ | ||
7 | |||
8 | CLEANFILES = *~ | ||
diff --git a/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCGTKAutotoolsProject/src/Makefile.am.top b/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCGTKAutotoolsProject/src/Makefile.am.top new file mode 100644 index 0000000..7bee2b7 --- /dev/null +++ b/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCGTKAutotoolsProject/src/Makefile.am.top | |||
@@ -0,0 +1,7 @@ | |||
1 | SUBDIRS = $(sourceDir) | ||
2 | |||
3 | MAINTAINERCLEANFILES = aclocal.m4 compile config.guess \ | ||
4 | config.sub configure depcomp install-sh \ | ||
5 | ltmain.sh Makefile.in missing | ||
6 | |||
7 | |||
diff --git a/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCGTKAutotoolsProject/src/NEWS b/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCGTKAutotoolsProject/src/NEWS new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCGTKAutotoolsProject/src/NEWS | |||
diff --git a/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCGTKAutotoolsProject/src/README b/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCGTKAutotoolsProject/src/README new file mode 100644 index 0000000..ec15541 --- /dev/null +++ b/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCGTKAutotoolsProject/src/README | |||
@@ -0,0 +1,25 @@ | |||
1 | $(projectName) | ||
2 | Copyright (C) $(copyright). | ||
3 | |||
4 | Brief description of project.... | ||
5 | |||
6 | ----------------------------------------------------------------------------- | ||
7 | Build | ||
8 | ----------------------------------------------------------------------------- | ||
9 | $ ./autogen.sh $CONFIGURE_FLAGS | ||
10 | $ make | ||
11 | |||
12 | ----------------------------------------------------------------------------- | ||
13 | Build with documentation generated (usually for libraries) | ||
14 | ----------------------------------------------------------------------------- | ||
15 | $ ./autogen.sh --enable-gtk-doc | ||
16 | $ make | ||
17 | |||
18 | ( If built with the --enable-gtk-doc flag above you can view the index.html | ||
19 | file in your web browser. ) | ||
20 | $ firefox ./docs/reference/index.html | ||
21 | |||
22 | ----------------------------------------------------------------------------- | ||
23 | Install | ||
24 | ----------------------------------------------------------------------------- | ||
25 | $ sudo make install | ||
diff --git a/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCGTKAutotoolsProject/src/autogen.sh b/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCGTKAutotoolsProject/src/autogen.sh new file mode 100755 index 0000000..7fd81e2 --- /dev/null +++ b/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCGTKAutotoolsProject/src/autogen.sh | |||
@@ -0,0 +1,10 @@ | |||
1 | #! /bin/sh | ||
2 | [ -e config.cache ] && rm -f config.cache | ||
3 | |||
4 | libtoolize --automake | ||
5 | aclocal ${OECORE_ACLOCAL_OPTS} | ||
6 | autoconf | ||
7 | autoheader | ||
8 | automake -a | ||
9 | ./configure $@ | ||
10 | exit | ||
diff --git a/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCGTKAutotoolsProject/src/configure.ac.top b/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCGTKAutotoolsProject/src/configure.ac.top new file mode 100644 index 0000000..508bc13 --- /dev/null +++ b/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCGTKAutotoolsProject/src/configure.ac.top | |||
@@ -0,0 +1,49 @@ | |||
1 | AC_PREREQ(2.61) | ||
2 | |||
3 | # package version number (not shared library version) | ||
4 | # odd micro numbers indicate in-progress development | ||
5 | # even micro numbers indicate released versions | ||
6 | m4_define($(projectName)_version_major, 0) | ||
7 | m4_define($(projectName)_version_minor, 1) | ||
8 | m4_define($(projectName)_version_micro, 0) | ||
9 | |||
10 | m4_define([$(projectName)_version], | ||
11 | [$(projectName)_version_major.$(projectName)_version_minor.$(projectName)_version_micro]) | ||
12 | m4_define([$(projectName)_api_version], | ||
13 | [$(projectName)_version_major.$(projectName)_version_minor]) | ||
14 | |||
15 | AC_INIT($(projectName), $(projectName)_version) | ||
16 | AM_INIT_AUTOMAKE($(projectName), $(projectName)_version) | ||
17 | AC_CONFIG_HEADERS(config.h) | ||
18 | |||
19 | # Checks for programs. | ||
20 | AC_PROG_LIBTOOL | ||
21 | AM_PROG_CC_C_O | ||
22 | AC_PROG_INSTALL | ||
23 | |||
24 | #enable pkg-config | ||
25 | PKG_PROG_PKG_CONFIG | ||
26 | |||
27 | #GTK_REQUIRED_VERSION=2.0.0 | ||
28 | #GLIB_REQUIRED_VERSION=$GTK_REQUIRED_VERSION | ||
29 | |||
30 | #AM_PATH_GLIB_2_0($GLIB_REQUIRED_VERSION,, | ||
31 | # [AC_MSG_ERROR(Test for GLib failed.)], gobject) | ||
32 | #AM_PATH_GTK_2_0($GTK_REQUIRED_VERSION,, | ||
33 | # [AC_MSG_ERROR(Test for GTK failed.)]) | ||
34 | PKG_CHECK_MODULES($(projectName), glib-2.0 gtk+-2.0) | ||
35 | |||
36 | AC_SUBST($(projectName)_CFLAGS) | ||
37 | AC_SUBST($(projectName)_LIBS) | ||
38 | |||
39 | AC_OUTPUT([ | ||
40 | Makefile | ||
41 | $(sourceDir)/Makefile | ||
42 | ]) | ||
43 | |||
44 | echo "" | ||
45 | echo " $(projectName) $VERSION" | ||
46 | echo " =====================" | ||
47 | echo "" | ||
48 | echo " To build the project, run \"make\"" | ||
49 | echo "" | ||
diff --git a/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCGTKAutotoolsProject/src/configure.ac.top.old b/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCGTKAutotoolsProject/src/configure.ac.top.old new file mode 100644 index 0000000..234ab99 --- /dev/null +++ b/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCGTKAutotoolsProject/src/configure.ac.top.old | |||
@@ -0,0 +1,37 @@ | |||
1 | AC_PREREQ(2.61) | ||
2 | |||
3 | # package version number (not shared library version) | ||
4 | # odd micro numbers indicate in-progress development | ||
5 | # even micro numbers indicate released versions | ||
6 | m4_define($(projectName)_version_major, 0) | ||
7 | m4_define($(projectName)_version_minor, 1) | ||
8 | m4_define($(projectName)_version_micro, 0) | ||
9 | |||
10 | m4_define([$(projectName)_version], | ||
11 | [$(projectName)_version_major.$(projectName)_version_minor.$(projectName)_version_micro]) | ||
12 | m4_define([$(projectName)_api_version], | ||
13 | [$(projectName)_version_major.$(projectName)_version_minor]) | ||
14 | |||
15 | AC_INIT($(projectName), $(projectName)_version) | ||
16 | AM_INIT_AUTOMAKE($(projectName), $(projectName)_version) | ||
17 | AC_CONFIG_HEADERS(config.h) | ||
18 | |||
19 | # Checks for programs. | ||
20 | AC_PROG_LIBTOOL | ||
21 | AM_PROG_CC_C_O | ||
22 | AC_PROG_INSTALL | ||
23 | |||
24 | AC_SUBST($(projectName)_CFLAGS) | ||
25 | AC_SUBST($(projectName)_LIBS) | ||
26 | |||
27 | AC_OUTPUT([ | ||
28 | Makefile | ||
29 | $(sourceDir)/Makefile | ||
30 | ]) | ||
31 | |||
32 | echo "" | ||
33 | echo " $(projectName) $VERSION" | ||
34 | echo " =====================" | ||
35 | echo "" | ||
36 | echo " To build the project, run \"make\"" | ||
37 | echo "" | ||