* Drop libglademm dep, upgrade gtkmm dep to 2.12.1 and use

Gtkbuilder instead of Glade::XML
* Misc bugfixes



git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@1326 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
tchernobog 2008-11-08 18:35:13 +00:00
parent a40c636ba7
commit d704fc4b13
15 changed files with 375 additions and 271 deletions

View File

@ -20,7 +20,7 @@
dnl ----------------- CONFIGURE --------------------- dnl ----------------- CONFIGURE ---------------------
AC_INIT([sgpemv2],[1.0],[matteo@member.fsf.org]) AC_INIT([sgpemv2],[1.0.1],[matteo@member.fsf.org])
if test -f "`pwd`/configure.ac"; then if test -f "`pwd`/configure.ac"; then
AC_MSG_FAILURE([ AC_MSG_FAILURE([
@ -65,7 +65,6 @@ AC_CHECK_CXXFLAG([CXXFLAGS], [Wall])
AC_CHECK_CXXFLAG([CXXFLAGS], [pedantic]) AC_CHECK_CXXFLAG([CXXFLAGS], [pedantic])
AC_CHECK_CXXFLAG([CXXFLAGS], [Wextra]) AC_CHECK_CXXFLAG([CXXFLAGS], [Wextra])
AC_CHECK_CXXFLAG([CXXFLAGS], [Wno-long-long]) AC_CHECK_CXXFLAG([CXXFLAGS], [Wno-long-long])
AC_CHECK_CXXFLAG([CXXFLAGS], [fvisibility-inlines-hidden])
AC_CHECK_LDFLAG([LDFLAGS],[--as-needed]) AC_CHECK_LDFLAG([LDFLAGS],[--as-needed])
dnl see if we've to enable debug flags dnl see if we've to enable debug flags
@ -90,6 +89,8 @@ AC_ARG_ENABLE([visibility-support],
AC_MSG_CHECKING([whether to use new GCC visibility attributes]) AC_MSG_CHECKING([whether to use new GCC visibility attributes])
if test "x$enable_gcc_visibility" = "xno"; then if test "x$enable_gcc_visibility" = "xno"; then
CPPFLAGS="${CPPFLAGS} -DDISABLE_VISIBILITY_SUPPORT" CPPFLAGS="${CPPFLAGS} -DDISABLE_VISIBILITY_SUPPORT"
else
AC_CHECK_CXXFLAG([CXXFLAGS], [fvisibility-inlines-hidden])
fi fi
AC_MSG_RESULT([$enable_gcc_visibility]) AC_MSG_RESULT([$enable_gcc_visibility])
@ -137,7 +138,8 @@ AC_MSG_RESULT([$compile_tests])
AM_CONDITIONAL([COND_TESTS], [test "$compile_tests" = "yes"]) AM_CONDITIONAL([COND_TESTS], [test "$compile_tests" = "yes"])
dnl output files dnl output files
AC_CONFIG_FILES([config/Doxyfile config/sgpemv2.pc config/sgpemv2-uninstalled.pc]) AC_CONFIG_FILES([config/Doxyfile config/sgpemv2.pc \
config/sgpemv2-uninstalled.pc data/sgpemv2.desktop])
AC_CONFIG_HEADERS([config.h:config.h.in]) AC_CONFIG_HEADERS([config.h:config.h.in])
# force include of configuration header in every compilation unit # force include of configuration header in every compilation unit

View File

@ -2,9 +2,9 @@
Encoding=UTF-8 Encoding=UTF-8
Type=Application Type=Application
Version=0.9 Version=@PACKAGE_VERSION@
Name=SGPEMv2 Name=SGPEMv2
Categories=Education;Engineering;GTK Categories=Education;Engineering;GTK;
GenericName=Process Scheduling Simulator GenericName=Process Scheduling Simulator
GenericName[it]=Simulatore della Gestione dei Processi GenericName[it]=Simulatore della Gestione dei Processi

View File

@ -2,7 +2,7 @@
curdir="$(pwd)" curdir="$(pwd)"
if [ "${1}" == "" ]; then if [ "${1}" = "" ]; then
echo "You need to pass the control file as the first parameter of this script." echo "You need to pass the control file as the first parameter of this script."
echo "Usage: ./build.sh <control-file> <package.tar.bz2>" echo "Usage: ./build.sh <control-file> <package.tar.bz2>"
exit -1 exit -1

View File

@ -4,7 +4,7 @@ Section: misc
Priority: optional Priority: optional
Architecture: i386 Architecture: i386
Pre-Depends: libstdc++6 Pre-Depends: libstdc++6
Depends: libgtkmm-2.4-1c2a, libglademm-2.4-1c2a, libxml2 (>= 2.6.10), libcairo, python (>= 2.3) Depends: libgtkmm-2.4-1c2a, libglademm-2.4-1c2a, libxml2 (>= 2.6.10), libcairo, python (>= 2.3), python (<< 2.5)
Installed-Size: @SIZE@ Installed-Size: @SIZE@
Maintainer: Marco Trevisan <evenjn@gmail.com> Maintainer: Marco Trevisan <evenjn@gmail.com>
Provides: sgpemv2 Provides: sgpemv2

View File

@ -0,0 +1,22 @@
Package: sgpemv2
Version: 1.0.1
Section: misc
Priority: optional
Architecture: i386
Pre-Depends: libstdc++6
Depends: libgtkmm-2.4-1c2a, libglademm-2.4-1c2a, libxml2 (>= 2.6.10), libcairo, python (>= 2.3)
Installed-Size: @SIZE@
Maintainer: Marco Trevisan <evenjn@gmail.com>
Provides: sgpemv2
Description: A graphical process management simulator with educational purposes.
.
SGPEM is an Italian acronym, standing for "Simulatore della Gestione
dei Processi in un Elaboratore Multiprogrammato" (in English, "Process
Management Simulator for a Multitasking Computer"). It was initially
developed for use inside the "Operating Systems" teaching, part of the
Computer Science course of the University of Padova, Italy.
.
The aim of SGPEM is to provide an easy-to-use environment for simulating
process scheduling policies, and for assigning resources in a multitasking
computer. SGPEMv2 is an educational software, and it can help students
to better understand the functionality of operating systems.

View File

@ -1257,7 +1257,7 @@ Here there's a quick reference about such commands:
@table @samp @table @samp
@item svn checkout @emph{http://svn.thgnet.it/swe/drafts} @item svn checkout @emph{http://svn.gna.org/svn/sgpemv2/trunk}
Downloads a copy of the current @samp{drafts/} directory contents. Downloads a copy of the current @samp{drafts/} directory contents.
Checking out the root repository dir (@samp{swe/}) may Checking out the root repository dir (@samp{swe/}) may
result, in near future, to a @strong{big} download, as result, in near future, to a @strong{big} download, as

View File

@ -17,7 +17,7 @@
This is SGPEMv2 User Manual (version @value{VERSION}, This is SGPEMv2 User Manual (version @value{VERSION},
@value{UPDATED}). @value{UPDATED}).
Copyright @copyright{} 2005-2006 University of Padova, dept. of Pure Copyright @copyright{} 2005-2007 University of Padova, dept. of Pure
and Applied Mathematics and Applied Mathematics
Permission is granted to copy, distribute and/or modify this document Permission is granted to copy, distribute and/or modify this document
@ -89,13 +89,15 @@ Free Documentation License''.
@unnumbered History @unnumbered History
@table @strong @table @strong
@item 2007, March 5th @r{-- Matteo Settenvini}
Updated subsection ``The Schedulables/Requests tree''
@item 2006, September 12th @r{--- Luca Vezzaro} @item 2006, September 12th @r{--- Luca Vezzaro}
Updated section "From the commandline" Updated section ``From the commandline''
@item 2006, September 9th @r{--- Luca Vezzaro} @item 2006, September 9th @r{--- Luca Vezzaro}
Written documentation for section "The Schedulables/Requests tree" Written documentation for section ``The Schedulables/Requests tree''
and section "The Resources list" and section ``The Resources list''
@item 2006, September 8th @r{--- Luca Vezzaro} @item 2006, September 8th @r{--- Luca Vezzaro}
Written documentation for section "Overall view of the main window" Written documentation for section ``Overall view of the main window''
@item 2006, September 8th @r{--- Matteo Settenvini} @item 2006, September 8th @r{--- Matteo Settenvini}
Update chapters about building and installation. Rewrite some of the Update chapters about building and installation. Rewrite some of the
chapter about extending SGPEMv2 with custom CPU policies, and add a chapter about extending SGPEMv2 with custom CPU policies, and add a
@ -160,8 +162,8 @@ help students to better understand the functionality of operating systems.
We recommend that you read the manual following the the structure that We recommend that you read the manual following the the structure that
we layed out for it. You will be gently led trough Installation, Configuration and Usage of SGPEMv2. we layed out for it. You will be gently led trough Installation, Configuration and Usage of SGPEMv2.
If you find yourself in trouble reading the manual, please don't hesitate to contact us at If you find yourself in trouble reading the manual, please don't hesitate to contact us via
@email{swe@@thgnet.it}. @url{https://mail.gna.org/listinfo/sgpemv2-devel}.
@c % -------------------------------------------------- @c % --------------------------------------------------
@ -171,7 +173,7 @@ If you find yourself in trouble reading the manual, please don't hesitate to con
@cindex reporting @cindex reporting
We welcome bug reports and suggestions for any aspect of the SGPEM v2 system, program in general, We welcome bug reports and suggestions for any aspect of the SGPEM v2 system, program in general,
documentation, installation... anything. Please email us at @email{swe@@thgnet.it}. documentation, installation... anything. Please contact us via @url{https://mail.gna.org/listinfo/sgpemv2-devel}.
For bug reporters, include enough information for us to reproduce the problem. In general: For bug reporters, include enough information for us to reproduce the problem. In general:
@itemize @itemize
@item @item
@ -763,6 +765,10 @@ add threads or requests you must select a process or a thread, respectively.
To remove or edit an entity simply select it, and the popup menu will contain the remove To remove or edit an entity simply select it, and the popup menu will contain the remove
or edit operation specific for that entity. or edit operation specific for that entity.
Note also that adding a process, since version 1.0.1, automatically
adds also a ``Main'' thread. This is for your convenience: you're
still able to modify/delete it if you want.
Anyway, these functionalities are only useful for a stopped simulation. While the simulation Anyway, these functionalities are only useful for a stopped simulation. While the simulation
is not in a stopped state, a lot of dynamic information is displayed by the widget. is not in a stopped state, a lot of dynamic information is displayed by the widget.

View File

@ -42,7 +42,7 @@ AC_CONFIG_AUX_DIR(config)
AC_CANONICAL_TARGET AC_CANONICAL_TARGET
dnl starting automake dnl starting automake
AM_INIT_AUTOMAKE([dejagnu dist-bzip2 subdir-objects]) AM_INIT_AUTOMAKE([dist-bzip2 subdir-objects])
dnl gettext & libtool dnl gettext & libtool
AC_PROG_LIBTOOL AC_PROG_LIBTOOL
@ -77,6 +77,22 @@ else
AC_CHECK_CXXFLAG([CXXFLAGS], [DNDEBUG]) AC_CHECK_CXXFLAG([CXXFLAGS], [DNDEBUG])
fi fi
dnl see if we have to enable visibility support
AC_ARG_ENABLE([visibility-support],
AS_HELP_STRING([--enable-visibility-support],
[enable the new GCC visibility support; requires GCC >= 4.0 to work.]),
[enable_gcc_visibility="$enableval"],
[enable_gcc_visibility="no"])
AC_MSG_CHECKING([whether to use new GCC visibility attributes])
if test "x$enable_gcc_visibility" = "xno"; then
CPPFLAGS="${CPPFLAGS} -DDISABLE_VISIBILITY_SUPPORT"
else
AC_CHECK_CXXFLAG([CXXFLAGS], [fvisibility-inlines-hidden])
fi
AC_MSG_RESULT([$enable_gcc_visibility])
AC_PROG_INSTALL AC_PROG_INSTALL
dnl make dnl make

View File

@ -32,7 +32,7 @@ dnl @author Rafael Laboissiere <laboissiere@psy.mpg.de>
dnl @author Andrew Collier <colliera@nu.ac.za> dnl @author Andrew Collier <colliera@nu.ac.za>
dnl @author Matteo Settenvini <matteo@member.fsf.org> dnl @author Matteo Settenvini <matteo@member.fsf.org>
dnl @author Horst Knorr <hk_classes@knoda.org> dnl @author Horst Knorr <hk_classes@knoda.org>
dnl @version 2006-02-05 dnl @version 2008-01-16
dnl @license GPLWithACException dnl @license GPLWithACException
AC_DEFUN([AC_PYTHON_DEVEL],[ AC_DEFUN([AC_PYTHON_DEVEL],[
@ -134,48 +134,65 @@ $ac_distutils_result])
if test -z "$PYTHON_LDFLAGS"; then if test -z "$PYTHON_LDFLAGS"; then
# (makes two attempts to ensure we've got a version number # (makes two attempts to ensure we've got a version number
# from the interpreter) # from the interpreter)
py_version=`$PYTHON -c "from distutils.sysconfig import *; \ ac_python_version=`$PYTHON -c "from distutils.sysconfig import *; \
from string import join; \ from string import join; \
print join(get_config_vars('VERSION'))"` print join(get_config_vars('VERSION'))"`
if test "$py_version" == "[None]"; then if test "$ac_python_version" = "[None]"; then
if test -n "$PYTHON_VERSION"; then if test -n "$PYTHON_VERSION"; then
py_version=$PYTHON_VERSION ac_python_version=$PYTHON_VERSION
else else
py_version=`$PYTHON -c "import sys; \ ac_python_version=`$PYTHON -c "import sys; \
print sys.version[[:3]]"` print sys.version[[:3]]"`
fi fi
fi fi
PYTHON_LDFLAGS=`$PYTHON -c "from distutils.sysconfig import *; \ # First, the library directory:
from string import join; \ ac_python_libdir=`$PYTHON -c \
print '-L' + get_python_lib(0,1);"` "import distutils.sysconfig,string; \
print string.join(filter(None, \
distutils.sysconfig.get_config_vars('LIBDIR')))"`
# We could have a versioned library, or an unversioned one, # Before checking for libpythonX.Y, we need to know
# even if the second case is discouraged. So, let's check for # the extension the OS we're on uses for libraries:
# the versioned one first, and fallback on the second later. ac_python_soext=`$PYTHON -c \
LIBS="$ac_save_LIBS $PYTHON_LDFLAGS" "import distutils.sysconfig, string; \
CPPFLAGS="$ac_save_CPPFLAGS $PYTHON_CPPFLAGS" print string.join(filter(None, \
distutils.sysconfig.get_config_vars('SO')))"`
AC_LANG_PUSH([C]) # Now, for the library:
AC_CHECK_LIB([python$py_version], [Py_Initialize], ac_python_soname=`$PYTHON -c \
[PYTHON_LDFLAGS="$PYTHON_LDFLAGS -lpython$py_version"], "import distutils.sysconfig,string; \
AC_CHECK_LIB([python], [Py_Initialize], print string.join(filter(None, \
[PYTHON_LDFLAGS="$PYTHON_LDFLAGS -lpython"], distutils.sysconfig.get_config_vars('LDLIBRARY')))"`
[PYTHON_LDFLAGS=""])
)
AC_LANG_POP
if test -z "$PYTHON_LDFLAGS"; then # Strip away extension from the end to canonicalize its name:
AC_MSG_ERROR([ ac_python_library=`echo "$ac_python_soname" | sed "s/${ac_python_soext}$//"`
Could not link test program to Python. Maybe the main Python library has been
installed in some non-standard library path. If so, pass it to configure, # This small piece shamelessly adapted from PostgreSQL python macro;
via the LDFLAGS environment variable. # credits goes to momjian, I think. I'd like to put the right name
Example: ./configure LDFLAGS="-L/usr/non-standard-path/python/lib" # in the credits, if someone can point me in the right direction... ?
]) #
if test -n "$ac_python_libdir" -a -n "$ac_python_library" \
-a x"$ac_python_library" != x"$ac_python_soname"
then
# use the official shared library
ac_python_library=`echo "$ac_python_library" | sed "s/^lib//"`
PYTHON_LDFLAGS="-L$ac_python_libdir -l$ac_python_library"
else
# old way: use libpython from python_configdir
ac_python_libdir=`$PYTHON -c \
"from distutils.sysconfig import get_python_lib as f; \
import os; \
print os.path.join(f(plat_specific=1,standard_lib=1),'config');"`
PYTHON_LDFLAGS="-L$ac_python_libdir -lpython$ac_python_version"
fi fi
CPPFLAGS="$ac_save_CPPFLAGS" if test -z "PYTHON_LDFLAGS"; then
LIBS="$ac_save_LIBS" AC_MSG_ERROR([
Cannot determine location of your Python DSO. Please check it was installed with
dynamic libraries enabled, or try setting PYTHON_LDFLAGS by hand.
])
fi
fi fi
AC_MSG_RESULT([$PYTHON_LDFLAGS]) AC_MSG_RESULT([$PYTHON_LDFLAGS])
AC_SUBST([PYTHON_LDFLAGS]) AC_SUBST([PYTHON_LDFLAGS])
@ -233,12 +250,14 @@ $ac_distutils_result])
if test ! "$pythonexists" = "yes"; then if test ! "$pythonexists" = "yes"; then
AC_MSG_ERROR([ AC_MSG_ERROR([
Could not link test program to Python. Maybe the main Python library has been
installed in some non-standard library path. If so, pass it to configure,
via the LDFLAGS environment variable.
Example: ./configure LDFLAGS="-L/usr/non-standard-path/python/lib"
============================================================================ ============================================================================
ERROR! ERROR!
You probably have to install the development version of the Python package You probably have to install the development version of the Python package
for your distribution. The exact name of this package varies among them. for your distribution. The exact name of this package varies among them.
Take also a look to config.log. If everything looks all right, please
report the problem to the macro maintainer.
============================================================================ ============================================================================
]) ])
PYTHON_VERSION="" PYTHON_VERSION=""

View File

@ -61,7 +61,6 @@ AC_CHECK_CXXFLAG([CXXFLAGS], [Wall])
AC_CHECK_CXXFLAG([CXXFLAGS], [pedantic]) AC_CHECK_CXXFLAG([CXXFLAGS], [pedantic])
AC_CHECK_CXXFLAG([CXXFLAGS], [Wextra]) AC_CHECK_CXXFLAG([CXXFLAGS], [Wextra])
AC_CHECK_CXXFLAG([CXXFLAGS], [Wno-long-long]) AC_CHECK_CXXFLAG([CXXFLAGS], [Wno-long-long])
AC_CHECK_CXXFLAG([CXXFLAGS], [fvisibility-inlines-hidden])
AC_CHECK_LDFLAG([LDFLAGS], [--as-needed]) AC_CHECK_LDFLAG([LDFLAGS], [--as-needed])
dnl see if we've to enable debug flags dnl see if we've to enable debug flags
@ -77,6 +76,22 @@ else
AC_CHECK_CXXFLAG([CXXFLAGS], [DNDEBUG]) AC_CHECK_CXXFLAG([CXXFLAGS], [DNDEBUG])
fi fi
dnl see if we have to enable visibility support
AC_ARG_ENABLE([visibility-support],
AS_HELP_STRING([--enable-visibility-support],
[enable the new GCC visibility support; requires GCC >= 4.0 to work.]),
[enable_gcc_visibility="$enableval"],
[enable_gcc_visibility="no"])
AC_MSG_CHECKING([whether to use new GCC visibility attributes])
if test "x$enable_gcc_visibility" = "xno"; then
CPPFLAGS="${CPPFLAGS} -DDISABLE_VISIBILITY_SUPPORT"
else
AC_CHECK_CXXFLAG([CXXFLAGS], [fvisibility-inlines-hidden])
fi
AC_MSG_RESULT([$enable_gcc_visibility])
AC_PROG_INSTALL AC_PROG_INSTALL
dnl make dnl make

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
// src/backend/scheduler.cc - Copyright 2005, 2006, University // src/backend/scheduler.cc - Copyright 2005-2007 University
// of Padova, dept. of Pure and Applied // of Padova, dept. of Pure and Applied
// Mathematics // Mathematics
// //

View File

@ -1,4 +1,4 @@
// src/parseopts.cc - Copyright 2005, 2006, University // src/parseopts.cc - Copyright 2005-2007, University
// of Padova, dept. of Pure and Applied // of Padova, dept. of Pure and Applied
// Mathematics // Mathematics
// //
@ -98,14 +98,14 @@ parse_options(int argc, char** argv)
try try
{ {
// Parse options, initialising the Gtk::Main at the same time // Parse options, initialising the Gtk at the same time
gboolean gui_initializable = gtk_init_check(&argc, &argv);
context.parse(argc, argv); context.parse(argc, argv);
GlobalPreferences& prefs = GlobalPreferences::get_instance(); GlobalPreferences& prefs = GlobalPreferences::get_instance();
try try
{ {
prefs.load_configrc(); prefs.load_configrc();
} }
catch (std::exception e) catch (std::exception e)
{ {
@ -131,7 +131,7 @@ parse_options(int argc, char** argv)
vector<CPUPolicyManager*> managers = CPUPoliciesGatekeeper::get_instance().get_registered(); vector<CPUPolicyManager*> managers = CPUPoliciesGatekeeper::get_instance().get_registered();
if (no_gui_enabled) if (no_gui_enabled || !gui_initializable)
{ {
// We don't return to main, instead we // We don't return to main, instead we
// initialize the command line version // initialize the command line version
@ -154,10 +154,11 @@ parse_options(int argc, char** argv)
} }
else else
{ {
Gtk::Main main(argc, argv);
GuiBuilder* gui = new GuiBuilder(); GuiBuilder* gui = new GuiBuilder();
if (fnames.begin() != fnames.end()) if (fnames.begin() != fnames.end())
gui->open_file(*fnames.begin()); gui->open_file(*fnames.begin());
Gtk::Main::run(gui->get_initial_window()); main.run(gui->get_initial_window());
delete gui; delete gui;
} }

View File

@ -1,4 +1,4 @@
// src/schedulables_tree_widget.cc - Copyright 2005, 2006, University // src/schedulables_tree_widget.cc - Copyright 2005-2007, University
// of Padova, dept. of Pure and Applied // of Padova, dept. of Pure and Applied
// Mathematics // Mathematics
// //

View File

@ -1,4 +1,4 @@
// src/text_simulation.cc - Copyright 2005, 2006, University // src/text_simulation.cc - Copyright 2005-2007, University
// of Padova, dept. of Pure and Applied // of Padova, dept. of Pure and Applied
// Mathematics // Mathematics
// //