[Esbox-commits] r32 -
trunk/org.indt.esbox.ui/templates/HelloWorldMake
raul at garage.maemo.org
raul at garage.maemo.org
Mon Oct 1 16:10:10 EEST 2007
Author: raul
Date: 2007-10-01 16:10:09 +0300 (Mon, 01 Oct 2007)
New Revision: 32
Added:
trunk/org.indt.esbox.ui/templates/HelloWorldMake/Makefile
trunk/org.indt.esbox.ui/templates/HelloWorldMake/main.c
trunk/org.indt.esbox.ui/templates/HelloWorldMake/template.properties
trunk/org.indt.esbox.ui/templates/HelloWorldMake/template.xml
Log:
templates updated.
Added: trunk/org.indt.esbox.ui/templates/HelloWorldMake/Makefile
===================================================================
--- trunk/org.indt.esbox.ui/templates/HelloWorldMake/Makefile 2007-10-01 13:06:38 UTC (rev 31)
+++ trunk/org.indt.esbox.ui/templates/HelloWorldMake/Makefile 2007-10-01 13:10:09 UTC (rev 32)
@@ -0,0 +1,15 @@
+CFLAGS = `pkg-config --cflags gtk+-2.0 hildon-libs libosso` -ansi -Wall
+
+OBJS = {{baseName}}.o
+
+LIBS = `pkg-config --libs gtk+-2.0 hildon-libs libosso`
+
+TARGET = {{baseName}}{{exe}}
+
+$(TARGET): $(OBJS)
+ $(CC) -o $(TARGET) $(OBJS) $(LIBS)
+
+all: $(TARGET)
+
+clean:
+ rm -f $(OBJS) $(TARGET)
Added: trunk/org.indt.esbox.ui/templates/HelloWorldMake/main.c
===================================================================
--- trunk/org.indt.esbox.ui/templates/HelloWorldMake/main.c 2007-10-01 13:06:38 UTC (rev 31)
+++ trunk/org.indt.esbox.ui/templates/HelloWorldMake/main.c 2007-10-01 13:10:09 UTC (rev 32)
@@ -0,0 +1,38 @@
+/*
+ ============================================================================
+ Name : main.c
+ Author : $(author)
+ Version :
+ Copyright : $(copyright)
+ Description : Hello World Hildon
+ ============================================================================
+ */
+
+#include <hildon-widgets/hildon-program.h>
+#include <gtk/gtk.h>
+
+int main(int argc, char *argv[]) {
+
+ HildonProgram *program;
+ HildonWindow *window;
+
+ gtk_init(&argc, &argv);
+
+ program = HILDON_PROGRAM(hildon_program_get_instance());
+ g_set_application_name("Hello World");
+
+ window = HILDON_WINDOW(hildon_window_new());
+ hildon_program_add_window(program, window);
+
+ gtk_container_add(GTK_CONTAINER(window),
+ GTK_WIDGET(gtk_label_new("$(message)")));
+
+ gtk_widget_show_all(GTK_WIDGET(window));
+
+ g_signal_connect(G_OBJECT(window), "delete_event",
+ G_CALLBACK(gtk_main_quit), NULL);
+
+ gtk_main();
+
+ return 0;
+}
\ No newline at end of file
Added: trunk/org.indt.esbox.ui/templates/HelloWorldMake/template.properties
===================================================================
--- trunk/org.indt.esbox.ui/templates/HelloWorldMake/template.properties 2007-10-01 13:06:38 UTC (rev 31)
+++ trunk/org.indt.esbox.ui/templates/HelloWorldMake/template.properties 2007-10-01 13:10:09 UTC (rev 32)
@@ -0,0 +1,13 @@
+#Template Default Values
+HildonHelloWorldMake.Ctemplate.label=Maemo Hello World Project
+HildonHelloWorldMake.Ctemplate.description=A Maemo Hello World Project
+HildonHelloWorldMake.basics.label=Basic Settings
+HildonHelloWorldMake.basics.description=Basic properties of a project
+HildonHelloWorldMake.author.label=Author
+HildonHelloWorldMake.author.description=Name of the author
+HildonHelloWorldMake.copyright.label=Copyright notice
+HildonHelloWorldMake.copyright.description=Your copyright notice
+HildonHelloWorldMake.copyright.default=Your copyright notice
+HildonHelloWorldMake.message.default=Hello World!!!
+HildonHelloWorldMake.message.description=Your hello world greeting message
+HildonHelloWorldMake.message.label=Hello world greeting
\ No newline at end of file
Added: trunk/org.indt.esbox.ui/templates/HelloWorldMake/template.xml
===================================================================
--- trunk/org.indt.esbox.ui/templates/HelloWorldMake/template.xml 2007-10-01 13:06:38 UTC (rev 31)
+++ trunk/org.indt.esbox.ui/templates/HelloWorldMake/template.xml 2007-10-01 13:10:09 UTC (rev 32)
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<template type="ProjTempl" version="1.0" supplier="Eclipse.org" revision="1.0" author="Intel Corporation"
+ copyright="Copyright (c) 2007 Intel Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html"
+ id="HelloWorldMakeCProject" label="%HildonHelloWorldMake.Ctemplate.label" description="%HildonHelloWorldMake.Ctemplate.description"
+ help="help.html">
+ <property-group id="basics" label="%HildonHelloWorldMake.basics.label" description="%HildonHelloWorldMake.basics.description" type="PAGES-ONLY" help="help.html">
+ <property id="author"
+ label="%HildonHelloWorldMake.author.label"
+ description="%HildonHelloWorldMake.author.description"
+ type="input"
+ pattern=".*"
+ default=""
+ hidden="false"
+ persist="true"/>
+ <property id="copyright"
+ label="%HildonHelloWorldMake.copyright.label"
+ description="%HildonHelloWorldMake.copyright.description"
+ type="input"
+ pattern=".*"
+ default="%HildonHelloWorldMake.copyright.default"
+ hidden="false"
+ persist="true"/>
+ <property id="message"
+ label="%HildonHelloWorldMake.message.label"
+ description="%HildonHelloWorldMake.message.description"
+ type="input"
+ pattern=".*"
+ default="%HildonHelloWorldMake.message.default"
+ hidden="false"
+ persist="true"/>
+ </property-group>
+
+ <process type="org.eclipse.cdt.core.AddFiles">
+ <simple name="projectName" value="$(projectName)"/>
+ <complex-array name="files">
+ <element>
+ <simple name="source" value="main.c"/>
+ <simple name="target" value="main.c"/>
+ <simple name="replaceable" value="true"/>
+ </element>
+ </complex-array>
+ </process>
+
+ <process type="org.eclipse.cdt.managedbuilder.gnu.ui.SimpleGNUMakefileGenerator">
+ <simple name="projectName" value="$(projectName)"/>
+ </process>
+
+ <process type="org.indt.esbox.core.IncludePaths">
+ <simple name="projectName" value="$(projectName)"/>
+ <simple-array name="paths">
+ <element value="$(sboxRoot)/targets/$(targetName)/usr/local/include"/>
+ <element value="$(sboxRoot)/targets/$(targetName)/usr/include"/>
+ <element value="$(sboxRoot)/targets/$(targetName)/usr/lib/gcc/i486-linux-gnu/4.1.2"/>
+ </simple-array>
+ </process>
+
+</template>
+
More information about the Esbox-commits
mailing list