wgui_include_config.h

00001 // wgui_include_config.h
00002 //
00003 // An intermediate header file for including the correct config header based on the OS
00004 //
00005 //
00006 // Copyright (c) 2002-2004 Rob Wiskow
00007 // rob-dev@boxedchaos.com
00008 //
00009 // This library is free software; you can redistribute it and/or
00010 // modify it under the terms of the GNU Lesser General Public
00011 // License as published by the Free Software Foundation; either
00012 // version 2.1 of the License, or (at your option) any later version.
00013 //
00014 // This library is distributed in the hope that it will be useful,
00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00017 // Lesser General Public License for more details.
00018 //
00019 // You should have received a copy of the GNU Lesser General Public
00020 // License along with this library; if not, write to the Free Software
00021 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
00022 //
00023 
00024 
00025 #ifndef _WGUI_INCLUDE_CONFIG_H_
00026 #define _WGUI_INCLUDE_CONFIG_H_
00027 
00028 #include <string>
00029 #include <stdlib.h>
00030 #include "std_ex.h"
00031 
00032 #ifdef WIN32
00033      // For WIN32 compiling using Microsoft Visual C++
00034      #include "wgui_win32_config.h"
00035 
00036      #ifndef DEBUG
00037           // Fixes the warnings from xtree in Release builds
00038           #pragma warning (disable : 4702)
00039      #endif  // DEBUG
00040 
00041      #ifdef MSVC6
00042           // Fixes for building in MS Visual C++ 6
00043           #define min _MIN
00044           #define max _MAX
00045           #pragma warning (disable : 4786)
00046      #endif  // MSVC6
00047 
00048      #include <stdlib.h>  // needed for the getenv() function
00049      // OS specific constants
00050      static const std::wstring GLOBAL_CONFIG_PATH = stdex::ToWString(getenv("windir")).substr(0, 1) + L":\\program files\\common files\\wgui\\";
00051      static const std::wstring USER_CONFIG_PATH = stdex::ToWString(getenv("windir")).substr(0, 1) + L":\\documents and settings\\" + stdex::ToWString(getenv("USERNAME")) + L"\\application data\\wgui\\";
00052 #else  // WIN32
00053      // For builds using the GNU tools
00054      #include "wgui_config.h"
00055 
00056      // OS specific constants
00057      static const std::wstring GLOBAL_CONFIG_PATH = L"/etc/wgui/";
00058      //~ is a bash shortcut, we need to grab the environment variable
00059      static const std::wstring USER_CONFIG_PATH = stdex::ToWString(getenv("HOME")) + L"/.wgui/";
00060 #endif  // WIN32
00061 
00062 #endif  // _WGUI_INCLUDE_CONFIG_H_

Generated on Wed May 16 23:11:26 2007 for wGui by  doxygen 1.5.1