[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-dev] [Approve?] Add 'Extensions' directories to compiler path.




yes, commit it.

On Dec 19, 2004, at 4:13 AM, Rohan Drape wrote:

This patch:

1) Adds "/Library/Application Support/SuperCollider/Extensions" and
   "~/Library/Application Support/SuperCollider/Extensions" to the
   compiler search path.  It is not an error if a directory does not
   exist.

2) Makes the compiler skip directories that case insensitively match
  "help" and "test".

It is tested under OSX.  The locations of the 'Extensions' directory
under Linux and Windows needs to be decided.  Under Linux perhaps
'/usr/local/share/SuperCollider/Extensions' and
'~/share/SuperCollider/Extensions'.

Looking over these files it seems like it should be possible for the
OSX version of sclang to also use SC_TerminalClient, which would make
the SC_LibraryConfig system available there also.  The 'Extensions'
directories could then be added as initial entries in that system.

Some other comments (mainly related to #ifdef):

1) libraryConfig.cpp and libraryConfig.h seem not to be used.
   SC_LibraryConfig is used instead.  These files could perhaps be
   removed.

2) With three platforms supported now perhaps various of the platform
   switches could be moved into a 'platform' file or directory.  The
   procedures sc_DirectoryExists, sc_GetUserHomeDirectory and
   sc_AppendToPath could go there, also bzero, vsnprintf, closesocket,
   socklen_t, nanosleep and sc_StandardizePath.

3) Perhaps the special case for fopen "rb" is not neccessary
   (ie. under unices "r" and "rb" are equivalent).

4) The ENABLE_LIBRARY_CONFIGURATOR switch is not required as
   gLibraryConfig is otherwise NULL.

5) Perhaps as gInternalSynthServer.mWorld is initialize to NULL the
   #ifdef is not required.

I could do work in these directions if people think any of them a good
idea.

ok


Regards,
Rohan

Other possible entries at 'platform':

#ifdef SC_WIN32
inline void bzero(void *b, size_t len)
{
	memset(ptr, 0, count);
}
#endif

#ifndef SC_WIN32
int closesocket(int fd)
{
	return close(fd);
}
#endif

#ifdef SC_WIN32
typedef int socklen_t;
#endif

#ifdef SC_WIN32
#define vsnprintf _vsnprintf
#endif

<2004-12-19-rd -01.0.patch>_______________________________________________
sc-dev mailing list
sc-dev@xxxxxxxxxxxxxxx
http://www.create.ucsb.edu/mailman/listinfo/sc-dev