summaryrefslogtreecommitdiffstats
path: root/languages/cpp/app_templates/cppcurseshello
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit114a878c64ce6f8223cfd22d76a20eb16d177e5e (patch)
treeacaf47eb0fa12142d3896416a69e74cbf5a72242 /languages/cpp/app_templates/cppcurseshello
downloadtdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.tar.gz
tdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'languages/cpp/app_templates/cppcurseshello')
-rw-r--r--languages/cpp/app_templates/cppcurseshello/.kdev_ignore0
-rw-r--r--languages/cpp/app_templates/cppcurseshello/Makefile.am17
-rw-r--r--languages/cpp/app_templates/cppcurseshello/app-configure.in21
-rw-r--r--languages/cpp/app_templates/cppcurseshello/app.kdevelop105
-rw-r--r--languages/cpp/app_templates/cppcurseshello/cpp-Makefile.am5
-rw-r--r--languages/cpp/app_templates/cppcurseshello/cpp-Makefile.cvs7
-rw-r--r--languages/cpp/app_templates/cppcurseshello/cppcurseshello10
-rw-r--r--languages/cpp/app_templates/cppcurseshello/cppcurseshello.kdevtemplate143
-rw-r--r--languages/cpp/app_templates/cppcurseshello/cppcurseshello.pngbin0 -> 483 bytes
-rw-r--r--languages/cpp/app_templates/cppcurseshello/main.cpp49
-rw-r--r--languages/cpp/app_templates/cppcurseshello/src-Makefile.am8
11 files changed, 365 insertions, 0 deletions
diff --git a/languages/cpp/app_templates/cppcurseshello/.kdev_ignore b/languages/cpp/app_templates/cppcurseshello/.kdev_ignore
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/languages/cpp/app_templates/cppcurseshello/.kdev_ignore
diff --git a/languages/cpp/app_templates/cppcurseshello/Makefile.am b/languages/cpp/app_templates/cppcurseshello/Makefile.am
new file mode 100644
index 00000000..3f6f64af
--- /dev/null
+++ b/languages/cpp/app_templates/cppcurseshello/Makefile.am
@@ -0,0 +1,17 @@
+dataFiles = main.cpp src-Makefile.am cpp-Makefile.am cpp-Makefile.cvs\
+ app-configure.in app.kdevelop
+templateName = cppcurseshello
+
+### no need to change below:
+template_DATA = $(templateName).kdevtemplate
+templatedir = ${appwizarddatadir}/templates
+
+appwizarddatadir = ${kde_datadir}/kdevappwizard
+$(templateName).tar.gz: ${dataFiles}
+ $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles}
+ $(GZIP_COMMAND) -f9 $(templateName).tar
+
+archivedir = ${appwizarddatadir}
+archive_DATA = $(templateName).tar.gz ${templateName}.png
+
+CLEANFILES = *.tar.gz \ No newline at end of file
diff --git a/languages/cpp/app_templates/cppcurseshello/app-configure.in b/languages/cpp/app_templates/cppcurseshello/app-configure.in
new file mode 100644
index 00000000..b7c83189
--- /dev/null
+++ b/languages/cpp/app_templates/cppcurseshello/app-configure.in
@@ -0,0 +1,21 @@
+AC_INIT()
+AM_INIT_AUTOMAKE(%{APPNAMELC},%{VERSION})
+
+AC_PROG_CC
+AC_PROG_CXX
+AC_PROG_INSTALL
+AC_PROG_MAKE_SET
+
+
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+
+AC_CHECK_HEADER([ncurses.h], [],
+ AC_MSG_ERROR([Couldn't find ncurses headers.]))
+
+AC_CHECK_LIB(ncurses, refresh, , AC_ERROR([Couldn't find ncurses library]), -lncurses, -ldl)
+
+AC_LANG_RESTORE
+
+
+AC_OUTPUT(Makefile src/Makefile)
diff --git a/languages/cpp/app_templates/cppcurseshello/app.kdevelop b/languages/cpp/app_templates/cppcurseshello/app.kdevelop
new file mode 100644
index 00000000..c7498e39
--- /dev/null
+++ b/languages/cpp/app_templates/cppcurseshello/app.kdevelop
@@ -0,0 +1,105 @@
+<?xml version="1.0"?>
+<kdevelop>
+ <general>
+ <author>%{AUTHOR}</author>
+ <email>%{EMAIL}</email>
+ <version>%{VERSION}</version>
+ <projectmanagement>KDevAutoProject</projectmanagement>
+ <primarylanguage>C++</primarylanguage>
+ <keywords>
+ <keyword>C++</keyword>
+ <keyword>Code</keyword>
+ </keywords>
+ </general>
+ <kdevautoproject>
+ <general>
+ <activetarget>src/%{APPNAMELC}</activetarget>
+ <useconfiguration>debug</useconfiguration>
+ </general>
+ <run>
+ <mainprogram>src/%{APPNAMELC}</mainprogram>
+ <terminal>true</terminal>
+ </run>
+ <configurations>
+ <optimized>
+ <builddir>optimized</builddir>
+ <ccompiler>kdevgccoptions</ccompiler>
+ <cxxcompiler>kdevgppoptions</cxxcompiler>
+ <f77compiler>kdevg77options</f77compiler>
+ <cxxflags>-O2 -g0</cxxflags>
+ </optimized>
+ <debug>
+ <configargs>--enable-debug=full</configargs>
+ <builddir>debug</builddir>
+ <ccompiler>kdevgccoptions</ccompiler>
+ <cxxcompiler>kdevgppoptions</cxxcompiler>
+ <f77compiler>kdevg77options</f77compiler>
+ <cxxflags>-O0 -g3</cxxflags>
+ </debug>
+ </configurations>
+ </kdevautoproject>
+ <kdevdoctreeview>
+ <ignoretocs>
+ <toc>ada</toc>
+ <toc>ada_bugs_gcc</toc>
+ <toc>bash</toc>
+ <toc>bash_bugs</toc>
+ <toc>clanlib</toc>
+ <toc>w3c-dom-level2-html</toc>
+ <toc>fortran_bugs_gcc</toc>
+ <toc>gnome1</toc>
+ <toc>gnustep</toc>
+ <toc>gtk</toc>
+ <toc>gtk_bugs</toc>
+ <toc>haskell</toc>
+ <toc>haskell_bugs_ghc</toc>
+ <toc>java_bugs_gcc</toc>
+ <toc>java_bugs_sun</toc>
+ <toc>kde2book</toc>
+ <toc>opengl</toc>
+ <toc>pascal_bugs_fp</toc>
+ <toc>php</toc>
+ <toc>php_bugs</toc>
+ <toc>perl</toc>
+ <toc>perl_bugs</toc>
+ <toc>python</toc>
+ <toc>python_bugs</toc>
+ <toc>qt-kdev3</toc>
+ <toc>ruby</toc>
+ <toc>ruby_bugs</toc>
+ <toc>sdl</toc>
+ <toc>w3c-svg</toc>
+ <toc>sw</toc>
+ <toc>w3c-uaag10</toc>
+ <toc>wxwidgets_bugs</toc>
+ </ignoretocs>
+ <ignoreqt_xml>
+ <toc>Guide to the Qt Translation Tools</toc>
+ <toc>Qt Assistant Manual</toc>
+ <toc>Qt Designer Manual</toc>
+ <toc>Qt Reference Documentation</toc>
+ <toc>qmake User Guide</toc>
+ </ignoreqt_xml>
+ <ignoredoxygen>
+ <toc>KDE Libraries (Doxygen)</toc>
+ </ignoredoxygen>
+ </kdevdoctreeview>
+ <kdevfilecreate>
+ <useglobaltypes>
+ <type ext="cpp"/>
+ <type ext="h"/>
+ </useglobaltypes>
+ </kdevfilecreate>
+ <kdevfileview>
+ <groups>
+ <group pattern="*.h" name="Header files" />
+ <group pattern="*.cpp" name="Source files" />
+ </groups>
+ </kdevfileview>
+ <kdevdocumentation>
+ <projectdoc>
+ <docsystem>Doxygen Documentation Collection</docsystem>
+ <docurl>%{APPNAMELC}.tag</docurl>
+ </projectdoc>
+ </kdevdocumentation>
+</kdevelop>
diff --git a/languages/cpp/app_templates/cppcurseshello/cpp-Makefile.am b/languages/cpp/app_templates/cppcurseshello/cpp-Makefile.am
new file mode 100644
index 00000000..02520f20
--- /dev/null
+++ b/languages/cpp/app_templates/cppcurseshello/cpp-Makefile.am
@@ -0,0 +1,5 @@
+# not a GNU package. You can remove this line, if
+# have all needed files, that a GNU package needs
+AUTOMAKE_OPTIONS = foreign 1.4
+
+SUBDIRS = src
diff --git a/languages/cpp/app_templates/cppcurseshello/cpp-Makefile.cvs b/languages/cpp/app_templates/cppcurseshello/cpp-Makefile.cvs
new file mode 100644
index 00000000..935cee02
--- /dev/null
+++ b/languages/cpp/app_templates/cppcurseshello/cpp-Makefile.cvs
@@ -0,0 +1,7 @@
+default: all
+
+all:
+ aclocal
+ automake
+ autoconf
+
diff --git a/languages/cpp/app_templates/cppcurseshello/cppcurseshello b/languages/cpp/app_templates/cppcurseshello/cppcurseshello
new file mode 100644
index 00000000..40fa8bce
--- /dev/null
+++ b/languages/cpp/app_templates/cppcurseshello/cppcurseshello
@@ -0,0 +1,10 @@
+# KDE Config File
+[General]
+Name=Simple ncurses Hello world program
+Name[de]=Einfaches ncurses Hallo-Welt Programm
+Icon=
+Category=C++
+Comment=Generates a simple ncurses based Hello world program in C++
+Comment[de]=Erstellt ein einfaches Hallo Welt programm fr C++ basierend auf der ncurses Bibliothek
+FileTemplates=h,CStyle,cpp,CStyle
+ShowFilesAfterGeneration=src/APPNAMELC.cpp
diff --git a/languages/cpp/app_templates/cppcurseshello/cppcurseshello.kdevtemplate b/languages/cpp/app_templates/cppcurseshello/cppcurseshello.kdevtemplate
new file mode 100644
index 00000000..451999a3
--- /dev/null
+++ b/languages/cpp/app_templates/cppcurseshello/cppcurseshello.kdevtemplate
@@ -0,0 +1,143 @@
+# KDE Config File
+[General]
+Name=Simple ncurses Hello world program
+Name[ca]=Simple programa de Hello world per a ncurses
+Name[da]=Simpelt ncurses Goddag verden program
+Name[de]=Einfaches auf NCurses basierendes "Hello World"-Programm
+Name[el]=Απλό ncurses πρόγραμμα Γεια σου κόσμε
+Name[es]=Programa «Hola mundo» sencillo en ncurses
+Name[et]=Lihtne "Tere, maailm" programm ncurses'i põhjal
+Name[eu]=ncurses-en oinarritako "Kaixo mundua" programa sinple bat
+Name[fa]=برنامۀ سادۀ ncurses Hello world
+Name[fr]=Programme « Bonjour monde » simple en ncurses
+Name[ga]=Ríomhchlár simplí "Hello World" le ncurses
+Name[gl]=Programa sinxelo ncurses Ola mundo
+Name[hu]=Egyszerű, Ncurses-alapú Hello world program
+Name[it]=Semplice programma "Hello world" realizzato con ncurses
+Name[ja]=ncurses を使った簡単な Hello World プログラム
+Name[nds]=Eenfach ncurses-"Moin Welt"-Programm
+Name[ne]=साधारण ncurses हेल्लो वोल्ड कार्यक्रम
+Name[nl]=Een eenvoudig ncurses Hello World-programma
+Name[pl]=Prosty program 'Witaj świecie' używający ncurses
+Name[pt]=Programa simples Olá Mundo em ncurses
+Name[pt_BR]=Programa simples Olá Mundo em ncurses
+Name[ru]=Простое приложение Hello world на ncurses
+Name[sk]=Jednoduchý "Ahoj svet" ncurses program
+Name[sl]=Preprost program Hello world na osnovi ncurses
+Name[sr]=Једноставан „Здраво свете“ програм за ncurses
+Name[sr@Latn]=Jednostavan „Zdravo svete“ program za ncurses
+Name[sv]=Enkelt ncurses Hello world-program
+Name[tr]=Basit ncurses Merhaba Dünya programı
+Name[zh_CN]=简单的 ncurses Hello world 程序
+Name[zh_TW]=簡單的 ncurses Hello world 程式
+Icon=
+Category=C++
+Comment=Generates a simple ncurses based Hello world program in C++
+Comment[ca]=Genera un simple programa de Hello world en C++ i basat en ncurses
+Comment[da]=Genererer et simpelt ncurses baseret Goddag verden program in C++
+Comment[de]=Erstellt ein einfaches, auf NCurses basierendes "Hello World"-Programm in C++
+Comment[el]=Δημιουργεί ένα απλό βασισμένο σε ncurses πρόγραμμα Γεια σου κόσμε σε C++
+Comment[es]=Genera un sencillo programa «Hola mundo» en C++ basado en ncurses
+Comment[et]=Lihtsa "Tere, maailm" programmi loomine ncurses'i põhjal C++-s
+Comment[eu]=ncurses-en oinarritako "Kaixo mundua" programa sinple bat C++ lengoaian
+Comment[fa]=یک برنامۀ سادۀ Hello world در C++ بر مبنای ncurses تولید می‌کند
+Comment[fr]=Génère un programme « Bonjour monde » simple basé sur ncurses en C++
+Comment[ga]=Cruthaíonn sé seo ríomhchlár simplí "Hello World" bunaithe ar ncurses, i C++
+Comment[gl]=Xera un programa sinxelo Ola mundo baseado en ncurses en C++
+Comment[hu]=Létrehoz egy egyszerű, Ncurses-alapú Hello world programot C++-ban
+Comment[it]=Genera un semplice programma di "Hello world" in C++ realizzato con ncurses
+Comment[ja]=ncurses を使った簡単な Hello World プログラムを C++ で作成します
+Comment[nds]=Stellt en eenfach op "ncurses" opbuut "Moin Welt"-Programm in C++ op
+Comment[ne]=C++ मा हेल्लो वोल्ड कार्यक्रम आधारित साधारण ncurses उत्पन्न गर्दछ
+Comment[nl]=Genereert een eenvoudig ncurses-gebaseerd Hello World-programma in C++
+Comment[pl]=Generuje prosty program 'Witaj świecie' używający ncurses i języka C++.
+Comment[pt]=Gera um programa simples Olá Mundo em C++, baseado no 'ncurses'
+Comment[pt_BR]=Gera um programa simples Olá Mundo em C++, baseado no 'ncurses'
+Comment[ru]=Создание простого приложения Hello world на ncurses и C++
+Comment[sk]=Vygeneruje jednoduchý "Ahoj svet" ncurses program v C++
+Comment[sl]=Ustvari preprost program Hello world na osnovi ncurses v C++
+Comment[sr]=Прави једноставан „Здраво свете“ програм на основу ncurses, у C++-у
+Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ program na osnovu ncurses, u C++-u
+Comment[sv]=Skapar ett enkelt ncurses-baserat Hello world-program i C++
+Comment[tr]=C++'da ncurses tabanlı basit bir Merhaba Dünya programı yaratır.
+Comment[zh_CN]=生成一个基于 ncurses 的 C++ Hello world 程序
+Comment[zh_TW]=產生一個簡單的用 C++ 語言與 ncurses 函式庫的 Hello world 程式
+FileTemplates=h,CStyle,cpp,CStyle
+ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp
+Archive=cppcurseshello.tar.gz
+
+[INCADMIN]
+Type=include
+File=%{kdevelop}/template-common/incadmin.kdevtemplate
+
+[GNU]
+Type=include
+File=%{kdevelop}/template-common/gnu.kdevtemplate
+
+[FILE1]
+Type=install
+EscapeXML=true
+Source=%{src}/app.kdevelop
+Dest=%{dest}/%{APPNAMELC}.kdevelop
+
+[FILE2]
+Type=install
+Source=%{src}/cpp-Makefile.am
+Dest=%{dest}/Makefile.am
+
+[FILE3]
+Type=install
+Source=%{src}/cpp-Makefile.cvs
+Dest=%{dest}/Makefile.cvs
+
+[FILE4]
+Type=install
+Source=%{src}/app-configure.in
+Dest=%{dest}/configure.in
+
+[MkDir1]
+Type=mkdir
+Dir=%{dest}/src
+
+[FILE5]
+Type=install
+Source=%{src}/src-Makefile.am
+Dest=%{dest}/src/Makefile.am
+
+[FILE6]
+Type=install
+Source=%{src}/main.cpp
+Dest=%{dest}/src/%{APPNAMELC}.cpp
+
+[MSG]
+Type=message
+Comment=A simple hello world program using ncurses was created in %{dest}
+Comment[ca]=Un simple programa de hello world usant ncurses ha estat creat en %{dest}
+Comment[da]=Et simpelt Goddag verden program ved brug af ncurses blev oprettet i %{dest}
+Comment[de]=Ein einfaches "Hello World"-Programm unter Verwendung von NCurses wurde in %{dest} erstellt.
+Comment[el]=Ένα απλό πρόγραμμα Γεια σου Κόσμε χρησιμοποιώντας το ncurses δημιουργήθηκε στο %{dest}
+Comment[es]=Un sencillo programa «Hola mundo» que usa ncurses ha sido creado en %{dest}
+Comment[et]=Lihtne "Tere, maailm" programm ncurses'i põhjas loodi asukohta %{dest}
+Comment[eu]=ncurses-en oinarritako "Kaixo mundua" programa sinple bat sortu da hemen: %{dest}
+Comment[fa]=یک برنامۀ سادۀ hello world با استفاده از ncurses در %{dest} ایجاد شد
+Comment[fr]=Un programme « Bonjour monde » simple utilisant ncurses a été créé dans %{dest}
+Comment[ga]=Cruthaíodh ríomhchlár simplí "Hello World" le ncurses i %{dest}
+Comment[gl]=Creouse un programa sinxelo ola mundo usando ncurses en in %{dest}
+Comment[hu]=Létrejött egy egyszerű, Ncurses-alapú Hello world program itt: %{dest}
+Comment[it]=È stato creato un programma di "hello world" che usa ncurses in %{dest}
+Comment[ja]=ncurses を使った簡単な Hello World プログラムを %{dest} に作成しました
+Comment[nds]=In %{dest} wöör en eenfach "Moin Welt"-Programm opstellt, dat "ncurses" bruukt
+Comment[ne]=ncurses प्रयोग गरेर एउटा हेल्लो वोल्ड कार्यक्रम %{dest} मा सिर्जना गरियो
+Comment[nl]=Een eenvoudig Hallo Wereld-programma gebruikmakend van ncurses is aangemaakt in %{dest}
+Comment[pl]=Prosty program 'Witaj świecie' używający ncurses został utworzony w %{dest}
+Comment[pt]=Foi criado um programa simples Olá Mundo que usa o ncurses em %{dest}
+Comment[pt_BR]=Foi criado um programa simples Olá Mundo que usa o ncurses em %{dest}
+Comment[ru]=Простое приложение Hello world на ncurses создано в %{dest}
+Comment[sk]=Jednoduchý "Ahoj svet" ncurses program bol vytvorený v %{dest}
+Comment[sl]=Preprost program Hello world na osnovi ncurses je bil ustvarjen v %{dest}
+Comment[sr]=Једноставан „Здраво свете“ на основу ncurses направљен је у %{dest}
+Comment[sr@Latn]=Jednostavan „Zdravo svete“ na osnovu ncurses napravljen je u %{dest}
+Comment[sv]=Ett enkelt Hello world-program som använder ncurses skapades i %{dest}
+Comment[tr]=ncurses kullanan basit bir merhaba dünya programı %{dest} içinde yaratılmıştır.
+Comment[zh_CN]=在 %{dest} 中创建了一个使用 ncurses 的 hello world 程序
+Comment[zh_TW]=一個簡單的使用 ncurses 函式庫的 hello world 程式已建立在 %{dest}
diff --git a/languages/cpp/app_templates/cppcurseshello/cppcurseshello.png b/languages/cpp/app_templates/cppcurseshello/cppcurseshello.png
new file mode 100644
index 00000000..840a953c
--- /dev/null
+++ b/languages/cpp/app_templates/cppcurseshello/cppcurseshello.png
Binary files differ
diff --git a/languages/cpp/app_templates/cppcurseshello/main.cpp b/languages/cpp/app_templates/cppcurseshello/main.cpp
new file mode 100644
index 00000000..3e23a5df
--- /dev/null
+++ b/languages/cpp/app_templates/cppcurseshello/main.cpp
@@ -0,0 +1,49 @@
+%{CPP_TEMPLATE}
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <ncurses.h>
+
+void create_box(int y, int x, int w, int h)
+{
+ mvaddch(y, x, '+');
+ mvaddch(y, x + w, '+');
+ mvaddch(y + h, x, '+');
+ mvaddch(y + h, x + w, '+');
+ mvhline(y, x + 1, '-', w - 1);
+ mvhline(y + h, x + 1, '-', w - 1);
+ mvvline(y + 1, x, '|', h - 1);
+ mvvline(y + 1, x + w, '|', h - 1);
+}
+
+int main()
+{
+ int startx, starty, height, width;
+
+ initscr();
+ start_color();
+ cbreak();
+ keypad(stdscr, TRUE);
+ noecho();
+
+ init_pair(1, COLOR_BLACK, COLOR_CYAN);
+
+ height = 2;
+ width = 30;
+ starty = (LINES - height)/2;
+ startx = (COLS - width)/2;
+
+ attron(COLOR_PAIR(1));
+
+ create_box(starty, startx, width, height);
+ mvprintw(starty, startx + 3, " Hello World! " );
+ mvprintw(starty+1,startx+1," Type any char to exit ");
+ mvprintw(0,0,"");
+ refresh();
+ getch();
+
+ endwin();
+ return 0;
+}
diff --git a/languages/cpp/app_templates/cppcurseshello/src-Makefile.am b/languages/cpp/app_templates/cppcurseshello/src-Makefile.am
new file mode 100644
index 00000000..23de27fb
--- /dev/null
+++ b/languages/cpp/app_templates/cppcurseshello/src-Makefile.am
@@ -0,0 +1,8 @@
+bin_PROGRAMS = %{APPNAMELC}
+%{APPNAMELC}_SOURCES = %{APPNAMELC}.cpp
+
+# set the include path found by configure
+INCLUDES= $(all_includes)
+
+# the library search path.
+%{APPNAMELC}_LDFLAGS = $(all_libraries)