diff --git a/Code/Installer/generateWxs.py b/Code/Installer/generateWxs.py index 1637ff537a801b6933d80e9e21f862da6eae466c..94afaefd33dbdf0919c69a9e4a9c12798d1a5571 100644 --- a/Code/Installer/generateWxs.py +++ b/Code/Installer/generateWxs.py @@ -454,7 +454,6 @@ addFileV('MantidProperties','Mantid.pro','Mantid.properties','Mantid.properties' MantidScript = addFileV('MantidScript','MScr.bat','MantidScript.bat','../Mantid/PythonAPI/MantidScript.bat',MantidDlls) addTo(MantidScript,'Shortcut',{'Id':'startmenuMantidScript','Directory':'ProgramMenuDir','Name':'Script','LongName':'Mantid Script','WorkingDirectory':'MantidBin'}) addFileV('MantidStartup','MStart.py','MantidStartup.py','../Mantid/PythonAPI/MantidStartup.py',MantidDlls) -addFileV('MantidHeader','MHeader.py','MantidHeader.py','../Mantid/PythonAPI/MantidHeader.py',MantidDlls) addFileV('MantidPythonAPI_pyd','MPAPI.pyd','MantidPythonAPI.pyd',MANTIDRELEASE + 'MantidPythonAPI.pyd',MantidDlls) addFileV('MantidAPI','MAPI.dll','MantidAPI.dll',MANTIDRELEASE + 'MantidAPI.dll',MantidDlls) addFileV('MantidGeometry','MGeo.dll','MantidGeometry.dll',MANTIDRELEASE + 'MantidGeometry.dll',MantidDlls) diff --git a/Code/Mantid/Kernel/Kernel.vcxproj b/Code/Mantid/Kernel/Kernel.vcxproj index 2f8d90a8c67e8cfa966f8ca13885ea88a6e9930a..0e2ad21732c03a52beb0b24da48712a49cef8148 100644 --- a/Code/Mantid/Kernel/Kernel.vcxproj +++ b/Code/Mantid/Kernel/Kernel.vcxproj @@ -204,6 +204,7 @@ <ClCompile Include="src\LogParser.cpp" /> <ClCompile Include="src\MandatoryValidator.cpp" /> <ClCompile Include="src\MaskedProperty.cpp" /> + <ClCompile Include="src\NeutronAtom.cpp" /> <ClCompile Include="src\Property.cpp" /> <ClCompile Include="src\PropertyHistory.cpp" /> <ClCompile Include="src\PropertyManager.cpp" /> @@ -231,6 +232,7 @@ <ClInclude Include="inc\mantidkernel\facilityinfo.h" /> <ClInclude Include="inc\mantidkernel\instrumentinfo.h" /> <ClInclude Include="inc\MantidKernel\LogParser.h" /> + <ClInclude Include="inc\MantidKernel\NeutronAtom.h" /> <ClInclude Include="inc\MantidKernel\TimeSplitter.h" /> <ClInclude Include="test\ArrayPropertyTest.h" /> <ClInclude Include="inc\MantidKernel\BoundedValidator.h" /> diff --git a/Code/Mantid/Kernel/Kernel.vcxproj.filters b/Code/Mantid/Kernel/Kernel.vcxproj.filters index e6b29a1e0e9d007160ba14c8fb04f7914bebb1d0..61c42a180e6ca632c98c55a075539cb405d74bb8 100644 --- a/Code/Mantid/Kernel/Kernel.vcxproj.filters +++ b/Code/Mantid/Kernel/Kernel.vcxproj.filters @@ -138,6 +138,9 @@ <ClCompile Include="src\LogParser.cpp"> <Filter>Source Files</Filter> </ClCompile> + <ClCompile Include="src\NeutronAtom.cpp"> + <Filter>Source Files</Filter> + </ClCompile> </ItemGroup> <ItemGroup> <ClInclude Include="inc\MantidKernel\ArrayProperty.h"> @@ -368,6 +371,9 @@ <ClInclude Include="inc\MantidKernel\LogParser.h"> <Filter>Header Files</Filter> </ClInclude> + <ClInclude Include="inc\MantidKernel\NeutronAtom.h"> + <Filter>Header Files</Filter> + </ClInclude> </ItemGroup> <ItemGroup> <None Include="test\TestChannel.hh"> diff --git a/Code/Mantid/Kernel/inc/MantidKernel/ConfigService.h b/Code/Mantid/Kernel/inc/MantidKernel/ConfigService.h index e2a90da8a7fd1ea2a35be0b30b5a10e7076d50ec..b8c0a3bec651711658eac6f3fd95a654c9511819 100644 --- a/Code/Mantid/Kernel/inc/MantidKernel/ConfigService.h +++ b/Code/Mantid/Kernel/inc/MantidKernel/ConfigService.h @@ -30,6 +30,12 @@ namespace Poco namespace Mantid { + /** + * Returns the welcome message for Mantid. This is echoed to stdout by the + * ConfigService + */ + static std::string welcomeMessage(); + namespace Kernel { //---------------------------------------------------------------------- @@ -105,9 +111,7 @@ namespace Mantid std::string m_value; ///< The new value for the property std::string m_prev; ///< The previous value for the property }; - - - + /// Wipe out the current configuration and load a new one void updateConfig(const std::string& filename, const bool append=false, const bool update_caches=true); /// Save the configuration to the user file @@ -122,19 +126,28 @@ namespace Mantid /// Return the user properties filename std::string getUserFilename() const; - // Searches for the given environment variable and returns it as a string + /** @name Host information */ + //@{ + /// Searches for the given environment variable and returns it as a string std::string getEnvironment(const std::string& keyName); - - // Getters for properties of the host system + /// Returns the OS name std::string getOSName(); + /// Returns the computer name std::string getComputerName(); + /// Returns the architecture std::string getOSArchitecture(); + /// Returns the OS version std::string getOSVersion(); + /// Returns the current directory std::string getCurrentDir(); + /// Returns the system's temp directory std::string getTempDir(); + //@} + + /// Returns the directory where the framework libraries lie std::string getBaseDir() const; + /// Returns a directory to use as a default output directory std::string getOutputDir() const; - /// Get the list of search paths const std::vector<std::string>& getDataSearchDirs() const; /// Gets the instrument geometry filename diff --git a/Code/Mantid/Kernel/src/ConfigService.cpp b/Code/Mantid/Kernel/src/ConfigService.cpp index c85789cd04d81e0dacd0963b971ab99d8e351d72..ebadd55ab449b32c561837f27d0b8f82efcecb21 100644 --- a/Code/Mantid/Kernel/src/ConfigService.cpp +++ b/Code/Mantid/Kernel/src/ConfigService.cpp @@ -31,6 +31,14 @@ namespace Mantid { + /** + * Returns the welcome message for Mantid. This is echoed to stdout by the ConfigService. + */ + std::string welcomeMessage() + { + return "Welcome to Mantid - Manipulation and Analysis Toolkit for Instrument Data"; + } + namespace Kernel { @@ -178,6 +186,7 @@ ConfigServiceImpl::ConfigServiceImpl() : g_log.debug() << "ConfigService created." << std::endl; g_log.debug() << "Configured base directory of application as " << getBaseDir() << std::endl; + std::cout << "\n" << Mantid::welcomeMessage() << "\n" << std::endl; g_log.information() << "This is Mantid Version " << MANTID_VERSION << std::endl; } diff --git a/Code/Mantid/PythonAPI/MantidHeader.py b/Code/Mantid/PythonAPI/MantidHeader.py deleted file mode 100644 index 83cf266074981ba2cdf2c263aa1734b74fe86d20..0000000000000000000000000000000000000000 --- a/Code/Mantid/PythonAPI/MantidHeader.py +++ /dev/null @@ -1,9 +0,0 @@ -########################################################## -# # -# A wrapper module to handle creating the Mantid Python # -# framework. # -# # -########################################################## -from MantidFramework import * - -mtd.initialise(False) diff --git a/Code/Mantid/PythonAPI/MantidStartup.py b/Code/Mantid/PythonAPI/MantidStartup.py index d260cd590bd6297f266b4835a7c18252b0bd0ac6..91199dacbee29000671e3ceb79f03b898b6014fc 100644 --- a/Code/Mantid/PythonAPI/MantidStartup.py +++ b/Code/Mantid/PythonAPI/MantidStartup.py @@ -1,4 +1,5 @@ -from MantidHeader import * +from MantidFramework import * +mtd.initialise() print "\n==== Mantid Scripting Interface ==== \n" print "Mantid Framework Manager 'mantid' ready.\n" -mantidHelp() \ No newline at end of file +print "Type mtdHelp() for a list of available algorithms" \ No newline at end of file