[chronojump] Add docs to autototools
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [chronojump] Add docs to autototools
- Date: Thu, 13 Aug 2009 13:43:07 +0000 (UTC)
commit ca01b4af390d839230f990fa4b3b2eb586baa9fb
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Thu Aug 13 15:38:19 2009 +0200
Add docs to autototools
src/chronojump.cs: Use the new GetPrefixDir() method
src/util.cs: New Method GetPrefixDir() to get the installation path
Makefile.am | 4 ++--
configure.ac | 1 +
manual/Makefile.am | 1 +
src/chronojump.cs | 9 ++-------
src/util.cs | 14 +++++++++++---
5 files changed, 17 insertions(+), 12 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index f10cdad..7716c29 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,8 +6,8 @@ EXTRA_DIST = build/data/linux_dlls/NPlot.dll\
ACLOCAL_AMFLAGS = -I m4
if ENABLE_DEBUG
- SUBDIRS = chronojump_server chronopic-tests po src
+ SUBDIRS = chronojump_server chronopic-tests src po manual
endif
if ENABLE_RELEASE
- SUBDIRS = chronojump_server chronopic-tests po src
+ SUBDIRS = chronojump_server chronopic-tests src po manual
endif
diff --git a/configure.ac b/configure.ac
index ed2958a..dd9a7f4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -64,6 +64,7 @@ chronopic-tests/Makefile
src/Makefile
po/Makefile
chronojump_server/Makefile
+manual/Makefile
src/chronojump
src/chronojump_mini
src/chronojump.desktop
diff --git a/manual/Makefile.am b/manual/Makefile.am
new file mode 100644
index 0000000..78aedf0
--- /dev/null
+++ b/manual/Makefile.am
@@ -0,0 +1 @@
+dist_doc_DATA=chronojump_manual_es.pdf
diff --git a/src/chronojump.cs b/src/chronojump.cs
index fdaef38..d56c2ea 100644
--- a/src/chronojump.cs
+++ b/src/chronojump.cs
@@ -84,13 +84,8 @@ public class ChronoJump
Environment.Exit(1);
}
- 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"));
-
+ Catalog.Init("chronojump",System.IO.Path.Combine(Util.GetPrefixDir(),"share/locale"));
+
new ChronoJump(args);
}
diff --git a/src/util.cs b/src/util.cs
index e95b572..ee62568 100644
--- a/src/util.cs
+++ b/src/util.cs
@@ -680,10 +680,18 @@ public class Util
public static string GetManualDir() {
//we are on:
- //Chronojump/chronojump-x.y/data/
+ //lib/chronojump/ (Unix) or bin/ (win32)
//we have to go to
- //Chronojump/chronojump-x.y/docs/
- return ".." + Path.DirectorySeparatorChar + "docs";
+ //share/doc/chronojump
+ return System.IO.Path.Combine(Util.GetPrefixDir(),"share/doc/chronojump");
+ }
+
+ public static string GetPrefixDir(){
+ string runningFolder = System.AppDomain.CurrentDomain.BaseDirectory;
+ if (Environment.OSVersion.Platform == PlatformID.Win32NT)
+ return System.IO.Path.Combine(runningFolder,"../");
+ else
+ return System.IO.Path.Combine(runningFolder,"../../");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]