diff --git a/extras/Introjucer/Builds/VisualStudio2005/The Introjucer.vcproj b/extras/Introjucer/Builds/VisualStudio2005/The Introjucer.vcproj index a294a4dd7d..16ee721653 100644 --- a/extras/Introjucer/Builds/VisualStudio2005/The Introjucer.vcproj +++ b/extras/Introjucer/Builds/VisualStudio2005/The Introjucer.vcproj @@ -48,7 +48,7 @@ PreprocessorDefinitions="_DEBUG"/> _DEBUG;%(PreprocessorDefinitions) - .\Debug\Introjucer.exe + $(OutDir)\Introjucer.exe true libcmt.lib; msvcrt.lib;;%(IgnoreSpecificDefaultLibraries) true @@ -110,7 +110,7 @@ NDEBUG;%(PreprocessorDefinitions) - .\Release\Introjucer.exe + $(OutDir)\Introjucer.exe true %(IgnoreSpecificDefaultLibraries) false diff --git a/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_MSVC.h b/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_MSVC.h index 8106ed5cfa..29b09323e3 100644 --- a/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_MSVC.h +++ b/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_MSVC.h @@ -75,6 +75,17 @@ protected: Value getLibraryType() { return getSetting (Ids::libraryType); } bool isLibraryDLL() const { return msvcIsDLL || (projectType.isLibrary() && (int) settings [Ids::libraryType] == 2); } + static String prependIfNotAbsolute (const String& file, const char* prefix) + { + if (File::isAbsolutePath (file) || file.startsWithChar ('$')) + prefix = ""; + + 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)\\"); } + void updateOldSettings() { { @@ -659,13 +670,11 @@ protected: void createConfig (XmlElement& xml, const MSVCBuildConfiguration& config) const { - String binariesPath (getConfigTargetPath (config)); - String intermediatesPath (getIntermediatesPath (config)); const bool isDebug = config.isDebug(); xml.setAttribute ("Name", createConfigName (config)); - xml.setAttribute ("OutputDirectory", FileHelpers::windowsStylePath (binariesPath)); - xml.setAttribute ("IntermediateDirectory", FileHelpers::windowsStylePath (intermediatesPath)); + xml.setAttribute ("OutputDirectory", FileHelpers::windowsStylePath (getConfigTargetPath (config))); + xml.setAttribute ("IntermediateDirectory", FileHelpers::windowsStylePath (getIntermediatesPath (config))); xml.setAttribute ("ConfigurationType", isLibraryDLL() ? "2" : (projectType.isLibrary() ? "4" : "1")); xml.setAttribute ("UseOfMFC", "0"); xml.setAttribute ("ATLMinimizesCRunTimeLibraryUsage", "false"); @@ -693,7 +702,7 @@ protected: midl->setAttribute ("MkTypLibCompatible", "true"); midl->setAttribute ("SuppressStartupBanner", "true"); midl->setAttribute ("TargetEnvironment", "1"); - midl->setAttribute ("TypeLibraryName", "$(IntDir)\\" + config.getOutputFilename (".tlb", true)); + midl->setAttribute ("TypeLibraryName", getIntDirFile (config.getOutputFilename (".tlb", true))); midl->setAttribute ("HeaderFileName", ""); } @@ -720,7 +729,7 @@ protected: : (isDebug ? 1 : 0)); // MT static compiler->setAttribute ("RuntimeTypeInfo", "true"); compiler->setAttribute ("UsePrecompiledHeader", "0"); - compiler->setAttribute ("PrecompiledHeaderFile", "$(IntDir)\\" + config.getOutputFilename (".pch", true)); + compiler->setAttribute ("PrecompiledHeaderFile", getIntDirFile (config.getOutputFilename (".pch", true))); compiler->setAttribute ("AssemblerListingLocation", "$(IntDir)\\"); compiler->setAttribute ("ObjectFile", "$(IntDir)\\"); compiler->setAttribute ("ProgramDataBaseFileName", "$(IntDir)\\"); @@ -745,12 +754,12 @@ protected: { XmlElement* linker = createToolElement (xml, "VCLinkerTool"); - linker->setAttribute ("OutputFile", FileHelpers::windowsStylePath (binariesPath + "/" + config.getOutputFilename (msvcTargetSuffix, false))); + linker->setAttribute ("OutputFile", getOutDirFile (config.getOutputFilename (msvcTargetSuffix, false))); linker->setAttribute ("SuppressStartupBanner", "true"); linker->setAttribute ("IgnoreDefaultLibraryNames", isDebug ? "libcmt.lib, msvcrt.lib" : ""); linker->setAttribute ("GenerateDebugInformation", isDebug ? "true" : "false"); - linker->setAttribute ("ProgramDatabaseFile", "$(IntDir)\\" + config.getOutputFilename (".pdb", true)); + linker->setAttribute ("ProgramDatabaseFile", getIntDirFile (config.getOutputFilename (".pdb", true))); linker->setAttribute ("SubSystem", msvcIsWindowsSubsystem ? "2" : "1"); const StringArray librarySearchPaths (config.getLibrarySearchPaths()); @@ -785,17 +794,17 @@ protected: XmlElement* linker = createToolElement (xml, "VCLinkerTool"); String extraLinkerOptions (getExtraLinkerFlagsString()); - extraLinkerOptions << " /IMPLIB:" << FileHelpers::windowsStylePath (binariesPath + "/" + config.getOutputFilename (".lib", true)); + extraLinkerOptions << " /IMPLIB:" << getOutDirFile (config.getOutputFilename (".lib", true)); linker->setAttribute ("AdditionalOptions", replacePreprocessorTokens (config, extraLinkerOptions).trim()); - linker->setAttribute ("OutputFile", FileHelpers::windowsStylePath (binariesPath + "/" + config.getOutputFilename (msvcTargetSuffix, false))); + linker->setAttribute ("OutputFile", getOutDirFile (config.getOutputFilename (msvcTargetSuffix, false))); linker->setAttribute ("IgnoreDefaultLibraryNames", isDebug ? "libcmt.lib, msvcrt.lib" : ""); } else { XmlElement* librarian = createToolElement (xml, "VCLibrarianTool"); - librarian->setAttribute ("OutputFile", FileHelpers::windowsStylePath (binariesPath + "/" + config.getOutputFilename (msvcTargetSuffix, false))); + librarian->setAttribute ("OutputFile", getOutDirFile (config.getOutputFilename (msvcTargetSuffix, false))); librarian->setAttribute ("IgnoreDefaultLibraryNames", isDebug ? "libcmt.lib, msvcrt.lib" : ""); } } @@ -807,7 +816,7 @@ protected: { XmlElement* bscMake = createToolElement (xml, "VCBscMakeTool"); bscMake->setAttribute ("SuppressStartupBanner", "true"); - bscMake->setAttribute ("OutputFile", "$(IntDir)\\" + config.getOutputFilename (".bsc", true)); + bscMake->setAttribute ("OutputFile", getIntDirFile (config.getOutputFilename (".bsc", true))); } createToolElement (xml, "VCFxCopTool"); @@ -1106,8 +1115,6 @@ protected: { const MSVCBuildConfiguration& config = dynamic_cast (*i); - String binariesPath (getConfigTargetPath (config)); - String intermediatesPath (getIntermediatesPath (config)); const bool isDebug = config.isDebug(); XmlElement* group = projectXml.createNewChildElement ("ItemDefinitionGroup"); @@ -1159,13 +1166,12 @@ protected: { XmlElement* link = group->createNewChildElement ("Link"); - link->createNewChildElement ("OutputFile") - ->addTextElement (FileHelpers::windowsStylePath (binariesPath + "/" + config.getOutputFilename (msvcTargetSuffix, false))); + link->createNewChildElement ("OutputFile")->addTextElement (getOutDirFile (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 ? "true" : "false"); - link->createNewChildElement ("ProgramDatabaseFile")->addTextElement ("$(IntDir)\\" + config.getOutputFilename (".pdb", true)); + link->createNewChildElement ("ProgramDatabaseFile")->addTextElement (getIntDirFile (config.getOutputFilename (".pdb", true))); link->createNewChildElement ("SubSystem")->addTextElement (msvcIsWindowsSubsystem ? "Windows" : "Console"); if (! is64Bit (config)) @@ -1193,7 +1199,7 @@ protected: { XmlElement* bsc = group->createNewChildElement ("Bscmake"); bsc->createNewChildElement ("SuppressStartupBanner")->addTextElement ("true"); - bsc->createNewChildElement ("OutputFile")->addTextElement ("$(IntDir)\\" + config.getOutputFilename (".bsc", true)); + bsc->createNewChildElement ("OutputFile")->addTextElement (getIntDirFile (config.getOutputFilename (".bsc", true))); } if (config.getPrebuildCommandString().isNotEmpty()) diff --git a/extras/Introjucer/Source/Project/jucer_Project.cpp b/extras/Introjucer/Source/Project/jucer_Project.cpp index 945d930d3e..09401a1a2d 100644 --- a/extras/Introjucer/Source/Project/jucer_Project.cpp +++ b/extras/Introjucer/Source/Project/jucer_Project.cpp @@ -244,7 +244,7 @@ String Project::saveProject (const File& file, bool isCommandLineApp) registerRecentFile (file); ProjectSaver saver (*this, file); - return saver.save (isCommandLineApp); + return saver.save (! isCommandLineApp); } String Project::saveResourcesOnly (const File& file) diff --git a/extras/JuceDemo/Builds/VisualStudio2005/Juce Demo.vcproj b/extras/JuceDemo/Builds/VisualStudio2005/Juce Demo.vcproj index 4f30603beb..b4e618e898 100644 --- a/extras/JuceDemo/Builds/VisualStudio2005/Juce Demo.vcproj +++ b/extras/JuceDemo/Builds/VisualStudio2005/Juce Demo.vcproj @@ -48,7 +48,7 @@ PreprocessorDefinitions="_DEBUG"/> _DEBUG;%(PreprocessorDefinitions) - .\Debug\JuceDemo.exe + $(OutDir)\JuceDemo.exe true libcmt.lib; msvcrt.lib;;%(IgnoreSpecificDefaultLibraries) true @@ -110,7 +110,7 @@ NDEBUG;%(PreprocessorDefinitions) - .\Release\JuceDemo.exe + $(OutDir)\JuceDemo.exe true %(IgnoreSpecificDefaultLibraries) false diff --git a/extras/audio plugin host/Builds/VisualStudio2005/Plugin Host.vcproj b/extras/audio plugin host/Builds/VisualStudio2005/Plugin Host.vcproj index f0b01806d3..a098600b68 100644 --- a/extras/audio plugin host/Builds/VisualStudio2005/Plugin Host.vcproj +++ b/extras/audio plugin host/Builds/VisualStudio2005/Plugin Host.vcproj @@ -48,7 +48,7 @@ PreprocessorDefinitions="_DEBUG"/> @@ -84,7 +84,7 @@ PreprocessorDefinitions="NDEBUG"/> diff --git a/extras/static library/Builds/VisualStudio2010/juce.vcxproj b/extras/static library/Builds/VisualStudio2010/juce.vcxproj index 6f8cd95c3d..5408890643 100644 --- a/extras/static library/Builds/VisualStudio2010/juce.vcxproj +++ b/extras/static library/Builds/VisualStudio2010/juce.vcxproj @@ -71,7 +71,7 @@ _DEBUG;%(PreprocessorDefinitions) - .\Debug\jucedebug.lib + $(OutDir)\jucedebug.lib true libcmt.lib; msvcrt.lib;;%(IgnoreSpecificDefaultLibraries) true @@ -110,7 +110,7 @@ NDEBUG;%(PreprocessorDefinitions) - .\Release\juce.lib + $(OutDir)\juce.lib true %(IgnoreSpecificDefaultLibraries) false diff --git a/extras/the jucer/Builds/VisualStudio2008/Jucer.vcproj b/extras/the jucer/Builds/VisualStudio2008/Jucer.vcproj index f626fd75c3..a6390f0a27 100644 --- a/extras/the jucer/Builds/VisualStudio2008/Jucer.vcproj +++ b/extras/the jucer/Builds/VisualStudio2008/Jucer.vcproj @@ -48,7 +48,7 @@ PreprocessorDefinitions="_DEBUG"/> _DEBUG;%(PreprocessorDefinitions) - .\Debug\Jucer.exe + $(OutDir)\Jucer.exe true libcmt.lib; msvcrt.lib;;%(IgnoreSpecificDefaultLibraries) true @@ -110,7 +110,7 @@ NDEBUG;%(PreprocessorDefinitions) - .\Release\Jucer.exe + $(OutDir)\Jucer.exe true %(IgnoreSpecificDefaultLibraries) false