diff options
author | ChrisTX <xpipe@hotmail.de> | 2012-09-23 12:30:30 +0200 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2012-10-04 15:14:04 +0200 |
commit | c2f7fc047c2e5bbb899c820590ce07fee593b28f (patch) | |
tree | dca97896004c71a484d6dd189e78e40732a5f041 /win | |
parent | 6f5414e1bf63228471e078f29a5889f44e598a8c (diff) |
Replace hardcoded paths with configurable ones
This patchset aims to ease the packaging of InspIRCd for a system-wide installation scenario.
Changes in detail:
configure: Add the options --log-path and --data-path
m_ssl_gnutls, openssl: Change the hardcoded "conf/" to the existent CONFIG_PATH macro
m_xline_db: Make the location of xline.db configurable. It will use --data-path as default value, but this can be
changed using the configuration files.
Diffstat (limited to 'win')
-rw-r--r-- | win/configure.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/win/configure.cpp b/win/configure.cpp index e7ae75691..3a2e684ef 100644 --- a/win/configure.cpp +++ b/win/configure.cpp @@ -301,6 +301,7 @@ void Run() string base_path = get_string_option("In what directory do you wish to install the InspIRCd base?", ".."); string config_path = get_string_option("In what directory are the configuration files?", "conf"); string mod_path = get_string_option("In what directory are the modules to be compiled to?", "modules"); + string data_path = get_string_option("In what directory is the variable data to be placed in?", "data"); string bin_dir = get_string_option("In what directory is the IRCd binary to be placed?", "."); printf_c("\n\033[1;32mPre-build configuration is complete!\n\n"); sc(TNORMAL); @@ -311,6 +312,7 @@ void Run() printf_c("\033[0mBase install path:\033[1;32m %s\n", base_path.c_str()); printf_c("\033[0mConfig path:\033[1;32m %s\n", config_path.c_str()); printf_c("\033[0mModule path:\033[1;32m %s\n", mod_path.c_str()); + printf_c("\033[0mData path:\033[1;32m %s\n", data_path.c_str()); printf_c("\033[0mSocket Engine:\033[1;32m %s\n", "select"); printf("\n"); sc(TNORMAL); @@ -322,6 +324,7 @@ void Run() printf("\n"); // escape the pathes + escape_string(data_path); escape_string(config_path); escape_string(mod_path); @@ -333,6 +336,7 @@ void Run() fprintf(f, "#define CONFIG_PATH \"%s\"\n", config_path.c_str()); fprintf(f, "#define MOD_PATH \"%s\"\n", mod_path.c_str()); + fprintf(f, "#define DATA_PATH \"%s\"\n", data_path.c_str()); fprintf(f, "#define SOMAXCONN_S \"128\"\n"); fprintf(f, "#define MAXBUF 514\n"); |