On 06/05/2009 05:58 PM, Benno Senoner wrote:
With the help of Andreas and Grigor I was able to implement
Instruments DB support on Windows I already commited the changes to
CVS.
I get some ugly warnings when I cross-compile. I did a patch to get rid
of them, maybe you can test it so I didn't break the functionality?
In order to work correcty so that both the standalone and VST version
of LS use the same Instruments DB file it is necessary to add support
for relative paths
for the instruments DB file similar to what the editor plugin loader
does. This was implemented by Andreas so perhaps it would be nice if
Andreas could add this
to the instruments DB class too (or give some hints what's the best
way to add it to the Instruments DB class).
Yes, sure, I can give you a hint. :) The function I added is called
Sampler::GetInstallDir().
/Andreas
Index: linuxsampler/src/common/File.cpp
===================================================================
RCS file: /var/cvs/linuxsampler/linuxsampler/src/common/File.cpp,v
retrieving revision 1.5
diff -u -2 -r1.5 File.cpp
--- linuxsampler/src/common/File.cpp 5 Jun 2009 14:22:20 -0000 1.5
+++ linuxsampler/src/common/File.cpp 6 Jun 2009 08:11:09 -0000
@@ -24,4 +24,5 @@
#include <errno.h>
#include <sstream>
+#include <sys/stat.h>
#include "Exception.h"
@@ -157,33 +158,4 @@
}
-int stat(const char *path, struct stat *buf)
-{
- struct _finddata_t info;
- long handle;
- mode_t mode = 0;
-
- if(!buf | !path)
- return -1;
-
- handle = _findfirst(path, &info);
- if(handle == -1)
- return -1;
- _findclose(handle);
-
-
- buf->st_size = info.size;
- buf->st_atime = info.time_access;
- buf->st_ctime = info.time_create;
-
-
- /* | dir/regular | systemfile | readonly | write |*/
-
- mode = S_IFREG;
- if(info.attrib & _A_SUBDIR) mode = S_IFDIR;
- buf->st_mode = mode;
-
- return 0;
-}
-
int dirfd(DIR *dirp)
{
Index: linuxsampler/src/common/File.h
===================================================================
RCS file: /var/cvs/linuxsampler/linuxsampler/src/common/File.h,v
retrieving revision 1.5
diff -u -2 -r1.5 File.h
--- linuxsampler/src/common/File.h 5 Jun 2009 14:22:20 -0000 1.5
+++ linuxsampler/src/common/File.h 6 Jun 2009 08:11:09 -0000
@@ -78,17 +78,7 @@
int dirfd(DIR *dirp);
-#define S_IFMT 0170000
-#define S_IFDIR 0040000
-#define S_IFREG 0100000
-
-#define __S_ISTYPE(mode, mask) (((mode) & S_IFMT) == (mask))
-#define S_ISDIR(mode) __S_ISTYPE((mode), S_IFDIR)
-#define S_ISREG(mode) __S_ISTYPE((mode), S_IFREG)
-
#define DT_DIR 4
#define DT_REG 8
-int stat(const char *path, struct stat *buf);
-
#define FTW_F 0x01
#define FTW_D 0x02
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Linuxsampler-devel mailing list
Linuxsampler-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxsampler-devel