ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
April 2005
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
26 participants
477 discussions
Start a n
N
ew thread
[chorns] 14472: Add missing file
by chorns@svn.reactos.com
Add missing file Added: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/pipe_detectio n.c _____ Added: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/pipe_detectio n.c --- branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/pipe_detectio n.c 2005-04-03 11:57:34 UTC (rev 14471) +++ branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/pipe_detectio n.c 2005-04-03 11:58:31 UTC (rev 14472) @@ -0,0 +1,5 @@ +int +main ( int argc, char** argv ) +{ + return 0; +}
19 years, 8 months
1
0
0
0
[chorns] 14471: Verbose mode
by chorns@svn.reactos.com
Verbose mode Modified: branches/xmlbuildsystem/reactos/Makefile Modified: branches/xmlbuildsystem/reactos/tools/rbuild/automaticdependency.cpp Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/backend.cpp Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/backend.h Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/devcpp/devcpp.cpp Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/devcpp/devcpp.h Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.cpp Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.h Modified: branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.cpp Modified: branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.h _____ Modified: branches/xmlbuildsystem/reactos/Makefile --- branches/xmlbuildsystem/reactos/Makefile 2005-04-03 11:38:08 UTC (rev 14470) +++ branches/xmlbuildsystem/reactos/Makefile 2005-04-03 11:57:34 UTC (rev 14471) @@ -28,6 +28,9 @@ # without source code) or no (to not build any map files). The variable # defaults to no. # +# ROS_RBUILDFLAGS +# Pass parameters to rbuild. +# .PHONY: all .PHONY: clean @@ -196,7 +199,7 @@ makefile.auto: $(RBUILD_TARGET) $(PREAUTO) $(XMLBUILDFILES) $(ECHO_RBUILD) - $(Q)$(RBUILD_TARGET) mingw + $(Q)$(RBUILD_TARGET) $(ROS_RBUILDFLAGS) mingw $(BUGCODES_H) $(BUGCODES_RC): $(WMC_TARGET) $(NTOSKRNL_MC) _____ Modified: branches/xmlbuildsystem/reactos/tools/rbuild/automaticdependency.cpp --- branches/xmlbuildsystem/reactos/tools/rbuild/automaticdependency.cpp 2005-04-03 11:38:08 UTC (rev 14470) +++ branches/xmlbuildsystem/reactos/tools/rbuild/automaticdependency.cpp 2005-04-03 11:57:34 UTC (rev 14471) @@ -65,9 +65,6 @@ throw AccessDeniedException ( filename ); } lastWriteTime = statbuf.st_mtime; -/* printf ( "lastWriteTime of %s is %s\n", - filename.c_str (), - ctime ( &lastWriteTime ) ); */ unsigned long len = (unsigned long) filelen ( f ); if ( len > MAX_BYTES_TO_READ ) @@ -219,7 +216,6 @@ while ( p < end ) { string includedFilename ( "" ); - //printf ( "Parsing '%s'\n", filename.c_str () ); bool includeNext; while ( ReadInclude ( includedFilename, @@ -387,13 +383,12 @@ } void -AutomaticDependency::CheckAutomaticDependencies () +AutomaticDependency::CheckAutomaticDependencies ( bool verbose ) { struct utimbuf timebuf; for ( size_t mi = 0; mi < project.modules.size (); mi++ ) { const vector<File*>& files = project.modules[mi]->non_if_data.files; - //Module& module = *project.modules[mi]; for ( size_t fi = 0; fi < files.size (); fi++ ) { File& file = *files[fi]; @@ -406,20 +401,16 @@ assert ( sourceFile->youngestLastWriteTime != 0 ); if ( sourceFile->youngestLastWriteTime > sourceFile->lastWriteTime ) { - printf ( "Marking %s for rebuild due to younger file %s\n", - sourceFile->filename.c_str (), - sourceFile->youngestFile->filename.c_str () ); + if ( verbose ) + { + printf ( "Marking %s for rebuild due to younger file %s\n", + sourceFile->filename.c_str (), + sourceFile->youngestFile->filename.c_str () ); + } timebuf.actime = sourceFile->youngestLastWriteTime; timebuf.modtime = sourceFile->youngestLastWriteTime; utime ( sourceFile->filename.c_str (), &timebuf ); - - /*printf ( "lastWriteTime of %s is %s\n", - sourceFile->filename.c_str (), - ctime ( &sourceFile->lastWriteTime ) ); - printf ( "youngestLastWriteTime is %s with %s\n", - sourceFile->youngestFile->filename.c_str (), - ctime ( &sourceFile->youngestLastWriteTime ) );*/ } } } _____ Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/backend.cpp --- branches/xmlbuildsystem/reactos/tools/rbuild/backend/backend.cpp 2005-04-03 11:38:08 UTC (rev 14470) +++ branches/xmlbuildsystem/reactos/tools/rbuild/backend/backend.cpp 2005-04-03 11:57:34 UTC (rev 14471) @@ -22,7 +22,7 @@ (*factories)[name] = this; } -Backend::Factory::~Factory() +Backend::Factory::~Factory () { if ( !--ref ) { @@ -33,22 +33,26 @@ /*static*/ Backend* Backend::Factory::Create ( const string& name, - Project& project ) + Project& project, + bool verbose ) { string sname ( name ); strlwr ( &sname[0] ); - if ( !factories || !factories->size() ) - throw Exception ( "internal tool error: no registered factories" ); + if ( !factories || !factories->size () ) + throw InvalidOperationException ( __FILE__, + __LINE__, + "No registered factories" ); Backend::Factory* f = (*factories)[sname]; if ( !f ) { throw UnknownBackendException ( sname ); return NULL; } - return (*f) ( project ); + return (*f) ( project, verbose ); } -Backend::Backend ( Project& project ) - : ProjectNode ( project ) +Backend::Backend ( Project& project, bool verbose ) + : ProjectNode ( project ), + verbose ( verbose ) { } _____ Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/backend.h --- branches/xmlbuildsystem/reactos/tools/rbuild/backend/backend.h 2005-04-03 11:38:08 UTC (rev 14470) +++ branches/xmlbuildsystem/reactos/tools/rbuild/backend/backend.h 2005-04-03 11:57:34 UTC (rev 14471) @@ -5,7 +5,8 @@ class Backend; -typedef Backend* BackendFactory ( Project& project ); +typedef Backend* BackendFactory ( Project& project, + bool verbose ); class Backend { @@ -20,23 +21,23 @@ Factory ( const std::string& name_ ); virtual ~Factory(); - virtual Backend* operator() ( Project& ) = 0; + virtual Backend* operator() ( Project&, bool verbose ) = 0; public: static Backend* Create ( const std::string& name, - Project& project ); - - private: + Project& project, + bool verbose ); }; protected: - Backend ( Project& project ); + Backend ( Project& project, bool verbose ); public: virtual void Process () = 0; protected: Project& ProjectNode; + bool verbose; }; #endif /* __BACKEND_H */ _____ Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/devcpp/devcpp.cpp --- branches/xmlbuildsystem/reactos/tools/rbuild/backend/devcpp/devcpp.cpp 2005-04-03 11:38:08 UTC (rev 14470) +++ branches/xmlbuildsystem/reactos/tools/rbuild/backend/devcpp/devcpp.cpp 2005-04-03 11:57:34 UTC (rev 14471) @@ -1,244 +1,244 @@ -/* - * Dev-C++ Backend - * Copyright (C) 2005 Trevor McCort - * - * This program 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; either version 2 - * of the License, or (at your option) any later version. - * - * 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, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ +/* + * Dev-C++ Backend + * Copyright (C) 2005 Trevor McCort + * + * This program 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; either version 2 + * of the License, or (at your option) any later version. + * + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ #ifdef _MSC_VER #pragma warning ( disable : 4786 ) #endif//_MSC_VER - -#include <iostream> -#include <fstream> -#include <string> - -#include "devcpp.h" - -using namespace std; - -static class DevCppFactory : public Backend::Factory -{ - public: - - DevCppFactory() : Factory("devcpp") {} - Backend *operator() (Project &project) - { - return new DevCppBackend(project); - } - -} factory; - - -DevCppBackend::DevCppBackend(Project &project) : Backend(project) -{ - m_unitCount = 0; -} - -void DevCppBackend::Process() -{ - string filename = ProjectNode.name + ".dev"; - - cout << "Creating Dev-C++ project: " << filename << endl; - - ProcessModules(); - - m_devFile.open(filename.c_str()); - - if(!m_devFile.is_open()) - { - cout << "Could not open file." << endl; - return; - } - - m_devFile << "[Project]" << endl; - - m_devFile << "FileName=" << filename << endl - << "Name=" << ProjectNode.name << endl - << "UnitCount=" << m_unitCount << endl - << "Type=1" << endl - << "Ver=1" << endl - << "ObjFiles=" << endl - << "Includes=" << endl - << "Libs=" << endl - << "PrivateResource=" << endl - << "ResourceIncludes=" << endl - << "MakeIncludes=" << endl - << "Compiler=" << endl - << "CppCompiler=" << endl - << "Linker=" << endl - << "IsCpp=1" << endl - << "Icon=" << endl - << "ExeOutput=" << endl - << "ObjectOutput=" << endl - << "OverrideOutput=0" << endl - << "OverrideOutputName=" << endl - << "HostApplication=" << endl - << "CommandLine=" << endl - << "UseCustomMakefile=1" << endl - << "CustomMakefile=" << ProjectNode.makefile << endl - << "IncludeVersionInto=0" << endl - << "SupportXPThemes=0" << endl - << "CompilerSet=0" << endl - - << "CompilerSettings=0000000000000000000000" << endl; - - OutputFolders(); - - m_devFile << endl << endl; - - OutputFileUnits(); - - m_devFile.close(); - - // Dev-C++ needs a makefile, so use the MinGW backend to create one. - - cout << "Creating Makefile: " << ProjectNode.makefile << endl; - - Backend *backend = Backend::Factory::Create("mingw", ProjectNode); - backend->Process(); - delete backend; - - cout << "Done." << endl << endl; - - cout << "You may want to disable Class browsing (see below) before you open this project in Dev-C++, as the " - << "parsing required for large projects can take quite awhile." - << endl << endl - << "(Tools->Editor Options->Class browsing->Enable class browsing check box)" - << endl << endl; -} - -void DevCppBackend::ProcessModules() -{ - for(size_t i = 0; i < ProjectNode.modules.size(); i++) - { - Module &module = *ProjectNode.modules[i]; - - for(size_t k = 0; k < module.non_if_data.files.size(); k++) - { - File &file = *module.non_if_data.files[k]; - - ProcessFile(file.name); - } - } -} - -bool FileExists(string &filename) -{ - ifstream file(filename.c_str()); - - if(!file.is_open()) - return false; - - file.close(); - return true; -} - -void DevCppBackend::ProcessFile(string &filepath) -{ - // Remove the .\ at the start of the filenames - filepath.erase(0, 2); - - if(!FileExists(filepath)) - return; - - // Change the \ to / - for(size_t i = 0; i < filepath.length(); i++) - { - if(filepath[i] == '\\') - filepath[i] = '/'; - } - - // Remove the filename from the path - string folder = ""; - - size_t pos = filepath.rfind(string("/"), filepath.length() - 1); - - if(pos != string::npos) - { - folder = filepath; - folder.erase(pos, folder.length() - pos); - } - - FileUnit fileUnit; - fileUnit.filename = filepath; - fileUnit.folder = folder; - - m_fileUnits.push_back(fileUnit); - - if(folder != "") - AddFolders(folder); - - m_unitCount++; -} - -bool DevCppBackend::CheckFolderAdded(string &folder) -{ - for(size_t i = 0; i < m_folders.size(); i++) - { - if(m_folders[i] == folder) - return true; - } - - return false; -} - -void DevCppBackend::AddFolders(string &folder) -{ - // Check if this folder was already added. true if it was, false otherwise. - if(CheckFolderAdded(folder)) - return; - - m_folders.push_back(folder); - - size_t pos = folder.rfind(string("/"), folder.length() - 1); - - if(pos == string::npos) - return; - - folder.erase(pos, folder.length() - pos); - AddFolders(folder); -} - -void DevCppBackend::OutputFolders() -{ - m_devFile << "Folders="; - - for(size_t i = 0; i < m_folders.size(); i++) - { - if(i > 0) - m_devFile << ","; - - m_devFile << m_folders[i]; - } -} - -void DevCppBackend::OutputFileUnits() -{ - for(size_t i = 0; i < m_fileUnits.size(); i++) - { - m_devFile << "[Unit" << i + 1 << "]" << endl; - - - m_devFile << "FileName=" << m_fileUnits[i].filename << endl; - m_devFile << "CompileCpp=1" << endl; - m_devFile << "Folder=" << m_fileUnits[i].folder << endl; - m_devFile << "Compile=1" << endl; - m_devFile << "Link=1" << endl; - m_devFile << "Priority=1000" << endl; - m_devFile << "OverrideBuildCmd=0" << endl; - m_devFile << "BuildCmd=" << endl << endl;; - } -} + +#include <iostream> +#include <fstream> +#include <string> + +#include "devcpp.h" + +using namespace std; + +static class DevCppFactory : public Backend::Factory +{ + public: + + DevCppFactory() : Factory("devcpp") {} + Backend *operator() (Project &project, bool verbose) + { + return new DevCppBackend(project, verbose); + } + +} factory; + + +DevCppBackend::DevCppBackend(Project &project, bool verbose) : Backend(project, verbose) +{ + m_unitCount = 0; +} + +void DevCppBackend::Process() +{ + string filename = ProjectNode.name + ".dev"; + + cout << "Creating Dev-C++ project: " << filename << endl; + + ProcessModules(); + + m_devFile.open(filename.c_str()); + + if(!m_devFile.is_open()) + { + cout << "Could not open file." << endl; + return; + } + + m_devFile << "[Project]" << endl; + + m_devFile << "FileName=" << filename << endl + << "Name=" << ProjectNode.name << endl + << "UnitCount=" << m_unitCount << endl + << "Type=1" << endl + << "Ver=1" << endl + << "ObjFiles=" << endl + << "Includes=" << endl + << "Libs=" << endl + << "PrivateResource=" << endl + << "ResourceIncludes=" << endl + << "MakeIncludes=" << endl + << "Compiler=" << endl + << "CppCompiler=" << endl + << "Linker=" << endl + << "IsCpp=1" << endl + << "Icon=" << endl + << "ExeOutput=" << endl + << "ObjectOutput=" << endl + << "OverrideOutput=0" << endl + << "OverrideOutputName=" << endl + << "HostApplication=" << endl + << "CommandLine=" << endl + << "UseCustomMakefile=1" << endl + << "CustomMakefile=" << ProjectNode.makefile << endl + << "IncludeVersionInto=0" << endl + << "SupportXPThemes=0" << endl + << "CompilerSet=0" << endl + + << "CompilerSettings=0000000000000000000000" << endl; + + OutputFolders(); + + m_devFile << endl << endl; + + OutputFileUnits(); + + m_devFile.close(); + + // Dev-C++ needs a makefile, so use the MinGW backend to create one. + + cout << "Creating Makefile: " << ProjectNode.makefile << endl; + + Backend *backend = Backend::Factory::Create("mingw", ProjectNode, verbose ); + backend->Process(); + delete backend; + + cout << "Done." << endl << endl; + + cout << "You may want to disable Class browsing (see below) before you open this project in Dev-C++, as the " + << "parsing required for large projects can take quite awhile." + << endl << endl + << "(Tools->Editor Options->Class browsing->Enable class browsing check box)" + << endl << endl; +} + +void DevCppBackend::ProcessModules() +{ + for(size_t i = 0; i < ProjectNode.modules.size(); i++) + { + Module &module = *ProjectNode.modules[i]; + + for(size_t k = 0; k < module.non_if_data.files.size(); k++) + { + File &file = *module.non_if_data.files[k]; + + ProcessFile(file.name); + } + } +} + +bool FileExists(string &filename) +{ + ifstream file(filename.c_str()); + + if(!file.is_open()) + return false; + + file.close(); + return true; +} + +void DevCppBackend::ProcessFile(string &filepath) +{ + // Remove the .\ at the start of the filenames + filepath.erase(0, 2); + + if(!FileExists(filepath)) + return; + + // Change the \ to / + for(size_t i = 0; i < filepath.length(); i++) + { + if(filepath[i] == '\\') + filepath[i] = '/'; + } + + // Remove the filename from the path + string folder = ""; + + size_t pos = filepath.rfind(string("/"), filepath.length() - 1); + + if(pos != string::npos) + { + folder = filepath; + folder.erase(pos, folder.length() - pos); + } + + FileUnit fileUnit; + fileUnit.filename = filepath; + fileUnit.folder = folder; + + m_fileUnits.push_back(fileUnit); + + if(folder != "") + AddFolders(folder); + + m_unitCount++; +} + +bool DevCppBackend::CheckFolderAdded(string &folder) +{ + for(size_t i = 0; i < m_folders.size(); i++) + { + if(m_folders[i] == folder) + return true; + } + + return false; +} + +void DevCppBackend::AddFolders(string &folder) +{ + // Check if this folder was already added. true if it was, false otherwise. + if(CheckFolderAdded(folder)) + return; + + m_folders.push_back(folder); + + size_t pos = folder.rfind(string("/"), folder.length() - 1); + + if(pos == string::npos) + return; + + folder.erase(pos, folder.length() - pos); + AddFolders(folder); +} + +void DevCppBackend::OutputFolders() +{ + m_devFile << "Folders="; + + for(size_t i = 0; i < m_folders.size(); i++) + { + if(i > 0) + m_devFile << ","; + + m_devFile << m_folders[i]; + } +} + +void DevCppBackend::OutputFileUnits() +{ + for(size_t i = 0; i < m_fileUnits.size(); i++) + { + m_devFile << "[Unit" << i + 1 << "]" << endl; + + + m_devFile << "FileName=" << m_fileUnits[i].filename << endl; + m_devFile << "CompileCpp=1" << endl; + m_devFile << "Folder=" << m_fileUnits[i].folder << endl; + m_devFile << "Compile=1" << endl; + m_devFile << "Link=1" << endl; + m_devFile << "Priority=1000" << endl; + m_devFile << "OverrideBuildCmd=0" << endl; + m_devFile << "BuildCmd=" << endl << endl;; + } +} _____ Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/devcpp/devcpp.h --- branches/xmlbuildsystem/reactos/tools/rbuild/backend/devcpp/devcpp.h 2005-04-03 11:38:08 UTC (rev 14470) +++ branches/xmlbuildsystem/reactos/tools/rbuild/backend/devcpp/devcpp.h 2005-04-03 11:57:34 UTC (rev 14471) @@ -19,7 +19,7 @@ { public: - DevCppBackend(Project &project); + DevCppBackend(Project &project, bool verbose); virtual ~DevCppBackend() {} virtual void Process(); _____ Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.cpp --- branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.cpp 2005-04-03 11:38:08 UTC (rev 14470) +++ branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.cpp 2005-04-03 11:57:34 UTC (rev 14471) @@ -27,7 +27,8 @@ directory_map subdirs; Directory ( const string& name ); void Add ( const char* subdir ); - void GenerateTree ( const string& parent ); + void GenerateTree ( const string& parent, + bool verbose ); private: bool mkdir_p ( const char* path ); string ReplaceVariable ( string name, @@ -139,7 +140,8 @@ } void -Directory::GenerateTree ( const string& parent ) +Directory::GenerateTree ( const string& parent, + bool verbose ) { string path; @@ -149,7 +151,7 @@ path = parent + SSEP + name; ResolveVariablesInPath ( buf, path ); - if ( CreateDirectory ( buf ) ) + if ( CreateDirectory ( buf ) && verbose ) printf ( "Created %s\n", buf ); } else @@ -159,7 +161,7 @@ i != subdirs.end(); ++i ) { - i->second->GenerateTree ( path ); + i->second->GenerateTree ( path, verbose ); } } @@ -167,15 +169,15 @@ { public: MingwFactory() : Factory ( "mingw" ) {} - Backend* operator() ( Project& project ) + Backend* operator() ( Project& project, bool verbose ) { - return new MingwBackend ( project ); + return new MingwBackend ( project, verbose ); } } factory; -MingwBackend::MingwBackend ( Project& project ) - : Backend ( project ), +MingwBackend::MingwBackend ( Project& project, bool verbose ) + : Backend ( project, verbose ), int_directories ( new Directory("$(INTERMEDIATE)") ), out_directories ( new Directory("$(OUTPUT)") ) { @@ -202,20 +204,12 @@ } void -MingwBackend::Process () +MingwBackend::ProcessModules () { - size_t i; + printf ( "Processing modules..." ); - DetectPipeSupport (); - DetectPCHSupport (); - - CreateMakefile (); - GenerateHeader (); - GenerateGlobalVariables (); - GenerateXmlBuildFilesMacro(); - vector<MingwModuleHandler*> v; - + size_t i; for ( i = 0; i < ProjectNode.modules.size (); i++ ) { Module& module = *ProjectNode.modules[i]; @@ -255,6 +249,19 @@ delete v[i]; } + printf ( "done\n" ); +} + +void +MingwBackend::Process () +{ + DetectPipeSupport (); + DetectPCHSupport (); + CreateMakefile (); + GenerateHeader (); + GenerateGlobalVariables (); + GenerateXmlBuildFilesMacro (); + ProcessModules (); GenerateDirectories (); CheckAutomaticDependencies (); CloseMakefile (); @@ -488,9 +495,11 @@ void MingwBackend::CheckAutomaticDependencies () { + printf ( "Checking automatic dependencies..." ); AutomaticDependency automaticDependency ( ProjectNode ); automaticDependency.Process (); - automaticDependency.CheckAutomaticDependencies (); + automaticDependency.CheckAutomaticDependencies ( verbose ); + printf ( "done\n" ); } bool @@ -505,8 +514,10 @@ void MingwBackend::GenerateDirectories () { - int_directories->GenerateTree ( "" ); - out_directories->GenerateTree ( "" ); + printf ( "Creating directories..." ); + int_directories->GenerateTree ( "", verbose ); + out_directories->GenerateTree ( "", verbose ); + printf ( "done\n" ); } string _____ Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.h --- branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.h 2005-04-03 11:38:08 UTC (rev 14470) +++ branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.h 2005-04-03 11:57:34 UTC (rev 14471) @@ -15,7 +15,7 @@ class MingwBackend : public Backend { public: - MingwBackend ( Project& project ); + MingwBackend ( Project& project, bool verbose ); virtual ~MingwBackend (); virtual void Process (); std::string AddDirectoryTarget ( const std::string& directory, bool out ); @@ -40,6 +40,7 @@ bool IncludeDirectoryTarget ( const std::string& directory ) const; void DetectPipeSupport (); void DetectPCHSupport (); + void ProcessModules (); FILE* fMakefile; bool use_pch; Directory *int_directories, *out_directories; _____ Modified: branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.cpp --- branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.cpp 2005-04-03 11:38:08 UTC (rev 14470) +++ branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.cpp 2005-04-03 11:57:34 UTC (rev 14471) @@ -16,24 +16,72 @@ using std::string; using std::vector; +static string BuildSystem; +static bool Verbose = false; + +bool +ParseSwitch ( int argc, char** argv, int index ) +{ + char switchChar = argv[index][1]; + switch ( switchChar ) + { + case 'v': + Verbose = true; + break; + default: + printf ( "Unknown switch -%c", + switchChar ); + return false; + } + return true; +} + +bool +ParseArguments ( int argc, char** argv ) +{ + if ( argc < 2 ) + return false; + + for ( int i = 1; i < argc; i++ ) + { + if ( argv[i][0] == '-' ) + { + if ( !ParseSwitch ( argc, argv, i ) ) + return false; + } + else + BuildSystem = argv[i]; + } + + return true; +} + int main ( int argc, char** argv ) { - if ( argc != 2 ) + if ( !ParseArguments ( argc, argv ) ) { - printf ( "syntax: rbuild {buildtarget}\n" ); + printf ( "Generates project files for buildsystems\n\n" ); + printf ( " rbuild [-v] buildsystem\n\n" ); + printf ( "Switches:\n" ); + printf ( " -v Be verbose\n" ); + printf ( "\n" ); + printf ( " buildsystem Target build system. Can be one of:\n" ); + printf ( " mingw MinGW\n" ); + printf ( " devcpp DevC++\n" ); return 1; } - string buildtarget ( argv[1] ); - strlwr ( &buildtarget[0] ); try { string projectFilename ( "ReactOS.xml" ); + printf ( "Reading build files..." ); Project project ( projectFilename ); + printf ( "done\n" ); project.WriteConfigurationFile (); project.ExecuteInvocations (); - Backend* backend = Backend::Factory::Create ( buildtarget, - project ); + Backend* backend = Backend::Factory::Create ( BuildSystem, + project, + Verbose ); backend->Process (); delete backend; @@ -41,8 +89,8 @@ } catch (Exception& ex) { - printf ( "%s: %s\n", - typeid(ex).name(), ex.Message.c_str() ); + printf ( "%s\n", + ex.Message.c_str () ); return 1; } } _____ Modified: branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.h --- branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.h 2005-04-03 11:38:08 UTC (rev 14470) +++ branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.h 2005-04-03 11:57:34 UTC (rev 14471) @@ -469,7 +469,7 @@ const std::string& filename, SourceFile* parentSourceFile ); SourceFile* RetrieveFromCache ( const std::string& filename ); - void CheckAutomaticDependencies (); + void CheckAutomaticDependencies ( bool verbose ); void CheckAutomaticDependenciesForFile ( SourceFile* sourceFile ); private: void ProcessModule ( Module& module );
19 years, 8 months
1
0
0
0
[mf] 14470: show logoff dialog in lean explorer
by mf@svn.reactos.com
show logoff dialog in lean explorer Modified: branches/lean-explorer/reactos/subsys/system/explorer/explorer-jp.rc Modified: branches/lean-explorer/reactos/subsys/system/explorer/explorer_intres.h Modified: branches/lean-explorer/reactos/subsys/system/explorer/explorer_intres.rc Modified: branches/lean-explorer/reactos/subsys/system/explorer/shell/mainframe.cp p Modified: branches/lean-explorer/reactos/subsys/system/explorer/shell/shellbrowser .cpp Modified: branches/lean-explorer/reactos/subsys/system/explorer/taskbar/desktopbar .h Modified: branches/lean-explorer/reactos/subsys/system/explorer/taskbar/startmenu. cpp Modified: branches/lean-explorer/reactos/subsys/system/explorer/taskbar/startmenu. h Modified: trunk/reactos/subsys/system/explorer/explorer_intres.rc Modified: trunk/reactos/subsys/system/explorer/taskbar/startmenu.cpp Modified: trunk/reactos/subsys/system/explorer/taskbar/startmenu.h _____ Modified: branches/lean-explorer/reactos/subsys/system/explorer/explorer-jp.rc (Binary files differ) _____ Modified: branches/lean-explorer/reactos/subsys/system/explorer/explorer_intres.h --- branches/lean-explorer/reactos/subsys/system/explorer/explorer_intres.h 2005-04-03 11:23:03 UTC (rev 14469) +++ branches/lean-explorer/reactos/subsys/system/explorer/explorer_intres.h 2005-04-03 11:38:08 UTC (rev 14470) @@ -34,6 +34,7 @@ #define IDS_STARTMENU 32 #define IDS_MINIMIZE_ALL 33 #define IDS_DESKTOP_NUM 34 +#define IDS_TERMINATE 45 #define IDI_REACTOS 100 #define IDI_EXPLORER 101 #define IDI_STARTMENU 102 _____ Modified: branches/lean-explorer/reactos/subsys/system/explorer/explorer_intres.rc --- branches/lean-explorer/reactos/subsys/system/explorer/explorer_intres.rc 2005-04-03 11:23:03 UTC (rev 14469) +++ branches/lean-explorer/reactos/subsys/system/explorer/explorer_intres.rc 2005-04-03 11:38:08 UTC (rev 14470) @@ -83,6 +83,7 @@ IDS_TITLE "ReactOS Explorer" IDS_START "?ncepe" IDS_LOGOFF "?nchide sesiunea ..." + IDS_TERMINATE "?nchide" IDS_SHUTDOWN "Oprire calculator ..." IDS_LAUNCH "Pornire ..." IDS_START_HELP "Ajutor" @@ -338,6 +339,7 @@ IDS_TITLE "Reactos Explorer" IDS_START "Start" IDS_LOGOFF "Abmelden..." + IDS_TERMINATE "ROS Explorer beenden" IDS_SHUTDOWN "Herunterfahren..." IDS_LAUNCH "Starten..." IDS_START_HELP "Hilfe" @@ -551,6 +553,7 @@ IDS_TITLE "Reactos Explorer" IDS_START "Start" IDS_LOGOFF "Log Off..." + IDS_TERMINATE "Terminate ROS Explorer" IDS_SHUTDOWN "Turn Off..." IDS_LAUNCH "Run..." IDS_START_HELP "Help" @@ -665,6 +668,7 @@ IDS_TITLE "Explorateur Reactos" IDS_START "DÚmarrer" IDS_LOGOFF "DÚconnexion ..." + IDS_TERMINATE "DÚconnexion" IDS_SHUTDOWN "ArrÛter..." IDS_LAUNCH "ExÚcuter..." IDS_START_HELP "Aide" @@ -749,6 +753,7 @@ IDS_TITLE "Explorador do Reactos" IDS_START "Iniciar" IDS_LOGOFF "Terminar sessÒo..." + IDS_TERMINATE "Terminar ROS Explorer" IDS_SHUTDOWN "Desligar..." IDS_LAUNCH "Executar..." IDS_START_HELP "Ajuda" _____ Modified: branches/lean-explorer/reactos/subsys/system/explorer/shell/mainframe.cp p --- branches/lean-explorer/reactos/subsys/system/explorer/shell/mainframe.cp p 2005-04-03 11:23:03 UTC (rev 14469) +++ branches/lean-explorer/reactos/subsys/system/explorer/shell/mainframe.cp p 2005-04-03 11:38:08 UTC (rev 14470) @@ -188,7 +188,7 @@ } else { _create_info._open_mode = mode; _create_info._shell_path = path; - _create_info._root_shell_path = path;//DesktopFolderPath(); //@@ + _create_info._root_shell_path = SpecialFolderPath(CSIDL_DRIVES, _hwnd); //@@ update_explorer_view(); } _____ Modified: branches/lean-explorer/reactos/subsys/system/explorer/shell/shellbrowser .cpp --- branches/lean-explorer/reactos/subsys/system/explorer/shell/shellbrowser .cpp 2005-04-03 11:23:03 UTC (rev 14469) +++ branches/lean-explorer/reactos/subsys/system/explorer/shell/shellbrowser .cpp 2005-04-03 11:38:08 UTC (rev 14470) @@ -662,9 +662,8 @@ } //@@ work around as long as we don't iterate correctly through the ShellEntry tree - if (!entry) { + if (!entry) UpdateFolderView(ShellFolder(pidl)); - } } void ShellBrowserChild::jump_to(Entry* entry) _____ Modified: branches/lean-explorer/reactos/subsys/system/explorer/taskbar/desktopbar .h --- branches/lean-explorer/reactos/subsys/system/explorer/taskbar/desktopbar .h 2005-04-03 11:23:03 UTC (rev 14469) +++ branches/lean-explorer/reactos/subsys/system/explorer/taskbar/desktopbar .h 2005-04-03 11:38:08 UTC (rev 14470) @@ -54,6 +54,7 @@ #define IDC_CONTROL_PANEL 0x1012 #define IDC_PRINTERS 0x1013 #define IDC_SEARCH 0x1016 +#define IDC_TERMINATE 0x1017 #define IDC_FIRST_MENU 0x3000 _____ Modified: branches/lean-explorer/reactos/subsys/system/explorer/taskbar/startmenu. cpp --- branches/lean-explorer/reactos/subsys/system/explorer/taskbar/startmenu. cpp 2005-04-03 11:23:03 UTC (rev 14469) +++ branches/lean-explorer/reactos/subsys/system/explorer/taskbar/startmenu. cpp 2005-04-03 11:38:08 UTC (rev 14470) @@ -1661,6 +1661,9 @@ AddButton(ResString(IDS_SHUTDOWN), ICID_LOGOFF, false, IDC_SHUTDOWN); + AddButton(ResString(IDS_TERMINATE), ICID_LOGOFF, false, IDC_TERMINATE); + + #ifdef __MINGW32__ RegCloseKey(hkeyAdv); RegCloseKey(hkey); @@ -1793,9 +1796,11 @@ break; case IDC_LOGOFF: - /* The shell32 Dialog prompts about some system setting change. This is not what we want to display here. CloseStartMenu(id); - ShowRestartDialog(g_Globals._hwndDesktopBar, EWX_LOGOFF);*/ + ShowLogoffDialog(g_Globals._hwndDesktopBar); + break; + + case IDC_TERMINATE: DestroyWindow(GetParent(_hwnd)); break; @@ -1900,24 +1905,29 @@ } } -void StartMenuHandler::ShowRestartDialog(HWND hwndOwner, UINT flags) +void StartMenuHandler::ShowLogoffDialog(HWND hwndOwner) { - static DynamicFct<RESTARTWINDOWSDLG> RestartDlg(TEXT("SHELL32"), 59); + static DynamicFct<LOGOFFWINDOWSDIALOG> LogoffWindowsDialog(TEXT("SHELL32"), 54); +// static DynamicFct<RESTARTWINDOWSDLG> RestartDialog(TEXT("SHELL32"), 59); - if (RestartDlg) - (*RestartDlg)(hwndOwner, (LPWSTR)L"You selected <Log Off>.\n\n", flags); ///@todo ANSI string conversion if needed + if (LogoffWindowsDialog) + (*LogoffWindowsDialog)(0); +/* The RestartDialog function prompts about some system setting change. This is not what we want to display here. + else if (RestartDialog) + return (*RestartDialog)(hwndOwner, (LPWSTR)L"You selected <Log Off>.\n\n", EWX_LOGOFF) == 1; ///@todo ANSI string conversion if needed +*/ else - MessageBox(hwndOwner, TEXT("RestartDlg() not yet implemented in SHELL32"), ResString(IDS_TITLE), MB_OK); + MessageBox(hwndOwner, TEXT("LogoffWindowsDialog() not yet implemented in SHELL32"), ResString(IDS_TITLE), MB_OK); } void ShowExitWindowsDialog(HWND hwndOwner) { - static DynamicFct<EXITWINDOWSDLG> ExitWindowsDlg(TEXT("SHELL32"), 60); + static DynamicFct<EXITWINDOWSDLG> ExitWindowsDialog(TEXT("SHELL32"), 60); - if (ExitWindowsDlg) - (*ExitWindowsDlg)(hwndOwner); + if (ExitWindowsDialog) + (*ExitWindowsDialog)(hwndOwner); else - MessageBox(hwndOwner, TEXT("ExitWindowsDlg() not yet implemented in SHELL32"), ResString(IDS_TITLE), MB_OK); + MessageBox(hwndOwner, TEXT("ExitWindowsDialog() not yet implemented in SHELL32"), ResString(IDS_TITLE), MB_OK); } _____ Modified: branches/lean-explorer/reactos/subsys/system/explorer/taskbar/startmenu. h --- branches/lean-explorer/reactos/subsys/system/explorer/taskbar/startmenu. h 2005-04-03 11:23:03 UTC (rev 14469) +++ branches/lean-explorer/reactos/subsys/system/explorer/taskbar/startmenu. h 2005-04-03 11:38:08 UTC (rev 14470) @@ -319,9 +319,11 @@ #define RFF_NOSEPARATEMEM 0x20 // Removes the Separate Memory Space check box (Windows NT only). - // declare more undocumented shell32 functions + // declare more previously undocumented shell32 functions typedef void (WINAPI* EXITWINDOWSDLG)(HWND hwndOwner); +typedef int (WINAPI* LOGOFFWINDOWSDIALOG)(UINT flags); typedef int (WINAPI* RESTARTWINDOWSDLG)(HWND hwndOwner, LPCWSTR reason, UINT flags); +typedef int (WINAPI* RESTARTWINDOWSDLGEX)(HWND hWndOwner, LPCWSTR lpwstrReason, DWORD uFlags, DWORD uReason); typedef BOOL (WINAPI* SHFINDFILES)(LPCITEMIDLIST pidlRoot, LPCITEMIDLIST pidlSavedSearch); typedef BOOL (WINAPI* SHFINDCOMPUTER)(LPCITEMIDLIST pidlRoot, LPCITEMIDLIST pidlSavedSearch); @@ -345,7 +347,7 @@ int Command(int id, int code); static void ShowLaunchDialog(HWND hwndOwner); - static void ShowRestartDialog(HWND hwndOwner, UINT flags); + static void ShowLogoffDialog(HWND hwndOwner); static void ShowSearchDialog(); static void ShowSearchComputer(); }; _____ Modified: trunk/reactos/subsys/system/explorer/explorer_intres.rc --- trunk/reactos/subsys/system/explorer/explorer_intres.rc 2005-04-03 11:23:03 UTC (rev 14469) +++ trunk/reactos/subsys/system/explorer/explorer_intres.rc 2005-04-03 11:38:08 UTC (rev 14470) @@ -1926,7 +1926,7 @@ IDS_TITLE "Explorador do Reactos" IDS_START "Iniciar" IDS_LOGOFF "Terminar sessÒo..." - IDS_TERMINATE "Terminar" + IDS_TERMINATE "Terminar ROS Explorador" IDS_SHUTDOWN "Desligar..." IDS_LAUNCH "Executar..." IDS_START_HELP "Ajuda" _____ Modified: trunk/reactos/subsys/system/explorer/taskbar/startmenu.cpp --- trunk/reactos/subsys/system/explorer/taskbar/startmenu.cpp 2005-04-03 11:23:03 UTC (rev 14469) +++ trunk/reactos/subsys/system/explorer/taskbar/startmenu.cpp 2005-04-03 11:38:08 UTC (rev 14470) @@ -1834,7 +1834,7 @@ case IDC_LOGOFF: CloseStartMenu(id); - ShowLogoffDialog(g_Globals._hwndDesktopBar, EWX_LOGOFF); + ShowLogoffDialog(g_Globals._hwndDesktopBar); break; case IDC_TERMINATE: @@ -1979,7 +1979,7 @@ } } -void StartMenuHandler::ShowLogoffDialog(HWND hwndOwner, UINT flags) +void StartMenuHandler::ShowLogoffDialog(HWND hwndOwner) { static DynamicFct<LOGOFFWINDOWSDIALOG> LogoffWindowsDialog(TEXT("SHELL32"), 54); // static DynamicFct<RESTARTWINDOWSDLG> RestartDialog(TEXT("SHELL32"), 59); @@ -1988,7 +1988,7 @@ (*LogoffWindowsDialog)(0); /* The RestartDialog function prompts about some system setting change. This is not what we want to display here. else if (RestartDialog) - return (*RestartDialog)(hwndOwner, (LPWSTR)L"You selected <Log Off>.\n\n", flags) == 1; ///@todo ANSI string conversion if needed + return (*RestartDialog)(hwndOwner, (LPWSTR)L"You selected <Log Off>.\n\n", EWX_LOGOFF) == 1; ///@todo ANSI string conversion if needed */ else MessageBox(hwndOwner, TEXT("LogoffWindowsDialog() not yet implemented in SHELL32"), ResString(IDS_TITLE), MB_OK); _____ Modified: trunk/reactos/subsys/system/explorer/taskbar/startmenu.h --- trunk/reactos/subsys/system/explorer/taskbar/startmenu.h 2005-04-03 11:23:03 UTC (rev 14469) +++ trunk/reactos/subsys/system/explorer/taskbar/startmenu.h 2005-04-03 11:38:08 UTC (rev 14470) @@ -349,7 +349,7 @@ int Command(int id, int code); static void ShowLaunchDialog(HWND hwndOwner); - static void ShowLogoffDialog(HWND hwndOwner, UINT flags); + static void ShowLogoffDialog(HWND hwndOwner); static void ShowSearchDialog(); static void ShowSearchComputer(); };
19 years, 8 months
1
0
0
0
[mf] 14469: display "log off" dialog, add "terminate" menu entry
by mf@svn.reactos.com
display "log off" dialog, add "terminate" menu entry Modified: trunk/reactos/subsys/system/explorer/explorer-jp.rc Modified: trunk/reactos/subsys/system/explorer/explorer_intres.h Modified: trunk/reactos/subsys/system/explorer/explorer_intres.rc Modified: trunk/reactos/subsys/system/explorer/make_explorer.dsp Modified: trunk/reactos/subsys/system/explorer/taskbar/desktopbar.h Modified: trunk/reactos/subsys/system/explorer/taskbar/startmenu.cpp Modified: trunk/reactos/subsys/system/explorer/taskbar/startmenu.h _____ Modified: trunk/reactos/subsys/system/explorer/explorer-jp.rc (Binary files differ) _____ Modified: trunk/reactos/subsys/system/explorer/explorer_intres.h --- trunk/reactos/subsys/system/explorer/explorer_intres.h 2005-04-03 10:46:08 UTC (rev 14468) +++ trunk/reactos/subsys/system/explorer/explorer_intres.h 2005-04-03 11:23:03 UTC (rev 14469) @@ -46,6 +46,7 @@ #define IDS_NOTIFY_AUTOHIDE 42 #define IDS_SHOW_HIDDEN_ICONS 43 #define IDS_HIDE_ICONS 44 +#define IDS_TERMINATE 45 #define IDI_REACTOS 100 #define IDI_EXPLORER 101 #define IDI_STARTMENU 102 _____ Modified: trunk/reactos/subsys/system/explorer/explorer_intres.rc --- trunk/reactos/subsys/system/explorer/explorer_intres.rc 2005-04-03 10:46:08 UTC (rev 14468) +++ trunk/reactos/subsys/system/explorer/explorer_intres.rc 2005-04-03 11:23:03 UTC (rev 14469) @@ -126,6 +126,7 @@ IDS_TITLE "ReactOS Explorer" IDS_START "?ncepe" IDS_LOGOFF "?nchide sesiunea ..." + IDS_TERMINATE "?nchide sesiunea" IDS_SHUTDOWN "Oprire calculator ..." IDS_LAUNCH "Pornire ..." IDS_START_HELP "Ajutor" @@ -583,6 +584,7 @@ IDS_TITLE "Reactos Explorer" IDS_START "Start" IDS_LOGOFF "Abmelden..." + IDS_TERMINATE "ROS Explorer beenden" IDS_SHUTDOWN "Herunterfahren..." IDS_LAUNCH "Starten..." IDS_START_HELP "Hilfe" @@ -1075,6 +1077,7 @@ IDS_TITLE "Reactos Explorer" IDS_START "Start" IDS_LOGOFF "Log Off..." + IDS_TERMINATE "Terminate ROS Explorer" IDS_SHUTDOWN "Turn Off..." IDS_LAUNCH "Run..." IDS_START_HELP "Help" @@ -1538,6 +1541,7 @@ IDS_TITLE "Reactos Explorer" IDS_START "Iniciar" IDS_LOGOFF "Salir..." + IDS_TERMINATE "Salir" IDS_SHUTDOWN "Apagar..." IDS_LAUNCH "Ejecutar..." IDS_START_HELP "Ayuda" @@ -1708,6 +1712,7 @@ IDS_TITLE "Explorateur Reactos" IDS_START "DÚmarrer" IDS_LOGOFF "DÚconnexion ..." + IDS_TERMINATE "DÚconnexion" IDS_SHUTDOWN "ArrÛter..." IDS_LAUNCH "ExÚcuter..." IDS_START_HELP "Aide" @@ -1921,6 +1926,7 @@ IDS_TITLE "Explorador do Reactos" IDS_START "Iniciar" IDS_LOGOFF "Terminar sessÒo..." + IDS_TERMINATE "Terminar" IDS_SHUTDOWN "Desligar..." IDS_LAUNCH "Executar..." IDS_START_HELP "Ajuda" @@ -2412,6 +2418,7 @@ IDS_TITLE "Reactos Explorer" IDS_START "Start" IDS_LOGOFF "Logga ut..." + IDS_TERMINATE "Logga ut" IDS_SHUTDOWN "Stõng av..." IDS_LAUNCH "K÷r..." IDS_START_HELP "Hjõlp" _____ Modified: trunk/reactos/subsys/system/explorer/make_explorer.dsp --- trunk/reactos/subsys/system/explorer/make_explorer.dsp 2005-04-03 10:46:08 UTC (rev 14468) +++ trunk/reactos/subsys/system/explorer/make_explorer.dsp 2005-04-03 11:23:03 UTC (rev 14469) @@ -183,10 +183,6 @@ # Begin Source File -SOURCE=..\..\..\ChangeLog -# End Source File -# Begin Source File - SOURCE=.\Jamfile # End Source File # Begin Source File _____ Modified: trunk/reactos/subsys/system/explorer/taskbar/desktopbar.h --- trunk/reactos/subsys/system/explorer/taskbar/desktopbar.h 2005-04-03 10:46:08 UTC (rev 14468) +++ trunk/reactos/subsys/system/explorer/taskbar/desktopbar.h 2005-04-03 11:23:03 UTC (rev 14469) @@ -56,6 +56,7 @@ #define IDC_BROWSE 0x1014 #define IDC_SEARCH_PROGRAM 0x1015 #define IDC_SEARCH 0x1016 +#define IDC_TERMINATE 0x1017 #define IDC_FIRST_MENU 0x3000 _____ Modified: trunk/reactos/subsys/system/explorer/taskbar/startmenu.cpp --- trunk/reactos/subsys/system/explorer/taskbar/startmenu.cpp 2005-04-03 10:46:08 UTC (rev 14468) +++ trunk/reactos/subsys/system/explorer/taskbar/startmenu.cpp 2005-04-03 11:23:03 UTC (rev 14469) @@ -1690,6 +1690,9 @@ AddButton(ResString(IDS_SHUTDOWN), ICID_LOGOFF, false, IDC_SHUTDOWN); + AddButton(ResString(IDS_TERMINATE), ICID_LOGOFF, false, IDC_TERMINATE); + + #ifdef __MINGW32__ RegCloseKey(hkeyAdv); RegCloseKey(hkey); @@ -1830,9 +1833,11 @@ break; case IDC_LOGOFF: - /* The shell32 Dialog prompts about some system setting change. This is not what we want to display here. CloseStartMenu(id); - ShowRestartDialog(g_Globals._hwndDesktopBar, EWX_LOGOFF);*/ + ShowLogoffDialog(g_Globals._hwndDesktopBar, EWX_LOGOFF); + break; + + case IDC_TERMINATE: DestroyWindow(GetParent(_hwnd)); break; @@ -1974,24 +1979,29 @@ } } -void StartMenuHandler::ShowRestartDialog(HWND hwndOwner, UINT flags) +void StartMenuHandler::ShowLogoffDialog(HWND hwndOwner, UINT flags) { - static DynamicFct<RESTARTWINDOWSDLG> RestartDlg(TEXT("SHELL32"), 59); + static DynamicFct<LOGOFFWINDOWSDIALOG> LogoffWindowsDialog(TEXT("SHELL32"), 54); +// static DynamicFct<RESTARTWINDOWSDLG> RestartDialog(TEXT("SHELL32"), 59); - if (RestartDlg) - (*RestartDlg)(hwndOwner, (LPWSTR)L"You selected <Log Off>.\n\n", flags); ///@todo ANSI string conversion if needed + if (LogoffWindowsDialog) + (*LogoffWindowsDialog)(0); +/* The RestartDialog function prompts about some system setting change. This is not what we want to display here. + else if (RestartDialog) + return (*RestartDialog)(hwndOwner, (LPWSTR)L"You selected <Log Off>.\n\n", flags) == 1; ///@todo ANSI string conversion if needed +*/ else - MessageBox(hwndOwner, TEXT("RestartDlg() not yet implemented in SHELL32"), ResString(IDS_TITLE), MB_OK); + MessageBox(hwndOwner, TEXT("LogoffWindowsDialog() not yet implemented in SHELL32"), ResString(IDS_TITLE), MB_OK); } void ShowExitWindowsDialog(HWND hwndOwner) { - static DynamicFct<EXITWINDOWSDLG> ExitWindowsDlg(TEXT("SHELL32"), 60); + static DynamicFct<EXITWINDOWSDLG> ExitWindowsDialog(TEXT("SHELL32"), 60); - if (ExitWindowsDlg) - (*ExitWindowsDlg)(hwndOwner); + if (ExitWindowsDialog) + (*ExitWindowsDialog)(hwndOwner); else - MessageBox(hwndOwner, TEXT("ExitWindowsDlg() not yet implemented in SHELL32"), ResString(IDS_TITLE), MB_OK); + MessageBox(hwndOwner, TEXT("ExitWindowsDialog() not yet implemented in SHELL32"), ResString(IDS_TITLE), MB_OK); } _____ Modified: trunk/reactos/subsys/system/explorer/taskbar/startmenu.h --- trunk/reactos/subsys/system/explorer/taskbar/startmenu.h 2005-04-03 10:46:08 UTC (rev 14468) +++ trunk/reactos/subsys/system/explorer/taskbar/startmenu.h 2005-04-03 11:23:03 UTC (rev 14469) @@ -321,9 +321,11 @@ #define RFF_NOSEPARATEMEM 0x20 // Removes the Separate Memory Space check box (Windows NT only). - // declare more undocumented shell32 functions + // declare more previously undocumented shell32 functions typedef void (WINAPI* EXITWINDOWSDLG)(HWND hwndOwner); +typedef int (WINAPI* LOGOFFWINDOWSDIALOG)(UINT flags); typedef int (WINAPI* RESTARTWINDOWSDLG)(HWND hwndOwner, LPCWSTR reason, UINT flags); +typedef int (WINAPI* RESTARTWINDOWSDLGEX)(HWND hWndOwner, LPCWSTR lpwstrReason, DWORD uFlags, DWORD uReason); typedef BOOL (WINAPI* SHFINDFILES)(LPCITEMIDLIST pidlRoot, LPCITEMIDLIST pidlSavedSearch); typedef BOOL (WINAPI* SHFINDCOMPUTER)(LPCITEMIDLIST pidlRoot, LPCITEMIDLIST pidlSavedSearch); @@ -347,7 +349,7 @@ int Command(int id, int code); static void ShowLaunchDialog(HWND hwndOwner); - static void ShowRestartDialog(HWND hwndOwner, UINT flags); + static void ShowLogoffDialog(HWND hwndOwner, UINT flags); static void ShowSearchDialog(); static void ShowSearchComputer(); };
19 years, 8 months
1
0
0
0
[chorns] 14468: Detect compiler -pipe support
by chorns@svn.reactos.com
Detect compiler -pipe support Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.cpp Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.h Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler .cpp _____ Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.cpp --- branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.cpp 2005-04-03 10:16:56 UTC (rev 14467) +++ branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.cpp 2005-04-03 10:46:08 UTC (rev 14468) @@ -206,7 +206,8 @@ { size_t i; - DetectPCHSupport(); + DetectPipeSupport (); + DetectPCHSupport (); CreateMakefile (); GenerateHeader (); @@ -515,31 +516,66 @@ } void -MingwBackend::DetectPCHSupport() +MingwBackend::DetectPipeSupport () { -#ifdef WIN32 - string sNUL = "NUL"; -#else - string sNUL = "/dev/null"; -#endif + printf ( "Detecting compiler -pipe support..." ); + + string pipe_detection = "tools" SSEP "rbuild" SSEP "backend" SSEP "mingw" SSEP "pipe_detection.c"; + string pipe_detectionObjectFilename = ReplaceExtension ( pipe_detection, + ".o" ); + string command = ssprintf ( + "gcc -pipe -c %s -o %s 2>%s", + pipe_detection.c_str (), + pipe_detectionObjectFilename.c_str (), + NUL ); + int exitcode = system ( command.c_str () ); + FILE* f = fopen ( pipe_detectionObjectFilename.c_str (), "rb" ); + if ( f ) + { + usePipe = (exitcode == 0); + fclose ( f ); + unlink ( pipe_detectionObjectFilename.c_str () ); + } + else + usePipe = false; + + if ( usePipe ) + printf ( "detected\n" ); + else + printf ( "not detected\n" ); + + // TODO FIXME - eventually check for ROS_USE_PCH env var and + // allow that to override use_pch if true +} + +void +MingwBackend::DetectPCHSupport () +{ + printf ( "Detecting compiler pre-compiled header support..." ); + string path = "tools" SSEP "rbuild" SSEP "backend" SSEP "mingw" SSEP "pch_detection.h"; - string cmd = ssprintf( + string cmd = ssprintf ( "gcc -c %s 2>%s", path.c_str (), - sNUL.c_str () ); - system ( cmd.c_str() ); + NUL ); + system ( cmd.c_str () ); path += ".gch"; - FILE* f = fopen ( path.c_str(), "rb" ); + FILE* f = fopen ( path.c_str (), "rb" ); if ( f ) { use_pch = true; - fclose(f); - unlink ( path.c_str() ); + fclose ( f ); + unlink ( path.c_str () ); } else use_pch = false; + if ( use_pch ) + printf ( "detected\n" ); + else + printf ( "not detected\n" ); + // TODO FIXME - eventually check for ROS_USE_PCH env var and // allow that to override use_pch if true } _____ Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.h --- branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.h 2005-04-03 10:16:56 UTC (rev 14467) +++ branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.h 2005-04-03 10:46:08 UTC (rev 14468) @@ -3,6 +3,12 @@ #include "../backend.h" +#ifdef WIN32 + #define NUL "NUL" +#else + #define NUL "/dev/null" +#endif + class Directory; class MingwModuleHandler; @@ -13,6 +19,7 @@ virtual ~MingwBackend (); virtual void Process (); std::string AddDirectoryTarget ( const std::string& directory, bool out ); + bool usePipe; private: void CreateMakefile (); void CloseMakefile () const; @@ -31,7 +38,8 @@ void GenerateXmlBuildFilesMacro() const; void CheckAutomaticDependencies (); bool IncludeDirectoryTarget ( const std::string& directory ) const; - void DetectPCHSupport(); + void DetectPipeSupport (); + void DetectPCHSupport (); FILE* fMakefile; bool use_pch; Directory *int_directories, *out_directories; _____ Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler .cpp --- branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler .cpp 2005-04-03 10:16:56 UTC (rev 14467) +++ branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler .cpp 2005-04-03 10:46:08 UTC (rev 14468) @@ -1278,10 +1278,15 @@ } } + string globalCflags = "-g"; + if ( backend->usePipe ) + globalCflags += " -pipe"; + fprintf ( fMakefile, - "%s += $(PROJECT_CFLAGS) -g\n", - cflagsMacro.c_str () ); + "%s += $(PROJECT_CFLAGS) %s\n", + cflagsMacro.c_str (), + globalCflags.c_str () ); fprintf ( fMakefile,
19 years, 8 months
1
0
0
0
[greatlrd] 14467: Remove more hardcode string to En.rc
by greatlrd@svn.reactos.com
Remove more hardcode string to En.rc Modified: trunk/reactos/subsys/system/cmd/En.rc Modified: trunk/reactos/subsys/system/cmd/color.c Modified: trunk/reactos/subsys/system/cmd/console.c Modified: trunk/reactos/subsys/system/cmd/copy.c Modified: trunk/reactos/subsys/system/cmd/date.c Modified: trunk/reactos/subsys/system/cmd/resource.h _____ Modified: trunk/reactos/subsys/system/cmd/En.rc --- trunk/reactos/subsys/system/cmd/En.rc 2005-04-03 10:05:52 UTC (rev 14466) +++ trunk/reactos/subsys/system/cmd/En.rc 2005-04-03 10:16:56 UTC (rev 14467) @@ -86,7 +86,54 @@ (cannot be terminated).\n \ /T:bf Sets the background/foreground color (see COLOR command)." +STRING_COLOR_HELP1, "Sets the default foreground and background colors.\n\n \ +COLOR [attr [/F]] \n\n \ + attr Specifies color attribute of console output\n \ + /F fill the console with color attribute\n\n \ +There are three ways to specify the colors:\n \ +1) [bright] name on [bright] name (only the first three letters are required)\n \ +2) decimal on decimal\n \ +3) two hex digits\n\n \ +Colors are:\n \ +dec hex name dec hex name\n \ +0 0 Black 8 8 Gray(Bright black)\n \ +1 1 Blue 9 9 Bright Blue\n \ +2 2 Green 10 A Bright Green\n \ +3 3 Cyan 11 B Bright Cyan\n \ +4 4 Red 12 C Bright Red\n \ +5 5 Magenta 13 D Bright Magenta\n \ +6 6 Yellow 14 E Bright Yellow\n \ +7 7 White 15 F Bright White" +STRING_COPY_HELP1, "Overwrite %s (Yes/No/All)? " + +STRING_COPY_HELP2, "Copies one or more files to another location.\n\n \ +COPY [/V][/Y|/-Y][/A|/B] source [/A|/B]\n \ + [+ source [/A|/B] [+ ...]] [destination [/A|/B]]\n\n \ + source Specifies the file or files to be copied.\n \ + /A Indicates an ASCII text file.\n \ + /B Indicates a binary file.\n \ + destination Specifies the directory and/or filename for the new file(s).\n \ + /V Verifies that new files are written correctly.\n \ + /Y Suppresses prompting to confirm you want to overwrite an\n \ + existing destination file.\n \ + /-Y Causes prompting to confirm you want to overwrite an\n \ + existing destination file.\n\n \ +The switch /Y may be present in the COPYCMD environment variable.\n \ +..." + +STRING_DATE_HELP1, "\nEnter new date (mm%cdd%cyyyy): " + +STRING_DATE_HELP2, "\nEnter new date (dd%cmm%cyyyy): " + +STRING_DATE_HELP3, "\nEnter new date (yyyy%cmm%cdd): " + +STRING_DATE_HELP4, "Displays or sets the date.\n\n \ +DATE [/T][date]\n\n \ + /T display only\n\n \ +Type DATE without parameters to display the current date setting and\n \ +a prompt for a new one. Press ENTER to keep the same date." + STRING_EXIT_HELP, "Exits the command line interpreter.\n\nEXIT" STRING_MKDIR_HELP, "Creates a directory.\n\n \ @@ -103,10 +150,10 @@ +STRING_CHOICE_OPTION, "YN" +STRING_COPY_OPTION, "YNA" -STRING_CHOICE_OPTION "YN" - STRING_ALIAS_ERROR, "Command line too long after alias expansion!\n" STRING_BATCH_ERROR, "Error opening batch file\n" STRING_CHCP_ERROR1, "Active code page: %u\n" @@ -121,6 +168,12 @@ STRING_CMD_ERROR3, "Can't redirect to file %s\n" STRING_CMD_ERROR4, "Running %s...\n" STRING_CMD_ERROR5, "Running cmdexit.bat...\n" +STRING_CONSOLE_ERROR, "Unknown error: %d\n" +STRING_COPY_ERROR1, "Error: Cannot open source - %s!\n" +STRING_COPY_ERROR2, "Error: Can't copy onto itself!\n" +STRING_COPY_ERROR3, "Error writing destination!\n" +STRING_COPY_ERROR4, "Error: Not implemented yet!\n" +STRING_DATE_ERROR, "Invalid date." STRING_PARAM_ERROR, "Required parameter missing\n" _____ Modified: trunk/reactos/subsys/system/cmd/color.c --- trunk/reactos/subsys/system/cmd/color.c 2005-04-03 10:05:52 UTC (rev 14466) +++ trunk/reactos/subsys/system/cmd/color.c 2005-04-03 10:16:56 UTC (rev 14467) @@ -16,44 +16,23 @@ * * 14-Oct-1999 (Paolo Pantaleo <paolopan(a)freemail.it>) * 4nt's syntax implemented + * + * 03-Apr-2005 (Magnus Olsen) <magnus(a)greatlord.com>) + * Remove all hardcode string to En.rc */ #include "precomp.h" +#include "resource.h" #ifdef INCLUDE_CMD_COLOR static VOID ColorHelp (VOID) { - ConOutPuts (_T( - "Sets the default foreground and background colors.\n" - "\n" - "COLOR [attr [/F]] \n\n" - " attr Specifies color attribute of console output\n" - " /F fill the console with color attribute\n" - "\n" - "There are three ways to specify the colors:" - )); + WCHAR szMsg[RC_STRING_MAX_SIZE]; + LoadString( GetModuleHandle(NULL), STRING_COLOR_HELP1, (LPTSTR) szMsg,sizeof(szMsg)); + ConOutPuts (_T((LPTSTR)szMsg)); - ConOutPuts (_T( - "\n" - "1) [bright] name on [bright] name (only the first three letters are required)\n" - "2) decimal on decimal\n" - "3) two hex digits\n" - "\n" - "Colors are:" - )); - - ConOutPuts (_T( - "dec hex name dec hex name\n" - "0 0 Black 8 8 Gray(Bright black)\n" - "1 1 Blue 9 9 Bright Blue\n" - "2 2 Green 10 A Bright Green\n" - "3 3 Cyan 11 B Bright Cyan\n" - "4 4 Red 12 C Bright Red\n" - "5 5 Magenta 13 D Bright Magenta\n" - "6 6 Yellow 14 E Bright Yellow\n" - "7 7 White 15 F Bright White")); } _____ Modified: trunk/reactos/subsys/system/cmd/console.c --- trunk/reactos/subsys/system/cmd/console.c 2005-04-03 10:05:52 UTC (rev 14466) +++ trunk/reactos/subsys/system/cmd/console.c 2005-04-03 10:16:56 UTC (rev 14467) @@ -7,9 +7,13 @@ * * 20-Jan-1999 (Eric Kohl <ekohl(a)abo.rhein-zeitung.de>) * started + * + * 03-Apr-2005 (Magnus Olsen) <magnus(a)greatlord.com>) + * Remove all hardcode string to En.rc */ #include "precomp.h" +#include "resource.h" #define OUTPUT_BUFFER_SIZE 4096 @@ -210,6 +214,7 @@ DWORD ret; LPTSTR text; va_list arg_ptr; + WCHAR szMsg[RC_STRING_MAX_SIZE]; va_start (arg_ptr, MessageId); ret = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, @@ -228,7 +233,8 @@ } else { - ConErrPrintf (_T("Unknown error: %d\n"), MessageId); + LoadString( GetModuleHandle(NULL), STRING_CONSOLE_ERROR, (LPTSTR) szMsg,sizeof(szMsg)); + ConErrPrintf (_T((LPTSTR)szMsg)); } } _____ Modified: trunk/reactos/subsys/system/cmd/copy.c --- trunk/reactos/subsys/system/cmd/copy.c 2005-04-03 10:05:52 UTC (rev 14466) +++ trunk/reactos/subsys/system/cmd/copy.c 2005-04-03 10:16:56 UTC (rev 14467) @@ -20,9 +20,13 @@ * * 27-Oct-1998 (Eric Kohl <ekohl(a)abo.rhein-zeitung.de>) * Disabled prompting when used in batch mode. + * + * 03-Apr-2005 (Magnus Olsen) <magnus(a)greatlord.com>) + * Remove all hardcode string to En.rc */ #include "precomp.h" +#include "resource.h" #ifdef INCLUDE_CMD_COPY @@ -294,8 +298,17 @@ { TCHAR inp[10]; LPTSTR p; + + LPTSTR lpOptions; + TCHAR Options[3]; + WCHAR szMsg[RC_STRING_MAX_SIZE]; - ConOutPrintf (_T("Overwrite %s (Yes/No/All)? "), fn); + LoadString( GetModuleHandle(NULL), STRING_COPY_OPTION, (LPTSTR) Options,sizeof(lpOptions)); + lpOptions = _T(Options); + + LoadString( GetModuleHandle(NULL), STRING_COPY_HELP1, (LPTSTR) szMsg,sizeof(szMsg)); + ConOutPrintf (_T((LPTSTR)szMsg)); + ConInString (inp, 10); ConOutPuts (_T("")); @@ -303,9 +316,9 @@ for (p = inp; _istspace (*p); p++) ; - if (*p != _T('Y') && *p != _T('A')) + if (*p != lpOptions[0] && *p != lpOptions[2]) return 0; - if (*p == _T('A')) + if (*p == lpOptions[2]) return 2; return 1; @@ -326,6 +339,7 @@ DWORD dwWritten; DWORD i; BOOL bEof = FALSE; + WCHAR szMsg[RC_STRING_MAX_SIZE]; #ifdef _DEBUG DebugPrintf (_T("checking mode\n")); @@ -337,7 +351,8 @@ NULL, OPEN_EXISTING, 0, NULL); if (hFileSrc == INVALID_HANDLE_VALUE) { - ConErrPrintf (_T("Error: Cannot open source - %s!\n"), source); + LoadString( GetModuleHandle(NULL), STRING_COPY_ERROR1, (LPTSTR) szMsg,sizeof(szMsg)); + ConErrPrintf (_T((LPTSTR)szMsg), source); return 0; } @@ -364,7 +379,9 @@ { if (!_tcscmp (dest, source)) { - ConErrPrintf (_T("Error: Can't copy onto itself!\n")); + LoadString( GetModuleHandle(NULL), STRING_COPY_ERROR2, (LPTSTR) szMsg,sizeof(szMsg)); + ConErrPrintf (_T((LPTSTR)szMsg), source); + CloseHandle (hFileSrc); return 0; } @@ -438,7 +455,10 @@ WriteFile (hFileDest, buffer, dwRead, &dwWritten, NULL); if (dwWritten != dwRead) { - ConErrPrintf (_T("Error writing destination!\n")); + + LoadString( GetModuleHandle(NULL), STRING_COPY_ERROR3, (LPTSTR) szMsg,sizeof(szMsg)); + ConErrPrintf (_T((LPTSTR)szMsg)); + free (buffer); CloseHandle (hFileDest); CloseHandle (hFileSrc); @@ -618,6 +638,7 @@ TCHAR dir_d[_MAX_DIR]; TCHAR file_d[_MAX_FNAME]; TCHAR ext_d[_MAX_EXT]; + WCHAR szMsg[RC_STRING_MAX_SIZE]; int argc; int append; @@ -634,23 +655,8 @@ if (!_tcsncmp (rest, _T("/?"), 2)) { - ConOutPuts (_T("Copies one or more files to another location.\n" - "\n" - "COPY [/V][/Y|/-Y][/A|/B] source [/A|/B]\n" - " [+ source [/A|/B] [+ ...]] [destination [/A|/B]]\n" - "\n" - " source Specifies the file or files to be copied.\n" - " /A Indicates an ASCII text file.\n" - " /B Indicates a binary file.\n" - " destination Specifies the directory and/or filename for the new file(s).\n" - " /V Verifies that new files are written correctly.\n" - " /Y Suppresses prompting to confirm you want to overwrite an\n" - " existing destination file.\n" - " /-Y Causes prompting to confirm you want to overwrite an\n" - " existing destination file.\n" - "\n" - "The switch /Y may be present in the COPYCMD environment variable.\n" - "...")); + LoadString( GetModuleHandle(NULL), STRING_COPY_HELP2, (LPTSTR) szMsg,sizeof(szMsg)); + ConOutPuts (_T((LPTSTR)szMsg)); return 1; } @@ -722,7 +728,9 @@ } else if (bDestFound && bWildcards) { - ConErrPrintf (_T("Error: Not implemented yet!\n")); + LoadString( GetModuleHandle(NULL), STRING_COPY_ERROR4, (LPTSTR) szMsg,sizeof(szMsg)); + ConErrPrintf (_T((LPTSTR)szMsg)); + DeleteFileList (sources); freep (p); return 0; _____ Modified: trunk/reactos/subsys/system/cmd/date.c --- trunk/reactos/subsys/system/cmd/date.c 2005-04-03 10:05:52 UTC (rev 14466) +++ trunk/reactos/subsys/system/cmd/date.c 2005-04-03 10:16:56 UTC (rev 14467) @@ -26,9 +26,13 @@ * * 04-Feb-1999 (Eric Kohl <ekohl(a)abo.rhein-zeitung.de>) * Fixed date input bug. + * + * 03-Apr-2005 (Magnus Olsen) <magnus(a)greatlord.com>) + * Remove all hardcode string to En.rc */ #include "precomp.h" +#include "resource.h" #ifdef INCLUDE_CMD_DATE @@ -43,22 +47,24 @@ static VOID PrintDateString (VOID) { + WCHAR szMsg[RC_STRING_MAX_SIZE]; + switch (nDateFormat) { case 0: /* mmddyy */ default: - ConOutPrintf (_T("\nEnter new date (mm%cdd%cyyyy): "), - cDateSeparator, cDateSeparator); + LoadString( GetModuleHandle(NULL), STRING_DATE_HELP1, (LPTSTR) szMsg,sizeof(szMsg)); + ConOutPrintf (_T((LPTSTR)szMsg), cDateSeparator, cDateSeparator); break; case 1: /* ddmmyy */ - ConOutPrintf (_T("\nEnter new date (dd%cmm%cyyyy): "), - cDateSeparator, cDateSeparator); + LoadString( GetModuleHandle(NULL), STRING_DATE_HELP2, (LPTSTR) szMsg,sizeof(szMsg)); + ConOutPrintf (_T((LPTSTR)szMsg), cDateSeparator, cDateSeparator); break; case 2: /* yymmdd */ - ConOutPrintf (_T("\nEnter new date (yyyy%cmm%cdd): "), - cDateSeparator, cDateSeparator); + LoadString( GetModuleHandle(NULL), STRING_DATE_HELP3, (LPTSTR) szMsg,sizeof(szMsg)); + ConOutPrintf (_T((LPTSTR)szMsg), cDateSeparator, cDateSeparator); break; } } @@ -183,14 +189,12 @@ INT i; BOOL bPrompt = TRUE; INT nDateString = -1; + WCHAR szMsg[RC_STRING_MAX_SIZE]; if (!_tcsncmp (param, _T("/?"), 2)) { - ConOutPuts (_T("Displays or sets the date.\n\n" - "DATE [/T][date]\n\n" - " /T display only\n\n" - "Type DATE without parameters to display the current date setting and\n" - "a prompt for a new one. Press ENTER to keep the same date.")); + LoadString( GetModuleHandle(NULL), STRING_DATE_HELP4, (LPTSTR) szMsg,sizeof(szMsg)); + ConOutPuts (_T((LPTSTR)szMsg)); return 0; } @@ -243,7 +247,9 @@ freep (arg); return 0; } - ConErrPuts (_T("Invalid date.")); + LoadString( GetModuleHandle(NULL), STRING_DATE_ERROR, (LPTSTR) szMsg,sizeof(szMsg)); + ConErrPuts (_T((LPTSTR)szMsg)); + } freep (arg); _____ Modified: trunk/reactos/subsys/system/cmd/resource.h --- trunk/reactos/subsys/system/cmd/resource.h 2005-04-03 10:05:52 UTC (rev 14466) +++ trunk/reactos/subsys/system/cmd/resource.h 2005-04-03 10:16:56 UTC (rev 14467) @@ -1,6 +1,7 @@ #define RC_STRING_MAX_SIZE 2048 #define STRING_CHOICE_OPTION 200 +#define STRING_COPY_OPTION 201 #define STRING_ALIAS_ERROR 300 @@ -17,7 +18,13 @@ #define STRING_CMD_ERROR3 311 #define STRING_CMD_ERROR4 312 #define STRING_CMD_ERROR5 313 -#define STRING_PARAM_ERROR 314 +#define STRING_CONSOLE_ERROR 314 +#define STRING_COPY_ERROR1 315 +#define STRING_COPY_ERROR2 316 +#define STRING_COPY_ERROR3 317 +#define STRING_COPY_ERROR4 318 +#define STRING_DATE_ERROR 319 +#define STRING_PARAM_ERROR 320 #define STRING_ATTRIB_HELP 400 #define STRING_ALIAS_HELP 401 @@ -35,10 +42,17 @@ #define STRING_CMD_HELP6 413 #define STRING_CMD_HELP7 414 #define STRING_CMD_HELP8 415 -#define STRING_EXIT_HELP 416 -#define STRING_MKDIR_HELP 417 -#define STRING_RMDIR_HELP 418 -#define STRING_REM_HELP 419 +#define STRING_COLOR_HELP1 416 +#define STRING_COPY_HELP1 417 +#define STRING_COPY_HELP2 418 +#define STRING_DATE_HELP1 419 +#define STRING_DATE_HELP2 420 +#define STRING_DATE_HELP3 421 +#define STRING_DATE_HELP4 422 +#define STRING_EXIT_HELP 423 +#define STRING_MKDIR_HELP 424 +#define STRING_RMDIR_HELP 425 +#define STRING_REM_HELP 426
19 years, 8 months
1
0
0
0
[chorns] 14466: Avoid spurious error messages during make clean
by chorns@svn.reactos.com
Avoid spurious error messages during make clean Modified: branches/xmlbuildsystem/reactos/tools/bin2res/bin2res.mak Modified: branches/xmlbuildsystem/reactos/tools/cdmake/cdmake.mak Modified: branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.mak _____ Modified: branches/xmlbuildsystem/reactos/tools/bin2res/bin2res.mak --- branches/xmlbuildsystem/reactos/tools/bin2res/bin2res.mak 2005-04-03 10:05:00 UTC (rev 14465) +++ branches/xmlbuildsystem/reactos/tools/bin2res/bin2res.mak 2005-04-03 10:05:52 UTC (rev 14466) @@ -24,7 +24,7 @@ ) BIN2RES_OBJECTS = \ - $addprefix ( $(INTERMEDIATE_), $(BIN2RES_SOURCES:.c=.o) ) + $(addprefix $(INTERMEDIATE_), $(BIN2RES_SOURCES:.c=.o)) BIN2RES_HOST_CFLAGS = -Iinclude/wine -D__REACTOS__ -g -Werror -Wall @@ -43,6 +43,6 @@ ${host_gcc} $(BIN2RES_HOST_CFLAGS) -c $< -o $@ .PHONY: bin2res_clean -bin2res_clean: +bin2res_clean: $(BIN2RES_TARGET) -@$(rm) $(BIN2RES_TARGET) $(BIN2RES_OBJECTS) 2>$(NUL) clean: bin2res_clean _____ Modified: branches/xmlbuildsystem/reactos/tools/cdmake/cdmake.mak --- branches/xmlbuildsystem/reactos/tools/cdmake/cdmake.mak 2005-04-03 10:05:00 UTC (rev 14465) +++ branches/xmlbuildsystem/reactos/tools/cdmake/cdmake.mak 2005-04-03 10:05:52 UTC (rev 14466) @@ -46,6 +46,6 @@ ${host_gcc} $(CDMAKE_HOST_CFLAGS) -c $< -o $@ .PHONY: cdmake_clean -cdmake_clean: +cdmake_clean: $(CDMAKE_TARGET) -@$(rm) $(CDMAKE_TARGET) $(CDMAKE_OBJECTS) 2>$(NUL) clean: cdmake_clean _____ Modified: branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.mak --- branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.mak 2005-04-03 10:05:00 UTC (rev 14465) +++ branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.mak 2005-04-03 10:05:52 UTC (rev 14466) @@ -312,7 +312,11 @@ $(ECHO_TEST) $(Q)$(RBUILD_TEST_TARGET) +.PHONY: rbuild_test_clean +rbuild_test_clean: $(RBUILD_TEST_TARGET) $(RBUILD_TESTS_INT) + -@$(rm) $(RBUILD_TEST_TARGET) $(RBUILD_TEST_SPECIAL_OBJECTS) 2>$(NUL) + .PHONY: rbuild_clean -rbuild_clean: - -@$(rm) $(RBUILD_TARGET) $(RBUILD_OBJECTS) $(RBUILD_TEST_TARGET) $(RBUILD_TEST_OBJECTS) 2>$(NUL) +rbuild_clean: $(RBUILD_TARGET) $(RBUILD_OBJECTS) $(RBUILD_TESTS_INT) + -@$(rm) $(RBUILD_TARGET) $(RBUILD_OBJECTS) 2>$(NUL) clean: rbuild_clean
19 years, 8 months
1
0
0
0
[hbirr] 14465: Initialized the event with the object instead of the handle.
by hbirr@svn.reactos.com
Initialized the event with the object instead of the handle. Modified: trunk/reactos/ntoskrnl/io/rw.c _____ Modified: trunk/reactos/ntoskrnl/io/rw.c --- trunk/reactos/ntoskrnl/io/rw.c 2005-04-03 09:16:20 UTC (rev 14464) +++ trunk/reactos/ntoskrnl/io/rw.c 2005-04-03 10:05:00 UTC (rev 14465) @@ -130,7 +130,7 @@ return NT_SUCCESS(Status) ? STATUS_INSUFFICIENT_RESOURCES : Status; } - Irp->UserEvent = Event; + Irp->UserEvent = EventObject; if (FileObject->Flags & FO_SYNCHRONOUS_IO) { /* synchronous irp's are queued to requestor thread's irp cancel/cleanup list */ @@ -310,7 +310,7 @@ return NT_SUCCESS(Status) ? STATUS_INSUFFICIENT_RESOURCES : Status; } - Irp->UserEvent = Event; + Irp->UserEvent = EventObject; if (FileObject->Flags & FO_SYNCHRONOUS_IO) { /* synchronous irp's are queued to requestor thread's irp cancel/cleanup list */
19 years, 8 months
1
0
0
0
[mf] 14464: fix SDI shell browser
by mf@svn.reactos.com
fix SDI shell browser Modified: trunk/reactos/subsys/system/explorer/shell/mainframe.cpp Modified: trunk/reactos/subsys/system/explorer/shell/shellbrowser.cpp Modified: trunk/reactos/subsys/system/explorer/shell/shellbrowser.h Modified: trunk/reactos/subsys/system/explorer/shell/shellfs.h Modified: trunk/reactos/subsys/system/explorer/taskbar/startmenu.cpp _____ Modified: trunk/reactos/subsys/system/explorer/shell/mainframe.cpp --- trunk/reactos/subsys/system/explorer/shell/mainframe.cpp 2005-04-02 22:19:12 UTC (rev 14463) +++ trunk/reactos/subsys/system/explorer/shell/mainframe.cpp 2005-04-03 09:16:20 UTC (rev 14464) @@ -1,5 +1,5 @@ /* - * Copyright 2003, 2004 Martin Fuchs + * Copyright 2003, 2004, 2005 Martin Fuchs * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -1652,17 +1652,16 @@ void SDIMainFrame::jump_to(LPCITEMIDLIST path, int mode) { -/*@@todo if (_shellBrowser.get() && (_shellpath_info._open_mode&~OWM_PIDL)==(mode&~OWM_PIDL)) { ShellPath shell_path = path; _shellBrowser->jump_to(shell_path); _shellpath_info._shell_path = shell_path; - } else */{ + } else { _shellpath_info._open_mode = mode; _shellpath_info._shell_path = path; - _shellpath_info._root_shell_path = DesktopFolderPath(); //@@ + _shellpath_info._root_shell_path = SpecialFolderPath(CSIDL_DRIVES, _hwnd); //@@ update_shell_browser(); } _____ Modified: trunk/reactos/subsys/system/explorer/shell/shellbrowser.cpp --- trunk/reactos/subsys/system/explorer/shell/shellbrowser.cpp 2005-04-02 22:19:12 UTC (rev 14463) +++ trunk/reactos/subsys/system/explorer/shell/shellbrowser.cpp 2005-04-03 09:16:20 UTC (rev 14464) @@ -1,5 +1,5 @@ /* - * Copyright 2003, 2004 Martin Fuchs + * Copyright 2003, 2004, 2005 Martin Fuchs * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -71,7 +71,7 @@ _hWndFrame = hWndFrame; - const String& root_name = GetDesktopFolder().get_name(_create_info._root_shell_path, SHGDN_FORPARSING); + const String& root_name = GetDesktopFolder().get_name(_create_info._root_shell_path, SHGDN_FORADDRESSBAR); _root._drive_type = DRIVE_UNKNOWN; lstrcpy(_root._volname, root_name); _____ Modified: trunk/reactos/subsys/system/explorer/shell/shellbrowser.h --- trunk/reactos/subsys/system/explorer/shell/shellbrowser.h 2005-04-02 22:19:12 UTC (rev 14463) +++ trunk/reactos/subsys/system/explorer/shell/shellbrowser.h 2005-04-03 09:16:20 UTC (rev 14464) @@ -1,5 +1,5 @@ /* - * Copyright 2003, 2004 Martin Fuchs + * Copyright 2003, 2004, 2005 Martin Fuchs * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -135,6 +135,9 @@ void UpdateFolderView(IShellFolder* folder); HTREEITEM select_entry(HTREEITEM hitem, Entry* entry, bool expand=true); + // for SDIMainFrame + void jump_to(LPCITEMIDLIST pidl); + protected: HWND _hwnd; HWND _left_hwnd; @@ -158,9 +161,6 @@ void InitializeTree(HIMAGELIST himl); bool InitDragDrop(); - - // for SDIMainFrame - void jump_to(LPCITEMIDLIST pidl); }; _____ Modified: trunk/reactos/subsys/system/explorer/shell/shellfs.h --- trunk/reactos/subsys/system/explorer/shell/shellfs.h 2005-04-02 22:19:12 UTC (rev 14463) +++ trunk/reactos/subsys/system/explorer/shell/shellfs.h 2005-04-03 09:16:20 UTC (rev 14464) @@ -1,5 +1,5 @@ /* - * Copyright 2003, 2004 Martin Fuchs + * Copyright 2003, 2004, 2005 Martin Fuchs * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -58,7 +58,7 @@ { CONTEXT("ShellDirectory::ShellDirectory()"); - lstrcpy(_data.cFileName, root_folder.get_name(shell_path, SHGDN_FORPARSING)); + lstrcpy(_data.cFileName, root_folder.get_name(shell_path, SHGDN_FORADDRESSBAR)); _data.dwFileAttributes = FILE_ATTRIBUTE_DIRECTORY; _shell_attribs = SFGAO_FOLDER; _____ Modified: trunk/reactos/subsys/system/explorer/taskbar/startmenu.cpp --- trunk/reactos/subsys/system/explorer/taskbar/startmenu.cpp 2005-04-02 22:19:12 UTC (rev 14463) +++ trunk/reactos/subsys/system/explorer/taskbar/startmenu.cpp 2005-04-03 09:16:20 UTC (rev 14464) @@ -1898,7 +1898,7 @@ break; case IDC_DRIVES: - ///@todo exclude removeable drives + ///@todo exclude removable drives CreateSubmenu(id, CSIDL_DRIVES, ResString(IDS_DRIVES)); break;
19 years, 8 months
1
0
0
0
[greatlrd] 14463: Remove more hardcode string to En.rc
by greatlrd@svn.reactos.com
Remove more hardcode string to En.rc Modified: trunk/reactos/subsys/system/cmd/En.rc Modified: trunk/reactos/subsys/system/cmd/chcp.c Modified: trunk/reactos/subsys/system/cmd/cmd.c Modified: trunk/reactos/subsys/system/cmd/resource.h _____ Modified: trunk/reactos/subsys/system/cmd/En.rc --- trunk/reactos/subsys/system/cmd/En.rc 2005-04-02 21:45:38 UTC (rev 14462) +++ trunk/reactos/subsys/system/cmd/En.rc 2005-04-02 22:19:12 UTC (rev 14463) @@ -48,6 +48,11 @@ Type CD drive: to display the current directory on the specified drive.\n \ Type CD without a parameter to display the current drive and directory. " +STRING_CHCP_HELP, "Displays or sets the active code page number.\n\n \ +CHCP [nnn]\n\n \ + nnn Specifies the active code page number.\n\n \ +Type CHCP without a parameter to display the active code page number." + STRING_CHOICE_HELP, "Waits for the user to choose one of a set of choices.\n\n \ CHOICE [/C[:]choices][/N][/S][/T[:]c,nn][text]\n\n \ /C[:]choices Specifies allowable keys. Default is YN.\n \ @@ -59,6 +64,29 @@ STRING_CLS_HELP, "Clears the screen.\n\nCLS" +STRING_CMD_HELP1, "\nInternal commands available:\n" + +STRING_CMD_HELP2, "\nFeatures available:" + +STRING_CMD_HELP3," [aliases]" + +STRING_CMD_HELP4," [history]" + +STRING_CMD_HELP5," [unix filename completion]" + +STRING_CMD_HELP6," [directory stack]" + +STRING_CMD_HELP7," [redirections and piping]" + +STRING_CMD_HELP8, "Starts a new instance of the ReactOS command line interpreter.\n\n \ +CMD [/[C|K] command][/P][/Q][/T:bf]\n\n \ + /C command Runs the specified command and terminates.\n \ + /K command Runs the specified command and remains.\n \ + /P CMD becomes permanent and runs autoexec.bat\n \ + (cannot be terminated).\n \ + /T:bf Sets the background/foreground color (see COLOR command)." + + STRING_EXIT_HELP, "Exits the command line interpreter.\n\nEXIT" STRING_MKDIR_HELP, "Creates a directory.\n\n \ @@ -79,16 +107,21 @@ STRING_CHOICE_OPTION "YN" - +STRING_ALIAS_ERROR, "Command line too long after alias expansion!\n" +STRING_BATCH_ERROR, "Error opening batch file\n" +STRING_CHCP_ERROR1, "Active code page: %u\n" +STRING_CHCP_ERROR2, "Invalid parameter format - %s\n" +STRING_CHCP_ERROR3, "Parameter format incorrect - %s\n" +STRING_CHCP_ERROR4, "Invalid code page\n" STRING_CHOICE_ERROR, "Invalid option. Expected format: /C[:]options" STRING_CHOICE_ERROR_TXT, "Invalid option. Expected format: /T[:]c,nn" STRING_CHOICE_ERROR_OPTION, "Illegal Option: %s" +STRING_CMD_ERROR1, "Can't redirect input from file %s\n" +STRING_CMD_ERROR2, "Error creating temporary file for pipe data\n" +STRING_CMD_ERROR3, "Can't redirect to file %s\n" +STRING_CMD_ERROR4, "Running %s...\n" +STRING_CMD_ERROR5, "Running cmdexit.bat...\n" STRING_PARAM_ERROR, "Required parameter missing\n" -STRING_ALIAS_ERROR, "Command line too long after alias expansion!\n" - -STRING_BATCH_ERROR, "Error opening batch file\n" - - } _____ Modified: trunk/reactos/subsys/system/cmd/chcp.c --- trunk/reactos/subsys/system/cmd/chcp.c 2005-04-02 21:45:38 UTC (rev 14462) +++ trunk/reactos/subsys/system/cmd/chcp.c 2005-04-02 22:19:12 UTC (rev 14463) @@ -7,9 +7,12 @@ * 23-Dec-1998 (Eric Kohl <ekohl(a)abo.rhein-zeitung.de>) * Started. * + * 02-Apr-2005 (Magnus Olsen) <magnus(a)greatlord.com>) + * Remove all hardcode string to En.rc */ #include "precomp.h" +#include "resource.h" #ifdef INCLUDE_CMD_CHCP @@ -19,14 +22,13 @@ INT args; UINT uOldCodePage; UINT uNewCodePage; + WCHAR szMsg[RC_STRING_MAX_SIZE]; /* print help */ if (!_tcsncmp (param, _T("/?"), 2)) { - ConOutPuts (_T("Displays or sets the active code page number.\n\n" - "CHCP [nnn]\n\n" - " nnn Specifies the active code page number.\n\n" - "Type CHCP without a parameter to display the active code page number.")); + LoadString( GetModuleHandle(NULL), STRING_CHCP_HELP, (LPTSTR) szMsg,sizeof(szMsg)); + ConOutPuts (_T((LPTSTR)szMsg)); return 0; } @@ -36,14 +38,18 @@ if (args == 0) { /* display active code page number */ - ConOutPrintf (_T("Active code page: %u\n"), GetConsoleCP ()); + LoadString( GetModuleHandle(NULL), STRING_CHCP_ERROR1, (LPTSTR) szMsg,sizeof(szMsg)); + ConErrPrintf (_T((LPTSTR)szMsg), GetConsoleCP ()); + return 0; } if (args >= 2) { /* too many parameters */ - ConErrPrintf (_T("Invalid parameter format - %s\n"), param); + LoadString( GetModuleHandle(NULL), STRING_CHCP_ERROR2, (LPTSTR) szMsg,sizeof(szMsg)); + ConErrPrintf (_T((LPTSTR)szMsg), param); + return 1; } @@ -55,14 +61,16 @@ if (uNewCodePage == 0) { - ConErrPrintf (_T("Parameter format incorrect - %s\n"), arg[0]); + LoadString( GetModuleHandle(NULL), STRING_CHCP_ERROR3, (LPTSTR) szMsg,sizeof(szMsg)); + ConErrPrintf (_T((LPTSTR)szMsg), arg[0]); freep (arg); return 1; } if (!SetConsoleCP (uNewCodePage)) { - ConErrPrintf (_T("Invalid code page\n")); + LoadString( GetModuleHandle(NULL), STRING_CHCP_ERROR4, (LPTSTR) szMsg,sizeof(szMsg)); + ConErrPrintf (_T((LPTSTR)szMsg)); } else { _____ Modified: trunk/reactos/subsys/system/cmd/cmd.c --- trunk/reactos/subsys/system/cmd/cmd.c 2005-04-02 21:45:38 UTC (rev 14462) +++ trunk/reactos/subsys/system/cmd/cmd.c 2005-04-02 22:19:12 UTC (rev 14463) @@ -129,9 +129,13 @@ * * 12-Jul-2004 (Jens Collin <jens.collin(a)lakhei.com>) * Added ShellExecute call when all else fails to be able to "launch" any file. + * + * 02-Apr-2005 (Magnus Olsen) <magnus(a)greatlord.com>) + * Remove all hardcode string to En.rc */ #include "precomp.h" +#include "resource.h" #ifndef NT_SUCCESS #define NT_SUCCESS(StatCode) ((NTSTATUS)(StatCode) >= 0) @@ -548,6 +552,7 @@ { TCHAR cmdline[CMDLINE_LENGTH]; LPTSTR s; + WCHAR szMsg[RC_STRING_MAX_SIZE]; #ifdef FEATURE_REDIRECTION TCHAR in[CMDLINE_LENGTH] = _T(""); TCHAR out[CMDLINE_LENGTH] = _T(""); @@ -629,13 +634,15 @@ FILE_ATTRIBUTE_NORMAL, NULL); if (hFile == INVALID_HANDLE_VALUE) { - ConErrPrintf (_T("Can't redirect input from file %s\n"), in); + LoadString( GetModuleHandle(NULL), STRING_CMD_ERROR1, (LPTSTR) szMsg,sizeof(szMsg)); + ConErrPrintf (_T((LPTSTR)szMsg), in); return; } if (!SetStdHandle (STD_INPUT_HANDLE, hFile)) { - ConErrPrintf (_T("Can't redirect input from file %s\n"), in); + LoadString( GetModuleHandle(NULL), STRING_CMD_ERROR1, (LPTSTR) szMsg,sizeof(szMsg)); + ConErrPrintf (_T((LPTSTR)szMsg), in); return; } #ifdef _DEBUG @@ -659,7 +666,9 @@ TRUNCATE_EXISTING, FILE_ATTRIBUTE_TEMPORARY, NULL); if (hFile[1] == INVALID_HANDLE_VALUE){ - ConErrPrintf (_T("Error creating temporary file for pipe data\n")); + + LoadString( GetModuleHandle(NULL), STRING_CMD_ERROR2, (LPTSTR) szMsg,sizeof(szMsg)); + ConErrPrintf (_T((LPTSTR)szMsg)); return; } @@ -711,13 +720,16 @@ FILE_ATTRIBUTE_NORMAL, NULL); if (hFile == INVALID_HANDLE_VALUE) { - ConErrPrintf (_T("Can't redirect to file %s\n"), out); + LoadString( GetModuleHandle(NULL), STRING_CMD_ERROR3, (LPTSTR) szMsg,sizeof(szMsg)); + ConErrPrintf (_T((LPTSTR)szMsg), out); + return; } if (!SetStdHandle (STD_OUTPUT_HANDLE, hFile)) { - ConErrPrintf (_T("Can't redirect to file %s\n"), out); + LoadString( GetModuleHandle(NULL), STRING_CMD_ERROR3, (LPTSTR) szMsg,sizeof(szMsg)); + ConErrPrintf (_T((LPTSTR)szMsg), out); return; } @@ -770,13 +782,17 @@ NULL); if (hFile == INVALID_HANDLE_VALUE) { - ConErrPrintf (_T("Can't redirect to file %s\n"), err); + LoadString( GetModuleHandle(NULL), STRING_CMD_ERROR3, (LPTSTR) szMsg,sizeof(szMsg)); + ConErrPrintf (_T((LPTSTR)szMsg), err); + return; } } if (!SetStdHandle (STD_ERROR_HANDLE, hFile)) { - ConErrPrintf (_T("Can't redirect to file %s\n"), err); + LoadString( GetModuleHandle(NULL), STRING_CMD_ERROR3, (LPTSTR) szMsg,sizeof(szMsg)); + ConErrPrintf (_T((LPTSTR)szMsg), err); + return; } @@ -906,6 +922,7 @@ LPTSTR ip; LPTSTR cp; BOOL bEchoThisLine; + do { @@ -1018,6 +1035,7 @@ */ BOOL WINAPI BreakHandler (DWORD dwCtrlType) { + if ((dwCtrlType != CTRL_C_EVENT) && (dwCtrlType != CTRL_BREAK_EVENT)) return FALSE; @@ -1058,26 +1076,36 @@ static VOID ShowCommands (VOID) { + WCHAR szMsg[RC_STRING_MAX_SIZE]; + /* print command list */ - ConOutPrintf (_T("\nInternal commands available:\n")); + LoadString( GetModuleHandle(NULL), STRING_CMD_HELP1, (LPTSTR) szMsg,sizeof(szMsg)); + ConOutPrintf (_T((LPTSTR)szMsg)); PrintCommandList (); /* print feature list */ - ConOutPuts (_T("\nFeatures available:")); -#ifdef FEATURE_ALIASES - ConOutPuts (_T(" [aliases]")); + LoadString( GetModuleHandle(NULL), STRING_CMD_HELP2, (LPTSTR) szMsg,sizeof(szMsg)); + ConOutPuts (_T((LPTSTR)szMsg)); + +#ifdef FEATURE_ALIASES + LoadString( GetModuleHandle(NULL), STRING_CMD_HELP3, (LPTSTR) szMsg,sizeof(szMsg)); + ConOutPuts (_T((LPTSTR)szMsg)); #endif #ifdef FEATURE_HISTORY - ConOutPuts (_T(" [history]")); + LoadString( GetModuleHandle(NULL), STRING_CMD_HELP4, (LPTSTR) szMsg,sizeof(szMsg)); + ConOutPuts (_T((LPTSTR)szMsg)); #endif #ifdef FEATURE_UNIX_FILENAME_COMPLETION - ConOutPuts (_T(" [unix filename completion]")); + LoadString( GetModuleHandle(NULL), STRING_CMD_HELP5, (LPTSTR) szMsg,sizeof(szMsg)); + ConOutPuts (_T((LPTSTR)szMsg)); #endif #ifdef FEATURE_DIRECTORY_STACK - ConOutPuts (_T(" [directory stack]")); + LoadString( GetModuleHandle(NULL), STRING_CMD_HELP6, (LPTSTR) szMsg,sizeof(szMsg)); + ConOutPuts (_T((LPTSTR)szMsg)); #endif #ifdef FEATURE_REDIRECTION - ConOutPuts (_T(" [redirections and piping]")); + LoadString( GetModuleHandle(NULL), STRING_CMD_HELP7, (LPTSTR) szMsg,sizeof(szMsg)); + ConOutPuts (_T((LPTSTR)szMsg)); #endif ConOutChar (_T('\n')); } @@ -1096,6 +1124,8 @@ TCHAR commandline[CMDLINE_LENGTH]; TCHAR ModuleName[_MAX_PATH + 1]; INT i; + WCHAR szMsg[RC_STRING_MAX_SIZE]; + //INT len; //TCHAR *ptr, *cmdLine; @@ -1124,15 +1154,8 @@ if (argc >= 2 && !_tcsncmp (argv[1], _T("/?"), 2)) { - ConOutPuts (_T("Starts a new instance of the ReactOS command line interpreter.\n" - "\n" - "CMD [/[C|K] command][/P][/Q][/T:bf]\n" - "\n" - " /C command Runs the specified command and terminates.\n" - " /K command Runs the specified command and remains.\n" - " /P CMD becomes permanent and runs autoexec.bat\n" - " (cannot be terminated).\n" - " /T:bf Sets the background/foreground color (see COLOR command).")); + LoadString( GetModuleHandle(NULL), STRING_CMD_HELP8, (LPTSTR) szMsg,sizeof(szMsg)); + ConOutPuts (_T((LPTSTR)szMsg)); ExitProcess (0); } SetConsoleMode (hIn, ENABLE_PROCESSED_INPUT); @@ -1236,7 +1259,8 @@ if (IsExistingFile (_T("commandline"))) { - ConErrPrintf (_T("Running %s...\n", commandline)); + LoadString( GetModuleHandle(NULL), STRING_CMD_ERROR4, (LPTSTR) szMsg,sizeof(szMsg)); + ConErrPrintf (_T((LPTSTR)szMsg), commandline); ParseCommandLine (commandline); } } @@ -1267,15 +1291,20 @@ static VOID Cleanup (int argc, TCHAR *argv[]) { + WCHAR szMsg[RC_STRING_MAX_SIZE]; + /* run cmdexit.bat */ if (IsExistingFile (_T("cmdexit.bat"))) { - ConErrPrintf (_T("Running cmdexit.bat...\n")); + LoadString( GetModuleHandle(NULL), STRING_CMD_ERROR5, (LPTSTR) szMsg,sizeof(szMsg)); + ConErrPrintf (_T((LPTSTR)szMsg)); + ParseCommandLine (_T("cmdexit.bat")); } else if (IsExistingFile (_T("\\cmdexit.bat"))) { - ConErrPrintf (_T("Running \\cmdexit.bat...\n")); + LoadString( GetModuleHandle(NULL), STRING_CMD_ERROR5, (LPTSTR) szMsg,sizeof(szMsg)); + ConErrPrintf (_T((LPTSTR)szMsg)); ParseCommandLine (_T("\\cmdexit.bat")); } #ifndef __REACTOS__ @@ -1291,7 +1320,8 @@ if (IsExistingFile (_T("commandline"))) { - ConErrPrintf (_T("Running %s...\n"), commandline); + LoadString( GetModuleHandle(NULL), STRING_CMD_ERROR4, (LPTSTR) szMsg,sizeof(szMsg)); + ConErrPrintf (_T((LPTSTR)szMsg), commandline); ParseCommandLine (commandline); } } _____ Modified: trunk/reactos/subsys/system/cmd/resource.h --- trunk/reactos/subsys/system/cmd/resource.h 2005-04-02 21:45:38 UTC (rev 14462) +++ trunk/reactos/subsys/system/cmd/resource.h 2005-04-02 22:19:12 UTC (rev 14463) @@ -5,22 +5,40 @@ #define STRING_ALIAS_ERROR 300 #define STRING_BATCH_ERROR 301 -#define STRING_CHOICE_ERROR 302 -#define STRING_CHOICE_ERROR_TXT 303 -#define STRING_CHOICE_ERROR_OPTION 304 -#define STRING_PARAM_ERROR 305 +#define STRING_CHCP_ERROR1 302 +#define STRING_CHCP_ERROR2 303 +#define STRING_CHCP_ERROR3 304 +#define STRING_CHCP_ERROR4 305 +#define STRING_CHOICE_ERROR 306 +#define STRING_CHOICE_ERROR_TXT 307 +#define STRING_CHOICE_ERROR_OPTION 308 +#define STRING_CMD_ERROR1 309 +#define STRING_CMD_ERROR2 310 +#define STRING_CMD_ERROR3 311 +#define STRING_CMD_ERROR4 312 +#define STRING_CMD_ERROR5 313 +#define STRING_PARAM_ERROR 314 #define STRING_ATTRIB_HELP 400 #define STRING_ALIAS_HELP 401 #define STRING_BEEP_HELP 402 #define STRING_CALL_HELP 403 #define STRING_CD_HELP 404 -#define STRING_CHOICE_HELP 405 -#define STRING_CLS_HELP 406 -#define STRING_EXIT_HELP 407 -#define STRING_MKDIR_HELP 408 -#define STRING_RMDIR_HELP 409 -#define STRING_REM_HELP 410 +#define STRING_CHCP_HELP 405 +#define STRING_CHOICE_HELP 406 +#define STRING_CLS_HELP 407 +#define STRING_CMD_HELP1 408 +#define STRING_CMD_HELP2 409 +#define STRING_CMD_HELP3 410 +#define STRING_CMD_HELP4 411 +#define STRING_CMD_HELP5 412 +#define STRING_CMD_HELP6 413 +#define STRING_CMD_HELP7 414 +#define STRING_CMD_HELP8 415 +#define STRING_EXIT_HELP 416 +#define STRING_MKDIR_HELP 417 +#define STRING_RMDIR_HELP 418 +#define STRING_REM_HELP 419
19 years, 8 months
1
0
0
0
← Newer
1
...
38
39
40
41
42
43
44
...
48
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Results per page:
10
25
50
100
200