@@ -784,7 +784,7 @@ | |||||
INSTALL_PATH = "$(HOME)/Applications"; | INSTALL_PATH = "$(HOME)/Applications"; | ||||
MACOSX_DEPLOYMENT_TARGET = 10.11; | MACOSX_DEPLOYMENT_TARGET = 10.11; | ||||
MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; | MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; | ||||
OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow -Wstrict-aliasing -Wconversion -Wsign-compare -Woverloaded-virtual -Wextra-semi"; | |||||
OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow -Wno-missing-field-initializers -Wshadow -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wno-ignored-qualifiers -Wunreachable-code"; | |||||
PRODUCT_BUNDLE_IDENTIFIER = com.juce.theprojucer; | PRODUCT_BUNDLE_IDENTIFIER = com.juce.theprojucer; | ||||
SDKROOT_ppc = macosx10.5; | SDKROOT_ppc = macosx10.5; | ||||
USE_HEADERMAP = NO; }; name = Debug; }; | USE_HEADERMAP = NO; }; name = Debug; }; | ||||
@@ -819,7 +819,7 @@ | |||||
LLVM_LTO = YES; | LLVM_LTO = YES; | ||||
MACOSX_DEPLOYMENT_TARGET = 10.11; | MACOSX_DEPLOYMENT_TARGET = 10.11; | ||||
MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; | MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; | ||||
OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow -Wstrict-aliasing -Wconversion -Wsign-compare -Woverloaded-virtual -Wextra-semi"; | |||||
OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow -Wno-missing-field-initializers -Wshadow -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wno-ignored-qualifiers -Wunreachable-code"; | |||||
PRODUCT_BUNDLE_IDENTIFIER = com.juce.theprojucer; | PRODUCT_BUNDLE_IDENTIFIER = com.juce.theprojucer; | ||||
SDKROOT_ppc = macosx10.5; | SDKROOT_ppc = macosx10.5; | ||||
USE_HEADERMAP = NO; }; name = Release; }; | USE_HEADERMAP = NO; }; name = Release; }; | ||||
@@ -8,7 +8,7 @@ | |||||
<EXPORTFORMATS> | <EXPORTFORMATS> | ||||
<XCODE_MAC targetFolder="Builds/MacOSX" vstFolder="~/SDKs/vstsdk2.4" rtasFolder="~/SDKs/PT_80_SDK" | <XCODE_MAC targetFolder="Builds/MacOSX" vstFolder="~/SDKs/vstsdk2.4" rtasFolder="~/SDKs/PT_80_SDK" | ||||
documentExtensions=".jucer" objCExtraSuffix="zkVtji" bigIcon="rv1F4h" | documentExtensions=".jucer" objCExtraSuffix="zkVtji" bigIcon="rv1F4h" | ||||
extraLinkerFlags="" extraCompilerFlags="-Wall -Wshadow -Wstrict-aliasing -Wconversion -Wsign-compare -Woverloaded-virtual -Wextra-semi" | |||||
extraLinkerFlags="" extraCompilerFlags="-Wall -Wshadow -Wno-missing-field-initializers -Wshadow -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wno-ignored-qualifiers -Wunreachable-code" | |||||
customPList="<plist> <dict> 	<key>NSAppTransportSecurity</key> 	<dict> 		<key>NSAllowsArbitraryLoads</key> 		<true/> 		<key>NSExceptionDomains</key> 		<dict> 			<key>amazonaws.com</key> 			<dict> 				<key>NSExceptionAllowsInsecureHTTPLoads</key> 				<true/> 				<key>NSIncludesSubdomains</key> 				<true/> 			</dict> 		</dict> 	</dict> </dict> </plist>" | customPList="<plist> <dict> 	<key>NSAppTransportSecurity</key> 	<dict> 		<key>NSAllowsArbitraryLoads</key> 		<true/> 		<key>NSExceptionDomains</key> 		<dict> 			<key>amazonaws.com</key> 			<dict> 				<key>NSExceptionAllowsInsecureHTTPLoads</key> 				<true/> 				<key>NSIncludesSubdomains</key> 				<true/> 			</dict> 		</dict> 	</dict> </dict> </plist>" | ||||
extraFrameworks="AudioUnit; Accelerate; AVFoundation; CoreAudio; CoreAudioKit; CoreMIDI; DiscRecording; QuartzCore; AudioToolbox; OpenGL; QTKit; QuickTime"> | extraFrameworks="AudioUnit; Accelerate; AVFoundation; CoreAudio; CoreAudioKit; CoreMIDI; DiscRecording; QuartzCore; AudioToolbox; OpenGL; QTKit; QuickTime"> | ||||
<CONFIGURATIONS> | <CONFIGURATIONS> | ||||
@@ -71,7 +71,7 @@ static const char* const stateNames[] = | |||||
"common background" | "common background" | ||||
}; | }; | ||||
int stateNameToIndex (const String& name) | |||||
static int stateNameToIndex (const String& name) | |||||
{ | { | ||||
for (int i = 7; --i >= 0;) | for (int i = 7; --i >= 0;) | ||||
if (name.equalsIgnoreCase (stateNames[i])) | if (name.equalsIgnoreCase (stateNames[i])) | ||||
@@ -1229,9 +1229,10 @@ Image JucerDocumentEditor::createComponentLayerSnapshot() const | |||||
const int gridSnapMenuItemBase = 0x8723620; | const int gridSnapMenuItemBase = 0x8723620; | ||||
const int snapSizes[] = { 2, 3, 4, 5, 6, 8, 10, 12, 16, 20, 24, 32 }; | const int snapSizes[] = { 2, 3, 4, 5, 6, 8, 10, 12, 16, 20, 24, 32 }; | ||||
void createGUIEditorMenu (PopupMenu&); | |||||
void createGUIEditorMenu (PopupMenu& menu) | void createGUIEditorMenu (PopupMenu& menu) | ||||
{ | { | ||||
ApplicationCommandManager* commandManager = &ProjucerApplication::getCommandManager(); | |||||
auto* commandManager = &ProjucerApplication::getCommandManager(); | |||||
menu.addCommandItem (commandManager, JucerCommandIDs::editCompLayout); | menu.addCommandItem (commandManager, JucerCommandIDs::editCompLayout); | ||||
menu.addCommandItem (commandManager, JucerCommandIDs::editCompGraphics); | menu.addCommandItem (commandManager, JucerCommandIDs::editCompGraphics); | ||||
@@ -1269,12 +1270,12 @@ void createGUIEditorMenu (PopupMenu& menu) | |||||
menu.addCommandItem (commandManager, JucerCommandIDs::showGrid); | menu.addCommandItem (commandManager, JucerCommandIDs::showGrid); | ||||
menu.addCommandItem (commandManager, JucerCommandIDs::enableSnapToGrid); | menu.addCommandItem (commandManager, JucerCommandIDs::enableSnapToGrid); | ||||
JucerDocumentEditor* holder = JucerDocumentEditor::getActiveDocumentHolder(); | |||||
auto* holder = JucerDocumentEditor::getActiveDocumentHolder(); | |||||
{ | { | ||||
const int currentSnapSize = holder != nullptr ? holder->getDocument()->getSnappingGridSize() : -1; | |||||
auto currentSnapSize = holder != nullptr ? holder->getDocument()->getSnappingGridSize() : -1; | |||||
PopupMenu m; | PopupMenu m; | ||||
for (int i = 0; i < numElementsInArray (snapSizes); ++i) | for (int i = 0; i < numElementsInArray (snapSizes); ++i) | ||||
m.addItem (gridSnapMenuItemBase + i, String (snapSizes[i]) + " pixels", | m.addItem (gridSnapMenuItemBase + i, String (snapSizes[i]) + " pixels", | ||||
true, snapSizes[i] == currentSnapSize); | true, snapSizes[i] == currentSnapSize); | ||||
@@ -1303,6 +1304,7 @@ void createGUIEditorMenu (PopupMenu& menu) | |||||
} | } | ||||
} | } | ||||
void handleGUIEditorMenuCommand (int); | |||||
void handleGUIEditorMenuCommand (int menuItemID) | void handleGUIEditorMenuCommand (int menuItemID) | ||||
{ | { | ||||
if (auto* ed = JucerDocumentEditor::getActiveDocumentHolder()) | if (auto* ed = JucerDocumentEditor::getActiveDocumentHolder()) | ||||
@@ -1320,6 +1322,7 @@ void handleGUIEditorMenuCommand (int menuItemID) | |||||
} | } | ||||
} | } | ||||
void registerGUIEditorCommands(); | |||||
void registerGUIEditorCommands() | void registerGUIEditorCommands() | ||||
{ | { | ||||
JucerDocumentEditor dh (nullptr); | JucerDocumentEditor dh (nullptr); | ||||
@@ -735,27 +735,27 @@ public: | |||||
}; | }; | ||||
}; | }; | ||||
OpenDocumentManager::DocumentType* createGUIDocumentType(); | |||||
OpenDocumentManager::DocumentType* createGUIDocumentType() | OpenDocumentManager::DocumentType* createGUIDocumentType() | ||||
{ | { | ||||
return new JucerComponentDocument::Type(); | return new JucerComponentDocument::Type(); | ||||
} | } | ||||
//============================================================================== | //============================================================================== | ||||
class NewGUIComponentWizard : public NewFileWizard::Type | |||||
struct NewGUIComponentWizard : public NewFileWizard::Type | |||||
{ | { | ||||
public: | |||||
NewGUIComponentWizard() {} | NewGUIComponentWizard() {} | ||||
String getName() override { return "GUI Component"; } | String getName() override { return "GUI Component"; } | ||||
void createNewFile (Project& project, Project::Item parent) override | void createNewFile (Project& project, Project::Item parent) override | ||||
{ | { | ||||
const File newFile (askUserToChooseNewFile (String (defaultClassName) + ".h", "*.h;*.cpp", parent)); | |||||
auto newFile = askUserToChooseNewFile (String (defaultClassName) + ".h", "*.h;*.cpp", parent); | |||||
if (newFile != File()) | if (newFile != File()) | ||||
{ | { | ||||
const File headerFile (newFile.withFileExtension (".h")); | |||||
const File cppFile (newFile.withFileExtension (".cpp")); | |||||
auto headerFile = newFile.withFileExtension (".h"); | |||||
auto cppFile = newFile.withFileExtension (".cpp"); | |||||
headerFile.replaceWithText (String()); | headerFile.replaceWithText (String()); | ||||
cppFile.replaceWithText (String()); | cppFile.replaceWithText (String()); | ||||
@@ -787,6 +787,7 @@ public: | |||||
} | } | ||||
}; | }; | ||||
NewFileWizard::Type* createGUIComponentWizard(); | |||||
NewFileWizard::Type* createGUIComponentWizard() | NewFileWizard::Type* createGUIComponentWizard() | ||||
{ | { | ||||
return new NewGUIComponentWizard(); | return new NewGUIComponentWizard(); | ||||
@@ -26,6 +26,7 @@ | |||||
#include "../Application/jucer_Headers.h" | #include "../Application/jucer_Headers.h" | ||||
#include "../Application/jucer_Application.h" | #include "../Application/jucer_Application.h" | ||||
#include "jucer_CompileEngineServer.h" | |||||
#include "jucer_CompileEngineDLL.h" | #include "jucer_CompileEngineDLL.h" | ||||
#include "jucer_MessageIDs.h" | #include "jucer_MessageIDs.h" | ||||
#include "jucer_CppHelpers.h" | #include "jucer_CppHelpers.h" | ||||
@@ -188,7 +188,7 @@ void ProjectContentComponent::setProject (Project* newProject) | |||||
} | } | ||||
//============================================================================== | //============================================================================== | ||||
LiveBuildTab* findBuildTab (const TabbedComponent& tabs) | |||||
static LiveBuildTab* findBuildTab (const TabbedComponent& tabs) | |||||
{ | { | ||||
return dynamic_cast<LiveBuildTab*> (tabs.getTabContentComponent (1)); | return dynamic_cast<LiveBuildTab*> (tabs.getTabContentComponent (1)); | ||||
} | } | ||||
@@ -742,7 +742,7 @@ struct AsyncCommandRetrier : public Timer | |||||
JUCE_DECLARE_NON_COPYABLE (AsyncCommandRetrier) | JUCE_DECLARE_NON_COPYABLE (AsyncCommandRetrier) | ||||
}; | }; | ||||
bool reinvokeCommandAfterCancellingModalComps (const ApplicationCommandTarget::InvocationInfo& info) | |||||
static bool reinvokeCommandAfterCancellingModalComps (const ApplicationCommandTarget::InvocationInfo& info) | |||||
{ | { | ||||
if (ModalComponentManager::getInstance()->cancelAllModalComponents()) | if (ModalComponentManager::getInstance()->cancelAllModalComponents()) | ||||
{ | { | ||||
@@ -1854,12 +1854,12 @@ private: | |||||
JUCE_DECLARE_NON_COPYABLE (AndroidProjectExporter) | JUCE_DECLARE_NON_COPYABLE (AndroidProjectExporter) | ||||
}; | }; | ||||
ProjectExporter* createAndroidExporter (Project& p, const ValueTree& t) | |||||
inline ProjectExporter* createAndroidExporter (Project& p, const ValueTree& t) | |||||
{ | { | ||||
return new AndroidProjectExporter (p, t); | return new AndroidProjectExporter (p, t); | ||||
} | } | ||||
ProjectExporter* createAndroidExporterForSetting (Project& p, const ValueTree& t) | |||||
inline ProjectExporter* createAndroidExporterForSetting (Project& p, const ValueTree& t) | |||||
{ | { | ||||
return AndroidProjectExporter::createForSettings (p, t); | return AndroidProjectExporter::createForSettings (p, t); | ||||
} | } |
@@ -124,18 +124,6 @@ namespace FileHelpers | |||||
|| path.startsWithIgnoreCase ("smb:"); | || path.startsWithIgnoreCase ("smb:"); | ||||
} | } | ||||
String appendPath (const String& path, const String& subpath) | |||||
{ | |||||
if (isAbsolutePath (subpath)) | |||||
return unixStylePath (subpath); | |||||
String path1 (unixStylePath (path)); | |||||
if (! path1.endsWithChar ('/')) | |||||
path1 << '/'; | |||||
return path1 + unixStylePath (subpath); | |||||
} | |||||
bool shouldPathsBeRelative (String path1, String path2) | bool shouldPathsBeRelative (String path1, String path2) | ||||
{ | { | ||||
path1 = unixStylePath (path1); | path1 = unixStylePath (path1); | ||||
@@ -25,6 +25,7 @@ | |||||
*/ | */ | ||||
#include "../Application/jucer_Headers.h" | #include "../Application/jucer_Headers.h" | ||||
#include "jucer_NewProjectWizardClasses.h" | |||||
#include "../ProjectSaving/jucer_ProjectExporter.h" | #include "../ProjectSaving/jucer_ProjectExporter.h" | ||||
#include "../Utility/UI/jucer_SlidingPanelComponent.h" | #include "../Utility/UI/jucer_SlidingPanelComponent.h" | ||||
@@ -23,13 +23,13 @@ | |||||
namespace juce | namespace juce | ||||
{ | { | ||||
uint16 readUnalignedLittleEndianShort (const void* buffer) | |||||
inline uint16 readUnalignedLittleEndianShort (const void* buffer) | |||||
{ | { | ||||
auto data = readUnaligned<uint16> (buffer); | auto data = readUnaligned<uint16> (buffer); | ||||
return ByteOrder::littleEndianShort (&data); | return ByteOrder::littleEndianShort (&data); | ||||
} | } | ||||
uint32 readUnalignedLittleEndianInt (const void* buffer) | |||||
inline uint32 readUnalignedLittleEndianInt (const void* buffer) | |||||
{ | { | ||||
auto data = readUnaligned<uint32> (buffer); | auto data = readUnaligned<uint32> (buffer); | ||||
return ByteOrder::littleEndianInt (&data); | return ByteOrder::littleEndianInt (&data); | ||||
@@ -121,6 +121,7 @@ public: | |||||
#else | #else | ||||
#define JUCE_CREATE_APPLICATION_DEFINE(AppClass) \ | #define JUCE_CREATE_APPLICATION_DEFINE(AppClass) \ | ||||
juce::JUCEApplicationBase* juce_CreateApplication(); \ | |||||
juce::JUCEApplicationBase* juce_CreateApplication() { return new AppClass(); } | juce::JUCEApplicationBase* juce_CreateApplication() { return new AppClass(); } | ||||
#define JUCE_MAIN_FUNCTION_DEFINITION \ | #define JUCE_MAIN_FUNCTION_DEFINITION \ | ||||
@@ -158,35 +159,36 @@ public: | |||||
risk if you decide to use your own delegate and subtle, hard to debug bugs may occur. | risk if you decide to use your own delegate and subtle, hard to debug bugs may occur. | ||||
@interface MyCustomDelegate : NSObject <UIApplicationDelegate> { NSObject<UIApplicationDelegate>* juceDelegate; } @end | @interface MyCustomDelegate : NSObject <UIApplicationDelegate> { NSObject<UIApplicationDelegate>* juceDelegate; } @end | ||||
@implementation MyCustomDelegate | @implementation MyCustomDelegate | ||||
-(id) init | -(id) init | ||||
{ | { | ||||
self = [super init]; | self = [super init]; | ||||
juceDelegate = reinterpret_cast<NSObject<UIApplicationDelegate>*> ([[NSClassFromString (@"JuceAppStartupDelegate") alloc] init]); | juceDelegate = reinterpret_cast<NSObject<UIApplicationDelegate>*> ([[NSClassFromString (@"JuceAppStartupDelegate") alloc] init]); | ||||
return self; | return self; | ||||
} | } | ||||
-(void)dealloc | |||||
-(void) dealloc | |||||
{ | { | ||||
[juceDelegate release]; | [juceDelegate release]; | ||||
[super dealloc]; | [super dealloc]; | ||||
} | } | ||||
- (void)forwardInvocation:(NSInvocation *)anInvocation | |||||
- (void) forwardInvocation: (NSInvocation*) anInvocation | |||||
{ | { | ||||
if (juceDelegate != nullptr && [juceDelegate respondsToSelector:[anInvocation selector]]) | |||||
[anInvocation invokeWithTarget:juceDelegate]; | |||||
else | |||||
[super forwardInvocation:anInvocation]; | |||||
if (juceDelegate != nullptr && [juceDelegate respondsToSelector: [anInvocation selector]]) | |||||
[anInvocation invokeWithTarget: juceDelegate]; | |||||
else | |||||
[super forwardInvocation: anInvocation]; | |||||
} | } | ||||
-(BOOL)respondsToSelector:(SEL)aSelector | |||||
-(BOOL) respondsToSelector: (SEL) aSelector | |||||
{ | { | ||||
if (juceDelegate != nullptr && [juceDelegate respondsToSelector:aSelector]) | |||||
return YES; | |||||
if (juceDelegate != nullptr && [juceDelegate respondsToSelector: aSelector]) | |||||
return YES; | |||||
return [super respondsToSelector:aSelector]; | |||||
return [super respondsToSelector: aSelector]; | |||||
} | } | ||||
@end | @end | ||||
*/ | */ | ||||