Browse Source

Patch for metadata support on Windows

pull/495/head
Luciano Iam 6 years ago
parent
commit
182a67db11
2 changed files with 20 additions and 15 deletions
  1. +16
    -1
      common/JackMetadata.cpp
  2. +4
    -14
      windows/README_MINGW

+ 16
- 1
common/JackMetadata.cpp View File

@@ -68,7 +68,19 @@ int JackMetadata::PropertyInit(const char* server_name)
return -1;
}

#ifdef WIN32
/* jack_server_dir is set to 'server' and a relative path
* makes fDBenv->open() and fDB->open() calls fail
*/
#define jack_db_tmp_dir "c:\\windows\\temp\\jack"
// FIXME - directory not created despite DB_CREATE flag
if (CreateDirectory (jack_db_tmp_dir, NULL) == ERROR_PATH_NOT_FOUND) {
jack_error ("cannot create DB files directory");
}
if ((ret = fDBenv->open (fDBenv, jack_db_tmp_dir, DB_CREATE | DB_INIT_LOCK | DB_INIT_MPOOL | DB_THREAD, 0)) != 0) {
#else
if ((ret = fDBenv->open (fDBenv, jack_server_dir /*FIXME:(server_name, server_dir)*/, DB_CREATE | DB_INIT_LOCK | DB_INIT_MPOOL | DB_THREAD, 0)) != 0) {
#endif
jack_error ("cannot open DB environment: %s", db_strerror (ret));
return -1;
}
@@ -78,8 +90,11 @@ int JackMetadata::PropertyInit(const char* server_name)
return -1;
}

#ifdef WIN32
snprintf (dbpath, sizeof(dbpath), "%s\\%s", jack_db_tmp_dir, "metadata.db");
#else
snprintf (dbpath, sizeof(dbpath), "%s/%s", jack_server_dir /*FIXME:(server_name, server_dir)*/, "metadata.db");

#endif
if ((ret = fDB->open (fDB, NULL, dbpath, NULL, DB_HASH, DB_CREATE | DB_THREAD, 0666)) != 0) {
jack_error ("Cannot open metadata DB at %s: %s", dbpath, db_strerror (ret));
fDB->close (fDB, 0);


+ 4
- 14
windows/README_MINGW View File

@@ -5,6 +5,7 @@ HOW TO COMPILE JACK USING WAF AND MINGW
Rev. 0 - 2019-08-28 - First version
Rev. 1 - 2019-08-30 - Update guide to reflect patched wscripts
Rev. 2 - 2019-08-31 - Add instructions for compiling ASIO
Rev. 3 - 2019-09-01 - Update guide to reflect metadata patch



@@ -17,8 +18,7 @@ process across all platforms.

As this is work in progress, there are still a couple of caveats:

- Asynchronous mode is unusable with lower latencies
- Metadata support on Windows is not working
- Asynchronous mode is unusable with low latencies
- A waf script for building JackRouter is missing
- Lots of real world testing is needed

@@ -133,25 +133,16 @@ Compiling JACK
--------------

- Clone repo

git clone https://github.com/jackaudio/jack2

- Build and install

cd jack2
./waf configure --prefix=/opt/jack --db=no && ./waf -p install
./waf configure --prefix=/opt/jack && ./waf -p install

The resulting files can be found at /c/opt/jack/bin, or c:\msys64\opt\jack\bin

Note that currently metadata support is not working on Windows and probably
involves patching common/JackMetadata.cpp:
server\__db.001: No such file or directory

Creating the mentioned "server" directory results in:
Cannot open metadata DB at server\metadata.db: No such file or directory

So for now it is recommended to pass --db=no to waf configure. Leaving metadata
support enabled will make jackd behave erratically or crash.



Running and distributing
@@ -184,7 +175,6 @@ Tested working clients:
Ardour
Bitwig Studio
QJackCtl
JackRouter

Example of starting the JACK server including MIDI support for a Focusrite USB
audio device using ASIO:


Loading…
Cancel
Save