//------------------------------------------------------------------------------
// emInstallInfo.h
//
// Copyright (C) 2006-2008 Oliver Hamann.
//
// Homepage: http://eaglemode.sourceforge.net/
//
// This program is free software: you can redistribute it and/or modify it under
// the terms of the GNU General Public License version 3 as published by the
// Free Software Foundation.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License version 3 for
// more details.
//
// You should have received a copy of the GNU General Public License version 3
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//------------------------------------------------------------------------------

#ifndef emInstallInfo_h
#define emInstallInfo_h

#ifndef emStd2_h
#include <emCore/emStd2.h>
#endif


enum emInstallDirType {
	EM_IDT_BIN        = 0,
	EM_IDT_INCLUDE    = 1,
	EM_IDT_LIB        = 2,
	EM_IDT_HTML_DOC   = 3,
	EM_IDT_PS_DOC     = 4,
	EM_IDT_USER_CONFIG= 5,
	EM_IDT_HOST_CONFIG= 6,
	EM_IDT_TMP        = 7,
	EM_IDT_RES        = 8,
	EM_IDT_HOME       = 9,
	EM_NUMBER_OF_IDTS =10
};

emString emGetInstallPath(emInstallDirType idt, const char * prj,
                          const char * subPath=NULL);
	// Get the installation path of a file or directory.
	// Arguments:
	//   idt     - Type of installation directory.
	//   prj     - Name of the sub-project. Currently this is ignored for
	//             some install dir types, but that could change in the
	//             future, so please always set prj best possible.
	//   subPath - A sub-path to be appended, or NULL.
	// Returns: The installation path.
	//
	// The following table should make things clearer:
	//
	// Install Dir Type   | Current Implementation | A Future Example
	// -------------------+------------------------+------------------------
	// EM_IDT_BIN         | <em>/bin               | /usr/bin
	// EM_IDT_INCLUDE     | <em>/include/<prj>     | /usr/include/<prj>
	// EM_IDT_LIB         | <em>/lib               | /usr/lib
	// EM_IDT_HTML_DOC    | <em>/doc/html          | /usr/share/doc/em/<prj>/html
	// EM_IDT_PS_DOC      | <em>/doc/ps            | /usr/share/doc/em/<prj>/ps
	// EM_IDT_USER_CONFIG | <home>/.eaglemode/<prj>| <home>/.em/<prj>
	// EM_IDT_HOST_CONFIG | <em>/etc/<prj>         | /etc/em/<prj>
	// EM_IDT_TMP         | /tmp                   | /tmp
	// EM_IDT_RES         | <em>/res/<prj>         | /usr/share/emRes/<prj>
	// EM_IDT_HOME        | <home>                 | <home>
	// Hint: The implementation for Windows is a little bit different.


#endif
