mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 17:56:00 +00:00
Fix indentation
svn path=/trunk/; revision=25591
This commit is contained in:
parent
17291b0214
commit
e51baab788
12 changed files with 119 additions and 120 deletions
|
@ -152,7 +152,7 @@ bool FileExists(string &filename)
|
||||||
void DevCppBackend::ProcessFile(string &filepath)
|
void DevCppBackend::ProcessFile(string &filepath)
|
||||||
{
|
{
|
||||||
// Remove the .\ at the start of the filenames
|
// Remove the .\ at the start of the filenames
|
||||||
if ((filepath[0] == '.') && (filepath[1] == '\\')) filepath.erase(0, 2);
|
if ((filepath[0] == '.') && (filepath[1] == '\\')) filepath.erase(0, 2);
|
||||||
|
|
||||||
if(!FileExists(filepath))
|
if(!FileExists(filepath))
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -106,7 +106,7 @@ MingwBackend::CanEnablePreCompiledHeaderSupportForModule ( const Module& module
|
||||||
size_t i;
|
size_t i;
|
||||||
for ( i = 0; i < compilationUnits.size (); i++ )
|
for ( i = 0; i < compilationUnits.size (); i++ )
|
||||||
{
|
{
|
||||||
CompilationUnit& compilationUnit = *compilationUnits[i];
|
CompilationUnit& compilationUnit = *compilationUnits[i];
|
||||||
if ( compilationUnit.files.size () != 1 )
|
if ( compilationUnit.files.size () != 1 )
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -148,7 +148,7 @@ MingwBackend::ProcessModules ()
|
||||||
MingwModuleHandler* h = MingwModuleHandler::InstanciateHandler (
|
MingwModuleHandler* h = MingwModuleHandler::InstanciateHandler (
|
||||||
module,
|
module,
|
||||||
this );
|
this );
|
||||||
h->AddImplicitLibraries ( module );
|
h->AddImplicitLibraries ( module );
|
||||||
if ( use_pch && CanEnablePreCompiledHeaderSupportForModule ( module ) )
|
if ( use_pch && CanEnablePreCompiledHeaderSupportForModule ( module ) )
|
||||||
h->EnablePreCompiledHeaderSupport ();
|
h->EnablePreCompiledHeaderSupport ();
|
||||||
if ( module.host == HostDefault )
|
if ( module.host == HostDefault )
|
||||||
|
@ -761,16 +761,16 @@ MingwBackend::GetNetwideAssemblerVersion ( const string& nasmCommand )
|
||||||
if ( nasmCommand.find("yasm") != std::string::npos )
|
if ( nasmCommand.find("yasm") != std::string::npos )
|
||||||
{
|
{
|
||||||
versionCommand = ssprintf ( "%s --version",
|
versionCommand = ssprintf ( "%s --version",
|
||||||
nasmCommand.c_str (),
|
nasmCommand.c_str (),
|
||||||
NUL,
|
NUL,
|
||||||
NUL );
|
NUL );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
versionCommand = ssprintf ( "%s -v",
|
versionCommand = ssprintf ( "%s -v",
|
||||||
nasmCommand.c_str (),
|
nasmCommand.c_str (),
|
||||||
NUL,
|
NUL,
|
||||||
NUL );
|
NUL );
|
||||||
}
|
}
|
||||||
return GetVersionString( versionCommand );
|
return GetVersionString( versionCommand );
|
||||||
}
|
}
|
||||||
|
@ -871,7 +871,7 @@ MingwBackend::IsSupportedBinutilsVersion ( const string& binutilsVersion )
|
||||||
|
|
||||||
if ( ( ( strcmp ( binutilsVersion.c_str (), "20040902") >= 0 ) &&
|
if ( ( ( strcmp ( binutilsVersion.c_str (), "20040902") >= 0 ) &&
|
||||||
( strcmp ( binutilsVersion.c_str (), "20041008") <= 0 ) ) ||
|
( strcmp ( binutilsVersion.c_str (), "20041008") <= 0 ) ) ||
|
||||||
( strcmp ( binutilsVersion.c_str (), "20031001") < 0 ) )
|
( strcmp ( binutilsVersion.c_str (), "20031001") < 0 ) )
|
||||||
return false;
|
return false;
|
||||||
else
|
else
|
||||||
return true;
|
return true;
|
||||||
|
@ -1153,7 +1153,7 @@ MingwBackend::GetRegistryTargetFiles ()
|
||||||
installDirectory ) );
|
installDirectory ) );
|
||||||
return system32ConfigDirectory + sSep + "default " +
|
return system32ConfigDirectory + sSep + "default " +
|
||||||
system32ConfigDirectory + sSep + "sam " +
|
system32ConfigDirectory + sSep + "sam " +
|
||||||
system32ConfigDirectory + sSep + "security " +
|
system32ConfigDirectory + sSep + "security " +
|
||||||
system32ConfigDirectory + sSep + "software " +
|
system32ConfigDirectory + sSep + "software " +
|
||||||
system32ConfigDirectory + sSep + "system";
|
system32ConfigDirectory + sSep + "system";
|
||||||
}
|
}
|
||||||
|
@ -1181,7 +1181,7 @@ MingwBackend::OutputRegistryInstallTarget ()
|
||||||
fprintf ( fMakefile,
|
fprintf ( fMakefile,
|
||||||
"\t$(MKHIVE_TARGET) boot%cbootdata %s boot%cbootdata%chiveinst.inf\n",
|
"\t$(MKHIVE_TARGET) boot%cbootdata %s boot%cbootdata%chiveinst.inf\n",
|
||||||
cSep, system32ConfigDirectory.c_str (),
|
cSep, system32ConfigDirectory.c_str (),
|
||||||
cSep, cSep );
|
cSep, cSep );
|
||||||
fprintf ( fMakefile,
|
fprintf ( fMakefile,
|
||||||
"\n" );
|
"\n" );
|
||||||
}
|
}
|
||||||
|
|
|
@ -535,10 +535,10 @@ void
|
||||||
MingwModuleHandler::GetReferencedObjectLibraryModuleCleanTargets ( vector<string>& moduleNames ) const
|
MingwModuleHandler::GetReferencedObjectLibraryModuleCleanTargets ( vector<string>& moduleNames ) const
|
||||||
{
|
{
|
||||||
for ( size_t i = 0; i < module.non_if_data.libraries.size (); i++ )
|
for ( size_t i = 0; i < module.non_if_data.libraries.size (); i++ )
|
||||||
{
|
{
|
||||||
Library& library = *module.non_if_data.libraries[i];
|
Library& library = *module.non_if_data.libraries[i];
|
||||||
if ( library.importedModule->type == ObjectLibrary )
|
if ( library.importedModule->type == ObjectLibrary )
|
||||||
moduleNames.push_back ( GetModuleCleanTarget ( *library.importedModule ) );
|
moduleNames.push_back ( GetModuleCleanTarget ( *library.importedModule ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -550,7 +550,7 @@ MingwModuleHandler::GenerateCleanTarget () const
|
||||||
|
|
||||||
fprintf ( fMakefile,
|
fprintf ( fMakefile,
|
||||||
".PHONY: %s_clean\n",
|
".PHONY: %s_clean\n",
|
||||||
module.name.c_str() );
|
module.name.c_str() );
|
||||||
vector<string> referencedModuleNames;
|
vector<string> referencedModuleNames;
|
||||||
GetReferencedObjectLibraryModuleCleanTargets ( referencedModuleNames );
|
GetReferencedObjectLibraryModuleCleanTargets ( referencedModuleNames );
|
||||||
fprintf ( fMakefile,
|
fprintf ( fMakefile,
|
||||||
|
@ -1188,7 +1188,7 @@ MingwModuleHandler::GenerateWidlCommandsServer (
|
||||||
string generatedHeaderFilename = GetRpcServerHeaderFilename ( basename );
|
string generatedHeaderFilename = GetRpcServerHeaderFilename ( basename );
|
||||||
CLEAN_FILE(generatedHeaderFilename);
|
CLEAN_FILE(generatedHeaderFilename);
|
||||||
|
|
||||||
string generatedServerFilename = PassThruCacheDirectory (
|
string generatedServerFilename = PassThruCacheDirectory (
|
||||||
basename + "_s.c",
|
basename + "_s.c",
|
||||||
backend->intermediateDirectory );
|
backend->intermediateDirectory );
|
||||||
CLEAN_FILE(generatedServerFilename);
|
CLEAN_FILE(generatedServerFilename);
|
||||||
|
@ -1239,7 +1239,7 @@ MingwModuleHandler::GenerateWidlCommandsClient (
|
||||||
string generatedHeaderFilename = GetRpcClientHeaderFilename ( basename );
|
string generatedHeaderFilename = GetRpcClientHeaderFilename ( basename );
|
||||||
CLEAN_FILE(generatedHeaderFilename);
|
CLEAN_FILE(generatedHeaderFilename);
|
||||||
|
|
||||||
string generatedClientFilename = PassThruCacheDirectory (
|
string generatedClientFilename = PassThruCacheDirectory (
|
||||||
basename + "_c.c",
|
basename + "_c.c",
|
||||||
backend->intermediateDirectory );
|
backend->intermediateDirectory );
|
||||||
CLEAN_FILE(generatedClientFilename);
|
CLEAN_FILE(generatedClientFilename);
|
||||||
|
@ -1493,10 +1493,10 @@ MingwModuleHandler::GenerateCleanObjectsAsYouGoCode () const
|
||||||
{
|
{
|
||||||
vector<string> objectFiles;
|
vector<string> objectFiles;
|
||||||
GetObjectsVector ( module.non_if_data,
|
GetObjectsVector ( module.non_if_data,
|
||||||
objectFiles );
|
objectFiles );
|
||||||
vector<string> lines;
|
vector<string> lines;
|
||||||
MergeStringVector ( objectFiles,
|
MergeStringVector ( objectFiles,
|
||||||
lines );
|
lines );
|
||||||
for ( size_t i = 0; i < lines.size (); i++ )
|
for ( size_t i = 0; i < lines.size (); i++ )
|
||||||
{
|
{
|
||||||
fprintf ( fMakefile,
|
fprintf ( fMakefile,
|
||||||
|
@ -1518,14 +1518,14 @@ MingwModuleHandler::GenerateRunRsymCode () const
|
||||||
void
|
void
|
||||||
MingwModuleHandler::GenerateRunStripCode () const
|
MingwModuleHandler::GenerateRunStripCode () const
|
||||||
{
|
{
|
||||||
fprintf ( fMakefile,
|
fprintf ( fMakefile,
|
||||||
"ifeq ($(ROS_LEAN_AND_MEAN),yes)\n" );
|
"ifeq ($(ROS_LEAN_AND_MEAN),yes)\n" );
|
||||||
fprintf ( fMakefile,
|
fprintf ( fMakefile,
|
||||||
"\t$(ECHO_STRIP)\n" );
|
"\t$(ECHO_STRIP)\n" );
|
||||||
fprintf ( fMakefile,
|
fprintf ( fMakefile,
|
||||||
"\t${strip} -s -x -X $@\n\n" );
|
"\t${strip} -s -x -X $@\n\n" );
|
||||||
fprintf ( fMakefile,
|
fprintf ( fMakefile,
|
||||||
"endif\n" );
|
"endif\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -2331,7 +2331,7 @@ MingwKernelModuleHandler::GenerateKernelModuleTarget ()
|
||||||
|
|
||||||
string linkerParameters = ssprintf ( "-Wl,-T,%s%cntoskrnl.lnk -Wl,--subsystem,native -Wl,--entry,%s -Wl,--image-base,%s -Wl,--file-alignment,0x1000 -Wl,--section-alignment,0x1000 -nostartfiles -shared",
|
string linkerParameters = ssprintf ( "-Wl,-T,%s%cntoskrnl.lnk -Wl,--subsystem,native -Wl,--entry,%s -Wl,--image-base,%s -Wl,--file-alignment,0x1000 -Wl,--section-alignment,0x1000 -nostartfiles -shared",
|
||||||
module.GetBasePath ().c_str (),
|
module.GetBasePath ().c_str (),
|
||||||
cSep,
|
cSep,
|
||||||
module.GetEntryPoint(true).c_str (),
|
module.GetEntryPoint(true).c_str (),
|
||||||
module.baseaddress.c_str () );
|
module.baseaddress.c_str () );
|
||||||
GenerateLinkerCommand ( dependencies,
|
GenerateLinkerCommand ( dependencies,
|
||||||
|
@ -3232,8 +3232,8 @@ MingwLiveIsoModuleHandler::OutputProfilesDirectoryCommands ( string& livecdDirec
|
||||||
|
|
||||||
string livecdIni = "boot" + sSep + "bootdata" + sSep + "livecd.ini";
|
string livecdIni = "boot" + sSep + "bootdata" + sSep + "livecd.ini";
|
||||||
OutputCopyCommand ( livecdIni,
|
OutputCopyCommand ( livecdIni,
|
||||||
"freeldr.ini",
|
"freeldr.ini",
|
||||||
livecdDirectory );
|
livecdDirectory );
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -3244,8 +3244,8 @@ MingwLiveIsoModuleHandler::OutputLoaderCommands ( string& livecdDirectory )
|
||||||
backend->outputDirectory );
|
backend->outputDirectory );
|
||||||
CreateDirectory ( livecdDirectory + sSep + "loader" );
|
CreateDirectory ( livecdDirectory + sSep + "loader" );
|
||||||
OutputCopyCommand ( freeldr,
|
OutputCopyCommand ( freeldr,
|
||||||
"setupldr.sys",
|
"setupldr.sys",
|
||||||
livecdDirectory + sSep + "loader" );
|
livecdDirectory + sSep + "loader" );
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -3260,7 +3260,7 @@ MingwLiveIsoModuleHandler::OutputRegistryCommands ( string& livecdDirectory )
|
||||||
fprintf ( fMakefile,
|
fprintf ( fMakefile,
|
||||||
"\t$(MKHIVE_TARGET) boot%cbootdata %s boot%cbootdata%clivecd.inf boot%cbootdata%chiveinst.inf\n",
|
"\t$(MKHIVE_TARGET) boot%cbootdata %s boot%cbootdata%clivecd.inf boot%cbootdata%chiveinst.inf\n",
|
||||||
cSep, reactosSystem32ConfigDirectory.c_str (),
|
cSep, reactosSystem32ConfigDirectory.c_str (),
|
||||||
cSep, cSep, cSep, cSep );
|
cSep, cSep, cSep, cSep );
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -791,9 +791,9 @@ MSVCBackend::_generate_dsp ( const Module& module )
|
||||||
void
|
void
|
||||||
MSVCBackend::_generate_dsw_header ( FILE* OUT )
|
MSVCBackend::_generate_dsw_header ( FILE* OUT )
|
||||||
{
|
{
|
||||||
fprintf ( OUT, "Microsoft Developer Studio Workspace File, Format Version 6.00\r\n" );
|
fprintf ( OUT, "Microsoft Developer Studio Workspace File, Format Version 6.00\r\n" );
|
||||||
fprintf ( OUT, "# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!\r\n" );
|
fprintf ( OUT, "# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!\r\n" );
|
||||||
fprintf ( OUT, "\r\n" );
|
fprintf ( OUT, "\r\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -803,21 +803,21 @@ MSVCBackend::_generate_dsw_project (
|
||||||
std::string dsp_file,
|
std::string dsp_file,
|
||||||
const std::vector<Dependency*>& dependencies )
|
const std::vector<Dependency*>& dependencies )
|
||||||
{
|
{
|
||||||
dsp_file = DosSeparator ( std::string(".\\") + dsp_file );
|
dsp_file = DosSeparator ( std::string(".\\") + dsp_file );
|
||||||
|
|
||||||
// TODO FIXME - must they be sorted?
|
|
||||||
//@dependencies = sort(@dependencies);
|
|
||||||
|
|
||||||
fprintf ( OUT, "###############################################################################\r\n" );
|
// TODO FIXME - must they be sorted?
|
||||||
fprintf ( OUT, "\r\n" );
|
//@dependencies = sort(@dependencies);
|
||||||
fprintf ( OUT, "Project: \"%s\"=%s - Package Owner=<4>\r\n", module.name.c_str(), dsp_file.c_str() );
|
|
||||||
fprintf ( OUT, "\r\n" );
|
fprintf ( OUT, "###############################################################################\r\n" );
|
||||||
fprintf ( OUT, "Package=<5>\r\n" );
|
fprintf ( OUT, "\r\n" );
|
||||||
fprintf ( OUT, "{{{\r\n" );
|
fprintf ( OUT, "Project: \"%s\"=%s - Package Owner=<4>\r\n", module.name.c_str(), dsp_file.c_str() );
|
||||||
fprintf ( OUT, "}}}\r\n" );
|
fprintf ( OUT, "\r\n" );
|
||||||
fprintf ( OUT, "\r\n" );
|
fprintf ( OUT, "Package=<5>\r\n" );
|
||||||
fprintf ( OUT, "Package=<4>\r\n" );
|
fprintf ( OUT, "{{{\r\n" );
|
||||||
fprintf ( OUT, "{{{\r\n" );
|
fprintf ( OUT, "}}}\r\n" );
|
||||||
|
fprintf ( OUT, "\r\n" );
|
||||||
|
fprintf ( OUT, "Package=<4>\r\n" );
|
||||||
|
fprintf ( OUT, "{{{\r\n" );
|
||||||
for ( size_t i = 0; i < dependencies.size(); i++ )
|
for ( size_t i = 0; i < dependencies.size(); i++ )
|
||||||
{
|
{
|
||||||
Dependency& dependency = *dependencies[i];
|
Dependency& dependency = *dependencies[i];
|
||||||
|
@ -860,7 +860,7 @@ MSVCBackend::_generate_wine_dsw ( FILE* OUT )
|
||||||
std::string dsp_file = DspFileName ( module );
|
std::string dsp_file = DspFileName ( module );
|
||||||
|
|
||||||
// TODO FIXME - more wine hacks?
|
// TODO FIXME - more wine hacks?
|
||||||
/*if ( module.name == "gdi32" )
|
/*if ( module.name == "gdi32" )
|
||||||
{
|
{
|
||||||
for ( size_t idir = 0; idir < gdi32_dirs.size(); idir++ )
|
for ( size_t idir = 0; idir < gdi32_dirs.size(); idir++ )
|
||||||
{
|
{
|
||||||
|
@ -869,9 +869,9 @@ MSVCBackend::_generate_wine_dsw ( FILE* OUT )
|
||||||
|
|
||||||
dependencies.push_back ( Replace ( "gdi32_" + dir2, "/", "_" ) );
|
dependencies.push_back ( Replace ( "gdi32_" + dir2, "/", "_" ) );
|
||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
_generate_dsw_project ( OUT, module, dsp_file, module.dependencies );
|
_generate_dsw_project ( OUT, module, dsp_file, module.dependencies );
|
||||||
}
|
}
|
||||||
_generate_dsw_footer ( OUT );
|
_generate_dsw_footer ( OUT );
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,7 +70,7 @@ MSVCBackend::_generate_vcproj ( const Module& module )
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
string vcproj_file = VcprojFileName(module);
|
string vcproj_file = VcprojFileName(module);
|
||||||
|
|
||||||
string username = getenv ( "USERNAME" );
|
string username = getenv ( "USERNAME" );
|
||||||
string computername = getenv ( "COMPUTERNAME" );
|
string computername = getenv ( "COMPUTERNAME" );
|
||||||
|
@ -345,7 +345,7 @@ MSVCBackend::_generate_vcproj ( const Module& module )
|
||||||
fprintf ( OUT, "%s", escaped.c_str() );
|
fprintf ( OUT, "%s", escaped.c_str() );
|
||||||
}
|
}
|
||||||
fprintf ( OUT, "\"\r\n" );
|
fprintf ( OUT, "\"\r\n" );
|
||||||
fprintf ( OUT, "\t\t\t\tForcedIncludeFiles=\"%s\"\r\n", "warning.h");
|
fprintf ( OUT, "\t\t\t\tForcedIncludeFiles=\"%s\"\r\n", "warning.h");
|
||||||
fprintf ( OUT, "\t\t\t\tMinimalRebuild=\"%s\"\r\n", speed ? "FALSE" : "TRUE" );
|
fprintf ( OUT, "\t\t\t\tMinimalRebuild=\"%s\"\r\n", speed ? "FALSE" : "TRUE" );
|
||||||
fprintf ( OUT, "\t\t\t\tBasicRuntimeChecks=\"%s\"\r\n", sys ? 0 : (debug ? "3" : "0") );
|
fprintf ( OUT, "\t\t\t\tBasicRuntimeChecks=\"%s\"\r\n", sys ? 0 : (debug ? "3" : "0") );
|
||||||
fprintf ( OUT, "\t\t\t\tRuntimeLibrary=\"%d\"\r\n", debug ? 1 : 5 ); // 1=/MTd 5=/MT
|
fprintf ( OUT, "\t\t\t\tRuntimeLibrary=\"%d\"\r\n", debug ? 1 : 5 ); // 1=/MTd 5=/MT
|
||||||
|
@ -630,12 +630,12 @@ MSVCBackend::_generate_vcproj ( const Module& module )
|
||||||
fprintf ( OUT, "\t\t\t\t\t\tCommandLine=\"nasmw $(InputPath) -f coff -o "$(OutDir)\\$(InputName).obj"\"\r\n");
|
fprintf ( OUT, "\t\t\t\t\t\tCommandLine=\"nasmw $(InputPath) -f coff -o "$(OutDir)\\$(InputName).obj"\"\r\n");
|
||||||
fprintf ( OUT, "\t\t\t\t\t\tOutputs=\"$(OutDir)\\$(InputName).obj\"/>\r\n" );
|
fprintf ( OUT, "\t\t\t\t\t\tOutputs=\"$(OutDir)\\$(InputName).obj\"/>\r\n" );
|
||||||
}
|
}
|
||||||
else if ((tolower(source_file.at(source_file.size() - 1)) == 's'))
|
else if ((tolower(source_file.at(source_file.size() - 1)) == 's'))
|
||||||
{
|
{
|
||||||
fprintf ( OUT, "\t\t\t\t\t\tName=\"VCCustomBuildTool\"\r\n" );
|
fprintf ( OUT, "\t\t\t\t\t\tName=\"VCCustomBuildTool\"\r\n" );
|
||||||
fprintf ( OUT, "\t\t\t\t\t\tCommandLine=\"cl /E "$(InputPath)" %s /D__ASM__ | as -o "$(OutDir)\\$(InputName).obj"\"\r\n",include_string.c_str() );
|
fprintf ( OUT, "\t\t\t\t\t\tCommandLine=\"cl /E "$(InputPath)" %s /D__ASM__ | as -o "$(OutDir)\\$(InputName).obj"\"\r\n",include_string.c_str() );
|
||||||
fprintf ( OUT, "\t\t\t\t\t\tOutputs=\"$(OutDir)\\$(InputName).obj\"/>\r\n" );
|
fprintf ( OUT, "\t\t\t\t\t\tOutputs=\"$(OutDir)\\$(InputName).obj\"/>\r\n" );
|
||||||
}
|
}
|
||||||
fprintf ( OUT, "\t\t\t\t</FileConfiguration>\r\n" );
|
fprintf ( OUT, "\t\t\t\t</FileConfiguration>\r\n" );
|
||||||
}
|
}
|
||||||
//}
|
//}
|
||||||
|
|
|
@ -43,7 +43,7 @@ Bootstrap::IsSupportedModuleType ( ModuleType type )
|
||||||
{
|
{
|
||||||
case Kernel:
|
case Kernel:
|
||||||
case KernelModeDLL:
|
case KernelModeDLL:
|
||||||
case ExportDriver:
|
case ExportDriver:
|
||||||
case NativeDLL:
|
case NativeDLL:
|
||||||
case NativeCUI:
|
case NativeCUI:
|
||||||
case Win32DLL:
|
case Win32DLL:
|
||||||
|
|
|
@ -31,40 +31,40 @@ char cBadSep;
|
||||||
void
|
void
|
||||||
InitializeEnvironment ()
|
InitializeEnvironment ()
|
||||||
{
|
{
|
||||||
char *SepValue, *ExePostfixValue, *ExePrefixValue;;
|
char *SepValue, *ExePostfixValue, *ExePrefixValue;;
|
||||||
|
|
||||||
SepValue = getenv ( "SEP" );
|
SepValue = getenv ( "SEP" );
|
||||||
if ( SepValue && ( 0 == strcmp ( SepValue, DEF_SSEP ) || 0 == strcmp ( SepValue, DEF_SBAD_SEP ) ) )
|
if ( SepValue && ( 0 == strcmp ( SepValue, DEF_SSEP ) || 0 == strcmp ( SepValue, DEF_SBAD_SEP ) ) )
|
||||||
{
|
{
|
||||||
cSep = SepValue[0];
|
cSep = SepValue[0];
|
||||||
sSep = SepValue;
|
sSep = SepValue;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cSep = DEF_CSEP;
|
cSep = DEF_CSEP;
|
||||||
sSep = DEF_SSEP;
|
sSep = DEF_SSEP;
|
||||||
}
|
}
|
||||||
if ( cSep == DEF_CSEP )
|
if ( cSep == DEF_CSEP )
|
||||||
{
|
{
|
||||||
cBadSep = DEF_CBAD_SEP;
|
cBadSep = DEF_CBAD_SEP;
|
||||||
sBadSep = DEF_SBAD_SEP;
|
sBadSep = DEF_SBAD_SEP;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cBadSep = DEF_CSEP;
|
cBadSep = DEF_CSEP;
|
||||||
sBadSep = DEF_SSEP;
|
sBadSep = DEF_SSEP;
|
||||||
}
|
}
|
||||||
ExePostfixValue = getenv ( "EXEPOSTFIX" );
|
ExePostfixValue = getenv ( "EXEPOSTFIX" );
|
||||||
ExePrefixValue = getenv ( "EXEPREFIX" );
|
ExePrefixValue = getenv ( "EXEPREFIX" );
|
||||||
if ( ( ExePostfixValue == NULL || 0 == strlen ( ExePostfixValue ) ) &&
|
if ( ( ExePostfixValue == NULL || 0 == strlen ( ExePostfixValue ) ) &&
|
||||||
( ExePrefixValue == NULL || 0 == strlen ( ExePrefixValue ) ) )
|
( ExePrefixValue == NULL || 0 == strlen ( ExePrefixValue ) ) )
|
||||||
{
|
{
|
||||||
ExePostfix = DEF_EXEPOSTFIX;
|
ExePostfix = DEF_EXEPOSTFIX;
|
||||||
ExePrefix = DEF_EXEPREFIX;
|
ExePrefix = DEF_EXEPREFIX;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ExePostfix = ExePostfixValue ? ExePostfixValue : "";
|
ExePostfix = ExePostfixValue ? ExePostfixValue : "";
|
||||||
ExePrefix = ExePrefixValue ? ExePrefixValue : "";
|
ExePrefix = ExePrefixValue ? ExePrefixValue : "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -785,8 +785,8 @@ Module::GetModuleType ( const string& location, const XMLAttribute& attribute )
|
||||||
return Kernel;
|
return Kernel;
|
||||||
if ( attribute.value == "kernelmodedll" )
|
if ( attribute.value == "kernelmodedll" )
|
||||||
return KernelModeDLL;
|
return KernelModeDLL;
|
||||||
if ( attribute.value == "exportdriver" )
|
if ( attribute.value == "exportdriver" )
|
||||||
return ExportDriver;
|
return ExportDriver;
|
||||||
if ( attribute.value == "kernelmodedriver" )
|
if ( attribute.value == "kernelmodedriver" )
|
||||||
return KernelModeDriver;
|
return KernelModeDriver;
|
||||||
if ( attribute.value == "nativedll" )
|
if ( attribute.value == "nativedll" )
|
||||||
|
@ -855,7 +855,7 @@ Module::GetDefaultModuleExtension () const
|
||||||
return ".dll";
|
return ".dll";
|
||||||
case KernelModeDriver:
|
case KernelModeDriver:
|
||||||
case BootLoader:
|
case BootLoader:
|
||||||
case ExportDriver:
|
case ExportDriver:
|
||||||
return ".sys";
|
return ".sys";
|
||||||
case BootSector:
|
case BootSector:
|
||||||
return ".o";
|
return ".o";
|
||||||
|
@ -887,8 +887,8 @@ Module::GetDefaultModuleEntrypoint () const
|
||||||
case Kernel:
|
case Kernel:
|
||||||
return "NtProcessStartup";
|
return "NtProcessStartup";
|
||||||
case KernelModeDLL:
|
case KernelModeDLL:
|
||||||
case KernelModeDriver:
|
case KernelModeDriver:
|
||||||
case ExportDriver:
|
case ExportDriver:
|
||||||
return "DriverEntry@8";
|
return "DriverEntry@8";
|
||||||
case NativeDLL:
|
case NativeDLL:
|
||||||
return "DllMainCRTStartup@12";
|
return "DllMainCRTStartup@12";
|
||||||
|
@ -947,7 +947,7 @@ Module::GetDefaultModuleBaseaddress () const
|
||||||
return "0x00400000";
|
return "0x00400000";
|
||||||
case KernelModeDLL:
|
case KernelModeDLL:
|
||||||
case KernelModeDriver:
|
case KernelModeDriver:
|
||||||
case ExportDriver:
|
case ExportDriver:
|
||||||
return "0x00010000";
|
return "0x00010000";
|
||||||
case BuildTool:
|
case BuildTool:
|
||||||
case StaticLibrary:
|
case StaticLibrary:
|
||||||
|
@ -982,10 +982,10 @@ Module::IsDLL () const
|
||||||
{
|
{
|
||||||
case Kernel:
|
case Kernel:
|
||||||
case KernelModeDLL:
|
case KernelModeDLL:
|
||||||
case ExportDriver:
|
case ExportDriver:
|
||||||
case NativeDLL:
|
case NativeDLL:
|
||||||
case Win32DLL:
|
case Win32DLL:
|
||||||
return true;
|
return true;
|
||||||
case KernelModeDriver:
|
case KernelModeDriver:
|
||||||
case NativeCUI:
|
case NativeCUI:
|
||||||
case Win32CUI:
|
case Win32CUI:
|
||||||
|
@ -1019,7 +1019,7 @@ Module::GenerateInOutputTree () const
|
||||||
{
|
{
|
||||||
case Kernel:
|
case Kernel:
|
||||||
case KernelModeDLL:
|
case KernelModeDLL:
|
||||||
case ExportDriver:
|
case ExportDriver:
|
||||||
case NativeDLL:
|
case NativeDLL:
|
||||||
case Win32DLL:
|
case Win32DLL:
|
||||||
case KernelModeDriver:
|
case KernelModeDriver:
|
||||||
|
@ -1514,7 +1514,7 @@ AutoRegister::IsSupportedModuleType ( ModuleType type )
|
||||||
return true;
|
return true;
|
||||||
case Kernel:
|
case Kernel:
|
||||||
case KernelModeDLL:
|
case KernelModeDLL:
|
||||||
case ExportDriver:
|
case ExportDriver:
|
||||||
case NativeDLL:
|
case NativeDLL:
|
||||||
case NativeCUI:
|
case NativeCUI:
|
||||||
case Win32CUI:
|
case Win32CUI:
|
||||||
|
|
|
@ -227,7 +227,6 @@ Project::WriteConfigurationFile ()
|
||||||
void
|
void
|
||||||
Project::ExecuteInvocations ()
|
Project::ExecuteInvocations ()
|
||||||
{
|
{
|
||||||
fprintf( stderr, "ExecuteInvocations\n" );
|
|
||||||
for ( size_t i = 0; i < modules.size (); i++ )
|
for ( size_t i = 0; i < modules.size (); i++ )
|
||||||
modules[i]->InvokeModule ();
|
modules[i]->InvokeModule ();
|
||||||
}
|
}
|
||||||
|
|
|
@ -256,13 +256,13 @@ main ( int argc, char** argv )
|
||||||
printf ( " -vo{version|configuration} Adds subdirectory path to the default Intermediate-Outputdirectory.\n" );
|
printf ( " -vo{version|configuration} Adds subdirectory path to the default Intermediate-Outputdirectory.\n" );
|
||||||
printf ( "\n" );
|
printf ( "\n" );
|
||||||
printf ( " buildsystem Target build system. Can be one of:\n" );
|
printf ( " buildsystem Target build system. Can be one of:\n" );
|
||||||
|
|
||||||
std::map<std::string,Backend::Factory*>::iterator iter;
|
std::map<std::string,Backend::Factory*>::iterator iter;
|
||||||
for (iter = Backend::Factory::map_begin(); iter != Backend::Factory::map_end(); iter++)
|
for (iter = Backend::Factory::map_begin(); iter != Backend::Factory::map_end(); iter++)
|
||||||
{
|
{
|
||||||
Backend::Factory *factory = iter->second;
|
Backend::Factory *factory = iter->second;
|
||||||
printf ( " %-10s %s\n", factory->Name(), factory->Description());
|
printf ( " %-10s %s\n", factory->Name(), factory->Description());
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
try
|
try
|
||||||
|
|
|
@ -101,12 +101,12 @@ SysSetupGenerator::Generate ( HINF inf,
|
||||||
InfHostCloseFile ( inf );
|
InfHostCloseFile ( inf );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( 0 != InfHostAddLine ( context, NULL ) ||
|
if ( 0 != InfHostAddLine ( context, NULL ) ||
|
||||||
0 != InfHostAddField ( context, GetDirectoryId ( module ).c_str () ) ||
|
0 != InfHostAddField ( context, GetDirectoryId ( module ).c_str () ) ||
|
||||||
0 != InfHostAddField ( context, "" ) ||
|
0 != InfHostAddField ( context, "" ) ||
|
||||||
0 != InfHostAddField ( context, module.installName.c_str () ) ||
|
0 != InfHostAddField ( context, module.installName.c_str () ) ||
|
||||||
0 != InfHostAddField ( context, GetFlags ( module ).c_str () ) )
|
0 != InfHostAddField ( context, GetFlags ( module ).c_str () ) )
|
||||||
{
|
{
|
||||||
InfHostFreeContext ( context );
|
InfHostFreeContext ( context );
|
||||||
InfHostCloseFile ( inf );
|
InfHostCloseFile ( inf );
|
||||||
throw InvalidOperationException ( __FILE__,
|
throw InvalidOperationException ( __FILE__,
|
||||||
|
|
|
@ -409,7 +409,7 @@ TestSupportCode::WriteStartupFile ( Module& module )
|
||||||
s = s + sprintf ( s, "{\n" );
|
s = s + sprintf ( s, "{\n" );
|
||||||
s = s + sprintf ( s, " _SetPriorityClass(_GetCurrentProcess(), HIGH_PRIORITY_CLASS);\n" );
|
s = s + sprintf ( s, " _SetPriorityClass(_GetCurrentProcess(), HIGH_PRIORITY_CLASS);\n" );
|
||||||
s = s + sprintf ( s, " _SetThreadPriority(_GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL);\n" );
|
s = s + sprintf ( s, " _SetThreadPriority(_GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL);\n" );
|
||||||
s = s + sprintf ( s, " InitializeTests();\n" );
|
s = s + sprintf ( s, " InitializeTests();\n" );
|
||||||
s = s + sprintf ( s, " RegisterTests();\n" );
|
s = s + sprintf ( s, " RegisterTests();\n" );
|
||||||
s = s + sprintf ( s, " SetupOnce();\n" );
|
s = s + sprintf ( s, " SetupOnce();\n" );
|
||||||
s = s + sprintf ( s, " PerformTests(ConsoleWrite, NULL);\n" );
|
s = s + sprintf ( s, " PerformTests(ConsoleWrite, NULL);\n" );
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue