mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Introjucer: made sure that preprocessor tokens are replaced in the binary name used.
This commit is contained in:
parent
d8178b4e15
commit
ecaf9eb1ac
4 changed files with 19 additions and 17 deletions
|
|
@ -210,7 +210,7 @@ private:
|
|||
outputPath ="bin/" + File::createLegalFileName (config.getName().trim());
|
||||
}
|
||||
|
||||
output->setAttribute ("output", outputPath + "/" + config.getTargetBinaryNameString());
|
||||
output->setAttribute ("output", outputPath + "/" + replacePreprocessorTokens (config, config.getTargetBinaryNameString()));
|
||||
|
||||
output->setAttribute ("prefix_auto", 1);
|
||||
output->setAttribute ("extension_auto", 1);
|
||||
|
|
|
|||
|
|
@ -80,8 +80,8 @@ protected:
|
|||
return prefix + FileHelpers::windowsStylePath (file);
|
||||
}
|
||||
|
||||
static String getIntDirFile (const String& file) { return prependIfNotAbsolute (file, "$(IntDir)\\"); }
|
||||
static String getOutDirFile (const String& file) { return prependIfNotAbsolute (file, "$(OutDir)\\"); }
|
||||
String getIntDirFile (const BuildConfiguration& config, const String& file) const { return prependIfNotAbsolute (replacePreprocessorTokens (config, file), "$(IntDir)\\"); }
|
||||
String getOutDirFile (const BuildConfiguration& config, const String& file) const { return prependIfNotAbsolute (replacePreprocessorTokens (config, file), "$(OutDir)\\"); }
|
||||
|
||||
void updateOldSettings()
|
||||
{
|
||||
|
|
@ -740,7 +740,7 @@ protected:
|
|||
midl->setAttribute ("MkTypLibCompatible", "true");
|
||||
midl->setAttribute ("SuppressStartupBanner", "true");
|
||||
midl->setAttribute ("TargetEnvironment", "1");
|
||||
midl->setAttribute ("TypeLibraryName", getIntDirFile (config.getOutputFilename (".tlb", true)));
|
||||
midl->setAttribute ("TypeLibraryName", getIntDirFile (config, config.getOutputFilename (".tlb", true)));
|
||||
midl->setAttribute ("HeaderFileName", "");
|
||||
}
|
||||
|
||||
|
|
@ -766,7 +766,7 @@ protected:
|
|||
: (isDebug ? 1 : 0)); // MT static
|
||||
compiler->setAttribute ("RuntimeTypeInfo", "true");
|
||||
compiler->setAttribute ("UsePrecompiledHeader", "0");
|
||||
compiler->setAttribute ("PrecompiledHeaderFile", getIntDirFile (config.getOutputFilename (".pch", true)));
|
||||
compiler->setAttribute ("PrecompiledHeaderFile", getIntDirFile (config, config.getOutputFilename (".pch", true)));
|
||||
compiler->setAttribute ("AssemblerListingLocation", "$(IntDir)\\");
|
||||
compiler->setAttribute ("ObjectFile", "$(IntDir)\\");
|
||||
compiler->setAttribute ("ProgramDataBaseFileName", "$(IntDir)\\");
|
||||
|
|
@ -791,12 +791,12 @@ protected:
|
|||
{
|
||||
XmlElement* linker = createToolElement (xml, "VCLinkerTool");
|
||||
|
||||
linker->setAttribute ("OutputFile", getOutDirFile (config.getOutputFilename (msvcTargetSuffix, false)));
|
||||
linker->setAttribute ("OutputFile", getOutDirFile (config, config.getOutputFilename (msvcTargetSuffix, false)));
|
||||
linker->setAttribute ("SuppressStartupBanner", "true");
|
||||
|
||||
linker->setAttribute ("IgnoreDefaultLibraryNames", isDebug ? "libcmt.lib, msvcrt.lib" : "");
|
||||
linker->setAttribute ("GenerateDebugInformation", (isDebug || config.shouldGenerateDebugSymbols()) ? "true" : "false");
|
||||
linker->setAttribute ("ProgramDatabaseFile", getIntDirFile (config.getOutputFilename (".pdb", true)));
|
||||
linker->setAttribute ("ProgramDatabaseFile", getIntDirFile (config, config.getOutputFilename (".pdb", true)));
|
||||
linker->setAttribute ("SubSystem", msvcIsWindowsSubsystem ? "2" : "1");
|
||||
|
||||
const StringArray librarySearchPaths (config.getLibrarySearchPaths());
|
||||
|
|
@ -834,21 +834,21 @@ protected:
|
|||
XmlElement* linker = createToolElement (xml, "VCLinkerTool");
|
||||
|
||||
String extraLinkerOptions (getExtraLinkerFlagsString());
|
||||
extraLinkerOptions << " /IMPLIB:" << getOutDirFile (config.getOutputFilename (".lib", true));
|
||||
extraLinkerOptions << " /IMPLIB:" << getOutDirFile (config, config.getOutputFilename (".lib", true));
|
||||
linker->setAttribute ("AdditionalOptions", replacePreprocessorTokens (config, extraLinkerOptions).trim());
|
||||
|
||||
String externalLibraries (getExternalLibrariesString());
|
||||
if (externalLibraries.isNotEmpty())
|
||||
linker->setAttribute ("AdditionalDependencies", replacePreprocessorTokens (config, externalLibraries).trim());
|
||||
|
||||
linker->setAttribute ("OutputFile", getOutDirFile (config.getOutputFilename (msvcTargetSuffix, false)));
|
||||
linker->setAttribute ("OutputFile", getOutDirFile (config, config.getOutputFilename (msvcTargetSuffix, false)));
|
||||
linker->setAttribute ("IgnoreDefaultLibraryNames", isDebug ? "libcmt.lib, msvcrt.lib" : "");
|
||||
}
|
||||
else
|
||||
{
|
||||
XmlElement* librarian = createToolElement (xml, "VCLibrarianTool");
|
||||
|
||||
librarian->setAttribute ("OutputFile", getOutDirFile (config.getOutputFilename (msvcTargetSuffix, false)));
|
||||
librarian->setAttribute ("OutputFile", getOutDirFile (config, config.getOutputFilename (msvcTargetSuffix, false)));
|
||||
librarian->setAttribute ("IgnoreDefaultLibraryNames", isDebug ? "libcmt.lib, msvcrt.lib" : "");
|
||||
}
|
||||
}
|
||||
|
|
@ -860,7 +860,7 @@ protected:
|
|||
{
|
||||
XmlElement* bscMake = createToolElement (xml, "VCBscMakeTool");
|
||||
bscMake->setAttribute ("SuppressStartupBanner", "true");
|
||||
bscMake->setAttribute ("OutputFile", getIntDirFile (config.getOutputFilename (".bsc", true)));
|
||||
bscMake->setAttribute ("OutputFile", getIntDirFile (config, config.getOutputFilename (".bsc", true)));
|
||||
}
|
||||
|
||||
createToolElement (xml, "VCFxCopTool");
|
||||
|
|
@ -1251,12 +1251,12 @@ protected:
|
|||
|
||||
{
|
||||
XmlElement* link = group->createNewChildElement ("Link");
|
||||
link->createNewChildElement ("OutputFile")->addTextElement (getOutDirFile (config.getOutputFilename (msvcTargetSuffix, false)));
|
||||
link->createNewChildElement ("OutputFile")->addTextElement (getOutDirFile (config, config.getOutputFilename (msvcTargetSuffix, false)));
|
||||
link->createNewChildElement ("SuppressStartupBanner")->addTextElement ("true");
|
||||
link->createNewChildElement ("IgnoreSpecificDefaultLibraries")->addTextElement (isDebug ? "libcmt.lib; msvcrt.lib;;%(IgnoreSpecificDefaultLibraries)"
|
||||
: "%(IgnoreSpecificDefaultLibraries)");
|
||||
link->createNewChildElement ("GenerateDebugInformation")->addTextElement ((isDebug || config.shouldGenerateDebugSymbols()) ? "true" : "false");
|
||||
link->createNewChildElement ("ProgramDatabaseFile")->addTextElement (getIntDirFile (config.getOutputFilename (".pdb", true)));
|
||||
link->createNewChildElement ("ProgramDatabaseFile")->addTextElement (getIntDirFile (config, config.getOutputFilename (".pdb", true)));
|
||||
link->createNewChildElement ("SubSystem")->addTextElement (msvcIsWindowsSubsystem ? "Windows" : "Console");
|
||||
|
||||
if (! config.is64Bit())
|
||||
|
|
@ -1299,7 +1299,7 @@ protected:
|
|||
{
|
||||
XmlElement* bsc = group->createNewChildElement ("Bscmake");
|
||||
bsc->createNewChildElement ("SuppressStartupBanner")->addTextElement ("true");
|
||||
bsc->createNewChildElement ("OutputFile")->addTextElement (getIntDirFile (config.getOutputFilename (".bsc", true)));
|
||||
bsc->createNewChildElement ("OutputFile")->addTextElement (getIntDirFile (config, config.getOutputFilename (".bsc", true)));
|
||||
}
|
||||
|
||||
if (config.getPrebuildCommandString().isNotEmpty())
|
||||
|
|
|
|||
|
|
@ -230,7 +230,7 @@ private:
|
|||
writeHeaderPathFlags (out, config);
|
||||
out << newLine;
|
||||
|
||||
String targetName (config.getTargetBinaryNameString());
|
||||
String targetName (replacePreprocessorTokens (config, config.getTargetBinaryNameString()));
|
||||
|
||||
if (projectType.isStaticLibrary() || projectType.isDynamicLibrary())
|
||||
targetName = getLibbedFilename (targetName);
|
||||
|
|
|
|||
|
|
@ -678,7 +678,7 @@ private:
|
|||
if (xcodeCanUseDwarf)
|
||||
s.add ("DEBUG_INFORMATION_FORMAT = \"dwarf\"");
|
||||
|
||||
s.add ("PRODUCT_NAME = \"" + config.getTargetBinaryNameString() + "\"");
|
||||
s.add ("PRODUCT_NAME = \"" + replacePreprocessorTokens (config, config.getTargetBinaryNameString()) + "\"");
|
||||
return s;
|
||||
}
|
||||
|
||||
|
|
@ -1080,7 +1080,9 @@ private:
|
|||
{
|
||||
jassert (xcodeFileType.isNotEmpty());
|
||||
jassert (xcodeBundleExtension.isEmpty() || xcodeBundleExtension.startsWithChar('.'));
|
||||
String productName (getConfiguration(0)->getTargetBinaryName().toString());
|
||||
ProjectExporter::BuildConfiguration::Ptr config = getConfiguration(0);
|
||||
jassert (config != nullptr);
|
||||
String productName (replacePreprocessorTokens (*config, config->getTargetBinaryNameString()));
|
||||
|
||||
if (xcodeFileType == "archive.ar")
|
||||
productName = getLibbedFilename (productName);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue