@@ -15,44 +15,56 @@ | |||
*.manifest.res | |||
*.o | |||
*.d | |||
xcuserdata | |||
contents.xcworkspacedata | |||
.DS_Store | |||
.svn | |||
profile | |||
extras/juce demo/Builds/MacOSX/build | |||
extras/juce demo/Builds/Linux/build | |||
extras/juce demo/Builds/VisualStudio2005/Debug | |||
extras/juce demo/Builds/VisualStudio2005/Release | |||
extras/juce demo/Builds/VisualStudio2008/Debug | |||
extras/juce demo/Builds/VisualStudio2008/Release | |||
extras/juce demo/Builds/iPhone/build | |||
extras/audio plugins/demo/Builds/MacOSX/build | |||
extras/audio plugins/demo/Builds/Linux/build | |||
extras/audio plugins/demo/Builds/VisualStudio2005/Debug | |||
extras/audio plugins/demo/Builds/VisualStudio2005/Release | |||
extras/audio plugins/demo/Builds/VisualStudio2008/Debug | |||
extras/audio plugins/demo/Builds/VisualStudio2008/Release | |||
extras/JuceDemo/Builds/MacOSX/build | |||
extras/JuceDemo/Builds/Linux/build | |||
extras/JuceDemo/Builds/VisualStudio2005/Debug | |||
extras/JuceDemo/Builds/VisualStudio2005/Release | |||
extras/JuceDemo/Builds/VisualStudio2008/Debug | |||
extras/JuceDemo/Builds/VisualStudio2008/Release | |||
extras/JuceDemo/Builds/VisualStudio2010/Debug | |||
extras/JuceDemo/Builds/VisualStudio2010/Release | |||
extras/JuceDemo/Builds/Android/bin | |||
extras/JuceDemo/Builds/Android/src/com | |||
extras/JuceDemo/Builds/iPhone/build | |||
extras/audio plugin demo/Builds/MacOSX/build | |||
extras/audio plugin demo/Builds/Linux/build | |||
extras/audio plugin demo/Builds/VisualStudio2005/Debug | |||
extras/audio plugin demo/Builds/VisualStudio2005/Release | |||
extras/audio plugin demo/Builds/VisualStudio2008/Debug | |||
extras/audio plugin demo/Builds/VisualStudio2008/Release | |||
extras/audio plugin host/Builds/MacOSX/build | |||
extras/audio plugin host/Builds/Linux/build | |||
extras/audio plugin host/Builds/VisualStudio2005/Debug | |||
extras/audio plugin host/Builds/VisualStudio2005/Release | |||
extras/audio plugin host/Builds/VisualStudio2008/Debug | |||
extras/audio plugin host/Builds/VisualStudio2008/Release | |||
extras/Jucer (experimental)/Builds/MacOSX/build | |||
extras/Jucer (experimental)/Builds/Linux/build | |||
extras/Jucer (experimental)/Builds/VisualStudio2005/Debug | |||
extras/Jucer (experimental)/Builds/VisualStudio2005/Release | |||
extras/Jucer (experimental)/Builds/VisualStudio2008/Debug | |||
extras/Jucer (experimental)/Builds/VisualStudio2008/Release | |||
extras/Jucer (experimental)/Builds/iPhone/build | |||
extras/Introjucer/Builds/MacOSX/build | |||
extras/Introjucer/Builds/Linux/build | |||
extras/Introjucer/Builds/VisualStudio2005/Debug | |||
extras/Introjucer/Builds/VisualStudio2005/Release | |||
extras/Introjucer/Builds/VisualStudio2008/Debug | |||
extras/Introjucer/Builds/VisualStudio2008/Release | |||
extras/Introjucer/Builds/VisualStudio2010/Debug | |||
extras/Introjucer/Builds/VisualStudio2010/Release | |||
extras/the jucer/build/mac/build | |||
extras/audio plugin host/build/mac/build | |||
extras/binarybuilder/mac/build | |||
extras/prebuilt/Jucer.app | |||
extras/prebuilt/jucedemo.app | |||
extras/prebuilt/PluginHost.app | |||
bin/intermediate* | |||
bin/lib* | |||
bin/jucelib* | |||
bin/JUCE* | |||
Builds/VisualStudio2008_DLL/Debug | |||
Builds/VisualStudio2008_DLL/Release | |||
extras/binarybuilder/Builds/MacOSX/build | |||
extras/binarybuilder/Builds/Linux/build | |||
extras/binarybuilder/Builds/VisualStudio2005/Debug | |||
extras/binarybuilder/Builds/VisualStudio2005/Release | |||
extras/binarybuilder/Builds/VisualStudio2008/Debug | |||
extras/binarybuilder/Builds/VisualStudio2008/Release | |||
extras/binarybuilder/Builds/VisualStudio2010/Debug | |||
extras/binarybuilder/Builds/VisualStudio2010/Release | |||
extras/static library/Builds/MacOSX/build | |||
extras/static library/Builds/VisualStudio2008/Debug | |||
extras/static library/Builds/VisualStudio2008/Release | |||
extras/static library/Builds/VisualStudio2010/Debug | |||
extras/static library/Builds/VisualStudio2010/Release | |||
extras/windows dll/Builds/VisualStudio2008/Debug | |||
extras/windows dll/Builds/VisualStudio2008/Release |
@@ -1,19 +0,0 @@ | |||
Microsoft Visual Studio Solution File, Format Version 8.00 | |||
# Visual C++ Express 2005 | |||
Project("{30DE6365-A0C4-171D-3ADD-E102A1BD1BB8}") = "Juce", "Juce.vcproj", "{2F2AF28C-CD42-F164-1AC5-90A9ACD39DD3}" | |||
EndProject | |||
Global | |||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | |||
Debug|Win32 = Debug|Win32 | |||
Release|Win32 = Release|Win32 | |||
EndGlobalSection | |||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | |||
{2F2AF28C-CD42-F164-1AC5-90A9ACD39DD3}.Debug|Win32.ActiveCfg = Debug|Win32 | |||
{2F2AF28C-CD42-F164-1AC5-90A9ACD39DD3}.Debug|Win32.Build.0 = Debug|Win32 | |||
{2F2AF28C-CD42-F164-1AC5-90A9ACD39DD3}.Release|Win32.ActiveCfg = Release|Win32 | |||
{2F2AF28C-CD42-F164-1AC5-90A9ACD39DD3}.Release|Win32.Build.0 = Release|Win32 | |||
EndGlobalSection | |||
GlobalSection(SolutionProperties) = preSolution | |||
HideSolutionNode = FALSE | |||
EndGlobalSection | |||
EndGlobal |
@@ -1,19 +0,0 @@ | |||
Microsoft Visual Studio Solution File, Format Version 10.00 | |||
# Visual C++ Express 2008 | |||
Project("{30DE6365-A0C4-171D-3ADD-E102A1BD1BB8}") = "Juce", "Juce.vcproj", "{2F2AF28C-CD42-F164-1AC5-90A9ACD39DD3}" | |||
EndProject | |||
Global | |||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | |||
Debug|Win32 = Debug|Win32 | |||
Release|Win32 = Release|Win32 | |||
EndGlobalSection | |||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | |||
{2F2AF28C-CD42-F164-1AC5-90A9ACD39DD3}.Debug|Win32.ActiveCfg = Debug|Win32 | |||
{2F2AF28C-CD42-F164-1AC5-90A9ACD39DD3}.Debug|Win32.Build.0 = Debug|Win32 | |||
{2F2AF28C-CD42-F164-1AC5-90A9ACD39DD3}.Release|Win32.ActiveCfg = Release|Win32 | |||
{2F2AF28C-CD42-F164-1AC5-90A9ACD39DD3}.Release|Win32.Build.0 = Release|Win32 | |||
EndGlobalSection | |||
GlobalSection(SolutionProperties) = preSolution | |||
HideSolutionNode = FALSE | |||
EndGlobalSection | |||
EndGlobal |
@@ -1,19 +0,0 @@ | |||
Microsoft Visual Studio Solution File, Format Version 10.00 | |||
# Visual C++ Express 2008 | |||
Project("{30DE6365-A0C4-171D-3ADD-E102A1BD1BB8}") = "Juce", "Juce.vcproj", "{2F2AF28C-CD42-F164-1AC5-90A9ACD39DD3}" | |||
EndProject | |||
Global | |||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | |||
Debug|Win32 = Debug|Win32 | |||
Release|Win32 = Release|Win32 | |||
EndGlobalSection | |||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | |||
{2F2AF28C-CD42-F164-1AC5-90A9ACD39DD3}.Debug|Win32.ActiveCfg = Debug|Win32 | |||
{2F2AF28C-CD42-F164-1AC5-90A9ACD39DD3}.Debug|Win32.Build.0 = Debug|Win32 | |||
{2F2AF28C-CD42-F164-1AC5-90A9ACD39DD3}.Release|Win32.ActiveCfg = Release|Win32 | |||
{2F2AF28C-CD42-F164-1AC5-90A9ACD39DD3}.Release|Win32.Build.0 = Release|Win32 | |||
EndGlobalSection | |||
GlobalSection(SolutionProperties) = preSolution | |||
HideSolutionNode = FALSE | |||
EndGlobalSection | |||
EndGlobal |
@@ -1,18 +0,0 @@ | |||
Microsoft Visual Studio Solution File, Format Version 11.00 | |||
Project("{30DE6365-A0C4-171D-3ADD-E102A1BD1BB8}") = "Juce", "Juce.vcxproj", "{2F2AF28C-CD42-F164-1AC5-90A9ACD39DD3}" | |||
EndProject | |||
Global | |||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | |||
Debug|Win32 = Debug|Win32 | |||
Release|Win32 = Release|Win32 | |||
EndGlobalSection | |||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | |||
{2F2AF28C-CD42-F164-1AC5-90A9ACD39DD3}.Debug|Win32.ActiveCfg = Debug|Win32 | |||
{2F2AF28C-CD42-F164-1AC5-90A9ACD39DD3}.Debug|Win32.Build.0 = Debug|Win32 | |||
{2F2AF28C-CD42-F164-1AC5-90A9ACD39DD3}.Release|Win32.ActiveCfg = Release|Win32 | |||
{2F2AF28C-CD42-F164-1AC5-90A9ACD39DD3}.Release|Win32.Build.0 = Release|Win32 | |||
EndGlobalSection | |||
GlobalSection(SolutionProperties) = preSolution | |||
HideSolutionNode = FALSE | |||
EndGlobalSection | |||
EndGlobal |
@@ -1,845 +0,0 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||
<ItemGroup Label="ProjectConfigurations"> | |||
<ProjectConfiguration Include="Debug|Win32"> | |||
<Configuration>Debug</Configuration> | |||
<Platform>Win32</Platform> | |||
</ProjectConfiguration> | |||
<ProjectConfiguration Include="Release|Win32"> | |||
<Configuration>Release</Configuration> | |||
<Platform>Win32</Platform> | |||
</ProjectConfiguration> | |||
</ItemGroup> | |||
<PropertyGroup Label="Globals"> | |||
<ProjectGuid>{2F2AF28C-CD42-F164-1AC5-90A9ACD39DD3}</ProjectGuid> | |||
</PropertyGroup> | |||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/> | |||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> | |||
<ConfigurationType>StaticLibrary</ConfigurationType> | |||
<UseOfMfc>false</UseOfMfc> | |||
<CharacterSet>MultiByte</CharacterSet> | |||
</PropertyGroup> | |||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> | |||
<ConfigurationType>StaticLibrary</ConfigurationType> | |||
<UseOfMfc>false</UseOfMfc> | |||
<CharacterSet>MultiByte</CharacterSet> | |||
<WholeProgramOptimization>true</WholeProgramOptimization> | |||
</PropertyGroup> | |||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/> | |||
<ImportGroup Label="ExtensionSettings"/> | |||
<ImportGroup Label="PropertySheets"> | |||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" | |||
Label="LocalAppDataPlatform"/> | |||
</ImportGroup> | |||
<PropertyGroup Label="UserMacros"/> | |||
<PropertyGroup> | |||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> | |||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\..\..\bin\</OutDir> | |||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\..\..\bin\</IntDir> | |||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">jucelib_static_Win32_debug</TargetName> | |||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\..\..\bin\</OutDir> | |||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\..\..\bin\</IntDir> | |||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">jucelib_static_Win32</TargetName> | |||
</PropertyGroup> | |||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | |||
<Midl> | |||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> | |||
<MkTypLibCompatible>true</MkTypLibCompatible> | |||
<SuppressStartupBanner>true</SuppressStartupBanner> | |||
<TargetEnvironment>Win32</TargetEnvironment> | |||
<HeaderFileName/> | |||
</Midl> | |||
<ClCompile> | |||
<Optimization>Disabled</Optimization> | |||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat> | |||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | |||
<PreprocessorDefinitions>_LIB;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2010_78A501D=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> | |||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> | |||
<RuntimeTypeInfo>true</RuntimeTypeInfo> | |||
<PrecompiledHeader/> | |||
<AssemblerListingLocation>.\Debug\</AssemblerListingLocation> | |||
<ObjectFileName>.\Debug\</ObjectFileName> | |||
<ProgramDataBaseFileName>.\Debug\</ProgramDataBaseFileName> | |||
<WarningLevel>Level4</WarningLevel> | |||
<SuppressStartupBanner>true</SuppressStartupBanner> | |||
</ClCompile> | |||
<ResourceCompile> | |||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> | |||
</ResourceCompile> | |||
<Link> | |||
<OutputFile>.\..\..\bin\jucelib_static_Win32_debug.lib</OutputFile> | |||
<SuppressStartupBanner>true</SuppressStartupBanner> | |||
<IgnoreSpecificDefaultLibraries>libcmt.lib; msvcrt.lib;;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> | |||
<GenerateDebugInformation>true</GenerateDebugInformation> | |||
<ProgramDatabaseFile>.\Debug\jucedebug.pdb</ProgramDatabaseFile> | |||
<SubSystem>Windows</SubSystem> | |||
<TargetMachine>MachineX86</TargetMachine> | |||
</Link> | |||
<Bscmake> | |||
<SuppressStartupBanner>true</SuppressStartupBanner> | |||
<OutputFile>.\Debug\jucedebug.bsc</OutputFile> | |||
</Bscmake> | |||
</ItemDefinitionGroup> | |||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | |||
<Midl> | |||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> | |||
<MkTypLibCompatible>true</MkTypLibCompatible> | |||
<SuppressStartupBanner>true</SuppressStartupBanner> | |||
<TargetEnvironment>Win32</TargetEnvironment> | |||
<HeaderFileName/> | |||
</Midl> | |||
<ClCompile> | |||
<Optimization>MaxSpeed</Optimization> | |||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | |||
<PreprocessorDefinitions>_LIB;WIN32;_WINDOWS;NDEBUG;JUCER_VS2010_78A501D=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> | |||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> | |||
<RuntimeTypeInfo>true</RuntimeTypeInfo> | |||
<PrecompiledHeader/> | |||
<AssemblerListingLocation>.\Release\</AssemblerListingLocation> | |||
<ObjectFileName>.\Release\</ObjectFileName> | |||
<ProgramDataBaseFileName>.\Release\</ProgramDataBaseFileName> | |||
<WarningLevel>Level4</WarningLevel> | |||
<SuppressStartupBanner>true</SuppressStartupBanner> | |||
</ClCompile> | |||
<ResourceCompile> | |||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> | |||
</ResourceCompile> | |||
<Link> | |||
<OutputFile>.\..\..\bin\jucelib_static_Win32.lib</OutputFile> | |||
<SuppressStartupBanner>true</SuppressStartupBanner> | |||
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> | |||
<GenerateDebugInformation>false</GenerateDebugInformation> | |||
<ProgramDatabaseFile>.\Release\juce.pdb</ProgramDatabaseFile> | |||
<SubSystem>Windows</SubSystem> | |||
<TargetMachine>MachineX86</TargetMachine> | |||
<OptimizeReferences>true</OptimizeReferences> | |||
<EnableCOMDATFolding>true</EnableCOMDATFolding> | |||
</Link> | |||
<Bscmake> | |||
<SuppressStartupBanner>true</SuppressStartupBanner> | |||
<OutputFile>.\Release\juce.bsc</OutputFile> | |||
</Bscmake> | |||
</ItemDefinitionGroup> | |||
<ItemGroup> | |||
<ClCompile Include="..\..\src\application\juce_Application.cpp"/> | |||
<ClCompile Include="..\..\src\application\juce_ApplicationCommandInfo.cpp"/> | |||
<ClCompile Include="..\..\src\application\juce_ApplicationCommandManager.cpp"/> | |||
<ClCompile Include="..\..\src\application\juce_ApplicationCommandTarget.cpp"/> | |||
<ClCompile Include="..\..\src\application\juce_ApplicationProperties.cpp"/> | |||
<ClCompile Include="..\..\src\audio\audio_file_formats\juce_AiffAudioFormat.cpp"/> | |||
<ClCompile Include="..\..\src\audio\audio_file_formats\juce_AudioCDReader.cpp"/> | |||
<ClCompile Include="..\..\src\audio\audio_file_formats\juce_AudioFormat.cpp"/> | |||
<ClCompile Include="..\..\src\audio\audio_file_formats\juce_AudioFormatManager.cpp"/> | |||
<ClCompile Include="..\..\src\audio\audio_file_formats\juce_AudioFormatReader.cpp"/> | |||
<ClCompile Include="..\..\src\audio\audio_file_formats\juce_AudioFormatWriter.cpp"/> | |||
<ClCompile Include="..\..\src\audio\audio_file_formats\juce_AudioSubsectionReader.cpp"/> | |||
<ClCompile Include="..\..\src\audio\audio_file_formats\juce_AudioThumbnail.cpp"/> | |||
<ClCompile Include="..\..\src\audio\audio_file_formats\juce_AudioThumbnailCache.cpp"/> | |||
<ClCompile Include="..\..\src\audio\audio_file_formats\juce_CoreAudioFormat.cpp"/> | |||
<ClCompile Include="..\..\src\audio\audio_file_formats\juce_FlacAudioFormat.cpp"/> | |||
<ClCompile Include="..\..\src\audio\audio_file_formats\juce_OggVorbisAudioFormat.cpp"/> | |||
<ClCompile Include="..\..\src\audio\audio_file_formats\juce_QuickTimeAudioFormat.cpp"/> | |||
<ClCompile Include="..\..\src\audio\audio_file_formats\juce_WavAudioFormat.cpp"/> | |||
<ClCompile Include="..\..\src\audio\audio_sources\juce_AudioFormatReaderSource.cpp"/> | |||
<ClCompile Include="..\..\src\audio\audio_sources\juce_AudioSourcePlayer.cpp"/> | |||
<ClCompile Include="..\..\src\audio\audio_sources\juce_AudioTransportSource.cpp"/> | |||
<ClCompile Include="..\..\src\audio\audio_sources\juce_BufferingAudioSource.cpp"/> | |||
<ClCompile Include="..\..\src\audio\audio_sources\juce_ChannelRemappingAudioSource.cpp"/> | |||
<ClCompile Include="..\..\src\audio\audio_sources\juce_IIRFilterAudioSource.cpp"/> | |||
<ClCompile Include="..\..\src\audio\audio_sources\juce_MixerAudioSource.cpp"/> | |||
<ClCompile Include="..\..\src\audio\audio_sources\juce_ResamplingAudioSource.cpp"/> | |||
<ClCompile Include="..\..\src\audio\audio_sources\juce_ReverbAudioSource.cpp"/> | |||
<ClCompile Include="..\..\src\audio\audio_sources\juce_ToneGeneratorAudioSource.cpp"/> | |||
<ClCompile Include="..\..\src\audio\devices\juce_AudioDeviceManager.cpp"/> | |||
<ClCompile Include="..\..\src\audio\devices\juce_AudioIODevice.cpp"/> | |||
<ClCompile Include="..\..\src\audio\devices\juce_AudioIODeviceType.cpp"/> | |||
<ClCompile Include="..\..\src\audio\dsp\juce_AudioDataConverters.cpp"/> | |||
<ClCompile Include="..\..\src\audio\dsp\juce_AudioSampleBuffer.cpp"/> | |||
<ClCompile Include="..\..\src\audio\dsp\juce_IIRFilter.cpp"/> | |||
<ClCompile Include="..\..\src\audio\midi\juce_MidiBuffer.cpp"/> | |||
<ClCompile Include="..\..\src\audio\midi\juce_MidiFile.cpp"/> | |||
<ClCompile Include="..\..\src\audio\midi\juce_MidiKeyboardState.cpp"/> | |||
<ClCompile Include="..\..\src\audio\midi\juce_MidiMessage.cpp"/> | |||
<ClCompile Include="..\..\src\audio\midi\juce_MidiMessageCollector.cpp"/> | |||
<ClCompile Include="..\..\src\audio\midi\juce_MidiMessageSequence.cpp"/> | |||
<ClCompile Include="..\..\src\audio\midi\juce_MidiOutput.cpp"/> | |||
<ClCompile Include="..\..\src\audio\plugin_host\formats\juce_VSTPluginFormat.cpp"/> | |||
<ClCompile Include="..\..\src\audio\plugin_host\juce_AudioPluginFormat.cpp"/> | |||
<ClCompile Include="..\..\src\audio\plugin_host\juce_AudioPluginFormatManager.cpp"/> | |||
<ClCompile Include="..\..\src\audio\plugin_host\juce_KnownPluginList.cpp"/> | |||
<ClCompile Include="..\..\src\audio\plugin_host\juce_PluginDescription.cpp"/> | |||
<ClCompile Include="..\..\src\audio\plugin_host\juce_PluginDirectoryScanner.cpp"/> | |||
<ClCompile Include="..\..\src\audio\plugin_host\juce_PluginListComponent.cpp"/> | |||
<ClCompile Include="..\..\src\audio\processors\juce_AudioProcessor.cpp"/> | |||
<ClCompile Include="..\..\src\audio\processors\juce_AudioProcessorEditor.cpp"/> | |||
<ClCompile Include="..\..\src\audio\processors\juce_AudioProcessorGraph.cpp"/> | |||
<ClCompile Include="..\..\src\audio\processors\juce_AudioProcessorPlayer.cpp"/> | |||
<ClCompile Include="..\..\src\audio\processors\juce_GenericAudioProcessorEditor.cpp"/> | |||
<ClCompile Include="..\..\src\audio\synthesisers\juce_Sampler.cpp"/> | |||
<ClCompile Include="..\..\src\audio\synthesisers\juce_Synthesiser.cpp"/> | |||
<ClCompile Include="..\..\src\containers\juce_AbstractFifo.cpp"/> | |||
<ClCompile Include="..\..\src\containers\juce_DynamicObject.cpp"/> | |||
<ClCompile Include="..\..\src\containers\juce_NamedValueSet.cpp"/> | |||
<ClCompile Include="..\..\src\containers\juce_PropertySet.cpp"/> | |||
<ClCompile Include="..\..\src\containers\juce_Value.cpp"/> | |||
<ClCompile Include="..\..\src\containers\juce_ValueTree.cpp"/> | |||
<ClCompile Include="..\..\src\containers\juce_Variant.cpp"/> | |||
<ClCompile Include="..\..\src\core\juce_FileLogger.cpp"/> | |||
<ClCompile Include="..\..\src\core\juce_Logger.cpp"/> | |||
<ClCompile Include="..\..\src\core\juce_PerformanceCounter.cpp"/> | |||
<ClCompile Include="..\..\src\core\juce_RelativeTime.cpp"/> | |||
<ClCompile Include="..\..\src\core\juce_Result.cpp"/> | |||
<ClCompile Include="..\..\src\core\juce_SystemStats.cpp"/> | |||
<ClCompile Include="..\..\src\core\juce_Time.cpp"/> | |||
<ClCompile Include="..\..\src\core\juce_Uuid.cpp"/> | |||
<ClCompile Include="..\..\src\cryptography\juce_BlowFish.cpp"/> | |||
<ClCompile Include="..\..\src\cryptography\juce_MD5.cpp"/> | |||
<ClCompile Include="..\..\src\cryptography\juce_Primes.cpp"/> | |||
<ClCompile Include="..\..\src\cryptography\juce_RSAKey.cpp"/> | |||
<ClCompile Include="..\..\src\cryptography\juce_SHA256.cpp"/> | |||
<ClCompile Include="..\..\src\events\juce_ActionBroadcaster.cpp"/> | |||
<ClCompile Include="..\..\src\events\juce_AsyncUpdater.cpp"/> | |||
<ClCompile Include="..\..\src\events\juce_ChangeBroadcaster.cpp"/> | |||
<ClCompile Include="..\..\src\events\juce_InterprocessConnection.cpp"/> | |||
<ClCompile Include="..\..\src\events\juce_InterprocessConnectionServer.cpp"/> | |||
<ClCompile Include="..\..\src\events\juce_Message.cpp"/> | |||
<ClCompile Include="..\..\src\events\juce_MessageListener.cpp"/> | |||
<ClCompile Include="..\..\src\events\juce_MessageManager.cpp"/> | |||
<ClCompile Include="..\..\src\events\juce_MultiTimer.cpp"/> | |||
<ClCompile Include="..\..\src\events\juce_Timer.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\juce_Component.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\juce_ComponentListener.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\juce_Desktop.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\juce_ModalComponentManager.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\buttons\juce_ArrowButton.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\buttons\juce_Button.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\buttons\juce_DrawableButton.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\buttons\juce_HyperlinkButton.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\buttons\juce_ImageButton.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\buttons\juce_ShapeButton.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\buttons\juce_TextButton.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\buttons\juce_ToggleButton.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\buttons\juce_ToolbarButton.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\code_editor\juce_CodeDocument.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\code_editor\juce_CodeEditorComponent.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\code_editor\juce_CPlusPlusCodeTokeniser.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\controls\juce_ComboBox.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\controls\juce_ImageComponent.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\controls\juce_Label.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\controls\juce_ListBox.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\controls\juce_ProgressBar.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\controls\juce_Slider.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\controls\juce_TableHeaderComponent.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\controls\juce_TableListBox.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\controls\juce_TextEditor.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\controls\juce_Toolbar.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\controls\juce_ToolbarItemComponent.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\controls\juce_ToolbarItemPalette.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\controls\juce_TreeView.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\filebrowser\juce_DirectoryContentsDisplayComponent.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\filebrowser\juce_DirectoryContentsList.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\filebrowser\juce_FileBrowserComponent.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\filebrowser\juce_FileChooser.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\filebrowser\juce_FileChooserDialogBox.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\filebrowser\juce_FileFilter.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\filebrowser\juce_FileListComponent.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\filebrowser\juce_FilenameComponent.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\filebrowser\juce_FileSearchPathListComponent.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\filebrowser\juce_FileTreeComponent.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\filebrowser\juce_ImagePreviewComponent.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\filebrowser\juce_WildcardFileFilter.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\keyboard\juce_CaretComponent.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\keyboard\juce_KeyboardFocusTraverser.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\keyboard\juce_KeyListener.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\keyboard\juce_KeyMappingEditorComponent.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\keyboard\juce_KeyPress.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\keyboard\juce_KeyPressMappingSet.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\keyboard\juce_ModifierKeys.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\layout\juce_ComponentAnimator.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\layout\juce_ComponentBoundsConstrainer.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\layout\juce_ComponentBuilder.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\layout\juce_ComponentMovementWatcher.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\layout\juce_GroupComponent.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\layout\juce_MultiDocumentPanel.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\layout\juce_ResizableBorderComponent.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\layout\juce_ResizableCornerComponent.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\layout\juce_ResizableEdgeComponent.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\layout\juce_ScrollBar.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\layout\juce_StretchableLayoutManager.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\layout\juce_StretchableLayoutResizerBar.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\layout\juce_StretchableObjectResizer.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\layout\juce_TabbedButtonBar.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\layout\juce_TabbedComponent.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\layout\juce_Viewport.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\lookandfeel\juce_LookAndFeel.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\lookandfeel\juce_OldSchoolLookAndFeel.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\menus\juce_MenuBarComponent.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\menus\juce_MenuBarModel.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\menus\juce_PopupMenu.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\mouse\juce_ComponentDragger.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\mouse\juce_DragAndDropContainer.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\mouse\juce_MouseCursor.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\mouse\juce_MouseEvent.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\mouse\juce_MouseInputSource.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\mouse\juce_MouseListener.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\positioning\juce_MarkerList.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\positioning\juce_RelativeCoordinate.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\positioning\juce_RelativeCoordinatePositioner.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\positioning\juce_RelativeParallelogram.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\positioning\juce_RelativePoint.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\positioning\juce_RelativePointPath.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\positioning\juce_RelativeRectangle.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\properties\juce_BooleanPropertyComponent.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\properties\juce_ButtonPropertyComponent.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\properties\juce_ChoicePropertyComponent.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\properties\juce_PropertyComponent.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\properties\juce_PropertyPanel.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\properties\juce_SliderPropertyComponent.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\properties\juce_TextPropertyComponent.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\special\juce_AudioDeviceSelectorComponent.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\special\juce_BubbleComponent.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\special\juce_BubbleMessageComponent.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\special\juce_ColourSelector.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\special\juce_DropShadower.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\special\juce_MidiKeyboardComponent.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\special\juce_OpenGLComponent.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\special\juce_PreferencesPanel.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\special\juce_SystemTrayIconComponent.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\windows\juce_AlertWindow.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\windows\juce_CallOutBox.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\windows\juce_ComponentPeer.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\windows\juce_DialogWindow.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\windows\juce_DocumentWindow.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\windows\juce_ResizableWindow.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\windows\juce_SplashScreen.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\windows\juce_ThreadWithProgressWindow.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\windows\juce_TooltipWindow.cpp"/> | |||
<ClCompile Include="..\..\src\gui\components\windows\juce_TopLevelWindow.cpp"/> | |||
<ClCompile Include="..\..\src\gui\graphics\colour\juce_Colour.cpp"/> | |||
<ClCompile Include="..\..\src\gui\graphics\colour\juce_ColourGradient.cpp"/> | |||
<ClCompile Include="..\..\src\gui\graphics\colour\juce_Colours.cpp"/> | |||
<ClCompile Include="..\..\src\gui\graphics\contexts\juce_EdgeTable.cpp"/> | |||
<ClCompile Include="..\..\src\gui\graphics\contexts\juce_FillType.cpp"/> | |||
<ClCompile Include="..\..\src\gui\graphics\contexts\juce_GraphicsContext.cpp"/> | |||
<ClCompile Include="..\..\src\gui\graphics\contexts\juce_Justification.cpp"/> | |||
<ClCompile Include="..\..\src\gui\graphics\contexts\juce_LowLevelGraphicsPostScriptRenderer.cpp"/> | |||
<ClCompile Include="..\..\src\gui\graphics\contexts\juce_LowLevelGraphicsSoftwareRenderer.cpp"/> | |||
<ClCompile Include="..\..\src\gui\graphics\contexts\juce_RectanglePlacement.cpp"/> | |||
<ClCompile Include="..\..\src\gui\graphics\drawables\juce_Drawable.cpp"/> | |||
<ClCompile Include="..\..\src\gui\graphics\drawables\juce_DrawableComposite.cpp"/> | |||
<ClCompile Include="..\..\src\gui\graphics\drawables\juce_DrawableImage.cpp"/> | |||
<ClCompile Include="..\..\src\gui\graphics\drawables\juce_DrawablePath.cpp"/> | |||
<ClCompile Include="..\..\src\gui\graphics\drawables\juce_DrawableRectangle.cpp"/> | |||
<ClCompile Include="..\..\src\gui\graphics\drawables\juce_DrawableShape.cpp"/> | |||
<ClCompile Include="..\..\src\gui\graphics\drawables\juce_DrawableText.cpp"/> | |||
<ClCompile Include="..\..\src\gui\graphics\drawables\juce_SVGParser.cpp"/> | |||
<ClCompile Include="..\..\src\gui\graphics\effects\juce_DropShadowEffect.cpp"/> | |||
<ClCompile Include="..\..\src\gui\graphics\effects\juce_GlowEffect.cpp"/> | |||
<ClCompile Include="..\..\src\gui\graphics\fonts\juce_CustomTypeface.cpp"/> | |||
<ClCompile Include="..\..\src\gui\graphics\fonts\juce_Font.cpp"/> | |||
<ClCompile Include="..\..\src\gui\graphics\fonts\juce_GlyphArrangement.cpp"/> | |||
<ClCompile Include="..\..\src\gui\graphics\fonts\juce_TextLayout.cpp"/> | |||
<ClCompile Include="..\..\src\gui\graphics\fonts\juce_Typeface.cpp"/> | |||
<ClCompile Include="..\..\src\gui\graphics\geometry\juce_AffineTransform.cpp"/> | |||
<ClCompile Include="..\..\src\gui\graphics\geometry\juce_Path.cpp"/> | |||
<ClCompile Include="..\..\src\gui\graphics\geometry\juce_PathIterator.cpp"/> | |||
<ClCompile Include="..\..\src\gui\graphics\geometry\juce_PathStrokeType.cpp"/> | |||
<ClCompile Include="..\..\src\gui\graphics\geometry\juce_RectangleList.cpp"/> | |||
<ClCompile Include="..\..\src\gui\graphics\imaging\image_file_formats\juce_GIFLoader.cpp"/> | |||
<ClCompile Include="..\..\src\gui\graphics\imaging\image_file_formats\juce_JPEGLoader.cpp"/> | |||
<ClCompile Include="..\..\src\gui\graphics\imaging\image_file_formats\juce_PNGLoader.cpp"/> | |||
<ClCompile Include="..\..\src\gui\graphics\imaging\juce_Image.cpp"/> | |||
<ClCompile Include="..\..\src\gui\graphics\imaging\juce_ImageCache.cpp"/> | |||
<ClCompile Include="..\..\src\gui\graphics\imaging\juce_ImageConvolutionKernel.cpp"/> | |||
<ClCompile Include="..\..\src\gui\graphics\imaging\juce_ImageFileFormat.cpp"/> | |||
<ClCompile Include="..\..\src\io\files\juce_DirectoryIterator.cpp"/> | |||
<ClCompile Include="..\..\src\io\files\juce_File.cpp"/> | |||
<ClCompile Include="..\..\src\io\files\juce_FileInputStream.cpp"/> | |||
<ClCompile Include="..\..\src\io\files\juce_FileOutputStream.cpp"/> | |||
<ClCompile Include="..\..\src\io\files\juce_FileSearchPath.cpp"/> | |||
<ClCompile Include="..\..\src\io\files\juce_NamedPipe.cpp"/> | |||
<ClCompile Include="..\..\src\io\files\juce_TemporaryFile.cpp"/> | |||
<ClCompile Include="..\..\src\io\files\juce_ZipFile.cpp"/> | |||
<ClCompile Include="..\..\src\io\network\juce_MACAddress.cpp"/> | |||
<ClCompile Include="..\..\src\io\network\juce_Socket.cpp"/> | |||
<ClCompile Include="..\..\src\io\network\juce_URL.cpp"/> | |||
<ClCompile Include="..\..\src\io\streams\juce_BufferedInputStream.cpp"/> | |||
<ClCompile Include="..\..\src\io\streams\juce_FileInputSource.cpp"/> | |||
<ClCompile Include="..\..\src\io\streams\juce_GZIPCompressorOutputStream.cpp"/> | |||
<ClCompile Include="..\..\src\io\streams\juce_GZIPDecompressorInputStream.cpp"/> | |||
<ClCompile Include="..\..\src\io\streams\juce_InputStream.cpp"/> | |||
<ClCompile Include="..\..\src\io\streams\juce_MemoryInputStream.cpp"/> | |||
<ClCompile Include="..\..\src\io\streams\juce_MemoryOutputStream.cpp"/> | |||
<ClCompile Include="..\..\src\io\streams\juce_OutputStream.cpp"/> | |||
<ClCompile Include="..\..\src\io\streams\juce_SubregionStream.cpp"/> | |||
<ClCompile Include="..\..\src\maths\juce_BigInteger.cpp"/> | |||
<ClCompile Include="..\..\src\maths\juce_Expression.cpp"/> | |||
<ClCompile Include="..\..\src\maths\juce_Random.cpp"/> | |||
<ClCompile Include="..\..\src\memory\juce_MemoryBlock.cpp"/> | |||
<ClCompile Include="..\..\src\native\common\juce_posix_NamedPipe.cpp"/> | |||
<ClCompile Include="..\..\src\native\linux\juce_linux_Audio.cpp"/> | |||
<ClCompile Include="..\..\src\native\linux\juce_linux_AudioCDReader.cpp"/> | |||
<ClCompile Include="..\..\src\native\linux\juce_linux_Clipboard.cpp"/> | |||
<ClCompile Include="..\..\src\native\linux\juce_linux_FileChooser.cpp"/> | |||
<ClCompile Include="..\..\src\native\linux\juce_linux_Files.cpp"/> | |||
<ClCompile Include="..\..\src\native\linux\juce_linux_Fonts.cpp"/> | |||
<ClCompile Include="..\..\src\native\linux\juce_linux_JackAudio.cpp"/> | |||
<ClCompile Include="..\..\src\native\linux\juce_linux_Messaging.cpp"/> | |||
<ClCompile Include="..\..\src\native\linux\juce_linux_Midi.cpp"/> | |||
<ClCompile Include="..\..\src\native\linux\juce_linux_NativeCode.cpp"/> | |||
<ClCompile Include="..\..\src\native\linux\juce_linux_Network.cpp"/> | |||
<ClCompile Include="..\..\src\native\linux\juce_linux_OpenGLComponent.cpp"/> | |||
<ClCompile Include="..\..\src\native\linux\juce_linux_SystemStats.cpp"/> | |||
<ClCompile Include="..\..\src\native\linux\juce_linux_Threads.cpp"/> | |||
<ClCompile Include="..\..\src\native\linux\juce_linux_WebBrowserComponent.cpp"/> | |||
<ClCompile Include="..\..\src\native\linux\juce_linux_Windowing.cpp"/> | |||
<ClCompile Include="..\..\src\native\mac\juce_ios_Audio.cpp"/> | |||
<ClCompile Include="..\..\src\native\mac\juce_mac_CoreAudio.cpp"/> | |||
<ClCompile Include="..\..\src\native\mac\juce_mac_CoreMidi.cpp"/> | |||
<ClCompile Include="..\..\src\native\windows\juce_win32_ActiveXComponent.cpp"/> | |||
<ClCompile Include="..\..\src\native\windows\juce_win32_ASIO.cpp"/> | |||
<ClCompile Include="..\..\src\native\windows\juce_win32_AudioCDReader.cpp"/> | |||
<ClCompile Include="..\..\src\native\windows\juce_win32_CameraDevice.cpp"/> | |||
<ClCompile Include="..\..\src\native\windows\juce_win32_Direct2DGraphicsContext.cpp"/> | |||
<ClCompile Include="..\..\src\native\windows\juce_win32_DirectShowComponent.cpp"/> | |||
<ClCompile Include="..\..\src\native\windows\juce_win32_DirectSound.cpp"/> | |||
<ClCompile Include="..\..\src\native\windows\juce_win32_FileChooser.cpp"/> | |||
<ClCompile Include="..\..\src\native\windows\juce_win32_Files.cpp"/> | |||
<ClCompile Include="..\..\src\native\windows\juce_win32_Fonts.cpp"/> | |||
<ClCompile Include="..\..\src\native\windows\juce_win32_Messaging.cpp"/> | |||
<ClCompile Include="..\..\src\native\windows\juce_win32_Midi.cpp"/> | |||
<ClCompile Include="..\..\src\native\windows\juce_win32_NativeCode.cpp"/> | |||
<ClCompile Include="..\..\src\native\windows\juce_win32_Network.cpp"/> | |||
<ClCompile Include="..\..\src\native\windows\juce_win32_OpenGLComponent.cpp"/> | |||
<ClCompile Include="..\..\src\native\windows\juce_win32_QuickTimeMovieComponent.cpp"/> | |||
<ClCompile Include="..\..\src\native\windows\juce_win32_Registry.cpp"/> | |||
<ClCompile Include="..\..\src\native\windows\juce_win32_SystemStats.cpp"/> | |||
<ClCompile Include="..\..\src\native\windows\juce_win32_Threads.cpp"/> | |||
<ClCompile Include="..\..\src\native\windows\juce_win32_WASAPI.cpp"/> | |||
<ClCompile Include="..\..\src\native\windows\juce_win32_WebBrowserComponent.cpp"/> | |||
<ClCompile Include="..\..\src\native\windows\juce_win32_Windowing.cpp"/> | |||
<ClCompile Include="..\..\src\native\android\juce_android_Audio.cpp"/> | |||
<ClCompile Include="..\..\src\native\android\juce_android_CameraDevice.cpp"/> | |||
<ClCompile Include="..\..\src\native\android\juce_android_FileChooser.cpp"/> | |||
<ClCompile Include="..\..\src\native\android\juce_android_Files.cpp"/> | |||
<ClCompile Include="..\..\src\native\android\juce_android_Fonts.cpp"/> | |||
<ClCompile Include="..\..\src\native\android\juce_android_GraphicsContext.cpp"/> | |||
<ClCompile Include="..\..\src\native\android\juce_android_Messaging.cpp"/> | |||
<ClCompile Include="..\..\src\native\android\juce_android_Midi.cpp"/> | |||
<ClCompile Include="..\..\src\native\android\juce_android_Misc.cpp"/> | |||
<ClCompile Include="..\..\src\native\android\juce_android_NativeCode.cpp"/> | |||
<ClCompile Include="..\..\src\native\android\juce_android_Network.cpp"/> | |||
<ClCompile Include="..\..\src\native\android\juce_android_OpenGLComponent.cpp"/> | |||
<ClCompile Include="..\..\src\native\android\juce_android_SystemStats.cpp"/> | |||
<ClCompile Include="..\..\src\native\android\juce_android_Threads.cpp"/> | |||
<ClCompile Include="..\..\src\native\android\juce_android_WebBrowserComponent.cpp"/> | |||
<ClCompile Include="..\..\src\native\android\juce_android_Windowing.cpp"/> | |||
<ClCompile Include="..\..\src\text\juce_CharacterFunctions.cpp"/> | |||
<ClCompile Include="..\..\src\text\juce_Identifier.cpp"/> | |||
<ClCompile Include="..\..\src\text\juce_JSON.cpp"/> | |||
<ClCompile Include="..\..\src\text\juce_LocalisedStrings.cpp"/> | |||
<ClCompile Include="..\..\src\text\juce_String.cpp"/> | |||
<ClCompile Include="..\..\src\text\juce_StringArray.cpp"/> | |||
<ClCompile Include="..\..\src\text\juce_StringPairArray.cpp"/> | |||
<ClCompile Include="..\..\src\text\juce_StringPool.cpp"/> | |||
<ClCompile Include="..\..\src\text\juce_XmlDocument.cpp"/> | |||
<ClCompile Include="..\..\src\text\juce_XmlElement.cpp"/> | |||
<ClCompile Include="..\..\src\threads\juce_ReadWriteLock.cpp"/> | |||
<ClCompile Include="..\..\src\threads\juce_Thread.cpp"/> | |||
<ClCompile Include="..\..\src\threads\juce_ThreadPool.cpp"/> | |||
<ClCompile Include="..\..\src\threads\juce_TimeSliceThread.cpp"/> | |||
<ClCompile Include="..\..\src\utilities\juce_DeletedAtShutdown.cpp"/> | |||
<ClCompile Include="..\..\src\utilities\juce_FileBasedDocument.cpp"/> | |||
<ClCompile Include="..\..\src\utilities\juce_PropertiesFile.cpp"/> | |||
<ClCompile Include="..\..\src\utilities\juce_RecentlyOpenedFilesList.cpp"/> | |||
<ClCompile Include="..\..\src\utilities\juce_UndoManager.cpp"/> | |||
<ClCompile Include="..\..\src\utilities\juce_UnitTest.cpp"/> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ClInclude Include="..\..\src\application\juce_Application.h"/> | |||
<ClInclude Include="..\..\src\application\juce_ApplicationCommandID.h"/> | |||
<ClInclude Include="..\..\src\application\juce_ApplicationCommandInfo.h"/> | |||
<ClInclude Include="..\..\src\application\juce_ApplicationCommandManager.h"/> | |||
<ClInclude Include="..\..\src\application\juce_ApplicationCommandTarget.h"/> | |||
<ClInclude Include="..\..\src\application\juce_ApplicationProperties.h"/> | |||
<ClInclude Include="..\..\src\audio\audio_file_formats\juce_AiffAudioFormat.h"/> | |||
<ClInclude Include="..\..\src\audio\audio_file_formats\juce_AudioCDBurner.h"/> | |||
<ClInclude Include="..\..\src\audio\audio_file_formats\juce_AudioCDReader.h"/> | |||
<ClInclude Include="..\..\src\audio\audio_file_formats\juce_AudioFormat.h"/> | |||
<ClInclude Include="..\..\src\audio\audio_file_formats\juce_AudioFormatManager.h"/> | |||
<ClInclude Include="..\..\src\audio\audio_file_formats\juce_AudioFormatReader.h"/> | |||
<ClInclude Include="..\..\src\audio\audio_file_formats\juce_AudioFormatWriter.h"/> | |||
<ClInclude Include="..\..\src\audio\audio_file_formats\juce_AudioSubsectionReader.h"/> | |||
<ClInclude Include="..\..\src\audio\audio_file_formats\juce_AudioThumbnail.h"/> | |||
<ClInclude Include="..\..\src\audio\audio_file_formats\juce_AudioThumbnailCache.h"/> | |||
<ClInclude Include="..\..\src\audio\audio_file_formats\juce_CoreAudioFormat.h"/> | |||
<ClInclude Include="..\..\src\audio\audio_file_formats\juce_FlacAudioFormat.h"/> | |||
<ClInclude Include="..\..\src\audio\audio_file_formats\juce_OggVorbisAudioFormat.h"/> | |||
<ClInclude Include="..\..\src\audio\audio_file_formats\juce_QuickTimeAudioFormat.h"/> | |||
<ClInclude Include="..\..\src\audio\audio_file_formats\juce_WavAudioFormat.h"/> | |||
<ClInclude Include="..\..\src\audio\audio_sources\juce_AudioFormatReaderSource.h"/> | |||
<ClInclude Include="..\..\src\audio\audio_sources\juce_AudioSource.h"/> | |||
<ClInclude Include="..\..\src\audio\audio_sources\juce_AudioSourcePlayer.h"/> | |||
<ClInclude Include="..\..\src\audio\audio_sources\juce_AudioTransportSource.h"/> | |||
<ClInclude Include="..\..\src\audio\audio_sources\juce_BufferingAudioSource.h"/> | |||
<ClInclude Include="..\..\src\audio\audio_sources\juce_ChannelRemappingAudioSource.h"/> | |||
<ClInclude Include="..\..\src\audio\audio_sources\juce_IIRFilterAudioSource.h"/> | |||
<ClInclude Include="..\..\src\audio\audio_sources\juce_MixerAudioSource.h"/> | |||
<ClInclude Include="..\..\src\audio\audio_sources\juce_PositionableAudioSource.h"/> | |||
<ClInclude Include="..\..\src\audio\audio_sources\juce_ResamplingAudioSource.h"/> | |||
<ClInclude Include="..\..\src\audio\audio_sources\juce_ReverbAudioSource.h"/> | |||
<ClInclude Include="..\..\src\audio\audio_sources\juce_ToneGeneratorAudioSource.h"/> | |||
<ClInclude Include="..\..\src\audio\devices\juce_AudioDeviceManager.h"/> | |||
<ClInclude Include="..\..\src\audio\devices\juce_AudioIODevice.h"/> | |||
<ClInclude Include="..\..\src\audio\devices\juce_AudioIODeviceType.h"/> | |||
<ClInclude Include="..\..\src\audio\dsp\juce_AudioDataConverters.h"/> | |||
<ClInclude Include="..\..\src\audio\dsp\juce_AudioSampleBuffer.h"/> | |||
<ClInclude Include="..\..\src\audio\dsp\juce_Decibels.h"/> | |||
<ClInclude Include="..\..\src\audio\dsp\juce_IIRFilter.h"/> | |||
<ClInclude Include="..\..\src\audio\dsp\juce_Reverb.h"/> | |||
<ClInclude Include="..\..\src\audio\midi\juce_MidiBuffer.h"/> | |||
<ClInclude Include="..\..\src\audio\midi\juce_MidiFile.h"/> | |||
<ClInclude Include="..\..\src\audio\midi\juce_MidiInput.h"/> | |||
<ClInclude Include="..\..\src\audio\midi\juce_MidiKeyboardState.h"/> | |||
<ClInclude Include="..\..\src\audio\midi\juce_MidiMessage.h"/> | |||
<ClInclude Include="..\..\src\audio\midi\juce_MidiMessageCollector.h"/> | |||
<ClInclude Include="..\..\src\audio\midi\juce_MidiMessageSequence.h"/> | |||
<ClInclude Include="..\..\src\audio\midi\juce_MidiOutput.h"/> | |||
<ClInclude Include="..\..\src\audio\plugin_client\RTAS\juce_RTAS_DigiCode_Header.h"/> | |||
<ClInclude Include="..\..\src\audio\plugin_client\Standalone\juce_StandaloneFilterWindow.h"/> | |||
<ClInclude Include="..\..\src\audio\plugin_client\juce_IncludeCharacteristics.h"/> | |||
<ClInclude Include="..\..\src\audio\plugin_client\juce_PluginHeaders.h"/> | |||
<ClInclude Include="..\..\src\audio\plugin_client\juce_PluginHostType.h"/> | |||
<ClInclude Include="..\..\src\audio\plugin_host\formats\juce_AudioUnitPluginFormat.h"/> | |||
<ClInclude Include="..\..\src\audio\plugin_host\formats\juce_DirectXPluginFormat.h"/> | |||
<ClInclude Include="..\..\src\audio\plugin_host\formats\juce_LADSPAPluginFormat.h"/> | |||
<ClInclude Include="..\..\src\audio\plugin_host\formats\juce_VSTMidiEventList.h"/> | |||
<ClInclude Include="..\..\src\audio\plugin_host\formats\juce_VSTPluginFormat.h"/> | |||
<ClInclude Include="..\..\src\audio\plugin_host\juce_AudioPluginFormat.h"/> | |||
<ClInclude Include="..\..\src\audio\plugin_host\juce_AudioPluginFormatManager.h"/> | |||
<ClInclude Include="..\..\src\audio\plugin_host\juce_AudioPluginInstance.h"/> | |||
<ClInclude Include="..\..\src\audio\plugin_host\juce_KnownPluginList.h"/> | |||
<ClInclude Include="..\..\src\audio\plugin_host\juce_PluginDescription.h"/> | |||
<ClInclude Include="..\..\src\audio\plugin_host\juce_PluginDirectoryScanner.h"/> | |||
<ClInclude Include="..\..\src\audio\plugin_host\juce_PluginListComponent.h"/> | |||
<ClInclude Include="..\..\src\audio\processors\juce_AudioPlayHead.h"/> | |||
<ClInclude Include="..\..\src\audio\processors\juce_AudioProcessor.h"/> | |||
<ClInclude Include="..\..\src\audio\processors\juce_AudioProcessorEditor.h"/> | |||
<ClInclude Include="..\..\src\audio\processors\juce_AudioProcessorGraph.h"/> | |||
<ClInclude Include="..\..\src\audio\processors\juce_AudioProcessorListener.h"/> | |||
<ClInclude Include="..\..\src\audio\processors\juce_AudioProcessorPlayer.h"/> | |||
<ClInclude Include="..\..\src\audio\processors\juce_GenericAudioProcessorEditor.h"/> | |||
<ClInclude Include="..\..\src\audio\synthesisers\juce_Sampler.h"/> | |||
<ClInclude Include="..\..\src\audio\synthesisers\juce_Synthesiser.h"/> | |||
<ClInclude Include="..\..\src\containers\juce_AbstractFifo.h"/> | |||
<ClInclude Include="..\..\src\containers\juce_Array.h"/> | |||
<ClInclude Include="..\..\src\containers\juce_ArrayAllocationBase.h"/> | |||
<ClInclude Include="..\..\src\containers\juce_DynamicObject.h"/> | |||
<ClInclude Include="..\..\src\containers\juce_ElementComparator.h"/> | |||
<ClInclude Include="..\..\src\containers\juce_HashMap.h"/> | |||
<ClInclude Include="..\..\src\containers\juce_LinkedListPointer.h"/> | |||
<ClInclude Include="..\..\src\containers\juce_NamedValueSet.h"/> | |||
<ClInclude Include="..\..\src\containers\juce_OwnedArray.h"/> | |||
<ClInclude Include="..\..\src\containers\juce_PropertySet.h"/> | |||
<ClInclude Include="..\..\src\containers\juce_ReferenceCountedArray.h"/> | |||
<ClInclude Include="..\..\src\containers\juce_ScopedValueSetter.h"/> | |||
<ClInclude Include="..\..\src\containers\juce_SortedSet.h"/> | |||
<ClInclude Include="..\..\src\containers\juce_SparseSet.h"/> | |||
<ClInclude Include="..\..\src\containers\juce_Value.h"/> | |||
<ClInclude Include="..\..\src\containers\juce_ValueTree.h"/> | |||
<ClInclude Include="..\..\src\containers\juce_Variant.h"/> | |||
<ClInclude Include="..\..\src\core\juce_FileLogger.h"/> | |||
<ClInclude Include="..\..\src\core\juce_Initialisation.h"/> | |||
<ClInclude Include="..\..\src\core\juce_Logger.h"/> | |||
<ClInclude Include="..\..\src\core\juce_PerformanceCounter.h"/> | |||
<ClInclude Include="..\..\src\core\juce_PlatformDefs.h"/> | |||
<ClInclude Include="..\..\src\core\juce_RelativeTime.h"/> | |||
<ClInclude Include="..\..\src\core\juce_Result.h"/> | |||
<ClInclude Include="..\..\src\core\juce_Singleton.h"/> | |||
<ClInclude Include="..\..\src\core\juce_StandardHeader.h"/> | |||
<ClInclude Include="..\..\src\core\juce_SystemStats.h"/> | |||
<ClInclude Include="..\..\src\core\juce_TargetPlatform.h"/> | |||
<ClInclude Include="..\..\src\core\juce_Time.h"/> | |||
<ClInclude Include="..\..\src\core\juce_Uuid.h"/> | |||
<ClInclude Include="..\..\src\cryptography\juce_BlowFish.h"/> | |||
<ClInclude Include="..\..\src\cryptography\juce_MD5.h"/> | |||
<ClInclude Include="..\..\src\cryptography\juce_Primes.h"/> | |||
<ClInclude Include="..\..\src\cryptography\juce_RSAKey.h"/> | |||
<ClInclude Include="..\..\src\cryptography\juce_SHA256.h"/> | |||
<ClInclude Include="..\..\src\events\juce_ActionBroadcaster.h"/> | |||
<ClInclude Include="..\..\src\events\juce_ActionListener.h"/> | |||
<ClInclude Include="..\..\src\events\juce_AppleRemote.h"/> | |||
<ClInclude Include="..\..\src\events\juce_AsyncUpdater.h"/> | |||
<ClInclude Include="..\..\src\events\juce_CallbackMessage.h"/> | |||
<ClInclude Include="..\..\src\events\juce_ChangeBroadcaster.h"/> | |||
<ClInclude Include="..\..\src\events\juce_ChangeListener.h"/> | |||
<ClInclude Include="..\..\src\events\juce_InterprocessConnection.h"/> | |||
<ClInclude Include="..\..\src\events\juce_InterprocessConnectionServer.h"/> | |||
<ClInclude Include="..\..\src\events\juce_ListenerList.h"/> | |||
<ClInclude Include="..\..\src\events\juce_Message.h"/> | |||
<ClInclude Include="..\..\src\events\juce_MessageListener.h"/> | |||
<ClInclude Include="..\..\src\events\juce_MessageManager.h"/> | |||
<ClInclude Include="..\..\src\events\juce_MultiTimer.h"/> | |||
<ClInclude Include="..\..\src\events\juce_Timer.h"/> | |||
<ClInclude Include="..\..\src\gui\components\juce_Component.h"/> | |||
<ClInclude Include="..\..\src\gui\components\juce_ComponentListener.h"/> | |||
<ClInclude Include="..\..\src\gui\components\juce_Desktop.h"/> | |||
<ClInclude Include="..\..\src\gui\components\juce_ModalComponentManager.h"/> | |||
<ClInclude Include="..\..\src\gui\components\buttons\juce_ArrowButton.h"/> | |||
<ClInclude Include="..\..\src\gui\components\buttons\juce_Button.h"/> | |||
<ClInclude Include="..\..\src\gui\components\buttons\juce_DrawableButton.h"/> | |||
<ClInclude Include="..\..\src\gui\components\buttons\juce_HyperlinkButton.h"/> | |||
<ClInclude Include="..\..\src\gui\components\buttons\juce_ImageButton.h"/> | |||
<ClInclude Include="..\..\src\gui\components\buttons\juce_ShapeButton.h"/> | |||
<ClInclude Include="..\..\src\gui\components\buttons\juce_TextButton.h"/> | |||
<ClInclude Include="..\..\src\gui\components\buttons\juce_ToggleButton.h"/> | |||
<ClInclude Include="..\..\src\gui\components\buttons\juce_ToolbarButton.h"/> | |||
<ClInclude Include="..\..\src\gui\components\code_editor\juce_CodeDocument.h"/> | |||
<ClInclude Include="..\..\src\gui\components\code_editor\juce_CodeEditorComponent.h"/> | |||
<ClInclude Include="..\..\src\gui\components\code_editor\juce_CodeTokeniser.h"/> | |||
<ClInclude Include="..\..\src\gui\components\code_editor\juce_CPlusPlusCodeTokeniser.h"/> | |||
<ClInclude Include="..\..\src\gui\components\controls\juce_ComboBox.h"/> | |||
<ClInclude Include="..\..\src\gui\components\controls\juce_ImageComponent.h"/> | |||
<ClInclude Include="..\..\src\gui\components\controls\juce_Label.h"/> | |||
<ClInclude Include="..\..\src\gui\components\controls\juce_ListBox.h"/> | |||
<ClInclude Include="..\..\src\gui\components\controls\juce_ProgressBar.h"/> | |||
<ClInclude Include="..\..\src\gui\components\controls\juce_Slider.h"/> | |||
<ClInclude Include="..\..\src\gui\components\controls\juce_TableHeaderComponent.h"/> | |||
<ClInclude Include="..\..\src\gui\components\controls\juce_TableListBox.h"/> | |||
<ClInclude Include="..\..\src\gui\components\controls\juce_TextEditor.h"/> | |||
<ClInclude Include="..\..\src\gui\components\controls\juce_Toolbar.h"/> | |||
<ClInclude Include="..\..\src\gui\components\controls\juce_ToolbarItemComponent.h"/> | |||
<ClInclude Include="..\..\src\gui\components\controls\juce_ToolbarItemFactory.h"/> | |||
<ClInclude Include="..\..\src\gui\components\controls\juce_ToolbarItemPalette.h"/> | |||
<ClInclude Include="..\..\src\gui\components\controls\juce_TreeView.h"/> | |||
<ClInclude Include="..\..\src\gui\components\filebrowser\juce_DirectoryContentsDisplayComponent.h"/> | |||
<ClInclude Include="..\..\src\gui\components\filebrowser\juce_DirectoryContentsList.h"/> | |||
<ClInclude Include="..\..\src\gui\components\filebrowser\juce_FileBrowserComponent.h"/> | |||
<ClInclude Include="..\..\src\gui\components\filebrowser\juce_FileBrowserListener.h"/> | |||
<ClInclude Include="..\..\src\gui\components\filebrowser\juce_FileChooser.h"/> | |||
<ClInclude Include="..\..\src\gui\components\filebrowser\juce_FileChooserDialogBox.h"/> | |||
<ClInclude Include="..\..\src\gui\components\filebrowser\juce_FileFilter.h"/> | |||
<ClInclude Include="..\..\src\gui\components\filebrowser\juce_FileListComponent.h"/> | |||
<ClInclude Include="..\..\src\gui\components\filebrowser\juce_FilenameComponent.h"/> | |||
<ClInclude Include="..\..\src\gui\components\filebrowser\juce_FilePreviewComponent.h"/> | |||
<ClInclude Include="..\..\src\gui\components\filebrowser\juce_FileSearchPathListComponent.h"/> | |||
<ClInclude Include="..\..\src\gui\components\filebrowser\juce_FileTreeComponent.h"/> | |||
<ClInclude Include="..\..\src\gui\components\filebrowser\juce_ImagePreviewComponent.h"/> | |||
<ClInclude Include="..\..\src\gui\components\filebrowser\juce_WildcardFileFilter.h"/> | |||
<ClInclude Include="..\..\src\gui\components\keyboard\juce_CaretComponent.h"/> | |||
<ClInclude Include="..\..\src\gui\components\keyboard\juce_KeyboardFocusTraverser.h"/> | |||
<ClInclude Include="..\..\src\gui\components\keyboard\juce_KeyListener.h"/> | |||
<ClInclude Include="..\..\src\gui\components\keyboard\juce_KeyMappingEditorComponent.h"/> | |||
<ClInclude Include="..\..\src\gui\components\keyboard\juce_KeyPress.h"/> | |||
<ClInclude Include="..\..\src\gui\components\keyboard\juce_KeyPressMappingSet.h"/> | |||
<ClInclude Include="..\..\src\gui\components\keyboard\juce_ModifierKeys.h"/> | |||
<ClInclude Include="..\..\src\gui\components\keyboard\juce_TextEditorKeyMapper.h"/> | |||
<ClInclude Include="..\..\src\gui\components\keyboard\juce_TextInputTarget.h"/> | |||
<ClInclude Include="..\..\src\gui\components\layout\juce_ComponentAnimator.h"/> | |||
<ClInclude Include="..\..\src\gui\components\layout\juce_ComponentBoundsConstrainer.h"/> | |||
<ClInclude Include="..\..\src\gui\components\layout\juce_ComponentBuilder.h"/> | |||
<ClInclude Include="..\..\src\gui\components\layout\juce_ComponentMovementWatcher.h"/> | |||
<ClInclude Include="..\..\src\gui\components\layout\juce_GroupComponent.h"/> | |||
<ClInclude Include="..\..\src\gui\components\layout\juce_MultiDocumentPanel.h"/> | |||
<ClInclude Include="..\..\src\gui\components\layout\juce_ResizableBorderComponent.h"/> | |||
<ClInclude Include="..\..\src\gui\components\layout\juce_ResizableCornerComponent.h"/> | |||
<ClInclude Include="..\..\src\gui\components\layout\juce_ResizableEdgeComponent.h"/> | |||
<ClInclude Include="..\..\src\gui\components\layout\juce_ScrollBar.h"/> | |||
<ClInclude Include="..\..\src\gui\components\layout\juce_StretchableLayoutManager.h"/> | |||
<ClInclude Include="..\..\src\gui\components\layout\juce_StretchableLayoutResizerBar.h"/> | |||
<ClInclude Include="..\..\src\gui\components\layout\juce_StretchableObjectResizer.h"/> | |||
<ClInclude Include="..\..\src\gui\components\layout\juce_TabbedButtonBar.h"/> | |||
<ClInclude Include="..\..\src\gui\components\layout\juce_TabbedComponent.h"/> | |||
<ClInclude Include="..\..\src\gui\components\layout\juce_Viewport.h"/> | |||
<ClInclude Include="..\..\src\gui\components\lookandfeel\juce_LookAndFeel.h"/> | |||
<ClInclude Include="..\..\src\gui\components\lookandfeel\juce_OldSchoolLookAndFeel.h"/> | |||
<ClInclude Include="..\..\src\gui\components\menus\juce_MenuBarComponent.h"/> | |||
<ClInclude Include="..\..\src\gui\components\menus\juce_MenuBarModel.h"/> | |||
<ClInclude Include="..\..\src\gui\components\menus\juce_PopupMenu.h"/> | |||
<ClInclude Include="..\..\src\gui\components\mouse\juce_ComponentDragger.h"/> | |||
<ClInclude Include="..\..\src\gui\components\mouse\juce_DragAndDropContainer.h"/> | |||
<ClInclude Include="..\..\src\gui\components\mouse\juce_DragAndDropTarget.h"/> | |||
<ClInclude Include="..\..\src\gui\components\mouse\juce_FileDragAndDropTarget.h"/> | |||
<ClInclude Include="..\..\src\gui\components\mouse\juce_LassoComponent.h"/> | |||
<ClInclude Include="..\..\src\gui\components\mouse\juce_MouseCursor.h"/> | |||
<ClInclude Include="..\..\src\gui\components\mouse\juce_MouseEvent.h"/> | |||
<ClInclude Include="..\..\src\gui\components\mouse\juce_MouseInputSource.h"/> | |||
<ClInclude Include="..\..\src\gui\components\mouse\juce_MouseListener.h"/> | |||
<ClInclude Include="..\..\src\gui\components\mouse\juce_TooltipClient.h"/> | |||
<ClInclude Include="..\..\src\gui\components\positioning\juce_MarkerList.h"/> | |||
<ClInclude Include="..\..\src\gui\components\positioning\juce_RelativeCoordinate.h"/> | |||
<ClInclude Include="..\..\src\gui\components\positioning\juce_RelativeCoordinatePositioner.h"/> | |||
<ClInclude Include="..\..\src\gui\components\positioning\juce_RelativeParallelogram.h"/> | |||
<ClInclude Include="..\..\src\gui\components\positioning\juce_RelativePoint.h"/> | |||
<ClInclude Include="..\..\src\gui\components\positioning\juce_RelativePointPath.h"/> | |||
<ClInclude Include="..\..\src\gui\components\positioning\juce_RelativeRectangle.h"/> | |||
<ClInclude Include="..\..\src\gui\components\properties\juce_BooleanPropertyComponent.h"/> | |||
<ClInclude Include="..\..\src\gui\components\properties\juce_ButtonPropertyComponent.h"/> | |||
<ClInclude Include="..\..\src\gui\components\properties\juce_ChoicePropertyComponent.h"/> | |||
<ClInclude Include="..\..\src\gui\components\properties\juce_PropertyComponent.h"/> | |||
<ClInclude Include="..\..\src\gui\components\properties\juce_PropertyPanel.h"/> | |||
<ClInclude Include="..\..\src\gui\components\properties\juce_SliderPropertyComponent.h"/> | |||
<ClInclude Include="..\..\src\gui\components\properties\juce_TextPropertyComponent.h"/> | |||
<ClInclude Include="..\..\src\gui\components\special\juce_ActiveXControlComponent.h"/> | |||
<ClInclude Include="..\..\src\gui\components\special\juce_AudioDeviceSelectorComponent.h"/> | |||
<ClInclude Include="..\..\src\gui\components\special\juce_BubbleComponent.h"/> | |||
<ClInclude Include="..\..\src\gui\components\special\juce_BubbleMessageComponent.h"/> | |||
<ClInclude Include="..\..\src\gui\components\special\juce_ColourSelector.h"/> | |||
<ClInclude Include="..\..\src\gui\components\special\juce_DirectShowComponent.h"/> | |||
<ClInclude Include="..\..\src\gui\components\special\juce_DropShadower.h"/> | |||
<ClInclude Include="..\..\src\gui\components\special\juce_MidiKeyboardComponent.h"/> | |||
<ClInclude Include="..\..\src\gui\components\special\juce_NSViewComponent.h"/> | |||
<ClInclude Include="..\..\src\gui\components\special\juce_OpenGLComponent.h"/> | |||
<ClInclude Include="..\..\src\gui\components\special\juce_PreferencesPanel.h"/> | |||
<ClInclude Include="..\..\src\gui\components\special\juce_QuickTimeMovieComponent.h"/> | |||
<ClInclude Include="..\..\src\gui\components\special\juce_ScopedXLock.h"/> | |||
<ClInclude Include="..\..\src\gui\components\special\juce_SystemTrayIconComponent.h"/> | |||
<ClInclude Include="..\..\src\gui\components\special\juce_WebBrowserComponent.h"/> | |||
<ClInclude Include="..\..\src\gui\components\windows\juce_AlertWindow.h"/> | |||
<ClInclude Include="..\..\src\gui\components\windows\juce_CallOutBox.h"/> | |||
<ClInclude Include="..\..\src\gui\components\windows\juce_ComponentPeer.h"/> | |||
<ClInclude Include="..\..\src\gui\components\windows\juce_DialogWindow.h"/> | |||
<ClInclude Include="..\..\src\gui\components\windows\juce_DocumentWindow.h"/> | |||
<ClInclude Include="..\..\src\gui\components\windows\juce_NativeMessageBox.h"/> | |||
<ClInclude Include="..\..\src\gui\components\windows\juce_ResizableWindow.h"/> | |||
<ClInclude Include="..\..\src\gui\components\windows\juce_SplashScreen.h"/> | |||
<ClInclude Include="..\..\src\gui\components\windows\juce_ThreadWithProgressWindow.h"/> | |||
<ClInclude Include="..\..\src\gui\components\windows\juce_TooltipWindow.h"/> | |||
<ClInclude Include="..\..\src\gui\components\windows\juce_TopLevelWindow.h"/> | |||
<ClInclude Include="..\..\src\gui\graphics\colour\juce_Colour.h"/> | |||
<ClInclude Include="..\..\src\gui\graphics\colour\juce_ColourGradient.h"/> | |||
<ClInclude Include="..\..\src\gui\graphics\colour\juce_Colours.h"/> | |||
<ClInclude Include="..\..\src\gui\graphics\colour\juce_PixelFormats.h"/> | |||
<ClInclude Include="..\..\src\gui\graphics\contexts\juce_EdgeTable.h"/> | |||
<ClInclude Include="..\..\src\gui\graphics\contexts\juce_FillType.h"/> | |||
<ClInclude Include="..\..\src\gui\graphics\contexts\juce_GraphicsContext.h"/> | |||
<ClInclude Include="..\..\src\gui\graphics\contexts\juce_Justification.h"/> | |||
<ClInclude Include="..\..\src\gui\graphics\contexts\juce_LowLevelGraphicsContext.h"/> | |||
<ClInclude Include="..\..\src\gui\graphics\contexts\juce_LowLevelGraphicsPostScriptRenderer.h"/> | |||
<ClInclude Include="..\..\src\gui\graphics\contexts\juce_LowLevelGraphicsSoftwareRenderer.h"/> | |||
<ClInclude Include="..\..\src\gui\graphics\contexts\juce_RectanglePlacement.h"/> | |||
<ClInclude Include="..\..\src\gui\graphics\drawables\juce_Drawable.h"/> | |||
<ClInclude Include="..\..\src\gui\graphics\drawables\juce_DrawableComposite.h"/> | |||
<ClInclude Include="..\..\src\gui\graphics\drawables\juce_DrawableImage.h"/> | |||
<ClInclude Include="..\..\src\gui\graphics\drawables\juce_DrawablePath.h"/> | |||
<ClInclude Include="..\..\src\gui\graphics\drawables\juce_DrawableRectangle.h"/> | |||
<ClInclude Include="..\..\src\gui\graphics\drawables\juce_DrawableShape.h"/> | |||
<ClInclude Include="..\..\src\gui\graphics\drawables\juce_DrawableText.h"/> | |||
<ClInclude Include="..\..\src\gui\graphics\effects\juce_DropShadowEffect.h"/> | |||
<ClInclude Include="..\..\src\gui\graphics\effects\juce_GlowEffect.h"/> | |||
<ClInclude Include="..\..\src\gui\graphics\effects\juce_ImageEffectFilter.h"/> | |||
<ClInclude Include="..\..\src\gui\graphics\fonts\juce_CustomTypeface.h"/> | |||
<ClInclude Include="..\..\src\gui\graphics\fonts\juce_Font.h"/> | |||
<ClInclude Include="..\..\src\gui\graphics\fonts\juce_GlyphArrangement.h"/> | |||
<ClInclude Include="..\..\src\gui\graphics\fonts\juce_TextLayout.h"/> | |||
<ClInclude Include="..\..\src\gui\graphics\fonts\juce_Typeface.h"/> | |||
<ClInclude Include="..\..\src\gui\graphics\geometry\juce_AffineTransform.h"/> | |||
<ClInclude Include="..\..\src\gui\graphics\geometry\juce_BorderSize.h"/> | |||
<ClInclude Include="..\..\src\gui\graphics\geometry\juce_Line.h"/> | |||
<ClInclude Include="..\..\src\gui\graphics\geometry\juce_Path.h"/> | |||
<ClInclude Include="..\..\src\gui\graphics\geometry\juce_PathIterator.h"/> | |||
<ClInclude Include="..\..\src\gui\graphics\geometry\juce_PathStrokeType.h"/> | |||
<ClInclude Include="..\..\src\gui\graphics\geometry\juce_Point.h"/> | |||
<ClInclude Include="..\..\src\gui\graphics\geometry\juce_Rectangle.h"/> | |||
<ClInclude Include="..\..\src\gui\graphics\geometry\juce_RectangleList.h"/> | |||
<ClInclude Include="..\..\src\gui\graphics\imaging\juce_CameraDevice.h"/> | |||
<ClInclude Include="..\..\src\gui\graphics\imaging\juce_Image.h"/> | |||
<ClInclude Include="..\..\src\gui\graphics\imaging\juce_ImageCache.h"/> | |||
<ClInclude Include="..\..\src\gui\graphics\imaging\juce_ImageConvolutionKernel.h"/> | |||
<ClInclude Include="..\..\src\gui\graphics\imaging\juce_ImageFileFormat.h"/> | |||
<ClInclude Include="..\..\src\io\files\juce_DirectoryIterator.h"/> | |||
<ClInclude Include="..\..\src\io\files\juce_File.h"/> | |||
<ClInclude Include="..\..\src\io\files\juce_FileInputStream.h"/> | |||
<ClInclude Include="..\..\src\io\files\juce_FileOutputStream.h"/> | |||
<ClInclude Include="..\..\src\io\files\juce_FileSearchPath.h"/> | |||
<ClInclude Include="..\..\src\io\files\juce_MemoryMappedFile.h"/> | |||
<ClInclude Include="..\..\src\io\files\juce_NamedPipe.h"/> | |||
<ClInclude Include="..\..\src\io\files\juce_TemporaryFile.h"/> | |||
<ClInclude Include="..\..\src\io\files\juce_ZipFile.h"/> | |||
<ClInclude Include="..\..\src\io\network\juce_MACAddress.h"/> | |||
<ClInclude Include="..\..\src\io\network\juce_Socket.h"/> | |||
<ClInclude Include="..\..\src\io\network\juce_URL.h"/> | |||
<ClInclude Include="..\..\src\io\streams\juce_BufferedInputStream.h"/> | |||
<ClInclude Include="..\..\src\io\streams\juce_FileInputSource.h"/> | |||
<ClInclude Include="..\..\src\io\streams\juce_GZIPCompressorOutputStream.h"/> | |||
<ClInclude Include="..\..\src\io\streams\juce_GZIPDecompressorInputStream.h"/> | |||
<ClInclude Include="..\..\src\io\streams\juce_InputSource.h"/> | |||
<ClInclude Include="..\..\src\io\streams\juce_InputStream.h"/> | |||
<ClInclude Include="..\..\src\io\streams\juce_MemoryInputStream.h"/> | |||
<ClInclude Include="..\..\src\io\streams\juce_MemoryOutputStream.h"/> | |||
<ClInclude Include="..\..\src\io\streams\juce_OutputStream.h"/> | |||
<ClInclude Include="..\..\src\io\streams\juce_SubregionStream.h"/> | |||
<ClInclude Include="..\..\src\maths\juce_BigInteger.h"/> | |||
<ClInclude Include="..\..\src\maths\juce_Expression.h"/> | |||
<ClInclude Include="..\..\src\maths\juce_MathsFunctions.h"/> | |||
<ClInclude Include="..\..\src\maths\juce_Random.h"/> | |||
<ClInclude Include="..\..\src\maths\juce_Range.h"/> | |||
<ClInclude Include="..\..\src\memory\juce_Atomic.h"/> | |||
<ClInclude Include="..\..\src\memory\juce_ByteOrder.h"/> | |||
<ClInclude Include="..\..\src\memory\juce_HeapBlock.h"/> | |||
<ClInclude Include="..\..\src\memory\juce_LeakedObjectDetector.h"/> | |||
<ClInclude Include="..\..\src\memory\juce_Memory.h"/> | |||
<ClInclude Include="..\..\src\memory\juce_MemoryBlock.h"/> | |||
<ClInclude Include="..\..\src\memory\juce_OptionalScopedPointer.h"/> | |||
<ClInclude Include="..\..\src\memory\juce_ReferenceCountedObject.h"/> | |||
<ClInclude Include="..\..\src\memory\juce_ScopedPointer.h"/> | |||
<ClInclude Include="..\..\src\memory\juce_WeakReference.h"/> | |||
<ClInclude Include="..\..\src\native\common\juce_MidiDataConcatenator.h"/> | |||
<ClInclude Include="..\..\src\native\common\juce_posix_SharedCode.h"/> | |||
<ClInclude Include="..\..\src\native\linux\juce_linux_NativeIncludes.h"/> | |||
<ClInclude Include="..\..\src\native\mac\juce_mac_CarbonViewWrapperComponent.h"/> | |||
<ClInclude Include="..\..\src\native\mac\juce_mac_NativeIncludes.h"/> | |||
<ClInclude Include="..\..\src\native\mac\juce_mac_ObjCSuffix.h"/> | |||
<ClInclude Include="..\..\src\native\mac\juce_osx_MessageQueue.h"/> | |||
<ClInclude Include="..\..\src\native\mac\juce_osx_ObjCHelpers.h"/> | |||
<ClInclude Include="..\..\src\native\windows\juce_win32_AutoLinkLibraries.h"/> | |||
<ClInclude Include="..\..\src\native\windows\juce_win32_ComSmartPtr.h"/> | |||
<ClInclude Include="..\..\src\native\windows\juce_win32_HiddenMessageWindow.h"/> | |||
<ClInclude Include="..\..\src\native\windows\juce_win32_NativeIncludes.h"/> | |||
<ClInclude Include="..\..\src\native\android\juce_android_JNIHelpers.h"/> | |||
<ClInclude Include="..\..\src\native\android\juce_android_NativeIncludes.h"/> | |||
<ClInclude Include="..\..\src\text\juce_CharacterFunctions.h"/> | |||
<ClInclude Include="..\..\src\text\juce_CharPointer_ASCII.h"/> | |||
<ClInclude Include="..\..\src\text\juce_CharPointer_UTF16.h"/> | |||
<ClInclude Include="..\..\src\text\juce_CharPointer_UTF32.h"/> | |||
<ClInclude Include="..\..\src\text\juce_CharPointer_UTF8.h"/> | |||
<ClInclude Include="..\..\src\text\juce_Identifier.h"/> | |||
<ClInclude Include="..\..\src\text\juce_JSON.h"/> | |||
<ClInclude Include="..\..\src\text\juce_LocalisedStrings.h"/> | |||
<ClInclude Include="..\..\src\text\juce_NewLine.h"/> | |||
<ClInclude Include="..\..\src\text\juce_String.h"/> | |||
<ClInclude Include="..\..\src\text\juce_StringArray.h"/> | |||
<ClInclude Include="..\..\src\text\juce_StringPairArray.h"/> | |||
<ClInclude Include="..\..\src\text\juce_StringPool.h"/> | |||
<ClInclude Include="..\..\src\text\juce_XmlDocument.h"/> | |||
<ClInclude Include="..\..\src\text\juce_XmlElement.h"/> | |||
<ClInclude Include="..\..\src\threads\juce_CriticalSection.h"/> | |||
<ClInclude Include="..\..\src\threads\juce_DynamicLibrary.h"/> | |||
<ClInclude Include="..\..\src\threads\juce_InterProcessLock.h"/> | |||
<ClInclude Include="..\..\src\threads\juce_Process.h"/> | |||
<ClInclude Include="..\..\src\threads\juce_ReadWriteLock.h"/> | |||
<ClInclude Include="..\..\src\threads\juce_ScopedLock.h"/> | |||
<ClInclude Include="..\..\src\threads\juce_ScopedReadLock.h"/> | |||
<ClInclude Include="..\..\src\threads\juce_ScopedWriteLock.h"/> | |||
<ClInclude Include="..\..\src\threads\juce_SpinLock.h"/> | |||
<ClInclude Include="..\..\src\threads\juce_Thread.h"/> | |||
<ClInclude Include="..\..\src\threads\juce_ThreadPool.h"/> | |||
<ClInclude Include="..\..\src\threads\juce_TimeSliceThread.h"/> | |||
<ClInclude Include="..\..\src\threads\juce_WaitableEvent.h"/> | |||
<ClInclude Include="..\..\src\utilities\juce_DeletedAtShutdown.h"/> | |||
<ClInclude Include="..\..\src\utilities\juce_FileBasedDocument.h"/> | |||
<ClInclude Include="..\..\src\utilities\juce_PropertiesFile.h"/> | |||
<ClInclude Include="..\..\src\utilities\juce_RecentlyOpenedFilesList.h"/> | |||
<ClInclude Include="..\..\src\utilities\juce_SelectedItemSet.h"/> | |||
<ClInclude Include="..\..\src\utilities\juce_SystemClipboard.h"/> | |||
<ClInclude Include="..\..\src\utilities\juce_UndoableAction.h"/> | |||
<ClInclude Include="..\..\src\utilities\juce_UndoManager.h"/> | |||
<ClInclude Include="..\..\src\utilities\juce_UnitTest.h"/> | |||
<ClInclude Include="..\..\src\utilities\juce_WindowsRegistry.h"/> | |||
<ClInclude Include="..\..\juce.h"/> | |||
<ClInclude Include="..\..\juce_Config.h"/> | |||
</ItemGroup> | |||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/> | |||
<ImportGroup Label="ExtensionTargets"/> | |||
</Project> |
@@ -27,6 +27,5 @@ | |||
#define JUCE_BUILD_MISC 0 | |||
#define JUCE_BUILD_GUI 0 | |||
#define JUCE_BUILD_NATIVE 0 | |||
#define JUCE_BUILD_AMALGAMATION 1 | |||
#include "juce_amalgamated_template.cpp" |
@@ -27,6 +27,5 @@ | |||
#define JUCE_BUILD_MISC 1 | |||
#define JUCE_BUILD_GUI 0 | |||
#define JUCE_BUILD_NATIVE 0 | |||
#define JUCE_BUILD_AMALGAMATION 1 | |||
#include "juce_amalgamated_template.cpp" |
@@ -27,6 +27,5 @@ | |||
#define JUCE_BUILD_MISC 0 | |||
#define JUCE_BUILD_GUI 1 | |||
#define JUCE_BUILD_NATIVE 0 | |||
#define JUCE_BUILD_AMALGAMATION 1 | |||
#include "juce_amalgamated_template.cpp" |
@@ -27,6 +27,5 @@ | |||
#define JUCE_BUILD_MISC 0 | |||
#define JUCE_BUILD_GUI 0 | |||
#define JUCE_BUILD_NATIVE 1 | |||
#define JUCE_BUILD_AMALGAMATION 1 | |||
#include "juce_amalgamated_template.cpp" |
@@ -24,12 +24,15 @@ | |||
*/ | |||
/* | |||
This monolithic file contains the entire Juce source tree! | |||
To build an app which uses Juce, all you need to do is to add this | |||
file to your project, and include juce.h in your own cpp files. | |||
PLEASE NOTE! This file is just here to help transition old code to the newer | |||
modularised layout - but it will be removed at some point in the future, so | |||
you should update your projects to use the newer design as soon as possible. | |||
*/ | |||
#ifdef _MSC_VER | |||
#pragma message ("The amalgamated files are now deprecated - please include juce modules directly, or preferably let the introjucer handle the inclusion of source code in your project.") | |||
#else | |||
#warning "The amalgamated files are now deprecated - please include juce modules directly, or preferably let the introjucer handle the inclusion of source code in your project." | |||
#endif | |||
#ifdef __JUCE_JUCEHEADER__ | |||
/* When you add the amalgamated cpp file to your project, you mustn't include it in | |||
@@ -38,9 +41,6 @@ | |||
#error | |||
#endif | |||
#include "../src/core/juce_TargetPlatform.h" // FORCE_AMALGAMATOR_INCLUDE | |||
#include "../juce_Config.h" // FORCE_AMALGAMATOR_INCLUDE | |||
#ifndef JUCE_BUILD_CORE | |||
#define JUCE_BUILD_CORE 1 | |||
#endif | |||
@@ -57,370 +57,35 @@ | |||
#if JUCE_ONLY_BUILD_CORE_LIBRARY | |||
#undef JUCE_BUILD_MISC | |||
#undef JUCE_BUILD_GUI | |||
#undef JUCE_BUILD_NATIVE | |||
#endif | |||
#ifndef JUCE_NAMESPACE | |||
#define JUCE_NAMESPACE juce | |||
#endif | |||
//============================================================================== | |||
#if JUCE_BUILD_NATIVE || JUCE_BUILD_CORE || (JUCE_BUILD_MISC && (JUCE_PLUGINHOST_VST || JUCE_PLUGINHOST_AU)) | |||
#if JUCE_WINDOWS | |||
#include "../src/native/windows/juce_win32_NativeIncludes.h" | |||
#elif JUCE_LINUX | |||
#include "../src/native/linux/juce_linux_NativeIncludes.h" | |||
#elif JUCE_MAC || JUCE_IOS | |||
#include "../src/native/mac/juce_mac_NativeIncludes.h" | |||
#elif JUCE_ANDROID | |||
#include "../src/native/android/juce_android_NativeIncludes.h" | |||
#else | |||
#error "Unknown platform!" | |||
#endif | |||
#endif | |||
//============================================================================== | |||
#define DONT_SET_USING_JUCE_NAMESPACE 1 | |||
#undef max | |||
#undef min | |||
#define NO_DUMMY_DECL | |||
#define JUCE_AMALGAMATED_INCLUDE 1 | |||
#define JUCE_AMALGAMATED_TEMPLATE 1 | |||
#if (JUCE_BUILD_NATIVE || JUCE_BUILD_AMALGAMATION) && ! defined (__JUCE_AMALGAMATED_TEMPLATE_JUCEHEADER__) | |||
#include "../juce_amalgamated.h" // FORCE_AMALGAMATOR_INCLUDE | |||
#endif | |||
#if (defined(_MSC_VER) && (_MSC_VER <= 1200)) | |||
#pragma warning (disable: 4309 4305) | |||
#endif | |||
#if JUCE_MAC && JUCE_32BIT && JUCE_SUPPORT_CARBON && JUCE_BUILD_NATIVE && ! JUCE_ONLY_BUILD_CORE_LIBRARY | |||
BEGIN_JUCE_NAMESPACE | |||
#include "../src/native/mac/juce_mac_CarbonViewWrapperComponent.h" | |||
END_JUCE_NAMESPACE | |||
#endif | |||
//============================================================================== | |||
#if JUCE_BUILD_CORE | |||
#include "../src/core/juce_FileLogger.cpp" | |||
#include "../src/core/juce_Logger.cpp" | |||
#include "../src/maths/juce_Random.cpp" | |||
#include "../src/core/juce_RelativeTime.cpp" | |||
#include "../src/core/juce_SystemStats.cpp" | |||
#include "../src/core/juce_Result.cpp" | |||
#include "../src/core/juce_Time.cpp" | |||
#include "../src/containers/juce_AbstractFifo.cpp" | |||
#include "../src/maths/juce_BigInteger.cpp" | |||
#include "../src/memory/juce_MemoryBlock.cpp" | |||
#include "../src/containers/juce_PropertySet.cpp" | |||
#include "../src/text/juce_Identifier.cpp" | |||
#include "../src/containers/juce_Variant.cpp" | |||
#include "../src/containers/juce_NamedValueSet.cpp" | |||
#include "../src/containers/juce_DynamicObject.cpp" | |||
#include "../src/maths/juce_Expression.cpp" | |||
#include "../src/cryptography/juce_BlowFish.cpp" | |||
#include "../src/cryptography/juce_MD5.cpp" | |||
#include "../src/cryptography/juce_SHA256.cpp" | |||
#include "../src/cryptography/juce_Primes.cpp" | |||
#include "../src/cryptography/juce_RSAKey.cpp" | |||
#include "../src/io/streams/juce_InputStream.cpp" | |||
#include "../src/io/streams/juce_OutputStream.cpp" | |||
#include "../src/io/files/juce_DirectoryIterator.cpp" | |||
#include "../src/io/files/juce_File.cpp" | |||
#include "../src/io/files/juce_FileInputStream.cpp" | |||
#include "../src/io/files/juce_FileOutputStream.cpp" | |||
#include "../src/io/files/juce_FileSearchPath.cpp" | |||
#include "../src/io/files/juce_NamedPipe.cpp" | |||
#include "../src/io/files/juce_TemporaryFile.cpp" | |||
#include "../src/io/network/juce_Socket.cpp" | |||
#include "../src/io/network/juce_URL.cpp" | |||
#include "../src/io/network/juce_MACAddress.cpp" | |||
#include "../src/io/streams/juce_BufferedInputStream.cpp" | |||
#include "../src/io/streams/juce_FileInputSource.cpp" | |||
#include "../src/io/streams/juce_MemoryInputStream.cpp" | |||
#include "../src/io/streams/juce_MemoryOutputStream.cpp" | |||
#include "../src/io/streams/juce_SubregionStream.cpp" | |||
#include "../src/core/juce_PerformanceCounter.cpp" | |||
#include "../src/core/juce_Uuid.cpp" | |||
#include "../src/io/files/juce_ZipFile.cpp" | |||
#include "../src/text/juce_CharacterFunctions.cpp" | |||
#include "../src/text/juce_LocalisedStrings.cpp" | |||
#include "../src/text/juce_String.cpp" | |||
#include "../src/text/juce_StringArray.cpp" | |||
#include "../src/text/juce_StringPairArray.cpp" | |||
#include "../src/text/juce_StringPool.cpp" | |||
#include "../src/text/juce_XmlDocument.cpp" | |||
#include "../src/text/juce_XmlElement.cpp" | |||
#include "../src/text/juce_JSON.cpp" | |||
#include "../src/threads/juce_ReadWriteLock.cpp" | |||
#include "../src/threads/juce_Thread.cpp" | |||
#include "../src/threads/juce_ThreadPool.cpp" | |||
#include "../src/threads/juce_TimeSliceThread.cpp" | |||
#endif | |||
#if JUCE_BUILD_MISC | |||
#include "../src/containers/juce_ValueTree.cpp" | |||
#include "../src/containers/juce_Value.cpp" | |||
#include "../src/application/juce_Application.cpp" | |||
#include "../src/application/juce_ApplicationCommandInfo.cpp" | |||
#include "../src/application/juce_ApplicationCommandManager.cpp" | |||
#include "../src/application/juce_ApplicationCommandTarget.cpp" | |||
#include "../src/application/juce_ApplicationProperties.cpp" | |||
#include "../src/utilities/juce_PropertiesFile.cpp" | |||
#include "../src/utilities/juce_FileBasedDocument.cpp" | |||
#include "../src/utilities/juce_RecentlyOpenedFilesList.cpp" | |||
#include "../src/utilities/juce_UndoManager.cpp" | |||
#include "../src/utilities/juce_UnitTest.cpp" | |||
#include "../src/utilities/juce_DeletedAtShutdown.cpp" | |||
#include "../src/audio/audio_file_formats/juce_AiffAudioFormat.cpp" | |||
#include "../src/audio/audio_file_formats/juce_AudioFormat.cpp" | |||
#include "../src/audio/audio_file_formats/juce_AudioFormatReader.cpp" | |||
#include "../src/audio/audio_file_formats/juce_AudioFormatWriter.cpp" | |||
#include "../src/audio/audio_file_formats/juce_AudioFormatManager.cpp" | |||
#include "../src/audio/audio_file_formats/juce_AudioSubsectionReader.cpp" | |||
#include "../src/audio/audio_file_formats/juce_AudioThumbnail.cpp" | |||
#include "../src/audio/audio_file_formats/juce_AudioThumbnailCache.cpp" | |||
#include "../src/audio/audio_file_formats/juce_QuickTimeAudioFormat.cpp" | |||
#include "../src/audio/audio_file_formats/juce_WavAudioFormat.cpp" | |||
#include "../src/audio/audio_file_formats/juce_AudioCDReader.cpp" | |||
#include "../src/audio/audio_sources/juce_AudioFormatReaderSource.cpp" | |||
#include "../src/audio/audio_sources/juce_AudioSourcePlayer.cpp" | |||
#include "../src/audio/audio_sources/juce_AudioTransportSource.cpp" | |||
#include "../src/audio/audio_sources/juce_BufferingAudioSource.cpp" | |||
#include "../src/audio/audio_sources/juce_ChannelRemappingAudioSource.cpp" | |||
#include "../src/audio/audio_sources/juce_IIRFilterAudioSource.cpp" | |||
#include "../src/audio/audio_sources/juce_ReverbAudioSource.cpp" | |||
#include "../src/audio/audio_sources/juce_MixerAudioSource.cpp" | |||
#include "../src/audio/audio_sources/juce_ResamplingAudioSource.cpp" | |||
#include "../src/audio/audio_sources/juce_ToneGeneratorAudioSource.cpp" | |||
#include "../src/audio/devices/juce_AudioDeviceManager.cpp" | |||
#include "../src/audio/devices/juce_AudioIODevice.cpp" | |||
#include "../src/audio/devices/juce_AudioIODeviceType.cpp" | |||
#include "../src/audio/dsp/juce_AudioDataConverters.cpp" | |||
#include "../src/audio/dsp/juce_AudioSampleBuffer.cpp" | |||
#include "../src/audio/dsp/juce_IIRFilter.cpp" | |||
#include "../src/audio/midi/juce_MidiOutput.cpp" | |||
#include "../src/audio/midi/juce_MidiBuffer.cpp" | |||
#include "../src/audio/midi/juce_MidiFile.cpp" | |||
#include "../src/audio/midi/juce_MidiKeyboardState.cpp" | |||
#include "../src/audio/midi/juce_MidiMessage.cpp" | |||
#include "../src/audio/midi/juce_MidiMessageCollector.cpp" | |||
#include "../src/audio/midi/juce_MidiMessageSequence.cpp" | |||
#include "../src/audio/plugin_host/juce_AudioPluginFormat.cpp" | |||
#include "../src/audio/plugin_host/juce_AudioPluginFormatManager.cpp" | |||
#include "../src/audio/plugin_host/juce_KnownPluginList.cpp" | |||
#include "../src/audio/plugin_host/juce_PluginDescription.cpp" | |||
#include "../src/audio/plugin_host/juce_PluginDirectoryScanner.cpp" | |||
#include "../src/audio/plugin_host/juce_PluginListComponent.cpp" | |||
#include "../src/audio/plugin_host/formats/juce_AudioUnitPluginFormat.mm" | |||
#include "../src/audio/plugin_host/formats/juce_VSTPluginFormat.mm" | |||
#include "../src/audio/processors/juce_AudioProcessor.cpp" | |||
#include "../src/audio/processors/juce_AudioProcessorEditor.cpp" | |||
#include "../src/audio/processors/juce_AudioProcessorGraph.cpp" | |||
#include "../src/audio/processors/juce_AudioProcessorPlayer.cpp" | |||
#include "../src/audio/processors/juce_GenericAudioProcessorEditor.cpp" | |||
#include "../src/audio/synthesisers/juce_Sampler.cpp" | |||
#include "../src/audio/synthesisers/juce_Synthesiser.cpp" | |||
#include "../src/events/juce_ActionBroadcaster.cpp" | |||
#include "../src/events/juce_AsyncUpdater.cpp" | |||
#include "../src/events/juce_ChangeBroadcaster.cpp" | |||
#include "../src/events/juce_InterprocessConnection.cpp" | |||
#include "../src/events/juce_InterprocessConnectionServer.cpp" | |||
#include "../src/events/juce_Message.cpp" | |||
#include "../src/events/juce_MessageListener.cpp" | |||
#include "../src/events/juce_MessageManager.cpp" | |||
#include "../src/events/juce_MultiTimer.cpp" | |||
#include "../src/events/juce_Timer.cpp" | |||
#endif | |||
#if JUCE_BUILD_GUI | |||
#include "../src/gui/components/juce_Component.cpp" | |||
#include "../src/gui/components/juce_ComponentListener.cpp" | |||
#include "../src/gui/components/juce_Desktop.cpp" | |||
#include "../src/gui/components/juce_ModalComponentManager.cpp" | |||
#include "../src/gui/components/buttons/juce_ArrowButton.cpp" | |||
#include "../src/gui/components/buttons/juce_Button.cpp" | |||
#include "../src/gui/components/buttons/juce_DrawableButton.cpp" | |||
#include "../src/gui/components/buttons/juce_HyperlinkButton.cpp" | |||
#include "../src/gui/components/buttons/juce_ImageButton.cpp" | |||
#include "../src/gui/components/buttons/juce_ShapeButton.cpp" | |||
#include "../src/gui/components/buttons/juce_TextButton.cpp" | |||
#include "../src/gui/components/buttons/juce_ToggleButton.cpp" | |||
#include "../src/gui/components/buttons/juce_ToolbarButton.cpp" | |||
#include "../src/gui/components/code_editor/juce_CodeDocument.cpp" | |||
#include "../src/gui/components/code_editor/juce_CodeEditorComponent.cpp" | |||
#include "../src/gui/components/code_editor/juce_CPlusPlusCodeTokeniser.cpp" | |||
#include "../src/gui/components/controls/juce_ComboBox.cpp" | |||
#include "../src/gui/components/controls/juce_ImageComponent.cpp" | |||
#include "../src/gui/components/controls/juce_Label.cpp" | |||
#include "../src/gui/components/controls/juce_ListBox.cpp" | |||
#include "../src/gui/components/controls/juce_ProgressBar.cpp" | |||
#include "../src/gui/components/controls/juce_Slider.cpp" | |||
#include "../src/gui/components/controls/juce_TableHeaderComponent.cpp" | |||
#include "../src/gui/components/controls/juce_TableListBox.cpp" | |||
#include "../src/gui/components/controls/juce_TextEditor.cpp" | |||
#include "../src/gui/components/controls/juce_Toolbar.cpp" | |||
#include "../src/gui/components/controls/juce_ToolbarItemComponent.cpp" | |||
#include "../src/gui/components/controls/juce_ToolbarItemPalette.cpp" | |||
#include "../src/gui/components/controls/juce_TreeView.cpp" | |||
#include "../src/gui/components/filebrowser/juce_DirectoryContentsDisplayComponent.cpp" | |||
#include "../src/gui/components/filebrowser/juce_DirectoryContentsList.cpp" | |||
#include "../src/gui/components/filebrowser/juce_FileBrowserComponent.cpp" | |||
#include "../src/gui/components/filebrowser/juce_FileChooser.cpp" | |||
#include "../src/gui/components/filebrowser/juce_FileChooserDialogBox.cpp" | |||
#include "../src/gui/components/filebrowser/juce_FileFilter.cpp" | |||
#include "../src/gui/components/filebrowser/juce_FileListComponent.cpp" | |||
#include "../src/gui/components/filebrowser/juce_FilenameComponent.cpp" | |||
#include "../src/gui/components/filebrowser/juce_FileSearchPathListComponent.cpp" | |||
#include "../src/gui/components/filebrowser/juce_FileTreeComponent.cpp" | |||
#include "../src/gui/components/filebrowser/juce_ImagePreviewComponent.cpp" | |||
#include "../src/gui/components/filebrowser/juce_WildcardFileFilter.cpp" | |||
#include "../src/gui/components/keyboard/juce_KeyboardFocusTraverser.cpp" | |||
#include "../src/gui/components/keyboard/juce_KeyListener.cpp" | |||
#include "../src/gui/components/keyboard/juce_KeyMappingEditorComponent.cpp" | |||
#include "../src/gui/components/keyboard/juce_KeyPress.cpp" | |||
#include "../src/gui/components/keyboard/juce_KeyPressMappingSet.cpp" | |||
#include "../src/gui/components/keyboard/juce_ModifierKeys.cpp" | |||
#include "../src/gui/components/keyboard/juce_CaretComponent.cpp" | |||
#include "../src/gui/components/layout/juce_ComponentAnimator.cpp" | |||
#include "../src/gui/components/layout/juce_ComponentBuilder.cpp" | |||
#include "../src/gui/components/layout/juce_ComponentBoundsConstrainer.cpp" | |||
#include "../src/gui/components/layout/juce_ComponentMovementWatcher.cpp" | |||
#include "../src/gui/components/layout/juce_GroupComponent.cpp" | |||
#include "../src/gui/components/layout/juce_MultiDocumentPanel.cpp" | |||
#include "../src/gui/components/layout/juce_ResizableBorderComponent.cpp" | |||
#include "../src/gui/components/layout/juce_ResizableCornerComponent.cpp" | |||
#include "../src/gui/components/layout/juce_ResizableEdgeComponent.cpp" | |||
#include "../src/gui/components/layout/juce_ScrollBar.cpp" | |||
#include "../src/gui/components/layout/juce_StretchableLayoutManager.cpp" | |||
#include "../src/gui/components/layout/juce_StretchableLayoutResizerBar.cpp" | |||
#include "../src/gui/components/layout/juce_StretchableObjectResizer.cpp" | |||
#include "../src/gui/components/layout/juce_TabbedButtonBar.cpp" | |||
#include "../src/gui/components/layout/juce_TabbedComponent.cpp" | |||
#include "../src/gui/components/layout/juce_Viewport.cpp" | |||
#include "../src/gui/components/lookandfeel/juce_LookAndFeel.cpp" | |||
#include "../src/gui/components/lookandfeel/juce_OldSchoolLookAndFeel.cpp" | |||
#include "../src/gui/components/menus/juce_MenuBarComponent.cpp" | |||
#include "../src/gui/components/menus/juce_MenuBarModel.cpp" | |||
#include "../src/gui/components/menus/juce_PopupMenu.cpp" | |||
#include "../src/gui/components/mouse/juce_ComponentDragger.cpp" | |||
#include "../src/gui/components/mouse/juce_DragAndDropContainer.cpp" | |||
#include "../src/gui/components/mouse/juce_MouseCursor.cpp" | |||
#include "../src/gui/components/mouse/juce_MouseEvent.cpp" | |||
#include "../src/gui/components/mouse/juce_MouseInputSource.cpp" | |||
#include "../src/gui/components/mouse/juce_MouseListener.cpp" | |||
#include "../src/gui/components/properties/juce_BooleanPropertyComponent.cpp" | |||
#include "../src/gui/components/properties/juce_ButtonPropertyComponent.cpp" | |||
#include "../src/gui/components/properties/juce_ChoicePropertyComponent.cpp" | |||
#include "../src/gui/components/properties/juce_PropertyComponent.cpp" | |||
#include "../src/gui/components/properties/juce_PropertyPanel.cpp" | |||
#include "../src/gui/components/properties/juce_SliderPropertyComponent.cpp" | |||
#include "../src/gui/components/properties/juce_TextPropertyComponent.cpp" | |||
#include "../src/gui/components/special/juce_AudioDeviceSelectorComponent.cpp" | |||
#include "../src/gui/components/special/juce_BubbleComponent.cpp" | |||
#include "../src/gui/components/special/juce_BubbleMessageComponent.cpp" | |||
#include "../src/gui/components/special/juce_ColourSelector.cpp" | |||
#include "../src/gui/components/special/juce_DropShadower.cpp" | |||
#include "../src/gui/components/special/juce_MidiKeyboardComponent.cpp" | |||
#include "../src/gui/components/special/juce_OpenGLComponent.cpp" | |||
#include "../src/gui/components/special/juce_PreferencesPanel.cpp" | |||
#include "../src/gui/components/special/juce_SystemTrayIconComponent.cpp" | |||
#include "../src/gui/components/windows/juce_AlertWindow.cpp" | |||
#include "../src/gui/components/windows/juce_CallOutBox.cpp" | |||
#include "../src/gui/components/windows/juce_ComponentPeer.cpp" | |||
#include "../src/gui/components/windows/juce_DialogWindow.cpp" | |||
#include "../src/gui/components/windows/juce_DocumentWindow.cpp" | |||
#include "../src/gui/components/windows/juce_ResizableWindow.cpp" | |||
#include "../src/gui/components/windows/juce_SplashScreen.cpp" | |||
#include "../src/gui/components/windows/juce_ThreadWithProgressWindow.cpp" | |||
#include "../src/gui/components/windows/juce_TooltipWindow.cpp" | |||
#include "../src/gui/components/windows/juce_TopLevelWindow.cpp" | |||
#include "../src/gui/components/positioning/juce_MarkerList.cpp" | |||
#include "../src/gui/components/positioning/juce_RelativeCoordinate.cpp" | |||
#include "../src/gui/components/positioning/juce_RelativePoint.cpp" | |||
#include "../src/gui/components/positioning/juce_RelativeRectangle.cpp" | |||
#include "../src/gui/components/positioning/juce_RelativePointPath.cpp" | |||
#include "../src/gui/components/positioning/juce_RelativeParallelogram.cpp" | |||
#include "../src/gui/components/positioning/juce_RelativeCoordinatePositioner.cpp" | |||
#include "../modules/juce_core/juce_core.cpp" | |||
#endif | |||
// (put these in misc to balance the file sizes and avoid problems in iphone build) | |||
#if JUCE_BUILD_MISC | |||
#include "../src/gui/graphics/colour/juce_Colour.cpp" | |||
#include "../src/gui/graphics/colour/juce_ColourGradient.cpp" | |||
#include "../src/gui/graphics/colour/juce_Colours.cpp" | |||
#include "../src/gui/graphics/contexts/juce_EdgeTable.cpp" | |||
#include "../src/gui/graphics/contexts/juce_FillType.cpp" | |||
#include "../src/gui/graphics/contexts/juce_GraphicsContext.cpp" | |||
#include "../src/gui/graphics/contexts/juce_Justification.cpp" | |||
#include "../src/gui/graphics/contexts/juce_LowLevelGraphicsPostScriptRenderer.cpp" | |||
#include "../src/gui/graphics/contexts/juce_LowLevelGraphicsSoftwareRenderer.cpp" | |||
#include "../src/gui/graphics/contexts/juce_RectanglePlacement.cpp" | |||
#include "../src/gui/graphics/drawables/juce_Drawable.cpp" | |||
#include "../src/gui/graphics/drawables/juce_DrawableShape.cpp" | |||
#include "../src/gui/graphics/drawables/juce_DrawableComposite.cpp" | |||
#include "../src/gui/graphics/drawables/juce_DrawableImage.cpp" | |||
#include "../src/gui/graphics/drawables/juce_DrawablePath.cpp" | |||
#include "../src/gui/graphics/drawables/juce_DrawableRectangle.cpp" | |||
#include "../src/gui/graphics/drawables/juce_DrawableText.cpp" | |||
#include "../src/gui/graphics/drawables/juce_SVGParser.cpp" | |||
#include "../src/gui/graphics/effects/juce_DropShadowEffect.cpp" | |||
#include "../src/gui/graphics/effects/juce_GlowEffect.cpp" | |||
#include "../src/gui/graphics/fonts/juce_Font.cpp" | |||
#include "../src/gui/graphics/fonts/juce_GlyphArrangement.cpp" | |||
#include "../src/gui/graphics/fonts/juce_TextLayout.cpp" | |||
#include "../src/gui/graphics/fonts/juce_Typeface.cpp" | |||
#include "../src/gui/graphics/fonts/juce_CustomTypeface.cpp" | |||
#include "../src/gui/graphics/geometry/juce_AffineTransform.cpp" | |||
#include "../src/gui/graphics/geometry/juce_Path.cpp" | |||
#include "../src/gui/graphics/geometry/juce_PathIterator.cpp" | |||
#include "../src/gui/graphics/geometry/juce_PathStrokeType.cpp" | |||
#include "../src/gui/graphics/geometry/juce_RectangleList.cpp" | |||
#include "../src/gui/graphics/imaging/juce_Image.cpp" | |||
#include "../src/gui/graphics/imaging/juce_ImageCache.cpp" | |||
#include "../src/gui/graphics/imaging/juce_ImageConvolutionKernel.cpp" | |||
#include "../src/gui/graphics/imaging/juce_ImageFileFormat.cpp" | |||
#include "../src/gui/graphics/imaging/image_file_formats/juce_GIFLoader.cpp" | |||
#include "../modules/juce_cryptography/juce_cryptography.cpp" | |||
#include "../modules/juce_data_structures/juce_data_structures.cpp" | |||
#include "../modules/juce_events/juce_events.cpp" | |||
#include "../modules/juce_graphics/juce_graphics.cpp" | |||
#endif | |||
//============================================================================== | |||
// some files include lots of library code, so leave them to the end to avoid cluttering | |||
// up the build for the clean files. | |||
#if JUCE_BUILD_CORE | |||
#include "../src/io/streams/juce_GZIPCompressorOutputStream.cpp" | |||
#include "../src/io/streams/juce_GZIPDecompressorInputStream.cpp" | |||
#endif | |||
#if JUCE_BUILD_NATIVE && ! JUCE_ONLY_BUILD_CORE_LIBRARY | |||
#include "../src/audio/audio_file_formats/juce_CoreAudioFormat.cpp" | |||
#include "../src/audio/audio_file_formats/juce_FlacAudioFormat.cpp" | |||
#include "../src/audio/audio_file_formats/juce_OggVorbisAudioFormat.cpp" | |||
#endif | |||
// do these in the core section to help balance the sizes | |||
#if JUCE_BUILD_CORE && ! JUCE_ONLY_BUILD_CORE_LIBRARY | |||
#include "../src/gui/graphics/imaging/image_file_formats/juce_JPEGLoader.cpp" | |||
#include "../src/gui/graphics/imaging/image_file_formats/juce_PNGLoader.cpp" | |||
#endif | |||
//============================================================================== | |||
#if JUCE_BUILD_NATIVE | |||
// Non-public headers that are needed by more than one platform must be included | |||
// before the platform-specific sections.. | |||
BEGIN_JUCE_NAMESPACE | |||
#if ! JUCE_ONLY_BUILD_CORE_LIBRARY | |||
#include "../src/native/common/juce_MidiDataConcatenator.h" | |||
#endif | |||
END_JUCE_NAMESPACE | |||
#if JUCE_WINDOWS | |||
#include "../src/native/windows/juce_win32_NativeCode.cpp" | |||
#elif JUCE_LINUX | |||
#include "../src/native/linux/juce_linux_NativeCode.cpp" | |||
#elif JUCE_MAC || JUCE_IOS | |||
#include "../src/native/mac/juce_mac_NativeCode.mm" | |||
#elif JUCE_ANDROID | |||
#include "../src/native/android/juce_android_NativeCode.cpp" | |||
#include "../modules/juce_video/juce_video.cpp" | |||
#if JUCE_OPENGL | |||
#include "../modules/juce_opengl/juce_opengl.cpp" | |||
#endif | |||
#include "../modules/juce_audio_basics/juce_audio_basics.cpp" | |||
#include "../modules/juce_audio_formats/juce_audio_formats.cpp" | |||
#include "../modules/juce_audio_processors/juce_audio_processors.cpp" | |||
#include "../modules/juce_audio_devices/juce_audio_devices.cpp" | |||
#endif | |||
#if JUCE_BUILD_GUI | |||
#include "../modules/juce_gui_basics/juce_gui_basics.cpp" | |||
#include "../modules/juce_gui_extra/juce_gui_extra.cpp" | |||
#include "../modules/juce_audio_utils/juce_audio_utils.cpp" | |||
#endif |
@@ -1 +0,0 @@ | |||
This folder is where the compiled libs and intermediate files get stored... |
@@ -1,5 +1,5 @@ | |||
# Automatically generated makefile, created by the Jucer | |||
# Don't edit this file! Your changes will be overwritten when you re-save the Jucer project! | |||
# Automatically generated makefile, created by the Introjucer | |||
# Don't edit this file! Your changes will be overwritten when you re-save the Introjucer project! | |||
ifndef CONFIG | |||
CONFIG=Debug | |||
@@ -17,12 +17,12 @@ ifeq ($(CONFIG),Debug) | |||
LIBDIR := build | |||
OBJDIR := build/intermediate/Debug | |||
OUTDIR := build | |||
CPPFLAGS := $(DEPFLAGS) -D "LINUX=1" -D "DEBUG=1" -D "_DEBUG=1" -D "JUCER_LINUX_MAKE_7346DA2A=1" -I "/usr/include" -I "/usr/include/freetype2" | |||
CPPFLAGS := $(DEPFLAGS) -D "LINUX=1" -D "DEBUG=1" -D "_DEBUG=1" -D "JUCER_LINUX_MAKE_7346DA2A=1" -I /usr/include -I /usr/include/freetype2 -I ../../JuceLibraryCode | |||
CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -g -ggdb -O0 | |||
CXXFLAGS += $(CFLAGS) | |||
LDFLAGS += -L$(BINDIR) -L$(LIBDIR) -L"/usr/X11R6/lib/" -L"../../../../../juce/bin" -lfreetype -lpthread -lrt -lX11 -lGL -lGLU -lXinerama -lasound | |||
LDFLAGS += -L$(BINDIR) -L$(LIBDIR) -L/usr/X11R6/lib/ -lfreetype -lpthread -lrt -lX11 -lGL -lGLU -lXinerama -lasound -lXext | |||
LDDEPS := | |||
RESFLAGS := -D "LINUX=1" -D "DEBUG=1" -D "_DEBUG=1" -D "JUCER_LINUX_MAKE_7346DA2A=1" -I "/usr/include" -I "/usr/include/freetype2" | |||
RESFLAGS := -D "LINUX=1" -D "DEBUG=1" -D "_DEBUG=1" -D "JUCER_LINUX_MAKE_7346DA2A=1" -I /usr/include -I /usr/include/freetype2 -I ../../JuceLibraryCode | |||
TARGET := Introjucer | |||
BLDCMD = $(CXX) -o $(OUTDIR)/$(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(TARGET_ARCH) | |||
endif | |||
@@ -32,45 +32,50 @@ ifeq ($(CONFIG),Release) | |||
LIBDIR := build | |||
OBJDIR := build/intermediate/Release | |||
OUTDIR := build | |||
CPPFLAGS := $(DEPFLAGS) -D "LINUX=1" -D "NDEBUG=1" -D "JUCER_LINUX_MAKE_7346DA2A=1" -I "/usr/include" -I "/usr/include/freetype2" | |||
CPPFLAGS := $(DEPFLAGS) -D "LINUX=1" -D "NDEBUG=1" -D "JUCER_LINUX_MAKE_7346DA2A=1" -I /usr/include -I /usr/include/freetype2 -I ../../JuceLibraryCode | |||
CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -O3 | |||
CXXFLAGS += $(CFLAGS) | |||
LDFLAGS += -L$(BINDIR) -L$(LIBDIR) -L"/usr/X11R6/lib/" -L"../../../../../juce/bin" -lfreetype -lpthread -lrt -lX11 -lGL -lGLU -lXinerama -lasound | |||
LDFLAGS += -L$(BINDIR) -L$(LIBDIR) -L/usr/X11R6/lib/ -lfreetype -lpthread -lrt -lX11 -lGL -lGLU -lXinerama -lasound -lXext | |||
LDDEPS := | |||
RESFLAGS := -D "LINUX=1" -D "NDEBUG=1" -D "JUCER_LINUX_MAKE_7346DA2A=1" -I "/usr/include" -I "/usr/include/freetype2" | |||
RESFLAGS := -D "LINUX=1" -D "NDEBUG=1" -D "JUCER_LINUX_MAKE_7346DA2A=1" -I /usr/include -I /usr/include/freetype2 -I ../../JuceLibraryCode | |||
TARGET := Introjucer | |||
BLDCMD = $(CXX) -o $(OUTDIR)/$(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(TARGET_ARCH) | |||
endif | |||
OBJECTS := \ | |||
$(OBJDIR)/jucer_CommandLine_f35de107.o \ | |||
$(OBJDIR)/jucer_DocumentEditorComponent_695dff1d.o \ | |||
$(OBJDIR)/jucer_FilePreviewComponent_55512f53.o \ | |||
$(OBJDIR)/jucer_JuceUpdater_cf7865c4.o \ | |||
$(OBJDIR)/jucer_Main_f8488f5b.o \ | |||
$(OBJDIR)/jucer_MainWindow_1e163aeb.o \ | |||
$(OBJDIR)/jucer_OpenDocumentManager_4c72d210.o \ | |||
$(OBJDIR)/jucer_SourceCodeEditor_461f5487.o \ | |||
$(OBJDIR)/jucer_GroupInformationComponent_631ccf01.o \ | |||
$(OBJDIR)/jucer_Module_3f7666a5.o \ | |||
$(OBJDIR)/jucer_NewFileWizard_b8a19ef8.o \ | |||
$(OBJDIR)/jucer_NewProjectWizard_7a15bf5d.o \ | |||
$(OBJDIR)/jucer_Project_c131864a.o \ | |||
$(OBJDIR)/jucer_ProjectContentComponent_60de0eee.o \ | |||
$(OBJDIR)/jucer_ProjectExporter_eed6e04b.o \ | |||
$(OBJDIR)/jucer_ProjectInformationComponent_4746e69b.o \ | |||
$(OBJDIR)/jucer_ProjectTreeViewBase_63c2bdbe.o \ | |||
$(OBJDIR)/jucer_ProjectType_1bc27a24.o \ | |||
$(OBJDIR)/jucer_ResourceFile_7e7734e3.o \ | |||
$(OBJDIR)/jucer_TreeViewTypes_4a765287.o \ | |||
$(OBJDIR)/jucer_ProjectExporter_eefe2e5b.o \ | |||
$(OBJDIR)/jucer_ResourceFile_6af120d3.o \ | |||
$(OBJDIR)/jucer_CodeHelpers_c317179c.o \ | |||
$(OBJDIR)/jucer_FileHelpers_f98ed0ad.o \ | |||
$(OBJDIR)/jucer_JucerTreeViewBase_d043309d.o \ | |||
$(OBJDIR)/jucer_MiscUtilities_25b68c82.o \ | |||
$(OBJDIR)/jucer_StoredSettings_26078d2c.o \ | |||
$(OBJDIR)/jucer_SourceCodeEditor_461f5487.o \ | |||
$(OBJDIR)/BinaryData_ce4232d4.o \ | |||
$(OBJDIR)/JuceLibraryCode1_682c927f.o \ | |||
$(OBJDIR)/JuceLibraryCode2_683aaa00.o \ | |||
$(OBJDIR)/JuceLibraryCode3_6848c181.o \ | |||
$(OBJDIR)/JuceLibraryCode4_6856d902.o \ | |||
$(OBJDIR)/juce_core_1ee54a40.o \ | |||
$(OBJDIR)/juce_cryptography_3b1f489a.o \ | |||
$(OBJDIR)/juce_data_structures_84790dfc.o \ | |||
$(OBJDIR)/juce_events_584896b4.o \ | |||
$(OBJDIR)/juce_graphics_f9afc18.o \ | |||
$(OBJDIR)/juce_gui_basics_90929794.o \ | |||
$(OBJDIR)/juce_gui_extra_b81d9e1c.o \ | |||
.PHONY: clean | |||
@@ -87,6 +92,11 @@ clean: | |||
-@rm -rf $(OBJDIR)/* | |||
-@rm -rf $(OBJDIR) | |||
$(OBJDIR)/jucer_CommandLine_f35de107.o: ../../Source/Application/jucer_CommandLine.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling jucer_CommandLine.cpp" | |||
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
$(OBJDIR)/jucer_DocumentEditorComponent_695dff1d.o: ../../Source/Application/jucer_DocumentEditorComponent.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling jucer_DocumentEditorComponent.cpp" | |||
@@ -117,14 +127,14 @@ $(OBJDIR)/jucer_OpenDocumentManager_4c72d210.o: ../../Source/Application/jucer_O | |||
@echo "Compiling jucer_OpenDocumentManager.cpp" | |||
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
$(OBJDIR)/jucer_SourceCodeEditor_461f5487.o: ../../Source/Code\ Editor/jucer_SourceCodeEditor.cpp | |||
$(OBJDIR)/jucer_GroupInformationComponent_631ccf01.o: ../../Source/Project/jucer_GroupInformationComponent.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling jucer_SourceCodeEditor.cpp" | |||
@echo "Compiling jucer_GroupInformationComponent.cpp" | |||
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
$(OBJDIR)/jucer_GroupInformationComponent_631ccf01.o: ../../Source/Project/jucer_GroupInformationComponent.cpp | |||
$(OBJDIR)/jucer_Module_3f7666a5.o: ../../Source/Project/jucer_Module.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling jucer_GroupInformationComponent.cpp" | |||
@echo "Compiling jucer_Module.cpp" | |||
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
$(OBJDIR)/jucer_NewFileWizard_b8a19ef8.o: ../../Source/Project/jucer_NewFileWizard.cpp | |||
@@ -147,11 +157,6 @@ $(OBJDIR)/jucer_ProjectContentComponent_60de0eee.o: ../../Source/Project/jucer_P | |||
@echo "Compiling jucer_ProjectContentComponent.cpp" | |||
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
$(OBJDIR)/jucer_ProjectExporter_eed6e04b.o: ../../Source/Project/jucer_ProjectExporter.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling jucer_ProjectExporter.cpp" | |||
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
$(OBJDIR)/jucer_ProjectInformationComponent_4746e69b.o: ../../Source/Project/jucer_ProjectInformationComponent.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling jucer_ProjectInformationComponent.cpp" | |||
@@ -167,14 +172,19 @@ $(OBJDIR)/jucer_ProjectType_1bc27a24.o: ../../Source/Project/jucer_ProjectType.c | |||
@echo "Compiling jucer_ProjectType.cpp" | |||
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
$(OBJDIR)/jucer_ResourceFile_7e7734e3.o: ../../Source/Project/jucer_ResourceFile.cpp | |||
$(OBJDIR)/jucer_TreeViewTypes_4a765287.o: ../../Source/Project/jucer_TreeViewTypes.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling jucer_ResourceFile.cpp" | |||
@echo "Compiling jucer_TreeViewTypes.cpp" | |||
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
$(OBJDIR)/jucer_TreeViewTypes_4a765287.o: ../../Source/Project/jucer_TreeViewTypes.cpp | |||
$(OBJDIR)/jucer_ProjectExporter_eefe2e5b.o: ../../Source/Project\ Saving/jucer_ProjectExporter.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling jucer_TreeViewTypes.cpp" | |||
@echo "Compiling jucer_ProjectExporter.cpp" | |||
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
$(OBJDIR)/jucer_ResourceFile_6af120d3.o: ../../Source/Project\ Saving/jucer_ResourceFile.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling jucer_ResourceFile.cpp" | |||
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
$(OBJDIR)/jucer_CodeHelpers_c317179c.o: ../../Source/Utility/jucer_CodeHelpers.cpp | |||
@@ -202,29 +212,49 @@ $(OBJDIR)/jucer_StoredSettings_26078d2c.o: ../../Source/Utility/jucer_StoredSett | |||
@echo "Compiling jucer_StoredSettings.cpp" | |||
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
$(OBJDIR)/jucer_SourceCodeEditor_461f5487.o: ../../Source/Code\ Editor/jucer_SourceCodeEditor.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling jucer_SourceCodeEditor.cpp" | |||
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
$(OBJDIR)/BinaryData_ce4232d4.o: ../../JuceLibraryCode/BinaryData.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling BinaryData.cpp" | |||
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
$(OBJDIR)/JuceLibraryCode1_682c927f.o: ../../JuceLibraryCode/JuceLibraryCode1.cpp | |||
$(OBJDIR)/juce_core_1ee54a40.o: ../../../../modules/juce_core/juce_core.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling juce_core.cpp" | |||
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
$(OBJDIR)/juce_cryptography_3b1f489a.o: ../../../../modules/juce_cryptography/juce_cryptography.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling juce_cryptography.cpp" | |||
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
$(OBJDIR)/juce_data_structures_84790dfc.o: ../../../../modules/juce_data_structures/juce_data_structures.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling juce_data_structures.cpp" | |||
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
$(OBJDIR)/juce_events_584896b4.o: ../../../../modules/juce_events/juce_events.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling JuceLibraryCode1.cpp" | |||
@echo "Compiling juce_events.cpp" | |||
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
$(OBJDIR)/JuceLibraryCode2_683aaa00.o: ../../JuceLibraryCode/JuceLibraryCode2.cpp | |||
$(OBJDIR)/juce_graphics_f9afc18.o: ../../../../modules/juce_graphics/juce_graphics.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling JuceLibraryCode2.cpp" | |||
@echo "Compiling juce_graphics.cpp" | |||
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
$(OBJDIR)/JuceLibraryCode3_6848c181.o: ../../JuceLibraryCode/JuceLibraryCode3.cpp | |||
$(OBJDIR)/juce_gui_basics_90929794.o: ../../../../modules/juce_gui_basics/juce_gui_basics.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling JuceLibraryCode3.cpp" | |||
@echo "Compiling juce_gui_basics.cpp" | |||
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
$(OBJDIR)/JuceLibraryCode4_6856d902.o: ../../JuceLibraryCode/JuceLibraryCode4.cpp | |||
$(OBJDIR)/juce_gui_extra_b81d9e1c.o: ../../../../modules/juce_gui_extra/juce_gui_extra.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling JuceLibraryCode4.cpp" | |||
@echo "Compiling juce_gui_extra.cpp" | |||
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
-include $(OBJECTS:%.o=%.d) |
@@ -1,6 +1,6 @@ | |||
Microsoft Visual Studio Solution File, Format Version 8.00 | |||
Microsoft Visual Studio Solution File, Format Version 9.00 | |||
# Visual C++ Express 2005 | |||
Project("{4C35D249-2981-3D26-0C2E-BDE1841F8430}") = "The Introjucer", "The Introjucer.vcproj", "{C9C4A72E-8CC9-D57E-C0D0-2E6109E48884}" | |||
Project("{62DDBD62-D03F-FBCA-D85C-731B2D53653D}") = "The Introjucer", "The Introjucer.vcproj", "{26ABE2A4-1F2F-8375-088D-D692A4408B5A}" | |||
EndProject | |||
Global | |||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | |||
@@ -8,10 +8,10 @@ Global | |||
Release|Win32 = Release|Win32 | |||
EndGlobalSection | |||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | |||
{C9C4A72E-8CC9-D57E-C0D0-2E6109E48884}.Debug|Win32.ActiveCfg = Debug|Win32 | |||
{C9C4A72E-8CC9-D57E-C0D0-2E6109E48884}.Debug|Win32.Build.0 = Debug|Win32 | |||
{C9C4A72E-8CC9-D57E-C0D0-2E6109E48884}.Release|Win32.ActiveCfg = Release|Win32 | |||
{C9C4A72E-8CC9-D57E-C0D0-2E6109E48884}.Release|Win32.Build.0 = Release|Win32 | |||
{26ABE2A4-1F2F-8375-088D-D692A4408B5A}.Debug|Win32.ActiveCfg = Debug|Win32 | |||
{26ABE2A4-1F2F-8375-088D-D692A4408B5A}.Debug|Win32.Build.0 = Debug|Win32 | |||
{26ABE2A4-1F2F-8375-088D-D692A4408B5A}.Release|Win32.ActiveCfg = Release|Win32 | |||
{26ABE2A4-1F2F-8375-088D-D692A4408B5A}.Release|Win32.Build.0 = Release|Win32 | |||
EndGlobalSection | |||
GlobalSection(SolutionProperties) = preSolution | |||
HideSolutionNode = FALSE | |||
@@ -1,6 +1,6 @@ | |||
Microsoft Visual Studio Solution File, Format Version 10.00 | |||
# Visual C++ Express 2008 | |||
Project("{4C35D249-2981-3D26-0C2E-BDE1841F8430}") = "The Introjucer", "The Introjucer.vcproj", "{C9C4A72E-8CC9-D57E-C0D0-2E6109E48884}" | |||
Project("{62DDBD62-D03F-FBCA-D85C-731B2D53653D}") = "The Introjucer", "The Introjucer.vcproj", "{26ABE2A4-1F2F-8375-088D-D692A4408B5A}" | |||
EndProject | |||
Global | |||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | |||
@@ -8,10 +8,10 @@ Global | |||
Release|Win32 = Release|Win32 | |||
EndGlobalSection | |||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | |||
{C9C4A72E-8CC9-D57E-C0D0-2E6109E48884}.Debug|Win32.ActiveCfg = Debug|Win32 | |||
{C9C4A72E-8CC9-D57E-C0D0-2E6109E48884}.Debug|Win32.Build.0 = Debug|Win32 | |||
{C9C4A72E-8CC9-D57E-C0D0-2E6109E48884}.Release|Win32.ActiveCfg = Release|Win32 | |||
{C9C4A72E-8CC9-D57E-C0D0-2E6109E48884}.Release|Win32.Build.0 = Release|Win32 | |||
{26ABE2A4-1F2F-8375-088D-D692A4408B5A}.Debug|Win32.ActiveCfg = Debug|Win32 | |||
{26ABE2A4-1F2F-8375-088D-D692A4408B5A}.Debug|Win32.Build.0 = Debug|Win32 | |||
{26ABE2A4-1F2F-8375-088D-D692A4408B5A}.Release|Win32.ActiveCfg = Release|Win32 | |||
{26ABE2A4-1F2F-8375-088D-D692A4408B5A}.Release|Win32.Build.0 = Release|Win32 | |||
EndGlobalSection | |||
GlobalSection(SolutionProperties) = preSolution | |||
HideSolutionNode = FALSE | |||
@@ -1,5 +1,6 @@ | |||
Microsoft Visual Studio Solution File, Format Version 11.00 | |||
Project("{4C35D249-2981-3D26-0C2E-BDE1841F8430}") = "The Introjucer", "The Introjucer.vcxproj", "{C9C4A72E-8CC9-D57E-C0D0-2E6109E48884}" | |||
# Visual Studio 2010 | |||
Project("{62DDBD62-D03F-FBCA-D85C-731B2D53653D}") = "The Introjucer", "The Introjucer.vcxproj", "{26ABE2A4-1F2F-8375-088D-D692A4408B5A}" | |||
EndProject | |||
Global | |||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | |||
@@ -7,10 +8,10 @@ Global | |||
Release|Win32 = Release|Win32 | |||
EndGlobalSection | |||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | |||
{C9C4A72E-8CC9-D57E-C0D0-2E6109E48884}.Debug|Win32.ActiveCfg = Debug|Win32 | |||
{C9C4A72E-8CC9-D57E-C0D0-2E6109E48884}.Debug|Win32.Build.0 = Debug|Win32 | |||
{C9C4A72E-8CC9-D57E-C0D0-2E6109E48884}.Release|Win32.ActiveCfg = Release|Win32 | |||
{C9C4A72E-8CC9-D57E-C0D0-2E6109E48884}.Release|Win32.Build.0 = Release|Win32 | |||
{26ABE2A4-1F2F-8375-088D-D692A4408B5A}.Debug|Win32.ActiveCfg = Debug|Win32 | |||
{26ABE2A4-1F2F-8375-088D-D692A4408B5A}.Debug|Win32.Build.0 = Debug|Win32 | |||
{26ABE2A4-1F2F-8375-088D-D692A4408B5A}.Release|Win32.ActiveCfg = Release|Win32 | |||
{26ABE2A4-1F2F-8375-088D-D692A4408B5A}.Release|Win32.Build.0 = Release|Win32 | |||
EndGlobalSection | |||
GlobalSection(SolutionProperties) = preSolution | |||
HideSolutionNode = FALSE | |||
@@ -10,31 +10,60 @@ | |||
pluginIsSynth="0" pluginWantsMidiIn="0" pluginProducesMidiOut="0" | |||
pluginSilenceInIsSilenceOut="0" pluginTailLength="0" pluginEditorRequiresKeys="0" | |||
pluginAUExportPrefix="TheIntrojucerAU" pluginAUViewClass="TheIntrojucerAU_V1" | |||
pluginRTASCategory="" bundleIdentifier="com.rawmaterialsoftware.introjucer" | |||
bigIcon="rVgowdy"> | |||
pluginRTASCategory="" bundleIdentifier="com.rawmaterialsoftware.introjucer"> | |||
<EXPORTFORMATS> | |||
<XCODE_MAC targetFolder="Builds/MacOSX" vstFolder="~/SDKs/vstsdk2.4" rtasFolder="~/SDKs/PT_80_SDK" | |||
juceFolder="../.." documentExtensions=".jucer" objCExtraSuffix="zNNCr"/> | |||
juceFolder="../.." documentExtensions=".jucer" objCExtraSuffix="zNNCr" | |||
bigIcon="rVgowdy"> | |||
<CONFIGURATIONS> | |||
<CONFIGURATION name="Debug" isDebug="1" optimisation="1" targetName="Introjucer" | |||
osxSDK="default" osxCompatibility="default" osxArchitecture="default"/> | |||
<CONFIGURATION name="Release" isDebug="0" optimisation="3" targetName="Introjucer" | |||
osxSDK="default" osxCompatibility="10.5 SDK" osxArchitecture="32BitUniversal"/> | |||
</CONFIGURATIONS> | |||
</XCODE_MAC> | |||
<VS2005 targetFolder="Builds/VisualStudio2005" vstFolder="c:\SDKs\vstsdk2.4" | |||
rtasFolder="c:\SDKs\PT_80_SDK" juceFolder="../.." libraryType="1"/> | |||
rtasFolder="c:\SDKs\PT_80_SDK" juceFolder="../.." libraryType="1" | |||
bigIcon="rVgowdy"> | |||
<CONFIGURATIONS> | |||
<CONFIGURATION name="Debug" isDebug="1" optimisation="1" targetName="Introjucer"/> | |||
<CONFIGURATION name="Release" isDebug="0" optimisation="3" targetName="Introjucer"/> | |||
</CONFIGURATIONS> | |||
</VS2005> | |||
<VS2008 targetFolder="Builds/VisualStudio2008" vstFolder="c:\SDKs\vstsdk2.4" | |||
rtasFolder="c:\SDKs\PT_80_SDK" juceFolder="../.." libraryType="1"/> | |||
<LINUX_MAKE targetFolder="Builds/Linux" vstFolder="~/SDKs/vstsdk2.4" juceFolder="../.."/> | |||
rtasFolder="c:\SDKs\PT_80_SDK" juceFolder="../.." libraryType="1" | |||
bigIcon="rVgowdy"> | |||
<CONFIGURATIONS> | |||
<CONFIGURATION name="Debug" isDebug="1" optimisation="1" targetName="Introjucer"/> | |||
<CONFIGURATION name="Release" isDebug="0" optimisation="3" targetName="Introjucer"/> | |||
</CONFIGURATIONS> | |||
</VS2008> | |||
<LINUX_MAKE targetFolder="Builds/Linux" vstFolder="~/SDKs/vstsdk2.4" juceFolder="../.." | |||
bigIcon="rVgowdy"> | |||
<CONFIGURATIONS> | |||
<CONFIGURATION name="Debug" isDebug="1" optimisation="1" targetName="Introjucer"/> | |||
<CONFIGURATION name="Release" isDebug="0" optimisation="3" targetName="Introjucer"/> | |||
</CONFIGURATIONS> | |||
</LINUX_MAKE> | |||
<VS2010 targetFolder="Builds/VisualStudio2010" vstFolder="c:\SDKs\vstsdk2.4" | |||
rtasFolder="c:\SDKs\PT_80_SDK" libraryType="1" juceFolder="../.."/> | |||
rtasFolder="c:\SDKs\PT_80_SDK" libraryType="1" juceFolder="../.." | |||
bigIcon="rVgowdy"> | |||
<CONFIGURATIONS> | |||
<CONFIGURATION name="Debug" isDebug="1" optimisation="1" targetName="Introjucer"/> | |||
<CONFIGURATION name="Release" isDebug="0" optimisation="3" targetName="Introjucer"/> | |||
</CONFIGURATIONS> | |||
</VS2010> | |||
</EXPORTFORMATS> | |||
<CONFIGURATIONS> | |||
<CONFIGURATION name="Debug" isDebug="1" optimisation="1" targetName="Introjucer" | |||
osxSDK="default" osxCompatibility="default" osxArchitecture="default"/> | |||
<CONFIGURATION name="Release" isDebug="0" optimisation="3" targetName="Introjucer" | |||
osxSDK="default" osxCompatibility="10.5 SDK" osxArchitecture="32BitUniversal"/> | |||
</CONFIGURATIONS> | |||
<MAINGROUP name="The Introjucer" id="NhrJq66R"> | |||
<GROUP id="mslFIKZ" name="Application"> | |||
<FILE id="PXX8Yi" name="jucer_Application.h" compile="0" resource="0" | |||
file="Source/Application/jucer_Application.h"/> | |||
<FILE id="lHd3UQJ" name="jucer_CommandIDs.h" compile="0" resource="0" | |||
file="Source/Application/jucer_CommandIDs.h"/> | |||
<FILE id="MyVf4S" name="jucer_CommandLine.cpp" compile="1" resource="0" | |||
file="Source/Application/jucer_CommandLine.cpp"/> | |||
<FILE id="SuOWc2" name="jucer_CommandLine.h" compile="0" resource="0" | |||
file="Source/Application/jucer_CommandLine.h"/> | |||
<FILE id="vXhFyvd" name="jucer_CommonHeaders.h" compile="0" resource="0" | |||
file="Source/Application/jucer_CommonHeaders.h"/> | |||
<FILE id="YNZhhqp" name="jucer_DocumentEditorComponent.cpp" compile="1" | |||
@@ -61,17 +90,16 @@ | |||
<FILE id="NYEknlp" name="jucer_OpenDocumentManager.h" compile="0" resource="0" | |||
file="Source/Application/jucer_OpenDocumentManager.h"/> | |||
</GROUP> | |||
<GROUP id="i1s14uV" name="Code Editor"> | |||
<FILE id="36CkPUf" name="jucer_SourceCodeEditor.cpp" compile="1" resource="0" | |||
file="Source/Code Editor/jucer_SourceCodeEditor.cpp"/> | |||
<FILE id="CygyGGA" name="jucer_SourceCodeEditor.h" compile="0" resource="0" | |||
file="Source/Code Editor/jucer_SourceCodeEditor.h"/> | |||
</GROUP> | |||
<GROUP id="vGFZIJg" name="Project"> | |||
<FILE id="a9a1b" name="jucer_AudioPluginModule.h" compile="0" resource="0" | |||
file="Source/Project/jucer_AudioPluginModule.h"/> | |||
<FILE id="Wx7kXq7" name="jucer_GroupInformationComponent.cpp" compile="1" | |||
resource="0" file="Source/Project/jucer_GroupInformationComponent.cpp"/> | |||
<FILE id="sQjHbVN" name="jucer_GroupInformationComponent.h" compile="0" | |||
resource="0" file="Source/Project/jucer_GroupInformationComponent.h"/> | |||
<FILE id="MJkOAX" name="jucer_Module.cpp" compile="1" resource="0" | |||
file="Source/Project/jucer_Module.cpp"/> | |||
<FILE id="VZmQQ6" name="jucer_Module.h" compile="0" resource="0" file="Source/Project/jucer_Module.h"/> | |||
<FILE id="Vf0IGtm" name="jucer_NewFileWizard.cpp" compile="1" resource="0" | |||
file="Source/Project/jucer_NewFileWizard.cpp"/> | |||
<FILE id="VRwC9Js" name="jucer_NewFileWizard.h" compile="0" resource="0" | |||
@@ -88,24 +116,10 @@ | |||
resource="0" file="Source/Project/jucer_ProjectContentComponent.cpp"/> | |||
<FILE id="mIJMR08" name="jucer_ProjectContentComponent.h" compile="0" | |||
resource="0" file="Source/Project/jucer_ProjectContentComponent.h"/> | |||
<FILE id="N0uQAr" name="jucer_ProjectExport_Android.h" compile="0" | |||
resource="0" file="Source/Project/jucer_ProjectExport_Android.h"/> | |||
<FILE id="b8ouh7s" name="jucer_ProjectExport_Make.h" compile="0" resource="0" | |||
file="Source/Project/jucer_ProjectExport_Make.h"/> | |||
<FILE id="lbo8KcG" name="jucer_ProjectExport_MSVC.h" compile="0" resource="0" | |||
file="Source/Project/jucer_ProjectExport_MSVC.h"/> | |||
<FILE id="ymhtjf" name="jucer_ProjectExport_XCode.h" compile="0" resource="0" | |||
file="Source/Project/jucer_ProjectExport_XCode.h"/> | |||
<FILE id="h6J3UPy" name="jucer_ProjectExporter.cpp" compile="1" resource="0" | |||
file="Source/Project/jucer_ProjectExporter.cpp"/> | |||
<FILE id="KFY4Re5" name="jucer_ProjectExporter.h" compile="0" resource="0" | |||
file="Source/Project/jucer_ProjectExporter.h"/> | |||
<FILE id="5I09Gpe" name="jucer_ProjectInformationComponent.cpp" compile="1" | |||
resource="0" file="Source/Project/jucer_ProjectInformationComponent.cpp"/> | |||
<FILE id="nvEyCt5" name="jucer_ProjectInformationComponent.h" compile="0" | |||
resource="0" file="Source/Project/jucer_ProjectInformationComponent.h"/> | |||
<FILE id="grlWO2E" name="jucer_ProjectSaver.h" compile="0" resource="0" | |||
file="Source/Project/jucer_ProjectSaver.h"/> | |||
<FILE id="TL3snCb" name="jucer_ProjectTreeViewBase.cpp" compile="1" | |||
resource="0" file="Source/Project/jucer_ProjectTreeViewBase.cpp"/> | |||
<FILE id="UwhAsi1" name="jucer_ProjectTreeViewBase.h" compile="0" resource="0" | |||
@@ -114,15 +128,31 @@ | |||
file="Source/Project/jucer_ProjectType.cpp"/> | |||
<FILE id="davId" name="jucer_ProjectType.h" compile="0" resource="0" | |||
file="Source/Project/jucer_ProjectType.h"/> | |||
<FILE id="pIeJPuR" name="jucer_ResourceFile.cpp" compile="1" resource="0" | |||
file="Source/Project/jucer_ResourceFile.cpp"/> | |||
<FILE id="Bvb3uEg" name="jucer_ResourceFile.h" compile="0" resource="0" | |||
file="Source/Project/jucer_ResourceFile.h"/> | |||
<FILE id="JTbTiIc" name="jucer_TreeViewTypes.cpp" compile="1" resource="0" | |||
file="Source/Project/jucer_TreeViewTypes.cpp"/> | |||
<FILE id="WaT0B16" name="jucer_TreeViewTypes.h" compile="0" resource="0" | |||
file="Source/Project/jucer_TreeViewTypes.h"/> | |||
</GROUP> | |||
<GROUP id="{579C9644-D5C2-8469-9439-F91C81337531}" name="Project Saving"> | |||
<FILE id="TtXohM" name="jucer_ProjectExport_Android.h" compile="0" | |||
resource="0" file="Source/Project Saving/jucer_ProjectExport_Android.h"/> | |||
<FILE id="mVXrLi" name="jucer_ProjectExport_Make.h" compile="0" resource="0" | |||
file="Source/Project Saving/jucer_ProjectExport_Make.h"/> | |||
<FILE id="ILeTrs" name="jucer_ProjectExport_MSVC.h" compile="0" resource="0" | |||
file="Source/Project Saving/jucer_ProjectExport_MSVC.h"/> | |||
<FILE id="qGukX7" name="jucer_ProjectExport_XCode.h" compile="0" resource="0" | |||
file="Source/Project Saving/jucer_ProjectExport_XCode.h"/> | |||
<FILE id="IhUUL3" name="jucer_ProjectExporter.cpp" compile="1" resource="0" | |||
file="Source/Project Saving/jucer_ProjectExporter.cpp"/> | |||
<FILE id="DDuG44" name="jucer_ProjectExporter.h" compile="0" resource="0" | |||
file="Source/Project Saving/jucer_ProjectExporter.h"/> | |||
<FILE id="ASAH0z" name="jucer_ProjectSaver.h" compile="0" resource="0" | |||
file="Source/Project Saving/jucer_ProjectSaver.h"/> | |||
<FILE id="EEyV81" name="jucer_ResourceFile.cpp" compile="1" resource="0" | |||
file="Source/Project Saving/jucer_ResourceFile.cpp"/> | |||
<FILE id="dCnNH" name="jucer_ResourceFile.h" compile="0" resource="0" | |||
file="Source/Project Saving/jucer_ResourceFile.h"/> | |||
</GROUP> | |||
<GROUP id="Ga8fLmv" name="Utility"> | |||
<FILE id="mceJWJc" name="jucer_CodeHelpers.cpp" compile="1" resource="0" | |||
file="Source/Utility/jucer_CodeHelpers.cpp"/> | |||
@@ -153,6 +183,12 @@ | |||
<FILE id="lZ9s99o" name="jucer_ValueSourceHelpers.h" compile="0" resource="0" | |||
file="Source/Utility/jucer_ValueSourceHelpers.h"/> | |||
</GROUP> | |||
<GROUP id="i1s14uV" name="Code Editor"> | |||
<FILE id="36CkPUf" name="jucer_SourceCodeEditor.cpp" compile="1" resource="0" | |||
file="Source/Code Editor/jucer_SourceCodeEditor.cpp"/> | |||
<FILE id="CygyGGA" name="jucer_SourceCodeEditor.h" compile="0" resource="0" | |||
file="Source/Code Editor/jucer_SourceCodeEditor.h"/> | |||
</GROUP> | |||
<GROUP id="KPIRFfz" name="BinaryData"> | |||
<FILE id="RSJcrRl" name="AudioPluginXCodeScript.txt" compile="0" resource="1" | |||
file="Source/BinaryData/AudioPluginXCodeScript.txt"/> | |||
@@ -183,13 +219,18 @@ | |||
</MAINGROUP> | |||
<JUCEOPTIONS JUCE_ASIO="disabled" JUCE_WASAPI="disabled" JUCE_DIRECTSOUND="disabled" | |||
JUCE_ALSA="disabled" JUCE_QUICKTIME="disabled" JUCE_OPENGL="disabled" | |||
JUCE_USE_FLAC="disabled" JUCE_USE_OGGBVORBIS="2" JUCE_USE_CDBURNER="disabled" | |||
JUCE_USE_CDREADER="disabled" JUCE_USE_CAMERA="disabled" JUCE_PLUGINHOST_VST="disabled" | |||
JUCE_PLUGINHOST_AU="disabled" JUCE_USE_OGGVORBIS="disabled" JUCE_FORCE_DEBUG="default" | |||
JUCE_LOG_ASSERTIONS="default" JUCE_ENABLE_REPAINT_DEBUGGING="default" | |||
JUCE_USE_XINERAMA="default" JUCE_USE_XSHM="default" JUCE_ONLY_BUILD_CORE_LIBRARY="default" | |||
JUCE_WEB_BROWSER="default" JUCE_SUPPORT_CARBON="default" JUCE_CHECK_MEMORY_LEAKS="default" | |||
JUCE_CATCH_UNHANDLED_EXCEPTIONS="default" JUCE_STRINGS_ARE_UNICODE="default" | |||
JUCE_USE_XRENDER="default" JUCE_USE_XCURSOR="default" JUCE_DIRECT2D="default" | |||
JUCE_DIRECTSHOW="default" JUCE_MEDIAFOUNDATION="default"/> | |||
JUCE_USE_FLAC="disabled" JUCE_USE_CDBURNER="disabled" JUCE_USE_CDREADER="disabled" | |||
JUCE_USE_CAMERA="disabled" JUCE_PLUGINHOST_VST="disabled" JUCE_PLUGINHOST_AU="disabled" | |||
JUCE_USE_OGGVORBIS="disabled" JUCE_USE_COREIMAGE_LOADER="disabled"/> | |||
<MODULES> | |||
<MODULE id="juce_core" showAllCode="1"/> | |||
<MODULE id="juce_events" showAllCode="1"/> | |||
<MODULE id="juce_graphics" showAllCode="1"/> | |||
<MODULE id="juce_gui" showAllCode="1"/> | |||
<MODULE id="juce_data_structures" showAllCode="1"/> | |||
<MODULE id="juce_cryptography" showAllCode="1"/> | |||
<MODULE id="juce_audio" showAllCode="1"/> | |||
<MODULE id="juce_gui_basics" showAllCode="1"/> | |||
<MODULE id="juce_gui_extra" showAllCode="1"/> | |||
</MODULES> | |||
</JUCERPROJECT> |
@@ -3,39 +3,80 @@ | |||
IMPORTANT! This file is auto-generated each time you save your | |||
project - if you alter its contents, your changes may be overwritten! | |||
If you want to change any of these values, use the Introjucer to do so, rather than | |||
editing this file directly! | |||
If you want to change any of these values, use the Introjucer to do so, | |||
rather than editing this file directly! | |||
Any commented-out settings will fall back to using the default values that | |||
they are given in juce_Config.h | |||
Any commented-out settings will assume their default values. | |||
*/ | |||
//#define JUCE_FORCE_DEBUG | |||
//#define JUCE_LOG_ASSERTIONS | |||
#define JUCE_ASIO 0 | |||
#define JUCE_WASAPI 0 | |||
#define JUCE_DIRECTSOUND 0 | |||
//#define JUCE_DIRECTSHOW | |||
//#define JUCE_MEDIAFOUNDATION | |||
#define JUCE_ALSA 0 | |||
#define JUCE_QUICKTIME 0 | |||
#define JUCE_OPENGL 0 | |||
//#define JUCE_DIRECT2D | |||
#define JUCE_USE_FLAC 0 | |||
#define JUCE_USE_OGGVORBIS 0 | |||
#define JUCE_USE_CDBURNER 0 | |||
#define JUCE_USE_CDREADER 0 | |||
#define JUCE_USE_CAMERA 0 | |||
//#define JUCE_ENABLE_REPAINT_DEBUGGING | |||
//#define JUCE_USE_XINERAMA | |||
//#define JUCE_USE_XSHM | |||
//#define JUCE_USE_XRENDER | |||
//#define JUCE_USE_XCURSOR | |||
#define JUCE_PLUGINHOST_VST 0 | |||
#define JUCE_PLUGINHOST_AU 0 | |||
//#define JUCE_ONLY_BUILD_CORE_LIBRARY | |||
//#define JUCE_WEB_BROWSER | |||
//#define JUCE_SUPPORT_CARBON | |||
//#define JUCE_CHECK_MEMORY_LEAKS | |||
//#define JUCE_CATCH_UNHANDLED_EXCEPTIONS | |||
#ifndef __JUCE_APPCONFIG_M70QFTRRK__ | |||
#define __JUCE_APPCONFIG_M70QFTRRK__ | |||
//============================================================================== | |||
#define JUCE_MODULE_AVAILABLE_juce_core 1 | |||
#define JUCE_MODULE_AVAILABLE_juce_cryptography 1 | |||
#define JUCE_MODULE_AVAILABLE_juce_data_structures 1 | |||
#define JUCE_MODULE_AVAILABLE_juce_events 1 | |||
#define JUCE_MODULE_AVAILABLE_juce_graphics 1 | |||
#define JUCE_MODULE_AVAILABLE_juce_gui_basics 1 | |||
#define JUCE_MODULE_AVAILABLE_juce_gui_extra 1 | |||
//============================================================================== | |||
// juce_core flags: | |||
#ifndef JUCE_FORCE_DEBUG | |||
//#define JUCE_FORCE_DEBUG | |||
#endif | |||
#ifndef JUCE_LOG_ASSERTIONS | |||
//#define JUCE_LOG_ASSERTIONS | |||
#endif | |||
#ifndef JUCE_CHECK_MEMORY_LEAKS | |||
//#define JUCE_CHECK_MEMORY_LEAKS | |||
#endif | |||
#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES | |||
//#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES | |||
#endif | |||
//============================================================================== | |||
// juce_graphics flags: | |||
#ifndef JUCE_USE_COREIMAGE_LOADER | |||
#define JUCE_USE_COREIMAGE_LOADER 0 | |||
#endif | |||
#ifndef JUCE_USE_DIRECTWRITE | |||
//#define JUCE_USE_DIRECTWRITE | |||
#endif | |||
//============================================================================== | |||
// juce_gui_basics flags: | |||
#ifndef JUCE_ENABLE_REPAINT_DEBUGGING | |||
//#define JUCE_ENABLE_REPAINT_DEBUGGING | |||
#endif | |||
#ifndef JUCE_USE_XSHM | |||
//#define JUCE_USE_XSHM | |||
#endif | |||
#ifndef JUCE_USE_XRENDER | |||
//#define JUCE_USE_XRENDER | |||
#endif | |||
#ifndef JUCE_USE_XCURSOR | |||
//#define JUCE_USE_XCURSOR | |||
#endif | |||
//============================================================================== | |||
// juce_gui_extra flags: | |||
#ifndef JUCE_WEB_BROWSER | |||
//#define JUCE_WEB_BROWSER | |||
#endif | |||
#endif // __JUCE_APPCONFIG_M70QFTRRK__ |
@@ -5,38 +5,8 @@ | |||
*/ | |||
#include "BinaryData.h" | |||
const char* BinaryData::getNamedResource (const char* resourceNameUTF8, int& numBytes) throw() | |||
namespace BinaryData | |||
{ | |||
int hash = 0; | |||
if (resourceNameUTF8 != 0) | |||
while (*resourceNameUTF8 != 0) | |||
hash = 31 * hash + *resourceNameUTF8++; | |||
switch (hash) | |||
{ | |||
case 0x44be9398: numBytes = BinaryData::AudioPluginXCodeScript_txtSize; return BinaryData::AudioPluginXCodeScript_txt; | |||
case 0x950fd7dd: numBytes = BinaryData::brushed_aluminium_pngSize; return BinaryData::brushed_aluminium_png; | |||
case 0x27c5a93a: numBytes = BinaryData::jucer_AudioPluginEditorTemplate_cppSize; return BinaryData::jucer_AudioPluginEditorTemplate_cpp; | |||
case 0x4d0721bf: numBytes = BinaryData::jucer_AudioPluginEditorTemplate_hSize; return BinaryData::jucer_AudioPluginEditorTemplate_h; | |||
case 0x51b49ac5: numBytes = BinaryData::jucer_AudioPluginFilterTemplate_cppSize; return BinaryData::jucer_AudioPluginFilterTemplate_cpp; | |||
case 0x488afa0a: numBytes = BinaryData::jucer_AudioPluginFilterTemplate_hSize; return BinaryData::jucer_AudioPluginFilterTemplate_h; | |||
case 0x8905395b: numBytes = BinaryData::jucer_MainConsoleAppTemplate_cppSize; return BinaryData::jucer_MainConsoleAppTemplate_cpp; | |||
case 0x7a0186b1: numBytes = BinaryData::jucer_MainTemplate_cppSize; return BinaryData::jucer_MainTemplate_cpp; | |||
case 0x02a2a077: numBytes = BinaryData::jucer_NewCppFileTemplate_cppSize; return BinaryData::jucer_NewCppFileTemplate_cpp; | |||
case 0x0842c43c: numBytes = BinaryData::jucer_NewCppFileTemplate_hSize; return BinaryData::jucer_NewCppFileTemplate_h; | |||
case 0x3f052be8: numBytes = BinaryData::jucer_WindowTemplate_cppSize; return BinaryData::jucer_WindowTemplate_cpp; | |||
case 0xb20377ed: numBytes = BinaryData::jucer_WindowTemplate_hSize; return BinaryData::jucer_WindowTemplate_h; | |||
case 0x154a7275: numBytes = BinaryData::juce_icon_pngSize; return BinaryData::juce_icon_png; | |||
default: break; | |||
} | |||
numBytes = 0; | |||
return 0; | |||
} | |||
//================== AudioPluginXCodeScript.txt ================== | |||
static const unsigned char temp_43731c40[] = | |||
@@ -85,7 +55,7 @@ static const unsigned char temp_43731c40[] = | |||
" cp -r \"$original\" \"$RTAS\"\r\n" | |||
"fi\r\n"; | |||
const char* BinaryData::AudioPluginXCodeScript_txt = (const char*) temp_43731c40; | |||
const char* AudioPluginXCodeScript_txt = (const char*) temp_43731c40; | |||
//================== brushed_aluminium.png ================== | |||
static const unsigned char temp_9aa09877[] = | |||
@@ -297,14 +267,14 @@ static const unsigned char temp_9aa09877[] = | |||
141,20,180,27,72,224,103,149,105,220,112,255,4,89,131,64,4,23,42,115,215,231,245,156,43,234,151,42,11,138,116,121,82,135,79,3,255,178,101,152,75,177,57,53,232,244,11,46,246,251,67,98,174,121,193,110,222,30,8,28,132,216,112,88,219,73,10,62,169,115,60, | |||
233,137,16,177,58,98,69,178,95,87,93,157,5,174,93,143,182,244,186,210,167,70,131,11,5,88,2,12,0,52,103,80,26,178,200,170,15,0,0,0,0,73,69,78,68,174,66,96,130,0,0 }; | |||
const char* BinaryData::brushed_aluminium_png = (const char*) temp_9aa09877; | |||
const char* brushed_aluminium_png = (const char*) temp_9aa09877; | |||
//================== jucer_AudioPluginEditorTemplate.cpp ================== | |||
static const unsigned char temp_6eda5614[] = | |||
"/*\r\n" | |||
" ==============================================================================\r\n" | |||
"\r\n" | |||
" This file was auto-generated by the Jucer!\r\n" | |||
" This file was auto-generated by the Introjucer!\r\n" | |||
"\r\n" | |||
" It contains the basic startup code for a Juce application.\r\n" | |||
"\r\n" | |||
@@ -337,14 +307,14 @@ static const unsigned char temp_6eda5614[] = | |||
" Justification::centred, 1);\r\n" | |||
"}\r\n"; | |||
const char* BinaryData::jucer_AudioPluginEditorTemplate_cpp = (const char*) temp_6eda5614; | |||
const char* jucer_AudioPluginEditorTemplate_cpp = (const char*) temp_6eda5614; | |||
//================== jucer_AudioPluginEditorTemplate.h ================== | |||
static const unsigned char temp_67353d19[] = | |||
"/*\r\n" | |||
" ==============================================================================\r\n" | |||
"\r\n" | |||
" This file was auto-generated by the Jucer!\r\n" | |||
" This file was auto-generated by the Introjucer!\r\n" | |||
"\r\n" | |||
" It contains the basic startup code for a Juce application.\r\n" | |||
"\r\n" | |||
@@ -374,14 +344,14 @@ static const unsigned char temp_67353d19[] = | |||
"\r\n" | |||
"#endif // HEADERGUARD\r\n"; | |||
const char* BinaryData::jucer_AudioPluginEditorTemplate_h = (const char*) temp_67353d19; | |||
const char* jucer_AudioPluginEditorTemplate_h = (const char*) temp_67353d19; | |||
//================== jucer_AudioPluginFilterTemplate.cpp ================== | |||
static const unsigned char temp_98c9479f[] = | |||
"/*\r\n" | |||
" ==============================================================================\r\n" | |||
"\r\n" | |||
" This file was auto-generated by the Jucer!\r\n" | |||
" This file was auto-generated!\r\n" | |||
"\r\n" | |||
" It contains the basic startup code for a Juce application.\r\n" | |||
"\r\n" | |||
@@ -556,14 +526,14 @@ static const unsigned char temp_98c9479f[] = | |||
" return new FILTERCLASSNAME();\r\n" | |||
"}\r\n"; | |||
const char* BinaryData::jucer_AudioPluginFilterTemplate_cpp = (const char*) temp_98c9479f; | |||
const char* jucer_AudioPluginFilterTemplate_cpp = (const char*) temp_98c9479f; | |||
//================== jucer_AudioPluginFilterTemplate.h ================== | |||
static const unsigned char temp_62b91564[] = | |||
"/*\r\n" | |||
" ==============================================================================\r\n" | |||
"\r\n" | |||
" This file was auto-generated by the Jucer!\r\n" | |||
" This file was auto-generated!\r\n" | |||
"\r\n" | |||
" It contains the basic startup code for a Juce application.\r\n" | |||
"\r\n" | |||
@@ -633,14 +603,14 @@ static const unsigned char temp_62b91564[] = | |||
"\r\n" | |||
"#endif // HEADERGUARD\r\n"; | |||
const char* BinaryData::jucer_AudioPluginFilterTemplate_h = (const char*) temp_62b91564; | |||
const char* jucer_AudioPluginFilterTemplate_h = (const char*) temp_62b91564; | |||
//================== jucer_MainConsoleAppTemplate.cpp ================== | |||
static const unsigned char temp_794304c3[] = | |||
"/*\r\n" | |||
" ==============================================================================\r\n" | |||
"\r\n" | |||
" This file was auto-generated by the Jucer!\r\n" | |||
" This file was auto-generated!\r\n" | |||
"\r\n" | |||
" It contains the basic startup code for a Juce application.\r\n" | |||
"\r\n" | |||
@@ -660,14 +630,14 @@ static const unsigned char temp_794304c3[] = | |||
" return 0;\r\n" | |||
"}\r\n"; | |||
const char* BinaryData::jucer_MainConsoleAppTemplate_cpp = (const char*) temp_794304c3; | |||
const char* jucer_MainConsoleAppTemplate_cpp = (const char*) temp_794304c3; | |||
//================== jucer_MainTemplate.cpp ================== | |||
static const unsigned char temp_292512d9[] = | |||
"/*\r\n" | |||
" ==============================================================================\r\n" | |||
"\r\n" | |||
" This file was auto-generated by the Jucer!\r\n" | |||
" This file was auto-generated by the Introjucer!\r\n" | |||
"\r\n" | |||
" It contains the basic startup code for a Juce application.\r\n" | |||
"\r\n" | |||
@@ -738,7 +708,7 @@ static const unsigned char temp_292512d9[] = | |||
"// This macro generates the main() routine that starts the app.\r\n" | |||
"START_JUCE_APPLICATION(APPCLASSNAME)\r\n"; | |||
const char* BinaryData::jucer_MainTemplate_cpp = (const char*) temp_292512d9; | |||
const char* jucer_MainTemplate_cpp = (const char*) temp_292512d9; | |||
//================== jucer_NewCppFileTemplate.cpp ================== | |||
static const unsigned char temp_79decf5f[] = | |||
@@ -753,7 +723,7 @@ static const unsigned char temp_79decf5f[] = | |||
"*/\r\n" | |||
"\r\n"; | |||
const char* BinaryData::jucer_NewCppFileTemplate_cpp = (const char*) temp_79decf5f; | |||
const char* jucer_NewCppFileTemplate_cpp = (const char*) temp_79decf5f; | |||
//================== jucer_NewCppFileTemplate.h ================== | |||
static const unsigned char temp_70d8d24[] = | |||
@@ -776,14 +746,14 @@ static const unsigned char temp_70d8d24[] = | |||
"\r\n" | |||
"#endif // HEADERGUARD\r\n"; | |||
const char* BinaryData::jucer_NewCppFileTemplate_h = (const char*) temp_70d8d24; | |||
const char* jucer_NewCppFileTemplate_h = (const char*) temp_70d8d24; | |||
//================== jucer_WindowTemplate.cpp ================== | |||
static const unsigned char temp_6fd7e50[] = | |||
"/*\r\n" | |||
" ==============================================================================\r\n" | |||
"\r\n" | |||
" This file was auto-generated by the Jucer!\r\n" | |||
" This file was auto-generated!\r\n" | |||
"\r\n" | |||
" It contains the basic outline for a simple desktop window.\r\n" | |||
"\r\n" | |||
@@ -812,14 +782,14 @@ static const unsigned char temp_6fd7e50[] = | |||
" JUCEApplication::getInstance()->systemRequestedQuit();\r\n" | |||
"}\r\n"; | |||
const char* BinaryData::jucer_WindowTemplate_cpp = (const char*) temp_6fd7e50; | |||
const char* jucer_WindowTemplate_cpp = (const char*) temp_6fd7e50; | |||
//================== jucer_WindowTemplate.h ================== | |||
static const unsigned char temp_613d4455[] = | |||
"/*\r\n" | |||
" ==============================================================================\r\n" | |||
"\r\n" | |||
" This file was auto-generated by the Jucer!\r\n" | |||
" This file was auto-generated!\r\n" | |||
"\r\n" | |||
" It contains the basic outline for a simple desktop window.\r\n" | |||
"\r\n" | |||
@@ -858,7 +828,7 @@ static const unsigned char temp_613d4455[] = | |||
"\r\n" | |||
"#endif // HEADERGUARD\r\n"; | |||
const char* BinaryData::jucer_WindowTemplate_h = (const char*) temp_613d4455; | |||
const char* jucer_WindowTemplate_h = (const char*) temp_613d4455; | |||
//================== juce_icon.png ================== | |||
static const unsigned char temp_ee6f0c0f[] = | |||
@@ -1139,4 +1109,49 @@ static const unsigned char temp_ee6f0c0f[] = | |||
169,9,0,87,15,129,129,1,247,197,140,255,7,123,160,2,4,208,80,74,0,184,18,2,250,200,222,95,34,70,253,24,73,176,3,215,216,5,190,132,57,100,0,64,0,13,197,4,64,76,201,64,40,146,73,77,0,164,202,15,25,0,16,96,0,155,121,235,71,10,157,3,42,0,0,0,0,73,69,78,68, | |||
174,66,96,130,0,0 }; | |||
const char* BinaryData::juce_icon_png = (const char*) temp_ee6f0c0f; | |||
const char* juce_icon_png = (const char*) temp_ee6f0c0f; | |||
const char* getNamedResource (const char* resourceNameUTF8, int& numBytes) throw() | |||
{ | |||
int hash = 0; | |||
if (resourceNameUTF8 != 0) | |||
while (*resourceNameUTF8 != 0) | |||
hash = 31 * hash + *resourceNameUTF8++; | |||
switch (hash) | |||
{ | |||
case 0x44be9398: | |||
case 0x2981a553: numBytes = 1449; return AudioPluginXCodeScript_txt; | |||
case 0x950fd7dd: | |||
case 0xa6cfe0e2: numBytes = 14724; return brushed_aluminium_png; | |||
case 0x27c5a93a: | |||
case 0xb6575890: numBytes = 1008; return jucer_AudioPluginEditorTemplate_cpp; | |||
case 0x4d0721bf: | |||
case 0xc244271a: numBytes = 799; return jucer_AudioPluginEditorTemplate_h; | |||
case 0x51b49ac5: | |||
case 0xc68aa4a1: numBytes = 4455; return jucer_AudioPluginFilterTemplate_cpp; | |||
case 0x488afa0a: | |||
case 0x99c7f951: numBytes = 2400; return jucer_AudioPluginFilterTemplate_h; | |||
case 0x8905395b: | |||
case 0x84a71cc0: numBytes = 470; return jucer_MainConsoleAppTemplate_cpp; | |||
case 0x7a0186b1: | |||
case 0x73760f7c: numBytes = 1825; return jucer_MainTemplate_cpp; | |||
case 0x02a2a077: | |||
case 0x9a5d0862: numBytes = 232; return jucer_NewCppFileTemplate_cpp; | |||
case 0x0842c43c: | |||
case 0xfbfcda3c: numBytes = 308; return jucer_NewCppFileTemplate_h; | |||
case 0x3f052be8: | |||
case 0xb905d1ba: numBytes = 781; return jucer_WindowTemplate_cpp; | |||
case 0xb20377ed: | |||
case 0x959d5d38: numBytes = 1216; return jucer_WindowTemplate_h; | |||
case 0x154a7275: | |||
case 0xcd05ca61: numBytes = 19826; return juce_icon_png; | |||
default: break; | |||
} | |||
numBytes = 0; | |||
return 0; | |||
} | |||
} |
@@ -14,22 +14,22 @@ namespace BinaryData | |||
const int brushed_aluminium_pngSize = 14724; | |||
extern const char* jucer_AudioPluginEditorTemplate_cpp; | |||
const int jucer_AudioPluginEditorTemplate_cppSize = 1003; | |||
const int jucer_AudioPluginEditorTemplate_cppSize = 1008; | |||
extern const char* jucer_AudioPluginEditorTemplate_h; | |||
const int jucer_AudioPluginEditorTemplate_hSize = 794; | |||
const int jucer_AudioPluginEditorTemplate_hSize = 799; | |||
extern const char* jucer_AudioPluginFilterTemplate_cpp; | |||
const int jucer_AudioPluginFilterTemplate_cppSize = 4468; | |||
const int jucer_AudioPluginFilterTemplate_cppSize = 4455; | |||
extern const char* jucer_AudioPluginFilterTemplate_h; | |||
const int jucer_AudioPluginFilterTemplate_hSize = 2413; | |||
const int jucer_AudioPluginFilterTemplate_hSize = 2400; | |||
extern const char* jucer_MainConsoleAppTemplate_cpp; | |||
const int jucer_MainConsoleAppTemplate_cppSize = 483; | |||
const int jucer_MainConsoleAppTemplate_cppSize = 470; | |||
extern const char* jucer_MainTemplate_cpp; | |||
const int jucer_MainTemplate_cppSize = 1820; | |||
const int jucer_MainTemplate_cppSize = 1825; | |||
extern const char* jucer_NewCppFileTemplate_cpp; | |||
const int jucer_NewCppFileTemplate_cppSize = 232; | |||
@@ -38,10 +38,10 @@ namespace BinaryData | |||
const int jucer_NewCppFileTemplate_hSize = 308; | |||
extern const char* jucer_WindowTemplate_cpp; | |||
const int jucer_WindowTemplate_cppSize = 794; | |||
const int jucer_WindowTemplate_cppSize = 781; | |||
extern const char* jucer_WindowTemplate_h; | |||
const int jucer_WindowTemplate_hSize = 1229; | |||
const int jucer_WindowTemplate_hSize = 1216; | |||
extern const char* juce_icon_png; | |||
const int juce_icon_pngSize = 19826; | |||
@@ -49,4 +49,25 @@ namespace BinaryData | |||
// If you provide the name of one of the binary resource variables above, this function will | |||
// return the corresponding data and its size (or a null pointer if the name isn't found). | |||
const char* getNamedResource (const char* resourceNameUTF8, int& dataSizeInBytes) throw(); | |||
//============================================================================== | |||
// This class acts as an ImageProvider that will access the BinaryData images | |||
class ImageProvider : public juce::ComponentBuilder::ImageProvider | |||
{ | |||
public: | |||
ImageProvider() noexcept {} | |||
juce::Image getImageForIdentifier (const juce::var& imageIdentifier) | |||
{ | |||
int dataSize = 0; | |||
const char* const data = getNamedResource (imageIdentifier.toString().toUTF8(), dataSize); | |||
if (data != nullptr) | |||
return juce::ImageCache::getFromMemory (data, dataSize); | |||
return juce::Image(); | |||
} | |||
juce::var getIdentifierForImage (const juce::Image&) { return juce::var(); } | |||
}; | |||
} |
@@ -4,8 +4,8 @@ | |||
project - if you alter its contents, your changes may be overwritten! | |||
This is the header file that your files should include in order to get all the | |||
Juce library headers. You should NOT include juce.h or juce_amalgamated.h directly in | |||
your own source files, because that wouldn't pick up the correct Juce configuration | |||
JUCE library headers. You should avoid including the JUCE headers directly in | |||
your own source files, because that wouldn't pick up the correct configuration | |||
options for your app. | |||
*/ | |||
@@ -14,9 +14,21 @@ | |||
#define __APPHEADERFILE_M70QFTRRK__ | |||
#include "AppConfig.h" | |||
#include "../../../juce_amalgamated.h" | |||
#include "modules/juce_core/juce_core.h" | |||
#include "modules/juce_cryptography/juce_cryptography.h" | |||
#include "modules/juce_data_structures/juce_data_structures.h" | |||
#include "modules/juce_events/juce_events.h" | |||
#include "modules/juce_graphics/juce_graphics.h" | |||
#include "modules/juce_gui_basics/juce_gui_basics.h" | |||
#include "modules/juce_gui_extra/juce_gui_extra.h" | |||
#include "BinaryData.h" | |||
#if ! DONT_SET_USING_JUCE_NAMESPACE | |||
// If your code uses a lot of JUCE classes, then this will obviously save you | |||
// a lot of typing, but can be disabled by setting DONT_SET_USING_JUCE_NAMESPACE. | |||
using namespace juce; | |||
#endif | |||
namespace ProjectInfo | |||
{ | |||
const char* const projectName = "The Introjucer"; | |||
@@ -1,15 +0,0 @@ | |||
/* | |||
IMPORTANT! This file is auto-generated each time you save your | |||
project - if you alter its contents, your changes may be overwritten! | |||
This file pulls in all the Juce source code, and builds it using the settings | |||
defined in AppConfig.h. | |||
If you want to change the method by which Juce is linked into your app, use the | |||
Jucer to change it, rather than trying to edit this file directly. | |||
*/ | |||
#include "AppConfig.h" | |||
#include "../../../amalgamation/juce_amalgamated1.cpp" |
@@ -1,15 +0,0 @@ | |||
/* | |||
IMPORTANT! This file is auto-generated each time you save your | |||
project - if you alter its contents, your changes may be overwritten! | |||
This file pulls in all the Juce source code, and builds it using the settings | |||
defined in AppConfig.h. | |||
If you want to change the method by which Juce is linked into your app, use the | |||
Jucer to change it, rather than trying to edit this file directly. | |||
*/ | |||
#include "AppConfig.h" | |||
#include "../../../amalgamation/juce_amalgamated1.cpp" |
@@ -1,15 +0,0 @@ | |||
/* | |||
IMPORTANT! This file is auto-generated each time you save your | |||
project - if you alter its contents, your changes may be overwritten! | |||
This file pulls in all the Juce source code, and builds it using the settings | |||
defined in AppConfig.h. | |||
If you want to change the method by which Juce is linked into your app, use the | |||
Jucer to change it, rather than trying to edit this file directly. | |||
*/ | |||
#include "AppConfig.h" | |||
#include "../../../amalgamation/juce_amalgamated2.cpp" |
@@ -1,15 +0,0 @@ | |||
/* | |||
IMPORTANT! This file is auto-generated each time you save your | |||
project - if you alter its contents, your changes may be overwritten! | |||
This file pulls in all the Juce source code, and builds it using the settings | |||
defined in AppConfig.h. | |||
If you want to change the method by which Juce is linked into your app, use the | |||
Jucer to change it, rather than trying to edit this file directly. | |||
*/ | |||
#include "AppConfig.h" | |||
#include "../../../amalgamation/juce_amalgamated2.cpp" |
@@ -1,15 +0,0 @@ | |||
/* | |||
IMPORTANT! This file is auto-generated each time you save your | |||
project - if you alter its contents, your changes may be overwritten! | |||
This file pulls in all the Juce source code, and builds it using the settings | |||
defined in AppConfig.h. | |||
If you want to change the method by which Juce is linked into your app, use the | |||
Jucer to change it, rather than trying to edit this file directly. | |||
*/ | |||
#include "AppConfig.h" | |||
#include "../../../amalgamation/juce_amalgamated3.cpp" |
@@ -1,15 +0,0 @@ | |||
/* | |||
IMPORTANT! This file is auto-generated each time you save your | |||
project - if you alter its contents, your changes may be overwritten! | |||
This file pulls in all the Juce source code, and builds it using the settings | |||
defined in AppConfig.h. | |||
If you want to change the method by which Juce is linked into your app, use the | |||
Jucer to change it, rather than trying to edit this file directly. | |||
*/ | |||
#include "AppConfig.h" | |||
#include "../../../amalgamation/juce_amalgamated3.cpp" |
@@ -1,15 +0,0 @@ | |||
/* | |||
IMPORTANT! This file is auto-generated each time you save your | |||
project - if you alter its contents, your changes may be overwritten! | |||
This file pulls in all the Juce source code, and builds it using the settings | |||
defined in AppConfig.h. | |||
If you want to change the method by which Juce is linked into your app, use the | |||
Jucer to change it, rather than trying to edit this file directly. | |||
*/ | |||
#include "AppConfig.h" | |||
#include "../../../amalgamation/juce_amalgamated4.cpp" |
@@ -1,15 +0,0 @@ | |||
/* | |||
IMPORTANT! This file is auto-generated each time you save your | |||
project - if you alter its contents, your changes may be overwritten! | |||
This file pulls in all the Juce source code, and builds it using the settings | |||
defined in AppConfig.h. | |||
If you want to change the method by which Juce is linked into your app, use the | |||
Jucer to change it, rather than trying to edit this file directly. | |||
*/ | |||
#include "AppConfig.h" | |||
#include "../../../amalgamation/juce_amalgamated4.cpp" |
@@ -0,0 +1,12 @@ | |||
Important Note!! | |||
================ | |||
The purpose of this folder is to contain files that are auto-generated by the Introjucer, | |||
and ALL files in this folder will be mercilessly DELETED and completely re-written whenever | |||
the Introjucer saves your project. | |||
Therefore, it's a bad idea to make any manual changes to the files in here, or to | |||
put any of your own files in here if you don't want to lose them. (Of course you may choose | |||
to add the folder's contents to your version-control system so that you can re-merge your own | |||
modifications after the Introjucer has saved its changes). |
@@ -0,0 +1,5 @@ | |||
// This is an auto-generated file to redirect any included | |||
// module headers to the correct external folder. | |||
#include "../../../../../modules/juce_core/juce_core.h" | |||
@@ -0,0 +1,5 @@ | |||
// This is an auto-generated file to redirect any included | |||
// module headers to the correct external folder. | |||
#include "../../../../../modules/juce_cryptography/juce_cryptography.h" | |||
@@ -0,0 +1,5 @@ | |||
// This is an auto-generated file to redirect any included | |||
// module headers to the correct external folder. | |||
#include "../../../../../modules/juce_data_structures/juce_data_structures.h" | |||
@@ -0,0 +1,5 @@ | |||
// This is an auto-generated file to redirect any included | |||
// module headers to the correct external folder. | |||
#include "../../../../../modules/juce_events/juce_events.h" | |||
@@ -0,0 +1,5 @@ | |||
// This is an auto-generated file to redirect any included | |||
// module headers to the correct external folder. | |||
#include "../../../../../modules/juce_graphics/juce_graphics.h" | |||
@@ -0,0 +1,5 @@ | |||
// This is an auto-generated file to redirect any included | |||
// module headers to the correct external folder. | |||
#include "../../../../../modules/juce_gui_basics/juce_gui_basics.h" | |||
@@ -0,0 +1,5 @@ | |||
// This is an auto-generated file to redirect any included | |||
// module headers to the correct external folder. | |||
#include "../../../../../modules/juce_gui_extra/juce_gui_extra.h" | |||
@@ -2,7 +2,7 @@ | |||
============================================================================== | |||
This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
Copyright 2004-10 by Raw Material Software Ltd. | |||
Copyright 2004-11 by Raw Material Software Ltd. | |||
------------------------------------------------------------------------------ | |||
@@ -23,13 +23,13 @@ | |||
============================================================================== | |||
*/ | |||
#ifndef __JUCER_APPLICATION_H_6595C2A8__ | |||
#define __JUCER_APPLICATION_H_6595C2A8__ | |||
#ifndef __JUCER_APPLICATION_JUCEHEADER__ | |||
#define __JUCER_APPLICATION_JUCEHEADER__ | |||
#include "../jucer_Headers.h" | |||
#include "jucer_MainWindow.h" | |||
#include "jucer_JuceUpdater.h" | |||
#include "../Project/jucer_NewProjectWizard.h" | |||
#include "jucer_CommandLine.h" | |||
//============================================================================== | |||
@@ -37,21 +37,22 @@ class JucerApplication : public JUCEApplication | |||
{ | |||
public: | |||
//============================================================================== | |||
JucerApplication() {} | |||
JucerApplication() {} | |||
~JucerApplication() {} | |||
//============================================================================== | |||
void initialise (const String& commandLine) | |||
{ | |||
/* Running a command-line of the form "Jucer --resave foobar.jucer" will try to load that | |||
jucer file and re-export all of its projects. | |||
*/ | |||
if (commandLine.startsWithIgnoreCase ("-resave ") || commandLine.startsWithIgnoreCase ("--resave ")) | |||
if (commandLine.isNotEmpty()) | |||
{ | |||
Project::resaveJucerFile (File::getCurrentWorkingDirectory() | |||
.getChildFile (commandLine.fromFirstOccurrenceOf (" ", false, false).unquoted())); | |||
quit(); | |||
return; | |||
const int appReturnCode = performCommandLine (commandLine); | |||
if (appReturnCode != commandLineNotPerformed) | |||
{ | |||
setApplicationReturnValue (appReturnCode); | |||
quit(); | |||
return; | |||
} | |||
} | |||
commandManager = new ApplicationCommandManager(); | |||
@@ -75,31 +76,39 @@ public: | |||
openFile (projects.getReference(i)); | |||
} | |||
makeSureUserHasSelectedModuleFolder(); | |||
if (mainWindows.size() == 0) | |||
createNewMainWindow()->makeVisible(); | |||
#if JUCE_MAC | |||
#if JUCE_MAC | |||
MenuBarModel::setMacMainMenu (menuModel); | |||
#endif | |||
#endif | |||
} | |||
void shutdown() | |||
{ | |||
#if JUCE_MAC | |||
#if JUCE_MAC | |||
MenuBarModel::setMacMainMenu (nullptr); | |||
#endif | |||
#endif | |||
menuModel = nullptr; | |||
StoredSettings::deleteInstance(); | |||
mainWindows.clear(); | |||
OpenDocumentManager::deleteInstance(); | |||
deleteAndZero (commandManager); | |||
commandManager = nullptr; | |||
} | |||
//============================================================================== | |||
void systemRequestedQuit() | |||
{ | |||
if (cancelAnyModalComponents()) | |||
{ | |||
new AsyncQuitRetrier(); | |||
return; | |||
} | |||
while (mainWindows.size() > 0) | |||
{ | |||
if (! mainWindows[0]->closeCurrentProject()) | |||
@@ -116,10 +125,10 @@ public: | |||
jassert (mainWindows.contains (w)); | |||
mainWindows.removeObject (w); | |||
#if ! JUCE_MAC | |||
#if ! JUCE_MAC | |||
if (mainWindows.size() == 0) | |||
systemRequestedQuit(); | |||
#endif | |||
#endif | |||
updateRecentProjectList(); | |||
} | |||
@@ -137,11 +146,11 @@ public: | |||
bool moreThanOneInstanceAllowed() | |||
{ | |||
#ifndef JUCE_LINUX | |||
#ifndef JUCE_LINUX | |||
return false; | |||
#else | |||
#else | |||
return true; //xxx should be false but doesn't work on linux.. | |||
#endif | |||
#endif | |||
} | |||
void anotherInstanceStarted (const String& commandLine) | |||
@@ -151,6 +160,11 @@ public: | |||
virtual void doExtraInitialisation() {} | |||
static JucerApplication* getApp() | |||
{ | |||
return dynamic_cast<JucerApplication*> (JUCEApplication::getInstance()); | |||
} | |||
//============================================================================== | |||
class MainMenuModel : public MenuBarModel | |||
{ | |||
@@ -162,11 +176,11 @@ public: | |||
const StringArray getMenuBarNames() | |||
{ | |||
const char* const names[] = { "File", "Edit", "View", "Window", "Update", 0 }; | |||
const char* const names[] = { "File", "Edit", "View", "Window", "Tools", 0 }; | |||
return StringArray ((const char**) names); | |||
} | |||
const PopupMenu getMenuForIndex (int topLevelMenuIndex, const String& menuName) | |||
const PopupMenu getMenuForIndex (int topLevelMenuIndex, const String& /*menuName*/) | |||
{ | |||
PopupMenu menu; | |||
@@ -253,15 +267,16 @@ public: | |||
menu.addSeparator(); | |||
menu.addCommandItem (commandManager, CommandIDs::closeAllDocuments); | |||
} | |||
else if (topLevelMenuIndex == 4) // "Juce" menu | |||
else if (topLevelMenuIndex == 4) // "Tools" menu | |||
{ | |||
menu.addCommandItem (commandManager, CommandIDs::showJuceVersion); | |||
menu.addCommandItem (commandManager, CommandIDs::updateModules); | |||
menu.addCommandItem (commandManager, CommandIDs::showUTF8Tool); | |||
} | |||
return menu; | |||
} | |||
void menuItemSelected (int menuItemID, int topLevelMenuIndex) | |||
void menuItemSelected (int menuItemID, int /*topLevelMenuIndex*/) | |||
{ | |||
if (menuItemID >= 100 && menuItemID < 200) | |||
{ | |||
@@ -277,14 +292,9 @@ public: | |||
MainWindow* w = getApp()->getOrCreateFrontmostWindow(); | |||
w->makeVisible(); | |||
w->getProjectContentComponent()->showDocument (doc); | |||
getApp()->avoidSuperimposedWindows (w); | |||
} | |||
} | |||
private: | |||
JucerApplication* getApp() const | |||
{ | |||
return static_cast<JucerApplication*> (JUCEApplication::getInstance()); | |||
} | |||
}; | |||
//============================================================================== | |||
@@ -297,7 +307,8 @@ public: | |||
CommandIDs::showPrefs, | |||
CommandIDs::closeAllDocuments, | |||
CommandIDs::saveAll, | |||
CommandIDs::showJuceVersion }; | |||
CommandIDs::updateModules, | |||
CommandIDs::showUTF8Tool }; | |||
commands.addArray (ids, numElementsInArray (ids)); | |||
} | |||
@@ -331,8 +342,12 @@ public: | |||
result.setActive (OpenDocumentManager::getInstance()->anyFilesNeedSaving()); | |||
break; | |||
case CommandIDs::showJuceVersion: | |||
result.setInfo ("Download the latest JUCE version", "Checks online for any Juce updates", CommandCategories::general, 0); | |||
case CommandIDs::updateModules: | |||
result.setInfo ("Download the latest JUCE modules", "Checks online for any JUCE modules updates and installs them", CommandCategories::general, 0); | |||
break; | |||
case CommandIDs::showUTF8Tool: | |||
result.setInfo ("UTF-8 String-Literal Helper", "Shows the UTF-8 string literal utility", CommandCategories::general, 0); | |||
break; | |||
default: | |||
@@ -350,7 +365,9 @@ public: | |||
case CommandIDs::showPrefs: showPrefsPanel(); break; | |||
case CommandIDs::saveAll: OpenDocumentManager::getInstance()->saveAll(); break; | |||
case CommandIDs::closeAllDocuments: closeAllDocuments (true); break; | |||
case CommandIDs::showJuceVersion: JuceUpdater::show (mainWindows[0]); break; | |||
case CommandIDs::showUTF8Tool: showUTF8ToolWindow(); break; | |||
case CommandIDs::updateModules: runModuleUpdate (String::empty); break; | |||
default: return JUCEApplication::perform (info); | |||
} | |||
@@ -365,17 +382,11 @@ public: | |||
void createNewProject() | |||
{ | |||
MainWindow* mw = createNewMainWindow(); | |||
ScopedPointer <Project> newProj (NewProjectWizard::runNewProjectWizard (mw)); | |||
if (newProj != nullptr) | |||
if (makeSureUserHasSelectedModuleFolder()) | |||
{ | |||
mw->setProject (newProj.release()); | |||
mw->makeVisible(); | |||
} | |||
else | |||
{ | |||
closeWindow (mw); | |||
MainWindow* mw = getOrCreateEmptyWindow(); | |||
mw->showNewProjectWizard(); | |||
avoidSuperimposedWindows (mw); | |||
} | |||
} | |||
@@ -408,6 +419,7 @@ public: | |||
MainWindow* w = getOrCreateEmptyWindow(); | |||
w->setProject (newDoc.release()); | |||
w->makeVisible(); | |||
avoidSuperimposedWindows (w); | |||
return true; | |||
} | |||
} | |||
@@ -417,6 +429,7 @@ public: | |||
const bool ok = w->openFile (file); | |||
w->makeVisible(); | |||
avoidSuperimposedWindows (w); | |||
return ok; | |||
} | |||
@@ -425,18 +438,7 @@ public: | |||
bool closeAllDocuments (bool askUserToSave) | |||
{ | |||
for (int i = OpenDocumentManager::getInstance()->getNumOpenDocuments(); --i >= 0;) | |||
{ | |||
OpenDocumentManager::Document* doc = OpenDocumentManager::getInstance()->getOpenDocument (i); | |||
for (int j = mainWindows.size(); --j >= 0;) | |||
mainWindows.getUnchecked(j)->getProjectContentComponent()->hideDocument (doc); | |||
if (! OpenDocumentManager::getInstance()->closeDocument (i, askUserToSave)) | |||
return false; | |||
} | |||
return true; | |||
return OpenDocumentManager::getInstance()->closeAll (askUserToSave); | |||
} | |||
void updateRecentProjectList() | |||
@@ -454,6 +456,35 @@ public: | |||
StoredSettings::getInstance()->setLastProjects (projects); | |||
} | |||
bool makeSureUserHasSelectedModuleFolder() | |||
{ | |||
if (! ModuleList::isLocalModulesFolderValid()) | |||
{ | |||
if (! runModuleUpdate ("Please select a location to store your local set of JUCE modules,\n" | |||
"and download the ones that you'd like to use!")) | |||
{ | |||
AlertWindow::showMessageBox (AlertWindow::WarningIcon, | |||
"Introjucer", | |||
"Unless you create a local JUCE folder containing some modules, you'll be unable to save any projects correctly!\n\n" | |||
"Use the option on the 'Tools' menu to set this up!"); | |||
return false; | |||
} | |||
} | |||
return true; | |||
} | |||
bool runModuleUpdate (const String& message) | |||
{ | |||
ModuleList list; | |||
list.rescan (ModuleList::getDefaultModulesFolder (nullptr)); | |||
JuceUpdater::show (list, mainWindows[0], message); | |||
ModuleList::setLocalModulesFolder (list.getModulesFolder()); | |||
return ModuleList::isJuceOrModulesFolder (list.getModulesFolder()); | |||
} | |||
ScopedPointer<MainMenuModel> menuModel; | |||
private: | |||
@@ -462,13 +493,9 @@ private: | |||
MainWindow* createNewMainWindow() | |||
{ | |||
MainWindow* mw = new MainWindow(); | |||
for (int i = mainWindows.size(); --i >= 0;) | |||
if (mw->getBounds() == mainWindows.getUnchecked(i)->getBounds()) | |||
mw->setBounds (mw->getBounds().translated (20, 20)); | |||
mainWindows.add (mw); | |||
mw->restoreWindowPosition(); | |||
avoidSuperimposedWindows (mw); | |||
return mw; | |||
} | |||
@@ -501,7 +528,61 @@ private: | |||
return createNewMainWindow(); | |||
} | |||
void avoidSuperimposedWindows (MainWindow* const mw) | |||
{ | |||
for (int i = mainWindows.size(); --i >= 0;) | |||
{ | |||
MainWindow* const other = mainWindows.getUnchecked(i); | |||
const Rectangle<int> b1 (mw->getBounds()); | |||
const Rectangle<int> b2 (other->getBounds()); | |||
if (mw != other | |||
&& std::abs (b1.getX() - b2.getX()) < 3 | |||
&& std::abs (b1.getY() - b2.getY()) < 3 | |||
&& std::abs (b1.getRight() - b2.getRight()) < 3 | |||
&& std::abs (b1.getBottom() - b2.getBottom()) < 3) | |||
{ | |||
int dx = 40, dy = 30; | |||
if (b1.getCentreX() >= mw->getScreenBounds().getCentreX()) dx = -dx; | |||
if (b1.getCentreY() >= mw->getScreenBounds().getCentreY()) dy = -dy; | |||
mw->setBounds (b1.translated (dx, dy)); | |||
} | |||
} | |||
} | |||
//============================================================================== | |||
static bool cancelAnyModalComponents() | |||
{ | |||
const int numModal = ModalComponentManager::getInstance()->getNumModalComponents(); | |||
for (int i = numModal; --i >= 0;) | |||
if (ModalComponentManager::getInstance()->getModalComponent(i) != nullptr) | |||
ModalComponentManager::getInstance()->getModalComponent(i)->exitModalState (0); | |||
return numModal > 0; | |||
} | |||
class AsyncQuitRetrier : public Timer | |||
{ | |||
public: | |||
AsyncQuitRetrier() { startTimer (500); } | |||
void timerCallback() | |||
{ | |||
stopTimer(); | |||
delete this; | |||
if (getApp() != nullptr) | |||
getApp()->systemRequestedQuit(); | |||
} | |||
JUCE_DECLARE_NON_COPYABLE (AsyncQuitRetrier); | |||
}; | |||
}; | |||
#endif // __JUCER_APPLICATION_H_6595C2A8__ | |||
#endif // __JUCER_APPLICATION_JUCEHEADER__ |
@@ -2,7 +2,7 @@ | |||
============================================================================== | |||
This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
Copyright 2004-10 by Raw Material Software Ltd. | |||
Copyright 2004-11 by Raw Material Software Ltd. | |||
------------------------------------------------------------------------------ | |||
@@ -40,7 +40,8 @@ namespace CommandIDs | |||
static const int openInIDE = 0x200072; | |||
static const int saveAndOpenInIDE = 0x200073; | |||
static const int showProjectSettings = 0x200074; | |||
static const int showJuceVersion = 0x200075; | |||
static const int updateModules = 0x200075; | |||
static const int showUTF8Tool = 0x200076; | |||
static const int saveAll = 0x200080; | |||
static const int undo = 0x200090; | |||
@@ -0,0 +1,263 @@ | |||
/* | |||
============================================================================== | |||
This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
Copyright 2004-11 by Raw Material Software Ltd. | |||
------------------------------------------------------------------------------ | |||
JUCE can be redistributed and/or modified under the terms of the GNU General | |||
Public License (Version 2), as published by the Free Software Foundation. | |||
A copy of the license is included in the JUCE distribution, or can be found | |||
online at www.gnu.org/licenses. | |||
JUCE 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. | |||
------------------------------------------------------------------------------ | |||
To release a closed-source product which uses JUCE, commercial licenses are | |||
available: visit www.rawmaterialsoftware.com/juce for more information. | |||
============================================================================== | |||
*/ | |||
#include "../Project/jucer_Project.h" | |||
#include "../Project/jucer_Module.h" | |||
#include "jucer_CommandLine.h" | |||
//============================================================================== | |||
namespace | |||
{ | |||
File getFile (const String& filename) | |||
{ | |||
return File::getCurrentWorkingDirectory().getChildFile (filename.unquoted()); | |||
} | |||
bool checkArgumentCount (const StringArray& tokens, int minNumArgs) | |||
{ | |||
if (tokens.size() < minNumArgs) | |||
{ | |||
std::cout << "Not enough arguments!" << std::endl; | |||
return false; | |||
} | |||
return true; | |||
} | |||
//============================================================================== | |||
/* Running a command-line of the form "introjucer --resave foobar.jucer" will try to load | |||
that project and re-export all of its targets. | |||
*/ | |||
int resaveProject (const File& file) | |||
{ | |||
if (! file.exists()) | |||
{ | |||
std::cout << "The file " << file.getFullPathName() << " doesn't exist!" << std::endl; | |||
return 1; | |||
} | |||
if (! file.hasFileExtension (Project::projectFileExtension)) | |||
{ | |||
std::cout << file.getFullPathName() << " isn't a valid jucer project file!" << std::endl; | |||
return 1; | |||
} | |||
Project newDoc (file); | |||
if (! newDoc.loadFrom (file, true)) | |||
{ | |||
std::cout << "Failed to load the project file: " << file.getFullPathName() << std::endl; | |||
return 1; | |||
} | |||
std::cout << "The Introjucer - Re-saving file: " << file.getFullPathName() << std::endl; | |||
String error (newDoc.saveDocument (file)); | |||
if (error.isNotEmpty()) | |||
{ | |||
std::cout << "Error when writing project: " << error << std::endl; | |||
return 1; | |||
} | |||
return 0; | |||
} | |||
//============================================================================== | |||
String getModulePackageName (const LibraryModule& module) | |||
{ | |||
return module.getID() + ".jucemodule"; | |||
} | |||
int zipModule (const File& targetFolder, const File& moduleFolder) | |||
{ | |||
jassert (targetFolder.isDirectory()); | |||
const File moduleFolderParent (moduleFolder.getParentDirectory()); | |||
LibraryModule module (moduleFolder.getChildFile (LibraryModule::getInfoFileName())); | |||
if (! module.isValid()) | |||
{ | |||
std::cout << moduleFolder.getFullPathName() << " is not a valid module folder!" << std::endl; | |||
return 1; | |||
} | |||
const File targetFile (targetFolder.getChildFile (getModulePackageName (module))); | |||
ZipFile::Builder zip; | |||
{ | |||
DirectoryIterator i (moduleFolder, true, "*", File::findFiles); | |||
while (i.next()) | |||
if (! i.getFile().isHidden()) | |||
zip.addFile (i.getFile(), 9, i.getFile().getRelativePathFrom (moduleFolderParent)); | |||
} | |||
std::cout << "Writing: " << targetFile.getFullPathName() << std::endl; | |||
TemporaryFile temp (targetFile); | |||
ScopedPointer<FileOutputStream> out (temp.getFile().createOutputStream()); | |||
bool ok = out != nullptr && zip.writeToStream (*out); | |||
out = nullptr; | |||
ok = ok && temp.overwriteTargetFileWithTemporary(); | |||
if (! ok) | |||
{ | |||
std::cout << "Failed to write to the target file: " << targetFile.getFullPathName() << std::endl; | |||
return 1; | |||
} | |||
return 0; | |||
} | |||
int buildModules (const StringArray& tokens, const bool buildAllWithIndex) | |||
{ | |||
if (! checkArgumentCount (tokens, 3)) | |||
return 1; | |||
const File targetFolder (getFile (tokens[1])); | |||
if (! targetFolder.isDirectory()) | |||
{ | |||
std::cout << "The first argument must be the directory to put the result." << std::endl; | |||
return 1; | |||
} | |||
if (buildAllWithIndex) | |||
{ | |||
const File folderToSearch (getFile (tokens[2])); | |||
DirectoryIterator i (folderToSearch, false, "*", File::findDirectories); | |||
var infoList; | |||
while (i.next()) | |||
{ | |||
LibraryModule module (i.getFile().getChildFile (LibraryModule::getInfoFileName())); | |||
if (module.isValid()) | |||
{ | |||
const int result = zipModule (targetFolder, i.getFile()); | |||
if (result != 0) | |||
return result; | |||
var moduleInfo (new DynamicObject()); | |||
moduleInfo.getDynamicObject()->setProperty ("file", getModulePackageName (module)); | |||
moduleInfo.getDynamicObject()->setProperty ("info", module.moduleInfo); | |||
infoList.append (moduleInfo); | |||
} | |||
} | |||
const File indexFile (targetFolder.getChildFile ("modulelist")); | |||
std::cout << "Writing: " << indexFile.getFullPathName() << std::endl; | |||
indexFile.replaceWithText (JSON::toString (infoList), false, false); | |||
} | |||
else | |||
{ | |||
for (int i = 2; i < tokens.size(); ++i) | |||
{ | |||
const int result = zipModule (targetFolder, getFile (tokens[i])); | |||
if (result != 0) | |||
return result; | |||
} | |||
} | |||
return 0; | |||
} | |||
int listModules() | |||
{ | |||
std::cout << "Downloading list of available modules..." << std::endl; | |||
ModuleList list; | |||
list.loadFromWebsite(); | |||
for (int i = 0; i < list.modules.size(); ++i) | |||
{ | |||
ModuleList::Module* m = list.modules.getUnchecked(i); | |||
std::cout << m->uid << ": " << m->version << std::endl; | |||
} | |||
return 0; | |||
} | |||
int showStatus (const StringArray& tokens) | |||
{ | |||
if (! checkArgumentCount (tokens, 2)) | |||
return 1; | |||
const File projectFile (getFile (tokens[1])); | |||
Project proj (projectFile); | |||
if (proj.loadDocument (projectFile).isNotEmpty()) | |||
{ | |||
std::cout << "Failed to load project: " << projectFile.getFullPathName() << std::endl; | |||
return 1; | |||
} | |||
std::cout << "Project file: " << projectFile.getFullPathName() << std::endl | |||
<< "Name: " << proj.getProjectName().toString() << std::endl | |||
<< "UID: " << proj.getProjectUID() << std::endl; | |||
const int numModules = proj.getNumModules(); | |||
if (numModules > 0) | |||
{ | |||
std::cout << "Modules:" << std::endl; | |||
for (int i = 0; i < numModules; ++i) | |||
std::cout << " " << proj.getModuleID (i) << std::endl; | |||
} | |||
return 0; | |||
} | |||
} | |||
//============================================================================== | |||
int performCommandLine (const String& commandLine) | |||
{ | |||
StringArray tokens; | |||
tokens.addTokens (commandLine, true); | |||
tokens.trim(); | |||
if (tokens[0] == "-resave" || tokens[0] == "--resave" || tokens[0] == "resave") | |||
return resaveProject (getFile (tokens[1])); | |||
if (tokens[0] == "buildmodule") | |||
return buildModules (tokens, false); | |||
if (tokens[0] == "buildallmodules") | |||
return buildModules (tokens, true); | |||
if (tokens[0] == "listmodules") | |||
return listModules(); | |||
if (tokens[0] == "status") | |||
return showStatus (tokens); | |||
return commandLineNotPerformed; | |||
} |
@@ -0,0 +1,35 @@ | |||
/* | |||
============================================================================== | |||
This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
Copyright 2004-11 by Raw Material Software Ltd. | |||
------------------------------------------------------------------------------ | |||
JUCE can be redistributed and/or modified under the terms of the GNU General | |||
Public License (Version 2), as published by the Free Software Foundation. | |||
A copy of the license is included in the JUCE distribution, or can be found | |||
online at www.gnu.org/licenses. | |||
JUCE 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. | |||
------------------------------------------------------------------------------ | |||
To release a closed-source product which uses JUCE, commercial licenses are | |||
available: visit www.rawmaterialsoftware.com/juce for more information. | |||
============================================================================== | |||
*/ | |||
#ifndef __JUCER_COMMANDLINE_JUCEHEADER__ | |||
#define __JUCER_COMMANDLINE_JUCEHEADER__ | |||
int performCommandLine (const String& commandLine); | |||
enum { commandLineNotPerformed = 0x72346231 }; | |||
#endif // __JUCER_COMMANDLINE_JUCEHEADER__ |
@@ -2,7 +2,7 @@ | |||
============================================================================== | |||
This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
Copyright 2004-10 by Raw Material Software Ltd. | |||
Copyright 2004-11 by Raw Material Software Ltd. | |||
------------------------------------------------------------------------------ | |||
@@ -23,8 +23,8 @@ | |||
============================================================================== | |||
*/ | |||
#ifndef __JUCER_COMMONINCLUDES_H__ | |||
#define __JUCER_COMMONINCLUDES_H__ | |||
#ifndef __JUCER_COMMONHEADERS_JUCEHEADER__ | |||
#define __JUCER_COMMONHEADERS_JUCEHEADER__ | |||
#include "../Utility/jucer_StoredSettings.h" | |||
@@ -37,7 +37,7 @@ | |||
#include "jucer_CommandIDs.h" | |||
//============================================================================== | |||
extern ApplicationCommandManager* commandManager; | |||
extern ScopedPointer<ApplicationCommandManager> commandManager; | |||
//============================================================================== | |||
const char* const projectItemDragType = "Project Items"; | |||
@@ -48,4 +48,4 @@ const char* const sourceFileExtensions = "cpp;mm;m;c;cc;cxx"; | |||
const char* const headerFileExtensions = "h;hpp;hxx"; | |||
const char* const sourceOrHeaderFileExtensions = "cpp;mm;m;c;cc;cxx;h;hpp;hxx"; | |||
#endif | |||
#endif // __JUCER_COMMONHEADERS_JUCEHEADER__ |
@@ -2,7 +2,7 @@ | |||
============================================================================== | |||
This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
Copyright 2004-10 by Raw Material Software Ltd. | |||
Copyright 2004-11 by Raw Material Software Ltd. | |||
------------------------------------------------------------------------------ | |||
@@ -91,6 +91,7 @@ void DocumentEditorComponent::getCommandInfo (const CommandID commandID, Applica | |||
result.setInfo ("Save" + name + " As...", | |||
"Saves the current document to a different filename", | |||
CommandCategories::general, 0); | |||
result.setActive (document != nullptr && document->canSaveAs()); | |||
result.defaultKeypresses.add (KeyPress ('s', ModifierKeys::commandModifier | ModifierKeys::shiftModifier, 0)); | |||
break; | |||
@@ -98,7 +99,11 @@ void DocumentEditorComponent::getCommandInfo (const CommandID commandID, Applica | |||
result.setInfo ("Close" + name, | |||
"Closes the current document", | |||
CommandCategories::general, 0); | |||
#if JUCE_MAC | |||
result.defaultKeypresses.add (KeyPress ('w', ModifierKeys::commandModifier | ModifierKeys::ctrlModifier, 0)); | |||
#else | |||
result.defaultKeypresses.add (KeyPress ('w', ModifierKeys::commandModifier | ModifierKeys::shiftModifier, 0)); | |||
#endif | |||
break; | |||
default: | |||
@@ -115,8 +120,7 @@ bool DocumentEditorComponent::perform (const InvocationInfo& info) | |||
return true; | |||
case CommandIDs::saveDocumentAs: | |||
jassertfalse //xxxx | |||
//document.save(); | |||
document->saveAs(); | |||
return true; | |||
case CommandIDs::closeDocument: | |||
@@ -2,7 +2,7 @@ | |||
============================================================================== | |||
This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
Copyright 2004-10 by Raw Material Software Ltd. | |||
Copyright 2004-11 by Raw Material Software Ltd. | |||
------------------------------------------------------------------------------ | |||
@@ -2,7 +2,7 @@ | |||
============================================================================== | |||
This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
Copyright 2004-10 by Raw Material Software Ltd. | |||
Copyright 2004-11 by Raw Material Software Ltd. | |||
------------------------------------------------------------------------------ | |||
@@ -2,7 +2,7 @@ | |||
============================================================================== | |||
This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
Copyright 2004-10 by Raw Material Software Ltd. | |||
Copyright 2004-11 by Raw Material Software Ltd. | |||
------------------------------------------------------------------------------ | |||
@@ -23,8 +23,8 @@ | |||
============================================================================== | |||
*/ | |||
#ifndef __JUCER_ITEMPREVIEWCOMPONENT_JUCEHEADER__ | |||
#define __JUCER_ITEMPREVIEWCOMPONENT_JUCEHEADER__ | |||
#ifndef __JUCER_FILEPREVIEWCOMPONENT_JUCEHEADER__ | |||
#define __JUCER_FILEPREVIEWCOMPONENT_JUCEHEADER__ | |||
//============================================================================== | |||
@@ -49,4 +49,4 @@ private: | |||
}; | |||
#endif // __JUCER_ITEMPREVIEWCOMPONENT_JUCEHEADER__ | |||
#endif // __JUCER_FILEPREVIEWCOMPONENT_JUCEHEADER__ |
@@ -2,7 +2,7 @@ | |||
============================================================================== | |||
This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
Copyright 2004-10 by Raw Material Software Ltd. | |||
Copyright 2004-11 by Raw Material Software Ltd. | |||
------------------------------------------------------------------------------ | |||
@@ -25,30 +25,48 @@ | |||
#include "../jucer_Headers.h" | |||
#include "jucer_JuceUpdater.h" | |||
#include "../Project/jucer_Module.h" | |||
//============================================================================== | |||
JuceUpdater::JuceUpdater() | |||
: filenameComp ("Juce Folder", StoredSettings::getInstance()->getLastKnownJuceFolder(), | |||
JuceUpdater::JuceUpdater (ModuleList& moduleList_, const String& message) | |||
: moduleList (moduleList_), | |||
messageLabel (String::empty, message), | |||
filenameComp ("Juce Folder", ModuleList::getLocalModulesFolder (nullptr), | |||
true, true, false, "*", String::empty, "Select your Juce folder"), | |||
checkNowButton ("Check Online for Available Updates...", | |||
"Contacts the website to see if this version is up-to-date") | |||
checkNowButton ("Check for available updates on the JUCE website...", | |||
"Contacts the website to see if new modules are available"), | |||
installButton ("Download and install selected modules..."), | |||
selectAllButton ("Select/Deselect All") | |||
{ | |||
messageLabel.setJustificationType (Justification::centred); | |||
addAndMakeVisible (&messageLabel); | |||
addAndMakeVisible (&label); | |||
addAndMakeVisible (¤tVersionLabel); | |||
addAndMakeVisible (&filenameComp); | |||
addAndMakeVisible (&checkNowButton); | |||
addAndMakeVisible (¤tVersionLabel); | |||
addAndMakeVisible (&installButton); | |||
addAndMakeVisible (&selectAllButton); | |||
checkNowButton.addListener (this); | |||
installButton.addListener (this); | |||
selectAllButton.addListener (this); | |||
filenameComp.addListener (this); | |||
currentVersionLabel.setFont (Font (14.0f, Font::italic)); | |||
label.setFont (Font (12.0f)); | |||
label.setText ("Destination folder:", false); | |||
label.setText ("Local modules folder:", false); | |||
addAndMakeVisible (&availableVersionsList); | |||
availableVersionsList.setModel (this); | |||
setSize (600, 300); | |||
updateInstallButtonStatus(); | |||
versionsToDownload = ValueTree ("modules"); | |||
versionsToDownload.addListener (this); | |||
setSize (600, 500); | |||
checkNow(); | |||
} | |||
JuceUpdater::~JuceUpdater() | |||
@@ -57,22 +75,52 @@ JuceUpdater::~JuceUpdater() | |||
filenameComp.removeListener (this); | |||
} | |||
void JuceUpdater::show (Component* mainWindow) | |||
//============================================================================== | |||
class UpdateDialogWindow : public DialogWindow | |||
{ | |||
JuceUpdater updater; | |||
DialogWindow::showModalDialog ("Juce Update...", &updater, mainWindow, | |||
Colours::lightgrey, | |||
true, false, false); | |||
public: | |||
UpdateDialogWindow (JuceUpdater* updater, Component* componentToCentreAround) | |||
: DialogWindow ("JUCE Module Updater", | |||
Colours::lightgrey, true, true) | |||
{ | |||
setUsingNativeTitleBar (true); | |||
setContentOwned (updater, true); | |||
centreAroundComponent (componentToCentreAround, getWidth(), getHeight()); | |||
setResizable (true, true); | |||
} | |||
void closeButtonPressed() | |||
{ | |||
setVisible (false); | |||
} | |||
private: | |||
JUCE_DECLARE_NON_COPYABLE (UpdateDialogWindow); | |||
}; | |||
void JuceUpdater::show (ModuleList& moduleList, Component* mainWindow, const String& message) | |||
{ | |||
UpdateDialogWindow w (new JuceUpdater (moduleList, message), mainWindow); | |||
w.runModalLoop(); | |||
} | |||
void JuceUpdater::resized() | |||
{ | |||
filenameComp.setBounds (20, 40, getWidth() - 40, 22); | |||
messageLabel.setBounds (20, 10, getWidth() - 40, messageLabel.getText().isEmpty() ? 0 : 30); | |||
filenameComp.setBounds (20, messageLabel.getBottom() + 20, getWidth() - 40, 22); | |||
label.setBounds (filenameComp.getX(), filenameComp.getY() - 18, filenameComp.getWidth(), 18); | |||
currentVersionLabel.setBounds (filenameComp.getX(), filenameComp.getBottom(), filenameComp.getWidth(), 25); | |||
checkNowButton.changeWidthToFitText (20); | |||
checkNowButton.setCentrePosition (getWidth() / 2, filenameComp.getBottom() + 40); | |||
availableVersionsList.setBounds (filenameComp.getX(), checkNowButton.getBottom() + 20, filenameComp.getWidth(), getHeight() - (checkNowButton.getBottom() + 20)); | |||
checkNowButton.changeWidthToFitText (22); | |||
checkNowButton.setCentrePosition (getWidth() / 2, filenameComp.getBottom() + 20); | |||
availableVersionsList.setBounds (filenameComp.getX(), checkNowButton.getBottom() + 20, | |||
filenameComp.getWidth(), | |||
getHeight() - 30 - (checkNowButton.getBottom() + 20)); | |||
installButton.changeWidthToFitText (22); | |||
installButton.setTopRightPosition (availableVersionsList.getRight(), getHeight() - 28); | |||
selectAllButton.setBounds (availableVersionsList.getX(), | |||
availableVersionsList.getBottom() + 4, | |||
installButton.getX() - availableVersionsList.getX() - 20, 22); | |||
} | |||
void JuceUpdater::paint (Graphics& g) | |||
@@ -80,325 +128,330 @@ void JuceUpdater::paint (Graphics& g) | |||
g.fillAll (Colours::white); | |||
} | |||
String findVersionNum (const String& file, const String& token) | |||
void JuceUpdater::buttonClicked (Button* b) | |||
{ | |||
return file.fromFirstOccurrenceOf (token, false, false) | |||
.upToFirstOccurrenceOf ("\n", false, false) | |||
.trim(); | |||
if (b == &installButton) | |||
install(); | |||
else if (b == &selectAllButton) | |||
selectAll(); | |||
else | |||
checkNow(); | |||
} | |||
void JuceUpdater::refresh() | |||
{ | |||
availableVersionsList.updateContent(); | |||
availableVersionsList.repaint(); | |||
} | |||
String JuceUpdater::getCurrentVersion() | |||
class WebsiteContacterThread : public Thread, | |||
private AsyncUpdater | |||
{ | |||
const String header (filenameComp.getCurrentFile() | |||
.getChildFile ("src/core/juce_StandardHeader.h").loadFileAsString()); | |||
public: | |||
WebsiteContacterThread (JuceUpdater& owner_, const ModuleList& latestList) | |||
: Thread ("Module updater"), | |||
owner (owner_), | |||
downloaded (latestList) | |||
{ | |||
startThread(); | |||
} | |||
~WebsiteContacterThread() | |||
{ | |||
stopThread (10000); | |||
} | |||
const String v1 (findVersionNum (header, "JUCE_MAJOR_VERSION")); | |||
const String v2 (findVersionNum (header, "JUCE_MINOR_VERSION")); | |||
const String v3 (findVersionNum (header, "JUCE_BUILDNUMBER")); | |||
void run() | |||
{ | |||
if (downloaded.loadFromWebsite()) | |||
triggerAsyncUpdate(); | |||
else | |||
AlertWindow::showMessageBox (AlertWindow::InfoIcon, | |||
"Module Update", | |||
"Couldn't connect to the JUCE webserver!"); | |||
} | |||
if ((v1 + v2 + v3).isEmpty()) | |||
return String::empty; | |||
void handleAsyncUpdate() | |||
{ | |||
owner.backgroundUpdateComplete (downloaded); | |||
} | |||
return v1 + "." + v2 + "." + v3; | |||
private: | |||
JuceUpdater& owner; | |||
ModuleList downloaded; | |||
}; | |||
void JuceUpdater::checkNow() | |||
{ | |||
websiteContacterThread = nullptr; | |||
websiteContacterThread = new WebsiteContacterThread (*this, latestList); | |||
} | |||
XmlElement* JuceUpdater::downloadVersionList() | |||
void JuceUpdater::backgroundUpdateComplete (const ModuleList& newList) | |||
{ | |||
return URL ("http://www.rawmaterialsoftware.com/juce/downloads/juce_versions.php").readEntireXmlStream(); | |||
latestList = newList; | |||
websiteContacterThread = nullptr; | |||
if (latestList == moduleList) | |||
AlertWindow::showMessageBox (AlertWindow::InfoIcon, | |||
"Module Update", | |||
"No new modules are available"); | |||
refresh(); | |||
} | |||
void JuceUpdater::updateVersions (const XmlElement& xml) | |||
int JuceUpdater::getNumCheckedModules() const | |||
{ | |||
availableVersions.clear(); | |||
int numChecked = 0; | |||
forEachXmlChildElementWithTagName (xml, v, "VERSION") | |||
{ | |||
VersionInfo* vi = new VersionInfo(); | |||
vi->url = URL (v->getStringAttribute ("url")); | |||
vi->desc = v->getStringAttribute ("desc"); | |||
vi->version = v->getStringAttribute ("version"); | |||
vi->date = v->getStringAttribute ("date"); | |||
availableVersions.add (vi); | |||
} | |||
for (int i = latestList.modules.size(); --i >= 0;) | |||
if (versionsToDownload [latestList.modules.getUnchecked(i)->uid]) | |||
++numChecked; | |||
availableVersionsList.updateContent(); | |||
return numChecked; | |||
} | |||
void JuceUpdater::buttonClicked (Button*) | |||
bool JuceUpdater::isLatestVersion (const String& moduleID) const | |||
{ | |||
ScopedPointer<XmlElement> xml (downloadVersionList()); | |||
const ModuleList::Module* m1 = moduleList.findModuleInfo (moduleID); | |||
const ModuleList::Module* m2 = latestList.findModuleInfo (moduleID); | |||
if (xml == nullptr || xml->hasTagName ("html")) | |||
{ | |||
AlertWindow::showMessageBox (AlertWindow::WarningIcon, "Connection Problems...", | |||
"Couldn't connect to the Raw Material Software website!"); | |||
return m1 != nullptr && m2 != nullptr && m1->version == m2->version; | |||
} | |||
return; | |||
} | |||
void JuceUpdater::updateInstallButtonStatus() | |||
{ | |||
const int numChecked = getNumCheckedModules(); | |||
installButton.setEnabled (numChecked > 0); | |||
selectAllButton.setToggleState (numChecked > latestList.modules.size() / 2, false); | |||
} | |||
if (! xml->hasTagName ("JUCEVERSIONS")) | |||
{ | |||
AlertWindow::showMessageBox (AlertWindow::WarningIcon, "Update Problems...", | |||
"This version of the Jucer may be too old to receive automatic updates!\n\n" | |||
"Please visit www.rawmaterialsoftware.com and get the latest version manually!"); | |||
return; | |||
} | |||
void JuceUpdater::filenameComponentChanged (FilenameComponent*) | |||
{ | |||
moduleList.rescan (filenameComp.getCurrentFile()); | |||
filenameComp.setCurrentFile (moduleList.getModulesFolder(), true, false); | |||
const String currentVersion (getCurrentVersion()); | |||
if (! ModuleList::isModulesFolder (moduleList.getModulesFolder())) | |||
currentVersionLabel.setText ("(Not a Juce folder)", false); | |||
else | |||
currentVersionLabel.setText (String::empty, false); | |||
OwnedArray<VersionInfo> versions; | |||
updateVersions (*xml); | |||
refresh(); | |||
} | |||
//============================================================================== | |||
class NewVersionDownloader : public ThreadWithProgressWindow | |||
void JuceUpdater::selectAll() | |||
{ | |||
public: | |||
NewVersionDownloader (const String& title, const URL& url_, const File& target_) | |||
: ThreadWithProgressWindow (title, true, true), | |||
url (url_), target (target_) | |||
bool enable = getNumCheckedModules() < latestList.modules.size() / 2; | |||
versionsToDownload.removeAllProperties (nullptr); | |||
if (enable) | |||
{ | |||
for (int i = latestList.modules.size(); --i >= 0;) | |||
if (! isLatestVersion (latestList.modules.getUnchecked(i)->uid)) | |||
versionsToDownload.setProperty (latestList.modules.getUnchecked(i)->uid, true, nullptr); | |||
} | |||
} | |||
void run() | |||
{ | |||
setStatusMessage ("Contacting website..."); | |||
//============================================================================== | |||
int JuceUpdater::getNumRows() | |||
{ | |||
return latestList.modules.size(); | |||
} | |||
ScopedPointer<InputStream> input (url.createInputStream (false)); | |||
void JuceUpdater::paintListBoxItem (int rowNumber, Graphics& g, int width, int height, bool rowIsSelected) | |||
{ | |||
if (rowIsSelected) | |||
g.fillAll (findColour (TextEditor::highlightColourId)); | |||
} | |||
if (input == nullptr) | |||
Component* JuceUpdater::refreshComponentForRow (int rowNumber, bool isRowSelected, Component* existingComponentToUpdate) | |||
{ | |||
class UpdateListComponent : public Component | |||
{ | |||
public: | |||
UpdateListComponent (JuceUpdater& updater_) | |||
: updater (updater_) | |||
{ | |||
error = "Couldn't connect to the website..."; | |||
return; | |||
addChildComponent (&toggle); | |||
toggle.setBounds ("2, 2, parent.height - 2, parent.height - 2"); | |||
toggle.setWantsKeyboardFocus (false); | |||
setInterceptsMouseClicks (false, true); | |||
} | |||
if (! target.deleteFile()) | |||
void setModule (const ModuleList::Module* newModule, | |||
const ModuleList::Module* existingModule, | |||
const Value& value) | |||
{ | |||
error = "Couldn't delete the destination file..."; | |||
return; | |||
if (newModule != nullptr) | |||
{ | |||
toggle.getToggleStateValue().referTo (value); | |||
toggle.setVisible (true); | |||
toggle.setEnabled (true); | |||
name = newModule->uid; | |||
status = String::empty; | |||
if (existingModule == nullptr) | |||
{ | |||
status << " (not currently installed)"; | |||
} | |||
else if (existingModule->version != newModule->version) | |||
{ | |||
status << " installed: " << existingModule->version | |||
<< ", available: " << newModule->version; | |||
} | |||
else | |||
{ | |||
status << " (latest version already installed: " << existingModule->version << ")"; | |||
toggle.setEnabled (false); | |||
} | |||
} | |||
else | |||
{ | |||
name = status = String::empty; | |||
toggle.setVisible (false); | |||
} | |||
} | |||
ScopedPointer<OutputStream> output (target.createOutputStream (32768)); | |||
if (output == nullptr) | |||
void paint (Graphics& g) | |||
{ | |||
error = "Couldn't write to the destination file..."; | |||
return; | |||
} | |||
g.setColour (Colours::green.withAlpha (0.12f)); | |||
setStatusMessage ("Downloading..."); | |||
g.fillRect (0, 1, getWidth(), getHeight() - 2); | |||
g.setColour (Colours::black); | |||
g.setFont (getHeight() * 0.7f); | |||
int totalBytes = (int) input->getTotalLength(); | |||
int bytesSoFar = 0; | |||
g.drawText (name, toggle.getRight() + 4, 0, getWidth() / 2 - toggle.getRight() - 4, getHeight(), | |||
Justification::centredLeft, true); | |||
while (! (input->isExhausted() || threadShouldExit())) | |||
{ | |||
HeapBlock<char> buffer (8192); | |||
const int num = input->read (buffer, 8192); | |||
g.drawText (status, getWidth() / 2, 0, getWidth() / 2, getHeight(), | |||
Justification::centredLeft, true); | |||
} | |||
if (num == 0) | |||
break; | |||
private: | |||
JuceUpdater& updater; | |||
ToggleButton toggle; | |||
String name, status; | |||
}; | |||
output->write (buffer, num); | |||
bytesSoFar += num; | |||
UpdateListComponent* c = dynamic_cast <UpdateListComponent*> (existingComponentToUpdate); | |||
if (c == nullptr) | |||
c = new UpdateListComponent (*this); | |||
setProgress (totalBytes > 0 ? bytesSoFar / (double) totalBytes : -1.0); | |||
} | |||
} | |||
ModuleList::Module* m = latestList.modules [rowNumber]; | |||
String error; | |||
if (m != nullptr) | |||
c->setModule (m, | |||
moduleList.findModuleInfo (m->uid), | |||
versionsToDownload.getPropertyAsValue (m->uid, nullptr)); | |||
else | |||
c->setModule (nullptr, nullptr, Value()); | |||
private: | |||
URL url; | |||
File target; | |||
}; | |||
return c; | |||
} | |||
//============================================================================== | |||
class Unzipper : public ThreadWithProgressWindow | |||
class InstallThread : public ThreadWithProgressWindow | |||
{ | |||
public: | |||
Unzipper (ZipFile& zipFile_, const File& targetDir_) | |||
: ThreadWithProgressWindow ("Unzipping...", true, true), | |||
worked (true), zipFile (zipFile_), targetDir (targetDir_) | |||
InstallThread (const ModuleList& targetList_, | |||
const ModuleList& list_, const StringArray& itemsToInstall_) | |||
: ThreadWithProgressWindow ("Installing New Modules", true, true), | |||
result (Result::ok()), | |||
targetList (targetList_), | |||
list (list_), | |||
itemsToInstall (itemsToInstall_) | |||
{ | |||
} | |||
void run() | |||
{ | |||
for (int i = 0; i < zipFile.getNumEntries(); ++i) | |||
for (int i = 0; i < itemsToInstall.size(); ++i) | |||
{ | |||
if (threadShouldExit()) | |||
break; | |||
const ZipFile::ZipEntry* e = zipFile.getEntry (i); | |||
setStatusMessage ("Unzipping " + e->filename + "..."); | |||
setProgress (i / (double) zipFile.getNumEntries()); | |||
const ModuleList::Module* m = list.findModuleInfo (itemsToInstall[i]); | |||
worked = zipFile.uncompressEntry (i, targetDir, true) && worked; | |||
} | |||
} | |||
jassert (m != nullptr); | |||
if (m != nullptr) | |||
{ | |||
setProgress (i / (double) itemsToInstall.size()); | |||
bool worked; | |||
MemoryBlock downloaded; | |||
result = download (*m, downloaded); | |||
private: | |||
ZipFile& zipFile; | |||
File targetDir; | |||
}; | |||
if (result.failed()) | |||
break; | |||
//============================================================================== | |||
void JuceUpdater::applyVersion (VersionInfo* version) | |||
{ | |||
File destDir (filenameComp.getCurrentFile()); | |||
if (threadShouldExit()) | |||
break; | |||
const bool destDirExisted = destDir.isDirectory(); | |||
result = unzip (*m, downloaded); | |||
if (destDirExisted && destDir.getNumberOfChildFiles (File::findFilesAndDirectories, "*") > 0) | |||
{ | |||
int r = AlertWindow::showYesNoCancelBox (AlertWindow::WarningIcon, "Folder already exists", | |||
"The folder " + destDir.getFullPathName() + "\nalready contains some files...\n\n" | |||
"Do you want to delete everything in the folder and replace it entirely, or just merge the new files into the existing folder?", | |||
"Delete and replace entire folder", | |||
"Add and overwrite existing files", | |||
"Cancel"); | |||
if (r == 0) | |||
return; | |||
if (r == 1) | |||
{ | |||
if (! destDir.deleteRecursively()) | |||
{ | |||
AlertWindow::showMessageBox (AlertWindow::WarningIcon, "Problems...", | |||
"Couldn't delete the existing folder!"); | |||
return; | |||
if (result.failed()) | |||
break; | |||
} | |||
if (threadShouldExit()) | |||
break; | |||
} | |||
} | |||
if (! (destDir.isDirectory() || destDir.createDirectory())) | |||
Result download (const ModuleList::Module& m, MemoryBlock& dest) | |||
{ | |||
AlertWindow::showMessageBox (AlertWindow::WarningIcon, "Problems...", | |||
"Couldn't create that target folder.."); | |||
return; | |||
} | |||
File zipFile (destDir.getNonexistentChildFile ("juce_download", ".tar.gz", false)); | |||
setStatusMessage ("Downloading " + m.uid + "..."); | |||
bool worked = false; | |||
if (m.url.readEntireBinaryStream (dest, false)) | |||
return Result::ok(); | |||
{ | |||
NewVersionDownloader downloader ("Downloading Version " + version->version + "...", | |||
version->url, zipFile); | |||
worked = downloader.runThread(); | |||
return Result::fail ("Failed to download from: " + m.url.toString (false)); | |||
} | |||
if (worked) | |||
Result unzip (const ModuleList::Module& m, const MemoryBlock& data) | |||
{ | |||
ZipFile zip (zipFile); | |||
Unzipper unzipper (zip, destDir); | |||
worked = unzipper.runThread() && unzipper.worked; | |||
} | |||
zipFile.deleteFile(); | |||
setStatusMessage ("Installing " + m.uid + "..."); | |||
if ((! destDirExisted) && (destDir.getNumberOfChildFiles (File::findFilesAndDirectories, "*") == 0 || ! worked)) | |||
destDir.deleteRecursively(); | |||
MemoryInputStream input (data, false); | |||
ZipFile zip (input); | |||
filenameComponentChanged (&filenameComp); | |||
} | |||
if (zip.getNumEntries() == 0) | |||
return Result::fail ("The downloaded file wasn't a valid module file!"); | |||
void JuceUpdater::filenameComponentChanged (FilenameComponent*) | |||
{ | |||
const String version (getCurrentVersion()); | |||
return zip.uncompressTo (targetList.getModulesFolder(), true); | |||
} | |||
if (version.isEmpty()) | |||
currentVersionLabel.setText ("(Not a Juce folder)", false); | |||
else | |||
currentVersionLabel.setText ("(Current version in this folder: " + version + ")", false); | |||
} | |||
Result result; | |||
//============================================================================== | |||
int JuceUpdater::getNumRows() | |||
{ | |||
return availableVersions.size(); | |||
} | |||
void JuceUpdater::paintListBoxItem (int rowNumber, Graphics& g, int width, int height, bool rowIsSelected) | |||
{ | |||
if (rowIsSelected) | |||
g.fillAll (findColour (TextEditor::highlightColourId)); | |||
} | |||
private: | |||
ModuleList targetList, list; | |||
StringArray itemsToInstall; | |||
}; | |||
Component* JuceUpdater::refreshComponentForRow (int rowNumber, bool isRowSelected, Component* existingComponentToUpdate) | |||
void JuceUpdater::install() | |||
{ | |||
class UpdateListComponent : public Component, | |||
public ButtonListener | |||
if (! moduleList.getModulesFolder().createDirectory()) | |||
{ | |||
public: | |||
UpdateListComponent (JuceUpdater& updater_) | |||
: updater (updater_), | |||
version (nullptr), | |||
applyButton ("Install this version...") | |||
{ | |||
addAndMakeVisible (&applyButton); | |||
applyButton.addListener (this); | |||
setInterceptsMouseClicks (false, true); | |||
} | |||
~UpdateListComponent() | |||
{ | |||
applyButton.removeListener (this); | |||
} | |||
void setVersion (VersionInfo* v) | |||
{ | |||
if (version != v) | |||
{ | |||
version = v; | |||
repaint(); | |||
resized(); | |||
} | |||
} | |||
void paint (Graphics& g) | |||
{ | |||
if (version != nullptr) | |||
{ | |||
g.setColour (Colours::green.withAlpha (0.12f)); | |||
g.fillRect (0, 1, getWidth(), getHeight() - 2); | |||
g.setColour (Colours::black); | |||
g.setFont (getHeight() * 0.7f); | |||
String s; | |||
s << "Version " << version->version << " - " << version->desc << " - " << version->date; | |||
g.drawText (s, 4, 0, applyButton.getX() - 4, getHeight(), Justification::centredLeft, true); | |||
} | |||
} | |||
void resized() | |||
{ | |||
applyButton.changeWidthToFitText (getHeight() - 4); | |||
applyButton.setTopRightPosition (getWidth(), 2); | |||
applyButton.setVisible (version != nullptr); | |||
} | |||
AlertWindow::showMessageBox (AlertWindow::WarningIcon, | |||
"Module Update", | |||
"Couldn't create the target folder!"); | |||
return; | |||
} | |||
void buttonClicked (Button*) | |||
{ | |||
updater.applyVersion (version); | |||
} | |||
StringArray itemsWanted; | |||
private: | |||
JuceUpdater& updater; | |||
VersionInfo* version; | |||
TextButton applyButton; | |||
}; | |||
for (int i = latestList.modules.size(); --i >= 0;) | |||
if (versionsToDownload [latestList.modules.getUnchecked(i)->uid]) | |||
itemsWanted.add (latestList.modules.getUnchecked(i)->uid); | |||
UpdateListComponent* c = dynamic_cast <UpdateListComponent*> (existingComponentToUpdate); | |||
if (c == nullptr) | |||
c = new UpdateListComponent (*this); | |||
{ | |||
InstallThread thread (moduleList, latestList, itemsWanted); | |||
thread.runThread(); | |||
} | |||
c->setVersion (availableVersions [rowNumber]); | |||
return c; | |||
moduleList.rescan(); | |||
refresh(); | |||
} | |||
void JuceUpdater::valueTreePropertyChanged (ValueTree&, const Identifier&) { updateInstallButtonStatus(); } | |||
void JuceUpdater::valueTreeChildAdded (ValueTree&, ValueTree&) {} | |||
void JuceUpdater::valueTreeChildRemoved (ValueTree&, ValueTree&) {} | |||
void JuceUpdater::valueTreeChildOrderChanged (ValueTree&) {} | |||
void JuceUpdater::valueTreeParentChanged (ValueTree&) {} |
@@ -2,7 +2,7 @@ | |||
============================================================================== | |||
This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
Copyright 2004-10 by Raw Material Software Ltd. | |||
Copyright 2004-11 by Raw Material Software Ltd. | |||
------------------------------------------------------------------------------ | |||
@@ -23,21 +23,24 @@ | |||
============================================================================== | |||
*/ | |||
#ifndef __JUCER_JUCEUPDATER_H_81537815__ | |||
#define __JUCER_JUCEUPDATER_H_81537815__ | |||
#ifndef __JUCER_JUCEUPDATER_JUCEHEADER__ | |||
#define __JUCER_JUCEUPDATER_JUCEHEADER__ | |||
#include "../Project/jucer_Module.h" | |||
//============================================================================== | |||
class JuceUpdater : public Component, | |||
public ButtonListener, | |||
public FilenameComponentListener, | |||
public ListBoxModel | |||
private ButtonListener, | |||
private FilenameComponentListener, | |||
private ListBoxModel, | |||
private ValueTree::Listener | |||
{ | |||
public: | |||
JuceUpdater(); | |||
JuceUpdater (ModuleList& moduleList, const String& message); | |||
~JuceUpdater(); | |||
static void show (Component* mainWindow); | |||
static void show (ModuleList& moduleList, Component* mainWindow, const String& message); | |||
//============================================================================== | |||
void resized(); | |||
@@ -49,29 +52,36 @@ public: | |||
void paintListBoxItem (int rowNumber, Graphics& g, int width, int height, bool rowIsSelected); | |||
Component* refreshComponentForRow (int rowNumber, bool isRowSelected, Component* existingComponentToUpdate); | |||
void backgroundUpdateComplete (const ModuleList& newList); | |||
private: | |||
Label label, currentVersionLabel; | |||
ModuleList& moduleList; | |||
ModuleList latestList; | |||
Label messageLabel, label, currentVersionLabel; | |||
FilenameComponent filenameComp; | |||
TextButton checkNowButton; | |||
ListBox availableVersionsList; | |||
XmlElement* downloadVersionList(); | |||
String getCurrentVersion(); | |||
bool isAlreadyUpToDate(); | |||
struct VersionInfo | |||
{ | |||
URL url; | |||
String desc; | |||
String version; | |||
String date; | |||
}; | |||
OwnedArray<VersionInfo> availableVersions; | |||
void updateVersions (const XmlElement& xml); | |||
void applyVersion (VersionInfo* version); | |||
ValueTree versionsToDownload; | |||
TextButton installButton; | |||
ToggleButton selectAllButton; | |||
ScopedPointer<Thread> websiteContacterThread; | |||
void checkNow(); | |||
void install(); | |||
void updateInstallButtonStatus(); | |||
void refresh(); | |||
void selectAll(); | |||
int getNumCheckedModules() const; | |||
bool isLatestVersion (const String& moduleID) const; | |||
void valueTreePropertyChanged (ValueTree&, const Identifier&); | |||
void valueTreeChildAdded (ValueTree&, ValueTree&); | |||
void valueTreeChildRemoved (ValueTree&, ValueTree&); | |||
void valueTreeChildOrderChanged (ValueTree&); | |||
void valueTreeParentChanged (ValueTree&); | |||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (JuceUpdater); | |||
}; | |||
#endif // __JUCER_JUCEUPDATER_H_81537815__ | |||
#endif // __JUCER_JUCEUPDATER_JUCEHEADER__ |
@@ -2,7 +2,7 @@ | |||
============================================================================== | |||
This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
Copyright 2004-10 by Raw Material Software Ltd. | |||
Copyright 2004-11 by Raw Material Software Ltd. | |||
------------------------------------------------------------------------------ | |||
@@ -2,7 +2,7 @@ | |||
============================================================================== | |||
This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
Copyright 2004-10 by Raw Material Software Ltd. | |||
Copyright 2004-11 by Raw Material Software Ltd. | |||
------------------------------------------------------------------------------ | |||
@@ -30,48 +30,47 @@ | |||
#include "../Code Editor/jucer_SourceCodeEditor.h" | |||
#include "../Project/jucer_NewProjectWizard.h" | |||
ApplicationCommandManager* commandManager = nullptr; | |||
ScopedPointer<ApplicationCommandManager> commandManager; | |||
//============================================================================== | |||
MainWindow::MainWindow() | |||
: DocumentWindow (JUCEApplication::getInstance()->getApplicationName(), | |||
: DocumentWindow (JucerApplication::getApp()->getApplicationName(), | |||
Colour::greyLevel (0.6f), | |||
DocumentWindow::allButtons, | |||
false) | |||
{ | |||
setUsingNativeTitleBar (true); | |||
setContentOwned (new ProjectContentComponent(), false); | |||
createProjectContentCompIfNeeded(); | |||
#if ! JUCE_MAC | |||
JucerApplication* app = static_cast<JucerApplication*> (JUCEApplication::getInstance()); | |||
setMenuBar (app->menuModel); | |||
setMenuBar (JucerApplication::getApp()->menuModel); | |||
#endif | |||
setResizable (true, false); | |||
centreWithSize (700, 600); | |||
centreWithSize (800, 600); | |||
// Register all the app commands.. | |||
{ | |||
commandManager->registerAllCommandsForTarget (this); | |||
commandManager->registerAllCommandsForTarget (getProjectContentComponent()); | |||
// use a temporary one of these to harvest its commands.. | |||
ProjectContentComponent pcc; | |||
commandManager->registerAllCommandsForTarget (&pcc); | |||
// use some temporary objects to harvest their commands.. | |||
DocumentEditorComponent dec (nullptr); | |||
commandManager->registerAllCommandsForTarget (&dec); | |||
} | |||
commandManager->getKeyMappings()->resetToDefaultMappings(); | |||
// update key mappings.. | |||
{ | |||
commandManager->getKeyMappings()->resetToDefaultMappings(); | |||
ScopedPointer <XmlElement> keys (StoredSettings::getInstance()->getProps().getXmlValue ("keyMappings")); | |||
ScopedPointer <XmlElement> keys (StoredSettings::getInstance()->getProps().getXmlValue ("keyMappings")); | |||
if (keys != nullptr) | |||
commandManager->getKeyMappings()->restoreFromXml (*keys); | |||
if (keys != nullptr) | |||
commandManager->getKeyMappings()->restoreFromXml (*keys); | |||
addKeyListener (commandManager->getKeyMappings()); | |||
addKeyListener (commandManager->getKeyMappings()); | |||
} | |||
// don't want the window to take focus when the title-bar is clicked.. | |||
setWantsKeyboardFocus (false); | |||
@@ -96,11 +95,20 @@ MainWindow::~MainWindow() | |||
currentProject = nullptr; | |||
} | |||
void MainWindow::createProjectContentCompIfNeeded() | |||
{ | |||
if (getProjectContentComponent() == nullptr) | |||
{ | |||
clearContentComponent(); | |||
setContentOwned (new ProjectContentComponent(), false); | |||
} | |||
} | |||
void MainWindow::makeVisible() | |||
{ | |||
setVisible (true); | |||
addToDesktop(); // (must add before restoring size so that fullscreen will work) | |||
restoreWindowPosition(); | |||
addToDesktop(); | |||
getContentComponent()->grabKeyboardFocus(); | |||
} | |||
@@ -115,8 +123,7 @@ void MainWindow::closeButtonPressed() | |||
if (! closeCurrentProject()) | |||
return; | |||
JucerApplication* jucer = static_cast<JucerApplication*> (JUCEApplication::getInstance()); | |||
jucer->closeWindow (this); | |||
JucerApplication::getApp()->closeWindow (this); | |||
} | |||
bool MainWindow::closeProject (Project* project) | |||
@@ -132,6 +139,11 @@ bool MainWindow::closeProject (Project* project) | |||
if (! OpenDocumentManager::getInstance()->closeAllDocumentsUsingProject (*project, true)) | |||
return false; | |||
ProjectContentComponent* const pcc = getProjectContentComponent(); | |||
if (pcc != nullptr) | |||
pcc->saveTreeViewState(); | |||
FileBasedDocument::SaveResult r = project->saveIfNeededAndUserAgrees(); | |||
if (r == FileBasedDocument::savedOk) | |||
@@ -150,6 +162,7 @@ bool MainWindow::closeCurrentProject() | |||
void MainWindow::setProject (Project* newProject) | |||
{ | |||
createProjectContentCompIfNeeded(); | |||
getProjectContentComponent()->setProject (newProject); | |||
currentProject = newProject; | |||
commandManager->commandStatusChanged(); | |||
@@ -157,7 +170,7 @@ void MainWindow::setProject (Project* newProject) | |||
// (mustn't do this when the project is 0, because that'll happen on shutdown, | |||
// which will erase the list of recent projects) | |||
if (newProject != nullptr) | |||
static_cast<JucerApplication*> (JUCEApplication::getInstance())->updateRecentProjectList(); | |||
JucerApplication::getApp()->updateRecentProjectList(); | |||
} | |||
void MainWindow::restoreWindowPosition() | |||
@@ -181,6 +194,8 @@ bool MainWindow::canOpenFile (const File& file) const | |||
bool MainWindow::openFile (const File& file) | |||
{ | |||
createProjectContentCompIfNeeded(); | |||
if (file.hasFileExtension (Project::projectFileExtension)) | |||
{ | |||
ScopedPointer <Project> newDoc (new Project (file)); | |||
@@ -232,7 +247,7 @@ void MainWindow::activeWindowStatusChanged() | |||
void MainWindow::updateTitle (const String& documentName) | |||
{ | |||
String name (JUCEApplication::getInstance()->getApplicationName()); | |||
String name (JucerApplication::getApp()->getApplicationName()); | |||
if (currentProject != nullptr) | |||
name = currentProject->getDocumentTitle() + " - " + name; | |||
@@ -243,6 +258,12 @@ void MainWindow::updateTitle (const String& documentName) | |||
setName (name); | |||
} | |||
void MainWindow::showNewProjectWizard() | |||
{ | |||
jassert (currentProject == nullptr); | |||
setContentOwned (NewProjectWizard::createComponent(), true); | |||
makeVisible(); | |||
} | |||
//============================================================================== | |||
ApplicationCommandTarget* MainWindow::getNextCommandTarget() | |||
@@ -2,7 +2,7 @@ | |||
============================================================================== | |||
This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
Copyright 2004-10 by Raw Material Software Ltd. | |||
Copyright 2004-11 by Raw Material Software Ltd. | |||
------------------------------------------------------------------------------ | |||
@@ -57,6 +57,8 @@ public: | |||
bool closeProject (Project* project); | |||
bool closeCurrentProject(); | |||
void showNewProjectWizard(); | |||
bool isInterestedInFileDrag (const StringArray& files); | |||
void filesDropped (const StringArray& filenames, int mouseX, int mouseY); | |||
@@ -84,6 +86,8 @@ private: | |||
return "projectWindowPos_" + currentProject->getProjectUID(); | |||
} | |||
void createProjectContentCompIfNeeded(); | |||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainWindow); | |||
}; | |||
@@ -2,7 +2,7 @@ | |||
============================================================================== | |||
This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
Copyright 2004-10 by Raw Material Software Ltd. | |||
Copyright 2004-11 by Raw Material Software Ltd. | |||
------------------------------------------------------------------------------ | |||
@@ -40,17 +40,9 @@ public: | |||
reloadFromFile(); | |||
} | |||
~SourceCodeDocument() | |||
{ | |||
} | |||
//============================================================================== | |||
class Type : public OpenDocumentManager::DocumentType | |||
struct Type : public OpenDocumentManager::DocumentType | |||
{ | |||
public: | |||
Type() {} | |||
~Type() {} | |||
bool canOpenFile (const File& file) { return SourceCodeEditor::isTextFile (file); } | |||
Document* openFile (Project*, const File& file) { return new SourceCodeDocument (file); } | |||
}; | |||
@@ -60,6 +52,7 @@ public: | |||
bool isForFile (const File& file) const { return modDetector.getFile() == file; } | |||
bool isForNode (const ValueTree& node) const { return false; } | |||
bool refersToProject (Project& project) const { return false; } | |||
bool canSaveAs() const { return true; } | |||
String getName() const { return modDetector.getFile().getFileName(); } | |||
String getType() const { return modDetector.getFile().getFileExtension() + " file"; } | |||
bool needsSaving() const { return codeDoc != nullptr && codeDoc->hasChangedSinceSavePoint(); } | |||
@@ -92,6 +85,12 @@ public: | |||
return true; | |||
} | |||
bool saveAs() | |||
{ | |||
jassertfalse; //xxx todo | |||
return false; | |||
} | |||
Component* createEditor() | |||
{ | |||
CodeTokeniser* tokeniser = nullptr; | |||
@@ -120,16 +119,10 @@ public: | |||
reloadFromFile(); | |||
} | |||
~UnknownDocument() {} | |||
//============================================================================== | |||
class Type : public OpenDocumentManager::DocumentType | |||
struct Type : public OpenDocumentManager::DocumentType | |||
{ | |||
public: | |||
Type() {} | |||
~Type() {} | |||
bool canOpenFile (const File& file) { return true; } | |||
bool canOpenFile (const File&) { return true; } | |||
Document* openFile (Project* project, const File& file) { return new UnknownDocument (project, file); } | |||
}; | |||
@@ -140,6 +133,8 @@ public: | |||
bool refersToProject (Project& p) const { return project == &p; } | |||
bool needsSaving() const { return false; } | |||
bool save() { return true; } | |||
bool canSaveAs() const { return false; } | |||
bool saveAs() { return false; } | |||
bool hasFileBeenModifiedExternally() { return fileModificationTime != file.getLastModificationTime(); } | |||
void reloadFromFile() { fileModificationTime = file.getLastModificationTime(); } | |||
String getName() const { return file.getFileName(); } | |||
@@ -206,7 +201,7 @@ bool OpenDocumentManager::canOpenFile (const File& file) | |||
return false; | |||
} | |||
OpenDocumentManager::Document* OpenDocumentManager::getDocumentForFile (Project* project, const File& file) | |||
OpenDocumentManager::Document* OpenDocumentManager::openFile (Project* project, const File& file) | |||
{ | |||
for (int i = documents.size(); --i >= 0;) | |||
if (documents.getUnchecked(i)->isForFile (file)) | |||
@@ -223,11 +218,9 @@ OpenDocumentManager::Document* OpenDocumentManager::getDocumentForFile (Project* | |||
} | |||
} | |||
jassert (d != nullptr); | |||
if (d != nullptr) | |||
documents.add (d); | |||
jassert (d != nullptr); // should always at least have been picked up by UnknownDocument | |||
documents.add (d); | |||
commandManager->commandStatusChanged(); | |||
return d; | |||
} | |||
@@ -322,6 +315,15 @@ void OpenDocumentManager::closeFile (const File& f, bool saveIfNeeded) | |||
} | |||
} | |||
bool OpenDocumentManager::closeAll (bool askUserToSave) | |||
{ | |||
for (int i = getNumOpenDocuments(); --i >= 0;) | |||
if (! closeDocument (i, askUserToSave)) | |||
return false; | |||
return true; | |||
} | |||
bool OpenDocumentManager::closeAllDocumentsUsingProject (Project& project, bool saveIfNeeded) | |||
{ | |||
for (int i = documents.size(); --i >= 0;) | |||
@@ -2,7 +2,7 @@ | |||
============================================================================== | |||
This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
Copyright 2004-10 by Raw Material Software Ltd. | |||
Copyright 2004-11 by Raw Material Software Ltd. | |||
------------------------------------------------------------------------------ | |||
@@ -56,6 +56,8 @@ public: | |||
virtual String getType() const = 0; | |||
virtual bool needsSaving() const = 0; | |||
virtual bool save() = 0; | |||
virtual bool canSaveAs() const = 0; | |||
virtual bool saveAs() = 0; | |||
virtual bool hasFileBeenModifiedExternally() = 0; | |||
virtual void reloadFromFile() = 0; | |||
virtual Component* createEditor() = 0; | |||
@@ -63,16 +65,16 @@ public: | |||
virtual void fileHasBeenRenamed (const File& newFile) = 0; | |||
}; | |||
Document* getDocumentForFile (Project* project, const File& file); | |||
bool canOpenFile (const File& file); | |||
//============================================================================== | |||
int getNumOpenDocuments() const; | |||
Document* getOpenDocument (int index) const; | |||
void moveDocumentToTopOfStack (Document* doc); | |||
bool canOpenFile (const File& file); | |||
Document* openFile (Project* project, const File& file); | |||
bool closeDocument (int index, bool saveIfNeeded); | |||
bool closeDocument (Document* document, bool saveIfNeeded); | |||
bool closeAll (bool askUserToSave); | |||
bool closeAllDocumentsUsingProject (Project& project, bool saveIfNeeded); | |||
void closeFile (const File& f, bool saveIfNeeded); | |||
bool anyFilesNeedSaving() const; | |||
@@ -1,7 +1,7 @@ | |||
/* | |||
============================================================================== | |||
This file was auto-generated by the Jucer! | |||
This file was auto-generated by the Introjucer! | |||
It contains the basic startup code for a Juce application. | |||
@@ -1,7 +1,7 @@ | |||
/* | |||
============================================================================== | |||
This file was auto-generated by the Jucer! | |||
This file was auto-generated by the Introjucer! | |||
It contains the basic startup code for a Juce application. | |||
@@ -1,7 +1,7 @@ | |||
/* | |||
============================================================================== | |||
This file was auto-generated by the Jucer! | |||
This file was auto-generated! | |||
It contains the basic startup code for a Juce application. | |||
@@ -1,7 +1,7 @@ | |||
/* | |||
============================================================================== | |||
This file was auto-generated by the Jucer! | |||
This file was auto-generated! | |||
It contains the basic startup code for a Juce application. | |||
@@ -1,7 +1,7 @@ | |||
/* | |||
============================================================================== | |||
This file was auto-generated by the Jucer! | |||
This file was auto-generated! | |||
It contains the basic startup code for a Juce application. | |||
@@ -1,7 +1,7 @@ | |||
/* | |||
============================================================================== | |||
This file was auto-generated by the Jucer! | |||
This file was auto-generated by the Introjucer! | |||
It contains the basic startup code for a Juce application. | |||
@@ -1,7 +1,7 @@ | |||
/* | |||
============================================================================== | |||
This file was auto-generated by the Jucer! | |||
This file was auto-generated! | |||
It contains the basic outline for a simple desktop window. | |||
@@ -1,7 +1,7 @@ | |||
/* | |||
============================================================================== | |||
This file was auto-generated by the Jucer! | |||
This file was auto-generated! | |||
It contains the basic outline for a simple desktop window. | |||
@@ -2,7 +2,7 @@ | |||
============================================================================== | |||
This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
Copyright 2004-10 by Raw Material Software Ltd. | |||
Copyright 2004-11 by Raw Material Software Ltd. | |||
------------------------------------------------------------------------------ | |||
@@ -52,7 +52,7 @@ SourceCodeEditor::~SourceCodeEditor() | |||
void SourceCodeEditor::resized() | |||
{ | |||
editor.setBounds (0, 0, getWidth(), getHeight()); | |||
editor.setBounds (getLocalBounds()); | |||
} | |||
bool SourceCodeEditor::isTextFile (const File& file) | |||
@@ -2,7 +2,7 @@ | |||
============================================================================== | |||
This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
Copyright 2004-10 by Raw Material Software Ltd. | |||
Copyright 2004-11 by Raw Material Software Ltd. | |||
------------------------------------------------------------------------------ | |||
@@ -0,0 +1,458 @@ | |||
/* | |||
============================================================================== | |||
This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
Copyright 2004-11 by Raw Material Software Ltd. | |||
------------------------------------------------------------------------------ | |||
JUCE can be redistributed and/or modified under the terms of the GNU General | |||
Public License (Version 2), as published by the Free Software Foundation. | |||
A copy of the license is included in the JUCE distribution, or can be found | |||
online at www.gnu.org/licenses. | |||
JUCE 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. | |||
------------------------------------------------------------------------------ | |||
To release a closed-source product which uses JUCE, commercial licenses are | |||
available: visit www.rawmaterialsoftware.com/juce for more information. | |||
============================================================================== | |||
*/ | |||
#ifndef __JUCER_PROJECTEXPORT_ANDROID_JUCEHEADER__ | |||
#define __JUCER_PROJECTEXPORT_ANDROID_JUCEHEADER__ | |||
#include "jucer_ProjectExporter.h" | |||
//============================================================================== | |||
class AndroidProjectExporter : public ProjectExporter | |||
{ | |||
public: | |||
//============================================================================== | |||
static const char* getNameAndroid() { return "Android Project"; } | |||
static const char* getValueTreeTypeName() { return "ANDROID"; } | |||
static AndroidProjectExporter* createForSettings (Project& project, const ValueTree& settings) | |||
{ | |||
if (settings.hasType (getValueTreeTypeName())) | |||
return new AndroidProjectExporter (project, settings); | |||
return 0; | |||
} | |||
//============================================================================== | |||
AndroidProjectExporter (Project& project_, const ValueTree& settings_) | |||
: ProjectExporter (project_, settings_) | |||
{ | |||
name = getNameAndroid(); | |||
if (getTargetLocation().toString().isEmpty()) | |||
getTargetLocation() = getDefaultBuildsRootFolder() + "Android"; | |||
if (getSDKPath().toString().isEmpty()) | |||
getSDKPath() = "${user.home}/SDKs/android-sdk-macosx"; | |||
if (getNDKPath().toString().isEmpty()) | |||
getNDKPath() = "${user.home}/SDKs/android-ndk-r7"; | |||
if (getInternetNeeded().toString().isEmpty()) | |||
getInternetNeeded() = true; | |||
} | |||
//============================================================================== | |||
int getLaunchPreferenceOrderForCurrentOS() | |||
{ | |||
#if JUCE_ANDROID | |||
return 1; | |||
#else | |||
return 0; | |||
#endif | |||
} | |||
bool isPossibleForCurrentProject() { return projectType.isGUIApplication(); } | |||
bool usesMMFiles() const { return false; } | |||
bool canCopeWithDuplicateFiles() { return false; } | |||
void launchProject() | |||
{ | |||
} | |||
void createPropertyEditors (PropertyListBuilder& props) | |||
{ | |||
ProjectExporter::createPropertyEditors (props); | |||
props.add (new TextPropertyComponent (getSDKPath(), "Android SDK Path", 1024, false), | |||
"The path to the Android SDK folder on the target build machine"); | |||
props.add (new TextPropertyComponent (getNDKPath(), "Android NDK Path", 1024, false), | |||
"The path to the Android NDK folder on the target build machine"); | |||
props.add (new BooleanPropertyComponent (getInternetNeeded(), "Internet Access", "Specify internet access permission in the manifest"), | |||
"If enabled, this will set the android.permission.INTERNET flag in the manifest."); | |||
} | |||
Value getSDKPath() const { return getSetting (Ids::androidSDKPath); } | |||
Value getNDKPath() const { return getSetting (Ids::androidNDKPath); } | |||
Value getInternetNeeded() const { return getSetting (Ids::androidInternetNeeded); } | |||
//============================================================================== | |||
void create() | |||
{ | |||
const File target (getTargetFolder()); | |||
const File jniFolder (target.getChildFile ("jni")); | |||
createDirectoryOrThrow (target.getChildFile ("src/com")); | |||
createDirectoryOrThrow (jniFolder); | |||
createDirectoryOrThrow (target.getChildFile ("res/drawable-hdpi")); | |||
createDirectoryOrThrow (target.getChildFile ("res/drawable-mdpi")); | |||
createDirectoryOrThrow (target.getChildFile ("res/drawable-ldpi")); | |||
createDirectoryOrThrow (target.getChildFile ("res/values")); | |||
createDirectoryOrThrow (target.getChildFile ("libs")); | |||
createDirectoryOrThrow (target.getChildFile ("bin")); | |||
{ | |||
ScopedPointer<XmlElement> manifest (createManifestXML()); | |||
writeXmlOrThrow (*manifest, target.getChildFile ("AndroidManifest.xml"), "utf-8", 100, true); | |||
} | |||
writeApplicationMk (jniFolder.getChildFile ("Application.mk")); | |||
writeAndroidMk (jniFolder.getChildFile ("Android.mk")); | |||
{ | |||
ScopedPointer<XmlElement> antBuildXml (createAntBuildXML()); | |||
writeXmlOrThrow (*antBuildXml, target.getChildFile ("build.xml"), "UTF-8", 100); | |||
} | |||
writeProjectPropertiesFile (target.getChildFile ("project.properties")); | |||
writeLocalPropertiesFile (target.getChildFile ("local.properties")); | |||
writeIcon (target.getChildFile ("res/drawable-hdpi/icon.png"), 72); | |||
writeIcon (target.getChildFile ("res/drawable-mdpi/icon.png"), 48); | |||
writeIcon (target.getChildFile ("res/drawable-ldpi/icon.png"), 36); | |||
writeStringsFile (target.getChildFile ("res/values/strings.xml")); | |||
} | |||
protected: | |||
//============================================================================== | |||
class AndroidBuildConfiguration : public BuildConfiguration | |||
{ | |||
public: | |||
AndroidBuildConfiguration (Project& project, const ValueTree& settings) | |||
: BuildConfiguration (project, settings) | |||
{ | |||
androidDynamicLibs.add ("GLESv1_CM"); | |||
androidDynamicLibs.add ("GLESv2"); | |||
} | |||
void createPropertyEditors (PropertyListBuilder& props) | |||
{ | |||
createBasicPropertyEditors (props); | |||
} | |||
StringArray androidDynamicLibs; | |||
}; | |||
BuildConfiguration::Ptr createBuildConfig (const ValueTree& settings) const | |||
{ | |||
return new AndroidBuildConfiguration (project, settings); | |||
} | |||
private: | |||
//============================================================================== | |||
XmlElement* createManifestXML() | |||
{ | |||
XmlElement* manifest = new XmlElement ("manifest"); | |||
manifest->setAttribute ("xmlns:android", "http://schemas.android.com/apk/res/android"); | |||
manifest->setAttribute ("android:versionCode", "1"); | |||
manifest->setAttribute ("android:versionName", "1.0"); | |||
manifest->setAttribute ("package", "com.juce"); | |||
XmlElement* screens = manifest->createNewChildElement ("supports-screens"); | |||
screens->setAttribute ("android:smallScreens", "true"); | |||
screens->setAttribute ("android:normalScreens", "true"); | |||
screens->setAttribute ("android:largeScreens", "true"); | |||
//screens->setAttribute ("android:xlargeScreens", "true"); | |||
screens->setAttribute ("android:anyDensity", "true"); | |||
if (getInternetNeeded().getValue()) | |||
{ | |||
XmlElement* permission = manifest->createNewChildElement ("uses-permission"); | |||
permission->setAttribute ("android:name", "android.permission.INTERNET"); | |||
} | |||
XmlElement* app = manifest->createNewChildElement ("application"); | |||
app->setAttribute ("android:label", "@string/app_name"); | |||
app->setAttribute ("android:icon", "@drawable/icon"); | |||
XmlElement* act = app->createNewChildElement ("activity"); | |||
act->setAttribute ("android:name", "JuceAppActivity"); | |||
act->setAttribute ("android:label", "@string/app_name"); | |||
XmlElement* intent = act->createNewChildElement ("intent-filter"); | |||
intent->createNewChildElement ("action")->setAttribute ("android:name", "android.intent.action.MAIN"); | |||
intent->createNewChildElement ("category")->setAttribute ("android:name", "android.intent.category.LAUNCHER"); | |||
return manifest; | |||
} | |||
//============================================================================== | |||
void findAllFilesToCompile (const Project::Item& projectItem, Array<RelativePath>& results) | |||
{ | |||
if (projectItem.isGroup()) | |||
{ | |||
for (int i = 0; i < projectItem.getNumChildren(); ++i) | |||
findAllFilesToCompile (projectItem.getChild(i), results); | |||
} | |||
else | |||
{ | |||
if (projectItem.shouldBeCompiled()) | |||
results.add (RelativePath (projectItem.getFile(), getTargetFolder(), RelativePath::buildTargetFolder)); | |||
} | |||
} | |||
void writeApplicationMk (const File& file) | |||
{ | |||
MemoryOutputStream mo; | |||
mo << "# Automatically generated makefile, created by the Introjucer" << newLine | |||
<< "# Don't edit this file! Your changes will be overwritten when you re-save the Introjucer project!" << newLine | |||
<< newLine | |||
<< "APP_STL := gnustl_static" << newLine | |||
<< "APP_CPPFLAGS += -fsigned-char -fexceptions -frtti" << newLine | |||
<< "APP_PLATFORM := android-7" << newLine; | |||
overwriteFileIfDifferentOrThrow (file, mo); | |||
} | |||
void writeAndroidMk (const File& file) | |||
{ | |||
Array<RelativePath> files; | |||
for (int i = 0; i < groups.size(); ++i) | |||
findAllFilesToCompile (groups.getReference(i), files); | |||
MemoryOutputStream mo; | |||
writeAndroidMk (mo, files); | |||
overwriteFileIfDifferentOrThrow (file, mo); | |||
} | |||
void writeAndroidMk (OutputStream& out, const Array<RelativePath>& files) | |||
{ | |||
out << "# Automatically generated makefile, created by the Introjucer" << newLine | |||
<< "# Don't edit this file! Your changes will be overwritten when you re-save the Introjucer project!" << newLine | |||
<< newLine | |||
<< "LOCAL_PATH := $(call my-dir)" << newLine | |||
<< newLine | |||
<< "include $(CLEAR_VARS)" << newLine | |||
<< newLine | |||
<< "LOCAL_MODULE := juce_jni" << newLine | |||
<< "LOCAL_SRC_FILES := \\" << newLine; | |||
for (int i = 0; i < files.size(); ++i) | |||
out << " ../" << escapeSpaces (files.getReference(i).toUnixStyle()) << "\\" << newLine; | |||
String debugSettings, releaseSettings; | |||
out << newLine | |||
<< "ifeq ($(CONFIG),Debug)" << newLine; | |||
writeConfigSettings (out, true); | |||
out << "else" << newLine; | |||
writeConfigSettings (out, false); | |||
out << "endif" << newLine | |||
<< newLine | |||
<< "include $(BUILD_SHARED_LIBRARY)" << newLine; | |||
} | |||
void writeConfigSettings (OutputStream& out, bool forDebug) | |||
{ | |||
for (ConfigIterator config (*this); config.next();) | |||
{ | |||
if (config->isDebug() == forDebug) | |||
{ | |||
out << " LOCAL_CPPFLAGS += " << createCPPFlags (*config) << newLine | |||
<< getDynamicLibs (dynamic_cast <const AndroidBuildConfiguration&> (*config)); | |||
break; | |||
} | |||
} | |||
} | |||
String getDynamicLibs (const AndroidBuildConfiguration& config) | |||
{ | |||
if (config.androidDynamicLibs.size() == 0) | |||
return String::empty; | |||
String flags (" LOCAL_LDLIBS :="); | |||
flags << config.getGCCLibraryPathFlags(); | |||
for (int i = 0; i < config.androidDynamicLibs.size(); ++i) | |||
flags << " -l" << config.androidDynamicLibs[i]; | |||
return flags + newLine; | |||
} | |||
String createIncludePathFlags (const BuildConfiguration& config) | |||
{ | |||
String flags; | |||
StringArray searchPaths (extraSearchPaths); | |||
searchPaths.addArray (config.getHeaderSearchPaths()); | |||
searchPaths.removeDuplicates (false); | |||
for (int i = 0; i < searchPaths.size(); ++i) | |||
flags << " -I " << FileHelpers::unixStylePath (replacePreprocessorTokens (config, searchPaths[i])).quoted(); | |||
return flags; | |||
} | |||
String createCPPFlags (const BuildConfiguration& config) | |||
{ | |||
StringPairArray defines; | |||
defines.set ("JUCE_ANDROID", "1"); | |||
String flags ("-fsigned-char -fexceptions -frtti"); | |||
if (config.isDebug().getValue()) | |||
{ | |||
flags << " -g"; | |||
defines.set ("DEBUG", "1"); | |||
defines.set ("_DEBUG", "1"); | |||
} | |||
else | |||
{ | |||
defines.set ("NDEBUG", "1"); | |||
} | |||
flags << createIncludePathFlags (config) | |||
<< " -O" << config.getGCCOptimisationFlag(); | |||
defines = mergePreprocessorDefs (defines, getAllPreprocessorDefs (config)); | |||
return flags + createGCCPreprocessorFlags (defines); | |||
} | |||
//============================================================================== | |||
XmlElement* createAntBuildXML() | |||
{ | |||
XmlElement* proj = new XmlElement ("project"); | |||
proj->setAttribute ("name", projectName); | |||
proj->setAttribute ("default", "debug"); | |||
proj->createNewChildElement ("loadproperties")->setAttribute ("srcFile", "local.properties"); | |||
proj->createNewChildElement ("loadproperties")->setAttribute ("srcFile", "project.properties"); | |||
XmlElement* path = proj->createNewChildElement ("path"); | |||
path->setAttribute ("id", "android.antlibs"); | |||
path->createNewChildElement ("pathelement")->setAttribute ("path", "${sdk.dir}/tools/lib/anttasks.jar"); | |||
path->createNewChildElement ("pathelement")->setAttribute ("path", "${sdk.dir}/tools/lib/sdklib.jar"); | |||
path->createNewChildElement ("pathelement")->setAttribute ("path", "${sdk.dir}/tools/lib/androidprefs.jar"); | |||
XmlElement* taskdef = proj->createNewChildElement ("taskdef"); | |||
taskdef->setAttribute ("name", "setup"); | |||
taskdef->setAttribute ("classname", "com.android.ant.SetupTask"); | |||
taskdef->setAttribute ("classpathref", "android.antlibs"); | |||
addNDKBuildStep (proj, "clean", "clean"); | |||
//addLinkStep (proj, "${basedir}/" + rebaseFromProjectFolderToBuildTarget (RelativePath()).toUnixStyle() + "/", "jni/app"); | |||
addLinkStep (proj, "${basedir}/" + getJucePathFromTargetFolder().toUnixStyle() + "/modules/juce_core/native/java/", "src/com/juce"); | |||
addNDKBuildStep (proj, "debug", "CONFIG=Debug"); | |||
addNDKBuildStep (proj, "release", "CONFIG=Release"); | |||
proj->createNewChildElement ("import")->setAttribute ("file", "${sdk.dir}/tools/ant/build.xml"); | |||
return proj; | |||
} | |||
static void addNDKBuildStep (XmlElement* project, const String& type, const String& arg) | |||
{ | |||
XmlElement* target = project->createNewChildElement ("target"); | |||
target->setAttribute ("name", type); | |||
XmlElement* executable = target->createNewChildElement ("exec"); | |||
executable->setAttribute ("executable", "${ndk.dir}/ndk-build"); | |||
executable->setAttribute ("dir", "${basedir}"); | |||
executable->setAttribute ("failonerror", "true"); | |||
executable->createNewChildElement ("arg")->setAttribute ("value", "--jobs=2"); | |||
executable->createNewChildElement ("arg")->setAttribute ("value", arg); | |||
} | |||
static void addLinkStep (XmlElement* project, const String& from, const String& to) | |||
{ | |||
XmlElement* executable = project->createNewChildElement ("exec"); | |||
executable->setAttribute ("executable", "ln"); | |||
executable->setAttribute ("dir", "${basedir}"); | |||
executable->setAttribute ("failonerror", "false"); | |||
executable->createNewChildElement ("arg")->setAttribute ("value", "-s"); | |||
executable->createNewChildElement ("arg")->setAttribute ("value", from); | |||
executable->createNewChildElement ("arg")->setAttribute ("value", to); | |||
} | |||
void writeProjectPropertiesFile (const File& file) | |||
{ | |||
MemoryOutputStream mo; | |||
mo << "# This file is used to override default values used by the Ant build system." << newLine | |||
<< "# It is automatically generated - DO NOT EDIT IT or your changes will be lost!." << newLine | |||
<< newLine | |||
<< "target=Google Inc.:Google APIs:7" << newLine | |||
<< newLine; | |||
overwriteFileIfDifferentOrThrow (file, mo); | |||
} | |||
void writeLocalPropertiesFile (const File& file) | |||
{ | |||
MemoryOutputStream mo; | |||
mo << "# This file is used to override default values used by the Ant build system." << newLine | |||
<< "# It is automatically generated by the Introjucer - DO NOT EDIT IT or your changes will be lost!." << newLine | |||
<< newLine | |||
<< "sdk.dir=" << escapeSpaces (replacePreprocessorDefs (getAllPreprocessorDefs(), getSDKPath().toString())) << newLine | |||
<< "ndk.dir=" << escapeSpaces (replacePreprocessorDefs (getAllPreprocessorDefs(), getNDKPath().toString())) << newLine | |||
<< newLine; | |||
overwriteFileIfDifferentOrThrow (file, mo); | |||
} | |||
void writeIcon (const File& file, int size) | |||
{ | |||
Image im (getBestIconForSize (size, false)); | |||
if (im.isValid()) | |||
{ | |||
PNGImageFormat png; | |||
MemoryOutputStream mo; | |||
if (! png.writeImageToStream (im, mo)) | |||
throw SaveError ("Can't generate Android icon file"); | |||
overwriteFileIfDifferentOrThrow (file, mo); | |||
} | |||
} | |||
void writeStringsFile (const File& file) | |||
{ | |||
XmlElement strings ("resources"); | |||
XmlElement* name = strings.createNewChildElement ("string"); | |||
name->setAttribute ("name", "app_name"); | |||
name->addTextElement (projectName); | |||
writeXmlOrThrow (strings, file, "utf-8", 100); | |||
} | |||
//============================================================================== | |||
JUCE_DECLARE_NON_COPYABLE (AndroidProjectExporter); | |||
}; | |||
#endif // __JUCER_PROJECTEXPORT_ANDROID_JUCEHEADER__ |
@@ -0,0 +1,335 @@ | |||
/* | |||
============================================================================== | |||
This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
Copyright 2004-11 by Raw Material Software Ltd. | |||
------------------------------------------------------------------------------ | |||
JUCE can be redistributed and/or modified under the terms of the GNU General | |||
Public License (Version 2), as published by the Free Software Foundation. | |||
A copy of the license is included in the JUCE distribution, or can be found | |||
online at www.gnu.org/licenses. | |||
JUCE 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. | |||
------------------------------------------------------------------------------ | |||
To release a closed-source product which uses JUCE, commercial licenses are | |||
available: visit www.rawmaterialsoftware.com/juce for more information. | |||
============================================================================== | |||
*/ | |||
#ifndef __JUCER_PROJECTEXPORT_MAKE_JUCEHEADER__ | |||
#define __JUCER_PROJECTEXPORT_MAKE_JUCEHEADER__ | |||
#include "jucer_ProjectExporter.h" | |||
//============================================================================== | |||
class MakefileProjectExporter : public ProjectExporter | |||
{ | |||
public: | |||
//============================================================================== | |||
static const char* getNameLinux() { return "Linux Makefile"; } | |||
static const char* getValueTreeTypeName() { return "LINUX_MAKE"; } | |||
static MakefileProjectExporter* createForSettings (Project& project, const ValueTree& settings) | |||
{ | |||
if (settings.hasType (getValueTreeTypeName())) | |||
return new MakefileProjectExporter (project, settings); | |||
return 0; | |||
} | |||
//============================================================================== | |||
MakefileProjectExporter (Project& project_, const ValueTree& settings_) | |||
: ProjectExporter (project_, settings_) | |||
{ | |||
name = getNameLinux(); | |||
if (getTargetLocation().toString().isEmpty()) | |||
getTargetLocation() = getDefaultBuildsRootFolder() + "Linux"; | |||
} | |||
//============================================================================== | |||
int getLaunchPreferenceOrderForCurrentOS() | |||
{ | |||
#if JUCE_LINUX | |||
return 1; | |||
#else | |||
return 0; | |||
#endif | |||
} | |||
bool isPossibleForCurrentProject() { return true; } | |||
bool usesMMFiles() const { return false; } | |||
bool isLinux() const { return true; } | |||
bool canCopeWithDuplicateFiles() { return false; } | |||
void launchProject() | |||
{ | |||
// what to do on linux? | |||
} | |||
void createPropertyEditors (PropertyListBuilder& props) | |||
{ | |||
ProjectExporter::createPropertyEditors (props); | |||
} | |||
//============================================================================== | |||
void create() | |||
{ | |||
Array<RelativePath> files; | |||
for (int i = 0; i < groups.size(); ++i) | |||
findAllFilesToCompile (groups.getReference(i), files); | |||
MemoryOutputStream mo; | |||
writeMakefile (mo, files); | |||
overwriteFileIfDifferentOrThrow (getTargetFolder().getChildFile ("Makefile"), mo); | |||
} | |||
protected: | |||
//============================================================================== | |||
class MakeBuildConfiguration : public BuildConfiguration | |||
{ | |||
public: | |||
MakeBuildConfiguration (Project& project, const ValueTree& settings) | |||
: BuildConfiguration (project, settings) | |||
{ | |||
if (getLibrarySearchPath().getValue().isVoid()) | |||
getLibrarySearchPath() = "/usr/X11R6/lib/"; | |||
} | |||
void createPropertyEditors (PropertyListBuilder& props) | |||
{ | |||
createBasicPropertyEditors (props); | |||
} | |||
}; | |||
BuildConfiguration::Ptr createBuildConfig (const ValueTree& settings) const | |||
{ | |||
return new MakeBuildConfiguration (project, settings); | |||
} | |||
private: | |||
//============================================================================== | |||
void findAllFilesToCompile (const Project::Item& projectItem, Array<RelativePath>& results) | |||
{ | |||
if (projectItem.isGroup()) | |||
{ | |||
for (int i = 0; i < projectItem.getNumChildren(); ++i) | |||
findAllFilesToCompile (projectItem.getChild(i), results); | |||
} | |||
else | |||
{ | |||
if (projectItem.shouldBeCompiled()) | |||
results.add (RelativePath (projectItem.getFile(), getTargetFolder(), RelativePath::buildTargetFolder)); | |||
} | |||
} | |||
void writeDefineFlags (OutputStream& out, const BuildConfiguration& config) | |||
{ | |||
StringPairArray defines; | |||
defines.set ("LINUX", "1"); | |||
if (config.isDebug().getValue()) | |||
{ | |||
defines.set ("DEBUG", "1"); | |||
defines.set ("_DEBUG", "1"); | |||
} | |||
else | |||
{ | |||
defines.set ("NDEBUG", "1"); | |||
} | |||
out << createGCCPreprocessorFlags (mergePreprocessorDefs (defines, getAllPreprocessorDefs (config))); | |||
} | |||
void writeHeaderPathFlags (OutputStream& out, const BuildConfiguration& config) | |||
{ | |||
StringArray searchPaths (extraSearchPaths); | |||
searchPaths.addArray (config.getHeaderSearchPaths()); | |||
searchPaths.insert (0, "/usr/include/freetype2"); | |||
searchPaths.insert (0, "/usr/include"); | |||
searchPaths.removeDuplicates (false); | |||
for (int i = 0; i < searchPaths.size(); ++i) | |||
out << " -I " << addQuotesIfContainsSpaces (FileHelpers::unixStylePath (replacePreprocessorTokens (config, searchPaths[i]))); | |||
} | |||
void writeCppFlags (OutputStream& out, const BuildConfiguration& config) | |||
{ | |||
out << " CPPFLAGS := $(DEPFLAGS)"; | |||
writeDefineFlags (out, config); | |||
writeHeaderPathFlags (out, config); | |||
out << newLine; | |||
} | |||
void writeLinkerFlags (OutputStream& out, const BuildConfiguration& config) | |||
{ | |||
out << " LDFLAGS += -L$(BINDIR) -L$(LIBDIR)"; | |||
if (makefileIsDLL) | |||
out << " -shared"; | |||
out << config.getGCCLibraryPathFlags(); | |||
const char* defaultLibs[] = { "freetype", "pthread", "rt", "X11", "GL", "GLU", "Xinerama", "asound", "Xext", 0 }; | |||
StringArray libs (defaultLibs); | |||
for (int i = 0; i < libs.size(); ++i) | |||
out << " -l" << libs[i]; | |||
out << " " << replacePreprocessorTokens (config, getExtraLinkerFlags().toString()).trim() | |||
<< newLine; | |||
} | |||
void writeConfig (OutputStream& out, const BuildConfiguration& config) | |||
{ | |||
const String buildDirName ("build"); | |||
const String intermediatesDirName (buildDirName + "/intermediate/" + config.getName().toString()); | |||
String outputDir (buildDirName); | |||
if (config.getTargetBinaryRelativePath().toString().isNotEmpty()) | |||
{ | |||
RelativePath binaryPath (config.getTargetBinaryRelativePath().toString(), RelativePath::projectFolder); | |||
outputDir = binaryPath.rebased (projectFolder, getTargetFolder(), RelativePath::buildTargetFolder).toUnixStyle(); | |||
} | |||
out << "ifeq ($(CONFIG)," << escapeSpaces (config.getName().toString()) << ")" << newLine; | |||
out << " BINDIR := " << escapeSpaces (buildDirName) << newLine | |||
<< " LIBDIR := " << escapeSpaces (buildDirName) << newLine | |||
<< " OBJDIR := " << escapeSpaces (intermediatesDirName) << newLine | |||
<< " OUTDIR := " << escapeSpaces (outputDir) << newLine; | |||
writeCppFlags (out, config); | |||
out << " CFLAGS += $(CPPFLAGS) $(TARGET_ARCH)"; | |||
if (config.isDebug().getValue()) | |||
out << " -g -ggdb"; | |||
if (makefileIsDLL) | |||
out << " -fPIC"; | |||
out << " -O" << config.getGCCOptimisationFlag() << newLine; | |||
out << " CXXFLAGS += $(CFLAGS) " << replacePreprocessorTokens (config, getExtraCompilerFlags().toString()).trim() << newLine; | |||
writeLinkerFlags (out, config); | |||
out << " LDDEPS :=" << newLine | |||
<< " RESFLAGS := "; | |||
writeDefineFlags (out, config); | |||
writeHeaderPathFlags (out, config); | |||
out << newLine; | |||
String targetName (config.getTargetBinaryName().getValue().toString()); | |||
if (projectType.isLibrary()) | |||
targetName = getLibbedFilename (targetName); | |||
else | |||
targetName = targetName.upToLastOccurrenceOf (".", false, false) + makefileTargetSuffix; | |||
out << " TARGET := " << escapeSpaces (targetName) << newLine; | |||
if (projectType.isLibrary()) | |||
out << " BLDCMD = ar -rcs $(OUTDIR)/$(TARGET) $(OBJECTS) $(TARGET_ARCH)" << newLine; | |||
else | |||
out << " BLDCMD = $(CXX) -o $(OUTDIR)/$(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(TARGET_ARCH)" << newLine; | |||
out << "endif" << newLine << newLine; | |||
} | |||
void writeObjects (OutputStream& out, const Array<RelativePath>& files) | |||
{ | |||
out << "OBJECTS := \\" << newLine; | |||
for (int i = 0; i < files.size(); ++i) | |||
if (shouldFileBeCompiledByDefault (files.getReference(i))) | |||
out << " $(OBJDIR)/" << escapeSpaces (getObjectFileFor (files.getReference(i))) << " \\" << newLine; | |||
out << newLine; | |||
} | |||
void writeMakefile (OutputStream& out, const Array<RelativePath>& files) | |||
{ | |||
out << "# Automatically generated makefile, created by the Introjucer" << newLine | |||
<< "# Don't edit this file! Your changes will be overwritten when you re-save the Introjucer project!" << newLine | |||
<< newLine; | |||
out << "ifndef CONFIG" << newLine | |||
<< " CONFIG=" << escapeSpaces (getConfiguration(0)->getName().toString()) << newLine | |||
<< "endif" << newLine | |||
<< newLine; | |||
if (! projectType.isLibrary()) | |||
out << "ifeq ($(TARGET_ARCH),)" << newLine | |||
<< " TARGET_ARCH := -march=native" << newLine | |||
<< "endif" << newLine << newLine; | |||
out << "# (this disables dependency generation if multiple architectures are set)" << newLine | |||
<< "DEPFLAGS := $(if $(word 2, $(TARGET_ARCH)), , -MMD)" << newLine | |||
<< newLine; | |||
for (ConfigIterator config (*this); config.next();) | |||
writeConfig (out, *config); | |||
writeObjects (out, files); | |||
out << ".PHONY: clean" << newLine | |||
<< newLine; | |||
out << "$(OUTDIR)/$(TARGET): $(OBJECTS) $(LDDEPS) $(RESOURCES)" << newLine | |||
<< "\t@echo Linking " << projectName << newLine | |||
<< "\t-@mkdir -p $(BINDIR)" << newLine | |||
<< "\t-@mkdir -p $(LIBDIR)" << newLine | |||
<< "\t-@mkdir -p $(OUTDIR)" << newLine | |||
<< "\t@$(BLDCMD)" << newLine | |||
<< newLine; | |||
out << "clean:" << newLine | |||
<< "\t@echo Cleaning " << projectName << newLine | |||
<< "\t-@rm -f $(OUTDIR)/$(TARGET)" << newLine | |||
<< "\t-@rm -rf $(OBJDIR)/*" << newLine | |||
<< "\t-@rm -rf $(OBJDIR)" << newLine | |||
<< newLine; | |||
for (int i = 0; i < files.size(); ++i) | |||
{ | |||
if (shouldFileBeCompiledByDefault (files.getReference(i))) | |||
{ | |||
jassert (files.getReference(i).getRoot() == RelativePath::buildTargetFolder); | |||
out << "$(OBJDIR)/" << escapeSpaces (getObjectFileFor (files.getReference(i))) | |||
<< ": " << escapeSpaces (files.getReference(i).toUnixStyle()) << newLine | |||
<< "\t-@mkdir -p $(OBJDIR)" << newLine | |||
<< "\t@echo \"Compiling " << files.getReference(i).getFileName() << "\"" << newLine | |||
<< (files.getReference(i).hasFileExtension (".c") ? "\t@$(CC) $(CFLAGS) -o \"$@\" -c \"$<\"" | |||
: "\t@$(CXX) $(CXXFLAGS) -o \"$@\" -c \"$<\"") | |||
<< newLine << newLine; | |||
} | |||
} | |||
out << "-include $(OBJECTS:%.o=%.d)" << newLine; | |||
} | |||
String getObjectFileFor (const RelativePath& file) const | |||
{ | |||
return file.getFileNameWithoutExtension() | |||
+ "_" + String::toHexString (file.toUnixStyle().hashCode()) + ".o"; | |||
} | |||
JUCE_DECLARE_NON_COPYABLE (MakefileProjectExporter); | |||
}; | |||
#endif // __JUCER_PROJECTEXPORT_MAKE_JUCEHEADER__ |
@@ -0,0 +1,524 @@ | |||
/* | |||
============================================================================== | |||
This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
Copyright 2004-11 by Raw Material Software Ltd. | |||
------------------------------------------------------------------------------ | |||
JUCE can be redistributed and/or modified under the terms of the GNU General | |||
Public License (Version 2), as published by the Free Software Foundation. | |||
A copy of the license is included in the JUCE distribution, or can be found | |||
online at www.gnu.org/licenses. | |||
JUCE 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. | |||
------------------------------------------------------------------------------ | |||
To release a closed-source product which uses JUCE, commercial licenses are | |||
available: visit www.rawmaterialsoftware.com/juce for more information. | |||
============================================================================== | |||
*/ | |||
#include "jucer_ProjectExporter.h" | |||
#include "jucer_ProjectExport_Make.h" | |||
#include "jucer_ProjectExport_MSVC.h" | |||
#include "jucer_ProjectExport_XCode.h" | |||
#include "jucer_ProjectExport_Android.h" | |||
//============================================================================== | |||
int ProjectExporter::getNumExporters() | |||
{ | |||
return 6; | |||
} | |||
StringArray ProjectExporter::getExporterNames() | |||
{ | |||
StringArray s; | |||
s.add (XCodeProjectExporter::getNameMac()); | |||
s.add (XCodeProjectExporter::getNameiOS()); | |||
s.add (MSVCProjectExporterVC6::getName()); | |||
s.add (MSVCProjectExporterVC2005::getName()); | |||
s.add (MSVCProjectExporterVC2008::getName()); | |||
s.add (MSVCProjectExporterVC2010::getName()); | |||
s.add (MakefileProjectExporter::getNameLinux()); | |||
s.add (AndroidProjectExporter::getNameAndroid()); | |||
return s; | |||
} | |||
StringArray ProjectExporter::getDefaultExporters() | |||
{ | |||
StringArray s; | |||
s.add (XCodeProjectExporter::getNameMac()); | |||
s.add (MSVCProjectExporterVC2008::getName()); | |||
s.add (MSVCProjectExporterVC2010::getName()); | |||
s.add (MakefileProjectExporter::getNameLinux()); | |||
return s; | |||
} | |||
ProjectExporter* ProjectExporter::createNewExporter (Project& project, const int index) | |||
{ | |||
ProjectExporter* exp = nullptr; | |||
switch (index) | |||
{ | |||
case 0: exp = new XCodeProjectExporter (project, ValueTree (XCodeProjectExporter ::getValueTreeTypeName (false)), false); break; | |||
case 1: exp = new XCodeProjectExporter (project, ValueTree (XCodeProjectExporter ::getValueTreeTypeName (true)), true); break; | |||
case 2: exp = new MSVCProjectExporterVC6 (project, ValueTree (MSVCProjectExporterVC6 ::getValueTreeTypeName())); break; | |||
case 3: exp = new MSVCProjectExporterVC2005 (project, ValueTree (MSVCProjectExporterVC2005::getValueTreeTypeName())); break; | |||
case 4: exp = new MSVCProjectExporterVC2008 (project, ValueTree (MSVCProjectExporterVC2008::getValueTreeTypeName())); break; | |||
case 5: exp = new MSVCProjectExporterVC2010 (project, ValueTree (MSVCProjectExporterVC2010::getValueTreeTypeName())); break; | |||
case 6: exp = new MakefileProjectExporter (project, ValueTree (MakefileProjectExporter ::getValueTreeTypeName())); break; | |||
case 7: exp = new AndroidProjectExporter (project, ValueTree (AndroidProjectExporter ::getValueTreeTypeName())); break; | |||
default: jassertfalse; return 0; | |||
} | |||
File juceFolder (ModuleList::getLocalModulesFolder (&project)); | |||
File target (exp->getTargetFolder()); | |||
if (FileHelpers::shouldPathsBeRelative (juceFolder.getFullPathName(), project.getFile().getFullPathName())) | |||
exp->getJuceFolder() = juceFolder.getRelativePathFrom (project.getFile().getParentDirectory()); | |||
else | |||
exp->getJuceFolder() = juceFolder.getFullPathName(); | |||
exp->createDefaultConfigs(); | |||
return exp; | |||
} | |||
ProjectExporter* ProjectExporter::createNewExporter (Project& project, const String& name) | |||
{ | |||
return createNewExporter (project, getExporterNames().indexOf (name)); | |||
} | |||
ProjectExporter* ProjectExporter::createExporter (Project& project, const ValueTree& settings) | |||
{ | |||
ProjectExporter* exp = MSVCProjectExporterVC6 ::createForSettings (project, settings); | |||
if (exp == nullptr) exp = MSVCProjectExporterVC2005::createForSettings (project, settings); | |||
if (exp == nullptr) exp = MSVCProjectExporterVC2008::createForSettings (project, settings); | |||
if (exp == nullptr) exp = MSVCProjectExporterVC2010::createForSettings (project, settings); | |||
if (exp == nullptr) exp = XCodeProjectExporter ::createForSettings (project, settings); | |||
if (exp == nullptr) exp = MakefileProjectExporter ::createForSettings (project, settings); | |||
if (exp == nullptr) exp = AndroidProjectExporter ::createForSettings (project, settings); | |||
jassert (exp != nullptr); | |||
return exp; | |||
} | |||
ProjectExporter* ProjectExporter::createPlatformDefaultExporter (Project& project) | |||
{ | |||
ScopedPointer <ProjectExporter> best; | |||
int bestPref = 0; | |||
for (Project::ExporterIterator exporter (project); exporter.next();) | |||
{ | |||
const int pref = exporter->getLaunchPreferenceOrderForCurrentOS(); | |||
if (pref > bestPref) | |||
{ | |||
bestPref = pref; | |||
best = exporter.exporter; | |||
} | |||
} | |||
return best.release(); | |||
} | |||
//============================================================================== | |||
ProjectExporter::ProjectExporter (Project& project_, const ValueTree& settings_) | |||
: xcodeIsBundle (false), | |||
xcodeCreatePList (false), | |||
xcodeCanUseDwarf (true), | |||
makefileIsDLL (false), | |||
msvcIsDLL (false), | |||
msvcIsWindowsSubsystem (true), | |||
msvcNeedsDLLRuntimeLib (false), | |||
settings (settings_), | |||
project (project_), | |||
projectType (project_.getProjectType()), | |||
projectName (project_.getProjectName().toString()), | |||
projectFolder (project_.getFile().getParentDirectory()), | |||
modulesGroup (nullptr) | |||
{ | |||
groups.add (project.getMainGroup().createCopy()); | |||
} | |||
ProjectExporter::~ProjectExporter() | |||
{ | |||
} | |||
File ProjectExporter::getTargetFolder() const | |||
{ | |||
return project.resolveFilename (getTargetLocation().toString()); | |||
} | |||
String ProjectExporter::getIncludePathForFileInJuceFolder (const String& pathFromJuceFolder, const File& targetIncludeFile) const | |||
{ | |||
String juceFolderPath (getJuceFolder().toString()); | |||
if (juceFolderPath.startsWithChar ('<')) | |||
{ | |||
juceFolderPath = FileHelpers::unixStylePath (File::addTrailingSeparator (juceFolderPath.substring (1).dropLastCharacters(1))); | |||
if (juceFolderPath == "/") | |||
juceFolderPath = String::empty; | |||
return "<" + juceFolderPath + pathFromJuceFolder + ">"; | |||
} | |||
else | |||
{ | |||
const RelativePath juceFromProject (juceFolderPath, RelativePath::projectFolder); | |||
const RelativePath fileFromProject (juceFromProject.getChildFile (pathFromJuceFolder)); | |||
const RelativePath fileFromHere (fileFromProject.rebased (project.getFile().getParentDirectory(), | |||
targetIncludeFile.getParentDirectory(), RelativePath::unknown)); | |||
return fileFromHere.toUnixStyle().quoted(); | |||
} | |||
} | |||
RelativePath ProjectExporter::getJucePathFromProjectFolder() const | |||
{ | |||
return RelativePath (getJuceFolder().toString(), RelativePath::projectFolder); | |||
} | |||
RelativePath ProjectExporter::getJucePathFromTargetFolder() const | |||
{ | |||
return rebaseFromProjectFolderToBuildTarget (getJucePathFromProjectFolder()); | |||
} | |||
RelativePath ProjectExporter::rebaseFromProjectFolderToBuildTarget (const RelativePath& path) const | |||
{ | |||
return path.rebased (project.getFile().getParentDirectory(), getTargetFolder(), RelativePath::buildTargetFolder); | |||
} | |||
bool ProjectExporter::shouldFileBeCompiledByDefault (const RelativePath& file) const | |||
{ | |||
return file.hasFileExtension ("cpp;cc;c;cxx"); | |||
} | |||
void ProjectExporter::createPropertyEditors (PropertyListBuilder& props) | |||
{ | |||
props.add (new TextPropertyComponent (getTargetLocation(), "Target Project Folder", 1024, false), | |||
"The location of the folder in which the " + name + " project will be created. This path can be absolute, but it's much more sensible to make it relative to the jucer project directory."); | |||
props.add (new TextPropertyComponent (getJuceFolder(), "Local JUCE folder", 1024, false), | |||
"The location of the Juce library folder that the " + name + " project will use to when compiling. This can be an absolute path, or relative to the jucer project folder, but it must be valid on the filesystem of the machine you use to actually do the compiling."); | |||
OwnedArray<LibraryModule> modules; | |||
ModuleList moduleList; | |||
moduleList.rescan (ModuleList::getDefaultModulesFolder (&project)); | |||
project.createRequiredModules (moduleList, modules); | |||
for (int i = 0; i < modules.size(); ++i) | |||
modules.getUnchecked(i)->createPropertyEditors (*this, props); | |||
props.add (new TextPropertyComponent (getExporterPreprocessorDefs(), "Extra Preprocessor Definitions", 32768, false), | |||
"Extra preprocessor definitions. Use the form \"NAME1=value NAME2=value\", using whitespace or commas to separate the items - to include a space or comma in a definition, precede it with a backslash."); | |||
props.add (new TextPropertyComponent (getExtraCompilerFlags(), "Extra compiler flags", 2048, false), | |||
"Extra command-line flags to be passed to the compiler. This string can contain references to preprocessor definitions in the form ${NAME_OF_DEFINITION}, which will be replaced with their values."); | |||
props.add (new TextPropertyComponent (getExtraLinkerFlags(), "Extra linker flags", 2048, false), | |||
"Extra command-line flags to be passed to the linker. You might want to use this for adding additional libraries. This string can contain references to preprocessor definitions in the form ${NAME_OF_VALUE}, which will be replaced with their values."); | |||
{ | |||
OwnedArray<Project::Item> images; | |||
project.findAllImageItems (images); | |||
StringArray choices; | |||
Array<var> ids; | |||
choices.add ("<None>"); | |||
ids.add (var::null); | |||
choices.add (String::empty); | |||
ids.add (var::null); | |||
for (int i = 0; i < images.size(); ++i) | |||
{ | |||
choices.add (images.getUnchecked(i)->getName().toString()); | |||
ids.add (images.getUnchecked(i)->getID()); | |||
} | |||
props.add (new ChoicePropertyComponent (getSmallIconImageItemID(), "Icon (small)", choices, ids), | |||
"Sets an icon to use for the executable."); | |||
props.add (new ChoicePropertyComponent (getBigIconImageItemID(), "Icon (large)", choices, ids), | |||
"Sets an icon to use for the executable."); | |||
} | |||
} | |||
StringPairArray ProjectExporter::getAllPreprocessorDefs (const ProjectExporter::BuildConfiguration& config) const | |||
{ | |||
StringPairArray defs (mergePreprocessorDefs (config.getAllPreprocessorDefs(), | |||
parsePreprocessorDefs (getExporterPreprocessorDefs().toString()))); | |||
defs.set (getExporterIdentifierMacro(), "1"); | |||
return defs; | |||
} | |||
StringPairArray ProjectExporter::getAllPreprocessorDefs() const | |||
{ | |||
StringPairArray defs (mergePreprocessorDefs (project.getPreprocessorDefs(), | |||
parsePreprocessorDefs (getExporterPreprocessorDefs().toString()))); | |||
defs.set (getExporterIdentifierMacro(), "1"); | |||
return defs; | |||
} | |||
String ProjectExporter::replacePreprocessorTokens (const ProjectExporter::BuildConfiguration& config, const String& sourceString) const | |||
{ | |||
return replacePreprocessorDefs (getAllPreprocessorDefs (config), sourceString); | |||
} | |||
Project::Item& ProjectExporter::getModulesGroup() | |||
{ | |||
if (modulesGroup == nullptr) | |||
{ | |||
groups.add (Project::Item::createGroup (project, "Juce Modules", "__modulesgroup__")); | |||
modulesGroup = &(groups.getReference (groups.size() - 1)); | |||
} | |||
return *modulesGroup; | |||
} | |||
void ProjectExporter::addToExtraSearchPaths (const RelativePath& pathFromProjectFolder) | |||
{ | |||
RelativePath localPath (rebaseFromProjectFolderToBuildTarget (pathFromProjectFolder)); | |||
const String path (isVisualStudio() ? localPath.toWindowsStyle() : localPath.toUnixStyle()); | |||
extraSearchPaths.addIfNotAlreadyThere (path, false); | |||
} | |||
//============================================================================== | |||
const Identifier ProjectExporter::configurations ("CONFIGURATIONS"); | |||
const Identifier ProjectExporter::configuration ("CONFIGURATION"); | |||
ValueTree ProjectExporter::getConfigurations() const | |||
{ | |||
return settings.getChildWithName (configurations); | |||
} | |||
int ProjectExporter::getNumConfigurations() const | |||
{ | |||
return getConfigurations().getNumChildren(); | |||
} | |||
ProjectExporter::BuildConfiguration::Ptr ProjectExporter::getConfiguration (int index) const | |||
{ | |||
return createBuildConfig (getConfigurations().getChild (index)); | |||
} | |||
bool ProjectExporter::hasConfigurationNamed (const String& name) const | |||
{ | |||
const ValueTree configs (getConfigurations()); | |||
for (int i = configs.getNumChildren(); --i >= 0;) | |||
if (configs.getChild(i) [Ids::name].toString() == name) | |||
return true; | |||
return false; | |||
} | |||
String ProjectExporter::getUniqueConfigName (String name) const | |||
{ | |||
String nameRoot (name); | |||
while (CharacterFunctions::isDigit (nameRoot.getLastCharacter())) | |||
nameRoot = nameRoot.dropLastCharacters (1); | |||
nameRoot = nameRoot.trim(); | |||
int suffix = 2; | |||
while (hasConfigurationNamed (name)) | |||
name = nameRoot + " " + String (suffix++); | |||
return name; | |||
} | |||
void ProjectExporter::addNewConfiguration (const BuildConfiguration* configToCopy) | |||
{ | |||
const String configName (getUniqueConfigName (configToCopy != nullptr ? configToCopy->config [Ids::name].toString() | |||
: "New Build Configuration")); | |||
ValueTree configs (getConfigurations()); | |||
if (! configs.isValid()) | |||
{ | |||
settings.addChild (ValueTree (configurations), 0, project.getUndoManagerFor (settings)); | |||
configs = getConfigurations(); | |||
} | |||
ValueTree newConfig (configuration); | |||
if (configToCopy != nullptr) | |||
newConfig = configToCopy->config.createCopy(); | |||
newConfig.setProperty (Ids::name, configName, 0); | |||
configs.addChild (newConfig, -1, project.getUndoManagerFor (configs)); | |||
} | |||
void ProjectExporter::deleteConfiguration (int index) | |||
{ | |||
ValueTree configs (getConfigurations()); | |||
configs.removeChild (index, project.getUndoManagerFor (configs)); | |||
} | |||
void ProjectExporter::createDefaultConfigs() | |||
{ | |||
settings.getOrCreateChildWithName (configurations, nullptr); | |||
for (int i = 0; i < 2; ++i) | |||
{ | |||
addNewConfiguration (nullptr); | |||
BuildConfiguration::Ptr config (getConfiguration (i)); | |||
const bool debugConfig = i == 0; | |||
config->getName() = debugConfig ? "Debug" : "Release"; | |||
config->isDebug() = debugConfig; | |||
config->getOptimisationLevel() = debugConfig ? 1 : 2; | |||
config->getTargetBinaryName() = project.getProjectFilenameRoot(); | |||
} | |||
} | |||
Image ProjectExporter::getBigIcon() | |||
{ | |||
return project.getMainGroup().findItemWithID (getBigIconImageItemID().toString()).loadAsImageFile(); | |||
} | |||
Image ProjectExporter::getSmallIcon() | |||
{ | |||
return project.getMainGroup().findItemWithID (getSmallIconImageItemID().toString()).loadAsImageFile(); | |||
} | |||
Image ProjectExporter::getBestIconForSize (int size, bool returnNullIfNothingBigEnough) | |||
{ | |||
Image im; | |||
const Image im1 (getSmallIcon()); | |||
const Image im2 (getBigIcon()); | |||
if (im1.isValid() && im2.isValid()) | |||
{ | |||
if (im1.getWidth() >= size && im2.getWidth() >= size) | |||
im = im1.getWidth() < im2.getWidth() ? im1 : im2; | |||
else if (im1.getWidth() >= size) | |||
im = im1; | |||
else if (im2.getWidth() >= size) | |||
im = im2; | |||
else | |||
return Image::null; | |||
} | |||
else | |||
{ | |||
im = im1.isValid() ? im1 : im2; | |||
} | |||
if (size == im.getWidth() && size == im.getHeight()) | |||
return im; | |||
if (returnNullIfNothingBigEnough && im.getWidth() < size && im.getHeight() < size) | |||
return Image::null; | |||
Image newIm (Image::ARGB, size, size, true, SoftwareImageType()); | |||
Graphics g (newIm); | |||
g.drawImageWithin (im, 0, 0, size, size, | |||
RectanglePlacement::centred | RectanglePlacement::onlyReduceInSize, false); | |||
return newIm; | |||
} | |||
//============================================================================== | |||
ProjectExporter::ConfigIterator::ConfigIterator (ProjectExporter& exporter_) | |||
: index (-1), exporter (exporter_) | |||
{ | |||
} | |||
bool ProjectExporter::ConfigIterator::next() | |||
{ | |||
if (++index >= exporter.getNumConfigurations()) | |||
return false; | |||
config = exporter.getConfiguration (index); | |||
return true; | |||
} | |||
//============================================================================== | |||
ProjectExporter::BuildConfiguration::BuildConfiguration (Project& project_, const ValueTree& configNode) | |||
: config (configNode), project (project_) | |||
{ | |||
} | |||
ProjectExporter::BuildConfiguration::~BuildConfiguration() | |||
{ | |||
} | |||
String ProjectExporter::BuildConfiguration::getGCCOptimisationFlag() const | |||
{ | |||
const int level = (int) getOptimisationLevel().getValue(); | |||
return String (level <= 1 ? "0" : (level == 2 ? "s" : "3")); | |||
} | |||
void ProjectExporter::BuildConfiguration::createBasicPropertyEditors (PropertyListBuilder& props) | |||
{ | |||
props.add (new TextPropertyComponent (getName(), "Name", 96, false), | |||
"The name of this configuration."); | |||
props.add (new BooleanPropertyComponent (isDebug(), "Debug mode", "Debugging enabled"), | |||
"If enabled, this means that the configuration should be built with debug synbols."); | |||
const char* optimisationLevels[] = { "No optimisation", "Optimise for size and speed", "Optimise for maximum speed", 0 }; | |||
const int optimisationLevelValues[] = { 1, 2, 3, 0 }; | |||
props.add (new ChoicePropertyComponent (getOptimisationLevel(), "Optimisation", StringArray (optimisationLevels), Array<var> (optimisationLevelValues)), | |||
"The optimisation level for this configuration"); | |||
props.add (new TextPropertyComponent (getTargetBinaryName(), "Binary name", 256, false), | |||
"The filename to use for the destination binary executable file. Don't add a suffix to this, because platform-specific suffixes will be added for each target platform."); | |||
props.add (new TextPropertyComponent (getTargetBinaryRelativePath(), "Binary location", 1024, false), | |||
"The folder in which the finished binary should be placed. Leave this blank to cause the binary to be placed in its default location in the build folder."); | |||
props.add (new TextPropertyComponent (getHeaderSearchPath(), "Header search paths", 16384, false), | |||
"Extra header search paths. Use semi-colons to separate multiple paths."); | |||
props.add (new TextPropertyComponent (getLibrarySearchPath(), "Extra library search paths", 16384, false), | |||
"Extra library search paths. Use semi-colons to separate multiple paths."); | |||
props.add (new TextPropertyComponent (getBuildConfigPreprocessorDefs(), "Preprocessor definitions", 32768, false), | |||
"Extra preprocessor definitions. Use the form \"NAME1=value NAME2=value\", using whitespace or commas to separate the items - to include a space or comma in a definition, precede it with a backslash."); | |||
props.setPreferredHeight (22); | |||
} | |||
StringPairArray ProjectExporter::BuildConfiguration::getAllPreprocessorDefs() const | |||
{ | |||
return mergePreprocessorDefs (project.getPreprocessorDefs(), | |||
parsePreprocessorDefs (getBuildConfigPreprocessorDefs().toString())); | |||
} | |||
StringArray ProjectExporter::BuildConfiguration::getHeaderSearchPaths() const | |||
{ | |||
StringArray s; | |||
s.addTokens (getHeaderSearchPath().toString(), ";", String::empty); | |||
s.trim(); | |||
s.removeEmptyStrings(); | |||
s.removeDuplicates (false); | |||
return s; | |||
} | |||
StringArray ProjectExporter::BuildConfiguration::getLibrarySearchPaths() const | |||
{ | |||
StringArray s; | |||
s.addTokens (getLibrarySearchPath().toString(), ";", String::empty); | |||
s.trim(); | |||
s.removeEmptyStrings(); | |||
s.removeDuplicates (false); | |||
return s; | |||
} | |||
String ProjectExporter::BuildConfiguration::getGCCLibraryPathFlags() const | |||
{ | |||
String s; | |||
const StringArray libraryPaths (getLibrarySearchPaths()); | |||
for (int i = 0; i < libraryPaths.size(); ++i) | |||
s << " -L" << addQuotesIfContainsSpaces (libraryPaths[i]); | |||
return s; | |||
} |
@@ -0,0 +1,291 @@ | |||
/* | |||
============================================================================== | |||
This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
Copyright 2004-11 by Raw Material Software Ltd. | |||
------------------------------------------------------------------------------ | |||
JUCE can be redistributed and/or modified under the terms of the GNU General | |||
Public License (Version 2), as published by the Free Software Foundation. | |||
A copy of the license is included in the JUCE distribution, or can be found | |||
online at www.gnu.org/licenses. | |||
JUCE 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. | |||
------------------------------------------------------------------------------ | |||
To release a closed-source product which uses JUCE, commercial licenses are | |||
available: visit www.rawmaterialsoftware.com/juce for more information. | |||
============================================================================== | |||
*/ | |||
#ifndef __JUCER_PROJECTEXPORTER_JUCEHEADER__ | |||
#define __JUCER_PROJECTEXPORTER_JUCEHEADER__ | |||
#include "../jucer_Headers.h" | |||
#include "../Project/jucer_Project.h" | |||
#include "../Project/jucer_ProjectType.h" | |||
//============================================================================== | |||
class ProjectExporter | |||
{ | |||
public: | |||
ProjectExporter (Project&, const ValueTree& settings); | |||
virtual ~ProjectExporter(); | |||
static int getNumExporters(); | |||
static StringArray getExporterNames(); | |||
static ProjectExporter* createNewExporter (Project&, const int index); | |||
static ProjectExporter* createNewExporter (Project&, const String& name); | |||
static ProjectExporter* createExporter (Project&, const ValueTree& settings); | |||
static ProjectExporter* createPlatformDefaultExporter (Project&); | |||
static StringArray getDefaultExporters(); | |||
//============================================================================= | |||
// return 0 if this can't be opened in the current OS, or a higher value, where higher numbers are more preferable. | |||
virtual int getLaunchPreferenceOrderForCurrentOS() = 0; | |||
virtual bool isPossibleForCurrentProject() = 0; | |||
virtual bool usesMMFiles() const = 0; | |||
virtual void createPropertyEditors (PropertyListBuilder&); | |||
virtual void launchProject() = 0; | |||
virtual void create() = 0; // may throw a SaveError | |||
virtual bool shouldFileBeCompiledByDefault (const RelativePath& path) const; | |||
virtual bool canCopeWithDuplicateFiles() = 0; | |||
virtual bool isXcode() const { return false; } | |||
virtual bool isVisualStudio() const { return false; } | |||
virtual bool isLinux() const { return false; } | |||
virtual bool isOSX() const { return false; } | |||
//============================================================================== | |||
String getName() const { return name; } | |||
File getTargetFolder() const; | |||
Project& getProject() noexcept { return project; } | |||
const Project& getProject() const noexcept { return project; } | |||
const ValueTree& getSettings() const { return settings; } | |||
Value getSetting (const Identifier& name_) const { return settings.getPropertyAsValue (name_, project.getUndoManagerFor (settings)); } | |||
Value getJuceFolder() const { return getSetting (Ids::juceFolder); } | |||
Value getTargetLocation() const { return getSetting (Ids::targetFolder); } | |||
Value getExtraCompilerFlags() const { return getSetting (Ids::extraCompilerFlags); } | |||
Value getExtraLinkerFlags() const { return getSetting (Ids::extraLinkerFlags); } | |||
// This adds the quotes, and may return angle-brackets, eg: <foo/bar.h> or normal quotes. | |||
String getIncludePathForFileInJuceFolder (const String& pathFromJuceFolder, const File& targetIncludeFile) const; | |||
RelativePath rebaseFromProjectFolderToBuildTarget (const RelativePath& path) const; | |||
void addToExtraSearchPaths (const RelativePath& pathFromProjectFolder); | |||
Value getBigIconImageItemID() const { return getSetting (Ids::bigIcon); } | |||
Value getSmallIconImageItemID() const { return getSetting (Ids::smallIcon); } | |||
Image getBigIcon(); | |||
Image getSmallIcon(); | |||
Image getBestIconForSize (int size, bool returnNullIfNothingBigEnough); | |||
String getExporterIdentifierMacro() const | |||
{ | |||
return "JUCER_" + settings.getType().toString() + "_" | |||
+ String::toHexString (settings [Ids::targetFolder].toString().hashCode()).toUpperCase(); | |||
} | |||
// An exception that can be thrown by the create() method. | |||
class SaveError | |||
{ | |||
public: | |||
SaveError (const String& error) : message (error) | |||
{} | |||
SaveError (const File& fileThatFailedToWrite) | |||
: message ("Can't write to the file: " + fileThatFailedToWrite.getFullPathName()) | |||
{} | |||
String message; | |||
}; | |||
RelativePath getJucePathFromTargetFolder() const; | |||
RelativePath getJucePathFromProjectFolder() const; | |||
//============================================================================== | |||
Array<Project::Item> groups; | |||
Project::Item& getModulesGroup(); | |||
//============================================================================== | |||
String xcodePackageType, xcodeBundleSignature, xcodeBundleExtension; | |||
String xcodeProductType, xcodeProductInstallPath, xcodeFileType; | |||
String xcodeShellScript, xcodeShellScriptTitle, xcodeOtherRezFlags; | |||
bool xcodeIsBundle, xcodeCreatePList, xcodeCanUseDwarf; | |||
StringArray xcodeFrameworks; | |||
Array<RelativePath> xcodeExtraLibrariesDebug, xcodeExtraLibrariesRelease; | |||
Array<XmlElement> xcodeExtraPListEntries; | |||
//============================================================================== | |||
String makefileTargetSuffix; | |||
bool makefileIsDLL; | |||
//============================================================================== | |||
String msvcTargetSuffix; | |||
StringPairArray msvcExtraPreprocessorDefs; | |||
bool msvcIsDLL, msvcIsWindowsSubsystem, msvcNeedsDLLRuntimeLib; | |||
String msvcDelayLoadedDLLs; | |||
//============================================================================== | |||
StringArray extraSearchPaths; | |||
//============================================================================== | |||
class BuildConfiguration : public ReferenceCountedObject | |||
{ | |||
public: | |||
BuildConfiguration (Project& project, const ValueTree& configNode); | |||
~BuildConfiguration(); | |||
typedef ReferenceCountedObjectPtr<BuildConfiguration> Ptr; | |||
//============================================================================== | |||
virtual void createPropertyEditors (PropertyListBuilder&) = 0; | |||
//============================================================================== | |||
Value getName() const { return getValue (Ids::name); } | |||
Value isDebug() const { return getValue (Ids::isDebug); } | |||
Value getTargetBinaryName() const { return getValue (Ids::targetName); } | |||
// the path relative to the build folder in which the binary should go | |||
Value getTargetBinaryRelativePath() const { return getValue (Ids::binaryPath); } | |||
Value getOptimisationLevel() const { return getValue (Ids::optimisation); } | |||
String getGCCOptimisationFlag() const; | |||
Value getBuildConfigPreprocessorDefs() const { return getValue (Ids::defines); } | |||
StringPairArray getAllPreprocessorDefs() const; // includes inherited definitions | |||
Value getHeaderSearchPath() const { return getValue (Ids::headerPath); } | |||
StringArray getHeaderSearchPaths() const; | |||
Value getLibrarySearchPath() const { return getValue (Ids::libraryPath); } | |||
StringArray getLibrarySearchPaths() const; | |||
String getGCCLibraryPathFlags() const; | |||
//============================================================================== | |||
ValueTree config; | |||
//============================================================================== | |||
String msvcExtraLinkerOptions, msvcModuleDefinitionFile; | |||
String msvcPreBuildCommand, msvcPostBuildCommand; | |||
protected: | |||
Project& project; | |||
Value getValue (const Identifier& name) const { return config.getPropertyAsValue (name, getUndoManager()); } | |||
UndoManager* getUndoManager() const { return project.getUndoManagerFor (config); } | |||
void createBasicPropertyEditors (PropertyListBuilder&); | |||
private: | |||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (BuildConfiguration); | |||
}; | |||
void addNewConfiguration (const BuildConfiguration* configToCopy); | |||
void deleteConfiguration (int index); | |||
bool hasConfigurationNamed (const String& name) const; | |||
String getUniqueConfigName (String name) const; | |||
//============================================================================== | |||
struct ConfigIterator | |||
{ | |||
ConfigIterator (ProjectExporter& exporter); | |||
bool next(); | |||
BuildConfiguration& operator*() const { return *config; } | |||
BuildConfiguration* operator->() const { return config; } | |||
BuildConfiguration::Ptr config; | |||
int index; | |||
private: | |||
ProjectExporter& exporter; | |||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ConfigIterator); | |||
}; | |||
int getNumConfigurations() const; | |||
BuildConfiguration::Ptr getConfiguration (int index) const; | |||
ValueTree getConfigurations() const; | |||
void createDefaultConfigs(); | |||
static const Identifier configurations, configuration; | |||
//============================================================================== | |||
Value getExporterPreprocessorDefs() const { return getSetting (Ids::extraDefs); } | |||
// includes exporter, project + config defs | |||
StringPairArray getAllPreprocessorDefs (const BuildConfiguration& config) const; | |||
// includes exporter + project defs.. | |||
StringPairArray getAllPreprocessorDefs() const; | |||
String replacePreprocessorTokens (const BuildConfiguration&, const String& sourceString) const; | |||
ValueTree settings; | |||
protected: | |||
//============================================================================== | |||
String name; | |||
Project& project; | |||
const ProjectType& projectType; | |||
const String projectName; | |||
const File projectFolder; | |||
Project::Item* modulesGroup; | |||
virtual BuildConfiguration::Ptr createBuildConfig (const ValueTree&) const = 0; | |||
static String getDefaultBuildsRootFolder() { return "Builds/"; } | |||
static String getLibbedFilename (String name) | |||
{ | |||
if (! name.startsWith ("lib")) | |||
name = "lib" + name; | |||
if (! name.endsWithIgnoreCase (".a")) | |||
name = name + ".a"; | |||
return name; | |||
} | |||
//============================================================================== | |||
static void overwriteFileIfDifferentOrThrow (const File& file, const MemoryOutputStream& newData) | |||
{ | |||
if (! FileHelpers::overwriteFileWithNewDataIfDifferent (file, newData)) | |||
throw SaveError (file); | |||
} | |||
static void createDirectoryOrThrow (const File& dirToCreate) | |||
{ | |||
if (! dirToCreate.createDirectory()) | |||
throw SaveError ("Can't create folder: " + dirToCreate.getFullPathName()); | |||
} | |||
static void writeXmlOrThrow (const XmlElement& xml, const File& file, const String& encoding, int maxCharsPerLine, bool useUnixNewLines = false) | |||
{ | |||
MemoryOutputStream mo; | |||
xml.writeToStream (mo, String::empty, false, true, encoding, maxCharsPerLine); | |||
if (useUnixNewLines) | |||
{ | |||
MemoryOutputStream mo2; | |||
mo2 << mo.toString().replace ("\r\n", "\n"); | |||
overwriteFileIfDifferentOrThrow (file, mo2); | |||
} | |||
else | |||
{ | |||
overwriteFileIfDifferentOrThrow (file, mo); | |||
} | |||
} | |||
private: | |||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ProjectExporter); | |||
}; | |||
#endif // __JUCER_PROJECTEXPORTER_JUCEHEADER__ |
@@ -0,0 +1,453 @@ | |||
/* | |||
============================================================================== | |||
This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
Copyright 2004-11 by Raw Material Software Ltd. | |||
------------------------------------------------------------------------------ | |||
JUCE can be redistributed and/or modified under the terms of the GNU General | |||
Public License (Version 2), as published by the Free Software Foundation. | |||
A copy of the license is included in the JUCE distribution, or can be found | |||
online at www.gnu.org/licenses. | |||
JUCE 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. | |||
------------------------------------------------------------------------------ | |||
To release a closed-source product which uses JUCE, commercial licenses are | |||
available: visit www.rawmaterialsoftware.com/juce for more information. | |||
============================================================================== | |||
*/ | |||
#ifndef __JUCER_PROJECTSAVER_JUCEHEADER__ | |||
#define __JUCER_PROJECTSAVER_JUCEHEADER__ | |||
#include "jucer_ResourceFile.h" | |||
#include "../Project/jucer_Module.h" | |||
#include "jucer_ProjectExporter.h" | |||
//============================================================================== | |||
class ProjectSaver | |||
{ | |||
public: | |||
ProjectSaver (Project& project_, const File& projectFile_) | |||
: project (project_), | |||
projectFile (projectFile_), | |||
generatedCodeFolder (project.getGeneratedCodeFolder()), | |||
generatedFilesGroup (Project::Item::createGroup (project, getJuceCodeGroupName(), "__generatedcode__")) | |||
{ | |||
generatedFilesGroup.setID (getGeneratedGroupID()); | |||
if (generatedCodeFolder.exists()) | |||
deleteNonHiddenFilesIn (generatedCodeFolder); | |||
} | |||
Project& getProject() noexcept { return project; } | |||
String save() | |||
{ | |||
jassert (generatedFilesGroup.getNumChildren() == 0); // this method can't be called more than once! | |||
const File oldFile (project.getFile()); | |||
project.setFile (projectFile); | |||
writeMainProjectFile(); | |||
OwnedArray<LibraryModule> modules; | |||
{ | |||
ModuleList moduleList; | |||
moduleList.rescan (ModuleList::getDefaultModulesFolder (&project)); | |||
project.createRequiredModules (moduleList, modules); | |||
} | |||
if (errors.size() == 0) | |||
writeAppConfigFile (modules); | |||
if (errors.size() == 0) | |||
writeBinaryDataFiles(); | |||
if (errors.size() == 0) | |||
writeAppHeader (modules); | |||
if (errors.size() == 0) | |||
writeProjects (modules); | |||
if (errors.size() == 0) | |||
writeAppConfigFile (modules); // (this is repeated in case the projects added anything to it) | |||
if (generatedCodeFolder.exists() && errors.size() == 0) | |||
writeReadmeFile(); | |||
if (errors.size() > 0) | |||
project.setFile (oldFile); | |||
return errors[0]; | |||
} | |||
Project::Item saveGeneratedFile (const String& filePath, const MemoryOutputStream& newData) | |||
{ | |||
if (! generatedCodeFolder.createDirectory()) | |||
{ | |||
errors.add ("Couldn't create folder: " + generatedCodeFolder.getFullPathName()); | |||
return Project::Item (project, ValueTree::invalid); | |||
} | |||
const File file (generatedCodeFolder.getChildFile (filePath)); | |||
if (replaceFileIfDifferent (file, newData)) | |||
return addFileToGeneratedGroup (file); | |||
return Project::Item (project, ValueTree::invalid); | |||
} | |||
Project::Item addFileToGeneratedGroup (const File& file) | |||
{ | |||
Project::Item item (generatedFilesGroup.findItemForFile (file)); | |||
if (item.isValid()) | |||
return item; | |||
generatedFilesGroup.addFile (file, -1, true); | |||
return generatedFilesGroup.findItemForFile (file); | |||
} | |||
void setExtraAppConfigFileContent (const String& content) | |||
{ | |||
extraAppConfigContent = content; | |||
} | |||
static void writeAutoGenWarningComment (OutputStream& out) | |||
{ | |||
out << "/*" << newLine << newLine | |||
<< " IMPORTANT! This file is auto-generated each time you save your" << newLine | |||
<< " project - if you alter its contents, your changes may be overwritten!" << newLine | |||
<< newLine; | |||
} | |||
static const char* getGeneratedGroupID() noexcept { return "__jucelibfiles"; } | |||
Project::Item& getGeneratedCodeGroup() { return generatedFilesGroup; } | |||
static String getJuceCodeGroupName() { return "Juce Library Code"; } | |||
File getGeneratedCodeFolder() const { return generatedCodeFolder; } | |||
bool replaceFileIfDifferent (const File& f, const MemoryOutputStream& newData) | |||
{ | |||
if (! FileHelpers::overwriteFileWithNewDataIfDifferent (f, newData)) | |||
{ | |||
errors.add ("Can't write to file: " + f.getFullPathName()); | |||
return false; | |||
} | |||
return true; | |||
} | |||
private: | |||
Project& project; | |||
const File projectFile, generatedCodeFolder; | |||
Project::Item generatedFilesGroup; | |||
String extraAppConfigContent; | |||
StringArray errors; | |||
File appConfigFile, binaryDataCpp; | |||
// Recursively clears out a folder's contents, but leaves behind any folders | |||
// containing hidden files used by version-control systems. | |||
static bool deleteNonHiddenFilesIn (const File& parent) | |||
{ | |||
bool folderIsNowEmpty = true; | |||
DirectoryIterator i (parent, false, "*", File::findFilesAndDirectories); | |||
Array<File> filesToDelete; | |||
bool isFolder; | |||
while (i.next (&isFolder, nullptr, nullptr, nullptr, nullptr, nullptr)) | |||
{ | |||
const File f (i.getFile()); | |||
if (shouldFileBeKept (f.getFileName())) | |||
{ | |||
folderIsNowEmpty = false; | |||
} | |||
else if (isFolder) | |||
{ | |||
if (deleteNonHiddenFilesIn (f)) | |||
filesToDelete.add (f); | |||
else | |||
folderIsNowEmpty = false; | |||
} | |||
else | |||
{ | |||
filesToDelete.add (f); | |||
} | |||
} | |||
for (int j = filesToDelete.size(); --j >= 0;) | |||
filesToDelete.getReference(j).deleteRecursively(); | |||
return folderIsNowEmpty; | |||
} | |||
static bool shouldFileBeKept (const String& filename) | |||
{ | |||
const char* filesToKeep[] = { ".svn", ".cvs", "CMakeLists.txt" }; | |||
for (int i = 0; i < numElementsInArray (filesToKeep); ++i) | |||
if (filename == filesToKeep[i]) | |||
return true; | |||
return false; | |||
} | |||
void writeMainProjectFile() | |||
{ | |||
ScopedPointer <XmlElement> xml (project.getProjectRoot().createXml()); | |||
jassert (xml != nullptr); | |||
if (xml != nullptr) | |||
{ | |||
MemoryOutputStream mo; | |||
xml->writeToStream (mo, String::empty); | |||
replaceFileIfDifferent (projectFile, mo); | |||
} | |||
} | |||
static int findLongestModuleName (const OwnedArray<LibraryModule>& modules) | |||
{ | |||
int longest = 0; | |||
for (int i = modules.size(); --i >= 0;) | |||
longest = jmax (longest, modules.getUnchecked(i)->getID().length()); | |||
return longest; | |||
} | |||
void writeAppConfig (OutputStream& out, const OwnedArray<LibraryModule>& modules) | |||
{ | |||
writeAutoGenWarningComment (out); | |||
out << " If you want to change any of these values, use the Introjucer to do so," << newLine | |||
<< " rather than editing this file directly!" << newLine | |||
<< newLine | |||
<< " Any commented-out settings will assume their default values." << newLine | |||
<< newLine | |||
<< "*/" << newLine | |||
<< newLine; | |||
const String headerGuard ("__JUCE_APPCONFIG_" + project.getProjectUID().toUpperCase() + "__"); | |||
out << "#ifndef " << headerGuard << newLine | |||
<< "#define " << headerGuard << newLine | |||
<< newLine | |||
<< "//==============================================================================" << newLine; | |||
const int longestName = findLongestModuleName (modules); | |||
for (int k = 0; k < modules.size(); ++k) | |||
{ | |||
LibraryModule* const m = modules.getUnchecked(k); | |||
out << "#define JUCE_MODULE_AVAILABLE_" << m->getID() | |||
<< String::repeatedString (" ", longestName + 5 - m->getID().length()) << " 1" << newLine; | |||
} | |||
out << newLine; | |||
for (int j = 0; j < modules.size(); ++j) | |||
{ | |||
LibraryModule* const m = modules.getUnchecked(j); | |||
OwnedArray <Project::ConfigFlag> flags; | |||
m->getConfigFlags (project, flags); | |||
if (flags.size() > 0) | |||
{ | |||
out << "//==============================================================================" << newLine | |||
<< "// " << m->getID() << " flags:" << newLine | |||
<< newLine; | |||
for (int i = 0; i < flags.size(); ++i) | |||
{ | |||
flags.getUnchecked(i)->value.referTo (project.getConfigFlag (flags.getUnchecked(i)->symbol)); | |||
const Project::ConfigFlag* const f = flags[i]; | |||
const String value (project.getConfigFlag (f->symbol).toString()); | |||
out << "#ifndef " << f->symbol << newLine; | |||
if (value == Project::configFlagEnabled) | |||
out << " #define " << f->symbol << " 1"; | |||
else if (value == Project::configFlagDisabled) | |||
out << " #define " << f->symbol << " 0"; | |||
else | |||
out << " //#define " << f->symbol; | |||
out << newLine | |||
<< "#endif" << newLine | |||
<< newLine; | |||
} | |||
} | |||
} | |||
if (extraAppConfigContent.isNotEmpty()) | |||
out << newLine << extraAppConfigContent.trimEnd() << newLine; | |||
out << newLine | |||
<< "#endif // " << headerGuard << newLine; | |||
} | |||
void writeAppConfigFile (const OwnedArray<LibraryModule>& modules) | |||
{ | |||
appConfigFile = generatedCodeFolder.getChildFile (project.getAppConfigFilename()); | |||
MemoryOutputStream mem; | |||
writeAppConfig (mem, modules); | |||
saveGeneratedFile (project.getAppConfigFilename(), mem); | |||
} | |||
void writeAppHeader (OutputStream& out, const OwnedArray<LibraryModule>& modules) | |||
{ | |||
writeAutoGenWarningComment (out); | |||
out << " This is the header file that your files should include in order to get all the" << newLine | |||
<< " JUCE library headers. You should avoid including the JUCE headers directly in" << newLine | |||
<< " your own source files, because that wouldn't pick up the correct configuration" << newLine | |||
<< " options for your app." << newLine | |||
<< newLine | |||
<< "*/" << newLine << newLine; | |||
String headerGuard ("__APPHEADERFILE_" + project.getProjectUID().toUpperCase() + "__"); | |||
out << "#ifndef " << headerGuard << newLine | |||
<< "#define " << headerGuard << newLine << newLine; | |||
if (appConfigFile.exists()) | |||
out << CodeHelpers::createIncludeStatement (project.getAppConfigFilename()) << newLine; | |||
for (int i = 0; i < modules.size(); ++i) | |||
modules.getUnchecked(i)->writeIncludes (*this, out); | |||
if (binaryDataCpp.exists()) | |||
out << CodeHelpers::createIncludeStatement (binaryDataCpp.withFileExtension (".h"), appConfigFile) << newLine; | |||
out << newLine | |||
<< "#if ! DONT_SET_USING_JUCE_NAMESPACE" << newLine | |||
<< " // If your code uses a lot of JUCE classes, then this will obviously save you" << newLine | |||
<< " // a lot of typing, but can be disabled by setting DONT_SET_USING_JUCE_NAMESPACE." << newLine | |||
<< " using namespace juce;" << newLine | |||
<< "#endif" << newLine | |||
<< newLine | |||
<< "namespace ProjectInfo" << newLine | |||
<< "{" << newLine | |||
<< " const char* const projectName = " << CodeHelpers::addEscapeChars (project.getProjectName().toString()).quoted() << ";" << newLine | |||
<< " const char* const versionString = " << CodeHelpers::addEscapeChars (project.getVersion().toString()).quoted() << ";" << newLine | |||
<< " const int versionNumber = " << project.getVersionAsHex() << ";" << newLine | |||
<< "}" << newLine | |||
<< newLine | |||
<< "#endif // " << headerGuard << newLine; | |||
} | |||
void writeAppHeader (const OwnedArray<LibraryModule>& modules) | |||
{ | |||
MemoryOutputStream mem; | |||
writeAppHeader (mem, modules); | |||
saveGeneratedFile (project.getJuceSourceHFilename(), mem); | |||
} | |||
void writeBinaryDataFiles() | |||
{ | |||
binaryDataCpp = generatedCodeFolder.getChildFile ("BinaryData.cpp"); | |||
ResourceFile resourceFile (project); | |||
if (resourceFile.getNumFiles() > 0) | |||
{ | |||
resourceFile.setClassName ("BinaryData"); | |||
if (resourceFile.write (binaryDataCpp)) | |||
{ | |||
generatedFilesGroup.addFile (binaryDataCpp, -1, true); | |||
generatedFilesGroup.addFile (binaryDataCpp.withFileExtension (".h"), -1, false); | |||
} | |||
else | |||
{ | |||
errors.add ("Can't create binary resources file: " + binaryDataCpp.getFullPathName()); | |||
} | |||
} | |||
else | |||
{ | |||
binaryDataCpp.deleteFile(); | |||
binaryDataCpp.withFileExtension ("h").deleteFile(); | |||
} | |||
} | |||
void writeReadmeFile() | |||
{ | |||
MemoryOutputStream out; | |||
out << newLine | |||
<< " Important Note!!" << newLine | |||
<< " ================" << newLine | |||
<< newLine | |||
<< "The purpose of this folder is to contain files that are auto-generated by the Introjucer," << newLine | |||
<< "and ALL files in this folder will be mercilessly DELETED and completely re-written whenever" << newLine | |||
<< "the Introjucer saves your project." << newLine | |||
<< newLine | |||
<< "Therefore, it's a bad idea to make any manual changes to the files in here, or to" << newLine | |||
<< "put any of your own files in here if you don't want to lose them. (Of course you may choose" << newLine | |||
<< "to add the folder's contents to your version-control system so that you can re-merge your own" << newLine | |||
<< "modifications after the Introjucer has saved its changes)." << newLine; | |||
replaceFileIfDifferent (generatedCodeFolder.getChildFile ("ReadMe.txt"), out); | |||
} | |||
static void sortGroupRecursively (Project::Item group) | |||
{ | |||
group.sortAlphabetically (true); | |||
for (int i = group.getNumChildren(); --i >= 0;) | |||
sortGroupRecursively (group.getChild(i)); | |||
} | |||
void writeProjects (const OwnedArray<LibraryModule>& modules) | |||
{ | |||
// keep a copy of the basic generated files group, as each exporter may modify it. | |||
const ValueTree originalGeneratedGroup (generatedFilesGroup.state.createCopy()); | |||
for (Project::ExporterIterator exporter (project); exporter.next();) | |||
{ | |||
std::cout << "Writing files for: " << exporter->getName() << std::endl; | |||
if (exporter->getTargetFolder().createDirectory()) | |||
{ | |||
exporter->addToExtraSearchPaths (RelativePath ("JuceLibraryCode", RelativePath::projectFolder)); | |||
generatedFilesGroup.state = originalGeneratedGroup.createCopy(); | |||
project.getProjectType().prepareExporter (*exporter); | |||
for (int j = 0; j < modules.size(); ++j) | |||
modules.getUnchecked(j)->prepareExporter (*exporter, *this); | |||
sortGroupRecursively (generatedFilesGroup); | |||
exporter->groups.add (generatedFilesGroup); | |||
try | |||
{ | |||
exporter->create(); | |||
} | |||
catch (ProjectExporter::SaveError& error) | |||
{ | |||
errors.add (error.message); | |||
} | |||
} | |||
else | |||
{ | |||
errors.add ("Can't create folder: " + exporter->getTargetFolder().getFullPathName()); | |||
} | |||
} | |||
} | |||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ProjectSaver); | |||
}; | |||
#endif // __JUCER_PROJECTSAVER_JUCEHEADER__ |
@@ -0,0 +1,239 @@ | |||
/* | |||
============================================================================== | |||
This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
Copyright 2004-11 by Raw Material Software Ltd. | |||
------------------------------------------------------------------------------ | |||
JUCE can be redistributed and/or modified under the terms of the GNU General | |||
Public License (Version 2), as published by the Free Software Foundation. | |||
A copy of the license is included in the JUCE distribution, or can be found | |||
online at www.gnu.org/licenses. | |||
JUCE 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. | |||
------------------------------------------------------------------------------ | |||
To release a closed-source product which uses JUCE, commercial licenses are | |||
available: visit www.rawmaterialsoftware.com/juce for more information. | |||
============================================================================== | |||
*/ | |||
#include "jucer_ResourceFile.h" | |||
#include "../Project/jucer_ProjectTreeViewBase.h" | |||
#include "../Application/jucer_OpenDocumentManager.h" | |||
static const char* resourceFileIdentifierString = "JUCER_BINARY_RESOURCE"; | |||
//============================================================================== | |||
ResourceFile::ResourceFile (Project& project_) | |||
: project (project_), | |||
className ("BinaryData") | |||
{ | |||
addResourcesFromProjectItem (project.getMainGroup()); | |||
} | |||
ResourceFile::~ResourceFile() | |||
{ | |||
} | |||
bool ResourceFile::isResourceFile (const File& file) | |||
{ | |||
if (file.hasFileExtension ("cpp;cc;h")) | |||
{ | |||
ScopedPointer <InputStream> in (file.createInputStream()); | |||
if (in != nullptr) | |||
{ | |||
MemoryBlock mb; | |||
in->readIntoMemoryBlock (mb, 256); | |||
return mb.toString().contains (resourceFileIdentifierString); | |||
} | |||
} | |||
return false; | |||
} | |||
//============================================================================== | |||
void ResourceFile::addResourcesFromProjectItem (const Project::Item& projectItem) | |||
{ | |||
if (projectItem.isGroup()) | |||
{ | |||
for (int i = 0; i < projectItem.getNumChildren(); ++i) | |||
addResourcesFromProjectItem (projectItem.getChild(i)); | |||
} | |||
else | |||
{ | |||
if (projectItem.shouldBeAddedToBinaryResources()) | |||
addFile (projectItem.getFile(), projectItem.getImageFileID()); | |||
} | |||
} | |||
//============================================================================== | |||
void ResourceFile::setClassName (const String& className_) | |||
{ | |||
className = className_; | |||
} | |||
void ResourceFile::addFile (const File& file, const String& imageProviderId) | |||
{ | |||
files.add (file); | |||
const String variableNameRoot (CodeHelpers::makeBinaryDataIdentifierName (file)); | |||
String variableName (variableNameRoot); | |||
int suffix = 2; | |||
while (variableNames.contains (variableName)) | |||
variableName = variableNameRoot + String (suffix++); | |||
if (imageProviderId.isNotEmpty()) | |||
variableName << "|" << imageProviderId; | |||
variableNames.add (variableName); | |||
} | |||
String ResourceFile::getDataVariableFor (const File& file) const | |||
{ | |||
jassert (files.indexOf (file) >= 0); | |||
return variableNames [files.indexOf (file)]; | |||
} | |||
String ResourceFile::getSizeVariableFor (const File& file) const | |||
{ | |||
jassert (files.indexOf (file) >= 0); | |||
return variableNames [files.indexOf (file)] + "Size"; | |||
} | |||
int64 ResourceFile::getTotalDataSize() const | |||
{ | |||
int64 total = 0; | |||
for (int i = 0; i < files.size(); ++i) | |||
total += files.getReference(i).getSize(); | |||
return total; | |||
} | |||
bool ResourceFile::write (const File& cppFile, OutputStream& cpp, OutputStream& header) | |||
{ | |||
String comment; | |||
comment << newLine << newLine | |||
<< " This is an auto-generated file, created by " << JUCEApplication::getInstance()->getApplicationName() << newLine | |||
<< " Do not edit anything in this file!" << newLine << newLine | |||
<< "*/" << newLine << newLine; | |||
header << "/* =========================================================================================" | |||
<< comment; | |||
cpp << "/* ==================================== " << resourceFileIdentifierString << " ====================================" | |||
<< comment; | |||
const String namespaceName (className); | |||
cpp << "namespace " << namespaceName << newLine << "{" << newLine; | |||
header << "namespace " << namespaceName << newLine << "{" << newLine; | |||
StringArray returnCodes; | |||
for (int i = 0; i < files.size(); ++i) | |||
{ | |||
const File& file = files.getReference(i); | |||
const int64 dataSize = file.getSize(); | |||
const String variableName (variableNames[i].upToFirstOccurrenceOf ("|", false, false)); | |||
returnCodes.add ("numBytes = " + String (dataSize) + "; return " + variableName + ";"); | |||
ScopedPointer <InputStream> fileStream (file.createInputStream()); | |||
jassert (fileStream != nullptr); | |||
if (fileStream != nullptr) | |||
{ | |||
const String tempVariable ("temp_" + String::toHexString (file.hashCode())); | |||
header << " extern const char* " << variableName << ";" << newLine; | |||
header << " const int " << variableName << "Size = " << (int) dataSize << ";" << newLine << newLine; | |||
cpp << newLine << "//================== " << file.getFileName() << " ==================" << newLine | |||
<< "static const unsigned char " << tempVariable << "[] =" << newLine; | |||
{ | |||
MemoryBlock data; | |||
fileStream->readIntoMemoryBlock (data); | |||
CodeHelpers::writeDataAsCppLiteral (data, cpp, true, true); | |||
} | |||
cpp << newLine << newLine | |||
<< "const char* " << variableName << " = (const char*) " << tempVariable << ";" << newLine; | |||
} | |||
} | |||
cpp << newLine | |||
<< newLine | |||
<< "const char* getNamedResource (const char* resourceNameUTF8, int& numBytes) throw()" << newLine | |||
<< "{" << newLine; | |||
CodeHelpers::createStringMatcher (cpp, "resourceNameUTF8", variableNames, returnCodes, 4); | |||
cpp << " numBytes = 0;" << newLine | |||
<< " return 0;" << newLine | |||
<< "}" << newLine | |||
<< newLine | |||
<< "}" << newLine; | |||
header << " // If you provide the name of one of the binary resource variables above, this function will" << newLine | |||
<< " // return the corresponding data and its size (or a null pointer if the name isn't found)." << newLine | |||
<< " const char* getNamedResource (const char* resourceNameUTF8, int& dataSizeInBytes) throw();" << newLine | |||
<< newLine | |||
<< " //==============================================================================" << newLine | |||
<< " // This class acts as an ImageProvider that will access the BinaryData images" << newLine | |||
<< " class ImageProvider : public juce::ComponentBuilder::ImageProvider" << newLine | |||
<< " {" << newLine | |||
<< " public:" << newLine | |||
<< " ImageProvider() noexcept {}" << newLine | |||
<< newLine | |||
<< " juce::Image getImageForIdentifier (const juce::var& imageIdentifier)" << newLine | |||
<< " {" << newLine | |||
<< " int dataSize = 0;" << newLine | |||
<< " const char* const data = getNamedResource (imageIdentifier.toString().toUTF8(), dataSize);" << newLine | |||
<< newLine | |||
<< " if (data != nullptr)" << newLine | |||
<< " return juce::ImageCache::getFromMemory (data, dataSize);" << newLine | |||
<< newLine | |||
<< " return juce::Image();" << newLine | |||
<< " }" << newLine | |||
<< newLine | |||
<< " juce::var getIdentifierForImage (const juce::Image&) { return juce::var(); }" << newLine | |||
<< " };" << newLine | |||
<< "}" << newLine; | |||
return true; | |||
} | |||
bool ResourceFile::write (const File& cppFile) | |||
{ | |||
TemporaryFile tempH (cppFile.withFileExtension (".h"), TemporaryFile::useHiddenFile); | |||
TemporaryFile tempCpp (cppFile, TemporaryFile::useHiddenFile); | |||
ScopedPointer <FileOutputStream> cppOut (tempCpp.getFile().createOutputStream (32768)); | |||
ScopedPointer <FileOutputStream> hppOut (tempH.getFile().createOutputStream (32768)); | |||
if (cppOut != nullptr && hppOut != nullptr) | |||
{ | |||
if (write (cppFile, *cppOut, *hppOut)) | |||
{ | |||
cppOut = nullptr; | |||
hppOut = nullptr; | |||
return (tempCpp.getFile().hasIdenticalContentTo (tempCpp.getTargetFile()) || tempCpp.overwriteTargetFileWithTemporary()) | |||
&& (tempH.getFile().hasIdenticalContentTo (tempH.getTargetFile()) || tempH.overwriteTargetFileWithTemporary()); | |||
} | |||
} | |||
return false; | |||
} |
@@ -0,0 +1,71 @@ | |||
/* | |||
============================================================================== | |||
This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
Copyright 2004-11 by Raw Material Software Ltd. | |||
------------------------------------------------------------------------------ | |||
JUCE can be redistributed and/or modified under the terms of the GNU General | |||
Public License (Version 2), as published by the Free Software Foundation. | |||
A copy of the license is included in the JUCE distribution, or can be found | |||
online at www.gnu.org/licenses. | |||
JUCE 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. | |||
------------------------------------------------------------------------------ | |||
To release a closed-source product which uses JUCE, commercial licenses are | |||
available: visit www.rawmaterialsoftware.com/juce for more information. | |||
============================================================================== | |||
*/ | |||
#ifndef __JUCER_RESOURCEFILE_JUCEHEADER__ | |||
#define __JUCER_RESOURCEFILE_JUCEHEADER__ | |||
#include "../jucer_Headers.h" | |||
#include "../Project/jucer_Project.h" | |||
//============================================================================== | |||
class ResourceFile | |||
{ | |||
public: | |||
//============================================================================== | |||
ResourceFile (Project& project); | |||
~ResourceFile(); | |||
//============================================================================== | |||
static bool isResourceFile (const File& file); | |||
//============================================================================== | |||
void setClassName (const String& className); | |||
String getClassName() const { return className; } | |||
void addFile (const File& file, const String& imageProviderId); | |||
String getDataVariableFor (const File& file) const; | |||
String getSizeVariableFor (const File& file) const; | |||
int getNumFiles() const { return files.size(); } | |||
int64 getTotalDataSize() const; | |||
bool write (const File& cppFile); | |||
bool write (const File& cppFile, OutputStream& cpp, OutputStream& header); | |||
//============================================================================== | |||
private: | |||
Array<File> files; | |||
StringArray variableNames; | |||
Project& project; | |||
String className; | |||
void addResourcesFromProjectItem (const Project::Item& node); | |||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ResourceFile); | |||
}; | |||
#endif // __JUCER_RESOURCEFILE_JUCEHEADER__ |
@@ -0,0 +1,425 @@ | |||
/* | |||
============================================================================== | |||
This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
Copyright 2004-11 by Raw Material Software Ltd. | |||
------------------------------------------------------------------------------ | |||
JUCE can be redistributed and/or modified under the terms of the GNU General | |||
Public License (Version 2), as published by the Free Software Foundation. | |||
A copy of the license is included in the JUCE distribution, or can be found | |||
online at www.gnu.org/licenses. | |||
JUCE 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. | |||
------------------------------------------------------------------------------ | |||
To release a closed-source product which uses JUCE, commercial licenses are | |||
available: visit www.rawmaterialsoftware.com/juce for more information. | |||
============================================================================== | |||
*/ | |||
#ifndef __JUCER_AUDIOPLUGINMODULE_JUCEHEADER__ | |||
#define __JUCER_AUDIOPLUGINMODULE_JUCEHEADER__ | |||
//============================================================================== | |||
namespace | |||
{ | |||
Value shouldBuildVST (const Project& project) { return project.getProjectValue ("buildVST"); } | |||
Value shouldBuildRTAS (const Project& project) { return project.getProjectValue ("buildRTAS"); } | |||
Value shouldBuildAU (const Project& project) { return project.getProjectValue ("buildAU"); } | |||
Value getPluginName (const Project& project) { return project.getProjectValue ("pluginName"); } | |||
Value getPluginDesc (const Project& project) { return project.getProjectValue ("pluginDesc"); } | |||
Value getPluginManufacturer (const Project& project) { return project.getProjectValue ("pluginManufacturer"); } | |||
Value getPluginManufacturerCode (const Project& project) { return project.getProjectValue ("pluginManufacturerCode"); } | |||
Value getPluginCode (const Project& project) { return project.getProjectValue ("pluginCode"); } | |||
Value getPluginChannelConfigs (const Project& project) { return project.getProjectValue ("pluginChannelConfigs"); } | |||
Value getPluginIsSynth (const Project& project) { return project.getProjectValue ("pluginIsSynth"); } | |||
Value getPluginWantsMidiInput (const Project& project) { return project.getProjectValue ("pluginWantsMidiIn"); } | |||
Value getPluginProducesMidiOut (const Project& project) { return project.getProjectValue ("pluginProducesMidiOut"); } | |||
Value getPluginSilenceInProducesSilenceOut (const Project& project) { return project.getProjectValue ("pluginSilenceInIsSilenceOut"); } | |||
Value getPluginTailLengthSeconds (const Project& project) { return project.getProjectValue ("pluginTailLength"); } | |||
Value getPluginEditorNeedsKeyFocus (const Project& project) { return project.getProjectValue ("pluginEditorRequiresKeys"); } | |||
Value getPluginAUExportPrefix (const Project& project) { return project.getProjectValue ("pluginAUExportPrefix"); } | |||
Value getPluginAUCocoaViewClassName (const Project& project) { return project.getProjectValue ("pluginAUViewClass"); } | |||
Value getPluginRTASCategory (const Project& project) { return project.getProjectValue ("pluginRTASCategory"); } | |||
String getPluginRTASCategoryCode (const Project& project) | |||
{ | |||
if (static_cast <bool> (getPluginIsSynth (project).getValue())) | |||
return "ePlugInCategory_SWGenerators"; | |||
String s (getPluginRTASCategory (project).toString()); | |||
if (s.isEmpty()) | |||
s = "ePlugInCategory_None"; | |||
return s; | |||
} | |||
int countMaxPluginChannels (const String& configString, bool isInput) | |||
{ | |||
StringArray configs; | |||
configs.addTokens (configString, ", {}", String::empty); | |||
configs.trim(); | |||
configs.removeEmptyStrings(); | |||
jassert ((configs.size() & 1) == 0); // looks like a syntax error in the configs? | |||
int maxVal = 0; | |||
for (int i = (isInput ? 0 : 1); i < configs.size(); i += 2) | |||
maxVal = jmax (maxVal, configs[i].getIntValue()); | |||
return maxVal; | |||
} | |||
String valueToBool (const Value& v) | |||
{ | |||
return static_cast<bool> (v.getValue()) ? "1" : "0"; | |||
} | |||
void writePluginCharacteristicsFile (ProjectSaver& projectSaver) | |||
{ | |||
Project& project = projectSaver.getProject(); | |||
StringPairArray flags; | |||
flags.set ("JucePlugin_Build_VST", valueToBool (shouldBuildVST (project))); | |||
flags.set ("JucePlugin_Build_AU", valueToBool (shouldBuildAU (project))); | |||
flags.set ("JucePlugin_Build_RTAS", valueToBool (shouldBuildRTAS (project))); | |||
flags.set ("JucePlugin_Name", getPluginName (project).toString().quoted()); | |||
flags.set ("JucePlugin_Desc", getPluginDesc (project).toString().quoted()); | |||
flags.set ("JucePlugin_Manufacturer", getPluginManufacturer (project).toString().quoted()); | |||
flags.set ("JucePlugin_ManufacturerCode", getPluginManufacturerCode (project).toString().trim().substring (0, 4).quoted ('\'')); | |||
flags.set ("JucePlugin_PluginCode", getPluginCode (project).toString().trim().substring (0, 4).quoted ('\'')); | |||
flags.set ("JucePlugin_MaxNumInputChannels", String (countMaxPluginChannels (getPluginChannelConfigs (project).toString(), true))); | |||
flags.set ("JucePlugin_MaxNumOutputChannels", String (countMaxPluginChannels (getPluginChannelConfigs (project).toString(), false))); | |||
flags.set ("JucePlugin_PreferredChannelConfigurations", getPluginChannelConfigs (project).toString()); | |||
flags.set ("JucePlugin_IsSynth", valueToBool (getPluginIsSynth (project))); | |||
flags.set ("JucePlugin_WantsMidiInput", valueToBool (getPluginWantsMidiInput (project))); | |||
flags.set ("JucePlugin_ProducesMidiOutput", valueToBool (getPluginProducesMidiOut (project))); | |||
flags.set ("JucePlugin_SilenceInProducesSilenceOut", valueToBool (getPluginSilenceInProducesSilenceOut (project))); | |||
flags.set ("JucePlugin_TailLengthSeconds", String (static_cast <double> (getPluginTailLengthSeconds (project).getValue()))); | |||
flags.set ("JucePlugin_EditorRequiresKeyboardFocus", valueToBool (getPluginEditorNeedsKeyFocus (project))); | |||
flags.set ("JucePlugin_VersionCode", project.getVersionAsHex()); | |||
flags.set ("JucePlugin_VersionString", project.getVersion().toString().quoted()); | |||
flags.set ("JucePlugin_VSTUniqueID", "JucePlugin_PluginCode"); | |||
flags.set ("JucePlugin_VSTCategory", static_cast <bool> (getPluginIsSynth (project).getValue()) ? "kPlugCategSynth" : "kPlugCategEffect"); | |||
flags.set ("JucePlugin_AUMainType", static_cast <bool> (getPluginIsSynth (project).getValue()) ? "kAudioUnitType_MusicDevice" : "kAudioUnitType_Effect"); | |||
flags.set ("JucePlugin_AUSubType", "JucePlugin_PluginCode"); | |||
flags.set ("JucePlugin_AUExportPrefix", getPluginAUExportPrefix (project).toString()); | |||
flags.set ("JucePlugin_AUExportPrefixQuoted", getPluginAUExportPrefix (project).toString().quoted()); | |||
flags.set ("JucePlugin_AUManufacturerCode", "JucePlugin_ManufacturerCode"); | |||
flags.set ("JucePlugin_CFBundleIdentifier", project.getBundleIdentifier().toString()); | |||
flags.set ("JucePlugin_AUCocoaViewClassName", getPluginAUCocoaViewClassName (project).toString()); | |||
flags.set ("JucePlugin_RTASCategory", getPluginRTASCategoryCode (project)); | |||
flags.set ("JucePlugin_RTASManufacturerCode", "JucePlugin_ManufacturerCode"); | |||
flags.set ("JucePlugin_RTASProductId", "JucePlugin_PluginCode"); | |||
MemoryOutputStream mem; | |||
mem << "//==============================================================================" << newLine | |||
<< "// Audio plugin settings.." << newLine | |||
<< newLine; | |||
for (int i = 0; i < flags.size(); ++i) | |||
{ | |||
mem << "#ifndef " << flags.getAllKeys()[i] << newLine | |||
<< " #define " << flags.getAllKeys()[i].paddedRight (' ', 32) << " " | |||
<< flags.getAllValues()[i] << newLine | |||
<< "#endif" << newLine; | |||
} | |||
projectSaver.setExtraAppConfigFileContent (mem.toString()); | |||
} | |||
} | |||
//============================================================================== | |||
namespace VSTHelpers | |||
{ | |||
static Value getVSTFolder (const ProjectExporter& exporter) { return exporter.getSetting (Ids::vstFolder); } | |||
static void addVSTFolderToPath (const ProjectExporter& exporter, StringArray& searchPaths) | |||
{ | |||
const String vstFolder (getVSTFolder (exporter).toString()); | |||
if (vstFolder.isNotEmpty()) | |||
{ | |||
RelativePath path (exporter.rebaseFromProjectFolderToBuildTarget (RelativePath (vstFolder, RelativePath::projectFolder))); | |||
if (exporter.isVisualStudio()) | |||
searchPaths.add (path.toWindowsStyle()); | |||
else if (exporter.isLinux() || exporter.isXcode()) | |||
searchPaths.insert (0, path.toUnixStyle()); | |||
} | |||
} | |||
static void createVSTPathEditor (const ProjectExporter& exporter, PropertyListBuilder& props) | |||
{ | |||
props.add (new TextPropertyComponent (getVSTFolder (exporter), "VST Folder", 1024, false), | |||
"If you're building a VST, this must be the folder containing the VST SDK. This should be an absolute path."); | |||
} | |||
static void fixMissingVSTValues (const ProjectExporter& exporter) | |||
{ | |||
if (getVSTFolder(exporter).toString().isEmpty()) | |||
getVSTFolder(exporter) = (exporter.isVisualStudio() ? "c:\\SDKs\\vstsdk2.4" | |||
: "~/SDKs/vstsdk2.4"); | |||
} | |||
static void prepareExporter (ProjectExporter& exporter, ProjectSaver& projectSaver) | |||
{ | |||
fixMissingVSTValues (exporter); | |||
writePluginCharacteristicsFile (projectSaver); | |||
exporter.makefileTargetSuffix = ".so"; | |||
Project::Item group (Project::Item::createGroup (const_cast<ProjectExporter&> (exporter).getProject(), | |||
"Juce VST Wrapper", "__jucevstfiles")); | |||
RelativePath juceWrapperFolder (exporter.getProject().getGeneratedCodeFolder(), | |||
exporter.getTargetFolder(), RelativePath::buildTargetFolder); | |||
addVSTFolderToPath (exporter, exporter.extraSearchPaths); | |||
if (exporter.isVisualStudio()) | |||
exporter.extraSearchPaths.add (juceWrapperFolder.toWindowsStyle()); | |||
else if (exporter.isLinux()) | |||
exporter.extraSearchPaths.add (juceWrapperFolder.toUnixStyle()); | |||
} | |||
static void createPropertyEditors (const ProjectExporter& exporter, PropertyListBuilder& props) | |||
{ | |||
fixMissingVSTValues (exporter); | |||
createVSTPathEditor (exporter, props); | |||
} | |||
} | |||
//============================================================================== | |||
namespace RTASHelpers | |||
{ | |||
static Value getRTASFolder (const ProjectExporter& exporter) { return exporter.getSetting (Ids::rtasFolder); } | |||
static void fixMissingRTASValues (const ProjectExporter& exporter) | |||
{ | |||
if (getRTASFolder (exporter).toString().isEmpty()) | |||
{ | |||
if (exporter.isVisualStudio()) | |||
getRTASFolder (exporter) = "c:\\SDKs\\PT_80_SDK"; | |||
else | |||
getRTASFolder (exporter) = "~/SDKs/PT_80_SDK"; | |||
} | |||
} | |||
static void addExtraSearchPaths (ProjectExporter& exporter) | |||
{ | |||
RelativePath rtasFolder (getRTASFolder (exporter).toString(), RelativePath::projectFolder); | |||
if (exporter.isVisualStudio()) | |||
{ | |||
RelativePath juceWrapperFolder (exporter.getProject().getGeneratedCodeFolder(), | |||
exporter.getTargetFolder(), RelativePath::buildTargetFolder); | |||
exporter.extraSearchPaths.add (juceWrapperFolder.toWindowsStyle()); | |||
const char* p[] = { "AlturaPorts/TDMPlugins/PluginLibrary/EffectClasses", | |||
"AlturaPorts/TDMPlugins/PluginLibrary/ProcessClasses", | |||
"AlturaPorts/TDMPlugins/PluginLibrary/ProcessClasses/Interfaces", | |||
"AlturaPorts/TDMPlugins/PluginLibrary/Utilities", | |||
"AlturaPorts/TDMPlugins/PluginLibrary/RTASP_Adapt", | |||
"AlturaPorts/TDMPlugins/PluginLibrary/CoreClasses", | |||
"AlturaPorts/TDMPlugins/PluginLibrary/Controls", | |||
"AlturaPorts/TDMPlugins/PluginLibrary/Meters", | |||
"AlturaPorts/TDMPlugins/PluginLibrary/ViewClasses", | |||
"AlturaPorts/TDMPlugins/PluginLibrary/DSPClasses", | |||
"AlturaPorts/TDMPlugins/PluginLibrary/Interfaces", | |||
"AlturaPorts/TDMPlugins/common", | |||
"AlturaPorts/TDMPlugins/common/Platform", | |||
"AlturaPorts/TDMPlugins/SignalProcessing/Public", | |||
"AlturaPorts/TDMPlugIns/DSPManager/Interfaces", | |||
"AlturaPorts/SADriver/Interfaces", | |||
"AlturaPorts/DigiPublic/Interfaces", | |||
"AlturaPorts/Fic/Interfaces/DAEClient", | |||
"AlturaPorts/NewFileLibs/Cmn", | |||
"AlturaPorts/NewFileLibs/DOA", | |||
"AlturaPorts/AlturaSource/PPC_H", | |||
"AlturaPorts/AlturaSource/AppSupport", | |||
"AvidCode/AVX2sdk/AVX/avx2/avx2sdk/inc", | |||
"xplat/AVX/avx2/avx2sdk/inc" }; | |||
for (int i = 0; i < numElementsInArray (p); ++i) | |||
exporter.addToExtraSearchPaths (rtasFolder.getChildFile (p[i])); | |||
} | |||
else if (exporter.isXcode()) | |||
{ | |||
exporter.extraSearchPaths.add ("/Developer/Headers/FlatCarbon"); | |||
const char* p[] = { "AlturaPorts/TDMPlugIns/PlugInLibrary/Controls", | |||
"AlturaPorts/TDMPlugIns/PlugInLibrary/CoreClasses", | |||
"AlturaPorts/TDMPlugIns/PlugInLibrary/DSPClasses", | |||
"AlturaPorts/TDMPlugIns/PlugInLibrary/EffectClasses", | |||
"AlturaPorts/TDMPlugIns/PlugInLibrary/MacBuild", | |||
"AlturaPorts/TDMPlugIns/PlugInLibrary/Meters", | |||
"AlturaPorts/TDMPlugIns/PlugInLibrary/ProcessClasses", | |||
"AlturaPorts/TDMPlugIns/PlugInLibrary/ProcessClasses/Interfaces", | |||
"AlturaPorts/TDMPlugIns/PlugInLibrary/RTASP_Adapt", | |||
"AlturaPorts/TDMPlugIns/PlugInLibrary/Utilities", | |||
"AlturaPorts/TDMPlugIns/PlugInLibrary/ViewClasses", | |||
"AlturaPorts/TDMPlugIns/DSPManager/**", | |||
"AlturaPorts/TDMPlugIns/SupplementalPlugInLib/Encryption", | |||
"AlturaPorts/TDMPlugIns/SupplementalPlugInLib/GraphicsExtensions", | |||
"AlturaPorts/TDMPlugIns/common/**", | |||
"AlturaPorts/TDMPlugIns/common/PI_LibInterface", | |||
"AlturaPorts/TDMPlugIns/PACEProtection/**", | |||
"AlturaPorts/TDMPlugIns/SignalProcessing/**", | |||
"AlturaPorts/OMS/Headers", | |||
"AlturaPorts/Fic/Interfaces/**", | |||
"AlturaPorts/Fic/Source/SignalNets", | |||
"AlturaPorts/DSIPublicInterface/PublicHeaders", | |||
"DAEWin/Include", | |||
"AlturaPorts/DigiPublic/Interfaces", | |||
"AlturaPorts/DigiPublic", | |||
"AlturaPorts/NewFileLibs/DOA", | |||
"AlturaPorts/NewFileLibs/Cmn", | |||
"xplat/AVX/avx2/avx2sdk/inc", | |||
"xplat/AVX/avx2/avx2sdk/utils" }; | |||
for (int i = 0; i < numElementsInArray (p); ++i) | |||
exporter.addToExtraSearchPaths (rtasFolder.getChildFile (p[i])); | |||
} | |||
} | |||
static void prepareExporter (ProjectExporter& exporter, ProjectSaver& projectSaver, const File& moduleFolder) | |||
{ | |||
fixMissingRTASValues (exporter); | |||
exporter.xcodeCanUseDwarf = false; | |||
exporter.msvcTargetSuffix = ".dpm"; | |||
exporter.msvcNeedsDLLRuntimeLib = true; | |||
RelativePath rtasFolder (getRTASFolder (exporter).toString(), RelativePath::projectFolder); | |||
exporter.msvcExtraPreprocessorDefs.set ("JucePlugin_WinBag_path", CodeHelpers::addEscapeChars (rtasFolder.getChildFile ("WinBag") | |||
.toWindowsStyle().quoted())); | |||
String msvcPathToRTASFolder (exporter.getJucePathFromTargetFolder() | |||
.getChildFile ("modules/juce_audio_plugin_client/RTAS") | |||
.toWindowsStyle() + "\\"); | |||
exporter.msvcDelayLoadedDLLs = "DAE.dll; DigiExt.dll; DSI.dll; PluginLib.dll; DSPManager.dll"; | |||
for (ProjectExporter::ConfigIterator config (exporter); config.next();) | |||
{ | |||
config->msvcExtraLinkerOptions = "/FORCE:multiple"; | |||
config->msvcModuleDefinitionFile = msvcPathToRTASFolder + "juce_RTAS_WinExports.def"; | |||
if (config->msvcPostBuildCommand.isEmpty()) | |||
config->msvcPostBuildCommand = "copy /Y \"" + msvcPathToRTASFolder + "juce_RTAS_WinResources.rsr" | |||
+ "\" \"$(TargetPath)\".rsr"; | |||
} | |||
exporter.xcodeExtraLibrariesDebug.add (rtasFolder.getChildFile ("MacBag/Libs/Debug/libPluginLibrary.a")); | |||
exporter.xcodeExtraLibrariesRelease.add (rtasFolder.getChildFile ("MacBag/Libs/Release/libPluginLibrary.a")); | |||
writePluginCharacteristicsFile (projectSaver); | |||
addExtraSearchPaths (exporter); | |||
} | |||
static void createPropertyEditors (const ProjectExporter& exporter, PropertyListBuilder& props) | |||
{ | |||
if (exporter.isXcode() || exporter.isVisualStudio()) | |||
{ | |||
fixMissingRTASValues (exporter); | |||
props.add (new TextPropertyComponent (getRTASFolder (exporter), "RTAS Folder", 1024, false), | |||
"If you're building an RTAS, this must be the folder containing the RTAS SDK. This should be an absolute path."); | |||
} | |||
} | |||
} | |||
//============================================================================== | |||
namespace AUHelpers | |||
{ | |||
static void prepareExporter (ProjectExporter& exporter, ProjectSaver& projectSaver) | |||
{ | |||
writePluginCharacteristicsFile (projectSaver); | |||
if (exporter.isXcode()) | |||
{ | |||
exporter.extraSearchPaths.add ("$(DEVELOPER_DIR)/Extras/CoreAudio/PublicUtility"); | |||
exporter.extraSearchPaths.add ("$(DEVELOPER_DIR)/Extras/CoreAudio/AudioUnits/AUPublic/Utility"); | |||
exporter.xcodeFrameworks.addTokens ("AudioUnit CoreAudioKit", false); | |||
Project::Item subGroup (projectSaver.getGeneratedCodeGroup().addNewSubGroup ("Juce AU Wrapper", -1)); | |||
subGroup.setID ("__juceappleaufiles"); | |||
{ | |||
#define JUCE_AU_PUBLICUTILITY "${DEVELOPER_DIR}/Extras/CoreAudio/PublicUtility/" | |||
#define JUCE_AU_PUBLIC "${DEVELOPER_DIR}/Extras/CoreAudio/AudioUnits/AUPublic/" | |||
const char* appleAUFiles[] = { JUCE_AU_PUBLICUTILITY "CADebugMacros.h", | |||
JUCE_AU_PUBLICUTILITY "CAAUParameter.cpp", | |||
JUCE_AU_PUBLICUTILITY "CAAUParameter.h", | |||
JUCE_AU_PUBLICUTILITY "CAAudioChannelLayout.cpp", | |||
JUCE_AU_PUBLICUTILITY "CAAudioChannelLayout.h", | |||
JUCE_AU_PUBLICUTILITY "CAMutex.cpp", | |||
JUCE_AU_PUBLICUTILITY "CAMutex.h", | |||
JUCE_AU_PUBLICUTILITY "CAStreamBasicDescription.cpp", | |||
JUCE_AU_PUBLICUTILITY "CAStreamBasicDescription.h", | |||
JUCE_AU_PUBLICUTILITY "CAVectorUnitTypes.h", | |||
JUCE_AU_PUBLICUTILITY "CAVectorUnit.cpp", | |||
JUCE_AU_PUBLICUTILITY "CAVectorUnit.h", | |||
JUCE_AU_PUBLIC "AUViewBase/AUViewLocalizedStringKeys.h", | |||
JUCE_AU_PUBLIC "AUCarbonViewBase/AUCarbonViewDispatch.cpp", | |||
JUCE_AU_PUBLIC "AUCarbonViewBase/AUCarbonViewControl.cpp", | |||
JUCE_AU_PUBLIC "AUCarbonViewBase/AUCarbonViewControl.h", | |||
JUCE_AU_PUBLIC "AUCarbonViewBase/CarbonEventHandler.cpp", | |||
JUCE_AU_PUBLIC "AUCarbonViewBase/CarbonEventHandler.h", | |||
JUCE_AU_PUBLIC "AUCarbonViewBase/AUCarbonViewBase.cpp", | |||
JUCE_AU_PUBLIC "AUCarbonViewBase/AUCarbonViewBase.h", | |||
JUCE_AU_PUBLIC "AUBase/AUBase.cpp", | |||
JUCE_AU_PUBLIC "AUBase/AUBase.h", | |||
JUCE_AU_PUBLIC "AUBase/AUDispatch.cpp", | |||
JUCE_AU_PUBLIC "AUBase/AUDispatch.h", | |||
JUCE_AU_PUBLIC "AUBase/AUInputElement.cpp", | |||
JUCE_AU_PUBLIC "AUBase/AUInputElement.h", | |||
JUCE_AU_PUBLIC "AUBase/AUOutputElement.cpp", | |||
JUCE_AU_PUBLIC "AUBase/AUOutputElement.h", | |||
JUCE_AU_PUBLIC "AUBase/AUResources.r", | |||
JUCE_AU_PUBLIC "AUBase/AUScopeElement.cpp", | |||
JUCE_AU_PUBLIC "AUBase/AUScopeElement.h", | |||
JUCE_AU_PUBLIC "AUBase/ComponentBase.cpp", | |||
JUCE_AU_PUBLIC "AUBase/ComponentBase.h", | |||
JUCE_AU_PUBLIC "OtherBases/AUMIDIBase.cpp", | |||
JUCE_AU_PUBLIC "OtherBases/AUMIDIBase.h", | |||
JUCE_AU_PUBLIC "OtherBases/AUMIDIEffectBase.cpp", | |||
JUCE_AU_PUBLIC "OtherBases/AUMIDIEffectBase.h", | |||
JUCE_AU_PUBLIC "OtherBases/AUOutputBase.cpp", | |||
JUCE_AU_PUBLIC "OtherBases/AUOutputBase.h", | |||
JUCE_AU_PUBLIC "OtherBases/MusicDeviceBase.cpp", | |||
JUCE_AU_PUBLIC "OtherBases/MusicDeviceBase.h", | |||
JUCE_AU_PUBLIC "OtherBases/AUEffectBase.cpp", | |||
JUCE_AU_PUBLIC "OtherBases/AUEffectBase.h", | |||
JUCE_AU_PUBLIC "Utility/AUBuffer.cpp", | |||
JUCE_AU_PUBLIC "Utility/AUBuffer.h", | |||
JUCE_AU_PUBLIC "Utility/AUInputFormatConverter.h", | |||
JUCE_AU_PUBLIC "Utility/AUSilentTimeout.h", | |||
JUCE_AU_PUBLIC "Utility/AUTimestampGenerator.h", 0 }; | |||
for (const char** f = appleAUFiles; *f != 0; ++f) | |||
{ | |||
const RelativePath file (*f, RelativePath::projectFolder); | |||
subGroup.addRelativeFile (file, -1, file.hasFileExtension ("cpp;mm")); | |||
subGroup.getChild (subGroup.getNumChildren() - 1).getShouldInhibitWarningsValue() = true; | |||
} | |||
} | |||
} | |||
} | |||
} | |||
#endif // __JUCER_AUDIOPLUGINMODULE_JUCEHEADER__ |
@@ -2,7 +2,7 @@ | |||
============================================================================== | |||
This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
Copyright 2004-10 by Raw Material Software Ltd. | |||
Copyright 2004-11 by Raw Material Software Ltd. | |||
------------------------------------------------------------------------------ | |||
@@ -34,12 +34,12 @@ GroupInformationComponent::GroupInformationComponent (const Project::Item& item_ | |||
addAndMakeVisible (&list); | |||
list.updateContent(); | |||
list.setRowHeight (20); | |||
item.getNode().addListener (this); | |||
item.state.addListener (this); | |||
} | |||
GroupInformationComponent::~GroupInformationComponent() | |||
{ | |||
item.getNode().removeListener (this); | |||
item.state.removeListener (this); | |||
} | |||
void GroupInformationComponent::resized() | |||
@@ -2,7 +2,7 @@ | |||
============================================================================== | |||
This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
Copyright 2004-10 by Raw Material Software Ltd. | |||
Copyright 2004-11 by Raw Material Software Ltd. | |||
------------------------------------------------------------------------------ | |||
@@ -0,0 +1,675 @@ | |||
/* | |||
============================================================================== | |||
This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
Copyright 2004-11 by Raw Material Software Ltd. | |||
------------------------------------------------------------------------------ | |||
JUCE can be redistributed and/or modified under the terms of the GNU General | |||
Public License (Version 2), as published by the Free Software Foundation. | |||
A copy of the license is included in the JUCE distribution, or can be found | |||
online at www.gnu.org/licenses. | |||
JUCE 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. | |||
------------------------------------------------------------------------------ | |||
To release a closed-source product which uses JUCE, commercial licenses are | |||
available: visit www.rawmaterialsoftware.com/juce for more information. | |||
============================================================================== | |||
*/ | |||
#include "jucer_Module.h" | |||
#include "jucer_ProjectType.h" | |||
#include "../Project Saving/jucer_ProjectExporter.h" | |||
#include "../Project Saving/jucer_ProjectSaver.h" | |||
#include "jucer_AudioPluginModule.h" | |||
//============================================================================== | |||
ModuleList::ModuleList() | |||
{ | |||
} | |||
ModuleList::ModuleList (const ModuleList& other) | |||
: moduleFolder (other.moduleFolder) | |||
{ | |||
modules.addCopiesOf (other.modules); | |||
} | |||
ModuleList& ModuleList::operator= (const ModuleList& other) | |||
{ | |||
moduleFolder = other.moduleFolder; | |||
modules.clear(); | |||
modules.addCopiesOf (other.modules); | |||
return *this; | |||
} | |||
bool ModuleList::operator== (const ModuleList& other) const | |||
{ | |||
if (modules.size() != other.modules.size()) | |||
return false; | |||
for (int i = modules.size(); --i >= 0;) | |||
{ | |||
const Module* m1 = modules.getUnchecked(i); | |||
const Module* m2 = other.findModuleInfo (m1->uid); | |||
if (m2 == nullptr || *m1 != *m2) | |||
return false; | |||
} | |||
return true; | |||
} | |||
bool ModuleList::isLocalModulesFolderValid() | |||
{ | |||
return isModulesFolder (getModulesFolderForJuceOrModulesFolder (getLocalModulesFolder (nullptr))); | |||
} | |||
bool ModuleList::isJuceFolder (const File& folder) | |||
{ | |||
return folder.getFileName().containsIgnoreCase ("juce") | |||
&& isModulesFolder (folder.getChildFile ("modules")); | |||
} | |||
bool ModuleList::isModulesFolder (const File& folder) | |||
{ | |||
return folder.getFileName().equalsIgnoreCase ("modules") | |||
&& folder.isDirectory(); | |||
} | |||
bool ModuleList::isJuceOrModulesFolder (const File& folder) | |||
{ | |||
return isJuceFolder (folder) || isModulesFolder (folder); | |||
} | |||
File ModuleList::getModulesFolderForJuceOrModulesFolder (const File& f) | |||
{ | |||
if (f.getFileName() != "modules" && f.isDirectory() && f.getChildFile ("modules").isDirectory()) | |||
return f.getChildFile ("modules"); | |||
return f; | |||
} | |||
File ModuleList::getDefaultModulesFolder (Project* project) | |||
{ | |||
if (project != nullptr) | |||
{ | |||
ScopedPointer <ProjectExporter> exp (ProjectExporter::createPlatformDefaultExporter (*project)); | |||
if (exp != nullptr) | |||
{ | |||
File f (project->resolveFilename (exp->getJuceFolder().toString())); | |||
f = getModulesFolderForJuceOrModulesFolder (f); | |||
if (ModuleList::isModulesFolder (f)) | |||
return f; | |||
} | |||
} | |||
#if JUCE_WINDOWS | |||
return File::getSpecialLocation (File::userDocumentsDirectory) | |||
#else | |||
return File::getSpecialLocation (File::userHomeDirectory) | |||
#endif | |||
.getChildFile ("juce") | |||
.getChildFile ("modules"); | |||
} | |||
File ModuleList::getLocalModulesFolder (Project* project) | |||
{ | |||
File defaultJuceFolder (getDefaultModulesFolder (project)); | |||
File f (StoredSettings::getInstance()->getProps().getValue ("lastJuceFolder", defaultJuceFolder.getFullPathName())); | |||
f = getModulesFolderForJuceOrModulesFolder (f); | |||
if ((! ModuleList::isModulesFolder (f)) && ModuleList::isModulesFolder (defaultJuceFolder)) | |||
f = defaultJuceFolder; | |||
return f; | |||
} | |||
File ModuleList::getModuleFolder (const String& uid) const | |||
{ | |||
return getModulesFolder().getChildFile (uid); | |||
} | |||
void ModuleList::setLocalModulesFolder (const File& file) | |||
{ | |||
//jassert (FileHelpers::isJuceFolder (file)); | |||
StoredSettings::getInstance()->getProps().setValue ("lastJuceFolder", file.getFullPathName()); | |||
} | |||
struct ModuleSorter | |||
{ | |||
static int compareElements (const ModuleList::Module* m1, const ModuleList::Module* m2) | |||
{ | |||
return m1->uid.compareIgnoreCase (m2->uid); | |||
} | |||
}; | |||
void ModuleList::sort() | |||
{ | |||
ModuleSorter sorter; | |||
modules.sort (sorter); | |||
} | |||
void ModuleList::rescan() | |||
{ | |||
rescan (moduleFolder); | |||
} | |||
void ModuleList::rescan (const File& newModulesFolder) | |||
{ | |||
modules.clear(); | |||
moduleFolder = getModulesFolderForJuceOrModulesFolder (newModulesFolder); | |||
if (moduleFolder.isDirectory()) | |||
{ | |||
DirectoryIterator iter (moduleFolder, false, "*", File::findDirectories); | |||
while (iter.next()) | |||
{ | |||
const File moduleDef (iter.getFile().getChildFile (LibraryModule::getInfoFileName())); | |||
if (moduleDef.exists()) | |||
{ | |||
LibraryModule m (moduleDef); | |||
jassert (m.isValid()); | |||
if (m.isValid()) | |||
{ | |||
Module* info = new Module(); | |||
modules.add (info); | |||
info->uid = m.getID(); | |||
info->version = m.getVersion(); | |||
info->name = m.moduleInfo ["name"]; | |||
info->description = m.moduleInfo ["description"]; | |||
info->file = moduleDef; | |||
} | |||
} | |||
} | |||
} | |||
sort(); | |||
} | |||
bool ModuleList::loadFromWebsite() | |||
{ | |||
modules.clear(); | |||
URL baseURL ("http://www.rawmaterialsoftware.com/juce/modules"); | |||
URL url (baseURL.getChildURL ("modulelist.php")); | |||
var infoList (JSON::parse (url.readEntireTextStream (false))); | |||
if (infoList.isArray()) | |||
{ | |||
const Array<var>* moduleList = infoList.getArray(); | |||
for (int i = 0; i < moduleList->size(); ++i) | |||
{ | |||
const var& m = moduleList->getReference(i); | |||
const String file (m ["file"].toString()); | |||
if (file.isNotEmpty()) | |||
{ | |||
var moduleInfo (m ["info"]); | |||
LibraryModule lm (moduleInfo); | |||
if (lm.isValid()) | |||
{ | |||
Module* info = new Module(); | |||
modules.add (info); | |||
info->uid = lm.getID(); | |||
info->version = lm.getVersion(); | |||
info->name = lm.getName(); | |||
info->description = lm.getDescription(); | |||
info->url = baseURL.getChildURL (file); | |||
} | |||
} | |||
} | |||
} | |||
sort(); | |||
return infoList.isArray(); | |||
} | |||
LibraryModule* ModuleList::Module::create() const | |||
{ | |||
return new LibraryModule (file); | |||
} | |||
bool ModuleList::Module::operator== (const Module& other) const | |||
{ | |||
return uid == other.uid | |||
&& version == other.version | |||
&& name == other.name | |||
&& description == other.description | |||
&& file == other.file | |||
&& url == other.url; | |||
} | |||
bool ModuleList::Module::operator!= (const Module& other) const | |||
{ | |||
return ! operator== (other); | |||
} | |||
LibraryModule* ModuleList::loadModule (const String& uid) const | |||
{ | |||
const Module* const m = findModuleInfo (uid); | |||
return m != nullptr ? m->create() : nullptr; | |||
} | |||
const ModuleList::Module* ModuleList::findModuleInfo (const String& uid) const | |||
{ | |||
for (int i = modules.size(); --i >= 0;) | |||
if (modules.getUnchecked(i)->uid == uid) | |||
return modules.getUnchecked(i); | |||
return nullptr; | |||
} | |||
void ModuleList::getDependencies (const String& moduleID, StringArray& dependencies) const | |||
{ | |||
ScopedPointer<LibraryModule> m (loadModule (moduleID)); | |||
if (m != nullptr) | |||
{ | |||
const var depsArray (m->moduleInfo ["dependencies"]); | |||
const Array<var>* const deps = depsArray.getArray(); | |||
if (deps != nullptr) | |||
{ | |||
for (int i = 0; i < deps->size(); ++i) | |||
{ | |||
const var& d = deps->getReference(i); | |||
String uid (d ["id"].toString()); | |||
String version (d ["version"].toString()); | |||
if (! dependencies.contains (uid, true)) | |||
{ | |||
dependencies.add (uid); | |||
getDependencies (uid, dependencies); | |||
} | |||
} | |||
} | |||
} | |||
} | |||
void ModuleList::createDependencies (const String& moduleID, OwnedArray<LibraryModule>& modules) const | |||
{ | |||
ScopedPointer<LibraryModule> m (loadModule (moduleID)); | |||
if (m != nullptr) | |||
{ | |||
var depsArray (m->moduleInfo ["dependencies"]); | |||
const Array<var>* const deps = depsArray.getArray(); | |||
for (int i = 0; i < deps->size(); ++i) | |||
{ | |||
const var& d = deps->getReference(i); | |||
String uid (d ["id"].toString()); | |||
String version (d ["version"].toString()); | |||
//xxx to do - also need to find version conflicts | |||
jassertfalse | |||
} | |||
} | |||
} | |||
StringArray ModuleList::getExtraDependenciesNeeded (Project& project, const ModuleList::Module& m) | |||
{ | |||
StringArray dependencies, extraDepsNeeded; | |||
getDependencies (m.uid, dependencies); | |||
for (int i = 0; i < dependencies.size(); ++i) | |||
if ((! project.isModuleEnabled (dependencies[i])) && dependencies[i] != m.uid) | |||
extraDepsNeeded.add (dependencies[i]); | |||
return extraDepsNeeded; | |||
} | |||
//============================================================================== | |||
LibraryModule::LibraryModule (const File& file) | |||
: moduleInfo (JSON::parse (file)), | |||
moduleFile (file), | |||
moduleFolder (file.getParentDirectory()) | |||
{ | |||
jassert (isValid()); | |||
} | |||
LibraryModule::LibraryModule (const var& moduleInfo_) | |||
: moduleInfo (moduleInfo_) | |||
{ | |||
} | |||
bool LibraryModule::isValid() const { return getID().isNotEmpty(); } | |||
bool LibraryModule::isPluginClient() const { return getID() == "juce_audio_plugin_client"; } | |||
bool LibraryModule::isAUPluginHost (const Project& project) const { return getID() == "juce_audio_processors" && project.isConfigFlagEnabled ("JUCE_PLUGINHOST_AU"); } | |||
bool LibraryModule::isVSTPluginHost (const Project& project) const { return getID() == "juce_audio_processors" && project.isConfigFlagEnabled ("JUCE_PLUGINHOST_VST"); } | |||
File LibraryModule::getLocalIncludeFolder (ProjectSaver& projectSaver) const | |||
{ | |||
return projectSaver.getGeneratedCodeFolder().getChildFile ("modules").getChildFile (getID()); | |||
} | |||
File LibraryModule::getInclude (const File& folder) const | |||
{ | |||
return folder.getChildFile (moduleInfo ["include"]); | |||
} | |||
RelativePath LibraryModule::getModuleRelativeToProject (ProjectExporter& exporter) const | |||
{ | |||
RelativePath p (exporter.getJuceFolder().toString(), RelativePath::projectFolder); | |||
if (p.getFileName() != "modules") | |||
p = p.getChildFile ("modules"); | |||
return p.getChildFile (getID()); | |||
} | |||
RelativePath LibraryModule::getModuleOrLocalCopyRelativeToProject (ProjectExporter& exporter, const File& localModuleFolder) const | |||
{ | |||
if (exporter.getProject().shouldCopyModuleFilesLocally (getID()).getValue()) | |||
return RelativePath (exporter.getProject().getRelativePathForFile (localModuleFolder), RelativePath::projectFolder); | |||
return getModuleRelativeToProject (exporter); | |||
} | |||
//============================================================================== | |||
void LibraryModule::writeIncludes (ProjectSaver& projectSaver, OutputStream& out) | |||
{ | |||
const File localModuleFolder (getLocalIncludeFolder (projectSaver)); | |||
const File localHeader (getInclude (localModuleFolder)); | |||
if (projectSaver.getProject().shouldCopyModuleFilesLocally (getID()).getValue()) | |||
{ | |||
moduleFolder.copyDirectoryTo (localModuleFolder); | |||
} | |||
else | |||
{ | |||
localModuleFolder.createDirectory(); | |||
createLocalHeaderWrapper (projectSaver, getInclude (moduleFolder), localHeader); | |||
} | |||
out << CodeHelpers::createIncludeStatement (localHeader, projectSaver.getGeneratedCodeFolder().getChildFile ("AppConfig.h")) << newLine; | |||
} | |||
static void writeGuardedInclude (OutputStream& out, StringArray paths, StringArray guards) | |||
{ | |||
StringArray uniquePaths (paths); | |||
uniquePaths.removeDuplicates (false); | |||
if (uniquePaths.size() == 1) | |||
{ | |||
out << "#include " << paths[0] << newLine; | |||
} | |||
else | |||
{ | |||
int i = paths.size(); | |||
for (; --i >= 0;) | |||
{ | |||
for (int j = i; --j >= 0;) | |||
{ | |||
if (paths[i] == paths[j] && guards[i] == guards[j]) | |||
{ | |||
paths.remove (i); | |||
guards.remove (i); | |||
} | |||
} | |||
} | |||
for (i = 0; i < paths.size(); ++i) | |||
{ | |||
out << (i == 0 ? "#if " : "#elif ") << guards[i] << newLine | |||
<< " #include " << paths[i] << newLine; | |||
} | |||
out << "#else" << newLine | |||
<< " #error \"This file is designed to be used in an Introjucer-generated project!\"" << newLine | |||
<< "#endif" << newLine; | |||
} | |||
} | |||
void LibraryModule::createLocalHeaderWrapper (ProjectSaver& projectSaver, const File& originalHeader, const File& localHeader) const | |||
{ | |||
Project& project = projectSaver.getProject(); | |||
MemoryOutputStream out; | |||
out << "// This is an auto-generated file to redirect any included" << newLine | |||
<< "// module headers to the correct external folder." << newLine | |||
<< newLine; | |||
StringArray paths, guards; | |||
for (Project::ExporterIterator exporter (project); exporter.next();) | |||
{ | |||
const RelativePath headerFromProject (getModuleRelativeToProject (*exporter) | |||
.getChildFile (originalHeader.getFileName())); | |||
const RelativePath fileFromHere (headerFromProject.rebased (project.getFile().getParentDirectory(), | |||
localHeader.getParentDirectory(), RelativePath::unknown)); | |||
paths.add (fileFromHere.toUnixStyle().quoted()); | |||
guards.add ("defined (" + exporter->getExporterIdentifierMacro() + ")"); | |||
} | |||
writeGuardedInclude (out, paths, guards); | |||
out << newLine; | |||
projectSaver.replaceFileIfDifferent (localHeader, out); | |||
} | |||
//============================================================================== | |||
void LibraryModule::prepareExporter (ProjectExporter& exporter, ProjectSaver& projectSaver) const | |||
{ | |||
Project& project = exporter.getProject(); | |||
File localFolder (moduleFolder); | |||
if (project.shouldCopyModuleFilesLocally (getID()).getValue()) | |||
localFolder = getLocalIncludeFolder (projectSaver); | |||
{ | |||
Array<File> compiled; | |||
findAndAddCompiledCode (exporter, projectSaver, localFolder, compiled); | |||
if (project.shouldShowAllModuleFilesInProject (getID()).getValue()) | |||
addBrowsableCode (exporter, compiled, localFolder); | |||
} | |||
if (isVSTPluginHost (project)) | |||
VSTHelpers::addVSTFolderToPath (exporter, exporter.extraSearchPaths); | |||
if (exporter.isXcode()) | |||
{ | |||
if (isAUPluginHost (project)) | |||
exporter.xcodeFrameworks.addTokens ("AudioUnit CoreAudioKit", false); | |||
const String frameworks (moduleInfo [exporter.isOSX() ? "OSXFrameworks" : "iOSFrameworks"].toString()); | |||
exporter.xcodeFrameworks.addTokens (frameworks, ", ", String::empty); | |||
} | |||
if (isPluginClient()) | |||
{ | |||
if (shouldBuildVST (project).getValue()) VSTHelpers::prepareExporter (exporter, projectSaver); | |||
if (shouldBuildRTAS (project).getValue()) RTASHelpers::prepareExporter (exporter, projectSaver, localFolder); | |||
if (shouldBuildAU (project).getValue()) AUHelpers::prepareExporter (exporter, projectSaver); | |||
} | |||
} | |||
void LibraryModule::createPropertyEditors (const ProjectExporter& exporter, PropertyListBuilder& props) const | |||
{ | |||
if (isVSTPluginHost (exporter.getProject())) | |||
VSTHelpers::createVSTPathEditor (exporter, props); | |||
if (isPluginClient()) | |||
{ | |||
if (shouldBuildVST (exporter.getProject()).getValue()) VSTHelpers::createPropertyEditors (exporter, props); | |||
if (shouldBuildRTAS (exporter.getProject()).getValue()) RTASHelpers::createPropertyEditors (exporter, props); | |||
} | |||
} | |||
void LibraryModule::getConfigFlags (Project& project, OwnedArray<Project::ConfigFlag>& flags) const | |||
{ | |||
const File header (getInclude (moduleFolder)); | |||
jassert (header.exists()); | |||
StringArray lines; | |||
header.readLines (lines); | |||
for (int i = 0; i < lines.size(); ++i) | |||
{ | |||
String line (lines[i].trim()); | |||
if (line.startsWith ("/**") && line.containsIgnoreCase ("Config:")) | |||
{ | |||
ScopedPointer <Project::ConfigFlag> config (new Project::ConfigFlag()); | |||
config->sourceModuleID = getID(); | |||
config->symbol = line.fromFirstOccurrenceOf (":", false, false).trim(); | |||
if (config->symbol.length() > 2) | |||
{ | |||
++i; | |||
while (! (lines[i].contains ("*/") || lines[i].contains ("@see"))) | |||
{ | |||
if (lines[i].trim().isNotEmpty()) | |||
config->description = config->description.trim() + " " + lines[i].trim(); | |||
++i; | |||
} | |||
config->description = config->description.upToFirstOccurrenceOf ("*/", false, false); | |||
config->value.referTo (project.getConfigFlag (config->symbol)); | |||
flags.add (config.release()); | |||
} | |||
} | |||
} | |||
} | |||
//============================================================================== | |||
bool LibraryModule::fileTargetMatches (ProjectExporter& exporter, const String& target) | |||
{ | |||
if (target.startsWithChar ('!')) | |||
return ! fileTargetMatches (exporter, target.substring (1).trim()); | |||
if (target == "xcode") return exporter.isXcode(); | |||
if (target == "msvc") return exporter.isVisualStudio(); | |||
if (target == "linux") return exporter.isLinux(); | |||
return true; | |||
} | |||
void LibraryModule::findWildcardMatches (const File& localModuleFolder, const String& wildcardPath, Array<File>& result) const | |||
{ | |||
String path (wildcardPath.upToLastOccurrenceOf ("/", false, false)); | |||
String wildCard (wildcardPath.fromLastOccurrenceOf ("/", false, false)); | |||
Array<File> tempList; | |||
FileSorter sorter; | |||
DirectoryIterator iter (localModuleFolder.getChildFile (path), false, wildCard); | |||
while (iter.next()) | |||
if (! iter.getFile().isHidden()) | |||
tempList.addSorted (sorter, iter.getFile()); | |||
result.addArray (tempList); | |||
} | |||
void LibraryModule::findAndAddCompiledCode (ProjectExporter& exporter, ProjectSaver& projectSaver, | |||
const File& localModuleFolder, Array<File>& result) const | |||
{ | |||
const var compileArray (moduleInfo ["compile"]); // careful to keep this alive while the array is in use! | |||
const Array<var>* const files = compileArray.getArray(); | |||
if (files != nullptr) | |||
{ | |||
for (int i = 0; i < files->size(); ++i) | |||
{ | |||
const var& file = files->getReference(i); | |||
const String filename (file ["file"].toString()); | |||
if (filename.isNotEmpty() | |||
&& fileTargetMatches (exporter, file ["target"].toString())) | |||
{ | |||
const File compiledFile (localModuleFolder.getChildFile (filename)); | |||
result.add (compiledFile); | |||
Project::Item item (projectSaver.addFileToGeneratedGroup (compiledFile)); | |||
if (file ["warnings"].toString().equalsIgnoreCase ("disabled")) | |||
item.getShouldInhibitWarningsValue() = true; | |||
if (file ["stdcall"]) | |||
item.getShouldUseStdCallValue() = true; | |||
} | |||
} | |||
} | |||
} | |||
static void addFileWithGroups (Project::Item& group, const RelativePath& file, const String& path) | |||
{ | |||
const int slash = path.indexOfChar (File::separator); | |||
if (slash >= 0) | |||
{ | |||
const String topLevelGroup (path.substring (0, slash)); | |||
const String remainingPath (path.substring (slash + 1)); | |||
Project::Item newGroup (group.getOrCreateSubGroup (topLevelGroup)); | |||
addFileWithGroups (newGroup, file, remainingPath); | |||
} | |||
else | |||
{ | |||
if (! group.containsChildForFile (file)) | |||
group.addRelativeFile (file, -1, false); | |||
} | |||
} | |||
void LibraryModule::addBrowsableCode (ProjectExporter& exporter, const Array<File>& compiled, const File& localModuleFolder) const | |||
{ | |||
if (sourceFiles.size() == 0) | |||
{ | |||
const var filesArray (moduleInfo ["browse"]); | |||
const Array<var>* const files = filesArray.getArray(); | |||
for (int i = 0; i < files->size(); ++i) | |||
findWildcardMatches (localModuleFolder, files->getReference(i), sourceFiles); | |||
} | |||
Project::Item sourceGroup (Project::Item::createGroup (exporter.getProject(), getID(), "__mainsourcegroup" + getID())); | |||
const RelativePath moduleFromProject (getModuleOrLocalCopyRelativeToProject (exporter, localModuleFolder)); | |||
for (int i = 0; i < sourceFiles.size(); ++i) | |||
{ | |||
const String pathWithinModule (sourceFiles.getReference(i).getRelativePathFrom (localModuleFolder)); | |||
// (Note: in exporters like MSVC we have to avoid adding the same file twice, even if one of those instances | |||
// is flagged as being excluded from the build, because this overrides the other and it fails to compile) | |||
if (exporter.canCopeWithDuplicateFiles() || ! compiled.contains (sourceFiles.getReference(i))) | |||
addFileWithGroups (sourceGroup, | |||
moduleFromProject.getChildFile (pathWithinModule), | |||
pathWithinModule); | |||
} | |||
sourceGroup.addFile (localModuleFolder.getChildFile (moduleFile.getRelativePathFrom (moduleFolder)), -1, false); | |||
sourceGroup.addFile (getInclude (localModuleFolder), -1, false); | |||
exporter.getModulesGroup().state.addChild (sourceGroup.state.createCopy(), -1, nullptr); | |||
} |
@@ -0,0 +1,148 @@ | |||
/* | |||
============================================================================== | |||
This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
Copyright 2004-11 by Raw Material Software Ltd. | |||
------------------------------------------------------------------------------ | |||
JUCE can be redistributed and/or modified under the terms of the GNU General | |||
Public License (Version 2), as published by the Free Software Foundation. | |||
A copy of the license is included in the JUCE distribution, or can be found | |||
online at www.gnu.org/licenses. | |||
JUCE 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. | |||
------------------------------------------------------------------------------ | |||
To release a closed-source product which uses JUCE, commercial licenses are | |||
available: visit www.rawmaterialsoftware.com/juce for more information. | |||
============================================================================== | |||
*/ | |||
#ifndef __JUCER_MODULE_JUCEHEADER__ | |||
#define __JUCER_MODULE_JUCEHEADER__ | |||
#include "../jucer_Headers.h" | |||
#include "jucer_Project.h" | |||
class ProjectExporter; | |||
class ProjectSaver; | |||
//============================================================================== | |||
class LibraryModule | |||
{ | |||
public: | |||
LibraryModule (const File& file); | |||
LibraryModule (const var& moduleInfo); | |||
bool isValid() const; | |||
String getID() const { return moduleInfo ["id"].toString(); } | |||
String getVersion() const { return moduleInfo ["version"].toString(); } | |||
String getName() const { return moduleInfo ["name"].toString(); } | |||
String getDescription() const { return moduleInfo ["description"].toString(); } | |||
void writeIncludes (ProjectSaver&, OutputStream&); | |||
void prepareExporter (ProjectExporter&, ProjectSaver&) const; | |||
void createPropertyEditors (const ProjectExporter&, PropertyListBuilder&) const; | |||
void getConfigFlags (Project&, OwnedArray<Project::ConfigFlag>& flags) const; | |||
static String getInfoFileName() { return "juce_module_info"; } | |||
var moduleInfo; | |||
private: | |||
File moduleFile, moduleFolder; | |||
mutable Array<File> sourceFiles; | |||
File getInclude (const File& folder) const; | |||
File getLocalIncludeFolder (ProjectSaver& projectSaver) const; | |||
static bool fileTargetMatches (ProjectExporter& exporter, const String& target); | |||
struct FileSorter | |||
{ | |||
static int compareElements (const File& f1, const File& f2) | |||
{ | |||
return f1.getFileName().compareIgnoreCase (f2.getFileName()); | |||
} | |||
}; | |||
void findWildcardMatches (const File& localModuleFolder, const String& wildcardPath, Array<File>& result) const; | |||
void findAndAddCompiledCode (ProjectExporter&, ProjectSaver&, const File& localModuleFolder, Array<File>& result) const; | |||
void addBrowsableCode (ProjectExporter&, const Array<File>& compiled, const File& localModuleFolder) const; | |||
void createLocalHeaderWrapper (ProjectSaver&, const File& originalHeader, const File& localHeader) const; | |||
RelativePath getModuleRelativeToProject (ProjectExporter&) const; | |||
RelativePath getModuleOrLocalCopyRelativeToProject (ProjectExporter&, const File& localModuleFolder) const; | |||
bool isPluginClient() const; | |||
bool isAUPluginHost (const Project&) const; | |||
bool isVSTPluginHost (const Project&) const; | |||
}; | |||
//============================================================================== | |||
class ModuleList | |||
{ | |||
public: | |||
ModuleList(); | |||
ModuleList (const ModuleList&); | |||
ModuleList& operator= (const ModuleList&); | |||
//============================================================================== | |||
void rescan (const File& newModulesFolder); | |||
void rescan(); | |||
File getModulesFolder() const { return moduleFolder; } | |||
File getModuleFolder (const String& uid) const; | |||
bool loadFromWebsite(); | |||
LibraryModule* loadModule (const String& uid) const; | |||
void getDependencies (const String& moduleID, StringArray& dependencies) const; | |||
void createDependencies (const String& moduleID, OwnedArray<LibraryModule>& modules) const; | |||
//============================================================================== | |||
struct Module | |||
{ | |||
LibraryModule* create() const; | |||
String uid, version, name, description; | |||
File file; | |||
URL url; | |||
bool operator== (const Module&) const; | |||
bool operator!= (const Module&) const; | |||
}; | |||
const Module* findModuleInfo (const String& uid) const; | |||
bool operator== (const ModuleList&) const; | |||
//============================================================================== | |||
static bool isJuceFolder (const File& folder); | |||
static bool isModulesFolder (const File& folder); | |||
static bool isJuceOrModulesFolder (const File& folder); | |||
static File getDefaultModulesFolder (Project*); | |||
static bool isLocalModulesFolderValid(); | |||
static File getLocalModulesFolder (Project*); | |||
static void setLocalModulesFolder (const File& newFile); | |||
static File getModulesFolderForJuceOrModulesFolder (const File& f); | |||
StringArray getExtraDependenciesNeeded (Project&, const Module&); | |||
//============================================================================== | |||
OwnedArray<Module> modules; | |||
private: | |||
File moduleFolder; | |||
void sort(); | |||
}; | |||
#endif // __JUCER_MODULE_JUCEHEADER__ |
@@ -2,7 +2,7 @@ | |||
============================================================================== | |||
This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
Copyright 2004-10 by Raw Material Software Ltd. | |||
Copyright 2004-11 by Raw Material Software Ltd. | |||
------------------------------------------------------------------------------ | |||
@@ -31,7 +31,7 @@ namespace | |||
{ | |||
bool fillInNewCppFileTemplate (const File& file, const Project::Item& item, const char* templateName) | |||
{ | |||
String s = item.getProject().getFileTemplate (templateName) | |||
String s = item.project.getFileTemplate (templateName) | |||
.replace ("FILENAME", file.getFileName(), false) | |||
.replace ("DATE", Time::getCurrentTime().toString (true, true, true), false) | |||
.replace ("AUTHOR", SystemStats::getFullUserName(), false) | |||
@@ -64,7 +64,7 @@ public: | |||
{ | |||
if (fillInNewCppFileTemplate (newFile, parent, "jucer_NewCppFileTemplate_cpp")) | |||
{ | |||
parent.addFile (newFile, 0); | |||
parent.addFile (newFile, 0, true); | |||
return true; | |||
} | |||
@@ -93,7 +93,7 @@ public: | |||
{ | |||
if (fillInNewCppFileTemplate (newFile, parent, "jucer_NewCppFileTemplate_h")) | |||
{ | |||
parent.addFile (newFile, 0); | |||
parent.addFile (newFile, 0, true); | |||
return true; | |||
} | |||
@@ -2,7 +2,7 @@ | |||
============================================================================== | |||
This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
Copyright 2004-10 by Raw Material Software Ltd. | |||
Copyright 2004-11 by Raw Material Software Ltd. | |||
------------------------------------------------------------------------------ | |||
@@ -2,7 +2,7 @@ | |||
============================================================================== | |||
This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
Copyright 2004-10 by Raw Material Software Ltd. | |||
Copyright 2004-11 by Raw Material Software Ltd. | |||
------------------------------------------------------------------------------ | |||
@@ -25,6 +25,39 @@ | |||
#include "jucer_NewProjectWizard.h" | |||
#include "jucer_ProjectType.h" | |||
#include "jucer_Module.h" | |||
#include "../Project Saving/jucer_ProjectExporter.h" | |||
#include "../Application/jucer_Application.h" | |||
#include "../Application/jucer_MainWindow.h" | |||
static void createFileCreationOptionComboBox (Component& setupComp, | |||
OwnedArray<Component>& itemsCreated, | |||
const char** types) | |||
{ | |||
ComboBox* c = new ComboBox(); | |||
itemsCreated.add (c); | |||
setupComp.addChildAndSetID (c, "filesToCreate"); | |||
const char* fileOptions[] = { "Create a Main.cpp file", | |||
"Create a Main.cpp file and a basic window", | |||
"Don't create any files", 0 }; | |||
c->addItemList (StringArray (fileOptions), 1); | |||
c->setSelectedId (1, false); | |||
Label* l = new Label (String::empty, "Files to Auto-Generate:"); | |||
l->attachToComponent (c, true); | |||
itemsCreated.add (l); | |||
c->setBounds ("parent.width / 2 + 160, 10, parent.width - 10, top + 22"); | |||
} | |||
static void setExecutableNameForAllTargets (Project& project, const String& exeName) | |||
{ | |||
for (Project::ExporterIterator exporter (project); exporter.next();) | |||
for (ProjectExporter::ConfigIterator config (*exporter); config.next();) | |||
config->getTargetBinaryName() = exeName; | |||
} | |||
//============================================================================== | |||
class GUIAppWizard : public NewProjectWizard | |||
@@ -35,20 +68,22 @@ public: | |||
String getName() { return "GUI Application"; } | |||
String getDescription() { return "Creates a standard application"; } | |||
void addItemsToAlertWindow (AlertWindow& aw) | |||
void addSetupItems (Component& setupComp, OwnedArray<Component>& itemsCreated) | |||
{ | |||
const char* fileOptions[] = { "Create a Main.cpp file", | |||
"Create a Main.cpp file and a basic window", | |||
"Don't create any files", 0 }; | |||
aw.addComboBox ("files", StringArray (fileOptions), "Files to Auto-Generate"); | |||
createFileCreationOptionComboBox (setupComp, itemsCreated, fileOptions); | |||
} | |||
String processResultsFromAlertWindow (AlertWindow& aw) | |||
Result processResultsFromSetupItems (Component& setupComp) | |||
{ | |||
ComboBox* cb = dynamic_cast<ComboBox*> (setupComp.findChildWithID ("filesToCreate")); | |||
jassert (cb != nullptr); | |||
createMainCpp = createWindow = false; | |||
switch (aw.getComboBoxComponent ("files")->getSelectedItemIndex()) | |||
switch (cb->getSelectedItemIndex()) | |||
{ | |||
case 0: createMainCpp = true; break; | |||
case 1: createMainCpp = createWindow = true; break; | |||
@@ -56,7 +91,7 @@ public: | |||
default: jassertfalse; break; | |||
} | |||
return String::empty; | |||
return Result::ok(); | |||
} | |||
bool initialiseProject (Project& project) | |||
@@ -73,8 +108,7 @@ public: | |||
Project::Item sourceGroup (project.getMainGroup().addNewSubGroup ("Source", 0)); | |||
for (int i = project.getNumConfigurations(); --i >= 0;) | |||
project.getConfiguration(i).getTargetBinaryName() = File::createLegalFileName (appTitle); | |||
setExecutableNameForAllTargets (project, File::createLegalFileName (appTitle)); | |||
String appHeaders (CodeHelpers::createIncludeStatement (project.getAppIncludeFile(), mainCppFile)); | |||
String initCode, shutdownCode, anotherInstanceStartedCode, privateMembers, memberInitialisers; | |||
@@ -101,8 +135,8 @@ public: | |||
if (! FileHelpers::overwriteFileWithNewDataIfDifferent (mainWindowCpp, windowCpp)) | |||
failedFiles.add (mainWindowCpp.getFullPathName()); | |||
sourceGroup.addFile (mainWindowCpp, -1); | |||
sourceGroup.addFile (mainWindowH, -1); | |||
sourceGroup.addFile (mainWindowCpp, -1, true); | |||
sourceGroup.addFile (mainWindowH, -1, false); | |||
} | |||
if (createMainCpp) | |||
@@ -122,7 +156,7 @@ public: | |||
if (! FileHelpers::overwriteFileWithNewDataIfDifferent (mainCppFile, mainCpp)) | |||
failedFiles.add (mainCppFile.getFullPathName()); | |||
sourceGroup.addFile (mainCppFile, -1); | |||
sourceGroup.addFile (mainCppFile, -1, true); | |||
} | |||
return true; | |||
@@ -141,26 +175,29 @@ public: | |||
String getName() { return "Console Application"; } | |||
String getDescription() { return "Creates a command-line application with no GUI features"; } | |||
void addItemsToAlertWindow (AlertWindow& aw) | |||
void addSetupItems (Component& setupComp, OwnedArray<Component>& itemsCreated) | |||
{ | |||
const char* fileOptions[] = { "Create a Main.cpp file", | |||
"Don't create any files", 0 }; | |||
aw.addComboBox ("files", StringArray (fileOptions), "Files to Auto-Generate"); | |||
createFileCreationOptionComboBox (setupComp, itemsCreated, fileOptions); | |||
} | |||
String processResultsFromAlertWindow (AlertWindow& aw) | |||
Result processResultsFromSetupItems (Component& setupComp) | |||
{ | |||
ComboBox* cb = dynamic_cast<ComboBox*> (setupComp.findChildWithID ("filesToCreate")); | |||
jassert (cb != nullptr); | |||
createMainCpp = false; | |||
switch (aw.getComboBoxComponent ("files")->getSelectedItemIndex()) | |||
switch (cb->getSelectedItemIndex()) | |||
{ | |||
case 0: createMainCpp = true; break; | |||
case 1: break; | |||
default: jassertfalse; break; | |||
} | |||
return String::empty; | |||
return Result::ok(); | |||
} | |||
bool initialiseProject (Project& project) | |||
@@ -174,8 +211,7 @@ public: | |||
Project::Item sourceGroup (project.getMainGroup().addNewSubGroup ("Source", 0)); | |||
for (int i = project.getNumConfigurations(); --i >= 0;) | |||
project.getConfiguration(i).getTargetBinaryName() = File::createLegalFileName (appTitle); | |||
setExecutableNameForAllTargets (project, File::createLegalFileName (appTitle)); | |||
if (createMainCpp) | |||
{ | |||
@@ -187,7 +223,7 @@ public: | |||
if (! FileHelpers::overwriteFileWithNewDataIfDifferent (mainCppFile, mainCpp)) | |||
failedFiles.add (mainCppFile.getFullPathName()); | |||
sourceGroup.addFile (mainCppFile, -1); | |||
sourceGroup.addFile (mainCppFile, -1, true); | |||
} | |||
return true; | |||
@@ -206,13 +242,13 @@ public: | |||
String getName() { return "Audio Plug-In"; } | |||
String getDescription() { return "Creates an audio plugin project"; } | |||
void addItemsToAlertWindow (AlertWindow& aw) | |||
void addSetupItems (Component& setupComp, OwnedArray<Component>& itemsCreated) | |||
{ | |||
} | |||
String processResultsFromAlertWindow (AlertWindow& aw) | |||
Result processResultsFromSetupItems (Component& setupComp) | |||
{ | |||
return String::empty; | |||
return Result::ok(); | |||
} | |||
bool initialiseProject (Project& project) | |||
@@ -230,15 +266,14 @@ public: | |||
File editorHFile = editorCppFile.withFileExtension (".h"); | |||
project.getProjectTypeValue() = ProjectType::getAudioPluginTypeName(); | |||
project.addModule ("juce_audio_plugin_client", true); | |||
Project::Item sourceGroup (project.getMainGroup().addNewSubGroup ("Source", 0)); | |||
project.getConfigFlag ("JUCE_QUICKTIME") = Project::configFlagDisabled; // disabled because it interferes with RTAS build on PC | |||
for (int i = project.getNumConfigurations(); --i >= 0;) | |||
project.getConfiguration(i).getTargetBinaryName() = File::createLegalFileName (appTitle); | |||
setExecutableNameForAllTargets (project, File::createLegalFileName (appTitle)); | |||
String appHeaders (CodeHelpers::createIncludeStatement (project.getAppIncludeFile(), filterCppFile)); | |||
appHeaders << newLine << CodeHelpers::createIncludeStatement (project.getPluginCharacteristicsFile(), filterCppFile); | |||
String filterCpp = project.getFileTemplate ("jucer_AudioPluginFilterTemplate_cpp") | |||
.replace ("FILTERHEADERS", CodeHelpers::createIncludeStatement (filterHFile, filterCppFile) | |||
@@ -275,49 +310,19 @@ public: | |||
if (! FileHelpers::overwriteFileWithNewDataIfDifferent (editorHFile, editorH)) | |||
failedFiles.add (editorHFile.getFullPathName()); | |||
sourceGroup.addFile (filterCppFile, -1); | |||
sourceGroup.addFile (filterHFile, -1); | |||
sourceGroup.addFile (editorCppFile, -1); | |||
sourceGroup.addFile (editorHFile, -1); | |||
sourceGroup.addFile (filterCppFile, -1, true); | |||
sourceGroup.addFile (filterHFile, -1, false); | |||
sourceGroup.addFile (editorCppFile, -1, true); | |||
sourceGroup.addFile (editorHFile, -1, false); | |||
return true; | |||
} | |||
}; | |||
//============================================================================== | |||
/*class BrowserPluginAppWizard : public NewProjectWizard | |||
{ | |||
public: | |||
BrowserPluginAppWizard() {} | |||
~BrowserPluginAppWizard() {} | |||
String getName() { return "Browser Plug-In"; } | |||
String getDescription() { return "Creates an audio plugin project"; } | |||
void addItemsToAlertWindow (AlertWindow& aw) | |||
{ | |||
} | |||
String processResultsFromAlertWindow (AlertWindow& aw) | |||
{ | |||
return String::empty; | |||
} | |||
bool initialiseProject (Project& project) | |||
{ | |||
return true; | |||
} | |||
};*/ | |||
//============================================================================== | |||
//============================================================================== | |||
NewProjectWizard::NewProjectWizard() | |||
{ | |||
} | |||
NewProjectWizard::~NewProjectWizard() | |||
{ | |||
} | |||
NewProjectWizard::NewProjectWizard() {} | |||
NewProjectWizard::~NewProjectWizard() {} | |||
StringArray NewProjectWizard::getWizards() | |||
{ | |||
@@ -351,71 +356,42 @@ NewProjectWizard* NewProjectWizard::createWizard (int index) | |||
return 0; | |||
} | |||
File& NewProjectWizard::getLastWizardFolder() | |||
{ | |||
#if JUCE_WINDOWS | |||
static File lastFolder (File::getSpecialLocation (File::userDocumentsDirectory)); | |||
#else | |||
static File lastFolder (File::getSpecialLocation (File::userHomeDirectory)); | |||
#endif | |||
return lastFolder; | |||
} | |||
//============================================================================== | |||
Project* NewProjectWizard::runWizard (Component* ownerWindow_) | |||
Project* NewProjectWizard::runWizard (Component* ownerWindow_, | |||
const String& projectName, | |||
const File& targetFolder_) | |||
{ | |||
ownerWindow = ownerWindow_; | |||
appTitle = projectName; | |||
targetFolder = targetFolder_; | |||
if (! targetFolder.exists()) | |||
{ | |||
static File newProjectFolder; | |||
FileChooser fc ("New Juce Project", newProjectFolder, "*"); | |||
if (! fc.browseForDirectory()) | |||
return 0; | |||
targetFolder = newProjectFolder = fc.getResult(); | |||
if (! newProjectFolder.exists()) | |||
{ | |||
if (! newProjectFolder.createDirectory()) | |||
failedFiles.add (newProjectFolder.getFullPathName()); | |||
} | |||
if (FileHelpers::containsAnyNonHiddenFiles (newProjectFolder)) | |||
{ | |||
if (! AlertWindow::showOkCancelBox (AlertWindow::InfoIcon, "New Juce Project", | |||
"The folder you chose isn't empty - are you sure you want to create the project there?\n\nAny existing files with the same names may be overwritten by the new files.")) | |||
return 0; | |||
} | |||
if (! targetFolder.createDirectory()) | |||
failedFiles.add (targetFolder.getFullPathName()); | |||
} | |||
if (failedFiles.size() == 0) | |||
else if (FileHelpers::containsAnyNonHiddenFiles (targetFolder)) | |||
{ | |||
AlertWindow aw ("New " + getName(), | |||
"Please choose some basic project options...", | |||
AlertWindow::NoIcon, ownerWindow); | |||
aw.addTextEditor ("name", "", "Project Name", false); | |||
addItemsToAlertWindow (aw); | |||
aw.addButton ("Create Project", 1, KeyPress (KeyPress::returnKey)); | |||
aw.addButton ("Cancel", 0, KeyPress (KeyPress::escapeKey)); | |||
for (;;) | |||
{ | |||
if (aw.runModalLoop() == 0) | |||
return 0; | |||
appTitle = aw.getTextEditorContents ("name").trim(); | |||
String error (processResultsFromAlertWindow (aw)); | |||
if (error.isEmpty() && appTitle.isEmpty()) | |||
error = "Please enter a sensible project title!"; | |||
if (error.isEmpty()) | |||
break; | |||
aw.setColour (AlertWindow::textColourId, Colours::red); | |||
aw.setMessage (error); | |||
} | |||
if (! AlertWindow::showOkCancelBox (AlertWindow::InfoIcon, "New Juce Project", | |||
"The folder you chose isn't empty - are you sure you want to create the project there?\n\nAny existing files with the same names may be overwritten by the new files.")) | |||
return nullptr; | |||
} | |||
projectFile = targetFolder.getChildFile (File::createLegalFileName (appTitle)) | |||
.withFileExtension (Project::projectFileExtension); | |||
ScopedPointer <Project> project (new Project (projectFile)); | |||
ScopedPointer<Project> project (new Project (projectFile)); | |||
project->addDefaultModules (true); | |||
if (failedFiles.size() == 0) | |||
{ | |||
@@ -424,10 +400,10 @@ Project* NewProjectWizard::runWizard (Component* ownerWindow_) | |||
project->setBundleIdentifierToDefault(); | |||
if (! initialiseProject (*project)) | |||
return 0; | |||
return nullptr; | |||
if (project->save (false, true) != FileBasedDocument::savedOk) | |||
return 0; | |||
return nullptr; | |||
project->setChangedFlag (false); | |||
} | |||
@@ -438,48 +414,154 @@ Project* NewProjectWizard::runWizard (Component* ownerWindow_) | |||
"Errors in Creating Project!", | |||
"The following files couldn't be written:\n\n" | |||
+ failedFiles.joinIntoString ("\n", 0, 10)); | |||
return 0; | |||
return nullptr; | |||
} | |||
return project.release(); | |||
} | |||
Project* NewProjectWizard::runNewProjectWizard (Component* ownerWindow) | |||
//============================================================================== | |||
class NewProjectWizard::WizardComp : public Component, | |||
private ButtonListener, | |||
private ComboBoxListener, | |||
private TextEditorListener | |||
{ | |||
ScopedPointer <NewProjectWizard> wizard; | |||
public: | |||
WizardComp() | |||
: projectName ("Project name"), | |||
nameLabel (String::empty, "Project Name:"), | |||
typeLabel (String::empty, "Project Type:"), | |||
fileBrowser (FileBrowserComponent::saveMode | FileBrowserComponent::canSelectDirectories, | |||
getLastWizardFolder(), nullptr, nullptr), | |||
fileOutline (String::empty, "Project Folder:"), | |||
createButton ("Create..."), | |||
cancelButton ("Cancel") | |||
{ | |||
setOpaque (true); | |||
setSize (600, 500); | |||
addChildAndSetID (&projectName, "projectName"); | |||
projectName.setText ("NewProject"); | |||
projectName.setBounds ("100, 14, parent.width / 2 - 10, top + 22"); | |||
nameLabel.attachToComponent (&projectName, true); | |||
projectName.addListener (this); | |||
addChildAndSetID (&projectType, "projectType"); | |||
projectType.addItemList (getWizards(), 1); | |||
projectType.setSelectedId (1, true); | |||
projectType.setBounds ("100, projectName.bottom + 4, projectName.right, top + 22"); | |||
typeLabel.attachToComponent (&projectType, true); | |||
projectType.addListener (this); | |||
addChildAndSetID (&fileOutline, "fileOutline"); | |||
fileOutline.setColour (GroupComponent::outlineColourId, Colours::black.withAlpha (0.2f)); | |||
fileOutline.setTextLabelPosition (Justification::centred); | |||
fileOutline.setBounds ("10, projectType.bottom + 20, projectType.right, parent.height - 10"); | |||
addChildAndSetID (&fileBrowser, "fileBrowser"); | |||
fileBrowser.setBounds ("fileOutline.left + 10, fileOutline.top + 20, fileOutline.right - 10, fileOutline.bottom - 12"); | |||
fileBrowser.setFilenameBoxLabel ("Folder:"); | |||
addChildAndSetID (&createButton, "createButton"); | |||
createButton.setBounds ("right - 140, bottom - 24, parent.width - 10, parent.height - 10"); | |||
createButton.addListener (this); | |||
addChildAndSetID (&cancelButton, "cancelButton"); | |||
cancelButton.setBounds ("right - 140, createButton.top, createButton.left - 10, createButton.bottom"); | |||
cancelButton.addListener (this); | |||
updateCustomItems(); | |||
updateCreateButton(); | |||
} | |||
void paint (Graphics& g) | |||
{ | |||
AlertWindow aw ("New Juce Project", | |||
"Select the type of project to create, and the location of your Juce folder", | |||
AlertWindow::NoIcon, | |||
ownerWindow); | |||
g.fillAll (Colour::greyLevel (0.93f)); | |||
} | |||
aw.addComboBox ("type", getWizards(), "Project Type"); | |||
void buttonClicked (Button* b) | |||
{ | |||
if (b == &createButton) | |||
{ | |||
createProject(); | |||
} | |||
else | |||
{ | |||
MainWindow* mw = dynamic_cast<MainWindow*> (getTopLevelComponent()); | |||
jassert (mw != nullptr); | |||
FilenameComponent juceFolderSelector ("Juce Library Location", StoredSettings::getInstance()->getLastKnownJuceFolder(), | |||
true, true, false, "*", String::empty, "(Please select the folder containing Juce!)"); | |||
juceFolderSelector.setSize (350, 22); | |||
JucerApplication::getApp()->closeWindow (mw); | |||
} | |||
} | |||
aw.addCustomComponent (&juceFolderSelector); | |||
void createProject() | |||
{ | |||
MainWindow* mw = Component::findParentComponentOfClass<MainWindow>(); | |||
jassert (mw != nullptr); | |||
aw.addButton ("Next", 1, KeyPress (KeyPress::returnKey)); | |||
aw.addButton ("Cancel", 0, KeyPress (KeyPress::escapeKey)); | |||
ScopedPointer <NewProjectWizard> wizard (createWizard()); | |||
for (;;) | |||
if (wizard != nullptr) | |||
{ | |||
if (aw.runModalLoop() == 0) | |||
return 0; | |||
Result result (wizard->processResultsFromSetupItems (*this)); | |||
if (FileHelpers::isJuceFolder (juceFolderSelector.getCurrentFile())) | |||
if (result.failed()) | |||
{ | |||
wizard = createWizard (aw.getComboBoxComponent ("type")->getSelectedItemIndex()); | |||
break; | |||
AlertWindow::showMessageBox (AlertWindow::WarningIcon, "Create Project", result.getErrorMessage()); | |||
return; | |||
} | |||
aw.setColour (AlertWindow::textColourId, Colours::red); | |||
aw.setMessage ("Please select a valid Juce folder for the project to use!"); | |||
ScopedPointer<Project> project (wizard->runWizard (mw, projectName.getText(), | |||
fileBrowser.getSelectedFile (0))); | |||
if (project != nullptr) | |||
mw->setProject (project.release()); | |||
} | |||
} | |||
return wizard != nullptr ? wizard->runWizard (ownerWindow) : 0; | |||
void updateCustomItems() | |||
{ | |||
customItems.clear(); | |||
ScopedPointer <NewProjectWizard> wizard (createWizard()); | |||
if (wizard != nullptr) | |||
wizard->addSetupItems (*this, customItems); | |||
} | |||
void comboBoxChanged (ComboBox*) | |||
{ | |||
updateCustomItems(); | |||
} | |||
void textEditorTextChanged (TextEditor&) | |||
{ | |||
updateCreateButton(); | |||
fileBrowser.setFileName (File::createLegalFileName (projectName.getText())); | |||
} | |||
private: | |||
ComboBox projectType; | |||
TextEditor projectName; | |||
Label nameLabel, typeLabel; | |||
FileBrowserComponent fileBrowser; | |||
GroupComponent fileOutline; | |||
TextButton createButton, cancelButton; | |||
OwnedArray<Component> customItems; | |||
NewProjectWizard* createWizard() | |||
{ | |||
return NewProjectWizard::createWizard (projectType.getSelectedItemIndex()); | |||
} | |||
void updateCreateButton() | |||
{ | |||
createButton.setEnabled (projectName.getText().trim().isNotEmpty()); | |||
} | |||
}; | |||
Component* NewProjectWizard::createComponent() | |||
{ | |||
return new WizardComp(); | |||
} |
@@ -2,7 +2,7 @@ | |||
============================================================================== | |||
This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
Copyright 2004-10 by Raw Material Software Ltd. | |||
Copyright 2004-11 by Raw Material Software Ltd. | |||
------------------------------------------------------------------------------ | |||
@@ -23,8 +23,8 @@ | |||
============================================================================== | |||
*/ | |||
#ifndef __JUCER_PROJECTWIZARD_JUCEHEADER__ | |||
#define __JUCER_PROJECTWIZARD_JUCEHEADER__ | |||
#ifndef __JUCER_NEWPROJECTWIZARD_JUCEHEADER__ | |||
#define __JUCER_NEWPROJECTWIZARD_JUCEHEADER__ | |||
#include "../jucer_Headers.h" | |||
#include "jucer_Project.h" | |||
@@ -41,14 +41,14 @@ public: | |||
static int getNumWizards(); | |||
static NewProjectWizard* createWizard (int index); | |||
static Project* runNewProjectWizard (Component* ownerWindow); | |||
static Component* createComponent(); | |||
//============================================================================== | |||
virtual String getName() = 0; | |||
virtual String getDescription() = 0; | |||
virtual void addItemsToAlertWindow (AlertWindow& aw) = 0; | |||
virtual String processResultsFromAlertWindow (AlertWindow& aw) = 0; | |||
virtual void addSetupItems (Component& setupComp, OwnedArray<Component>& itemsCreated) = 0; | |||
virtual Result processResultsFromSetupItems (Component& setupComp) = 0; | |||
virtual bool initialiseProject (Project& project) = 0; | |||
protected: | |||
@@ -59,10 +59,16 @@ protected: | |||
//============================================================================== | |||
NewProjectWizard(); | |||
Project* runWizard (Component* ownerWindow); | |||
Project* runWizard (Component* ownerWindow, | |||
const String& projectName, | |||
const File& targetFolder); | |||
class WizardComp; | |||
friend class WizardComp; | |||
File getSourceFilesFolder() const { return projectFile.getSiblingFile ("Source"); } | |||
static File& getLastWizardFolder(); | |||
}; | |||
#endif // __JUCER_PROJECTWIZARD_JUCEHEADER__ | |||
#endif // __JUCER_NEWPROJECTWIZARD_JUCEHEADER__ |
@@ -2,7 +2,7 @@ | |||
============================================================================== | |||
This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
Copyright 2004-10 by Raw Material Software Ltd. | |||
Copyright 2004-11 by Raw Material Software Ltd. | |||
------------------------------------------------------------------------------ | |||
@@ -25,9 +25,8 @@ | |||
#include "jucer_Project.h" | |||
#include "jucer_ProjectType.h" | |||
#include "jucer_ProjectExporter.h" | |||
#include "jucer_ResourceFile.h" | |||
#include "jucer_ProjectSaver.h" | |||
#include "../Project Saving/jucer_ProjectExporter.h" | |||
#include "../Project Saving/jucer_ProjectSaver.h" | |||
#include "../Application/jucer_OpenDocumentManager.h" | |||
@@ -38,10 +37,10 @@ namespace Tags | |||
const Identifier projectMainGroup ("MAINGROUP"); | |||
const Identifier group ("GROUP"); | |||
const Identifier file ("FILE"); | |||
const Identifier configurations ("CONFIGURATIONS"); | |||
const Identifier configuration ("CONFIGURATION"); | |||
const Identifier exporters ("EXPORTFORMATS"); | |||
const Identifier configGroup ("JUCEOPTIONS"); | |||
const Identifier modulesGroup ("MODULES"); | |||
const Identifier module ("MODULE"); | |||
} | |||
const char* Project::projectFileExtension = ".jucer"; | |||
@@ -90,17 +89,17 @@ void Project::updateProjectSettings() | |||
void Project::setMissingDefaultValues() | |||
{ | |||
if (! projectRoot.hasProperty (Ids::id_)) | |||
projectRoot.setProperty (Ids::id_, createAlphaNumericUID(), nullptr); | |||
if (! projectRoot.hasProperty (ComponentBuilder::idProperty)) | |||
projectRoot.setProperty (ComponentBuilder::idProperty, createAlphaNumericUID(), nullptr); | |||
// Create main file group if missing | |||
if (! projectRoot.getChildWithName (Tags::projectMainGroup).isValid()) | |||
{ | |||
Item mainGroup (*this, ValueTree (Tags::projectMainGroup)); | |||
projectRoot.addChild (mainGroup.getNode(), 0, 0); | |||
projectRoot.addChild (mainGroup.state, 0, 0); | |||
} | |||
getMainGroup().initialiseNodeValues(); | |||
getMainGroup().initialiseMissingProperties(); | |||
if (getDocumentTitle().isEmpty()) | |||
setTitle ("Juce Project"); | |||
@@ -111,17 +110,13 @@ void Project::setMissingDefaultValues() | |||
if (! projectRoot.hasProperty (Ids::version)) | |||
getVersion() = "1.0.0"; | |||
if (! projectRoot.hasProperty (Ids::juceLinkage)) | |||
getJuceLinkageModeValue() = useAmalgamatedJuceViaMultipleTemplates; | |||
updateOldStyleConfigList(); | |||
moveOldPropertyFromProjectToAllExporters (Ids::bigIcon); | |||
moveOldPropertyFromProjectToAllExporters (Ids::smallIcon); | |||
const String juceFolderPath (getRelativePathForFile (StoredSettings::getInstance()->getLastKnownJuceFolder())); | |||
// Create configs group | |||
if (! projectRoot.getChildWithName (Tags::configurations).isValid()) | |||
{ | |||
projectRoot.addChild (ValueTree (Tags::configurations), 0, 0); | |||
createDefaultConfigs(); | |||
} | |||
for (Project::ExporterIterator exporter (*this); exporter.next();) | |||
if (exporter->getNumConfigurations() == 0) | |||
exporter->createDefaultConfigs(); | |||
if (! projectRoot.getChildWithName (Tags::exporters).isValid()) | |||
createDefaultExporters(); | |||
@@ -130,6 +125,74 @@ void Project::setMissingDefaultValues() | |||
if (! projectRoot.hasProperty (Ids::bundleIdentifier)) | |||
setBundleIdentifierToDefault(); | |||
if (! projectRoot.getChildWithName (Tags::modulesGroup).isValid()) | |||
addDefaultModules (false); | |||
} | |||
void Project::updateOldStyleConfigList() | |||
{ | |||
ValueTree deprecatedConfigsList (projectRoot.getChildWithName (ProjectExporter::configurations)); | |||
if (deprecatedConfigsList.isValid()) | |||
{ | |||
projectRoot.removeChild (deprecatedConfigsList, nullptr); | |||
for (Project::ExporterIterator exporter (*this); exporter.next();) | |||
{ | |||
if (exporter->getNumConfigurations() == 0) | |||
{ | |||
ValueTree newConfigs (deprecatedConfigsList.createCopy()); | |||
if (! exporter->isXcode()) | |||
{ | |||
for (int j = newConfigs.getNumChildren(); --j >= 0;) | |||
{ | |||
ValueTree config (newConfigs.getChild(j)); | |||
config.removeProperty (Ids::osxSDK, nullptr); | |||
config.removeProperty (Ids::osxCompatibility, nullptr); | |||
config.removeProperty (Ids::osxArchitecture, nullptr); | |||
} | |||
} | |||
exporter->settings.addChild (newConfigs, 0, nullptr); | |||
} | |||
} | |||
} | |||
} | |||
void Project::moveOldPropertyFromProjectToAllExporters (Identifier name) | |||
{ | |||
if (projectRoot.hasProperty (name)) | |||
{ | |||
for (Project::ExporterIterator exporter (*this); exporter.next();) | |||
exporter->settings.setProperty (name, projectRoot [name], nullptr); | |||
projectRoot.removeProperty (name, nullptr); | |||
} | |||
} | |||
void Project::addDefaultModules (bool shouldCopyFilesLocally) | |||
{ | |||
addModule ("juce_core", shouldCopyFilesLocally); | |||
if (! isConfigFlagEnabled ("JUCE_ONLY_BUILD_CORE_LIBRARY")) | |||
{ | |||
addModule ("juce_events", shouldCopyFilesLocally); | |||
addModule ("juce_graphics", shouldCopyFilesLocally); | |||
addModule ("juce_data_structures", shouldCopyFilesLocally); | |||
addModule ("juce_gui_basics", shouldCopyFilesLocally); | |||
addModule ("juce_gui_extra", shouldCopyFilesLocally); | |||
addModule ("juce_gui_audio", shouldCopyFilesLocally); | |||
addModule ("juce_cryptography", shouldCopyFilesLocally); | |||
addModule ("juce_video", shouldCopyFilesLocally); | |||
addModule ("juce_opengl", shouldCopyFilesLocally); | |||
addModule ("juce_audio_basics", shouldCopyFilesLocally); | |||
addModule ("juce_audio_devices", shouldCopyFilesLocally); | |||
addModule ("juce_audio_formats", shouldCopyFilesLocally); | |||
addModule ("juce_audio_processors", shouldCopyFilesLocally); | |||
} | |||
} | |||
//============================================================================== | |||
@@ -157,15 +220,7 @@ const String Project::loadDocument (const File& file) | |||
const String Project::saveDocument (const File& file) | |||
{ | |||
updateProjectSettings(); | |||
{ | |||
// (getting these forces the values to be sanitised) | |||
OwnedArray <Project::ConfigFlag> flags; | |||
getAllConfigFlags (flags); | |||
} | |||
if (FileHelpers::isJuceFolder (getLocalJuceFolder())) | |||
StoredSettings::getInstance()->setLastKnownJuceFolder (getLocalJuceFolder().getFullPathName()); | |||
sanitiseConfigFlags(); | |||
StoredSettings::getInstance()->recentFiles.addFile (file); | |||
@@ -192,9 +247,6 @@ void Project::valueTreePropertyChanged (ValueTree& tree, const Identifier& prope | |||
if (property == Ids::projectType) | |||
setMissingDefaultValues(); | |||
if (getProjectType().isLibrary()) | |||
getJuceLinkageModeValue() = notLinkedToJuce; | |||
changed(); | |||
} | |||
@@ -271,35 +323,14 @@ const ProjectType& Project::getProjectType() const | |||
return *type; | |||
} | |||
const char* const Project::notLinkedToJuce = "none"; | |||
const char* const Project::useLinkedJuce = "static"; | |||
const char* const Project::useAmalgamatedJuce = "amalg_big"; | |||
const char* const Project::useAmalgamatedJuceViaSingleTemplate = "amalg_template"; | |||
const char* const Project::useAmalgamatedJuceViaMultipleTemplates = "amalg_multi"; | |||
File Project::getLocalJuceFolder() | |||
{ | |||
ScopedPointer <ProjectExporter> exp (ProjectExporter::createPlatformDefaultExporter (*this)); | |||
if (exp != nullptr) | |||
{ | |||
File f (resolveFilename (exp->getJuceFolder().toString())); | |||
if (FileHelpers::isJuceFolder (f)) | |||
return f; | |||
} | |||
return StoredSettings::getInstance()->getLastKnownJuceFolder(); | |||
} | |||
//============================================================================== | |||
void Project::createPropertyEditors (Array <PropertyComponent*>& props) | |||
void Project::createPropertyEditors (PropertyListBuilder& props) | |||
{ | |||
props.add (new TextPropertyComponent (getProjectName(), "Project Name", 256, false)); | |||
props.getLast()->setTooltip ("The name of the project."); | |||
props.add (new TextPropertyComponent (getProjectName(), "Project Name", 256, false), | |||
"The name of the project."); | |||
props.add (new TextPropertyComponent (getVersion(), "Project Version", 16, false)); | |||
props.getLast()->setTooltip ("The project's version number, This should be in the format major.minor.point"); | |||
props.add (new TextPropertyComponent (getVersion(), "Project Version", 16, false), | |||
"The project's version number, This should be in the format major.minor.point"); | |||
{ | |||
StringArray projectTypeNames; | |||
@@ -316,46 +347,15 @@ void Project::createPropertyEditors (Array <PropertyComponent*>& props) | |||
props.add (new ChoicePropertyComponent (getProjectTypeValue(), "Project Type", projectTypeNames, projectTypeCodes)); | |||
} | |||
const char* linkageTypes[] = { "Not linked to Juce", "Linked to Juce Static Library", "Include Juce Amalgamated Files", "Include Juce Source Code Directly (In a single file)", "Include Juce Source Code Directly (Split across several files)", 0 }; | |||
const char* linkageTypeValues[] = { notLinkedToJuce, useLinkedJuce, useAmalgamatedJuce, useAmalgamatedJuceViaSingleTemplate, useAmalgamatedJuceViaMultipleTemplates, 0 }; | |||
props.add (new ChoicePropertyComponent (getJuceLinkageModeValue(), "Juce Linkage Method", StringArray (linkageTypes), Array<var> (linkageTypeValues))); | |||
props.getLast()->setTooltip ("The method by which your project will be linked to Juce."); | |||
props.add (new TextPropertyComponent (getBundleIdentifier(), "Bundle Identifier", 256, false)); | |||
props.getLast()->setTooltip ("A unique identifier for this product, mainly for use in Mac builds. It should be something like 'com.yourcompanyname.yourproductname'"); | |||
props.add (new TextPropertyComponent (getBundleIdentifier(), "Bundle Identifier", 256, false), | |||
"A unique identifier for this product, mainly for use in Mac builds. It should be something like 'com.yourcompanyname.yourproductname'"); | |||
{ | |||
OwnedArray<Project::Item> images; | |||
findAllImageItems (images); | |||
StringArray choices; | |||
Array<var> ids; | |||
choices.add ("<None>"); | |||
ids.add (var::null); | |||
choices.add (String::empty); | |||
ids.add (var::null); | |||
for (int i = 0; i < images.size(); ++i) | |||
{ | |||
choices.add (images.getUnchecked(i)->getName().toString()); | |||
ids.add (images.getUnchecked(i)->getID()); | |||
} | |||
getProjectType().createPropertyEditors (*this, props); | |||
props.add (new ChoicePropertyComponent (getSmallIconImageItemID(), "Icon (small)", choices, ids)); | |||
props.getLast()->setTooltip ("Sets an icon to use for the executable."); | |||
props.add (new TextPropertyComponent (getProjectPreprocessorDefs(), "Preprocessor definitions", 32768, false), | |||
"Extra preprocessor definitions. Use the form \"NAME1=value NAME2=value\", using whitespace or commas to separate the items - to include a space or comma in a definition, precede it with a backslash."); | |||
props.add (new ChoicePropertyComponent (getBigIconImageItemID(), "Icon (large)", choices, ids)); | |||
props.getLast()->setTooltip ("Sets an icon to use for the executable."); | |||
} | |||
getProjectType().createPropertyEditors(*this, props); | |||
props.add (new TextPropertyComponent (getProjectPreprocessorDefs(), "Preprocessor definitions", 32768, false)); | |||
props.getLast()->setTooltip ("Extra preprocessor definitions. Use the form \"NAME1=value NAME2=value\", using whitespace or commas to separate the items - to include a space or comma in a definition, precede it with a backslash."); | |||
for (int i = props.size(); --i >= 0;) | |||
props.getUnchecked(i)->setPreferredHeight (22); | |||
props.setPreferredHeight (22); | |||
} | |||
String Project::getVersionAsHex() const | |||
@@ -373,26 +373,6 @@ String Project::getVersionAsHex() const | |||
return "0x" + String::toHexString (value); | |||
} | |||
Image Project::getBigIcon() | |||
{ | |||
Item icon (getMainGroup().findItemWithID (getBigIconImageItemID().toString())); | |||
if (icon.isValid()) | |||
return ImageCache::getFromFile (icon.getFile()); | |||
return Image::null; | |||
} | |||
Image Project::getSmallIcon() | |||
{ | |||
Item icon (getMainGroup().findItemWithID (getSmallIconImageItemID().toString())); | |||
if (icon.isValid()) | |||
return ImageCache::getFromFile (icon.getFile()); | |||
return Image::null; | |||
} | |||
StringPairArray Project::getPreprocessorDefs() const | |||
{ | |||
return parsePreprocessorDefs (getProjectPreprocessorDefs().toString()); | |||
@@ -423,50 +403,46 @@ void Project::findAllImageItems (OwnedArray<Project::Item>& items) | |||
} | |||
//============================================================================== | |||
Project::Item::Item (Project& project_, const ValueTree& node_) | |||
: project (&project_), node (node_) | |||
Project::Item::Item (Project& project_, const ValueTree& state_) | |||
: project (project_), state (state_) | |||
{ | |||
} | |||
Project::Item::Item (const Item& other) | |||
: project (other.project), node (other.node) | |||
: project (other.project), state (other.state) | |||
{ | |||
} | |||
Project::Item& Project::Item::operator= (const Project::Item& other) | |||
{ | |||
project = other.project; | |||
node = other.node; | |||
return *this; | |||
} | |||
Project::Item Project::Item::createCopy() { Item i (*this); i.state = i.state.createCopy(); return i; } | |||
Project::Item::~Item() | |||
{ | |||
} | |||
Project::Item Project::Item::createCopy() { Item i (*this); i.node = i.node.createCopy(); return i; } | |||
String Project::Item::getID() const { return node [Ids::id_]; } | |||
void Project::Item::setID (const String& newID) { node.setProperty (Ids::id_, newID, nullptr); } | |||
String Project::Item::getID() const { return state [ComponentBuilder::idProperty]; } | |||
void Project::Item::setID (const String& newID) { state.setProperty (ComponentBuilder::idProperty, newID, nullptr); } | |||
String Project::Item::getImageFileID() const { return "id:" + getID(); } | |||
Project::Item Project::Item::createGroup (Project& project, const String& name) | |||
Image Project::Item::loadAsImageFile() const | |||
{ | |||
return isValid() ? ImageCache::getFromFile (getFile()) | |||
: Image::null; | |||
} | |||
Project::Item Project::Item::createGroup (Project& project, const String& name, const String& uid) | |||
{ | |||
Item group (project, ValueTree (Tags::group)); | |||
group.initialiseNodeValues(); | |||
group.setID (uid); | |||
group.initialiseMissingProperties(); | |||
group.getName() = name; | |||
return group; | |||
} | |||
bool Project::Item::isFile() const { return node.hasType (Tags::file); } | |||
bool Project::Item::isGroup() const { return node.hasType (Tags::group) || isMainGroup(); } | |||
bool Project::Item::isMainGroup() const { return node.hasType (Tags::projectMainGroup); } | |||
bool Project::Item::isFile() const { return state.hasType (Tags::file); } | |||
bool Project::Item::isGroup() const { return state.hasType (Tags::group) || isMainGroup(); } | |||
bool Project::Item::isMainGroup() const { return state.hasType (Tags::projectMainGroup); } | |||
bool Project::Item::isImageFile() const { return isFile() && getFile().hasFileExtension ("png;jpg;jpeg;gif;drawable"); } | |||
Project::Item Project::Item::findItemWithID (const String& targetId) const | |||
{ | |||
if (node [Ids::id_] == targetId) | |||
if (state [ComponentBuilder::idProperty] == targetId) | |||
return *this; | |||
if (isGroup()) | |||
@@ -479,7 +455,7 @@ Project::Item Project::Item::findItemWithID (const String& targetId) const | |||
} | |||
} | |||
return Item (*project, ValueTree::invalid); | |||
return Item (project, ValueTree::invalid); | |||
} | |||
bool Project::Item::canContain (const Item& child) const | |||
@@ -494,25 +470,21 @@ bool Project::Item::canContain (const Item& child) const | |||
return false; | |||
} | |||
bool Project::Item::shouldBeAddedToTargetProject() const | |||
{ | |||
return isFile(); | |||
} | |||
bool Project::Item::shouldBeAddedToTargetProject() const { return isFile(); } | |||
bool Project::Item::shouldBeCompiled() const { return getShouldCompileValue().getValue(); } | |||
Value Project::Item::getShouldCompileValue() const { return node.getPropertyAsValue (Ids::compile, getUndoManager()); } | |||
bool Project::Item::shouldBeCompiled() const { return getShouldCompileValue().getValue(); } | |||
Value Project::Item::getShouldCompileValue() const { return state.getPropertyAsValue (Ids::compile, getUndoManager()); } | |||
bool Project::Item::shouldBeAddedToBinaryResources() const { return getShouldAddToResourceValue().getValue(); } | |||
Value Project::Item::getShouldAddToResourceValue() const { return node.getPropertyAsValue (Ids::resource, getUndoManager()); } | |||
Value Project::Item::getShouldInhibitWarningsValue() const { return node.getPropertyAsValue (Ids::noWarnings, getUndoManager()); } | |||
Value Project::Item::getShouldUseStdCallValue() const { return node.getPropertyAsValue (Ids::useStdCall, nullptr); } | |||
Value Project::Item::getShouldAddToResourceValue() const { return state.getPropertyAsValue (Ids::resource, getUndoManager()); } | |||
Value Project::Item::getShouldInhibitWarningsValue() const { return state.getPropertyAsValue (Ids::noWarnings, getUndoManager()); } | |||
Value Project::Item::getShouldUseStdCallValue() const { return state.getPropertyAsValue (Ids::useStdCall, nullptr); } | |||
String Project::Item::getFilePath() const | |||
{ | |||
if (isFile()) | |||
return node [Ids::file].toString(); | |||
return state [Ids::file].toString(); | |||
else | |||
return String::empty; | |||
} | |||
@@ -520,14 +492,14 @@ String Project::Item::getFilePath() const | |||
File Project::Item::getFile() const | |||
{ | |||
if (isFile()) | |||
return getProject().resolveFilename (node [Ids::file].toString()); | |||
return project.resolveFilename (state [Ids::file].toString()); | |||
else | |||
return File::nonexistent; | |||
} | |||
void Project::Item::setFile (const File& file) | |||
{ | |||
setFile (RelativePath (getProject().getRelativePathForFile (file), RelativePath::projectFolder)); | |||
setFile (RelativePath (project.getRelativePathForFile (file), RelativePath::projectFolder)); | |||
jassert (getFile() == file); | |||
} | |||
@@ -535,8 +507,8 @@ void Project::Item::setFile (const RelativePath& file) | |||
{ | |||
jassert (file.getRoot() == RelativePath::projectFolder); | |||
jassert (isFile()); | |||
node.setProperty (Ids::file, file.toUnixStyle(), getUndoManager()); | |||
node.setProperty (Ids::name, file.getFileName(), getUndoManager()); | |||
state.setProperty (Ids::file, file.toUnixStyle(), getUndoManager()); | |||
state.setProperty (Ids::name, file.getFileName(), getUndoManager()); | |||
} | |||
bool Project::Item::renameFile (const File& newFile) | |||
@@ -553,6 +525,11 @@ bool Project::Item::renameFile (const File& newFile) | |||
return false; | |||
} | |||
bool Project::Item::containsChildForFile (const RelativePath& file) const | |||
{ | |||
return state.getChildWithProperty (Ids::file, file.toUnixStyle()).isValid(); | |||
} | |||
Project::Item Project::Item::findItemForFile (const File& file) const | |||
{ | |||
if (getFile() == file) | |||
@@ -569,7 +546,7 @@ Project::Item Project::Item::findItemForFile (const File& file) const | |||
} | |||
} | |||
return Item (getProject(), ValueTree::invalid); | |||
return Item (project, ValueTree::invalid); | |||
} | |||
File Project::Item::determineGroupFolder() const | |||
@@ -595,7 +572,7 @@ File Project::Item::determineGroupFolder() const | |||
} | |||
else | |||
{ | |||
f = getProject().getFile().getParentDirectory(); | |||
f = project.getFile().getParentDirectory(); | |||
if (f.getChildFile ("Source").isDirectory()) | |||
f = f.getChildFile ("Source"); | |||
@@ -604,35 +581,35 @@ File Project::Item::determineGroupFolder() const | |||
return f; | |||
} | |||
void Project::Item::initialiseNodeValues() | |||
void Project::Item::initialiseMissingProperties() | |||
{ | |||
if (! node.hasProperty (Ids::id_)) | |||
if (! state.hasProperty (ComponentBuilder::idProperty)) | |||
setID (createAlphaNumericUID()); | |||
if (isFile()) | |||
{ | |||
node.setProperty (Ids::name, getFile().getFileName(), 0); | |||
state.setProperty (Ids::name, getFile().getFileName(), 0); | |||
} | |||
else if (isGroup()) | |||
{ | |||
for (int i = getNumChildren(); --i >= 0;) | |||
getChild(i).initialiseNodeValues(); | |||
getChild(i).initialiseMissingProperties(); | |||
} | |||
} | |||
Value Project::Item::getName() const | |||
{ | |||
return node.getPropertyAsValue (Ids::name, getUndoManager()); | |||
return state.getPropertyAsValue (Ids::name, getUndoManager()); | |||
} | |||
void Project::Item::addChild (const Item& newChild, int insertIndex) | |||
{ | |||
node.addChild (newChild.getNode(), insertIndex, getUndoManager()); | |||
state.addChild (newChild.state, insertIndex, getUndoManager()); | |||
} | |||
void Project::Item::removeItemFromProject() | |||
{ | |||
node.getParent().removeChild (node, getUndoManager()); | |||
state.getParent().removeChild (state, getUndoManager()); | |||
} | |||
Project::Item Project::Item::getParent() const | |||
@@ -640,7 +617,7 @@ Project::Item Project::Item::getParent() const | |||
if (isMainGroup() || ! isGroup()) | |||
return *this; | |||
return Item (getProject(), node.getParent()); | |||
return Item (project, state.getParent()); | |||
} | |||
struct ItemSorter | |||
@@ -651,22 +628,56 @@ struct ItemSorter | |||
} | |||
}; | |||
void Project::Item::sortAlphabetically() | |||
struct ItemSorterWithGroupsAtStart | |||
{ | |||
ItemSorter sorter; | |||
node.sort (sorter, getUndoManager(), true); | |||
static int compareElements (const ValueTree& first, const ValueTree& second) | |||
{ | |||
const bool firstIsGroup = first.hasType (Tags::group); | |||
const bool secondIsGroup = second.hasType (Tags::group); | |||
if (firstIsGroup == secondIsGroup) | |||
return first [Ids::name].toString().compareIgnoreCase (second [Ids::name].toString()); | |||
else | |||
return firstIsGroup ? -1 : 1; | |||
} | |||
}; | |||
void Project::Item::sortAlphabetically (bool keepGroupsAtStart) | |||
{ | |||
if (keepGroupsAtStart) | |||
{ | |||
ItemSorterWithGroupsAtStart sorter; | |||
state.sort (sorter, getUndoManager(), true); | |||
} | |||
else | |||
{ | |||
ItemSorter sorter; | |||
state.sort (sorter, getUndoManager(), true); | |||
} | |||
} | |||
Project::Item Project::Item::getOrCreateSubGroup (const String& name) | |||
{ | |||
for (int i = state.getNumChildren(); --i >= 0;) | |||
{ | |||
const ValueTree child (state.getChild (i)); | |||
if (child.getProperty (Ids::name) == name && child.hasType (Tags::group)) | |||
return Item (project, child); | |||
} | |||
return addNewSubGroup (name, -1); | |||
} | |||
Project::Item Project::Item::addNewSubGroup (const String& name, int insertIndex) | |||
{ | |||
Item group (createGroup (getProject(), name)); | |||
Item group (createGroup (project, name, createGUID (getID() + name + String (getNumChildren())))); | |||
jassert (canContain (group)); | |||
addChild (group, insertIndex); | |||
return group; | |||
} | |||
bool Project::Item::addFile (const File& file, int insertIndex) | |||
bool Project::Item::addFile (const File& file, int insertIndex, const bool shouldCompile) | |||
{ | |||
if (file == File::nonexistent || file.isHidden() || file.getFileName().startsWithChar ('.')) | |||
return false; | |||
@@ -678,28 +689,16 @@ bool Project::Item::addFile (const File& file, int insertIndex) | |||
DirectoryIterator iter (file, false, "*", File::findFilesAndDirectories); | |||
while (iter.next()) | |||
{ | |||
if (! getProject().getMainGroup().findItemForFile (iter.getFile()).isValid()) | |||
group.addFile (iter.getFile(), -1); | |||
if (! project.getMainGroup().findItemForFile (iter.getFile()).isValid()) | |||
group.addFile (iter.getFile(), -1, shouldCompile); | |||
} | |||
group.sortAlphabetically(); | |||
group.sortAlphabetically (false); | |||
} | |||
else if (file.existsAsFile()) | |||
{ | |||
if (! getProject().getMainGroup().findItemForFile (file).isValid()) | |||
{ | |||
Item item (getProject(), ValueTree (Tags::file)); | |||
item.initialiseNodeValues(); | |||
item.getName() = file.getFileName(); | |||
item.getShouldCompileValue() = file.hasFileExtension ("cpp;mm;c;m;cc;cxx"); | |||
item.getShouldAddToResourceValue() = getProject().shouldBeAddedToBinaryResourcesByDefault (file); | |||
if (canContain (item)) | |||
{ | |||
item.setFile (file); | |||
addChild (item, insertIndex); | |||
} | |||
} | |||
if (! project.getMainGroup().findItemForFile (file).isValid()) | |||
addFileUnchecked (file, insertIndex, shouldCompile); | |||
} | |||
else | |||
{ | |||
@@ -709,13 +708,28 @@ bool Project::Item::addFile (const File& file, int insertIndex) | |||
return true; | |||
} | |||
void Project::Item::addFileUnchecked (const File& file, int insertIndex, const bool shouldCompile) | |||
{ | |||
Item item (project, ValueTree (Tags::file)); | |||
item.initialiseMissingProperties(); | |||
item.getName() = file.getFileName(); | |||
item.getShouldCompileValue() = shouldCompile && file.hasFileExtension ("cpp;mm;c;m;cc;cxx;r"); | |||
item.getShouldAddToResourceValue() = project.shouldBeAddedToBinaryResourcesByDefault (file); | |||
if (canContain (item)) | |||
{ | |||
item.setFile (file); | |||
addChild (item, insertIndex); | |||
} | |||
} | |||
bool Project::Item::addRelativeFile (const RelativePath& file, int insertIndex, bool shouldCompile) | |||
{ | |||
Item item (getProject(), ValueTree (Tags::file)); | |||
item.initialiseNodeValues(); | |||
Item item (project, ValueTree (Tags::file)); | |||
item.initialiseMissingProperties(); | |||
item.getName() = file.getFileName(); | |||
item.getShouldCompileValue() = shouldCompile; | |||
item.getShouldAddToResourceValue() = getProject().shouldBeAddedToBinaryResourcesByDefault (file); | |||
item.getShouldAddToResourceValue() = project.shouldBeAddedToBinaryResourcesByDefault (file); | |||
if (canContain (item)) | |||
{ | |||
@@ -738,7 +752,7 @@ const Drawable* Project::Item::getIcon() const | |||
} | |||
else if (isMainGroup()) | |||
{ | |||
return &(getProject().mainProjectIcon); | |||
return &(project.mainProjectIcon); | |||
} | |||
return LookAndFeel::getDefaultLookAndFeel().getDefaultFolderImage(); | |||
@@ -750,19 +764,6 @@ ValueTree Project::getConfigNode() | |||
return projectRoot.getOrCreateChildWithName (Tags::configGroup, nullptr); | |||
} | |||
void Project::getAllConfigFlags (OwnedArray <ConfigFlag>& flags) | |||
{ | |||
OwnedArray<LibraryModule> modules; | |||
getProjectType().createRequiredModules (*this, modules); | |||
int i; | |||
for (i = 0; i < modules.size(); ++i) | |||
modules.getUnchecked(i)->getConfigFlags (*this, flags); | |||
for (i = 0; i < flags.size(); ++i) | |||
flags.getUnchecked(i)->value.referTo (getConfigFlag (flags.getUnchecked(i)->symbol)); | |||
} | |||
const char* const Project::configFlagDefault = "default"; | |||
const char* const Project::configFlagEnabled = "enabled"; | |||
const char* const Project::configFlagDisabled = "disabled"; | |||
@@ -783,197 +784,89 @@ bool Project::isConfigFlagEnabled (const String& name) const | |||
return projectRoot.getChildWithName (Tags::configGroup).getProperty (name) == configFlagEnabled; | |||
} | |||
//============================================================================== | |||
ValueTree Project::getConfigurations() const | |||
void Project::sanitiseConfigFlags() | |||
{ | |||
return projectRoot.getChildWithName (Tags::configurations); | |||
} | |||
ValueTree configNode (getConfigNode()); | |||
int Project::getNumConfigurations() const | |||
{ | |||
return getConfigurations().getNumChildren(); | |||
for (int i = configNode.getNumProperties(); --i >= 0;) | |||
{ | |||
const var value (configNode [configNode.getPropertyName(i)]); | |||
if (value != configFlagEnabled && value != configFlagDisabled) | |||
configNode.removeProperty (configNode.getPropertyName(i), getUndoManagerFor (configNode)); | |||
} | |||
} | |||
Project::BuildConfiguration Project::getConfiguration (int index) | |||
//============================================================================== | |||
ValueTree Project::getModulesNode() | |||
{ | |||
jassert (index < getConfigurations().getNumChildren()); | |||
return BuildConfiguration (this, getConfigurations().getChild (index)); | |||
return projectRoot.getOrCreateChildWithName (Tags::modulesGroup, nullptr); | |||
} | |||
bool Project::hasConfigurationNamed (const String& name) const | |||
bool Project::isModuleEnabled (const String& moduleID) const | |||
{ | |||
const ValueTree configs (getConfigurations()); | |||
for (int i = configs.getNumChildren(); --i >= 0;) | |||
if (configs.getChild(i) [Ids::name].toString() == name) | |||
ValueTree modules (projectRoot.getChildWithName (Tags::modulesGroup)); | |||
for (int i = 0; i < modules.getNumChildren(); ++i) | |||
if (modules.getChild(i) [ComponentBuilder::idProperty] == moduleID) | |||
return true; | |||
return false; | |||
} | |||
String Project::getUniqueConfigName (String name) const | |||
Value Project::shouldShowAllModuleFilesInProject (const String& moduleID) | |||
{ | |||
String nameRoot (name); | |||
while (CharacterFunctions::isDigit (nameRoot.getLastCharacter())) | |||
nameRoot = nameRoot.dropLastCharacters (1); | |||
nameRoot = nameRoot.trim(); | |||
int suffix = 2; | |||
while (hasConfigurationNamed (name)) | |||
name = nameRoot + " " + String (suffix++); | |||
return name; | |||
return getModulesNode().getChildWithProperty (ComponentBuilder::idProperty, moduleID) | |||
.getPropertyAsValue (Ids::showAllCode, getUndoManagerFor (getModulesNode())); | |||
} | |||
void Project::addNewConfiguration (BuildConfiguration* configToCopy) | |||
Value Project::shouldCopyModuleFilesLocally (const String& moduleID) | |||
{ | |||
const String configName (getUniqueConfigName (configToCopy != nullptr ? configToCopy->config [Ids::name].toString() | |||
: "New Build Configuration")); | |||
ValueTree configs (getConfigurations()); | |||
if (! configs.isValid()) | |||
{ | |||
projectRoot.addChild (ValueTree (Tags::configurations), 0, getUndoManagerFor (projectRoot)); | |||
configs = getConfigurations(); | |||
} | |||
ValueTree newConfig (Tags::configuration); | |||
if (configToCopy != nullptr) | |||
newConfig = configToCopy->config.createCopy(); | |||
newConfig.setProperty (Ids::name, configName, 0); | |||
configs.addChild (newConfig, -1, getUndoManagerFor (configs)); | |||
} | |||
void Project::deleteConfiguration (int index) | |||
{ | |||
ValueTree configs (getConfigurations()); | |||
configs.removeChild (index, getUndoManagerFor (getConfigurations())); | |||
return getModulesNode().getChildWithProperty (ComponentBuilder::idProperty, moduleID) | |||
.getPropertyAsValue (Ids::useLocalCopy, getUndoManagerFor (getModulesNode())); | |||
} | |||
void Project::createDefaultConfigs() | |||
void Project::addModule (const String& moduleID, bool shouldCopyFilesLocally) | |||
{ | |||
for (int i = 0; i < 2; ++i) | |||
if (! isModuleEnabled (moduleID)) | |||
{ | |||
addNewConfiguration (nullptr); | |||
BuildConfiguration config = getConfiguration (i); | |||
ValueTree module (Tags::module); | |||
module.setProperty (ComponentBuilder::idProperty, moduleID, nullptr); | |||
const bool debugConfig = i == 0; | |||
ValueTree modules (getModulesNode()); | |||
modules.addChild (module, -1, getUndoManagerFor (modules)); | |||
config.getName() = debugConfig ? "Debug" : "Release"; | |||
config.isDebug() = debugConfig; | |||
config.getOptimisationLevel() = debugConfig ? 1 : 2; | |||
config.getTargetBinaryName() = getProjectFilenameRoot(); | |||
shouldShowAllModuleFilesInProject (moduleID) = true; | |||
} | |||
} | |||
//============================================================================== | |||
Project::BuildConfiguration::BuildConfiguration (Project* project_, const ValueTree& configNode) | |||
: project (project_), | |||
config (configNode) | |||
{ | |||
} | |||
Project::BuildConfiguration::BuildConfiguration (const BuildConfiguration& other) | |||
: project (other.project), | |||
config (other.config) | |||
{ | |||
} | |||
const Project::BuildConfiguration& Project::BuildConfiguration::operator= (const BuildConfiguration& other) | |||
{ | |||
project = other.project; | |||
config = other.config; | |||
return *this; | |||
if (shouldCopyFilesLocally) | |||
shouldCopyModuleFilesLocally (moduleID) = true; | |||
} | |||
Project::BuildConfiguration::~BuildConfiguration() | |||
void Project::removeModule (const String& moduleID) | |||
{ | |||
} | |||
ValueTree modules (getModulesNode()); | |||
String Project::BuildConfiguration::getGCCOptimisationFlag() const | |||
{ | |||
const int level = (int) getOptimisationLevel().getValue(); | |||
return String (level <= 1 ? "0" : (level == 2 ? "s" : "3")); | |||
for (int i = 0; i < modules.getNumChildren(); ++i) | |||
if (modules.getChild(i) [ComponentBuilder::idProperty] == moduleID) | |||
modules.removeChild (i, getUndoManagerFor (modules)); | |||
} | |||
const char* const Project::BuildConfiguration::osxVersionDefault = "default"; | |||
const char* const Project::BuildConfiguration::osxVersion10_4 = "10.4 SDK"; | |||
const char* const Project::BuildConfiguration::osxVersion10_5 = "10.5 SDK"; | |||
const char* const Project::BuildConfiguration::osxVersion10_6 = "10.6 SDK"; | |||
const char* const Project::BuildConfiguration::osxArch_Default = "default"; | |||
const char* const Project::BuildConfiguration::osxArch_Native = "Native"; | |||
const char* const Project::BuildConfiguration::osxArch_32BitUniversal = "32BitUniversal"; | |||
const char* const Project::BuildConfiguration::osxArch_64BitUniversal = "64BitUniversal"; | |||
const char* const Project::BuildConfiguration::osxArch_64Bit = "64BitIntel"; | |||
void Project::BuildConfiguration::createPropertyEditors (Array <PropertyComponent*>& props) | |||
void Project::createRequiredModules (const ModuleList& availableModules, OwnedArray<LibraryModule>& modules) const | |||
{ | |||
props.add (new TextPropertyComponent (getName(), "Name", 96, false)); | |||
props.getLast()->setTooltip ("The name of this configuration."); | |||
props.add (new BooleanPropertyComponent (isDebug(), "Debug mode", "Debugging enabled")); | |||
props.getLast()->setTooltip ("If enabled, this means that the configuration should be built with debug synbols."); | |||
const char* optimisationLevels[] = { "No optimisation", "Optimise for size and speed", "Optimise for maximum speed", 0 }; | |||
const int optimisationLevelValues[] = { 1, 2, 3, 0 }; | |||
props.add (new ChoicePropertyComponent (getOptimisationLevel(), "Optimisation", StringArray (optimisationLevels), Array<var> (optimisationLevelValues))); | |||
props.getLast()->setTooltip ("The optimisation level for this configuration"); | |||
props.add (new TextPropertyComponent (getTargetBinaryName(), "Binary name", 256, false)); | |||
props.getLast()->setTooltip ("The filename to use for the destination binary executable file. Don't add a suffix to this, because platform-specific suffixes will be added for each target platform."); | |||
props.add (new TextPropertyComponent (getTargetBinaryRelativePath(), "Binary location", 1024, false)); | |||
props.getLast()->setTooltip ("The folder in which the finished binary should be placed. Leave this blank to cause the binary to be placed in its default location in the build folder."); | |||
props.add (new TextPropertyComponent (getHeaderSearchPath(), "Header search path", 16384, false)); | |||
props.getLast()->setTooltip ("Extra header search paths. Use semi-colons to separate multiple paths."); | |||
props.add (new TextPropertyComponent (getBuildConfigPreprocessorDefs(), "Preprocessor definitions", 32768, false)); | |||
props.getLast()->setTooltip ("Extra preprocessor definitions. Use the form \"NAME1=value NAME2=value\", using whitespace or commas to separate the items - to include a space or comma in a definition, precede it with a backslash."); | |||
if (getMacSDKVersion().toString().isEmpty()) | |||
getMacSDKVersion() = osxVersionDefault; | |||
const char* osxVersions[] = { "Use Default", osxVersion10_4, osxVersion10_5, osxVersion10_6, 0 }; | |||
const char* osxVersionValues[] = { osxVersionDefault, osxVersion10_4, osxVersion10_5, osxVersion10_6, 0 }; | |||
props.add (new ChoicePropertyComponent (getMacSDKVersion(), "OSX Base SDK Version", StringArray (osxVersions), Array<var> (osxVersionValues))); | |||
props.getLast()->setTooltip ("The version of OSX to link against in the XCode build."); | |||
if (getMacCompatibilityVersion().toString().isEmpty()) | |||
getMacCompatibilityVersion() = osxVersionDefault; | |||
props.add (new ChoicePropertyComponent (getMacCompatibilityVersion(), "OSX Compatibility Version", StringArray (osxVersions), Array<var> (osxVersionValues))); | |||
props.getLast()->setTooltip ("The minimum version of OSX that the target binary will be compatible with."); | |||
const char* osxArch[] = { "Use Default", "Native architecture of build machine", "Universal Binary (32-bit)", "Universal Binary (64-bit)", "64-bit Intel", 0 }; | |||
const char* osxArchValues[] = { osxArch_Default, osxArch_Native, osxArch_32BitUniversal, osxArch_64BitUniversal, osxArch_64Bit, 0 }; | |||
if (getMacArchitecture().toString().isEmpty()) | |||
getMacArchitecture() = osxArch_Default; | |||
props.add (new ChoicePropertyComponent (getMacArchitecture(), "OSX Architecture", StringArray (osxArch), Array<var> (osxArchValues))); | |||
props.getLast()->setTooltip ("The type of OSX binary that will be produced."); | |||
for (int i = props.size(); --i >= 0;) | |||
props.getUnchecked(i)->setPreferredHeight (22); | |||
for (int i = 0; i < availableModules.modules.size(); ++i) | |||
if (isModuleEnabled (availableModules.modules.getUnchecked(i)->uid)) | |||
modules.add (availableModules.modules.getUnchecked(i)->create()); | |||
} | |||
StringPairArray Project::BuildConfiguration::getAllPreprocessorDefs() const | |||
int Project::getNumModules() const | |||
{ | |||
return mergePreprocessorDefs (project->getPreprocessorDefs(), | |||
parsePreprocessorDefs (getBuildConfigPreprocessorDefs().toString())); | |||
return projectRoot.getChildWithName (Tags::modulesGroup).getNumChildren(); | |||
} | |||
StringArray Project::BuildConfiguration::getHeaderSearchPaths() const | |||
String Project::getModuleID (int index) const | |||
{ | |||
StringArray s; | |||
s.addTokens (getHeaderSearchPath().toString(), ";", String::empty); | |||
return s; | |||
return projectRoot.getChildWithName (Tags::modulesGroup).getChild (index) [ComponentBuilder::idProperty].toString(); | |||
} | |||
//============================================================================== | |||
@@ -1001,9 +894,9 @@ ProjectExporter* Project::createExporter (int index) | |||
return ProjectExporter::createExporter (*this, getExporters().getChild (index)); | |||
} | |||
void Project::addNewExporter (int exporterIndex) | |||
void Project::addNewExporter (const String& exporterName) | |||
{ | |||
ScopedPointer<ProjectExporter> exp (ProjectExporter::createNewExporter (*this, exporterIndex)); | |||
ScopedPointer<ProjectExporter> exp (ProjectExporter::createNewExporter (*this, exporterName)); | |||
ValueTree exporters (getExporters()); | |||
exporters.addChild (exp->getSettings(), -1, getUndoManagerFor (exporters)); | |||
@@ -1020,8 +913,10 @@ void Project::createDefaultExporters() | |||
ValueTree exporters (getExporters()); | |||
exporters.removeAllChildren (getUndoManagerFor (exporters)); | |||
for (int i = 0; i < ProjectExporter::getNumExporters(); ++i) | |||
addNewExporter (i); | |||
const StringArray exporterNames (ProjectExporter::getDefaultExporters()); | |||
for (int i = 0; i < exporterNames.size(); ++i) | |||
addNewExporter (exporterNames[i]); | |||
} | |||
//============================================================================== | |||
@@ -1040,34 +935,21 @@ String Project::getFileTemplate (const String& templateName) | |||
} | |||
//============================================================================== | |||
void Project::resaveJucerFile (const File& file) | |||
{ | |||
if (! file.exists()) | |||
{ | |||
std::cout << "The file " << file.getFullPathName() << " doesn't exist!" << std::endl; | |||
return; | |||
} | |||
Project::ExporterIterator::ExporterIterator (Project& project_) : index (-1), project (project_) {} | |||
Project::ExporterIterator::~ExporterIterator() {} | |||
if (! file.hasFileExtension (Project::projectFileExtension)) | |||
{ | |||
std::cout << file.getFullPathName() << " isn't a valid jucer project file!" << std::endl; | |||
return; | |||
} | |||
bool Project::ExporterIterator::next() | |||
{ | |||
if (++index >= project.getNumExporters()) | |||
return false; | |||
Project newDoc (file); | |||
exporter = project.createExporter (index); | |||
if (! newDoc.loadFrom (file, true)) | |||
if (exporter == nullptr) | |||
{ | |||
std::cout << "Failed to load the project file: " << file.getFullPathName() << std::endl; | |||
return; | |||
jassertfalse; // corrupted project file? | |||
return next(); | |||
} | |||
std::cout << "The Jucer - Re-saving file: " << file.getFullPathName() << std::endl; | |||
String error (newDoc.saveDocument (file)); | |||
if (error.isNotEmpty()) | |||
{ | |||
std::cout << "Error when writing project: " << error << std::endl; | |||
return; | |||
} | |||
return true; | |||
} |
@@ -2,7 +2,7 @@ | |||
============================================================================== | |||
This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
Copyright 2004-10 by Raw Material Software Ltd. | |||
Copyright 2004-11 by Raw Material Software Ltd. | |||
------------------------------------------------------------------------------ | |||
@@ -29,6 +29,8 @@ | |||
#include "../jucer_Headers.h" | |||
class ProjectExporter; | |||
class ProjectType; | |||
class ModuleList; | |||
class LibraryModule; | |||
//============================================================================== | |||
class Project : public FileBasedDocument, | |||
@@ -53,7 +55,7 @@ public: | |||
ValueTree getProjectRoot() const { return projectRoot; } | |||
Value getProjectName() { return getMainGroup().getName(); } | |||
String getProjectFilenameRoot() { return File::createLegalFileName (getDocumentTitle()); } | |||
String getProjectUID() const { return projectRoot [Ids::id_]; } | |||
String getProjectUID() const { return projectRoot [ComponentBuilder::idProperty]; } | |||
//============================================================================== | |||
template <class FileType> | |||
@@ -67,7 +69,7 @@ public: | |||
//============================================================================== | |||
// Creates editors for the project settings | |||
void createPropertyEditors (Array <PropertyComponent*>& properties); | |||
void createPropertyEditors (PropertyListBuilder&); | |||
//============================================================================== | |||
// project types | |||
@@ -76,41 +78,18 @@ public: | |||
Value getVersion() const { return getProjectValue ("version"); } | |||
String getVersionAsHex() const; | |||
Value getBundleIdentifier() const { return getProjectValue ("bundleIdentifier"); } | |||
Value getBundleIdentifier() const { return getProjectValue (Ids::bundleIdentifier); } | |||
void setBundleIdentifierToDefault() { getBundleIdentifier() = "com.yourcompany." + CodeHelpers::makeValidIdentifier (getProjectName().toString(), false, true, false); } | |||
//============================================================================== | |||
// linkage modes.. | |||
static const char* const notLinkedToJuce; | |||
static const char* const useLinkedJuce; | |||
static const char* const useAmalgamatedJuce; | |||
static const char* const useAmalgamatedJuceViaSingleTemplate; | |||
static const char* const useAmalgamatedJuceViaMultipleTemplates; | |||
Value getJuceLinkageModeValue() const { return getProjectValue ("juceLinkage"); } | |||
String getJuceLinkageMode() const { return getJuceLinkageModeValue().toString(); } | |||
bool isUsingWrapperFiles() const { return isUsingFullyAmalgamatedFile() || isUsingSingleTemplateFile() || isUsingMultipleTemplateFiles(); } | |||
bool isUsingFullyAmalgamatedFile() const { return getJuceLinkageMode() == useAmalgamatedJuce; } | |||
bool isUsingSingleTemplateFile() const { return getJuceLinkageMode() == useAmalgamatedJuceViaSingleTemplate; } | |||
bool isUsingMultipleTemplateFiles() const { return getJuceLinkageMode() == useAmalgamatedJuceViaMultipleTemplates; } | |||
//============================================================================== | |||
Value getProjectValue (const Identifier& name) const { return projectRoot.getPropertyAsValue (name, getUndoManagerFor (projectRoot)); } | |||
Value getProjectPreprocessorDefs() const { return getProjectValue (Ids::defines); } | |||
StringPairArray getPreprocessorDefs() const; | |||
Value getBigIconImageItemID() const { return getProjectValue ("bigIcon"); } | |||
Value getSmallIconImageItemID() const { return getProjectValue ("smallIcon"); } | |||
Image getBigIcon(); | |||
Image getSmallIcon(); | |||
//============================================================================== | |||
File getAppIncludeFile() const { return getGeneratedCodeFolder().getChildFile (getJuceSourceHFilename()); } | |||
File getGeneratedCodeFolder() const { return getFile().getSiblingFile ("JuceLibraryCode"); } | |||
File getPluginCharacteristicsFile() const { return getGeneratedCodeFolder().getChildFile (getPluginCharacteristicsFilename()); } | |||
File getLocalJuceFolder(); | |||
//============================================================================== | |||
String getAmalgamatedHeaderFileName() const { return "juce_amalgamated.h"; } | |||
@@ -121,8 +100,6 @@ public: | |||
String getJuceSourceFilenameRoot() const { return "JuceLibraryCode"; } | |||
int getNumSeparateAmalgamatedFiles() const { return 4; } | |||
String getJuceSourceHFilename() const { return "JuceHeader.h"; } | |||
String getJuceCodeGroupName() const { return "Juce Library Code"; } | |||
String getPluginCharacteristicsFilename() const { return "JucePluginCharacteristics.h"; } | |||
//============================================================================== | |||
class Item | |||
@@ -131,18 +108,13 @@ public: | |||
//============================================================================== | |||
Item (Project& project, const ValueTree& itemNode); | |||
Item (const Item& other); | |||
Item& operator= (const Item& other); | |||
~Item(); | |||
static Item createGroup (Project& project, const String& name); | |||
void initialiseNodeValues(); | |||
static Item createGroup (Project& project, const String& name, const String& uid); | |||
void initialiseMissingProperties(); | |||
//============================================================================== | |||
bool isValid() const { return node.isValid(); } | |||
const ValueTree& getNode() const noexcept { return node; } | |||
ValueTree& getNode() noexcept { return node; } | |||
Project& getProject() const noexcept { return *project; } | |||
bool operator== (const Item& other) const { return node == other.node && project == other.project; } | |||
bool isValid() const { return state.isValid(); } | |||
bool operator== (const Item& other) const { return state == other.state && &project == &other.project; } | |||
bool operator!= (const Item& other) const { return ! operator== (other); } | |||
//============================================================================== | |||
@@ -152,9 +124,11 @@ public: | |||
bool isImageFile() const; | |||
String getID() const; | |||
void setID (const String& newID); | |||
Item findItemWithID (const String& targetId) const; // (recursive search) | |||
String getImageFileID() const; | |||
void setID (const String& newID); | |||
Image loadAsImageFile() const; | |||
//============================================================================== | |||
Value getName() const; | |||
@@ -175,28 +149,32 @@ public: | |||
//============================================================================== | |||
bool canContain (const Item& child) const; | |||
int getNumChildren() const { return node.getNumChildren(); } | |||
Item getChild (int index) const { return Item (getProject(), node.getChild (index)); } | |||
int getNumChildren() const { return state.getNumChildren(); } | |||
Item getChild (int index) const { return Item (project, state.getChild (index)); } | |||
Item addNewSubGroup (const String& name, int insertIndex); | |||
Item getOrCreateSubGroup (const String& name); | |||
void addChild (const Item& newChild, int insertIndex); | |||
bool addFile (const File& file, int insertIndex); | |||
bool addFile (const File& file, int insertIndex, bool shouldCompile); | |||
void addFileUnchecked (const File& file, int insertIndex, bool shouldCompile); | |||
bool addRelativeFile (const RelativePath& file, int insertIndex, bool shouldCompile); | |||
void removeItemFromProject(); | |||
void sortAlphabetically(); | |||
void sortAlphabetically (bool keepGroupsAtStart); | |||
Item findItemForFile (const File& file) const; | |||
bool containsChildForFile (const RelativePath& file) const; | |||
Item getParent() const; | |||
Item createCopy(); | |||
UndoManager* getUndoManager() const { return project.getUndoManagerFor (state); } | |||
const Drawable* getIcon() const; | |||
private: | |||
//============================================================================== | |||
Project* project; | |||
ValueTree node; | |||
Project& project; | |||
ValueTree state; | |||
UndoManager* getUndoManager() const { return getProject().getUndoManagerFor (node); } | |||
private: | |||
Item& operator= (const Item&); | |||
}; | |||
Item getMainGroup(); | |||
@@ -204,87 +182,57 @@ public: | |||
void findAllImageItems (OwnedArray<Item>& items); | |||
//============================================================================== | |||
class BuildConfiguration | |||
ValueTree getExporters(); | |||
int getNumExporters(); | |||
ProjectExporter* createExporter (int index); | |||
void addNewExporter (const String& exporterName); | |||
void deleteExporter (int index); | |||
void createDefaultExporters(); | |||
struct ExporterIterator | |||
{ | |||
public: | |||
BuildConfiguration (const BuildConfiguration&); | |||
const BuildConfiguration& operator= (const BuildConfiguration&); | |||
~BuildConfiguration(); | |||
ExporterIterator (Project& project); | |||
~ExporterIterator(); | |||
//============================================================================== | |||
Project& getProject() const { return *project; } | |||
bool next(); | |||
void createPropertyEditors (Array <PropertyComponent*>& properties); | |||
ProjectExporter& operator*() const { return *exporter; } | |||
ProjectExporter* operator->() const { return exporter; } | |||
//============================================================================== | |||
Value getName() const { return getValue (Ids::name); } | |||
Value isDebug() const { return getValue (Ids::isDebug); } | |||
Value getTargetBinaryName() const { return getValue (Ids::targetName); } | |||
// the path relative to the build folder in which the binary should go | |||
Value getTargetBinaryRelativePath() const { return getValue (Ids::binaryPath); } | |||
Value getOptimisationLevel() const { return getValue (Ids::optimisation); } | |||
String getGCCOptimisationFlag() const; | |||
Value getBuildConfigPreprocessorDefs() const { return getValue (Ids::defines); } | |||
StringPairArray getAllPreprocessorDefs() const; // includes inherited definitions | |||
Value getHeaderSearchPath() const { return getValue (Ids::headerPath); } | |||
StringArray getHeaderSearchPaths() const; | |||
static const char* const osxVersionDefault; | |||
static const char* const osxVersion10_4; | |||
static const char* const osxVersion10_5; | |||
static const char* const osxVersion10_6; | |||
Value getMacSDKVersion() const { return getValue (Ids::osxSDK); } | |||
Value getMacCompatibilityVersion() const { return getValue (Ids::osxCompatibility); } | |||
static const char* const osxArch_Default; | |||
static const char* const osxArch_Native; | |||
static const char* const osxArch_32BitUniversal; | |||
static const char* const osxArch_64BitUniversal; | |||
static const char* const osxArch_64Bit; | |||
Value getMacArchitecture() const { return getValue (Ids::osxArchitecture); } | |||
ScopedPointer<ProjectExporter> exporter; | |||
int index; | |||
//============================================================================== | |||
private: | |||
friend class Project; | |||
Project* project; | |||
ValueTree config; | |||
Value getValue (const Identifier& name) const { return config.getPropertyAsValue (name, getUndoManager()); } | |||
UndoManager* getUndoManager() const { return project->getUndoManagerFor (config); } | |||
BuildConfiguration (Project* project, const ValueTree& configNode); | |||
Project& project; | |||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ExporterIterator); | |||
}; | |||
int getNumConfigurations() const; | |||
BuildConfiguration getConfiguration (int index); | |||
void addNewConfiguration (BuildConfiguration* configToCopy); | |||
void deleteConfiguration (int index); | |||
bool hasConfigurationNamed (const String& name) const; | |||
String getUniqueConfigName (String name) const; | |||
//============================================================================== | |||
ValueTree getExporters(); | |||
int getNumExporters(); | |||
ProjectExporter* createExporter (int index); | |||
void addNewExporter (int exporterIndex); | |||
void deleteExporter (int index); | |||
void createDefaultExporters(); | |||
//============================================================================== | |||
struct ConfigFlag | |||
{ | |||
String symbol, description; | |||
String symbol, description, sourceModuleID; | |||
Value value; // 1 = true, 2 = false, anything else = use default | |||
}; | |||
void getAllConfigFlags (OwnedArray <ConfigFlag>& flags); | |||
static const char* const configFlagDefault; | |||
static const char* const configFlagEnabled; | |||
static const char* const configFlagDisabled; | |||
Value getConfigFlag (const String& name); | |||
bool isConfigFlagEnabled (const String& name) const; | |||
//============================================================================== | |||
bool isModuleEnabled (const String& moduleID) const; | |||
Value shouldShowAllModuleFilesInProject (const String& moduleID); | |||
Value shouldCopyModuleFilesLocally (const String& moduleID); | |||
void addModule (const String& moduleID, bool shouldCopyFilesLocally); | |||
void removeModule (const String& moduleID); | |||
int getNumModules() const; | |||
String getModuleID (int index) const; | |||
void addDefaultModules (bool shouldCopyFilesLocally); | |||
void createRequiredModules (const ModuleList& availableModules, OwnedArray<LibraryModule>& modules) const; | |||
//============================================================================== | |||
String getFileTemplate (const String& templateName); | |||
@@ -296,13 +244,11 @@ public: | |||
void valueTreeParentChanged (ValueTree& tree); | |||
//============================================================================== | |||
UndoManager* getUndoManagerFor (const ValueTree& node) const { return 0; } | |||
UndoManager* getUndoManagerFor (const ValueTree&) const { return nullptr; } | |||
//============================================================================== | |||
static const char* projectFileExtension; | |||
static void resaveJucerFile (const File& file); | |||
private: | |||
friend class Item; | |||
ValueTree projectRoot; | |||
@@ -310,10 +256,14 @@ private: | |||
DrawableImage mainProjectIcon; | |||
void updateProjectSettings(); | |||
void sanitiseConfigFlags(); | |||
void setMissingDefaultValues(); | |||
ValueTree getConfigurations() const; | |||
void createDefaultConfigs(); | |||
ValueTree getConfigNode(); | |||
ValueTree getModulesNode(); | |||
void updateOldStyleConfigList(); | |||
void moveOldPropertyFromProjectToAllExporters (Identifier name); | |||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Project); | |||
}; | |||