summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBastian Wissler2009-06-11 14:34:28 +0200
committerBastian Wissler2009-06-11 14:34:28 +0200
commit307a3dd1d885eacf1d910d04505f7b9f404dac53 (patch)
treed9bc0529634aedabd5bb11f35e561b9262f54656
parentvmchooser update: (diff)
downloadvmchooser-307a3dd1d885eacf1d910d04505f7b9f404dac53.tar.gz
vmchooser-307a3dd1d885eacf1d910d04505f7b9f404dac53.tar.xz
vmchooser-307a3dd1d885eacf1d910d04505f7b9f404dac53.zip
vmchooser:
* Now supports reading from /etc/opt/openslx/vmchooser-stage3.conf for the xml filter path * new binary included * changed make system to CMake to support better platform specific handling -> in the past different boost libraries had to be changed in the makefile * Closes Feature Request #429 git-svn-id: http://svn.openslx.org/svn/openslx/openslx-src-tools/vmchooser/trunk@2947 95ad53e4-c205-0410-b2fa-d234c58c8868
-rw-r--r--README46
-rwxr-xr-xbuild/make.sh7
-rw-r--r--vmchooser/CMakeLists.txt41
-rw-r--r--vmchooser/Doxyfile394
-rw-r--r--vmchooser/Makefile39
-rw-r--r--vmchooser/SWindow.cxx48
-rw-r--r--vmchooser/SessChoo.kdevelop.filelist11
-rw-r--r--vmchooser/SessChoo.kdevelop.pcsbin132746 -> 0 bytes
-rw-r--r--vmchooser/SessChoo.kdevses34
-rw-r--r--vmchooser/main.cxx61
-rw-r--r--vmchooser/runImage.cxx2
-rw-r--r--vmchooser/vmchooser.kdevelop227
12 files changed, 316 insertions, 594 deletions
diff --git a/README b/README
index 45a2068..be2de8f 100644
--- a/README
+++ b/README
@@ -17,10 +17,15 @@ What does it do?
If chosen, it starts the proper virtualizer script or the linux session
as a background process and terminates itself.
+How can I build it?
+ This project has been converted to cmake and can be built by
+ "cmake <Path to vmchooser source> && make". With cmake, this can be built
+ in an arbitrary directory.
+
+ UPDATE: You can build it by changing into the directory "build", calling "./make.sh"
+
How can I install it?
- Type "make install" in the vmchooser Folder and it gets installed
- in the right folder (if you have the whole svn structure locally).
- Then you have to install the "vmchooser"-plugin to your VendorOS.
+ See below
What command-line parameters are available?
"-p|--path=" In this (abolute) path are your xml-files for the virtualizer-plugin
@@ -35,18 +40,31 @@ You just need to compile this, if you have local changes.
The most recent svn version is also included in binary format
in the main folder of this openslx-distribution.
-Enter "make" to compile everything.
-Enter "make install" to install it to the proper path
-of the svn distribution of openslx. Do not forget to
-enter "make install" in openslx/trunk .
+Enter "cmake <path to vmchooser source> && make" to compile everything.
+
+UPDATE: There is a script in the build-directory to simplify building.
+
+Enter "cp vmchooser ../../../../openslx/trunk/os-plugins/plugins/vmchooser/files/"
+to install it to the proper path of the svn distribution of openslx
+(only if the build-path is [SVN ROOT]/openslx-src-tools/vmchooser/trunk/somefolder/).
+
+Do not forget to enter "make install" in [SVN ROOT]/openslx/trunk .
Needed libraries to compile:
- All sorts of X libs and development files
- - fltk-2 (see note *)
- - libxml2 (libxml2-dev on Ubuntu)
- - libboost-regex_s (static -
- a dynamic version can be enabled by changing the Makefile)
- (libboost-dev/libboost-regex-dev on Ubuntu)
+ - fltk-2 (included - see note *)
+ - libxml2 (included - libxml2-dev on Ubuntu)
+
+ * Boost Libraries (static - dynamic versions can
+ be enabled by changing the CMakelists.txt -
+ specifically commenting out the
+ Boost_USE_STATIC_LIBS variable definition)
+ (libboost-dev/libboost-[regex|filesystem|system]-dev on Ubuntu)
+ - libboost-regex_s
+ - libboost_filesystem_s
+ - libboost_system_s
+
+Most probably (for fltk2-includes):
- libpng-dev (libpng12-dev on Ubuntu)
- libjpeg-dev (libjpeg-dev on Ubuntu)
- libxi-dev (libxi-dev on Ubuntu)
@@ -60,8 +78,8 @@ Needed libraries to run:
- libxml2
===================================
-* Some static libraries of fltk-2 - svn version - are located
-in fltk-2/ and could be used to link against this program.
+* Some static libraries of fltk - svn version - and libxml2 are located
+in fltk/ and libxml2/ and are used to link against this program.
- as images are enabled, you should have libjpeg and libpng too.
===================================
diff --git a/build/make.sh b/build/make.sh
new file mode 100755
index 0000000..9888f1e
--- /dev/null
+++ b/build/make.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+# call cmake with right folder
+cmake ../vmchooser/
+
+# call GNU make
+make
diff --git a/vmchooser/CMakeLists.txt b/vmchooser/CMakeLists.txt
new file mode 100644
index 0000000..6082824
--- /dev/null
+++ b/vmchooser/CMakeLists.txt
@@ -0,0 +1,41 @@
+
+cmake_minimum_required(VERSION 2.6)
+project(vmchooser)
+
+set(CMAKE_BUILD_TYPE Debug)
+
+#set(CMAKE_VERBOSE_MAKEFILE ON)
+set(OPENSLX_ROOT "../../../..")
+#set(OPENSLX_ROOT "~/hiwi/openslx")
+
+file(GLOB VMCHOOSER_SOURCES *.cxx)
+
+set(Boost_USE_STATIC_LIBS ON)
+find_package( Boost COMPONENTS "filesystem" "regex" "system" )
+
+if(Boost_FOUND)
+ link_directories(${Boost_LIBRARY_DIRS})
+ include_directories(${Boost_INCLUDE_DIRS})
+endif()
+
+
+include_directories(. ../fltk/ ../libxml2/include)
+
+add_executable(vmchooser ${VMCHOOSER_SOURCES})
+
+
+add_library(fltk2 STATIC IMPORTED)
+add_library(fltk2_images STATIC IMPORTED)
+add_library(xml2 STATIC IMPORTED)
+
+set_property(TARGET fltk2 PROPERTY IMPORTED_LOCATION "../fltk/lib/libfltk2.a")
+set_property(TARGET fltk2_images PROPERTY IMPORTED_LOCATION "../fltk/lib/libfltk2_images.a")
+set_property(TARGET xml2 PROPERTY IMPORTED_LOCATION "../libxml2/libs/libxml2.a")
+
+
+#message(STATUS "Boost_LIBRARIES=${Boost_LIBRARIES}")
+target_link_libraries(vmchooser fltk2 fltk2_images xml2
+ Xi Xinerama X11 Xft ${Boost_LIBRARIES})
+
+install(TARGETS vmchooser RUNTIME DESTINATION
+ "${OPENSLX_ROOT}/openslx/trunk/os-plugins/plugins/vmchooser/files/") \ No newline at end of file
diff --git a/vmchooser/Doxyfile b/vmchooser/Doxyfile
index 3c5258c..8f0ee49 100644
--- a/vmchooser/Doxyfile
+++ b/vmchooser/Doxyfile
@@ -3,281 +3,223 @@
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
-PROJECT_NAME = SessChoo
-PROJECT_NUMBER = 1
-OUTPUT_DIRECTORY =
-CREATE_SUBDIRS = NO
-OUTPUT_LANGUAGE = English
-USE_WINDOWS_ENCODING = NO
-BRIEF_MEMBER_DESC = YES
-REPEAT_BRIEF = YES
-ABBREVIATE_BRIEF = "The $name class" \
- "The $name widget" \
- "The $name file" \
- is \
- provides \
- specifies \
- contains \
- represents \
- a \
- an \
- the
-ALWAYS_DETAILED_SEC = NO
-INLINE_INHERITED_MEMB = NO
-FULL_PATH_NAMES = YES
-STRIP_FROM_PATH = /home/bastian/studium/hiwi/fltk-2/SessChoo/
-STRIP_FROM_INC_PATH =
-SHORT_NAMES = NO
-JAVADOC_AUTOBRIEF = NO
+PROJECT_NAME = vmchooser
+PROJECT_NUMBER = 0.0.0.1
+OUTPUT_DIRECTORY =
+CREATE_SUBDIRS = NO
+OUTPUT_LANGUAGE = English
+USE_WINDOWS_ENCODING = NO
+BRIEF_MEMBER_DESC = YES
+REPEAT_BRIEF = YES
+ABBREVIATE_BRIEF = "The $name class" "The $name widget" "The $name file" is provides specifies contains represents a an the
+ALWAYS_DETAILED_SEC = NO
+INLINE_INHERITED_MEMB = NO
+FULL_PATH_NAMES = YES
+STRIP_FROM_PATH = /home/bastian/studium/hiwi/fltk-2/SessChoo/
+STRIP_FROM_INC_PATH =
+SHORT_NAMES = NO
+JAVADOC_AUTOBRIEF = NO
MULTILINE_CPP_IS_BRIEF = NO
-DETAILS_AT_TOP = NO
-INHERIT_DOCS = YES
-SEPARATE_MEMBER_PAGES = NO
-TAB_SIZE = 8
-ALIASES =
-OPTIMIZE_OUTPUT_FOR_C = NO
-OPTIMIZE_OUTPUT_JAVA = NO
-BUILTIN_STL_SUPPORT = NO
-DISTRIBUTE_GROUP_DOC = NO
-SUBGROUPING = YES
+DETAILS_AT_TOP = NO
+INHERIT_DOCS = YES
+SEPARATE_MEMBER_PAGES = NO
+TAB_SIZE = 8
+ALIASES =
+OPTIMIZE_OUTPUT_FOR_C = NO
+OPTIMIZE_OUTPUT_JAVA = NO
+BUILTIN_STL_SUPPORT = NO
+DISTRIBUTE_GROUP_DOC = NO
+SUBGROUPING = YES
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
-EXTRACT_ALL = NO
-EXTRACT_PRIVATE = NO
-EXTRACT_STATIC = NO
-EXTRACT_LOCAL_CLASSES = YES
-EXTRACT_LOCAL_METHODS = NO
-HIDE_UNDOC_MEMBERS = NO
-HIDE_UNDOC_CLASSES = NO
-HIDE_FRIEND_COMPOUNDS = NO
-HIDE_IN_BODY_DOCS = NO
-INTERNAL_DOCS = NO
-CASE_SENSE_NAMES = YES
-HIDE_SCOPE_NAMES = NO
-SHOW_INCLUDE_FILES = YES
-INLINE_INFO = YES
-SORT_MEMBER_DOCS = YES
-SORT_BRIEF_DOCS = NO
-SORT_BY_SCOPE_NAME = NO
-GENERATE_TODOLIST = YES
-GENERATE_TESTLIST = YES
-GENERATE_BUGLIST = YES
-GENERATE_DEPRECATEDLIST= YES
-ENABLED_SECTIONS =
-MAX_INITIALIZER_LINES = 30
-SHOW_USED_FILES = YES
-SHOW_DIRECTORIES = NO
-FILE_VERSION_FILTER =
+EXTRACT_ALL = NO
+EXTRACT_PRIVATE = NO
+EXTRACT_STATIC = NO
+EXTRACT_LOCAL_CLASSES = YES
+EXTRACT_LOCAL_METHODS = NO
+HIDE_UNDOC_MEMBERS = NO
+HIDE_UNDOC_CLASSES = NO
+HIDE_FRIEND_COMPOUNDS = NO
+HIDE_IN_BODY_DOCS = NO
+INTERNAL_DOCS = NO
+CASE_SENSE_NAMES = YES
+HIDE_SCOPE_NAMES = NO
+SHOW_INCLUDE_FILES = YES
+INLINE_INFO = YES
+SORT_MEMBER_DOCS = YES
+SORT_BRIEF_DOCS = NO
+SORT_BY_SCOPE_NAME = NO
+GENERATE_TODOLIST = YES
+GENERATE_TESTLIST = YES
+GENERATE_BUGLIST = YES
+GENERATE_DEPRECATEDLIST = YES
+ENABLED_SECTIONS =
+MAX_INITIALIZER_LINES = 30
+SHOW_USED_FILES = YES
+SHOW_DIRECTORIES = NO
+FILE_VERSION_FILTER =
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
-QUIET = NO
-WARNINGS = YES
-WARN_IF_UNDOCUMENTED = YES
-WARN_IF_DOC_ERROR = YES
-WARN_NO_PARAMDOC = NO
-WARN_FORMAT = "$file:$line: $text"
-WARN_LOGFILE =
+QUIET = NO
+WARNINGS = YES
+WARN_IF_UNDOCUMENTED = YES
+WARN_IF_DOC_ERROR = YES
+WARN_NO_PARAMDOC = NO
+WARN_FORMAT = "$file:$line: $text"
+WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
-INPUT = /home/bastian/studium/hiwi/fltk-2/SessChoo
-FILE_PATTERNS = *.c \
- *.cc \
- *.cxx \
- *.cpp \
- *.c++ \
- *.d \
- *.java \
- *.ii \
- *.ixx \
- *.ipp \
- *.i++ \
- *.inl \
- *.h \
- *.hh \
- *.hxx \
- *.hpp \
- *.h++ \
- *.idl \
- *.odl \
- *.cs \
- *.php \
- *.php3 \
- *.inc \
- *.m \
- *.mm \
- *.dox \
- *.py \
- *.C \
- *.CC \
- *.C++ \
- *.II \
- *.I++ \
- *.H \
- *.HH \
- *.H++ \
- *.CS \
- *.PHP \
- *.PHP3 \
- *.M \
- *.MM \
- *.PY \
- *.C \
- *.H \
- *.tlh \
- *.diff \
- *.patch \
- *.moc \
- *.xpm \
- *.dox
-RECURSIVE = yes
-EXCLUDE =
-EXCLUDE_SYMLINKS = NO
-EXCLUDE_PATTERNS =
-EXAMPLE_PATH =
-EXAMPLE_PATTERNS = *
-EXAMPLE_RECURSIVE = NO
-IMAGE_PATH =
-INPUT_FILTER =
-FILTER_PATTERNS =
-FILTER_SOURCE_FILES = NO
+INPUT = .
+FILE_PATTERNS = *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py *.C *.CC *.C++ *.II *.I++ *.H *.HH *.H++ *.CS *.PHP *.PHP3 *.M *.MM *.PY *.C *.H *.tlh *.diff *.patch *.moc *.xpm *.dox
+RECURSIVE = yes
+EXCLUDE =
+EXCLUDE_SYMLINKS = NO
+EXCLUDE_PATTERNS =
+EXAMPLE_PATH =
+EXAMPLE_PATTERNS = *
+EXAMPLE_RECURSIVE = NO
+IMAGE_PATH =
+INPUT_FILTER =
+FILTER_PATTERNS =
+FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
-SOURCE_BROWSER = NO
-INLINE_SOURCES = NO
-STRIP_CODE_COMMENTS = YES
+SOURCE_BROWSER = NO
+INLINE_SOURCES = NO
+STRIP_CODE_COMMENTS = YES
REFERENCED_BY_RELATION = YES
-REFERENCES_RELATION = YES
+REFERENCES_RELATION = YES
REFERENCES_LINK_SOURCE = YES
-USE_HTAGS = NO
-VERBATIM_HEADERS = YES
+USE_HTAGS = NO
+VERBATIM_HEADERS = YES
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
-ALPHABETICAL_INDEX = NO
-COLS_IN_ALPHA_INDEX = 5
-IGNORE_PREFIX =
+ALPHABETICAL_INDEX = NO
+COLS_IN_ALPHA_INDEX = 5
+IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
-GENERATE_HTML = YES
-HTML_OUTPUT = html
-HTML_FILE_EXTENSION = .html
-HTML_HEADER =
-HTML_FOOTER =
-HTML_STYLESHEET =
-HTML_ALIGN_MEMBERS = YES
-GENERATE_HTMLHELP = NO
-CHM_FILE =
-HHC_LOCATION =
-GENERATE_CHI = NO
-BINARY_TOC = NO
-TOC_EXPAND = NO
-DISABLE_INDEX = NO
-ENUM_VALUES_PER_LINE = 4
-GENERATE_TREEVIEW = NO
-TREEVIEW_WIDTH = 250
+GENERATE_HTML = YES
+HTML_OUTPUT = html
+HTML_FILE_EXTENSION = .html
+HTML_HEADER =
+HTML_FOOTER =
+HTML_STYLESHEET =
+HTML_ALIGN_MEMBERS = YES
+GENERATE_HTMLHELP = NO
+CHM_FILE =
+HHC_LOCATION =
+GENERATE_CHI = NO
+BINARY_TOC = NO
+TOC_EXPAND = NO
+DISABLE_INDEX = NO
+ENUM_VALUES_PER_LINE = 4
+GENERATE_TREEVIEW = NO
+TREEVIEW_WIDTH = 250
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
-GENERATE_LATEX = YES
-LATEX_OUTPUT = latex
-LATEX_CMD_NAME = latex
-MAKEINDEX_CMD_NAME = makeindex
-COMPACT_LATEX = NO
-PAPER_TYPE = a4wide
-EXTRA_PACKAGES =
-LATEX_HEADER =
-PDF_HYPERLINKS = NO
-USE_PDFLATEX = NO
-LATEX_BATCHMODE = NO
-LATEX_HIDE_INDICES = NO
+GENERATE_LATEX = YES
+LATEX_OUTPUT = latex
+LATEX_CMD_NAME = latex
+MAKEINDEX_CMD_NAME = makeindex
+COMPACT_LATEX = NO
+PAPER_TYPE = a4wide
+EXTRA_PACKAGES =
+LATEX_HEADER =
+PDF_HYPERLINKS = NO
+USE_PDFLATEX = NO
+LATEX_BATCHMODE = NO
+LATEX_HIDE_INDICES = NO
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
-GENERATE_RTF = NO
-RTF_OUTPUT = rtf
-COMPACT_RTF = NO
-RTF_HYPERLINKS = NO
-RTF_STYLESHEET_FILE =
-RTF_EXTENSIONS_FILE =
+GENERATE_RTF = NO
+RTF_OUTPUT = rtf
+COMPACT_RTF = NO
+RTF_HYPERLINKS = NO
+RTF_STYLESHEET_FILE =
+RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
-GENERATE_MAN = NO
-MAN_OUTPUT = man
-MAN_EXTENSION = .3
-MAN_LINKS = NO
+GENERATE_MAN = NO
+MAN_OUTPUT = man
+MAN_EXTENSION = .3
+MAN_LINKS = NO
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
-GENERATE_XML = yes
-XML_OUTPUT = xml
-XML_SCHEMA =
-XML_DTD =
-XML_PROGRAMLISTING = YES
+GENERATE_XML = yes
+XML_OUTPUT = xml
+XML_SCHEMA =
+XML_DTD =
+XML_PROGRAMLISTING = YES
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
-GENERATE_AUTOGEN_DEF = NO
+GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
# configuration options related to the Perl module output
#---------------------------------------------------------------------------
-GENERATE_PERLMOD = NO
-PERLMOD_LATEX = NO
-PERLMOD_PRETTY = YES
+GENERATE_PERLMOD = NO
+PERLMOD_LATEX = NO
+PERLMOD_PRETTY = YES
PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
-ENABLE_PREPROCESSING = YES
-MACRO_EXPANSION = NO
-EXPAND_ONLY_PREDEF = NO
-SEARCH_INCLUDES = YES
-INCLUDE_PATH =
-INCLUDE_FILE_PATTERNS =
-PREDEFINED =
-EXPAND_AS_DEFINED =
-SKIP_FUNCTION_MACROS = YES
+ENABLE_PREPROCESSING = YES
+MACRO_EXPANSION = NO
+EXPAND_ONLY_PREDEF = NO
+SEARCH_INCLUDES = YES
+INCLUDE_PATH =
+INCLUDE_FILE_PATTERNS =
+PREDEFINED =
+EXPAND_AS_DEFINED =
+SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration::additions related to external references
#---------------------------------------------------------------------------
-TAGFILES =
-GENERATE_TAGFILE = SessChoo.tag
-ALLEXTERNALS = NO
-EXTERNAL_GROUPS = YES
-PERL_PATH = /usr/bin/perl
+TAGFILES =
+GENERATE_TAGFILE = SessChoo.tag
+ALLEXTERNALS = NO
+EXTERNAL_GROUPS = YES
+PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
-CLASS_DIAGRAMS = YES
-HIDE_UNDOC_RELATIONS = YES
-HAVE_DOT = NO
-CLASS_GRAPH = YES
-COLLABORATION_GRAPH = YES
-GROUP_GRAPHS = YES
-UML_LOOK = NO
-TEMPLATE_RELATIONS = NO
-INCLUDE_GRAPH = YES
-INCLUDED_BY_GRAPH = YES
-CALL_GRAPH = NO
-CALLER_GRAPH = NO
-GRAPHICAL_HIERARCHY = YES
-DIRECTORY_GRAPH = YES
-DOT_IMAGE_FORMAT = png
-DOT_PATH =
-DOTFILE_DIRS =
-MAX_DOT_GRAPH_WIDTH = 1024
-MAX_DOT_GRAPH_HEIGHT = 1024
-MAX_DOT_GRAPH_DEPTH = 1000
-DOT_TRANSPARENT = NO
-DOT_MULTI_TARGETS = NO
-GENERATE_LEGEND = YES
-DOT_CLEANUP = YES
+CLASS_DIAGRAMS = YES
+HIDE_UNDOC_RELATIONS = YES
+HAVE_DOT = NO
+CLASS_GRAPH = YES
+COLLABORATION_GRAPH = YES
+GROUP_GRAPHS = YES
+UML_LOOK = NO
+TEMPLATE_RELATIONS = NO
+INCLUDE_GRAPH = YES
+INCLUDED_BY_GRAPH = YES
+CALL_GRAPH = NO
+CALLER_GRAPH = NO
+GRAPHICAL_HIERARCHY = YES
+DIRECTORY_GRAPH = YES
+DOT_IMAGE_FORMAT = png
+DOT_PATH =
+DOTFILE_DIRS =
+MAX_DOT_GRAPH_WIDTH = 1024
+MAX_DOT_GRAPH_HEIGHT = 1024
+MAX_DOT_GRAPH_DEPTH = 1000
+DOT_TRANSPARENT = NO
+DOT_MULTI_TARGETS = NO
+GENERATE_LEGEND = YES
+DOT_CLEANUP = YES
#---------------------------------------------------------------------------
# Configuration::additions related to the search engine
#---------------------------------------------------------------------------
-SEARCHENGINE = NO
+SEARCHENGINE = NO
diff --git a/vmchooser/Makefile b/vmchooser/Makefile
deleted file mode 100644
index a44aa19..0000000
--- a/vmchooser/Makefile
+++ /dev/null
@@ -1,39 +0,0 @@
-TARGET := vmchooser
-SRCS := $(wildcard *.cxx)
-OBJS := ${SRCS:.cxx=.o}
-DEPS := ${SRCS:.cxx=.dep}
-XDEPS := $(wildcard ${DEPS})
-
-CC = g++
-DEBUG_CCFLAGS = -O0 -Wall -I/usr/include -I../fltk/ -I. -I../libxml2/include -ggdb #-ggdb #-Werror
-CCFLAGS = -O2 -Wall -I/usr/include -I../fltk/ -I. -I../libxml2/include/
-LDFLAGS = -L/usr/lib
-LIBS = -lpng ../fltk/lib/libfltk2_images.a -ljpeg -lz -lXi -lXinerama -lpthread -lm -lXext -lsupc++ -lXrender -lfontconfig -lXft -lXdmcp -lXau -ldl -lz -lfreetype -lX11 ../libxml2/libs/libxml2.a ../fltk/lib/libfltk2.a /usr/lib/libboost_regex-s.a /usr/lib/libboost_filesystem-s.a /usr/lib/libboost_system-s.a
-
-.PHONY: all clean distclean
-all:: ${TARGET}
-
-ifneq (${XDEPS},)
-include ${XDEPS}
-endif
-
-${TARGET}: ${OBJS}
- ${CC} ${LDFLAGS} -o $@ $^ ${LIBS}
- strip $@
-
-debug: ${OBJS}
- ${CC} ${LDFLAGS} -o vmchooserdbg $^ ${LIBS}
-
-${OBJS}: %.o: %.cxx %.dep
- ${CC} ${CCFLAGS} -o $@ -c $<
-
-${DEPS}: %.dep: %.cxx Makefile
- ${CC} ${CCFLAGS} -MM $< > $@
-
-clean::
- rm -f *~ *.o ${TARGET} vmchooserdbg
-
-install:
- cp vmchooser ../../../../openslx/trunk/os-plugins/plugins/vmchooser/files/
-
-distclean:: clean
diff --git a/vmchooser/SWindow.cxx b/vmchooser/SWindow.cxx
index 97a964b..278fbfb 100644
--- a/vmchooser/SWindow.cxx
+++ b/vmchooser/SWindow.cxx
@@ -7,12 +7,12 @@
#include <string.h>
-#include <img/gnome_32.xpm>
-#include <img/kde_32.xpm>
-#include <img/linux_32.xpm>
-#include <img/xp_32.xpm>
-#include <img/xp_locked_32.xpm>
-#include <img/xfce_32.xpm>
+#include "img/gnome_32.xpm"
+#include "img/kde_32.xpm"
+#include "img/linux_32.xpm"
+#include "img/xp_32.xpm"
+#include "img/xp_locked_32.xpm"
+#include "img/xfce_32.xpm"
using namespace fltk;
@@ -37,35 +37,35 @@ SWindow::SWindow(int w, int h, char* p)
add(go);
width = w;
height = h;
-
+
border(false);
go.callback(cb_return,this);
sel.callback(cb_select, this);
exit_btn.callback(cb_exit, this);
-
+
Style* btn_style = new Style(*fltk::ReturnButton::default_style);
Style* sel_style = new Style(*fltk::Browser::default_style);
-
-
-
+
+
+
Font* f1 = font("sans");
//Font* f1bold = f1->bold();
-
+
btn_style->textsize(16);
btn_style->labelsize(16);
btn_style->labelfont(f1);
btn_style->textfont(f1);
-
+
sel_style->textfont(f1);
sel_style->textsize(16);
-
+
exit_btn.style(btn_style);
go.style(btn_style);
sel.style(sel_style);
-
+
const int widths[] = { -1,-1,-1,-1, 0 };
sel.column_widths(widths);
-
+
end();
sel.take_focus();
};
@@ -80,7 +80,7 @@ void SWindow::cb_return()
{
//if(!sel.item()) return;
//curr = (Item*) sel.item();
-
+
if(curr != 0 && curr->user_data()) {
DataEntry* dat = (DataEntry*) curr->user_data();
cout << dat->short_description << endl;
@@ -141,7 +141,7 @@ void SWindow::set_lin_entries(DataEntry** ent)
((Widget*) w)->image(xpm);
w->tooltip(it->second->description.c_str());
w->callback(&runImage, (void*)it->second);
-
+
}
lin_entgroup->end();
}
@@ -154,20 +154,20 @@ void SWindow::set_entries(DataEntry** ent)
{
this->ent = ent;
sort_entries();
-
+
entgroup = (ItemGroup*)sel.add_group("VMWARE SESSIONS", &sel);
for (int i=0; ent[i] != '\0'; i++)
{
Item* w= (Item*)sel.add_leaf(ent[i]->short_description.c_str(), entgroup, (void*)ent[i] );
-
+
xpmImage* xpm = new xpmImage(get_symbol(ent[i]));
((Widget*) w)->image(xpm);
w->tooltip(ent[i]->description.c_str());
w->callback(&runImage, (void*)ent[i]);
-
+
}
entgroup->end();
-
+
}
/**************************************************************
@@ -224,7 +224,7 @@ void SWindow::unfold_entries(bool lin_entries, bool vm_entries) {
} else {
sel.goto_index(0);
Item* it = (Item*) sel.next();
-
+
while( it ) {
if(! strcmp(prename,it->label()) ) {
sel.select_only_this(0);
@@ -275,7 +275,7 @@ void SWindow::sort_entries() {
return;
}
DataEntry* ptr;
-
+
// worst case sort - but it is enough for this few entries
for(int i=0; ent[i] != '\0'; i++) {
for(int j=0; ent[j] != '\0'; j++) {
diff --git a/vmchooser/SessChoo.kdevelop.filelist b/vmchooser/SessChoo.kdevelop.filelist
deleted file mode 100644
index db31ace..0000000
--- a/vmchooser/SessChoo.kdevelop.filelist
+++ /dev/null
@@ -1,11 +0,0 @@
-# KDevelop Custom Project File List
-Makefile
-SWindow.cxx
-inc
-inc/DataEntry.h
-inc/SWindow.h
-inc/functions.h
-main.cxx
-readLinSess.cxx
-readXmlDir.cxx
-runImage.cxx
diff --git a/vmchooser/SessChoo.kdevelop.pcs b/vmchooser/SessChoo.kdevelop.pcs
deleted file mode 100644
index 006c1c2..0000000
--- a/vmchooser/SessChoo.kdevelop.pcs
+++ /dev/null
Binary files differ
diff --git a/vmchooser/SessChoo.kdevses b/vmchooser/SessChoo.kdevses
deleted file mode 100644
index fb9bd17..0000000
--- a/vmchooser/SessChoo.kdevses
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version = '1.0' encoding = 'UTF-8'?>
-<!DOCTYPE KDevPrjSession>
-<KDevPrjSession>
- <DocsAndViews NumberOfDocuments="3" >
- <Doc0 NumberOfViews="1" URL="file:///home/bastian/studium/hiwi/openslx/openslx-src-tools/trunk/os-plugins/plugins/vmchooser/vmchooser/main.cxx" >
- <View0 Encoding="" line="20" Type="Source" />
- </Doc0>
- <Doc1 NumberOfViews="1" URL="file:///home/bastian/studium/hiwi/openslx/openslx-src-tools/trunk/os-plugins/plugins/vmchooser/vmchooser/readLinSess.cxx" >
- <View0 Encoding="" line="33" Type="Source" />
- </Doc1>
- <Doc2 NumberOfViews="1" URL="file:///home/bastian/studium/hiwi/openslx/openslx-src-tools/trunk/os-plugins/plugins/vmchooser/vmchooser/runImage.cxx" >
- <View0 Encoding="" line="0" Type="Source" />
- </Doc2>
- </DocsAndViews>
- <pluginList>
- <kdevdebugger>
- <breakpointList/>
- <showInternalCommands value="0" />
- </kdevdebugger>
- <kdevastyle>
- <Extensions ext="*.cpp *.h,*.c *.h,*.cxx *.hxx,*.c++ *.h++,*.cc *.hh,*.C *.H,*.diff,*.inl,*.java,*.moc,*.patch,*.tlh,*.xpm" />
- <AStyle IndentPreprocessors="0" FillCount="4" PadParenthesesOut="1" IndentNamespaces="1" IndentLabels="1" Fill="Tabs" MaxStatement="40" Brackets="Break" MinConditional="-1" IndentBrackets="0" PadParenthesesUn="1" BlockBreak="0" KeepStatements="1" KeepBlocks="1" BlockIfElse="0" IndentSwitches="1" PadOperators="0" FStyle="Linux" IndentCases="0" FillEmptyLines="0" BracketsCloseHeaders="0" BlockBreakAll="0" PadParenthesesIn="1" IndentClasses="1" IndentBlocks="0" FillForce="0" />
- </kdevastyle>
- <kdevbookmarks>
- <bookmarks/>
- </kdevbookmarks>
- <kdevvalgrind>
- <executable path="" params="" />
- <valgrind path="/usr/bin/valgrind" params=" --tool=memcheck --leak-check=yes" />
- <calltree path="" params="" />
- <kcachegrind path="" />
- </kdevvalgrind>
- </pluginList>
-</KDevPrjSession>
diff --git a/vmchooser/main.cxx b/vmchooser/main.cxx
index b266333..09d382c 100644
--- a/vmchooser/main.cxx
+++ b/vmchooser/main.cxx
@@ -34,10 +34,10 @@ int main(int argc, char** argv) {
char* xmlpath = NULL;
char* lsesspath = NULL;
int width=0, height=0;
-
+
//opt->setVerbose();
opt->autoUsagePrint(false);
-
+
opt->addUsage("");
opt->addUsage("SessionChooser Usage: vmchooser [OPTS|image.xml]");
opt->addUsage("\t{-p |--path=} path to vmware (.xml) files");
@@ -47,25 +47,50 @@ int main(int argc, char** argv) {
opt->addUsage("\t{-h |--help} prints help");
opt->addUsage("");
opt->addUsage("Run with xml-file as additional argument to start image at once.");
-
+
opt->setFlag("help",'h');
opt->setFlag("version",'v');
opt->setOption("path", 'p');
opt->setOption("lpath", 'l');
opt->setOption("size",'s');
-
+
opt->processCommandArgs(argc, argv);
-
+
/** HELP */
if(opt->getFlag("help") || opt->getFlag('h')) {
opt->printUsage();
return 0;
}
-
- /** XML - PATH */
+
+ /** XML - PATH
+ *
+ * 1. read from stage3.conf
+ * 2. option -p
+ * 3. option --path
+ * 4. default value "/var/lib/virt/vmware/"
+ *
+ **/
+
+ ifstream ifs ( "/etc/opt/openslx/vmchooser-stage3.conf" , ifstream::in );
+ if(ifs) {
+ int n = 255;
+ char buf[n];
+ string s = "";
+ while(!ifs.eof()) {
+ ifs.getline(buf, n);
+ s = buf;
+ if(s.substr(0,17) == "vmchooser_xmlpath") {
+ xmlpath = new char[strlen(buf)];
+ xmlpath = (char*)s.substr(19,s.length()-20).append("/").c_str();
+ }
+ }
+
+ }
+
if(opt->getValue('p')!=NULL) {
xmlpath = opt->getValue('p');
}
+
if(opt->getValue("path")!= NULL) {
xmlpath = opt->getValue("path");
}
@@ -74,7 +99,7 @@ int main(int argc, char** argv) {
// Default Path comes here
xmlpath = (char *) "/var/lib/virt/vmware/";
}
-
+
/* VERSION */
if(opt->getFlag('v') || opt->getFlag("version")) {
// just print out version information - helps testing
@@ -83,7 +108,7 @@ int main(int argc, char** argv) {
return 0;
}
-
+
/** LINUX SESSION PATH */
if(opt->getValue('l')!=NULL) {
lsesspath = opt->getValue('l');
@@ -94,18 +119,18 @@ int main(int argc, char** argv) {
if (lsesspath == NULL) {
lsesspath = (char *) "/usr/share/xsessions/";
}
-
+
/** Size of Window */
string size;
unsigned int i;
-
+
if(opt->getValue('s')!=NULL) {
size = opt->getValue('s');
}
if(opt->getValue("size")!= NULL) {
size = opt->getValue("size");
}
-
+
if (size.empty()) {
width = 500;
height = 550;
@@ -133,7 +158,7 @@ int main(int argc, char** argv) {
DataEntry* result = get_entry(doc);
runImage(*result, opt->getArgv(0));
}
-
+
delete opt;
@@ -141,8 +166,8 @@ int main(int argc, char** argv) {
DataEntry** sessions = NULL;
DataEntry** lsessions = NULL;
sessions = readXmlDir(xmlpath);
- lsessions = readLinSess(lsesspath);
-
+ lsessions = readLinSess(lsesspath);
+
SWindow& win = *SWindow::getInstance(width, height);
mainwin = &win;
bool lin_entries=false;
@@ -156,15 +181,15 @@ int main(int argc, char** argv) {
win.set_entries(sessions);
vm_entries = true;
}
-
+
win.unfold_entries(lin_entries, vm_entries);
win.show(); // argc,argv
win.border(false);
bool retval = run();
-
+
win.free_entries();
-
+
return retval;
}
diff --git a/vmchooser/runImage.cxx b/vmchooser/runImage.cxx
index a5363ca..21ac50d 100644
--- a/vmchooser/runImage.cxx
+++ b/vmchooser/runImage.cxx
@@ -45,7 +45,7 @@ void runImage(fltk::Widget*, void* p)
strncpy(arg1, (char*) string("'\n\nStarte Image: ")
.append(dat.short_description)
.append("\n'").c_str(),MAX_LENGTH);
- char* argv[] = { "/opt/openslx/plugin-repo/vmchooser/mesgdisp",
+ char* argv[] = { (char*) "/opt/openslx/plugin-repo/vmchooser/mesgdisp",
arg1, NULL };
printf("%s", arg1);
diff --git a/vmchooser/vmchooser.kdevelop b/vmchooser/vmchooser.kdevelop
deleted file mode 100644
index 53bf885..0000000
--- a/vmchooser/vmchooser.kdevelop
+++ /dev/null
@@ -1,227 +0,0 @@
-<?xml version = '1.0'?>
-<kdevelop>
- <general>
- <author>Bastian Wissler</author>
- <email>bw21@mars.uni-freiburg.de</email>
- <version>1</version>
- <projectmanagement>KDevCustomProject</projectmanagement>
- <primarylanguage>C++</primarylanguage>
- <ignoreparts/>
- <projectname>vmchooser</projectname>
- <projectdirectory>./</projectdirectory>
- <absoluteprojectpath>false</absoluteprojectpath>
- <description/>
- <defaultencoding/>
- <versioncontrol/>
- </general>
- <kdevcustomproject>
- <run>
- <directoryradio>executable</directoryradio>
- <mainprogram>/home/bastian/studium/hiwi/openslx/openslx-src-tools/trunk/os-plugins/plugins/vmchooser/vmchooser</mainprogram>
- <programargs/>
- <globaldebugarguments/>
- <globalcwd>/home/bastian/studium/hiwi/openslx/openslx-src-tools/trunk/os-plugins/plugins/vmchooser</globalcwd>
- <useglobalprogram>false</useglobalprogram>
- <terminal>false</terminal>
- <autocompile>false</autocompile>
- <autoinstall>false</autoinstall>
- <autokdesu>false</autokdesu>
- <envvars/>
- </run>
- <filetypes>
- <filetype>*.java</filetype>
- <filetype>*.h</filetype>
- <filetype>*.H</filetype>
- <filetype>*.hh</filetype>
- <filetype>*.hxx</filetype>
- <filetype>*.hpp</filetype>
- <filetype>*.c</filetype>
- <filetype>*.C</filetype>
- <filetype>*.cc</filetype>
- <filetype>*.cpp</filetype>
- <filetype>*.c++</filetype>
- <filetype>*.cxx</filetype>
- <filetype>Makefile</filetype>
- <filetype>CMakeLists.txt</filetype>
- </filetypes>
- <blacklist/>
- <build>
- <buildtool>make</buildtool>
- <builddir/>
- </build>
- <other>
- <prio>0</prio>
- <otherbin/>
- <defaulttarget/>
- <otheroptions/>
- <selectedenvironment>default</selectedenvironment>
- <environments>
- <default/>
- </environments>
- </other>
- <make>
- <abortonerror>false</abortonerror>
- <numberofjobs>0</numberofjobs>
- <prio>0</prio>
- <dontact>false</dontact>
- <makebin/>
- <defaulttarget/>
- <makeoptions/>
- <selectedenvironment>default</selectedenvironment>
- <environments>
- <default/>
- </environments>
- </make>
- </kdevcustomproject>
- <kdevdebugger>
- <general>
- <dbgshell/>
- <gdbpath/>
- <configGdbScript/>
- <runShellScript/>
- <runGdbScript/>
- <breakonloadinglibs>true</breakonloadinglibs>
- <separatetty>false</separatetty>
- <floatingtoolbar>false</floatingtoolbar>
- <raiseGDBOnStart>false</raiseGDBOnStart>
- </general>
- <display>
- <staticmembers>false</staticmembers>
- <demanglenames>true</demanglenames>
- <outputradix>10</outputradix>
- </display>
- </kdevdebugger>
- <kdevdoctreeview>
- <ignoretocs>
- <toc>ada</toc>
- <toc>ada_bugs_gcc</toc>
- <toc>bash</toc>
- <toc>bash_bugs</toc>
- <toc>clanlib</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>sw</toc>
- <toc>w3c-dom-level2-html</toc>
- <toc>w3c-svg</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>
- <filetypes/>
- <useglobaltypes>
- <type ext="ui" />
- <type ext="cpp" />
- <type ext="h" />
- </useglobaltypes>
- </kdevfilecreate>
- <kdevcppsupport>
- <qt>
- <used>false</used>
- <version>3</version>
- <includestyle>3</includestyle>
- <root>/usr/qt/3</root>
- <designerintegration>EmbeddedKDevDesigner</designerintegration>
- <qmake>/usr/qt/3/bin/qmake</qmake>
- <designer>/usr/qt/3/bin/designer</designer>
- <designerpluginpaths/>
- </qt>
- <codecompletion>
- <automaticCodeCompletion>false</automaticCodeCompletion>
- <automaticArgumentsHint>true</automaticArgumentsHint>
- <automaticHeaderCompletion>true</automaticHeaderCompletion>
- <codeCompletionDelay>250</codeCompletionDelay>
- <argumentsHintDelay>400</argumentsHintDelay>
- <headerCompletionDelay>250</headerCompletionDelay>
- <showOnlyAccessibleItems>false</showOnlyAccessibleItems>
- <completionBoxItemOrder>0</completionBoxItemOrder>
- <howEvaluationContextMenu>true</howEvaluationContextMenu>
- <showCommentWithArgumentHint>true</showCommentWithArgumentHint>
- <statusBarTypeEvaluation>false</statusBarTypeEvaluation>
- <namespaceAliases>std=_GLIBCXX_STD;__gnu_cxx=std</namespaceAliases>
- <processPrimaryTypes>true</processPrimaryTypes>
- <processFunctionArguments>false</processFunctionArguments>
- <preProcessAllHeaders>true</preProcessAllHeaders>
- <parseMissingHeadersExperimental>true</parseMissingHeadersExperimental>
- <resolveIncludePathsUsingMakeExperimental>false</resolveIncludePathsUsingMakeExperimental>
- <alwaysParseInBackground>true</alwaysParseInBackground>
- <usePermanentCaching>true</usePermanentCaching>
- <alwaysIncludeNamespaces>false</alwaysIncludeNamespaces>
- <includePaths>.;</includePaths>
- </codecompletion>
- <creategettersetter>
- <prefixGet/>
- <prefixSet>set</prefixSet>
- <prefixVariable>m_,_</prefixVariable>
- <parameterName>theValue</parameterName>
- <inlineGet>true</inlineGet>
- <inlineSet>true</inlineSet>
- </creategettersetter>
- <splitheadersource>
- <enabled>false</enabled>
- <synchronize>true</synchronize>
- <orientation>Vertical</orientation>
- </splitheadersource>
- <references>
- <pcs>automatic_%2Fhome%2Fbastian%2Fstudium%2Fhiwi%2Fopenslx%2Fopenslx-src-tools%2Ftrunk%2Fos-plugins%2Fplugins%2Fvmchooser%2Fvmchooser</pcs>
- </references>
- </kdevcppsupport>
- <cppsupportpart>
- <filetemplates>
- <interfacesuffix>.h</interfacesuffix>
- <implementationsuffix>.cxx</implementationsuffix>
- </filetemplates>
- </cppsupportpart>
- <ctagspart>
- <customArguments/>
- <customTagfilePath>/home/bastian/studium/hiwi/openslx/openslx-src-tools/trunk/os-plugins/plugin/vmchooser/tags</customTagfilePath>
- <activeTagsFiles/>
- </ctagspart>
- <kdevdocumentation>
- <projectdoc>
- <docsystem/>
- <docurl/>
- <usermanualurl/>
- </projectdoc>
- </kdevdocumentation>
- <kdevfileview>
- <tree>
- <hidepatterns>*.o,*.lo,CVS</hidepatterns>
- <hidenonprojectfiles>false</hidenonprojectfiles>
- </tree>
- <groups>
- <hidenonprojectfiles>false</hidenonprojectfiles>
- <hidenonlocation>false</hidenonlocation>
- </groups>
- </kdevfileview>
-</kdevelop>