/src/modules/m_ssl_gnutls.cpp
/src/modules/m_ssl_openssl.cpp
-*.ilk
-*.lib
-*.pdb
-*.exp
-*.dll
-*.exe
-/src/commands/debug
-/src/commands/release
-/src/commands/debug_x64
-/src/commands/release_x64
-/src/commands/commands.mak
-/src/modules/debug
-/src/modules/release
-/src/modules/debug_x64
-/src/modules/release_x64
-/src/modules/modules.mak
-/win/x64*
-/win/debug*
-/win/release*
-/win/*.suo
-/win/*.sdf
-/win/*.user
-/win/*.opensdf
--- /dev/null
+inspircd_version.h\r
+inspircd.rc\r
--- /dev/null
+cmake_minimum_required(VERSION 2.8)
+
+project(InspIRCd CXX)
+
+set(INSPIRCD_BASE "${CMAKE_CURRENT_SOURCE_DIR}/../")
+
+# Use our own NSIS template
+set(CMAKE_MODULE_PATH "${INSPIRCD_BASE}/win")
+
+# Grab version info from version.sh
+file(STRINGS "${INSPIRCD_BASE}/src/version.sh" VERSIONSH)
+string(REGEX REPLACE ".*InspIRCd-([0-9]*).*" "\\1" MAJOR_VERSION "${VERSIONSH}")
+string(REGEX REPLACE ".*InspIRCd-[0-9]*\\.([0-9]*).*" "\\1" MINOR_VERSION "${VERSIONSH}")
+string(REGEX REPLACE ".*InspIRCd-[0-9]*\\.[0-9]*\\.([0-9]*).*" "\\1" PATCH_VERSION "${VERSIONSH}")
+set(FULL_VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}")
+
+# Write out inspircd_version.h
+file(WRITE "${INSPIRCD_BASE}/win/inspircd_version.h" "#define BRANCH \"${MAJOR_VERSION}.${MINOR_VERSION}\"\n")
+file(APPEND "${INSPIRCD_BASE}/win/inspircd_version.h" "#define VERSION \"${FULL_VERSION}\"\n")
+file(APPEND "${INSPIRCD_BASE}/win/inspircd_version.h" "#define REVISION \"0\"\n")
+file(APPEND "${INSPIRCD_BASE}/win/inspircd_version.h" "#define SYSTEM \"${CMAKE_SYSTEM}\"\n")
+
+if(MSVC)
+ # Without /SAFESEH:NO old libraries compiled with VS 2010 or older won't link correctly to VS2012 (eg, extra module libs)
+ set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /SAFESEH:NO")
+ set(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL} /SAFESEH:NO")
+ set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /SAFESEH:NO")
+ set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO} /SAFESEH:NO")
+ set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /SAFESEH:NO")
+ set(CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL "${CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL} /SAFESEH:NO")
+ set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /SAFESEH:NO")
+ set(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO} /SAFESEH:NO")
+ set(CMAKE_MODULE_LINKER_FLAGS_DEBUG "${CMAKE_MODULE_LINKER_FLAGS_DEBUG} /SAFESEH:NO")
+ set(CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL "${CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL} /SAFESEH:NO")
+ set(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} /SAFESEH:NO")
+ set(CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO} /SAFESEH:NO")
+endif(MSVC)
+
+file(GLOB INSPIRCD_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${INSPIRCD_BASE}/win/inspircd_win32wrapper.cpp" "${INSPIRCD_BASE}/win/win32service.cpp" "${INSPIRCD_BASE}/src/*.cpp" "${INSPIRCD_BASE}/src/modes/*.cpp" "${INSPIRCD_BASE}/src/socketengines/socketengine_select.cpp")
+list(APPEND INSPIRCD_SOURCES "${INSPIRCD_BASE}/src/threadengines/threadengine_win32.cpp")
+list(SORT INSPIRCD_SOURCES)
+
+include_directories("${INSPIRCD_BASE}/win" "${INSPIRCD_BASE}/include")
+
+include_directories(${EXTRA_INCLUDES})
+link_directories(${EXTRA_LIBS})
+
+configure_file("${INSPIRCD_BASE}/win/inspircd.rc.cmake" "${INSPIRCD_BASE}/win/inspircd.rc")
+add_executable(inspircd ${INSPIRCD_SOURCES} "${INSPIRCD_BASE}/win/inspircd.rc")
+set_target_properties(inspircd PROPERTIES ENABLE_EXPORTS ON)
+install(TARGETS inspircd DESTINATION .)
+
+if(MSVC)
+ add_library(win32_memory STATIC "${INSPIRCD_BASE}/win/inspircd_memory_functions.cpp")
+endif(MSVC)
+add_subdirectory(modules)
+
+# Package any DLLs in win/
+file(GLOB EXTRA_DLLS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${INSPIRCD_BASE}/win/*.dll")
+install(FILES ${EXTRA_DLLS} DESTINATION .)
+
+# Install example configs
+file(GLOB_RECURSE EXAMPLE_CONFIGS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${INSPIRCD_BASE}/docs/conf/*.example")
+install(FILES ${EXAMPLE_CONFIGS} DESTINATION conf)
+
+# Create an empty data and logs directory and install them
+file(MAKE_DIRECTORY data)
+install(DIRECTORY "data" DESTINATION .)
+file(MAKE_DIRECTORY logs)
+install(DIRECTORY "logs" DESTINATION .)
+
+if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
+ include(InstallRequiredSystemLibraries)
+
+ set(CPACK_PACKAGE_NAME "InspIRCd IRC Daemon")
+ set(CPACK_PACKAGE_VENDOR "InspIRCd Development Team")
+ set(CPACK_PACKAGE_VERSION_MAJOR ${MAJOR_VERSION})
+ set(CPACK_PACKAGE_VERSION_MINOR ${MINOR_VERSION})
+ set(CPACK_PACKAGE_VERSION_PATCH ${PATCH_VERSION})
+ set(CPACK_PACKAGE_FILE_NAME "InspIRCd-${FULL_VERSION}")
+ set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/../docs/COPYING")
+
+ set(CPACK_GENERATOR "NSIS")
+ set(CPACK_PACKAGE_INSTALL_DIRECTORY "InspIRCd")
+ # NSIS has a bug with full nix paths, so this must contain at least one backslash
+ set(CPACK_PACKAGE_ICON "${INSPIRCD_BASE}/win\\\\inspircd.ico")
+ set(CPACK_NSIS_MUI_ICON "${INSPIRCD_BASE}/win\\\\inspircd.ico")
+ set(CPACK_NSIS_MUI_UNIICON "${INSPIRCD_BASE}/win\\\\inspircd.ico")
+ set(CPACK_NSIS_INSTALLED_ICON_NAME "inspircd.exe")
+ set(CPACK_NSIS_URL_INFO_ABOUT "http://www.inspircd.org/")
+ set(CPACK_NSIS_COMPRESSOR "/SOLID lzma")
+
+ include(CPack)
+endif(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
--- /dev/null
+; CPack install script designed for a nmake build\r
+\r
+;--------------------------------\r
+; You must define these values\r
+\r
+ !define VERSION "@CPACK_PACKAGE_VERSION@"\r
+ !define PATCH "@CPACK_PACKAGE_VERSION_PATCH@"\r
+ !define INST_DIR "@CPACK_TEMPORARY_DIRECTORY@"\r
+\r
+;--------------------------------\r
+;Variables\r
+\r
+ Var MUI_TEMP\r
+ Var STARTMENU_FOLDER\r
+ Var SV_ALLUSERS\r
+ Var START_MENU\r
+ Var DO_NOT_ADD_TO_PATH\r
+ Var ADD_TO_PATH_ALL_USERS\r
+ Var ADD_TO_PATH_CURRENT_USER\r
+ Var INSTALL_DESKTOP\r
+ Var IS_DEFAULT_INSTALLDIR\r
+;--------------------------------\r
+;Include Modern UI\r
+\r
+ !include "MUI.nsh"\r
+\r
+ ;Default installation folder\r
+ InstallDir "@CPACK_NSIS_INSTALL_ROOT@\@CPACK_PACKAGE_INSTALL_DIRECTORY@"\r
+\r
+;--------------------------------\r
+;General\r
+\r
+ ;Name and file\r
+ Name "@CPACK_NSIS_PACKAGE_NAME@"\r
+ OutFile "@CPACK_TOPLEVEL_DIRECTORY@/@CPACK_OUTPUT_FILE_NAME@"\r
+\r
+ ;Set compression\r
+ SetCompressor @CPACK_NSIS_COMPRESSOR@\r
+\r
+@CPACK_NSIS_DEFINES@ \r
+\r
+ !include Sections.nsh\r
+\r
+;--- Component support macros: ---\r
+; The code for the add/remove functionality is from:\r
+; http://nsis.sourceforge.net/Add/Remove_Functionality\r
+; It has been modified slightly and extended to provide\r
+; inter-component dependencies.\r
+Var AR_SecFlags\r
+Var AR_RegFlags\r
+@CPACK_NSIS_SECTION_SELECTED_VARS@\r
+\r
+; Loads the "selected" flag for the section named SecName into the\r
+; variable VarName.\r
+!macro LoadSectionSelectedIntoVar SecName VarName\r
+ SectionGetFlags ${${SecName}} $${VarName}\r
+ IntOp $${VarName} $${VarName} & ${SF_SELECTED} ;Turn off all other bits\r
+!macroend\r
+\r
+; Loads the value of a variable... can we get around this?\r
+!macro LoadVar VarName\r
+ IntOp $R0 0 + $${VarName}\r
+!macroend\r
+\r
+; Sets the value of a variable\r
+!macro StoreVar VarName IntValue\r
+ IntOp $${VarName} 0 + ${IntValue}\r
+!macroend\r
+\r
+!macro InitSection SecName\r
+ ; This macro reads component installed flag from the registry and\r
+ ;changes checked state of the section on the components page.\r
+ ;Input: section index constant name specified in Section command.\r
+ \r
+ ClearErrors\r
+ ;Reading component status from registry\r
+ ReadRegDWORD $AR_RegFlags HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@\Components\${SecName}" "Installed"\r
+ IfErrors "default_${SecName}"\r
+ ;Status will stay default if registry value not found\r
+ ;(component was never installed)\r
+ IntOp $AR_RegFlags $AR_RegFlags & ${SF_SELECTED} ;Turn off all other bits\r
+ SectionGetFlags ${${SecName}} $AR_SecFlags ;Reading default section flags\r
+ IntOp $AR_SecFlags $AR_SecFlags & 0xFFFE ;Turn lowest (enabled) bit off\r
+ IntOp $AR_SecFlags $AR_RegFlags | $AR_SecFlags ;Change lowest bit\r
+\r
+ ; Note whether this component was installed before\r
+ !insertmacro StoreVar ${SecName}_was_installed $AR_RegFlags\r
+ IntOp $R0 $AR_RegFlags & $AR_RegFlags\r
+ \r
+ ;Writing modified flags\r
+ SectionSetFlags ${${SecName}} $AR_SecFlags\r
+ \r
+ "default_${SecName}:"\r
+ !insertmacro LoadSectionSelectedIntoVar ${SecName} ${SecName}_selected\r
+!macroend\r
+ \r
+!macro FinishSection SecName\r
+ ; This macro reads section flag set by user and removes the section\r
+ ;if it is not selected.\r
+ ;Then it writes component installed flag to registry\r
+ ;Input: section index constant name specified in Section command.\r
+ \r
+ SectionGetFlags ${${SecName}} $AR_SecFlags ;Reading section flags\r
+ ;Checking lowest bit:\r
+ IntOp $AR_SecFlags $AR_SecFlags & ${SF_SELECTED}\r
+ IntCmp $AR_SecFlags 1 "leave_${SecName}"\r
+ ;Section is not selected:\r
+ ;Calling Section uninstall macro and writing zero installed flag\r
+ !insertmacro "Remove_${${SecName}}"\r
+ WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@\Components\${SecName}" \\r
+ "Installed" 0\r
+ Goto "exit_${SecName}"\r
+ \r
+ "leave_${SecName}:"\r
+ ;Section is selected:\r
+ WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@\Components\${SecName}" \\r
+ "Installed" 1\r
+ \r
+ "exit_${SecName}:"\r
+!macroend\r
+ \r
+!macro RemoveSection SecName\r
+ ; This macro is used to call section's Remove_... macro\r
+ ;from the uninstaller.\r
+ ;Input: section index constant name specified in Section command.\r
+ \r
+ !insertmacro "Remove_${${SecName}}"\r
+!macroend\r
+\r
+; Determine whether the selection of SecName changed\r
+!macro MaybeSelectionChanged SecName\r
+ !insertmacro LoadVar ${SecName}_selected\r
+ SectionGetFlags ${${SecName}} $R1\r
+ IntOp $R1 $R1 & ${SF_SELECTED} ;Turn off all other bits\r
+ \r
+ ; See if the status has changed:\r
+ IntCmp $R0 $R1 "${SecName}_unchanged"\r
+ !insertmacro LoadSectionSelectedIntoVar ${SecName} ${SecName}_selected\r
+ \r
+ IntCmp $R1 ${SF_SELECTED} "${SecName}_was_selected"\r
+ !insertmacro "Deselect_required_by_${SecName}"\r
+ goto "${SecName}_unchanged"\r
+ \r
+ "${SecName}_was_selected:"\r
+ !insertmacro "Select_${SecName}_depends"\r
+ \r
+ "${SecName}_unchanged:"\r
+!macroend\r
+;--- End of Add/Remove macros ---\r
+\r
+;--------------------------------\r
+;Interface Settings\r
+\r
+ !define MUI_HEADERIMAGE\r
+ !define MUI_ABORTWARNING\r
+ \r
+;--------------------------------\r
+; path functions\r
+\r
+!verbose 3\r
+!include "WinMessages.NSH"\r
+!verbose 4\r
+\r
+;----------------------------------------\r
+; based upon a script of "Written by KiCHiK 2003-01-18 05:57:02"\r
+;----------------------------------------\r
+!verbose 3\r
+!include "WinMessages.NSH"\r
+!verbose 4\r
+;====================================================\r
+; get_NT_environment \r
+; Returns: the selected environment\r
+; Output : head of the stack\r
+;====================================================\r
+!macro select_NT_profile UN\r
+Function ${UN}select_NT_profile\r
+ StrCmp $ADD_TO_PATH_ALL_USERS "1" 0 environment_single\r
+ DetailPrint "Selected environment for all users"\r
+ Push "all"\r
+ Return\r
+ environment_single:\r
+ DetailPrint "Selected environment for current user only."\r
+ Push "current"\r
+ Return\r
+FunctionEnd\r
+!macroend\r
+!insertmacro select_NT_profile ""\r
+!insertmacro select_NT_profile "un."\r
+;----------------------------------------------------\r
+!define NT_current_env 'HKCU "Environment"'\r
+!define NT_all_env 'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"'\r
+\r
+!ifndef WriteEnvStr_RegKey\r
+ !ifdef ALL_USERS\r
+ !define WriteEnvStr_RegKey \\r
+ 'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"'\r
+ !else\r
+ !define WriteEnvStr_RegKey 'HKCU "Environment"'\r
+ !endif\r
+!endif\r
+ \r
+; AddToPath - Adds the given dir to the search path.\r
+; Input - head of the stack\r
+; Note - Win9x systems requires reboot\r
+ \r
+Function AddToPath\r
+ Exch $0\r
+ Push $1\r
+ Push $2\r
+ Push $3\r
+ \r
+ # don't add if the path doesn't exist\r
+ IfFileExists "$0\*.*" "" AddToPath_done\r
+ \r
+ ReadEnvStr $1 PATH\r
+ ; if the path is too long for a NSIS variable NSIS will return a 0 \r
+ ; length string. If we find that, then warn and skip any path\r
+ ; modification as it will trash the existing path.\r
+ StrLen $2 $1\r
+ IntCmp $2 0 CheckPathLength_ShowPathWarning CheckPathLength_Done CheckPathLength_Done\r
+ CheckPathLength_ShowPathWarning:\r
+ Messagebox MB_OK|MB_ICONEXCLAMATION "Warning! PATH too long installer unable to modify PATH!"\r
+ Goto AddToPath_done\r
+ CheckPathLength_Done:\r
+ Push "$1;"\r
+ Push "$0;"\r
+ Call StrStr\r
+ Pop $2\r
+ StrCmp $2 "" "" AddToPath_done\r
+ Push "$1;"\r
+ Push "$0\;"\r
+ Call StrStr\r
+ Pop $2\r
+ StrCmp $2 "" "" AddToPath_done\r
+ GetFullPathName /SHORT $3 $0\r
+ Push "$1;"\r
+ Push "$3;"\r
+ Call StrStr\r
+ Pop $2\r
+ StrCmp $2 "" "" AddToPath_done\r
+ Push "$1;"\r
+ Push "$3\;"\r
+ Call StrStr\r
+ Pop $2\r
+ StrCmp $2 "" "" AddToPath_done\r
+ \r
+ Call IsNT\r
+ Pop $1\r
+ StrCmp $1 1 AddToPath_NT\r
+ ; Not on NT\r
+ StrCpy $1 $WINDIR 2\r
+ FileOpen $1 "$1\autoexec.bat" a\r
+ FileSeek $1 -1 END\r
+ FileReadByte $1 $2\r
+ IntCmp $2 26 0 +2 +2 # DOS EOF\r
+ FileSeek $1 -1 END # write over EOF\r
+ FileWrite $1 "$\r$\nSET PATH=%PATH%;$3$\r$\n"\r
+ FileClose $1\r
+ SetRebootFlag true\r
+ Goto AddToPath_done\r
+ \r
+ AddToPath_NT:\r
+ StrCmp $ADD_TO_PATH_ALL_USERS "1" ReadAllKey\r
+ ReadRegStr $1 ${NT_current_env} "PATH"\r
+ Goto DoTrim\r
+ ReadAllKey:\r
+ ReadRegStr $1 ${NT_all_env} "PATH"\r
+ DoTrim:\r
+ StrCmp $1 "" AddToPath_NTdoIt\r
+ Push $1\r
+ Call Trim\r
+ Pop $1\r
+ StrCpy $0 "$1;$0"\r
+ AddToPath_NTdoIt:\r
+ StrCmp $ADD_TO_PATH_ALL_USERS "1" WriteAllKey\r
+ WriteRegExpandStr ${NT_current_env} "PATH" $0\r
+ Goto DoSend\r
+ WriteAllKey:\r
+ WriteRegExpandStr ${NT_all_env} "PATH" $0\r
+ DoSend:\r
+ SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000\r
+ \r
+ AddToPath_done:\r
+ Pop $3\r
+ Pop $2\r
+ Pop $1\r
+ Pop $0\r
+FunctionEnd\r
+\r
+ \r
+; RemoveFromPath - Remove a given dir from the path\r
+; Input: head of the stack\r
+ \r
+Function un.RemoveFromPath\r
+ Exch $0\r
+ Push $1\r
+ Push $2\r
+ Push $3\r
+ Push $4\r
+ Push $5\r
+ Push $6\r
+ \r
+ IntFmt $6 "%c" 26 # DOS EOF\r
+ \r
+ Call un.IsNT\r
+ Pop $1\r
+ StrCmp $1 1 unRemoveFromPath_NT\r
+ ; Not on NT\r
+ StrCpy $1 $WINDIR 2\r
+ FileOpen $1 "$1\autoexec.bat" r\r
+ GetTempFileName $4\r
+ FileOpen $2 $4 w\r
+ GetFullPathName /SHORT $0 $0\r
+ StrCpy $0 "SET PATH=%PATH%;$0"\r
+ Goto unRemoveFromPath_dosLoop\r
+ \r
+ unRemoveFromPath_dosLoop:\r
+ FileRead $1 $3\r
+ StrCpy $5 $3 1 -1 # read last char\r
+ StrCmp $5 $6 0 +2 # if DOS EOF\r
+ StrCpy $3 $3 -1 # remove DOS EOF so we can compare\r
+ StrCmp $3 "$0$\r$\n" unRemoveFromPath_dosLoopRemoveLine\r
+ StrCmp $3 "$0$\n" unRemoveFromPath_dosLoopRemoveLine\r
+ StrCmp $3 "$0" unRemoveFromPath_dosLoopRemoveLine\r
+ StrCmp $3 "" unRemoveFromPath_dosLoopEnd\r
+ FileWrite $2 $3\r
+ Goto unRemoveFromPath_dosLoop\r
+ unRemoveFromPath_dosLoopRemoveLine:\r
+ SetRebootFlag true\r
+ Goto unRemoveFromPath_dosLoop\r
+ \r
+ unRemoveFromPath_dosLoopEnd:\r
+ FileClose $2\r
+ FileClose $1\r
+ StrCpy $1 $WINDIR 2\r
+ Delete "$1\autoexec.bat"\r
+ CopyFiles /SILENT $4 "$1\autoexec.bat"\r
+ Delete $4\r
+ Goto unRemoveFromPath_done\r
+ \r
+ unRemoveFromPath_NT:\r
+ StrCmp $ADD_TO_PATH_ALL_USERS "1" unReadAllKey\r
+ ReadRegStr $1 ${NT_current_env} "PATH"\r
+ Goto unDoTrim\r
+ unReadAllKey:\r
+ ReadRegStr $1 ${NT_all_env} "PATH"\r
+ unDoTrim:\r
+ StrCpy $5 $1 1 -1 # copy last char\r
+ StrCmp $5 ";" +2 # if last char != ;\r
+ StrCpy $1 "$1;" # append ;\r
+ Push $1\r
+ Push "$0;"\r
+ Call un.StrStr ; Find `$0;` in $1\r
+ Pop $2 ; pos of our dir\r
+ StrCmp $2 "" unRemoveFromPath_done\r
+ ; else, it is in path\r
+ # $0 - path to add\r
+ # $1 - path var\r
+ StrLen $3 "$0;"\r
+ StrLen $4 $2\r
+ StrCpy $5 $1 -$4 # $5 is now the part before the path to remove\r
+ StrCpy $6 $2 "" $3 # $6 is now the part after the path to remove\r
+ StrCpy $3 $5$6\r
+ \r
+ StrCpy $5 $3 1 -1 # copy last char\r
+ StrCmp $5 ";" 0 +2 # if last char == ;\r
+ StrCpy $3 $3 -1 # remove last char\r
+ \r
+ StrCmp $ADD_TO_PATH_ALL_USERS "1" unWriteAllKey\r
+ WriteRegExpandStr ${NT_current_env} "PATH" $3\r
+ Goto unDoSend\r
+ unWriteAllKey:\r
+ WriteRegExpandStr ${NT_all_env} "PATH" $3\r
+ unDoSend:\r
+ SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000\r
+ \r
+ unRemoveFromPath_done:\r
+ Pop $6\r
+ Pop $5\r
+ Pop $4\r
+ Pop $3\r
+ Pop $2\r
+ Pop $1\r
+ Pop $0\r
+FunctionEnd\r
+ \r
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r
+; Uninstall sutff\r
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r
+\r
+###########################################\r
+# Utility Functions #\r
+###########################################\r
+ \r
+;====================================================\r
+; IsNT - Returns 1 if the current system is NT, 0\r
+; otherwise.\r
+; Output: head of the stack\r
+;====================================================\r
+; IsNT\r
+; no input\r
+; output, top of the stack = 1 if NT or 0 if not\r
+;\r
+; Usage:\r
+; Call IsNT\r
+; Pop $R0\r
+; ($R0 at this point is 1 or 0)\r
+ \r
+!macro IsNT un\r
+Function ${un}IsNT\r
+ Push $0\r
+ ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion\r
+ StrCmp $0 "" 0 IsNT_yes\r
+ ; we are not NT.\r
+ Pop $0\r
+ Push 0\r
+ Return\r
+ \r
+ IsNT_yes:\r
+ ; NT!!!\r
+ Pop $0\r
+ Push 1\r
+FunctionEnd\r
+!macroend\r
+!insertmacro IsNT ""\r
+!insertmacro IsNT "un."\r
+ \r
+; StrStr\r
+; input, top of stack = string to search for\r
+; top of stack-1 = string to search in\r
+; output, top of stack (replaces with the portion of the string remaining)\r
+; modifies no other variables.\r
+;\r
+; Usage:\r
+; Push "this is a long ass string"\r
+; Push "ass"\r
+; Call StrStr\r
+; Pop $R0\r
+; ($R0 at this point is "ass string")\r
+ \r
+!macro StrStr un\r
+Function ${un}StrStr\r
+Exch $R1 ; st=haystack,old$R1, $R1=needle\r
+ Exch ; st=old$R1,haystack\r
+ Exch $R2 ; st=old$R1,old$R2, $R2=haystack\r
+ Push $R3\r
+ Push $R4\r
+ Push $R5\r
+ StrLen $R3 $R1\r
+ StrCpy $R4 0\r
+ ; $R1=needle\r
+ ; $R2=haystack\r
+ ; $R3=len(needle)\r
+ ; $R4=cnt\r
+ ; $R5=tmp\r
+ loop:\r
+ StrCpy $R5 $R2 $R3 $R4\r
+ StrCmp $R5 $R1 done\r
+ StrCmp $R5 "" done\r
+ IntOp $R4 $R4 + 1\r
+ Goto loop\r
+done:\r
+ StrCpy $R1 $R2 "" $R4\r
+ Pop $R5\r
+ Pop $R4\r
+ Pop $R3\r
+ Pop $R2\r
+ Exch $R1\r
+FunctionEnd\r
+!macroend\r
+!insertmacro StrStr ""\r
+!insertmacro StrStr "un."\r
+\r
+Function Trim ; Added by Pelaca\r
+ Exch $R1\r
+ Push $R2\r
+Loop:\r
+ StrCpy $R2 "$R1" 1 -1\r
+ StrCmp "$R2" " " RTrim\r
+ StrCmp "$R2" "$\n" RTrim\r
+ StrCmp "$R2" "$\r" RTrim\r
+ StrCmp "$R2" ";" RTrim\r
+ GoTo Done\r
+RTrim: \r
+ StrCpy $R1 "$R1" -1\r
+ Goto Loop\r
+Done:\r
+ Pop $R2\r
+ Exch $R1\r
+FunctionEnd\r
+\r
+Function ConditionalAddToRegisty\r
+ Pop $0\r
+ Pop $1\r
+ StrCmp "$0" "" ConditionalAddToRegisty_EmptyString\r
+ WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" \\r
+ "$1" "$0"\r
+ ;MessageBox MB_OK "Set Registry: '$1' to '$0'"\r
+ DetailPrint "Set install registry entry: '$1' to '$0'"\r
+ ConditionalAddToRegisty_EmptyString:\r
+FunctionEnd\r
+\r
+;--------------------------------\r
+\r
+!ifdef CPACK_USES_DOWNLOAD\r
+Function DownloadFile\r
+ IfFileExists $INSTDIR\* +2\r
+ CreateDirectory $INSTDIR\r
+ Pop $0\r
+\r
+ ; Skip if already downloaded\r
+ IfFileExists $INSTDIR\$0 0 +2\r
+ Return\r
+\r
+ StrCpy $1 "@CPACK_DOWNLOAD_SITE@"\r
+\r
+ try_again:\r
+ NSISdl::download "$1/$0" "$INSTDIR\$0"\r
+ \r
+ Pop $1\r
+ StrCmp $1 "success" success\r
+ StrCmp $1 "Cancelled" cancel\r
+ MessageBox MB_OK "Download failed: $1"\r
+ cancel:\r
+ Return\r
+ success:\r
+FunctionEnd\r
+!endif\r
+\r
+;--------------------------------\r
+; Installation types\r
+@CPACK_NSIS_INSTALLATION_TYPES@\r
+\r
+;--------------------------------\r
+; Component sections\r
+@CPACK_NSIS_COMPONENT_SECTIONS@\r
+\r
+;--------------------------------\r
+; Define some macro setting for the gui\r
+@CPACK_NSIS_INSTALLER_MUI_ICON_CODE@\r
+@CPACK_NSIS_INSTALLER_ICON_CODE@\r
+@CPACK_NSIS_INSTALLER_MUI_COMPONENTS_DESC@\r
+@CPACK_NSIS_INSTALLER_MUI_FINISHPAGE_RUN_CODE@\r
+\r
+;--------------------------------\r
+;Pages\r
+ !insertmacro MUI_PAGE_WELCOME\r
+\r
+ !insertmacro MUI_PAGE_LICENSE "@CPACK_RESOURCE_FILE_LICENSE@"\r
+ Page custom InstallOptionsPage\r
+ !insertmacro MUI_PAGE_DIRECTORY\r
+ \r
+ ;Start Menu Folder Page Configuration\r
+ !define MUI_STARTMENUPAGE_REGISTRY_ROOT "SHCTX" \r
+ !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" \r
+ !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"\r
+ !insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER\r
+\r
+ @CPACK_NSIS_PAGE_COMPONENTS@\r
+\r
+ !insertmacro MUI_PAGE_INSTFILES\r
+ !insertmacro MUI_PAGE_FINISH\r
+\r
+ !insertmacro MUI_UNPAGE_CONFIRM\r
+ !insertmacro MUI_UNPAGE_INSTFILES\r
+\r
+;--------------------------------\r
+;Languages\r
+\r
+ !insertmacro MUI_LANGUAGE "English" ;first language is the default language\r
+ !insertmacro MUI_LANGUAGE "Albanian"\r
+ !insertmacro MUI_LANGUAGE "Arabic"\r
+ !insertmacro MUI_LANGUAGE "Basque"\r
+ !insertmacro MUI_LANGUAGE "Belarusian"\r
+ !insertmacro MUI_LANGUAGE "Bosnian"\r
+ !insertmacro MUI_LANGUAGE "Breton"\r
+ !insertmacro MUI_LANGUAGE "Bulgarian"\r
+ !insertmacro MUI_LANGUAGE "Croatian"\r
+ !insertmacro MUI_LANGUAGE "Czech"\r
+ !insertmacro MUI_LANGUAGE "Danish"\r
+ !insertmacro MUI_LANGUAGE "Dutch"\r
+ !insertmacro MUI_LANGUAGE "Estonian"\r
+ !insertmacro MUI_LANGUAGE "Farsi"\r
+ !insertmacro MUI_LANGUAGE "Finnish"\r
+ !insertmacro MUI_LANGUAGE "French"\r
+ !insertmacro MUI_LANGUAGE "German"\r
+ !insertmacro MUI_LANGUAGE "Greek"\r
+ !insertmacro MUI_LANGUAGE "Hebrew"\r
+ !insertmacro MUI_LANGUAGE "Hungarian"\r
+ !insertmacro MUI_LANGUAGE "Icelandic"\r
+ !insertmacro MUI_LANGUAGE "Indonesian"\r
+ !insertmacro MUI_LANGUAGE "Irish"\r
+ !insertmacro MUI_LANGUAGE "Italian"\r
+ !insertmacro MUI_LANGUAGE "Japanese"\r
+ !insertmacro MUI_LANGUAGE "Korean"\r
+ !insertmacro MUI_LANGUAGE "Kurdish"\r
+ !insertmacro MUI_LANGUAGE "Latvian"\r
+ !insertmacro MUI_LANGUAGE "Lithuanian"\r
+ !insertmacro MUI_LANGUAGE "Luxembourgish"\r
+ !insertmacro MUI_LANGUAGE "Macedonian"\r
+ !insertmacro MUI_LANGUAGE "Malay"\r
+ !insertmacro MUI_LANGUAGE "Mongolian"\r
+ !insertmacro MUI_LANGUAGE "Norwegian"\r
+ !insertmacro MUI_LANGUAGE "Polish"\r
+ !insertmacro MUI_LANGUAGE "Portuguese"\r
+ !insertmacro MUI_LANGUAGE "PortugueseBR"\r
+ !insertmacro MUI_LANGUAGE "Romanian"\r
+ !insertmacro MUI_LANGUAGE "Russian"\r
+ !insertmacro MUI_LANGUAGE "Serbian"\r
+ !insertmacro MUI_LANGUAGE "SerbianLatin"\r
+ !insertmacro MUI_LANGUAGE "SimpChinese"\r
+ !insertmacro MUI_LANGUAGE "Slovak"\r
+ !insertmacro MUI_LANGUAGE "Slovenian"\r
+ !insertmacro MUI_LANGUAGE "Spanish"\r
+ !insertmacro MUI_LANGUAGE "Swedish"\r
+ !insertmacro MUI_LANGUAGE "Thai"\r
+ !insertmacro MUI_LANGUAGE "TradChinese"\r
+ !insertmacro MUI_LANGUAGE "Turkish"\r
+ !insertmacro MUI_LANGUAGE "Ukrainian"\r
+ !insertmacro MUI_LANGUAGE "Welsh"\r
+\r
+\r
+;--------------------------------\r
+;Reserve Files\r
+\r
+ ;These files should be inserted before other files in the data block\r
+ ;Keep these lines before any File command\r
+ ;Only for solid compression (by default, solid compression is enabled for BZIP2 and LZMA)\r
+\r
+ ReserveFile "NSIS.InstallOptions.ini"\r
+ !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS\r
+\r
+;--------------------------------\r
+;Installer Sections\r
+\r
+Section "-Core installation"\r
+ ;Use the entire tree produced by the INSTALL target. Keep the\r
+ ;list of directories here in sync with the RMDir commands below.\r
+ SetOutPath "$INSTDIR"\r
+ @CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS@\r
+ @CPACK_NSIS_FULL_INSTALL@\r
+ \r
+ ;Store installation folder\r
+ WriteRegStr SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "" $INSTDIR\r
+ \r
+ ;Create uninstaller\r
+ WriteUninstaller "$INSTDIR\Uninstall.exe"\r
+ Push "DisplayName"\r
+ Push "@CPACK_NSIS_DISPLAY_NAME@"\r
+ Call ConditionalAddToRegisty\r
+ Push "DisplayVersion"\r
+ Push "@CPACK_PACKAGE_VERSION@"\r
+ Call ConditionalAddToRegisty\r
+ Push "Publisher"\r
+ Push "@CPACK_PACKAGE_VENDOR@"\r
+ Call ConditionalAddToRegisty\r
+ Push "UninstallString"\r
+ Push "$INSTDIR\Uninstall.exe"\r
+ Call ConditionalAddToRegisty\r
+ Push "NoRepair"\r
+ Push "1"\r
+ Call ConditionalAddToRegisty\r
+ \r
+ !ifdef CPACK_NSIS_ADD_REMOVE\r
+ ;Create add/remove functionality\r
+ Push "ModifyPath"\r
+ Push "$INSTDIR\AddRemove.exe"\r
+ Call ConditionalAddToRegisty\r
+ !else\r
+ Push "NoModify"\r
+ Push "1"\r
+ Call ConditionalAddToRegisty\r
+ !endif\r
+ \r
+ ; Optional registration\r
+ Push "DisplayIcon"\r
+ Push "$INSTDIR\@CPACK_NSIS_INSTALLED_ICON_NAME@"\r
+ Call ConditionalAddToRegisty\r
+ Push "HelpLink"\r
+ Push "@CPACK_NSIS_HELP_LINK@"\r
+ Call ConditionalAddToRegisty\r
+ Push "URLInfoAbout"\r
+ Push "@CPACK_NSIS_URL_INFO_ABOUT@"\r
+ Call ConditionalAddToRegisty\r
+ Push "Contact"\r
+ Push "@CPACK_NSIS_CONTACT@"\r
+ Call ConditionalAddToRegisty\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $INSTALL_DESKTOP "NSIS.InstallOptions.ini" "Field 5" "State"\r
+ !insertmacro MUI_STARTMENU_WRITE_BEGIN Application\r
+ \r
+ ;Create shortcuts\r
+ CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"\r
+@CPACK_NSIS_CREATE_ICONS@\r
+@CPACK_NSIS_CREATE_ICONS_EXTRA@\r
+ CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\Uninstall.exe"\r
+\r
+ ;Read a value from an InstallOptions INI file\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $DO_NOT_ADD_TO_PATH "NSIS.InstallOptions.ini" "Field 2" "State"\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ADD_TO_PATH_ALL_USERS "NSIS.InstallOptions.ini" "Field 3" "State"\r
+ !insertmacro MUI_INSTALLOPTIONS_READ $ADD_TO_PATH_CURRENT_USER "NSIS.InstallOptions.ini" "Field 4" "State"\r
+\r
+ ; Write special uninstall registry entries\r
+ Push "StartMenu"\r
+ Push "$STARTMENU_FOLDER"\r
+ Call ConditionalAddToRegisty\r
+ Push "DoNotAddToPath"\r
+ Push "$DO_NOT_ADD_TO_PATH"\r
+ Call ConditionalAddToRegisty\r
+ Push "AddToPathAllUsers"\r
+ Push "$ADD_TO_PATH_ALL_USERS"\r
+ Call ConditionalAddToRegisty\r
+ Push "AddToPathCurrentUser"\r
+ Push "$ADD_TO_PATH_CURRENT_USER"\r
+ Call ConditionalAddToRegisty\r
+ Push "InstallToDesktop"\r
+ Push "$INSTALL_DESKTOP"\r
+ Call ConditionalAddToRegisty\r
+\r
+ !insertmacro MUI_STARTMENU_WRITE_END\r
+ \r
+ detailPrint "Installing InspIRCd service..."\r
+ nsExec::Exec /TIMEOUT=30000 '"$INSTDIR\inspircd.exe" --installservice'\r
+\r
+@CPACK_NSIS_EXTRA_INSTALL_COMMANDS@\r
+\r
+SectionEnd\r
+\r
+Section "-Add to path"\r
+ Push $INSTDIR\bin\r
+ StrCmp "@CPACK_NSIS_MODIFY_PATH@" "ON" 0 doNotAddToPath\r
+ StrCmp $DO_NOT_ADD_TO_PATH "1" doNotAddToPath 0 \r
+ Call AddToPath\r
+ doNotAddToPath:\r
+SectionEnd\r
+\r
+;--------------------------------\r
+; Create custom pages\r
+Function InstallOptionsPage\r
+ !insertmacro MUI_HEADER_TEXT "Install Options" "Choose options for installing @CPACK_NSIS_PACKAGE_NAME@"\r
+ !insertmacro MUI_INSTALLOPTIONS_DISPLAY "NSIS.InstallOptions.ini"\r
+\r
+FunctionEnd\r
+\r
+;--------------------------------\r
+; determine admin versus local install\r
+Function un.onInit\r
+\r
+ ClearErrors\r
+ UserInfo::GetName\r
+ IfErrors noLM\r
+ Pop $0\r
+ UserInfo::GetAccountType\r
+ Pop $1\r
+ StrCmp $1 "Admin" 0 +3\r
+ SetShellVarContext all\r
+ ;MessageBox MB_OK 'User "$0" is in the Admin group'\r
+ Goto done\r
+ StrCmp $1 "Power" 0 +3\r
+ SetShellVarContext all\r
+ ;MessageBox MB_OK 'User "$0" is in the Power Users group'\r
+ Goto done\r
+ \r
+ noLM:\r
+ ;Get installation folder from registry if available\r
+\r
+ done:\r
+ \r
+FunctionEnd\r
+\r
+;--- Add/Remove callback functions: ---\r
+!macro SectionList MacroName\r
+ ;This macro used to perform operation on multiple sections.\r
+ ;List all of your components in following manner here.\r
+@CPACK_NSIS_COMPONENT_SECTION_LIST@\r
+!macroend\r
+ \r
+Section -FinishComponents\r
+ ;Removes unselected components and writes component status to registry\r
+ !insertmacro SectionList "FinishSection"\r
+ \r
+!ifdef CPACK_NSIS_ADD_REMOVE \r
+ ; Get the name of the installer executable\r
+ System::Call 'kernel32::GetModuleFileNameA(i 0, t .R0, i 1024) i r1'\r
+ StrCpy $R3 $R0\r
+ \r
+ ; Strip off the last 13 characters, to see if we have AddRemove.exe\r
+ StrLen $R1 $R0\r
+ IntOp $R1 $R0 - 13\r
+ StrCpy $R2 $R0 13 $R1\r
+ StrCmp $R2 "AddRemove.exe" addremove_installed\r
+ \r
+ ; We're not running AddRemove.exe, so install it\r
+ CopyFiles $R3 $INSTDIR\AddRemove.exe\r
+ \r
+ addremove_installed:\r
+!endif\r
+SectionEnd\r
+;--- End of Add/Remove callback functions ---\r
+\r
+;--------------------------------\r
+; Component dependencies\r
+Function .onSelChange\r
+ !insertmacro SectionList MaybeSelectionChanged\r
+FunctionEnd\r
+\r
+;--------------------------------\r
+;Uninstaller Section\r
+\r
+Section "Uninstall"\r
+ DetailPrint "Uninstalling InspIRCd service..."\r
+ nsExec::Exec /TIMEOUT=30000 '"$INSTDIR\inspircd.exe" --removeservice'\r
+\r
+ ReadRegStr $START_MENU SHCTX \\r
+ "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "StartMenu"\r
+ ;MessageBox MB_OK "Start menu is in: $START_MENU"\r
+ ReadRegStr $DO_NOT_ADD_TO_PATH SHCTX \\r
+ "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "DoNotAddToPath"\r
+ ReadRegStr $ADD_TO_PATH_ALL_USERS SHCTX \\r
+ "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "AddToPathAllUsers"\r
+ ReadRegStr $ADD_TO_PATH_CURRENT_USER SHCTX \\r
+ "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "AddToPathCurrentUser"\r
+ ;MessageBox MB_OK "Add to path: $DO_NOT_ADD_TO_PATH all users: $ADD_TO_PATH_ALL_USERS"\r
+ ReadRegStr $INSTALL_DESKTOP SHCTX \\r
+ "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "InstallToDesktop"\r
+ ;MessageBox MB_OK "Install to desktop: $INSTALL_DESKTOP "\r
+\r
+@CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS@\r
+\r
+ ;Remove files we installed.\r
+ ;Keep the list of directories here in sync with the File commands above.\r
+@CPACK_NSIS_DELETE_FILES@\r
+@CPACK_NSIS_DELETE_DIRECTORIES@\r
+\r
+!ifdef CPACK_NSIS_ADD_REMOVE \r
+ ;Remove the add/remove program\r
+ Delete "$INSTDIR\AddRemove.exe"\r
+!endif\r
+\r
+ ;Remove the uninstaller itself.\r
+ Delete "$INSTDIR\Uninstall.exe"\r
+ DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@"\r
+\r
+ ;Remove the installation directory if it is empty.\r
+ RMDir "$INSTDIR"\r
+\r
+ ; Remove the registry entries.\r
+ DeleteRegKey SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@"\r
+\r
+ ; Removes all optional components\r
+ !insertmacro SectionList "RemoveSection"\r
+ \r
+ !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP\r
+ \r
+ Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk"\r
+@CPACK_NSIS_DELETE_ICONS@\r
+@CPACK_NSIS_DELETE_ICONS_EXTRA@\r
+ \r
+ ;Delete empty start menu parent diretories\r
+ StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"\r
+ \r
+ startMenuDeleteLoop:\r
+ ClearErrors\r
+ RMDir $MUI_TEMP\r
+ GetFullPathName $MUI_TEMP "$MUI_TEMP\.."\r
+ \r
+ IfErrors startMenuDeleteLoopDone\r
+ \r
+ StrCmp "$MUI_TEMP" "$SMPROGRAMS" startMenuDeleteLoopDone startMenuDeleteLoop\r
+ startMenuDeleteLoopDone:\r
+\r
+ ; If the user changed the shortcut, then untinstall may not work. This should\r
+ ; try to fix it.\r
+ StrCpy $MUI_TEMP "$START_MENU"\r
+ Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk"\r
+@CPACK_NSIS_DELETE_ICONS_EXTRA@\r
+ \r
+ ;Delete empty start menu parent diretories\r
+ StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"\r
+ \r
+ secondStartMenuDeleteLoop:\r
+ ClearErrors\r
+ RMDir $MUI_TEMP\r
+ GetFullPathName $MUI_TEMP "$MUI_TEMP\.."\r
+ \r
+ IfErrors secondStartMenuDeleteLoopDone\r
+ \r
+ StrCmp "$MUI_TEMP" "$SMPROGRAMS" secondStartMenuDeleteLoopDone secondStartMenuDeleteLoop\r
+ secondStartMenuDeleteLoopDone:\r
+\r
+ DeleteRegKey /ifempty SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@"\r
+\r
+ Push $INSTDIR\bin\r
+ StrCmp $DO_NOT_ADD_TO_PATH_ "1" doNotRemoveFromPath 0\r
+ Call un.RemoveFromPath\r
+ doNotRemoveFromPath:\r
+SectionEnd\r
+\r
+;--------------------------------\r
+; determine admin versus local install\r
+; Is install for "AllUsers" or "JustMe"?\r
+; Default to "JustMe" - set to "AllUsers" if admin or on Win9x\r
+; This function is used for the very first "custom page" of the installer.\r
+; This custom page does not show up visibly, but it executes prior to the\r
+; first visible page and sets up $INSTDIR properly...\r
+; Choose different default installation folder based on SV_ALLUSERS...\r
+; "Program Files" for AllUsers, "My Documents" for JustMe...\r
+\r
+Function .onInit\r
+ StrCmp "@CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL@" "ON" 0 inst\r
+\r
+ ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" "UninstallString"\r
+ StrCmp $0 "" inst\r
+\r
+ MessageBox MB_YESNOCANCEL|MB_ICONEXCLAMATION \\r
+ "@CPACK_NSIS_PACKAGE_NAME@ is already installed. $\n$\nDo you want to uninstall the old version before installing the new one?" \\r
+ IDYES uninst IDNO inst\r
+ Abort\r
+\r
+;Run the uninstaller\r
+uninst:\r
+ ClearErrors\r
+ ExecWait '$0 _?=$INSTDIR' ;Do not copy the uninstaller to a temp file\r
+\r
+ IfErrors uninst_failed inst\r
+uninst_failed:\r
+ MessageBox MB_OK|MB_ICONSTOP "Uninstall failed."\r
+ Abort\r
+\r
+\r
+inst:\r
+ ; Reads components status for registry\r
+ !insertmacro SectionList "InitSection"\r
+\r
+ ; check to see if /D has been used to change \r
+ ; the install directory by comparing it to the \r
+ ; install directory that is expected to be the\r
+ ; default\r
+ StrCpy $IS_DEFAULT_INSTALLDIR 0\r
+ StrCmp "$INSTDIR" "@CPACK_NSIS_INSTALL_ROOT@\@CPACK_PACKAGE_INSTALL_DIRECTORY@" 0 +2\r
+ StrCpy $IS_DEFAULT_INSTALLDIR 1\r
+ \r
+ StrCpy $SV_ALLUSERS "JustMe"\r
+ ; if default install dir then change the default\r
+ ; if it is installed for JustMe\r
+ StrCmp "$IS_DEFAULT_INSTALLDIR" "1" 0 +2\r
+ StrCpy $INSTDIR "$DOCUMENTS\@CPACK_PACKAGE_INSTALL_DIRECTORY@"\r
+\r
+ ClearErrors\r
+ UserInfo::GetName\r
+ IfErrors noLM\r
+ Pop $0\r
+ UserInfo::GetAccountType\r
+ Pop $1\r
+ StrCmp $1 "Admin" 0 +4\r
+ SetShellVarContext all\r
+ ;MessageBox MB_OK 'User "$0" is in the Admin group'\r
+ StrCpy $SV_ALLUSERS "AllUsers"\r
+ Goto done\r
+ StrCmp $1 "Power" 0 +4\r
+ SetShellVarContext all\r
+ ;MessageBox MB_OK 'User "$0" is in the Power Users group'\r
+ StrCpy $SV_ALLUSERS "AllUsers"\r
+ Goto done\r
+ \r
+ noLM:\r
+ StrCpy $SV_ALLUSERS "AllUsers"\r
+ ;Get installation folder from registry if available\r
+\r
+ done:\r
+ StrCmp $SV_ALLUSERS "AllUsers" 0 +3\r
+ StrCmp "$IS_DEFAULT_INSTALLDIR" "1" 0 +2\r
+ StrCpy $INSTDIR "@CPACK_NSIS_INSTALL_ROOT@\@CPACK_PACKAGE_INSTALL_DIRECTORY@"\r
+\r
+ StrCmp "@CPACK_NSIS_MODIFY_PATH@" "ON" 0 noOptionsPage\r
+ !insertmacro MUI_INSTALLOPTIONS_EXTRACT "NSIS.InstallOptions.ini"\r
+\r
+ noOptionsPage:\r
+FunctionEnd\r
--- /dev/null
+Building InspIRCd for Windows:\r
+\r
+Prerequisites:\r
+ Visual Studio 2010 or newer (http://www.microsoft.com/visualstudio/eng/products/visual-studio-express-products)\r
+ CMake 2.8 or newer (http://www.cmake.org/)\r
+ If building the installer, NSIS http://nsis.sourceforge.net/\r
+\r
+Configuring:\r
+ First copy any extra modules from extras (such as m_mysql) to the modules directory that you want to build.\r
+\r
+ Run CMake to generate build files. The CMake scripts are set up to do an out of source build from the\r
+ "win\build" directory, so navigate there before running CMake, eg:\r
+\r
+ c:\Users\Adam\Desktop\inspircd\win\build>cmake -G "Visual Studio 11" ..\r
+ -- Check for working CXX compiler using: Visual Studio 11\r
+ -- Check for working CXX compiler using: Visual Studio 11 -- works\r
+ -- Detecting CXX compiler ABI info\r
+ -- Detecting CXX compiler ABI info - done\r
+ -- Configuring done\r
+ -- Generating done\r
+ -- Build files have been written to: C:/Users/Adam/Desktop/inspircd/win/build\r
+\r
+ This generates project files for Visual Studio 11 (2012). Available generators can be seen in cmake --help,\r
+ such as Visual Studio 10 and NMake Makefiles.\r
+ \r
+ If some of the modules you are building require libraries that are not in the default system path\r
+ (and thus not found by CMake), you can inform CMake about them by defining EXTRA_INCLUDES and\r
+ EXTRA_LIBS when configuring, eg;\r
+ \r
+ cmake -DEXTRA_INCLUDES:STRING="C:\inspircd-includes" -DEXTRA_LIBS:STRING="C:\inspircd-libs" -G "Visual Studio 11" ..\r
+ \r
+ Additionally, place any DLL files required by any extra modules in to the win directory for the installer to pick up.\r
+\r
+Building:\r
+ Open the InspIRCd Microsoft Visual Studio Solution file. If you are building a release, be sure to change\r
+ the Solution Configuration to Release before starting the build. Start the build by right clicking the\r
+ InspIRCd solution in the solution explorer and clicking "Build Solution"\r
+ \r
+ If you are building using NMake Makefiles, simply use "nmake".\r
+\r
+Installing:\r
+ If you do not want to build the installer you can simply build the INSTALL target, which will probably install\r
+ InspIRCd into C:\Program Files\InspIRCd. This may require administrative privileges by Visual Studio.\r
+ \r
+ If you are building using NMake Makefiles, simply use "nmake install".\r
+ \r
+Building the installer:\r
+ Locate the PACKAGE project on Visual Studio's Solution Explorer and build it. This will generate an InspIRCd-x.x.x.exe\r
+ installer in the build directory which is ready to be distributed.\r
+ \r
+ If you are building using NMake Makefiles or do not want to build the installer in Visual Studio, simply use "cpack".
\ No newline at end of file
+++ /dev/null
-/*
- * InspIRCd -- Internet Relay Chat Daemon
- *
- * Copyright (C) 2011 Adam <Adam@anope.org>
- * Copyright (C) 2007, 2009 Dennis Friis <peavey@inspircd.org>
- * Copyright (C) 2007-2008 Craig Edwards <craigedwards@brainbox.cc>
- * Copyright (C) 2008 Eric Dietz <root@wrongway.org>
- * Copyright (C) 2007 Burlex <???@???>
- * Copyright (C) 2007 Robin Burchell <robin+git@viroteck.net>
- *
- * This file is part of InspIRCd. InspIRCd is free software: you can
- * redistribute it and/or modify it under the terms of the GNU General Public
- * License as published by the Free Software Foundation, version 2.
- *
- * 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 for more
- * details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#define _CRT_SECURE_NO_DEPRECATE
-
-#define CONFIGURE_BUILD
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#include <stdio.h>
-#include <process.h>
-#include "../include/consolecolors.h"
-
-WORD g_wOriginalColors;
-WORD g_wBackgroundColor;
-HANDLE g_hStdout;
-
-#include <iostream>
-#include <string>
-#include <vector>
-#include <time.h>
-#include "inspircd_win32wrapper.h"
-
-using namespace std;
-void Run();
-void Banner();
-void WriteCompileModules(const vector<string> &, const vector<string> &);
-void WriteCompileCommands();
-void CopyExtras();
-
-#ifdef _WIN64
- // /MACHINE:X64
- #ifdef _DEBUG
- #define OUTFOLDER "debug_x64"
- #else
- #define OUTFOLDER "release_x64"
- #endif
-#else
- #ifdef _DEBUG
- #define OUTFOLDER "debug"
- #else
- #define OUTFOLDER "release"
- #endif
-#endif
-
-int get_int_option(const char * text, int def)
-{
- static char buffer[500];
- int ret;
- std::cout << text << std::endl << " [" << con_green << def << con_reset << "] -> ";
- fgets(buffer, sizeof(buffer), stdin);
- if(sscanf(buffer, "%u", &ret) != 1)
- ret = def;
-
- std::cout << std::endl;
- return ret;
-}
-
-bool get_bool_option(const char * text, bool def)
-{
- static char buffer[500];
- char ret[100];
- std::cout << text << " [" << con_green << (def ? 'y' : 'n') << con_reset << "] -> ";
- fgets(buffer, sizeof(buffer), stdin);
- if(sscanf(buffer, "%s", ret) != 1)
- strcpy(ret, def ? "y" : "n");
-
- std::cout << std::endl;
- return !strnicmp(ret, "y", 1);
-}
-
-string get_string_option(const char * text, char * def)
-{
- if (def && *def)
- std::cout << text << std::endl << "[" << con_green << def << con_reset << "] -> ";
- else
- std::cout << text << std::endl << "[] -> ";
-
- char buffer[1000], buf[1000];
- fgets(buffer, sizeof(buffer), stdin);
- if (sscanf(buffer, "%s", buf) != 1)
- strcpy(buf, def);
-
- std::cout << std::endl;
- return buf;
-}
-
-// escapes a string for use in a c++ file
-void escape_string(string &str)
-{
- string copy = str;
- str.clear();
-
- for (unsigned i = 0; i < copy.size(); ++i)
- {
- str += copy[i];
- if (copy[i] == '\\')
- str += '\\';
- }
-}
-
-string get_git_commit()
-{
- char buf[128];
- char *ref = NULL, *commit = NULL;
- FILE *f = fopen("../.git/HEAD", "r");
- if (f)
- {
- if (fgets(buf, sizeof(buf), f))
- {
- while (isspace(buf[strlen(buf) - 1]))
- buf[strlen(buf) - 1] = 0;
- char *p = strchr(buf, ' ');
- if (p)
- ref = ++p;
- }
- fclose(f);
- }
- if (ref == NULL)
- return "";
- string ref_file = string("../.git/") + string(ref);
- f = fopen(ref_file.c_str(), "r");
- if (f)
- {
- if (fgets(buf, sizeof(buf), f))
- {
- while (isspace(buf[strlen(buf) - 1]))
- buf[strlen(buf) - 1] = 0;
- commit = buf;
- }
- fclose(f);
- }
-
- return commit != NULL ? commit : "0";
-}
-
-void get_machine_info(char * buffer, size_t len)
-{
- char buf[500];
- char buf2[500];
-
- DWORD dwSize = sizeof(buf);
- if (!GetComputerNameExA((COMPUTER_NAME_FORMAT)ComputerNameDnsFullyQualified, buf, &dwSize))
- sprintf(buf, "%s", "unknown");
-
- FILE * f = fopen("ver.txt.tmp", "r");
- if (f)
- {
- while (fgets(buf2, sizeof(buf2), f)) { }
- fclose(f);
- _unlink("ver.txt.tmp");
- }
- else
- sprintf(buf2, "%s", "unknown");
-
- sprintf(buffer, "%s ", buf);
- //strip newlines
- char* b = buffer + strlen(buf)+1;
- char *b2 = buf2;
- while (*b2)
- {
- if (*b2 != 10 && *b2 != 13)
- {
- *b = *b2;
- b++;
- }
- *b2++;
- }
- *b = 0;
-}
-
-vector<string> get_dir_list(const string &path_list)
-{
- char *paths = _strdup(path_list.c_str());
- char *paths_save = paths;
- char *p = paths;
- vector<string> paths_return;
-
- while ((p = strchr(paths, ';')))
- {
- *p++ = 0;
- paths_return.push_back(paths);
- paths = p;
- }
- if (paths != NULL)
- paths_return.push_back(paths);
- free(paths_save);
-
- return paths_return;
-}
-
-int __stdcall WinMain(IN HINSTANCE hInstance, IN HINSTANCE hPrevInstance, IN LPSTR lpCmdLine, IN int nShowCmd )
-{
- FILE * j = fopen("..\\include\\inspircd_config.h", "r");
- if (j)
- {
- if (MessageBoxA(0, "inspircd_config.h already exists. Remove it and build from clean?", "Configure program", MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2) != IDYES)
- {
- fclose(j);
- exit(0);
- }
- }
-
- // call before we hook console handles
- system("ver > ver.txt.tmp");
-
- AllocConsole();
-
- // pipe standard handles to this console
- freopen("CONIN$", "r", stdin);
- freopen("CONOUT$", "w", stdout);
- freopen("CONOUT$", "w", stderr);
-
- // Initialize the console values
- g_hStdout = GetStdHandle(STD_OUTPUT_HANDLE);
- CONSOLE_SCREEN_BUFFER_INFO bufinf;
- if(GetConsoleScreenBufferInfo(g_hStdout, &bufinf))
- {
- g_wOriginalColors = bufinf.wAttributes & 0x00FF;
- g_wBackgroundColor = bufinf.wAttributes & 0x00F0;
- }
- else
- {
- g_wOriginalColors = FOREGROUND_RED|FOREGROUND_BLUE|FOREGROUND_GREEN;
- g_wBackgroundColor = 0;
- }
-
- Banner();
- Run();
- FreeConsole();
- return 0;
-}
-
-void Banner()
-{
- std::cout << std::endl << "Welcome to the " << con_white_bright << "InspIRCd" << con_reset << " Configuration program! (" << con_white_bright << "interactive mode" << con_reset << ")" << std::endl
- << con_white_bright << "Package maintainers: Type ./configure --help for non-interactive help" << con_reset << std::endl << std::endl
- << "*** If you are unsure of any of these values, leave it blank for ***" << std::endl
- << "*** standard settings that will work, and your server will run ***" << std::endl
- << "*** using them. Please consult your IRC network admin if in doubt. ***" << std::endl << std::endl
- << "Press " << con_white_bright << "<RETURN>" << con_reset << " to accept the default for any option, or enter" << std::endl
- << "a new value. Please note: You will " << con_white_bright << "HAVE" << con_reset << " to read the docs" << std::endl
- << "dir, otherwise you won't have a config file!" << std::endl << std::endl;
-
-}
-
-void Run()
-{
- vector<string> extra_include_paths, extra_lib_paths;
- string revision = get_git_commit();
- char version[514];
- char machine_text[MAX_PATH];
- get_machine_info(machine_text, MAX_PATH);
-
- // grab version
- FILE * fI = fopen("..\\src\\version.sh", "r");
- if(fI)
- {
- fgets(version, sizeof(version), fI);
- fgets(version, sizeof(version), fI);
- char * p2 = version;
- while(*p2 != '\"')
- ++p2;
- ++p2;
- strcpy(version, p2);
- p2 = version;
- while(*p2 != '\"')
- ++p2;
- *p2 = 0;
- fclose(fI);
- }
- else
- strcpy(version, "InspIRCd-0.0.0");
-
- string branch(version);
- branch.erase(branch.find_last_of('.'));
-
- std::cout << "Your operating system is: " << con_green << "Windows " <<
-#ifdef _WIN64
- "x64 (64-bit)"
-#else
- "x86 (32-bit)"
-#endif
- << con_reset << std::endl << "InspIRCd revision ID: " << con_green << ( (!revision.empty() && revision != "0") ? revision : "(Non-GIT build)" ) << con_reset << std::endl << std::endl
- << con_white_bright << "Extra modules." << con_reset << std::endl;
- if (get_bool_option("Do you want to compile any extra non-core modules?", false))
- {
- string extra_i_path = get_string_option("Extra include search paths separate by \";\"", ".");
- string extra_l_path = get_string_option("Extra library search paths, separate by \";\"", ".");
-
- extra_include_paths = get_dir_list(extra_i_path);
- extra_lib_paths = get_dir_list(extra_l_path);
- }
-
- std::cout << con_white_bright << "All paths are relative to the binary directory." << con_reset << std::endl;
- 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 log_path = get_string_option("In what directory is the logs to be placed in?", "logs");
- string bin_dir = get_string_option("In what directory is the IRCd binary to be placed?", ".");
-
- std::cout << std::endl << con_green << "Pre-build configuration is complete!" << std::endl << std::endl;
-
- CopyExtras();
-
- // dump all the options back out
- std::cout << con_reset << "Base install path:\t" << con_green << base_path << std::endl
- << con_reset << "Config path:\t" << con_green << config_path << std::endl
- << con_reset << "Module path:\t" << con_green << mod_path << std::endl
- << con_reset << "Data path:\t"<< con_green << data_path << std::endl
- << con_reset << "Log path:\t" << con_green << log_path << std::endl
- << con_reset << "Socket Engine:\t" << con_green << "select" << con_reset << std::endl;
-
- if(get_bool_option("Are these settings correct?", true) == false)
- {
- Run();
- return;
- }
- std::cout << std::endl;
-
- // escape the pathes
- escape_string(data_path);
- escape_string(log_path);
- escape_string(config_path);
- escape_string(mod_path);
-
- printf("\nWriting inspircd_config.h...");
- FILE * f = fopen("..\\include\\inspircd_config.h", "w");
- fprintf(f, "/* Auto generated by configure, do not modify! */\n");
- fprintf(f, "#ifndef __CONFIGURATION_AUTO__\n");
- fprintf(f, "#define __CONFIGURATION_AUTO__\n\n");
-
- 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 LOG_PATH \"%s\"\n", log_path.c_str());
- fprintf(f, "#define SOMAXCONN_S \"128\"\n");
- fprintf(f, "#define MAXBUF 514\n");
-
- fprintf(f, "\n#include \"inspircd_win32wrapper.h\"");
- fprintf(f, "\n#include \"threadengines/threadengine_win32.h\"\n\n");
- fprintf(f, "#endif\n\n");
- fclose(f);
-
- std::cout << con_green << "done" << con_reset << std::endl;
- printf("Writing inspircd_version.h...");
- f = fopen("..\\include\\inspircd_version.h", "w");
- fprintf(f, "#define BRANCH \"%s\"\n", branch.c_str());
- fprintf(f, "#define VERSION \"%s\"\n", version);
- fprintf(f, "#define REVISION \"%s\"\n", revision.c_str());
- fprintf(f, "#define SYSTEM \"%s\"\n", machine_text);
- fclose(f);
-
- std::cout << con_green << "done" << con_reset << std::endl;
- printf("Writing command and module compilation scripts...");
- WriteCompileCommands();
- WriteCompileModules(extra_include_paths, extra_lib_paths);
- std::cout << con_green << "done" << con_reset << std::endl;
-
- printf("\nconfigure is done.. exiting!\n");
-}
-
-/* Keeps files from modules/extra up to date if theyre copied into modules/ */
-void CopyExtras()
-{
- char dest[65535];
- char src[65535];
-
- printf("\nUpdating extra modules in src/modules...\n");
-
- WIN32_FIND_DATAA fd;
- HANDLE fh = FindFirstFileA("..\\src\\modules\\extra\\*.*", &fd);
-
- if(fh == INVALID_HANDLE_VALUE)
- return;
-
- do
- {
- strcpy(dest, "..\\src\\modules\\");
- strcat(dest, fd.cFileName);
- strcpy(src, "..\\src\\modules\\extra\\");
- strcat(src, fd.cFileName);
- FILE* x = fopen(dest, "r");
- if (x)
- {
- fclose(x);
- CopyFileA(src, dest, false);
- std::cout << con_green << "\t" << fd.cFileName << con_reset << "..." << std::endl;
- }
- }
- while (FindNextFileA(fh, &fd));
-
- FindClose(fh);
-
- printf("\n\n");
-}
-
-void WriteCompileCommands()
-{
- char commands[300][100];
- int command_count = 0;
- printf("\n Finding Command Sources...\n");
- WIN32_FIND_DATAA fd;
- HANDLE fh = FindFirstFileA("..\\src\\commands\\cmd_*.cpp", &fd);
- if(fh == INVALID_HANDLE_VALUE)
- std::cout << con_green << " No command sources could be found! This *could* be a bad thing.. :P" << con_reset << std::endl;
- else
- {
- std::cout << con_green;
- do
- {
- strcpy(commands[command_count], fd.cFileName);
- commands[command_count][strlen(fd.cFileName) - 4] = 0;
- printf(" %s\n", commands[command_count]);
- ++command_count;
- } while(FindNextFileA(fh, &fd));
- std::cout << con_reset;
- }
-
- // Write our spiffy new makefile :D
- // I am such a lazy fucker :P
- FILE * f = fopen("..\\src\\commands\\commands.mak", "w");
-
- time_t t = time(NULL);
- fprintf(f, "# Generated at %s\n", ctime(&t));
- fprintf(f, "all: makedir ");
-
- // dump modules.. first time :)
- for(int i = 0; i < command_count; ++i)
- fprintf(f, "%s.so ", commands[i]);
-
- fprintf(f, "\n.cpp.obj:\n");
-#ifdef _WIN64
- // /MACHINE:X64
- #ifdef _DEBUG
- fprintf(f, " cl /nologo /LD /Od /I \".\" /I \"../../include\" /I \"../../include/modes\" /I \"../../include/commands\" /I \"../../win\" /D \"_DEBUG\" /D \"_CONSOLE\" /D \"_MBCS\" /D \"DLL_BUILD\" /Gm /EHsc /RTC1 /MDd /Fo\"Debug_x64/\" /Fd\"Debug_x64/vc90.pdb\" /W2 /Zi /TP $*.cpp ..\\..\\win\\inspircd_memory_functions.cpp /link ..\\..\\bin\\debug_x64\\inspircd.lib /OUT:\"..\\..\\bin\\debug_x64\\modules\\$*.so\" /PDB:\"..\\..\\bin\\debug_x64\\modules\\$*.pdb\" /MACHINE:X64 /IMPLIB:\"..\\..\\bin\\debug_x64\\modules\\$*.lib\"\n\n");
- #else
- fprintf(f, " cl /nologo /LD /O2 /I \".\" /I \"../../include\" /I \"../../include/modes\" /I \"../../include/commands\" /I \"../../win\" /D \"_CONSOLE\" /D \"_MBCS\" /D \"DLL_BUILD\" /Gm /EHsc /GL /MD /Fo\"Release_x64/\" /Fd\"Release_x64/vc90.pdb\" /W2 /Zi /TP $*.cpp ..\\..\\win\\inspircd_memory_functions.cpp /link ..\\..\\bin\\release_x64\\inspircd.lib /OUT:\"..\\..\\bin\\release_x64\\modules\\$*.so\" /PDB:\"..\\..\\bin\\release_x64\\modules\\$*.pdb\" /MACHINE:X64 /IMPLIB:\"..\\..\\bin\\release_x64\\modules\\$*.lib\"\n\n");
- #endif
-#else
- #ifdef _DEBUG
- fprintf(f, " cl /nologo /LD /Od /I \".\" /I \"../../include\" /I \"../../include/modes\" /I \"../../include/commands\" /I \"../../win\" /D \"_DEBUG\" /D \"_CONSOLE\" /D \"_MBCS\" /D \"DLL_BUILD\" /Gm /EHsc /RTC1 /MDd /Fo\"Debug/\" /Fd\"Debug/vc90.pdb\" /W2 /Zi /TP $*.cpp ..\\..\\win\\inspircd_memory_functions.cpp /link ..\\..\\bin\\debug\\inspircd.lib /OUT:\"..\\..\\bin\\debug\\modules\\$*.so\" /PDB:\"..\\..\\bin\\debug\\modules\\$*.pdb\" /IMPLIB:\"..\\..\\bin\\debug\\modules\\$*.lib\"\n\n");
- #else
- fprintf(f, " cl /nologo /LD /O2 /I \".\" /I \"../../include\" /I \"../../include/modes\" /I \"../../include/commands\" /I \"../../win\" /D \"_CONSOLE\" /D \"_MBCS\" /D \"DLL_BUILD\" /Gm /EHsc /GL /MD /Fo\"Release/\" /Fd\"Release/vc90.pdb\" /W2 /Zi /TP $*.cpp ..\\..\\win\\inspircd_memory_functions.cpp /link ..\\..\\bin\\release\\inspircd.lib /OUT:\"..\\..\\bin\\release\\modules\\$*.so\" /PDB:\"..\\..\\bin\\release\\modules\\$*.pdb\" /IMPLIB:\"..\\..\\bin\\release\\modules\\$*.lib\"\n\n");
- #endif
-#endif
-
- fprintf(f, "makedir:\n");
-
- CreateDirectoryA("..\\src\\commands\\" OUTFOLDER, NULL);
- CreateDirectoryA("..\\bin\\" OUTFOLDER "\\modules", NULL);
- fprintf(f, " if not exist ..\\..\\bin\\" OUTFOLDER "\\modules mkdir ..\\..\\bin\\" OUTFOLDER "\\modules\n");
- fprintf(f, " if not exist ..\\..\\bin\\" OUTFOLDER "\\data mkdir ..\\..\\bin\\" OUTFOLDER "\\data\n");
- fprintf(f, " if not exist ..\\..\\bin\\" OUTFOLDER "\\logs mkdir ..\\..\\bin\\" OUTFOLDER "\\logs\n");
-
- // dump modules.. again the second and last time :)
- for(int i = 0; i < command_count; ++i)
- fprintf(f, "%s.so : %s.obj\n", commands[i], commands[i]);
-
- fprintf(f, "\n");
- fclose(f);
-}
-
-void WriteCompileModules(const vector<string> &includes, const vector<string> &libs)
-{
- char modules[300][100];
- int module_count = 0;
-
- printf("Finding Modules...\n");
- WIN32_FIND_DATAA fd;
- HANDLE fh = FindFirstFileA("..\\src\\modules\\m_*.cpp", &fd);
- if(fh == INVALID_HANDLE_VALUE)
- std::cout << con_green << " No module sources could be found! This *could* be a bad thing.. :P" << con_reset << std::endl;
- else
- {
- std::cout << con_green;
- do
- {
- strcpy(modules[module_count], fd.cFileName);
- modules[module_count][strlen(fd.cFileName) - 4] = 0;
- printf(" %s\n", modules[module_count]);
- ++module_count;
- } while(FindNextFileA(fh, &fd));
- std::cout << con_reset;
- }
-
- string extra_include, extra_lib;
- for (unsigned i = 0; i < includes.size(); ++i)
- extra_include += " /I \"" + includes[i] + "\" ";
- for (unsigned i = 0; i < libs.size(); ++i)
- extra_lib += " /LIBPATH:\"" + libs[i] + "\" ";
-
- // Write our spiffy new makefile :D
- // I am such a lazy fucker :P
- FILE * f = fopen("..\\src\\modules\\modules.mak", "w");
-
- time_t t = time(NULL);
- fprintf(f, "# Generated at %s\n", ctime(&t));
- fprintf(f, "all: makedir ");
-
- // dump modules.. first time :)
- for(int i = 0; i < module_count; ++i)
- fprintf(f, "%s.so ", modules[i]);
-
- fprintf(f, "\n.cpp.obj:\n");
-#ifdef _WIN64
- // /MACHINE:X64
- #ifdef _DEBUG
- fprintf(f, " cl /nologo /LD /Od /I \".\" /I \"../../include\" /I \"../../include/modes\" /I \"../../include/modules\" /I \"../../win\" %s /D \"_DEBUG\" /D \"_CONSOLE\" /D \"_MBCS\" /D \"DLL_BUILD\" /Gm /EHsc /RTC1 /MDd /Fo\"Debug_x64/\" /Fd\"Debug_x64/vc90.pdb\" /W2 /Zi /TP $*.cpp ..\\..\\win\\inspircd_memory_functions.cpp /link %s ..\\..\\bin\\debug_x64\\inspircd.lib /OUT:\"..\\..\\bin\\debug_x64\\modules\\$*.so\" /PDB:\"..\\..\\bin\\debug_x64\\modules\\$*.pdb\" /MACHINE:X64 /IMPLIB:\"..\\..\\bin\\debug_x64\\modules\\$*.lib\"\n\n", extra_include.c_str(), extra_lib.c_str());
- #else
- fprintf(f, " cl /nologo /LD /O2 /I \".\" /I \"../../include\" /I \"../../include/modes\" /I \"../../include/modules\" /I \"../../win\" %s /D \"_CONSOLE\" /D \"_MBCS\" /D \"DLL_BUILD\" /Gm /EHsc /GL /MD /Fo\"Release_x64/\" /Fd\"Release_x64/vc90.pdb\" /W2 /Zi /TP $*.cpp ..\\..\\win\\inspircd_memory_functions.cpp /link %s ..\\..\\bin\\release_x64\\inspircd.lib /OUT:\"..\\..\\bin\\release_x64\\modules\\$*.so\" /PDB:\"..\\..\\bin\\release_x64\\modules\\$*.pdb\" /MACHINE:X64 /IMPLIB:\"..\\..\\bin\\release_x64\\modules\\$*.lib\"\n\n", extra_include.c_str(), extra_lib.c_str());
- #endif
-#else
- #ifdef _DEBUG
- fprintf(f, " cl /nologo /LD /Od /I \".\" /I \"../../include\" /I \"../../include/modes\" /I \"../../include/modules\" /I \"../../win\" %s /D \"_DEBUG\" /D \"_CONSOLE\" /D \"_MBCS\" /D \"DLL_BUILD\" /Gm /EHsc /RTC1 /MDd /Fo\"Debug/\" /Fd\"Debug/vc90.pdb\" /W2 /Zi /TP $*.cpp ..\\..\\win\\inspircd_memory_functions.cpp /link %s ..\\..\\bin\\debug\\inspircd.lib /OUT:\"..\\..\\bin\\debug\\modules\\$*.so\" /PDB:\"..\\..\\bin\\debug\\modules\\$*.pdb\" /IMPLIB:\"..\\..\\bin\\debug\\modules\\$*.lib\"\n\n", extra_include.c_str(), extra_lib.c_str());
- #else
- fprintf(f, " cl /nologo /LD /O2 /I \".\" /I \"../../include\" /I \"../../include/modes\" /I \"../../include/modules\" /I \"../../win\" %s /D \"_CONSOLE\" /D \"_MBCS\" /D \"DLL_BUILD\" /Gm /EHsc /GL /MD /Fo\"Release/\" /Fd\"Release/vc90.pdb\" /W2 /Zi /TP $*.cpp ..\\..\\win\\inspircd_memory_functions.cpp /link %s ..\\..\\bin\\release\\inspircd.lib /OUT:\"..\\..\\bin\\release\\modules\\$*.so\" /PDB:\"..\\..\\bin\\release\\modules\\$*.pdb\" /IMPLIB:\"..\\..\\bin\\release\\modules\\$*.lib\"\n\n", extra_include.c_str(), extra_lib.c_str());
- #endif
-#endif
-
- CreateDirectoryA("..\\src\\modules\\" OUTFOLDER, NULL);
-
-#ifdef _DEBUG
- fprintf(f, "makedir:\n if not exist debug mkdir debug\n\n");
-#else
- fprintf(f, "makedir:\n if not exist release mkdir release\n\n");
-#endif
-
- // dump modules.. again the second and last time :)
- for(int i = 0; i < module_count; ++i)
- fprintf(f, "%s.so : %s.obj\n", modules[i], modules[i]);
-
- fprintf(f, "\n");
- fclose(f);
-}
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup Label="ProjectConfigurations">\r
- <ProjectConfiguration Include="Debug|Win32">\r
- <Configuration>Debug</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Debug|Win32">\r
- <Configuration>Debug</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Debug|x64">\r
- <Configuration>Debug</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Debug|x64">\r
- <Configuration>Debug</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|Win32">\r
- <Configuration>Release</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|Win32">\r
- <Configuration>Release</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|x64">\r
- <Configuration>Release</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|x64">\r
- <Configuration>Release</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- </ItemGroup>\r
- <PropertyGroup Label="Globals">\r
- <ProjectName>configure</ProjectName>\r
- <ProjectGUID>{B922B569-727E-4EB0-827A-04E133A91DE7}</ProjectGUID>\r
- <RootNamespace>configure</RootNamespace>\r
- <Keyword>Win32Proj</Keyword>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>MultiByte</CharacterSet>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>MultiByte</CharacterSet>\r
- </PropertyGroup>\r
- <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|X64'">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>MultiByte</CharacterSet>\r
- </PropertyGroup>\r
- <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|X64'">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>MultiByte</CharacterSet>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
- <ImportGroup Label="ExtensionSettings">\r
- </ImportGroup>\r
- <ImportGroup Label="PropertySheets">\r
- <Import Project="$(LocalAppData)\Microsoft\VisualStudio\10.0\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(LocalAppData)\Microsoft\VisualStudio\10.0\Microsoft.Cpp.$(Platform).user.props')" />\r
- </ImportGroup>\r
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
- <Import Project="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.props" Condition="exists('$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.props')" />\r
- </ImportGroup>\r
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|X64'">\r
- <Import Project="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.props" Condition="exists('$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.props')" />\r
- </ImportGroup>\r
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
- <Import Project="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.props" Condition="exists('$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.props')" />\r
- </ImportGroup>\r
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|X64'">\r
- <Import Project="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.props" Condition="exists('$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.props')" />\r
- </ImportGroup>\r
- <PropertyGroup Label="UserMacros" />\r
- <PropertyGroup>\r
- <_ProjectFileVersion>10.0.20506.1</_ProjectFileVersion>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug_configure\</IntDir>\r
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">configure</TargetName>\r
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.exe</TargetExt>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|X64'">.\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|X64'">x64Debug_Configure\</IntDir>\r
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|X64'">configure</TargetName>\r
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|X64'">.exe</TargetExt>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|X64'">true</LinkIncremental>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release_Configure\</IntDir>\r
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">configure</TargetName>\r
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.exe</TargetExt>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|X64'">.\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|X64'">x64Release_Configure\</IntDir>\r
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|X64'">configure</TargetName>\r
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|X64'">.exe</TargetExt>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|X64'">false</LinkIncremental>\r
- </PropertyGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
- <ClCompile>\r
- <Optimization>Disabled</Optimization>\r
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <MinimalRebuild>false</MinimalRebuild>\r
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level4</WarningLevel>\r
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\r
- <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
- </ClCompile>\r
- <Link>\r
- <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <ProgramDatabaseFile>$(OutDir)configure.pdb</ProgramDatabaseFile>\r
- <SubSystem>Windows</SubSystem>\r
- <RandomizedBaseAddress>true</RandomizedBaseAddress>\r
- <DataExecutionPrevention>\r
- </DataExecutionPrevention>\r
- <TargetMachine>MachineX86</TargetMachine>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|X64'">\r
- <Midl>\r
- <TargetEnvironment>X64</TargetEnvironment>\r
- </Midl>\r
- <ClCompile>\r
- <Optimization>Disabled</Optimization>\r
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <MinimalRebuild>false</MinimalRebuild>\r
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level4</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
- </ClCompile>\r
- <Link>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <ProgramDatabaseFile>$(OutDir)configure.pdb</ProgramDatabaseFile>\r
- <SubSystem>Windows</SubSystem>\r
- <RandomizedBaseAddress>true</RandomizedBaseAddress>\r
- <DataExecutionPrevention>\r
- </DataExecutionPrevention>\r
- <TargetMachine>MachineX64</TargetMachine>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
- <ClCompile>\r
- <Optimization>MaxSpeed</Optimization>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <MinimalRebuild>false</MinimalRebuild>\r
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level3</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
- </ClCompile>\r
- <Link>\r
- <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Windows</SubSystem>\r
- <OptimizeReferences>true</OptimizeReferences>\r
- <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
- <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>\r
- <RandomizedBaseAddress>true</RandomizedBaseAddress>\r
- <DataExecutionPrevention>\r
- </DataExecutionPrevention>\r
- <TargetMachine>MachineX86</TargetMachine>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|X64'">\r
- <Midl>\r
- <TargetEnvironment>X64</TargetEnvironment>\r
- </Midl>\r
- <ClCompile>\r
- <Optimization>MaxSpeed</Optimization>\r
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <MinimalRebuild>false</MinimalRebuild>\r
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level3</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- </ClCompile>\r
- <Link>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Windows</SubSystem>\r
- <OptimizeReferences>true</OptimizeReferences>\r
- <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
- <RandomizedBaseAddress>true</RandomizedBaseAddress>\r
- <DataExecutionPrevention>\r
- </DataExecutionPrevention>\r
- <TargetMachine>MachineX64</TargetMachine>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemGroup>\r
- <ClCompile Include="configure.cpp" />\r
- </ItemGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
- <ImportGroup Label="ExtensionTargets">\r
- </ImportGroup>\r
-</Project>
\ No newline at end of file
+++ /dev/null
-;
-; InspIRCd -- Internet Relay Chat Daemon
-;
-; Copyright (C) 2011 Adam <Adam@anope.org>
-; Copyright (C) 2007 Dennis Friis <peavey@inspircd.org>
-; Copyright (C) 2007 Craig Edwards <craigedwards@brainbox.cc>
-;
-; This file is part of InspIRCd. InspIRCd is free software: you can
-; redistribute it and/or modify it under the terms of the GNU General Public
-; License as published by the Free Software Foundation, version 2.
-;
-; 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 for more
-; details.
-;
-; You should have received a copy of the GNU General Public License
-; along with this program. If not, see <http://www.gnu.org/licenses/>.
-;
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
- ;;;; SET THE BUILD TO BE PACKAGED HERE ;;;;
-
-!define BUILD "release"
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-; HM NIS Edit Wizard helper defines
-!define PRODUCT_NAME "InspIRCd"
-!define PRODUCT_VERSION "2.0"
-!define PRODUCT_PUBLISHER "InspIRCd Development Team"
-!define PRODUCT_WEB_SITE "http://www.inspircd.org/"
-!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\inspircd.exe"
-!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
-!define PRODUCT_UNINST_ROOT_KEY "HKLM"
-!define DOT_MAJOR "2"
-!define DOT_MINOR "0"
-
-SetCompressor bzip2
-
-; MUI 1.67 compatible ------
-!include "MUI.nsh"
-
-; MUI Settings
-!define MUI_ABORTWARNING
-!define MUI_ICON "inspircd.ico"
-!define MUI_UNICON "inspircd.ico"
-
-; Welcome page
-!insertmacro MUI_PAGE_WELCOME
-; License page
-!define MUI_LICENSEPAGE_CHECKBOX
-!insertmacro MUI_PAGE_LICENSE "..\docs\COPYING"
-; directory page
-Page directory
-; Components page
-!insertmacro MUI_PAGE_COMPONENTS
-; Instfiles page
-!insertmacro MUI_PAGE_INSTFILES
-
-; Uninstaller pages
-!insertmacro MUI_UNPAGE_INSTFILES
-
-; Language files
-!insertmacro MUI_LANGUAGE "English"
-
-; Reserve files
-!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
-
-; MUI end ------
-
-Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
-OutFile "${PRODUCT_NAME}-${PRODUCT_VERSION}-Setup.exe"
-InstallDir "$PROGRAMFILES\InspIRCd"
-InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
-ShowInstDetails show
-ShowUnInstDetails show
-
-Function IsDotNetInstalled
-
- StrCpy $0 "0"
- StrCpy $1 "SOFTWARE\Microsoft\.NETFramework" ;registry entry to look in.
- StrCpy $2 0
-
- StartEnum:
- ;Enumerate the versions installed.
- EnumRegKey $3 HKLM "$1\policy" $2
-
- ;If we don't find any versions installed, it's not here.
- StrCmp $3 "" noDotNet notEmpty
-
- ;We found something.
- notEmpty:
- ;Find out if the RegKey starts with 'v'.
- ;If it doesn't, goto the next key.
- StrCpy $4 $3 1 0
- StrCmp $4 "v" +1 goNext
- StrCpy $4 $3 1 1
-
- ;It starts with 'v'. Now check to see how the installed major version
- ;relates to our required major version.
- ;If it's equal check the minor version, if it's greater,
- ;we found a good RegKey.
- IntCmp $4 ${DOT_MAJOR} +1 goNext yesDotNetReg
- ;Check the minor version. If it's equal or greater to our requested
- ;version then we're good.
- StrCpy $4 $3 1 3
- IntCmp $4 ${DOT_MINOR} yesDotNetReg goNext yesDotNetReg
-
- goNext:
- ;Go to the next RegKey.
- IntOp $2 $2 + 1
- goto StartEnum
-
- yesDotNetReg:
- ;Now that we've found a good RegKey, let's make sure it's actually
- ;installed by getting the install path and checking to see if the
- ;mscorlib.dll exists.
- EnumRegValue $2 HKLM "$1\policy\$3" 0
- ;$2 should equal whatever comes after the major and minor versions
- ;(ie, v1.1.4322)
- StrCmp $2 "" noDotNet
- ReadRegStr $4 HKLM $1 "InstallRoot"
- ;Hopefully the install root isn't empty.
- StrCmp $4 "" noDotNet
- ;build the actuall directory path to mscorlib.dll.
- StrCpy $4 "$4$3.$2\mscorlib.dll"
- IfFileExists $4 yesDotNet noDotNet
-
- noDotNet:
- MessageBox MB_OK "You do not have have v${DOT_MAJOR}.${DOT_MINOR} or greater of the .NET framework installed. This is required for the InspIRCd Monitor, however you can still launch the IRCd manually."
-
- yesDotNet:
- ;Everything checks out. Go on with the rest of the installation.
-
-FunctionEnd
-
-Section "Binary Executable" SEC01
- Call IsDotNetInstalled
- CreateDirectory "$SMPROGRAMS\InspIRCd"
- CreateDirectory "$INSTDIR\logs"
- CreateDirectory "$INSTDIR\data"
- CreateShortCut "$SMPROGRAMS\InspIRCd\InspIRCd.lnk" "$INSTDIR\inspircd.exe"
- SetOutPath "$INSTDIR"
- SetOverwrite ifnewer
- File "..\bin\${BUILD}\inspircd.exe"
- DetailPrint "Installing InspIRCd service..."
- nsExec::Exec /TIMEOUT=30000 '"$INSTDIR\inspircd.exe" --installservice'
-SectionEnd
-
-Section "Config Files" SEC02
- SetOutPath "$INSTDIR\conf"
- File "..\docs\conf\*.example"
- SetOutPath "$INSTDIR\conf\aliases"
- File "..\docs\conf\aliases\*.example"
- SetOutPath "$INSTDIR\conf\modules"
- File "..\docs\conf\modules\*.example"
-SectionEnd
-
-Section "Command Handlers" SEC03
- SetOutPath "$INSTDIR\modules"
- File "..\bin\${BUILD}\modules\cmd_*.so"
-SectionEnd
-
-Section "Modules" SEC04
- SetOutPath "$INSTDIR\modules"
- File "..\bin\${BUILD}\modules\m_*.so"
- ; Copy DLLs required for modules
- SetOutPath "$INSTDIR"
- File /nonfatal "*.dll"
- File "make_gnutls_cert.bat"
-SectionEnd
-
-Section -AdditionalIcons
- SetOutPath $INSTDIR
- WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
- CreateShortCut "$SMPROGRAMS\InspIRCd\InspIRCd Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url"
- CreateShortCut "$SMPROGRAMS\InspIRCd\Uninstall.lnk" "$INSTDIR\uninst.exe"
-SectionEnd
-
-Section -Post
- WriteUninstaller "$INSTDIR\uninst.exe"
- WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\inspircd.exe"
- WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
- WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
- WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\inspircd.exe"
- WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
- WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
- WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
- MessageBox MB_ICONINFORMATION|MB_OK "InspIRCd was successfully installed. Remember to edit your configuration file in $INSTDIR\conf!"
-SectionEnd
-
-; Section descriptions
-!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
- !insertmacro MUI_DESCRIPTION_TEXT ${SEC01} "Actual executable"
- !insertmacro MUI_DESCRIPTION_TEXT ${SEC03} "Command modules"
- !insertmacro MUI_DESCRIPTION_TEXT ${SEC02} "Default configuration files"
- !insertmacro MUI_DESCRIPTION_TEXT ${SEC04} "Optional non-SSL modules"
-!insertmacro MUI_FUNCTION_DESCRIPTION_END
-
-
-Function un.onUninstSuccess
- HideWindow
- MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."
-FunctionEnd
-
-Function .onInit
- SectionSetFlags ${SEC01} 17
- SectionSetFlags ${SEC03} 17
- StrCpy $INSTDIR "$PROGRAMFILES\InspIRCd"
-FunctionEnd
-
-Function un.onInit
- MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2
- Abort
-FunctionEnd
-
-Section Uninstall
- DetailPrint "Uninstalling InspIRCd service..."
- nsExec::Exec /TIMEOUT=30000 '"$INSTDIR\inspircd.exe" --removeservice'
- Delete "$INSTDIR\${PRODUCT_NAME}.url"
- Delete "$INSTDIR\uninst.exe"
- Delete "$INSTDIR\modules\*.so"
- Delete "$INSTDIR\conf\*.example"
- Delete "$INSTDIR\conf\aliases\*.example"
- Delete "$INSTDIR\conf\modules\*.example"
- Delete "$INSTDIR\conf\modules\modules.conf.charybdis"
- Delete "$INSTDIR\conf\modules\modules.conf.unreal"
- Delete "$INSTDIR\*.log"
- Delete "$INSTDIR\logs\*"
- Delete "$INSTDIR\data\*"
- Delete "$INSTDIR\*.dll"
- Delete "$INSTDIR\make_gnutls_cert.bat"
- Delete "$INSTDIR\inspircd.exe"
- Delete "$SMPROGRAMS\InspIRCd\Uninstall.lnk"
- Delete "$SMPROGRAMS\InspIRCd\InspIRCd Website.lnk"
- Delete "$SMPROGRAMS\InspIRCd\InspIRCd.lnk"
-
- RMDir "$SMPROGRAMS\InspIRCd"
- RMDir "$INSTDIR\modules"
- RMDir "$INSTDIR\conf\aliases"
- RMDir "$INSTDIR\conf\modules"
- RMDir "$INSTDIR\conf"
- RMDir "$INSTDIR\logs"
- RMDir "$INSTDIR\data"
- RMDir "$INSTDIR"
-
- DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
- DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
- SetAutoClose true
-SectionEnd
--- /dev/null
+101 ICON "inspircd.ico"\r
+\r
+1 VERSIONINFO\r
+ FILEVERSION @MAJOR_VERSION@,@MINOR_VERSION@,@PATCH_VERSION@\r
+ PRODUCTVERSION @MAJOR_VERSION@,@MINOR_VERSION@,@PATCH_VERSION@\r
+ FILEFLAGSMASK 0x3fL\r
+#ifdef _DEBUG\r
+ FILEFLAGS 0x1L\r
+#else\r
+ FILEFLAGS 0x0L\r
+#endif\r
+ FILEOS 0x40004L\r
+ FILETYPE 0x1L\r
+ FILESUBTYPE 0x0L\r
+BEGIN\r
+ BLOCK "StringFileInfo"\r
+ BEGIN\r
+ BLOCK "040904b0"\r
+ BEGIN\r
+ VALUE "Comments", "InspIRCd @MAJOR_VERSION@.@MINOR_VERSION@ IRC Daemon"\r
+ VALUE "CompanyName", "InspIRCd Development Team"\r
+ VALUE "FileDescription", "InspIRCd"\r
+ VALUE "FileVersion", "@FULL_VERSION@"\r
+ VALUE "InternalName", "InspIRCd"\r
+ VALUE "LegalCopyright", "Copyright (c) 2013 InspIRCd Development Team"\r
+ VALUE "OriginalFilename", "inspircd.exe"\r
+ VALUE "ProductName", "InspIRCd - The Inspire IRC Daemon"\r
+ VALUE "ProductVersion", "@FULL_VERSION@"\r
+ END\r
+ END\r
+ BLOCK "VarFileInfo"\r
+ BEGIN\r
+ VALUE "Translation", 0x809, 1200\r
+ END\r
+END\r
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>inspircd</ProjectName>
- <ProjectGUID>{FE82A6FC-41C7-4CB1-AA46-6DBCB6C682C8}</ProjectGUID>
- <RootNamespace>inspircd</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|X64'">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|X64'">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(LocalAppData)\Microsoft\VisualStudio\10.0\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(LocalAppData)\Microsoft\VisualStudio\10.0\Microsoft.Cpp.$(Platform).user.props')" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <Import Project="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.props" Condition="exists('$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.props')" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Import Project="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.props" Condition="exists('$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.props')" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|X64'">
- <Import Project="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.props" Condition="exists('$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.props')" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|X64'">
- <Import Project="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.props" Condition="exists('$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.props')" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.20506.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">inspircd</TargetName>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.exe</TargetExt>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\bin\release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">inspircd</TargetName>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.exe</TargetExt>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|X64'">..\bin\debug_x64\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|X64'">x64Debug\</IntDir>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|X64'">inspircd</TargetName>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|X64'">.exe</TargetExt>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|X64'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|X64'">..\bin\release_x64\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|X64'">x64Release\</IntDir>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|X64'">inspircd</TargetName>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|X64'">.exe</TargetExt>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|X64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <PreBuildEvent>
- <Message>running configure...</Message>
- <Command>"$(ProjectDir)\configure.exe"</Command>
- </PreBuildEvent>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../include;../../include;../include/modes;../include/commands;../../include/modes;../../include/commands;../win;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>false</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level4</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
- <MultiProcessorCompilation>true</MultiProcessorCompilation>
- </ClCompile>
- <Link>
- <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
- <ShowProgress>LinkVerbose</ShowProgress>
- <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)inspircd.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>true</RandomizedBaseAddress>
- <FixedBaseAddress>false</FixedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- <PostBuildEvent>
- <Command>@echo off
-echo Compiling Command Modules...
-cd ..\src\commands
-nmake -f commands.mak
-echo Compiling Modules...
-cd ..\modules
-nmake -f modules.mak
-</Command>
- </PostBuildEvent>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <PreBuildEvent>
- <Message>running configure...</Message>
- <Command>"$(ProjectDir)\configure.exe"</Command>
- </PreBuildEvent>
- <ClCompile>
- <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
- <Optimization>MaxSpeed</Optimization>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <AdditionalIncludeDirectories>../include;../../include;../include/modes;../include/commands;../../include/modes;../../include/commands;../win;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>false</MinimalRebuild>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>
- </DebugInformationFormat>
- <MultiProcessorCompilation>true</MultiProcessorCompilation>
- </ClCompile>
- <Link>
- <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
- <EmbedManagedResourceFile>inspircd.ico;%(EmbedManagedResourceFile)</EmbedManagedResourceFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
- <RandomizedBaseAddress>true</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- <PostBuildEvent>
- <Command>@echo off
-echo Compiling Command Modules...
-cd ..\src\commands
-nmake -f commands.mak
-echo Compiling Modules...
-cd ..\modules
-nmake -f modules.mak
-</Command>
- </PostBuildEvent>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|X64'">
- <PreBuildEvent>
- <Message>running configure...</Message>
- <Command>"$(ProjectDir)\configure.exe"</Command>
- </PreBuildEvent>
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../include;../../include;../include/modes;../include/commands;../../include/modes;../../include/commands;../win;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>false</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level4</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <MultiProcessorCompilation>true</MultiProcessorCompilation>
- </ClCompile>
- <Link>
- <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
- <ShowProgress>NotSet</ShowProgress>
- <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)inspircd.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>true</RandomizedBaseAddress>
- <FixedBaseAddress>false</FixedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- <PostBuildEvent>
- <Command>@echo off
-echo Compiling Command Modules...
-cd ..\src\commands
-nmake -f commands.mak
-echo Compiling Modules...
-cd ..\modules
-nmake -f modules.mak
-</Command>
- </PostBuildEvent>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|X64'">
- <PreBuildEvent>
- <Message>running configure...</Message>
- <Command>$(ProjectDir)\configure.exe
- </Command>
- </PreBuildEvent>
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <AdditionalIncludeDirectories>../include;../../include;../include/modes;../include/commands;../../include/modes;../../include/commands;../win;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>false</MinimalRebuild>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level2</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <MultiProcessorCompilation>true</MultiProcessorCompilation>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </ClCompile>
- <Link>
- <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EmbedManagedResourceFile>inspircd.ico;%(EmbedManagedResourceFile)</EmbedManagedResourceFile>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>true</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- <PostBuildEvent>
- <Command>@echo off
-echo Compiling Command Modules...
-cd ..\src\commands
-nmake -f commands.mak
-echo Compiling Modules...
-cd ..\modules
-nmake -f modules.mak
-</Command>
- </PostBuildEvent>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\src\bancache.cpp" />
- <ClCompile Include="..\src\base.cpp" />
- <ClCompile Include="..\src\channels.cpp" />
- <ClCompile Include="..\src\cidr.cpp" />
- <ClCompile Include="..\src\commands.cpp" />
- <ClCompile Include="..\src\command_parse.cpp" />
- <ClCompile Include="..\src\configparser.cpp" />
- <ClCompile Include="..\src\configreader.cpp" />
- <ClCompile Include="..\src\cull_list.cpp" />
- <ClCompile Include="..\src\dns.cpp" />
- <ClCompile Include="..\src\dynamic.cpp" />
- <ClCompile Include="..\src\filelogger.cpp" />
- <ClCompile Include="..\src\hashcomp.cpp" />
- <ClCompile Include="..\src\helperfuncs.cpp" />
- <ClCompile Include="..\src\inspircd.cpp" />
- <ClCompile Include="..\src\inspsocket.cpp" />
- <ClCompile Include="..\src\inspstring.cpp" />
- <ClCompile Include="..\src\listensocket.cpp" />
- <ClCompile Include="..\src\logger.cpp" />
- <ClCompile Include="..\src\mode.cpp" />
- <ClCompile Include="..\src\modes\cmode_b.cpp" />
- <ClCompile Include="..\src\modes\cmode_k.cpp" />
- <ClCompile Include="..\src\modes\cmode_l.cpp" />
- <ClCompile Include="..\src\modes\cmode_o.cpp" />
- <ClCompile Include="..\src\modes\cmode_v.cpp" />
- <ClCompile Include="..\src\modes\umode_o.cpp" />
- <ClCompile Include="..\src\modes\umode_s.cpp" />
- <ClCompile Include="..\src\modmanager_dynamic.cpp" />
- <ClCompile Include="..\src\modules.cpp" />
- <ClCompile Include="..\src\server.cpp" />
- <ClCompile Include="..\src\snomasks.cpp" />
- <ClCompile Include="..\src\socket.cpp" />
- <ClCompile Include="..\src\socketengine.cpp" />
- <ClCompile Include="..\src\socketengines\socketengine_select.cpp" />
- <ClCompile Include="..\src\testsuite.cpp" />
- <ClCompile Include="..\src\threadengine.cpp" />
- <ClCompile Include="..\src\threadengines\threadengine_win32.cpp" />
- <ClCompile Include="..\src\timer.cpp" />
- <ClCompile Include="..\src\usermanager.cpp" />
- <ClCompile Include="..\src\userprocess.cpp" />
- <ClCompile Include="..\src\users.cpp" />
- <ClCompile Include="..\src\user_resolver.cpp" />
- <ClCompile Include="..\src\whois.cpp" />
- <ClCompile Include="..\src\wildcard.cpp" />
- <ClCompile Include="..\src\xline.cpp" />
- <ClCompile Include="inspircd_memory_functions.cpp" />
- <ClCompile Include="inspircd_win32wrapper.cpp" />
- <ClCompile Include="win32service.cpp" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="..\src\modules\httpd.h">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\include\bancache.h" />
- <ClInclude Include="..\include\base.h" />
- <ClInclude Include="..\include\caller.h" />
- <ClInclude Include="..\include\channels.h" />
- <ClInclude Include="..\include\command_parse.h" />
- <ClInclude Include="..\include\configreader.h" />
- <ClInclude Include="..\include\consolecolors.h" />
- <ClInclude Include="..\include\ctables.h" />
- <ClInclude Include="..\include\cull_list.h" />
- <ClInclude Include="..\include\dns.h" />
- <ClInclude Include="..\include\dynamic.h" />
- <ClInclude Include="..\include\exitcodes.h" />
- <ClInclude Include="..\include\filelogger.h" />
- <ClInclude Include="..\include\globals.h" />
- <ClInclude Include="..\include\hashcomp.h" />
- <ClInclude Include="..\include\hash_map.h" />
- <ClInclude Include="..\include\inspircd.h" />
- <ClInclude Include="..\include\inspircd_config.h" />
- <ClInclude Include="..\include\inspsocket.h" />
- <ClInclude Include="..\include\inspstring.h" />
- <ClInclude Include="..\include\logger.h" />
- <ClInclude Include="..\include\mode.h" />
- <ClInclude Include="..\include\modules.h" />
- <ClInclude Include="..\include\numerics.h" />
- <ClInclude Include="..\include\snomasks.h" />
- <ClInclude Include="..\include\socket.h" />
- <ClInclude Include="..\include\socketengine.h" />
- <ClInclude Include="..\include\socketengines\socketengine_select.h" />
- <ClInclude Include="..\include\testsuite.h" />
- <ClInclude Include="..\include\threadengine.h" />
- <ClInclude Include="..\include\threadengines\threadengine_win32.h" />
- <ClInclude Include="..\include\timer.h" />
- <ClInclude Include="..\include\typedefs.h" />
- <ClInclude Include="..\include\uid.h" />
- <ClInclude Include="..\include\usermanager.h" />
- <ClInclude Include="..\include\users.h" />
- <ClInclude Include="..\include\u_listmode.h" />
- <ClInclude Include="..\include\wildcard.h" />
- <ClInclude Include="..\include\xline.h" />
- <ClInclude Include="inspircd_win32wrapper.h" />
- <ClInclude Include="win32service.h" />
- </ItemGroup>
- <ItemGroup>
- <None Include="..\src\version.sh" />
- <None Include="inspircd.ico" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="resource.rc" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="configure.vcxproj">
- <Project>{b922b569-727e-4eb0-827a-04e133a91de7}</Project>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
\ No newline at end of file
--- /dev/null
+#ifndef INSPIRCD_CONFIG_H\r
+#define INSPIRCD_CONFIG_H\r
+\r
+#define CONFIG_PATH "conf"\r
+#define MOD_PATH "modules"\r
+#define DATA_PATH "data"\r
+#define LOG_PATH "logs"\r
+#define MAXBUF 514\r
+\r
+#include "inspircd_win32wrapper.h"\r
+#include "threadengines/threadengine_win32.h"\r
+\r
+#endif
\ No newline at end of file
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-
-#include "inspircd_win32wrapper.h"
+#include <windows.h>
#include <exception>
#include <new>
#include <new.h>
HeapFree(GetProcessHeap(), 0, ptr);
}
-void * operator new[] (size_t iSize) {
+void * operator new[] (size_t iSize)
+{
void* ptr = HeapAlloc(GetProcessHeap(), 0, iSize);
if (!ptr)
throw std::bad_alloc();
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>m_spanningtree</ProjectName>
- <ProjectGUID>{1EC86B60-AB2A-4984-8A7E-0422C15601E0}</ProjectGUID>
- <RootNamespace>m_spanningtree</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|X64'">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|X64'">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(LocalAppData)\Microsoft\VisualStudio\10.0\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(LocalAppData)\Microsoft\VisualStudio\10.0\Microsoft.Cpp.$(Platform).user.props')" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <Import Project="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.props" Condition="exists('$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.props')" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|X64'">
- <Import Project="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.props" Condition="exists('$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.props')" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Import Project="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.props" Condition="exists('$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.props')" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|X64'">
- <Import Project="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.props" Condition="exists('$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.props')" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.20506.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\debug\modules\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug_spanningtree\</IntDir>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">m_spanningtree</TargetName>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.so</TargetExt>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|X64'">..\bin\debug_x64\modules\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|X64'">x64Debug_spanningtree\</IntDir>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|X64'">m_spanningtree</TargetName>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|X64'">.so</TargetExt>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|X64'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\bin\release\modules\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">m_spanningtree</TargetName>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.so</TargetExt>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|X64'">..\bin\release_x64\modules\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|X64'">x64Release_spanningtree\</IntDir>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|X64'">m_spanningtree</TargetName>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|X64'">.so</TargetExt>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|X64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\include;..\win;..\src\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_DEBUG;_USRDLL;DLL_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>false</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level4</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <MultiProcessorCompilation>true</MultiProcessorCompilation>
- </ClCompile>
- <Link>
- <AdditionalDependencies>inspircd.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>..\bin\debug\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)m_spanningtree.pdb</ProgramDatabaseFile>
- <SubSystem>Windows</SubSystem>
- <RandomizedBaseAddress>true</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <ImportLibrary>$(OutDir)m_spanningtree.lib</ImportLibrary>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|X64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\include;..\win;..\src\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_DEBUG;_USRDLL;DLL_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>false</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level4</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <MultiProcessorCompilation>true</MultiProcessorCompilation>
- </ClCompile>
- <Link>
- <AdditionalDependencies>inspircd.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>..\bin\debug_x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)m_spanningtree.pdb</ProgramDatabaseFile>
- <SubSystem>Windows</SubSystem>
- <RandomizedBaseAddress>true</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <ImportLibrary>$(OutDir)m_spanningtree.lib</ImportLibrary>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
- <Optimization>MaxSpeed</Optimization>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <AdditionalIncludeDirectories>..\include;..\win;..\src\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>NDEBUG;_USRDLL;DLL_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>false</MinimalRebuild>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level2</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <MultiProcessorCompilation>true</MultiProcessorCompilation>
- </ClCompile>
- <Link>
- <AdditionalDependencies>inspircd.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>..\bin\release\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Windows</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
- <RandomizedBaseAddress>true</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <ImportLibrary>$(OutDir)m_spanningtree.lib</ImportLibrary>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|X64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <AdditionalIncludeDirectories>..\include;..\win;..\src\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>NDEBUG;_USRDLL;DLL_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>false</MinimalRebuild>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level2</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <MultiProcessorCompilation>true</MultiProcessorCompilation>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </ClCompile>
- <Link>
- <AdditionalDependencies>inspircd.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>..\bin\release_x64\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Windows</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>true</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <ImportLibrary>$(OutDir)m_spanningtree.lib</ImportLibrary>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\src\modules\m_spanningtree\addline.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\away.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\cachetimer.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\capab.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\compat.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\delline.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\encap.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\fjoin.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\fmode.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\ftopic.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\hmac.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\idle.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\main.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\metadata.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\netburst.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\nickcollide.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\operquit.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\opertype.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\override_map.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\override_squit.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\override_stats.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\override_whois.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\ping.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\pong.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\postcommand.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\precommand.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\protocolinterface.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\push.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\rconnect.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\resolvers.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\rsquit.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\save.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\server.cpp">
- <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)servers_spanningtree.obj</ObjectFileName>
- </ClCompile>
- <ClCompile Include="..\src\modules\m_spanningtree\svsjoin.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\svsnick.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\svspart.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\treeserver.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\treesocket1.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\treesocket2.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\uid.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\utils.cpp" />
- <ClCompile Include="..\src\modules\m_spanningtree\version.cpp" />
- <ClCompile Include="inspircd_memory_functions.cpp" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\src\modules\m_spanningtree\cachetimer.h" />
- <ClInclude Include="..\src\modules\m_spanningtree\link.h" />
- <ClInclude Include="..\src\modules\m_spanningtree\main.h" />
- <ClInclude Include="..\src\modules\m_spanningtree\protocolinterface.h" />
- <ClInclude Include="..\src\modules\m_spanningtree\rconnect.h" />
- <ClInclude Include="..\src\modules\m_spanningtree\resolvers.h" />
- <ClInclude Include="..\src\modules\m_spanningtree\rsquit.h" />
- <ClInclude Include="..\src\modules\m_spanningtree\treeserver.h" />
- <ClInclude Include="..\src\modules\m_spanningtree\treesocket.h" />
- <ClInclude Include="..\src\modules\m_spanningtree\utils.h" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="inspircd.vcxproj">
- <Project>{fe82a6fc-41c7-4cb1-aa46-6dbcb6c682c8}</Project>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
\ No newline at end of file
--- /dev/null
+file(GLOB INSPIRCD_MODULES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${INSPIRCD_BASE}/src/commands/*.cpp" "${INSPIRCD_BASE}/src/modules/*.cpp")\r
+list(SORT INSPIRCD_MODULES)\r
+\r
+add_definitions("-DDLL_BUILD")\r
+\r
+foreach(MODULE_NAME ${INSPIRCD_MODULES})\r
+ string(REGEX REPLACE "^.*[/\\](.*).cpp$" "\\1.so" SO_NAME ${MODULE_NAME})\r
+ add_library(${SO_NAME} MODULE ${MODULE_NAME})\r
+ set_target_properties(${SO_NAME} PROPERTIES PREFIX "" SUFFIX "")\r
+ target_link_libraries(${SO_NAME} inspircd)\r
+ add_dependencies(${SO_NAME} inspircd)\r
+ if(MSVC)\r
+ target_link_libraries(${SO_NAME} win32_memory)\r
+ add_dependencies(${SO_NAME} win32_memory)\r
+ endif(MSVC)\r
+ install(TARGETS ${SO_NAME} DESTINATION modules)\r
+endforeach(MODULE_NAME ${INSPIRCD_MODULES})\r
+\r
+file(GLOB INSPIRCD_MODULES_SPANNINGTREE RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${INSPIRCD_BASE}/src/modules/m_spanningtree/*.cpp")\r
+list(SORT INSPIRCD_MODULES_SPANNINGTREE)\r
+\r
+add_library(m_spanningtree.so MODULE ${INSPIRCD_MODULES_SPANNINGTREE})\r
+set_target_properties(m_spanningtree.so PROPERTIES PREFIX "" SUFFIX "")\r
+target_link_libraries(m_spanningtree.so inspircd)\r
+add_dependencies(m_spanningtree.so inspircd)\r
+if(MSVC)\r
+ target_link_libraries(m_spanningtree.so win32_memory)\r
+ add_dependencies(m_spanningtree.so win32_memory)\r
+endif(MSVC)\r
+install(TARGETS m_spanningtree.so DESTINATION modules)
\ No newline at end of file
+++ /dev/null
-101 ICON "inspircd.ico"\r
-\r
-1 VERSIONINFO\r
- FILEVERSION 2,0,0,0\r
- PRODUCTVERSION 2,0,0,0\r
- FILEFLAGSMASK 0x3fL\r
-#ifdef _DEBUG\r
- FILEFLAGS 0x1L\r
-#else\r
- FILEFLAGS 0x0L\r
-#endif\r
- FILEOS 0x40004L\r
- FILETYPE 0x1L\r
- FILESUBTYPE 0x0L\r
-BEGIN\r
- BLOCK "StringFileInfo"\r
- BEGIN\r
- BLOCK "040904b0"\r
- BEGIN\r
- VALUE "Comments", "InspIRCd 2.0 IRC Daemon\0"\r
- VALUE "CompanyName", "InspIRCd Development Team\0"\r
- VALUE "FileDescription", "InspIRCd\0"\r
- VALUE "FileVersion", "2, 0, 0, 0\0"\r
- VALUE "InternalName", "InspIRCd\0"\r
- VALUE "LegalCopyright", "Copyright (c) 2012 InspIRCd Development Team\0"\r
- VALUE "LegalTrademarks", "\0"\r
- VALUE "OriginalFilename", "inspircd.exe\0"\r
- VALUE "PrivateBuild", "\0"\r
- VALUE "ProductName", "InspIRCd - The Inspire IRC Daemon\0"\r
- VALUE "ProductVersion", "2, 0, 0, 0\0"\r
- VALUE "SpecialBuild", "\0"\r
- END\r
- END\r
- BLOCK "VarFileInfo"\r
- BEGIN\r
- VALUE "Translation", 0x809, 1200\r
- END\r
-END\r
+++ /dev/null
-Microsoft Visual Studio Solution File, Format Version 11.00\r
-# Visual Studio 10\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "inspircd", "inspircd.vcxproj", "{FE82A6FC-41C7-4CB1-AA46-6DBCB6C682C8}"\r
- ProjectSection(ProjectDependencies) = postProject\r
- {B922B569-727E-4EB0-827A-04E133A91DE7} = {B922B569-727E-4EB0-827A-04E133A91DE7}\r
- EndProjectSection\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "configure", "configure.vcxproj", "{B922B569-727E-4EB0-827A-04E133A91DE7}"\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "m_spanningtree", "m_spanningtree.vcxproj", "{1EC86B60-AB2A-4984-8A7E-0422C15601E0}"\r
- ProjectSection(ProjectDependencies) = postProject\r
- {FE82A6FC-41C7-4CB1-AA46-6DBCB6C682C8} = {FE82A6FC-41C7-4CB1-AA46-6DBCB6C682C8}\r
- EndProjectSection\r
-EndProject\r
-Global\r
- GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
- Debug|Win32 = Debug|Win32\r
- Debug|x64 = Debug|x64\r
- Release|Win32 = Release|Win32\r
- Release|x64 = Release|x64\r
- EndGlobalSection\r
- GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
- {FE82A6FC-41C7-4CB1-AA46-6DBCB6C682C8}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {FE82A6FC-41C7-4CB1-AA46-6DBCB6C682C8}.Debug|Win32.Build.0 = Debug|Win32\r
- {FE82A6FC-41C7-4CB1-AA46-6DBCB6C682C8}.Debug|x64.ActiveCfg = Debug|X64\r
- {FE82A6FC-41C7-4CB1-AA46-6DBCB6C682C8}.Debug|x64.Build.0 = Debug|X64\r
- {FE82A6FC-41C7-4CB1-AA46-6DBCB6C682C8}.Release|Win32.ActiveCfg = Release|Win32\r
- {FE82A6FC-41C7-4CB1-AA46-6DBCB6C682C8}.Release|Win32.Build.0 = Release|Win32\r
- {FE82A6FC-41C7-4CB1-AA46-6DBCB6C682C8}.Release|x64.ActiveCfg = Release|X64\r
- {FE82A6FC-41C7-4CB1-AA46-6DBCB6C682C8}.Release|x64.Build.0 = Release|X64\r
- {B922B569-727E-4EB0-827A-04E133A91DE7}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {B922B569-727E-4EB0-827A-04E133A91DE7}.Debug|Win32.Build.0 = Debug|Win32\r
- {B922B569-727E-4EB0-827A-04E133A91DE7}.Debug|x64.ActiveCfg = Debug|X64\r
- {B922B569-727E-4EB0-827A-04E133A91DE7}.Debug|x64.Build.0 = Debug|X64\r
- {B922B569-727E-4EB0-827A-04E133A91DE7}.Release|Win32.ActiveCfg = Release|Win32\r
- {B922B569-727E-4EB0-827A-04E133A91DE7}.Release|Win32.Build.0 = Release|Win32\r
- {B922B569-727E-4EB0-827A-04E133A91DE7}.Release|x64.ActiveCfg = Release|X64\r
- {B922B569-727E-4EB0-827A-04E133A91DE7}.Release|x64.Build.0 = Release|X64\r
- {1EC86B60-AB2A-4984-8A7E-0422C15601E0}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {1EC86B60-AB2A-4984-8A7E-0422C15601E0}.Debug|Win32.Build.0 = Debug|Win32\r
- {1EC86B60-AB2A-4984-8A7E-0422C15601E0}.Debug|x64.ActiveCfg = Debug|X64\r
- {1EC86B60-AB2A-4984-8A7E-0422C15601E0}.Debug|x64.Build.0 = Debug|X64\r
- {1EC86B60-AB2A-4984-8A7E-0422C15601E0}.Release|Win32.ActiveCfg = Release|Win32\r
- {1EC86B60-AB2A-4984-8A7E-0422C15601E0}.Release|Win32.Build.0 = Release|Win32\r
- {1EC86B60-AB2A-4984-8A7E-0422C15601E0}.Release|x64.ActiveCfg = Release|X64\r
- {1EC86B60-AB2A-4984-8A7E-0422C15601E0}.Release|x64.Build.0 = Release|X64\r
- EndGlobalSection\r
- GlobalSection(SolutionProperties) = preSolution\r
- HideSolutionNode = FALSE\r
- EndGlobalSection\r
-EndGlobal\r