[chronojump] Autotools support for ChronoJump



commit 9a969c9b6316a97ab102cd441bd78a3387f5294b
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Wed Aug 12 15:35:45 2009 +0200

    Autotools support for ChronoJump
    	Support to generate cross-platform Makefiles using autotools
            The first time you checkout the repository you need to generate
    	the 'configure' script and the 'Makefile.in' templates by running:
            $ sh autogen.sh
    	This script will generate the 'configure' script and the 'Makefile.in' templates
    	from configure.ac and Makefile.am. It will also  call the 'configure' script for you,
    	which will generate all the 'Makefile' files from the 'Makefile.in' templates.
    	'autogen.sh' should be called for each change in configure.ac or Makefile.am files.
    	This script is targetted for developpers, to avoid polluting the repository with
    	extra files.
    	After running 'autogen.sh' once, you will usually use the following commands:
     	$ ./configure
    	$ make
    	# make install
    	You can create a tarball for the current version (stored in configure.ac) using:
    	$ make dist

 Makefile.am                                |   13 +
 Makefile.include                           |  122 ++++++++++
 Makefile => Makefile.old                   |    0
 autogen.sh                                 |   83 +++++++
 chronojump_server/Makefile.am              |   69 ++++++
 chronopic-tests/Makefile.am                |   45 ++++
 chronopic-tests/{Makefile => Makefile.old} |    0
 configure.ac                               |   72 ++++++
 po/Makefile.am                             |   45 ++++
 src/Makefile.am                            |  358 ++++++++++++++++++++++++++++
 src/chronojump.cs                          |   16 +-
 src/chronojump.desktop.in                  |   11 +
 src/chronojump.in                          |    3 +
 src/chronojump_mini.in                     |    3 +
 14 files changed, 836 insertions(+), 4 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..f10cdad
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,13 @@
+EXTRA_DIST = 	build/data/linux_dlls/NPlot.dll\
+  		build/data/linux_dlls/NPlot.Gtk.dll\
+		build/data/linux_dlls/NPlot.dll.config\
+		build/data/linux_dlls/NPlot.Gtk.dll.config
+
+ACLOCAL_AMFLAGS = -I m4
+
+if ENABLE_DEBUG
+ SUBDIRS =  chronojump_server chronopic-tests po  src
+endif
+if ENABLE_RELEASE
+ SUBDIRS = chronojump_server chronopic-tests  po src
+endif
diff --git a/Makefile.include b/Makefile.include
new file mode 100644
index 0000000..6669864
--- /dev/null
+++ b/Makefile.include
@@ -0,0 +1,122 @@
+VALID_CULTURES =   ar bg ca zh-CHS cs da de el en es fi fr he hu is it ja ko nl no pl pt ro ru hr sk sq sv th tr id uk be sl et lv lt fa vi hy eu mk af fo hi sw gu ta te kn mr gl kok ar-SA bg-BG ca-ES zh-TW cs-CZ da-DK de-DE el-GR en-US fi-FI fr-FR he-IL hu-HU is-IS it-IT ja-JP ko-KR nl-NL nb-NO pl-PL pt-BR ro-RO ru-RU hr-HR sk-SK sq-AL sv-SE th-TH tr-TR id-ID uk-UA be-BY sl-SI et-EE lv-LV lt-LT fa-IR vi-VN hy-AM eu-ES mk-MK af-ZA fo-FO hi-IN sw-KE gu-IN ta-IN te-IN kn-IN mr-IN gl-ES kok-IN ar-IQ zh-CN de-CH en-GB es-MX fr-BE it-CH nl-BE nn-NO pt-PT sv-FI ar-EG zh-HK de-AT en-AU es-ES fr-CA ar-LY zh-SG de-LU en-CA es-GT fr-CH ar-DZ zh-MO en-NZ es-CR fr-LU ar-MA en-IE es-PA ar-TN en-ZA es-DO ar-OM es-VE ar-YE es-CO ar-SY es-PE ar-JO es-AR ar-LB en-ZW es-EC ar-KW en-PH es-CL ar-AE es-UY ar-BH es-PY ar-QA es-BO es-SV es-HN es-NI es-PR zh-CHT
+
+s2q=$(subst \ ,?,$1)
+q2s=$(subst ?,\ ,$1)
+# use this when result will be quoted
+unesc2=$(subst ?, ,$1)
+
+build_sources = $(FILES) $(GENERATED_FILES)
+build_sources_esc= $(call s2q,$(build_sources))
+# use unesc2, as build_sources_embed is quoted
+build_sources_embed= $(call unesc2,$(build_sources_esc:%='$(srcdir)/%'))
+
+comma__=,
+get_resource_name = $(firstword $(subst $(comma__), ,$1))
+get_culture =  $(lastword $(subst ., ,$(basename $1)))
+is_cultured_resource = $(and $(word 3,$(subst ., ,$1)), $(filter $(VALID_CULTURES),$(lastword $(subst ., ,$(basename $1)))))
+
+RESOURCES_ESC=$(call s2q,$(RESOURCES))
+
+build_resx_list = $(foreach res, $(RESOURCES_ESC), $(if $(filter %.resx, $(call get_resource_name,$(res))),$(res),))
+build_non_culture_resx_list = $(foreach res, $(build_resx_list),$(if $(call is_cultured_resource,$(call get_resource_name,$(res))),,$(res)))
+build_non_culture_others_list = $(foreach res, $(filter-out $(build_resx_list),$(RESOURCES_ESC)),$(if $(call is_cultured_resource,$(call get_resource_name,$(res))),,$(res)))
+build_others_list = $(build_non_culture_others_list)
+build_xamlg_list = $(filter %.xaml.g.cs, $(FILES))
+
+# resgen all .resx resources
+build_resx_files = $(foreach res, $(build_resx_list), $(call get_resource_name,$(res)))
+build_resx_resources_esc = $(build_resx_files:.resx=.resources)
+build_resx_resources = $(call q2s,$(build_resx_resources_esc))
+
+# embed resources for the main assembly
+build_resx_resources_hack = $(subst .resx,.resources, $(build_non_culture_resx_list))
+# use unesc2, as build_resx_resources_embed is quoted
+build_resx_resources_embed = $(call unesc2,$(build_resx_resources_hack:%='-resource:%'))
+build_others_files = $(call q2s,$(foreach res, $(build_others_list),$(call get_resource_name,$(res))))
+build_others_resources = $(build_others_files)
+# use unesc2, as build_others_resources_embed is quoted
+build_others_resources_embed = $(call unesc2,$(build_others_list:%='-resource:$(srcdir)/%'))
+
+build_resources = $(build_resx_resources) $(build_others_resources)
+build_resources_embed = $(build_resx_resources_embed) $(build_others_resources_embed)
+
+# -usesourcepath is available only for resgen2
+emit_resgen_target_1=$(call q2s,$1) : $(call q2s,$(subst .resources,.resx,$1)); cd '$$(shell dirname '$$<')' && MONO_IOMAP=drive $$(RESGEN) '$$(shell basename '$$<')' '$$(shell basename '$$@')'
+emit_resgen_target_2=$(call q2s,$1) : $(call q2s,$(subst .resources,.resx,$1)); MONO_IOMAP=drive $$(RESGEN) -usesourcepath '$$<' '$$@'
+
+emit_resgen_target=$(if $(filter resgen2,$(RESGEN)),$(emit_resgen_target_2),$(emit_resgen_target_1))
+emit_resgen_targets=$(foreach res,$(build_resx_resources_esc),$(eval $(call emit_resgen_target,$(res))))
+
+build_references_ref = $(call q2s,$(foreach ref, $(call s2q,$(REFERENCES)), $(if $(filter -pkg:%, $(ref)), $(ref), $(if $(filter -r:%, $(ref)), $(ref), -r:$(ref)))))
+build_references_ref += $(call q2s,$(foreach ref, $(call s2q,$(DLL_REFERENCES)), -r:$(ref)))
+build_references_ref += $(call q2s,$(foreach ref, $(call s2q,$(PROJECT_REFERENCES)), -r:$(ref)))
+
+s2q2s=$(call unesc2,$(call s2q,$1))
+cp_actual=test -z $1 || cp $1 $2
+cp=$(call cp_actual,'$(call s2q2s,$1)','$(call s2q2s,$2)')
+
+rm_actual=test -z '$1' || rm -f '$2'
+rm=$(call rm_actual,$(call s2q2s,$1),$(call s2q2s,$2)/$(shell basename '$(call s2q2s,$1)'))
+
+EXTRA_DIST += $(build_sources) $(build_resx_files) $(build_others_files) $(ASSEMBLY_WRAPPER_IN) $(EXTRAS) $(DATA_FILES) $(build_culture_res_files)
+CLEANFILES += $(ASSEMBLY) $(ASSEMBLY).mdb $(BINARIES) $(build_resx_resources) $(build_satellite_assembly_list)
+DISTCLEANFILES = $(GENERATED_FILES) $(pc_files) $(BUILD_DIR)/*
+
+pkglib_SCRIPTS = $(ASSEMBLY)
+bin_SCRIPTS = $(BINARIES)
+
+linuxdesktopapplicationsdir = @datadir@/applications
+linuxdesktopapplications_DATA = $(LINUX_DESKTOPAPPLICATIONS)
+programfilesdir = @libdir@/@PACKAGE@
+programfiles_DATA = $(PROGRAMFILES)
+commonapplicationdatarootimagesdir = @datadir@/images
+commonapplicationdatarootimages_DATA = $(COMMONAPPLICATIONDATAROOT_IMAGES)
+commonapplicationdatarootlogodir = @datadir@/icons/hicolor/48x48/apps/
+commonapplicationdatarootlogo_DATA = $(COMMONAPPLICATIONDATAROOT_LOGO)
+
+
+# macros
+
+# $(call emit-deploy-target,deploy-variable-name)
+define emit-deploy-target
+$($1): $($1_SOURCE)
+	mkdir -p '$$(shell dirname '$$@')'
+	cp '$$<' '$$@'
+endef
+
+# $(call emit-deploy-wrapper,wrapper-variable-name,wrapper-sourcefile,x)
+# assumes that for a wrapper foo.pc its source template is foo.pc.in
+# if $3 is non-empty then wrapper is marked exec
+define emit-deploy-wrapper
+$($1): $2 
+	mkdir -p '$$(shell dirname '$$@')'
+	cp '$$<' '$$@'
+	$(if $3,chmod +x '$$@')
+
+endef
+
+# generating satellite assemblies
+
+culture_resources = $(foreach res, $(RESOURCES_ESC), $(if $(call is_cultured_resource,$(call get_resource_name, $(res))),$(res)))
+cultures = $(sort $(foreach res, $(culture_resources), $(call get_culture,$(call get_resource_name,$(res)))))
+culture_resource_dependencies = $(call q2s,$(BUILD_DIR)/$1/$(SATELLITE_ASSEMBLY_NAME): $(subst .resx,.resources,$2))
+culture_resource_commandlines = $(call unesc2,cmd_line_satellite_$1 += '/embed:$(subst .resx,.resources,$2)')
+build_satellite_assembly_list = $(call q2s,$(cultures:%=$(BUILD_DIR)/%/$(SATELLITE_ASSEMBLY_NAME)))
+build_culture_res_files = $(call q2s,$(foreach res, $(culture_resources),$(call get_resource_name,$(res))))
+install_satellite_assembly_list = $(subst $(BUILD_DIR),$(DESTDIR)$(libdir)/$(PACKAGE),$(build_satellite_assembly_list))
+
+$(eval $(foreach res, $(culture_resources), $(eval $(call culture_resource_dependencies,$(call get_culture,$(call get_resource_name,$(res))),$(call get_resource_name,$(res))))))
+$(eval $(foreach res, $(culture_resources), $(eval $(call culture_resource_commandlines,$(call get_culture,$(call get_resource_name,$(res))),$(res)))))
+
+$(build_satellite_assembly_list): $(BUILD_DIR)/%/$(SATELLITE_ASSEMBLY_NAME):
+	mkdir -p '$(@D)'
+	$(AL) -out:'$@' -culture:$* -t:lib $(cmd_line_satellite_$*)
+
+$(install_satellite_assembly_list):
+	mkdir -p '$(@D)'
+	cp $(subst $(DESTDIR)$(libdir)/$(PACKAGE), $(BUILD_DIR), $@) $@
+
+install-satellite-assemblies: $(install_satellite_assembly_list)
+	
+uninstall-satellite-assemblies:
+	rm -rf $(install_satellite_assembly_list)
diff --git a/Makefile b/Makefile.old
similarity index 100%
rename from Makefile
rename to Makefile.old
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..e80d0ed
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,83 @@
+#! /bin/sh
+
+PROJECT=ChronoJump
+FILE=
+CONFIGURE=configure.ac
+
+: ${AUTOCONF=autoconf}
+: ${AUTOHEADER=autoheader}
+: ${AUTOMAKE=automake}
+: ${LIBTOOLIZE=libtoolize}
+: ${ACLOCAL=aclocal}
+: ${LIBTOOL=libtool}
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+ORIGDIR=`pwd`
+cd $srcdir
+TEST_TYPE=-f
+aclocalinclude="-I . $ACLOCAL_FLAGS"
+
+DIE=0
+
+($AUTOCONF --version) < /dev/null > /dev/null 2>&1 || {
+        echo
+        echo "You must have autoconf installed to compile $PROJECT."
+        echo "Download the appropriate package for your distribution,"
+        echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/";
+        DIE=1
+}
+
+($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
+        echo
+        echo "You must have automake installed to compile $PROJECT."
+        echo "Get ftp://sourceware.cygnus.com/pub/automake/automake-1.4.tar.gz";
+        echo "(or a newer version if it is available)"
+        DIE=1
+}
+
+(grep "^AM_PROG_LIBTOOL" $CONFIGURE >/dev/null) && {
+  ($LIBTOOL --version) < /dev/null > /dev/null 2>&1 || {
+    echo
+    echo "**Error**: You must have \`libtool' installed to compile $PROJECT."
+    echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz";
+    echo "(or a newer version if it is available)"
+    DIE=1
+  }
+}
+
+if test "$DIE" -eq 1; then
+        exit 1
+fi
+                                                                                
+#test $TEST_TYPE $FILE || {
+#        echo "You must run this script in the top-level $PROJECT directory"
+#        exit 1
+#}
+
+if test -z "$*"; then
+        echo "I am going to run ./configure with no arguments - if you wish "
+        echo "to pass any to it, please specify them on the $0 command line."
+fi
+
+case $CC in
+*xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
+esac
+
+(grep "^AM_PROG_LIBTOOL" $CONFIGURE >/dev/null) && {
+    echo "Running $LIBTOOLIZE ..."
+    $LIBTOOLIZE --force --copy
+}
+
+echo "Running $ACLOCAL $aclocalinclude ..."
+$ACLOCAL $aclocalinclude
+
+echo "Running $AUTOMAKE --gnu $am_opt ..."
+$AUTOMAKE --add-missing --gnu $am_opt
+
+echo "Running $AUTOCONF ..."
+$AUTOCONF
+
+echo Running $srcdir/configure $conf_flags "$@" ...
+$srcdir/configure  $conf_flags "$@" \
diff --git a/chronojump_server/Makefile.am b/chronojump_server/Makefile.am
new file mode 100644
index 0000000..484f5ca
--- /dev/null
+++ b/chronojump_server/Makefile.am
@@ -0,0 +1,69 @@
+EXTRA_DIST =
+
+
+##########chronojumpServer.dll##########
+
+ASSEMBLY_COMPILER_COMMAND = $(GMCS)
+ASSEMBLY_COMPILER_FLAGS =  -noconfig -unsafe -codepage:utf8 -warn:4 -optimize+
+ASSEMBLY = bin/chronojumpServer.dll
+ASSEMBLY_MDB = $(ASSEMBLY).mdb
+COMPILE_TARGET = library
+BUILD_DIR = bin/
+
+RESGEN=resgen2
+
+SERVER=server
+	
+#all: $(ASSEMBLY) $(SERVER)
+all: $(ASSEMBLY)
+
+
+FILES = \
+	chronojumpServerCSharp.cs\
+	BCrypt.cs\
+	../src/sqlite/*.cs\
+	../src/util.cs\
+	../src/person.cs\
+	../src/event.cs\
+	../src/jump.cs\
+	../src/run.cs\
+	../src/pulse.cs\
+	../src/reactionTime.cs\
+	../src/session.cs\
+	../src/eventType.cs\
+	../src/jumpType.cs\
+	../src/runType.cs\
+	../src/pulseType.cs\
+	../src/constants.cs\
+ 	../src/multiChronopic.cs\
+	../src/sport.cs\
+ 	../src/log.cs\
+	../src/serverPing.cs\
+	../src/serverEvaluator.cs
+	
+
+
+REFERENCES =  \
+	System\
+	System.Data\
+	Mono.Data.Sqlite\
+	System.Web.Services\
+	Mono.Posix
+	
+DLL_REFERENCES = 
+
+CLEANFILES = $(PROGRAMFILES) 
+
+include $(top_srcdir)/Makefile.include
+
+$(eval $(call emit_resgen_targets))
+$(build_xamlg_list): %.xaml.g.cs: %.xaml
+	xamlg '$<'
+
+$(ASSEMBLY) $(ASSEMBLY_MDB): $(build_sources) $(build_resources) $(build_datafiles) $(DLL_REFERENCES) $(PROJECT_REFERENCES) $(build_xamlg_list) $(build_satellite_assembly_list)
+	mkdir -p $(shell dirname $(ASSEMBLY))
+	$(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref)
+
+
+
+
diff --git a/chronopic-tests/Makefile.am b/chronopic-tests/Makefile.am
new file mode 100644
index 0000000..2229e1a
--- /dev/null
+++ b/chronopic-tests/Makefile.am
@@ -0,0 +1,45 @@
+EXTRA_DIST =
+
+##########libchronopic.so##########
+
+AM_CPPFLAGS = \
+	-DPACKAGE_SRC_DIR=\""$(srcdir)"\" \
+	-DPACKAGE_DATA_DIR=\""$(datadir)"\" 
+
+AM_CFLAGS =\
+	 -Wall\
+	 -g
+
+lib_LTLIBRARIES = \
+	libchronopic.la
+
+libchronopic_la_SOURCES = \
+	chronopic.h\
+	chronopic.c
+
+
+##########Test Accuracy##########
+
+bin_PROGRAMS=test-accuracy
+test_accuracy_SOURCES=test-precision.c
+test_accuracy_LDADD=libchronopic.la
+
+##########Test Jumps##########
+
+bin_PROGRAMS+=test-jumps
+test_jumps_SOURCES=test-saltos.c
+test_jumps_LDADD=libchronopic.la
+
+##########Test Stream##########
+
+bin_PROGRAMS+=test-stream
+test_stream_SOURCES=test-tramas.c termansi.h termansi.c
+test_stream_LDADD=libchronopic.la
+
+
+
+
+
+
+
+
diff --git a/chronopic-tests/Makefile b/chronopic-tests/Makefile.old
similarity index 100%
rename from chronopic-tests/Makefile
rename to chronopic-tests/Makefile.old
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..ed2958a
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,72 @@
+dnl Warning: This is an automatically generated file, do not edit!
+dnl Process this file with autoconf to produce a configure script.
+AC_PREREQ([2.54])
+AC_INIT([chronojump], [0.8.9.5])
+AM_INIT_AUTOMAKE([foreign])
+
+AC_CONFIG_MACRO_DIR([m4])
+
+AM_PROG_LIBTOOL
+
+dnl pkg-config
+AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+if test "x$PKG_CONFIG" = "xno"; then
+        AC_MSG_ERROR([You need to install pkg-config])
+fi
+
+AC_PROG_INSTALL
+
+AC_PATH_PROG(MCS, gmcs, no)
+if test "x$MCS" = "xno"; then
+       	AC_PATH_PROG(MCS2, gmcs2,no)
+	if test "x$MCS2" = "xno"; then
+		AC_MSG_ERROR([gmcs Not found])
+	else 
+		AC_SUBST(GMCS,[gmcs2])	
+	fi
+	
+else 
+	AC_SUBST(GMCS,[gmcs])
+fi
+
+
+AC_ARG_ENABLE(debug,
+	AC_HELP_STRING([--enable-debug],
+		[Use 'DEBUG' Configuration [default=NO]]),
+		enable_debug=yes, enable_debug=no)
+AM_CONDITIONAL(ENABLE_DEBUG, test x$enable_debug = xyes)
+if test "x$enable_debug" = "xyes" ; then
+	CONFIG_REQUESTED="yes"
+fi
+AC_ARG_ENABLE(release,
+	AC_HELP_STRING([--enable-release],
+		[Use 'RELEASE' Configuration [default=YES]]),
+		enable_release=yes, enable_release=no)
+AM_CONDITIONAL(ENABLE_RELEASE, test x$enable_release = xyes)
+if test "x$enable_release" = "xyes" ; then
+	CONFIG_REQUESTED="yes"
+fi
+if test -z "$CONFIG_REQUESTED" ; then
+	AM_CONDITIONAL(ENABLE_RELEASE, true)
+	enable_release=yes
+fi
+
+
+dnl package checks, common for all configs
+PKG_CHECK_MODULES([GLIB_SHARP_20], [glib-sharp-2.0])
+PKG_CHECK_MODULES([GTK_SHARP_20], [gtk-sharp-2.0])
+PKG_CHECK_MODULES([GLADE_SHARP_20], [glade-sharp-2.0])
+
+
+AC_CONFIG_FILES([
+Makefile
+chronopic-tests/Makefile
+src/Makefile
+po/Makefile
+chronojump_server/Makefile
+src/chronojump
+src/chronojump_mini
+src/chronojump.desktop
+])
+
+AC_OUTPUT
diff --git a/po/Makefile.am b/po/Makefile.am
new file mode 100644
index 0000000..2229e1a
--- /dev/null
+++ b/po/Makefile.am
@@ -0,0 +1,45 @@
+EXTRA_DIST =
+
+##########libchronopic.so##########
+
+AM_CPPFLAGS = \
+	-DPACKAGE_SRC_DIR=\""$(srcdir)"\" \
+	-DPACKAGE_DATA_DIR=\""$(datadir)"\" 
+
+AM_CFLAGS =\
+	 -Wall\
+	 -g
+
+lib_LTLIBRARIES = \
+	libchronopic.la
+
+libchronopic_la_SOURCES = \
+	chronopic.h\
+	chronopic.c
+
+
+##########Test Accuracy##########
+
+bin_PROGRAMS=test-accuracy
+test_accuracy_SOURCES=test-precision.c
+test_accuracy_LDADD=libchronopic.la
+
+##########Test Jumps##########
+
+bin_PROGRAMS+=test-jumps
+test_jumps_SOURCES=test-saltos.c
+test_jumps_LDADD=libchronopic.la
+
+##########Test Stream##########
+
+bin_PROGRAMS+=test-stream
+test_stream_SOURCES=test-tramas.c termansi.h termansi.c
+test_stream_LDADD=libchronopic.la
+
+
+
+
+
+
+
+
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..065b9ed
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,358 @@
+
+EXTRA_DIST =  chronojump_mini.cs
+
+
+if ENABLE_DEBUG
+ASSEMBLY_COMPILER_COMMAND = $(GMCS)
+ASSEMBLY_COMPILER_FLAGS =  -noconfig -codepage:utf8 -warn:4 -nowarn:169,649 -optimize+ -debug -define:DEBUG 
+ASSEMBLY = bin/Debug/Chronojump.exe
+ASSEMBLY_MDB = $(ASSEMBLY).mdb
+COMPILE_TARGET = exe
+BUILD_DIR = bin/Debug
+CHRONOJUMP_EXE_MDB_SOURCE=bin/Debug/Chronojump.exe.mdb
+CHRONOJUMP_MINI_EXE=bin/Debug/Chronojump_Mini.exe
+endif
+
+if ENABLE_RELEASE
+ASSEMBLY_COMPILER_COMMAND = $(GMCS)
+ASSEMBLY_COMPILER_FLAGS =  -noconfig -codepage:utf8 -warn:4 -nowarn:169,649 -optimize+ 
+ASSEMBLY = bin/Release/Chronojump.exe
+ASSEMBLY_MDB = 
+COMPILE_TARGET = exe
+BUILD_DIR = bin/Release
+CHRONOJUMP_EXE_MDB_SOURCE=
+CHRONOJUMP_MINI_EXE=bin/Release/Chronojump_Mini.exe
+endif
+
+AL=al2
+SATELLITE_ASSEMBLY_NAME=$(notdir $(basename $(ASSEMBLY))).resources.dll
+
+COMMONAPPLICATIONDATAROOT_IMAGES = 
+ 
+
+PROGRAMFILES = \
+	$(CHRONOJUMP_MINI_EXE)\
+	$(NPLOT_DLL)\
+	$(NPLOT_DLL_CONFIG)\
+	$(NPLOT_GTK_DLL)\
+	$(NPLOT_GTK_DLL_CONFIG)
+
+
+
+LINUX_DESKTOPAPPLICATIONS = \
+	$(CHRONOJUMP_DESKTOP) 
+
+COMMONAPPLICATIONDATAROOT_LOGO = \
+	$(CHRONOJUMP_LOGO)
+
+BINARIES = \
+	$(CHRONOJUMP)\
+	$(CHRONOJUMP_MINI)
+
+	 
+
+
+RESGEN=resgen2
+	
+all: $(ASSEMBLY) $(COMMONAPPLICATIONDATAROOT_IMAGES) $(COMMONAPPLICATIONDATAROOT_LOGO) $(PROGRAMFILES) $(LINUX_DESKTOPAPPLICATIONS) $(BINARIES) 
+
+FILES = \
+	gui/chronojump.cs\
+	gui/confirm.cs\
+	gui/error.cs\
+	gui/eventExecute.cs\
+ 	gui/eventGraphConfigure.cs\
+ 	gui/event.cs\
+ 	gui/jump.cs\
+ 	gui/jumpType.cs\
+ 	gui/run.cs\
+ 	gui/runType.cs\
+ 	gui/reactionTime.cs\
+ 	gui/pulse.cs\
+ 	gui/multiChronopic.cs\
+ 	gui/person.cs\
+ 	gui/preferences.cs\
+ 	gui/session.cs\
+ 	gui/stats.cs\
+	gui/report.cs\
+	gui/about.cs\
+	gui/helpPorts.cs\
+	gui/dialogMessage.cs\
+ 	gui/dialogCalendar.cs\
+	gui/dialogImageTest.cs\
+ 	gui/language.cs\
+	gui/repetitiveConditions.cs\
+	gui/chronopicConnection.cs\
+	gui/convertWeight.cs\
+ 	gui/genericWindow.cs\
+ 	gui/splash.cs\
+	gui/server.cs\
+	gui/dialogServerStats.cs\
+ 	gui/evaluator.cs\
+	statType.cs\
+	stats/main.cs\
+	stats/global.cs\
+	stats/sjCmjAbk.cs\
+ 	stats/sjCmjAbkPlus.cs\
+ 	stats/djIndex.cs\
+ 	stats/djQ.cs\
+ 	stats/rjIndex.cs\
+ 	stats/rjPotencyBosco.cs\
+ 	stats/rjEvolution.cs\
+ 	stats/ieIub.cs\
+ 	stats/fv.cs\
+ 	stats/potency.cs\
+ 	stats/rjAVGSD.cs\
+	stats/graphs/graphData.cs\
+ 	stats/graphs/graphSerie.cs\
+ 	stats/graphs/global.cs\
+ 	stats/graphs/sjCmjAbk.cs\
+ 	stats/graphs/sjCmjAbkPlus.cs\
+ 	stats/graphs/djIndex.cs\
+ 	stats/graphs/djQ.cs\
+ 	stats/graphs/rjIndex.cs\
+ 	stats/graphs/rjPotencyBosco.cs\
+ 	stats/graphs/rjEvolution.cs\
+ 	stats/graphs/ieIub.cs\
+ 	stats/graphs/fv.cs\
+ 	stats/graphs/potency.cs\
+	stats/graphs/rjAVGSD.cs\
+	sqlite/main.cs\
+ 	sqlite/preferences.cs\
+ 	sqlite/person.cs\
+ 	sqlite/session.cs\
+ 	sqlite/jump.cs\
+ 	sqlite/jumpRj.cs\
+ 	sqlite/jumpType.cs\
+ 	sqlite/run.cs\
+ 	sqlite/runInterval.cs\
+ 	sqlite/runType.cs\
+ 	sqlite/personSession.cs\
+ 	sqlite/stat.cs\
+ 	sqlite/pulse.cs\
+ 	sqlite/pulseType.cs\
+ 	sqlite/reactionTime.cs\
+ 	sqlite/multiChronopic.cs\
+ 	sqlite/event.cs\
+ 	sqlite/sport.cs\
+ 	sqlite/speciallity.cs\
+ 	sqlite/country.cs\
+ 	sqlite/server.cs\
+	execute/event.cs\
+	execute/jump.cs\
+	execute/run.cs\
+	execute/pulse.cs\
+	execute/reactionTime.cs\
+	execute/multiChronopic.cs\
+	../chronojump_server/ChronojumpServer.cs\
+	chronojump.cs\
+ 	person.cs\
+ 	event.cs\
+ 	eventType.cs\
+ 	jump.cs\
+ 	jumpType.cs\
+	run.cs\
+ 	runType.cs\
+ 	pulse.cs\
+ 	pulseType.cs\
+ 	reactionTime.cs\
+ 	reactionTimeType.cs\
+ 	multiChronopic.cs\
+	multiChronopicType.cs\
+ 	session.cs\
+ 	exportSession.cs\
+ 	treeViewEvent.cs\
+ 	treeViewPerson.cs\
+ 	treeViewJump.cs\
+ 	treeViewRun.cs\
+ 	treeViewPulse.cs\
+ 	treeViewReactionTime.cs\
+ 	treeViewMultiChronopic.cs\
+ 	util.cs\
+	utilGtk.cs\
+	constants.cs\
+ 	report.cs\
+ 	updateProgressBar.cs\
+ 	prepareEventGraphObjects.cs\
+ 	sport.cs\
+ 	log.cs\
+ 	serverPing.cs\
+ 	serverEvaluator.cs\
+ 	server.cs\
+	chronopic.cs
+
+CHRONOJUMP_MINI_FILES=\
+	chronojump_mini.cs\
+	chronopic.cs\
+	util.cs\
+	log.cs\
+	constants.cs
+
+
+
+#CHRONOJUMP_MINI_VALIDATE_FILES=
+
+
+DATA_FILES = 
+
+RESOURCES = \
+	../glade/chronojump.glade\
+	../images/mini/no_image.png,mini/no_image.png \
+	../images/agility_505.png,agility_505.png\
+	../images/mini/agility_505.png,mini/agility_505.png \
+	../images/agility_20yard.png,agility_20yard.png\
+	../images/mini/agility_20yard.png,mini/agility_20yard.png \
+	../images/agility_illinois.png,agility_illinois.png\
+ 	../images/mini/agility_illinois.png,mini/agility_illinois.png \
+	../images/agility_shuttle.png,agility_shuttle.png\
+ 	../images/mini/agility_shuttle.png,mini/agility_shuttle.png \
+	../images/agility_zigzag.png,agility_zigzag.png\
+	../images/mini/agility_zigzag.png,mini/agility_zigzag.png \
+	../images/jump_free.png,jump_free.png\
+	../images/mini/jump_free.png,mini/jump_free.png \
+	../images/jump_sj.png,jump_sj.png\
+	../images/mini/jump_sj.png,mini/jump_sj.png \
+	../images/jump_sj_l.png,jump_sj_l.png\
+	../images/mini/jump_sj_l.png,mini/jump_sj_l.png \
+	../images/jump_cmj.png,jump_cmj.png\
+	../images/mini/jump_cmj.png,mini/jump_cmj.png \
+	../images/jump_cmj_l.png,jump_cmj_l.png\
+	../images/mini/jump_cmj_l.png,mini/jump_cmj_l.png \
+	../images/jump_abk.png,jump_abk.png\
+	../images/mini/jump_abk.png,mini/jump_abk.png \
+	../images/jump_abk_l.png,jump_abk_l.png\
+	../images/mini/jump_abk_l.png,mini/jump_abk_l.png \
+	../images/jump_max.png,jump_max.png\
+	../images/mini/jump_max.png,mini/jump_max.png \
+	../images/jump_dj.png,jump_dj.png\
+	../images/mini/jump_dj.png,mini/jump_dj.png \
+	../images/jump_rocket.png,jump_rocket.png \
+	../images/mini/jump_rocket.png,mini/jump_rocket.png \
+	../images/jump_rj.png,jump_rj.png \
+	../images/mini/jump_rj.png,mini/jump_rj.png \
+	../images/jump_rj_in.png,jump_rj_in.png \
+	../images/mini/jump_rj_in.png,mini/jump_rj_in.png \
+	../images/jump_rj_hexagon.png,jump_rj_hexagon.png \
+ 	../images/mini/jump_rj_hexagon.png,mini/jump_rj_hexagon.png \
+	../images/run_simple.png,run_simple.png \
+	../images/mini/run_simple.png,mini/run_simple.png \
+	../images/run_interval.png,run_interval.png \
+	../images/mini/run_interval.png,mini/run_interval.png \
+	../images/margaria.png,margaria.png\
+	../images/mini/margaria.png,mini/margaria.png \
+	../images/gesell_dbt.png,gesell_dbt.png \
+	../images/mini/gesell_dbt.png,mini/gesell_dbt.png \
+	../images/multiChronopic.png,multiChronopic.png	\
+	../images/mini/multiChronopic.png,mini/multiChronopic.png \
+	../images/run_analysis.png,run_analysis.png \
+	../images/mini/run_analysis.png,mini/run_analysis.png \
+	../images/pulse_free.png,pulse_free.png \
+	../images/mini/pulse_free.png,mini/pulse_free.png \
+	../images/pulse_custom.png,pulse_custom.png \
+	../images/mini/pulse_custom.png,mini/pulse_custom.png \
+	../images/reaction_time.png,reaction_time.png \
+	../images/mini/reaction_time.png,mini/reaction_time.png \
+	../images/mtgug.png,mtgug.png	\
+	../images/mini/mtgug.png,mini/mtgug.png \
+	../images/take_off.png,take_off.png \
+	../images/mini/take_off.png,mini/take_off.png \
+	../images/chronopic1.jpg,chronopic1.jpg	\
+	../images/mini/chronopic1.jpg,mini/chronopic1.jpg \
+	../images/chronopic2.jpg,chronopic2.jpg \
+	../images/mini/chronopic2.jpg,mini/chronopic2.jpg \
+	../images/chronopic3.jpg,chronopic3.jpg	\
+	../images/mini/chronopic3.jpg,mini/chronopic3.jpg \
+	../images/modular_platform_with_chronopic.jpg,modular_platform_with_chronopic.jpg \
+	../images/mini/modular_platform_with_chronopic.jpg,mini/modular_platform_with_chronopic.jpg \
+	../images/plataforma_contactos.jpg,plataforma_contactos.jpg\
+	../images/mini/plataforma_contactos.jpg,mini/plataforma_contactos.jpg \
+	../images/infrared.jpg,infrared.jpg \
+	../images/mini/infrared.jpg,mini/infrared.jpg \
+	../images/stock_bell.png,stock_bell.png \
+	../images/stock_bell_green.png,stock_bell_green.png \
+	../images/stock_bell_red.png,stock_bell_red.png \
+	../images/audio-volume-high.png,audio-volume-high.png \
+	../images/audio-volume-muted.png,audio-volume-muted.png \
+	../images/gpm-statistics.png,gpm-statistics.png \
+	../images/stock_task-assigned.png,stock_task-assigned.png \
+	../images/preferences-system.png,preferences-system.png \
+	../images/stock_delete.png,stock_delete.png \
+	../images/chronojump_icon.png,chronojump_icon.png \
+	../images/chronojump_icon_graph.png,chronojump_icon_graph.png \
+	../images/gtk-zoom-fit.png,gtk-zoom-fit.png \
+	../images/gtk-zoom-in.png,gtk-zoom-in.png \
+	../images/gtk-zoom-in-with-text.png,gtk-zoom-in-with-text.png \
+	../images/chronojump_320.png,chronojump_320.png \
+	../images/calendar.png,calendar.png \
+	../images/chronojump_logo.png,chronojump_logo.png 
+
+
+EXTRAS = \
+	chronojump.in\
+	chronojump_mini.in
+
+REFERENCES =  \
+	$(GTK_SHARP_20_LIBS) \
+	$(GLIB_SHARP_20_LIBS) \
+	$(GLADE_SHARP_20_LIBS) \
+	System\
+	System.Data\
+	System.Drawing\
+	System.Web.Services\
+	System.Xml\
+	Mono.Data.Sqlite\
+	Mono.Posix
+
+
+
+DLL_REFERENCES =  \
+	../build/data/linux_dlls/NPlot.dll\
+	../build/data/linux_dlls/NPlot.Gtk.dll
+
+
+CLEANFILES = $(COMMONAPPLICATIONDATAROOT_IMAGES) $(COMMONAPPLICATIONDATAROOT_LOGO) $(PROGRAMFILES) $(LINUX_DESKTOPAPPLICATIONS) $(BINARIES) 
+
+
+include $(top_srcdir)/Makefile.include
+
+
+CHRONOJUMP_LOGO_SOURCE=../images/chronojump_icon.png
+CHRONOJUMP_LOGO=$(BUILD_DIR)/chronojump.png
+CHRONOJUMP_DESKTOP_SOURCE=chronojump.desktop
+CHRONOJUMP_DESKTOP = $(BUILD_DIR)/chronojump.desktop
+CHRONOJUMP_EXE_MDB = $(BUILD_DIR)/ChronoJump.exe.mdb
+CHRONOJUMP=$(BUILD_DIR)/chronojump
+CHRONOJUMP_MINI=$(BUILD_DIR)/chronojump_mini
+NPLOT_DLL_SOURCE=../build/data/linux_dlls/NPlot.dll
+NPLOT_GTK_DLL_SOURCE=../build/data/linux_dlls/NPlot.Gtk.dll
+NPLOT_DLL_CONFIG_SOURCE=../build/data/linux_dlls/NPlot.dll.config
+NPLOT_GTK_DLL_CONFIG_SOURCE=../build/data/linux_dlls/NPlot.Gtk.dll.config
+NPLOT_DLL=$(BUILD_DIR)/NPlot.dll
+NPLOT_GTK_DLL=$(BUILD_DIR)/NPlot.Gtk.dll
+NPLOT_DLL_CONFIG=$(BUILD_DIR)/NPlot.dll.config
+NPLOT_GTK_DLL_CONFIG=$(BUILD_DIR)/NPlot.Gtk.dll.config
+
+$(eval $(call emit-deploy-wrapper,CHRONOJUMP,chronojump,x))
+$(eval $(call emit-deploy-wrapper,CHRONOJUMP_MINI,chronojump_mini,x))
+$(eval $(call emit-deploy-target,CHRONOJUMP_DESKTOP))
+$(eval $(call emit-deploy-target,CHRONOJUMP_LOGO))
+$(eval $(call emit-deploy-target,NPLOT_DLL))
+$(eval $(call emit-deploy-target,NPLOT_GTK_DLL))
+$(eval $(call emit-deploy-target,NPLOT_DLL_CONFIG))
+$(eval $(call emit-deploy-target,NPLOT_GTK_DLL_CONFIG))
+
+
+
+
+$(eval $(call emit_resgen_targets))
+$(build_xamlg_list): %.xaml.g.cs: %.xaml
+	xamlg '$<'
+
+$(ASSEMBLY) $(ASSEMBLY_MDB): $(build_sources) $(build_resources) $(build_datafiles) $(DLL_REFERENCES) $(PROJECT_REFERENCES) $(build_xamlg_list) $(build_satellite_assembly_list)
+	mkdir -p $(shell dirname $(ASSEMBLY))
+	$(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref)
+
+
+$(CHRONOJUMP_MINI_EXE):
+	$(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) $(CHRONOJUMP_MINI_FILES) -out:$(CHRONOJUMP_MINI_EXE) -target:$(COMPILE_TARGET) -r:Mono.Posix -r:System
+
diff --git a/src/chronojump.cs b/src/chronojump.cs
index adef3ad..e32f8e7 100644
--- a/src/chronojump.cs
+++ b/src/chronojump.cs
@@ -35,8 +35,10 @@ public class ChronoJump
 	SplashWindow splashWin;
 	
 	private static string progVersion = ""; //now in "version" file
-	private static string progName = "Chronojump";
+	private static string progName = "Chronojump";
 	
+	private static string runningFolder;	
+
 	private string runningFileName; //useful for knowing if there are two chronojump instances
 	private string messageToShowOnBoot = "";
 	private string messageChrashedBefore = "";
@@ -79,9 +81,15 @@ public class ChronoJump
 		if(args.Length > 0 && args[0] == "createBlankDBServer") {
 			createBlankDBServer();
 			Environment.Exit(1);
-		}
-		
-		Catalog.Init ("chronojump", "./locale");
+		}
+		
+		runningFolder = System.AppDomain.CurrentDomain.BaseDirectory;
+
+		if (Environment.OSVersion.Platform == PlatformID.Win32NT)		
+			Catalog.Init("chronojump",System.IO.Path.Combine(runningFolder,"../share/locale"));
+		else
+			Catalog.Init("chronojump",System.IO.Path.Combine(runningFolder,"../../share/locale"));
+			
 			
 		new ChronoJump(args);
 	}
diff --git a/src/chronojump.desktop.in b/src/chronojump.desktop.in
new file mode 100755
index 0000000..0404088
--- /dev/null
+++ b/src/chronojump.desktop.in
@@ -0,0 +1,11 @@
+
+[Desktop Entry]
+Version= VERSION@
+Encoding=UTF-8
+Name=ChronoJump
+Type=Application
+Exec=chronojump
+Terminal=false
+GenericName[es_ES]=
+Categories=Education;Sports;
+Icon= prefix@/share/icons/hicolor/48x48/apps/chronojump.png
diff --git a/src/chronojump.in b/src/chronojump.in
new file mode 100644
index 0000000..4931451
--- /dev/null
+++ b/src/chronojump.in
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec mono "@prefix@/lib/@PACKAGE_TARNAME@/Chronojump.exe" "$@"
diff --git a/src/chronojump_mini.in b/src/chronojump_mini.in
new file mode 100644
index 0000000..28fa089
--- /dev/null
+++ b/src/chronojump_mini.in
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec mono "@prefix@/lib/@PACKAGE_TARNAME@/Chronojump_Mini.exe" "$@"



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]