Skip to content
Browse files

Merge branch 'master' of git://supercollider.git.sourceforge.net/gitr…

…oot/supercollider/supercollider

Conflicts:
	mac/CMakeLists.txt
  • Loading branch information...
2 parents f3f09b5 + 688956c commit 8e3b9cc4c271dd3266cbd8ed3d454c760c1b39f9 @jleben jleben committed
View
2 CMakeLists.txt
@@ -21,7 +21,7 @@ ADD_CUSTOM_TARGET(uninstall
ADD_CUSTOM_TARGET(setMainVersion ALL
sh ${CMAKE_CURRENT_SOURCE_DIR}/setMainVersion.sh
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/common
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
VERBATIM
)
View
8 lang/LangPrimSource/PyrUStringPrim.cpp
@@ -121,6 +121,8 @@ static int prString_FindRegexp(struct VMGlobals *g, int numArgsPushed)
if (size>0) //(matched)
{
+ const int stackBufSize = 4096;
+ char match_buffer[stackBufSize];
for (int i = 0; i < size; i++)
{
assert(what[i].matched);
@@ -129,8 +131,7 @@ static int prString_FindRegexp(struct VMGlobals *g, int numArgsPushed)
int match_start = what[i].start;
int match_length = what[i].end - what[i].start;
// post("for i:%i, start %i, end %i\n", i, what[i].start, what[i].end);
-// char *match = (char*)malloc(match_length);
- char match[match_length];
+ char * match = match_length < stackBufSize ? match_buffer : (char*)malloc(match_length+1);
strncpy(match, string + offset + match_start, match_length);
match[match_length] = 0;
@@ -144,6 +145,9 @@ static int prString_FindRegexp(struct VMGlobals *g, int numArgsPushed)
PyrObject *matched_string = (PyrObject*)newPyrString(g->gc, match, 0, true);
SetObject(array->slots+1, matched_string);
g->gc->GCWrite(array, matched_string);
+
+ if (match_length >= stackBufSize)
+ free(match);
}
}
View
189 mac/CMakeLists.txt
@@ -1,189 +0,0 @@
-if(NOT APPLE)
- message(SEND_ERROR "mac folder invoked by cmake, but not APPLE platform")
-endif()
-
-# determines the app name and app install location (scappbundlename, scappdir):
-include (../common/cmake_modules/MacAppFolder.cmake)
-
-include_directories(../common/Headers/lang
- ../common/Source/lang/LangSource/Bison
- ../common/Headers/common
- ../common/Headers/plugin_interface
- ../common/Headers/app
- ../common/Headers/app/SMLAdvancedFind
- ../common/Headers/app/SMLAdvancedFind/ICU
- ../common/include/icu/unicode/
- )
-
-include_directories(../common/include/icu
- ../common/Source/lang/LangPrimSource/HID_Utilities)
-
-find_package(Sndfile)
-
-if (SC_QT)
- add_definitions( -DSC_QT )
-endif (SC_QT)
-
-set(scapp_sources
- ../common/Source/lang/LangPrimSource/SC_Wii.cpp
- ../common/Source/lang/LangPrimSource/PyrSignalPrim.cpp
- ../common/Source/lang/LangPrimSource/PyrSched.cpp
- ../common/Source/lang/LangPrimSource/PyrPrimitive.cpp
- ../common/Source/lang/LangPrimSource/PyrMathPrim.cpp
- ../common/Source/lang/LangPrimSource/SC_ComPort.cpp
- ../common/Source/lang/LangPrimSource/OSCData.cpp
- ../common/Source/lang/LangPrimSource/PyrArchiver.cpp
- ../common/Source/lang/LangPrimSource/PyrArrayPrimitives.cpp
- ../common/Source/lang/LangPrimSource/PyrBitPrim.cpp
- ../common/Source/lang/LangPrimSource/PyrCharPrim.cpp
- ../common/Source/lang/LangPrimSource/PyrFilePrim.cpp
- ../common/Source/lang/LangPrimSource/PyrListPrim.cpp
- ../common/Source/lang/LangPrimSource/PyrPlatformPrim.cpp
- ../common/Source/lang/LangPrimSource/PyrSerialPrim.cpp
- ../common/Source/lang/LangPrimSource/PyrStringPrim.cpp
- ../common/Source/lang/LangPrimSource/PyrUStringPrim.cpp
- ../common/Source/lang/LangPrimSource/PyrSymbolPrim.cpp
- ../common/Source/lang/LangPrimSource/PyrUnixPrim.cpp
- ../common/Source/lang/LangPrimSource/SC_Speech.M
- ../common/Source/lang/LangSource/AdvancingAllocPool.cpp
- ../common/Source/lang/LangSource/ByteCodeArray.cpp
- ../common/Source/lang/LangSource/DumpParseNode.cpp
- ../common/Source/lang/LangSource/GC.cpp
- ../common/Source/lang/LangSource/InitAlloc.cpp
- ../common/Source/lang/LangSource/PyrFileUtils.cpp
- ../common/Source/lang/LangSource/PyrInterpreter3.cpp
- ../common/Source/lang/LangSource/PyrLexer.cpp
- ../common/Source/lang/LangSource/PyrMathOps.cpp
- ../common/Source/lang/LangSource/PyrMathSupport.cpp
- ../common/Source/lang/LangSource/PyrMessage.cpp
- ../common/Source/lang/LangSource/PyrObject.cpp
- ../common/Source/lang/LangSource/PyrParseNode.cpp
- ../common/Source/lang/LangSource/PyrSignal.cpp
- ../common/Source/lang/LangSource/PyrSymbolTable.cpp
- ../common/Source/lang/LangSource/SC_LibraryConfig.cpp
- ../common/Source/lang/LangSource/Samp.cpp
- ../common/Source/lang/LangSource/SimpleStack.cpp
- ../common/Source/lang/LangSource/VMGlobals.cpp
- ../common/Source/lang/LangSource/dumpByteCodes.cpp
- ../common/Source/lang/LangPrimSource/WiiMote_OSX/wiiremote.c
- ../common/Source/lang/LangPrimSource/SC_HID.cpp
- ../common/Source/lang/LangPrimSource/HID_Utilities/IOHIDElement_.c
- ../common/Source/lang/LangPrimSource/HID_Utilities/IOHIDDevice_.c
- ../common/Source/lang/LangPrimSource/HID_Utilities/HID_Utilities.c
- ../common/Source/lang/LangPrimSource/HID_Utilities/HID_Name_Lookup.c
- ../common/Source/lang/LangPrimSource/HID_Utilities/HID_Queue_Utilities.c
- ../common/Source/lang/LangPrimSource/HID_Utilities/HID_Error_Handler.c
- ../common/Source/lang/LangPrimSource/SC_CoreMIDI.cpp
- ../common/Source/lang/LangPrimSource/SC_CoreAudioPrim.cpp
- ../common/Source/common/fftlib.c
- ../common/Source/app/CocoaBridgePrimitives.M
- ../common/Source/app/CocoaFilePrimitives.M
- ../common/Source/app/DrawBackground.M
- ../common/Source/app/GUIPrimitives.M
- ../common/Source/app/GetStringFromUser.m
- ../common/Source/app/GoToPanel.M
- ../common/Source/app/HTMLRenderer.m
- ../common/Source/app/MyDocument.M
- ../common/Source/app/RendezvousClient.M
- ../common/Source/app/SCCocoaView.M
- ../common/Source/app/SCDialog.mm
- ../common/Source/app/SCGraphView.M
- ../common/Source/app/SCImage.M
- ../common/Source/app/SCNSWindow.m
- ../common/Source/app/SCService.mm
- ../common/Source/app/SCSoundFileView.M
- ../common/Source/app/SCTextView.M
- ../common/Source/app/SCView.M
- ../common/Source/app/SCVirtualMachine.M
- ../common/Source/app/TabletEvents.m
- ../common/Source/app/TextFinder.m
- ../common/Source/app/UserPanel.M
- ../common/Source/app/main.m
- ../common/Source/app/post_queue.M
- ../common/Source/app/syntaxColorize.M
- ../common/Source/app/SMLAdvancedFind/SMLAdvancedFindController.m
- ../common/Source/app/SMLAdvancedFind/SMLStatusBarTextFieldCell.m
- ../common/Source/app/SMLAdvancedFind/ICU/ICUMatcher.m
- ../common/Source/app/SMLAdvancedFind/ICU/ICUPattern.m
- ../common/Source/app/SMLAdvancedFind/ICU/NSStringICUAdditions.m
- )
-
-set(scapp_parser_source ../common/Source/lang/LangSource/Bison/lang11d_tab.cpp)
-
-add_definitions(-DYYSTACK_USE_ALLOCA -DHAVE_SPEECH)
-
-# set how it shows up in the Info.plist file
-SET(MACOSX_BUNDLE_ICON_FILE SCcube.icns)
-# set where in the bundle to put the icns file
-SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/Resources/SCcube.icns
- PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
-# include the icns file in the target
-SET(scapp_resources ${CMAKE_CURRENT_SOURCE_DIR}/Resources/SCcube.icns)
-
-file(COPY Resources
- DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/${scappbundlename}.app/Contents
- PATTERN Info.plist EXCLUDE
- PATTERN .svn EXCLUDE
- PATTERN .git EXCLUDE
-)
-
-add_executable(${scappbundlename} MACOSX_BUNDLE
- ${scapp_sources} ${scapp_parser_source}
- ${scapp_resources}
- )
-
-if (SCLANG_SERVER)
- target_link_libraries(${scappbundlename} libscsynth)
-else()
- set_property(TARGET ${scappbundlename}
- APPEND
- PROPERTY COMPILE_DEFINITIONS NO_INTERNAL_SERVER
- )
-endif()
-
-if (SC_QT)
- target_link_libraries(${scappbundlename} QtCollider)
-endif (SC_QT)
-
-# for processing into the plist:
-set_property(TARGET ${scappbundlename}
- PROPERTY MACOSX_BUNDLE_BUNDLE_NAME ${scappbundlename})
-# also TODO, separate gui name? (currently using MACOSX_BUNDLE_BUNDLE_NAME twice)
-
-target_link_libraries(${scappbundlename} icucore)
-
-target_link_libraries(${scappbundlename} "-framework ApplicationServices")
-target_link_libraries(${scappbundlename} "-framework Carbon")
-target_link_libraries(${scappbundlename} "-framework Cocoa")
-target_link_libraries(${scappbundlename} "-framework CoreAudio")
-target_link_libraries(${scappbundlename} "-framework CoreMidi")
-target_link_libraries(${scappbundlename} "-framework CoreServices")
-target_link_libraries(${scappbundlename} "-framework IOBluetooth")
-target_link_libraries(${scappbundlename} "-framework IOKit")
-target_link_libraries(${scappbundlename} "-framework Quartz")
-target_link_libraries(${scappbundlename} "-framework QuartzCore")
-target_link_libraries(${scappbundlename} "-framework QuickTime")
-target_link_libraries(${scappbundlename} "-framework QTKit")
-target_link_libraries(${scappbundlename} "-framework WebKit")
-
-if(SNDFILE_FOUND)
- include_directories(${SNDFILE_INCLUDE_DIR})
- target_link_libraries(${scappbundlename} ${SNDFILE_LIBRARIES})
- add_definitions("-DLIBSNDFILE_1018")
-elseif(NOT NO_LIBSNDFILE)
- message(SEND_ERROR "Cannot find libsndfile")
-endif(SNDFILE_FOUND)
-
-target_link_libraries(${scappbundlename} sccommon pthread)
-
-install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${scappbundlename}.app"
- DESTINATION ${scappdir}
- USE_SOURCE_PERMISSIONS
- )
-
-if (NOT ("${standalone}" STREQUAL ""))
- # A synthdefs folder is expected in the bundle
- file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${scappbundlename}.app/Contents/Resources/synthdefs")
-
- # TODO: Standalones are also given a chance to overwrite things from their specially-manufactured resources dir
-endif()
View
0 ...orm/osx/Packager/OPTIONALS_README_OSX.rtf → package/OPTIONALS_README_OSX.rtf
File renamed without changes.
View
0 .../osx/Packager/OPTIONALS_README_SOURCE.txt → package/OPTIONALS_README_SOURCE.txt
File renamed without changes.
View
0 platform/osx/Packager/USAGE → package/USAGE
File renamed without changes.
View
0 platform/osx/Packager/background.png → package/background.png
File renamed without changes
View
0 .../osx/Packager/dmg_with_optionals.ds_store → package/dmg_with_optionals.ds_store
File renamed without changes.
View
0 ...x/Packager/dmg_without_optionals.ds_store → package/dmg_without_optionals.ds_store
File renamed without changes.
View
37 platform/osx/Packager/package → package/package
@@ -1,7 +1,7 @@
#!/bin/bash
basename=`basename $PWD`
-if [ $basename != "Packager" ]; then
+if [ $basename != "package" ]; then
echo "This script must be ran from within the Packager directory."
exit 1
fi
@@ -13,7 +13,7 @@ fi
version=`date "+%Y-%m-%d"`
include_optionals=false
-if [ `uname` = 'Darwin' ]; then
+if [ `uname` = 'Darwin' ]; then
package_type="osx"
else
package_type="source"
@@ -40,10 +40,10 @@ fi
if [ $package_type == "source" ]; then
mkdir SuperCollider-Source
returndir=`pwd`
- cd ../../
+ cd ../
git archive $revision | tar -x --exclude ".gitignore" -C "$returndir/SuperCollider-Source"
cd $returndir
-
+
if $include_optionals; then
cp -Rp optional SuperCollider-Source/optional_installs
cp OPTIONALS_README_SOURCE.txt SuperCollider-Source/optional_installs/README.txt
@@ -53,24 +53,23 @@ if [ $package_type == "source" ]; then
filename="SuperCollider-$version-Source.tar.gz"
filenamelinux="SuperCollider-$version-Source-linux.tar.gz"
fi
-
+
# Here we build a list of (many) files that are useless on linux, so as to build a slimline source.tar.gz
find SuperCollider-Source -iname windows -or -iname osx -or -name "*.xcodeproj" -or -name scide_scapp -or -name "iPhone*" > LinuxExclusions.txt
echo 'SuperCollider-Source/SuperColliderAU
-SuperCollider-Source/Psycollider
-SuperCollider-Source/README OS X
-SuperCollider-Source/README WINDOWS
-SuperCollider-Source/README IPHONE
-SuperCollider-Source/common/include/libsndfile
-SuperCollider-Source/common/include/curl
-SuperCollider-Source/common/include/icu
-SuperCollider-Source/mac
-SuperCollider-Source/iphone
-SuperCollider-Source/common/Source/lang/LangPrimSource/HID_Utilities
-SuperCollider-Source/common/Source/lang/LangPrimSource/WiiMote_OSX
-SuperCollider-Source/common/Headers/app
-SuperCollider-Source/common/Source/app' >> LinuxExclusions.txt
-
+SuperCollider-Source/editors/Psycollider
+SuperCollider-Source/platform/README OS X
+SuperCollider-Source/platform/README WINDOWS
+SuperCollider-Source/platform/README IPHONE
+SuperCollider-Source/external_libraries/libsndfile
+SuperCollider-Source/external_libraries/curl
+SuperCollider-Source/external_libraries/icu
+SuperCollider-Source/platform/mac
+SuperCollider-Source/platform/iphone
+SuperCollider-Source/lang/LangPrimSource/HID_Utilities
+SuperCollider-Source/lang/LangPrimSource/WiiMote_OSX
+SuperCollider-Source/editors/scapp' >> LinuxExclusions.txt
+
tar cfz "$filename" SuperCollider-Source
tar cfzX "$filenamelinux" LinuxExclusions.txt SuperCollider-Source
rm -rf SuperCollider-Source
View
0 platform/osx/Packager/pkg-dmg → package/pkg-dmg
File renamed without changes.

0 comments on commit 8e3b9cc

Please sign in to comment.
Something went wrong with that request. Please try again.