mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
This commit is contained in:
parent
31a29aed76
commit
3780f988f8
2 changed files with 130 additions and 139 deletions
|
|
@ -181,7 +181,7 @@
|
|||
84F5592C0A223B0E00A8311C /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = "<absolute>"; };
|
||||
84F559480A223B8400A8311C /* Juce.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Juce.xcodeproj; path = ../../../../build/macosx/Juce.xcodeproj; sourceTree = SOURCE_ROOT; };
|
||||
8D0C4E960486CD37000505A6 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
|
||||
8D0C4E970486CD37000505A6 /* Jucer.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = Jucer.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
8D0C4E970486CD37000505A6 /* Jucer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Jucer.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
|
|
@ -228,7 +228,15 @@
|
|||
20286C2AFDCF999611CA2CEA /* Sources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
84F5556B0A22381000A8311C /* src */,
|
||||
84F555740A22381000A8311C /* model */,
|
||||
84F5559F0A22381000A8311C /* properties */,
|
||||
84F555AE0A22381000A8311C /* templates */,
|
||||
84F555B10A22381000A8311C /* ui */,
|
||||
84F555C90A22381000A8311C /* utility */,
|
||||
84F555700A22381000A8311C /* BinaryData.cpp */,
|
||||
84F555710A22381000A8311C /* BinaryData.h */,
|
||||
84F555720A22381000A8311C /* jucer_Headers.h */,
|
||||
84F555730A22381000A8311C /* jucer_Main.cpp */,
|
||||
);
|
||||
name = Sources;
|
||||
sourceTree = "<group>";
|
||||
|
|
@ -323,23 +331,6 @@
|
|||
path = paintelements;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
84F5556B0A22381000A8311C /* src */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
84F555740A22381000A8311C /* model */,
|
||||
84F5559F0A22381000A8311C /* properties */,
|
||||
84F555AE0A22381000A8311C /* templates */,
|
||||
84F555B10A22381000A8311C /* ui */,
|
||||
84F555C90A22381000A8311C /* utility */,
|
||||
84F555700A22381000A8311C /* BinaryData.cpp */,
|
||||
84F555710A22381000A8311C /* BinaryData.h */,
|
||||
84F555720A22381000A8311C /* jucer_Headers.h */,
|
||||
84F555730A22381000A8311C /* jucer_Main.cpp */,
|
||||
);
|
||||
name = src;
|
||||
path = ../../src;
|
||||
sourceTree = SOURCE_ROOT;
|
||||
};
|
||||
84F555740A22381000A8311C /* model */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
|
|
@ -599,7 +590,7 @@
|
|||
buildSettings = {
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
LIBRARY_SEARCH_PATHS = ../../../bin;
|
||||
LIBRARY_SEARCH_PATHS = ../../../../bin;
|
||||
PREBINDING = NO;
|
||||
};
|
||||
name = Debug;
|
||||
|
|
@ -610,7 +601,7 @@
|
|||
buildSettings = {
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
LIBRARY_SEARCH_PATHS = ../../../bin;
|
||||
LIBRARY_SEARCH_PATHS = ../../../../bin;
|
||||
PREBINDING = NO;
|
||||
};
|
||||
name = Release;
|
||||
|
|
|
|||
|
|
@ -1,118 +1,118 @@
|
|||
/*
|
||||
==============================================================================
|
||||
|
||||
This file is part of the JUCE library - "Jules' Utility Class Extensions"
|
||||
Copyright 2004-7 by Raw Material Software ltd.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
JUCE can be redistributed and/or modified under the terms of the
|
||||
GNU General Public License, as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
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.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with JUCE; if not, visit www.gnu.org/licenses or write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
Boston, MA 02111-1307 USA
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
If you'd like to release a closed-source product which uses JUCE, commercial
|
||||
licenses are also available: visit www.rawmaterialsoftware.com/juce for
|
||||
more information.
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
#include "jucer_Headers.h"
|
||||
#include "ui/jucer_MainWindow.h"
|
||||
|
||||
ApplicationCommandManager* commandManager = 0;
|
||||
|
||||
|
||||
//==============================================================================
|
||||
class JucerApplication : public JUCEApplication
|
||||
{
|
||||
MainWindow* theMainWindow;
|
||||
|
||||
public:
|
||||
//==============================================================================
|
||||
JucerApplication()
|
||||
: theMainWindow (0)
|
||||
{
|
||||
}
|
||||
|
||||
~JucerApplication()
|
||||
{
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
void initialise (const String& commandLine)
|
||||
{
|
||||
commandManager = new ApplicationCommandManager();
|
||||
|
||||
theMainWindow = new MainWindow();
|
||||
theMainWindow->setVisible (true);
|
||||
|
||||
ImageCache::setCacheTimeout (30 * 1000);
|
||||
|
||||
if (commandLine.trim().isNotEmpty()
|
||||
&& ! commandLine.trim().startsWithChar (T('-')))
|
||||
anotherInstanceStarted (commandLine);
|
||||
}
|
||||
|
||||
void shutdown()
|
||||
{
|
||||
delete theMainWindow;
|
||||
theMainWindow = 0;
|
||||
|
||||
deleteAndZero (commandManager);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
void systemRequestedQuit()
|
||||
{
|
||||
if (theMainWindow == 0 || theMainWindow->closeAllDocuments())
|
||||
{
|
||||
deleteAndZero (theMainWindow);
|
||||
|
||||
StoredSettings::deleteInstance();
|
||||
|
||||
quit (false);
|
||||
}
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
const String getApplicationName()
|
||||
{
|
||||
return T("The Jucer");
|
||||
}
|
||||
|
||||
const String getApplicationVersion()
|
||||
{
|
||||
return String (JUCER_MAJOR_VERSION) + T(".") + String (JUCER_MINOR_VERSION);
|
||||
}
|
||||
|
||||
bool moreThanOneInstanceAllowed()
|
||||
{
|
||||
#ifndef JUCE_LINUX
|
||||
return false;
|
||||
#else
|
||||
return true; //xxx should be false but doesn't work on linux..
|
||||
#endif
|
||||
}
|
||||
|
||||
void anotherInstanceStarted (const String& commandLine)
|
||||
{
|
||||
if (theMainWindow != 0)
|
||||
theMainWindow->openFile (commandLine.unquoted());
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
START_JUCE_APPLICATION(JucerApplication)
|
||||
/*
|
||||
==============================================================================
|
||||
|
||||
This file is part of the JUCE library - "Jules' Utility Class Extensions"
|
||||
Copyright 2004-7 by Raw Material Software ltd.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
JUCE can be redistributed and/or modified under the terms of the
|
||||
GNU General Public License, as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
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.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with JUCE; if not, visit www.gnu.org/licenses or write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
Boston, MA 02111-1307 USA
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
If you'd like to release a closed-source product which uses JUCE, commercial
|
||||
licenses are also available: visit www.rawmaterialsoftware.com/juce for
|
||||
more information.
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
#include "jucer_Headers.h"
|
||||
#include "ui/jucer_MainWindow.h"
|
||||
|
||||
ApplicationCommandManager* commandManager = 0;
|
||||
|
||||
|
||||
//==============================================================================
|
||||
class JucerApplication : public JUCEApplication
|
||||
{
|
||||
MainWindow* theMainWindow;
|
||||
|
||||
public:
|
||||
//==============================================================================
|
||||
JucerApplication()
|
||||
: theMainWindow (0)
|
||||
{
|
||||
}
|
||||
|
||||
~JucerApplication()
|
||||
{
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
void initialise (const String& commandLine)
|
||||
{
|
||||
commandManager = new ApplicationCommandManager();
|
||||
|
||||
theMainWindow = new MainWindow();
|
||||
theMainWindow->setVisible (true);
|
||||
|
||||
ImageCache::setCacheTimeout (30 * 1000);
|
||||
|
||||
if (commandLine.trim().isNotEmpty()
|
||||
&& ! commandLine.trim().startsWithChar (T('-')))
|
||||
anotherInstanceStarted (commandLine);
|
||||
}
|
||||
|
||||
void shutdown()
|
||||
{
|
||||
delete theMainWindow;
|
||||
theMainWindow = 0;
|
||||
|
||||
deleteAndZero (commandManager);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
void systemRequestedQuit()
|
||||
{
|
||||
if (theMainWindow == 0 || theMainWindow->closeAllDocuments())
|
||||
{
|
||||
deleteAndZero (theMainWindow);
|
||||
|
||||
StoredSettings::deleteInstance();
|
||||
|
||||
quit (false);
|
||||
}
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
const String getApplicationName()
|
||||
{
|
||||
return T("The Jucer");
|
||||
}
|
||||
|
||||
const String getApplicationVersion()
|
||||
{
|
||||
return String (JUCER_MAJOR_VERSION) + T(".") + String (JUCER_MINOR_VERSION);
|
||||
}
|
||||
|
||||
bool moreThanOneInstanceAllowed()
|
||||
{
|
||||
#ifndef JUCE_LINUX
|
||||
return false;
|
||||
#else
|
||||
return true; //xxx should be false but doesn't work on linux..
|
||||
#endif
|
||||
}
|
||||
|
||||
void anotherInstanceStarted (const String& commandLine)
|
||||
{
|
||||
if (theMainWindow != 0)
|
||||
theMainWindow->openFile (commandLine.unquoted());
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
START_JUCE_APPLICATION(JucerApplication)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue