I am attempting to build the 2009 Sep 14 - Hydrogen 0.9.4 RELEASED build (hydrogen-0.9.4.tar.gz) on Windows XP. I have been able to compile and run the main Hydrogen.exe program, but I haven't figured out how to properly compile Portaudio support.
I understand that Windows isn't supported at all (except for the 20060309 experimental build), so perhaps the 2009 Sep 14 - Hydrogen 0.9.4 RELEASED doesn't have the necessary code to compile with Portaudio support in Win32. That said, I would still like to try to work it out, if it is possible.
Does anyone have any ideas on properly compiling with Portaudio support?
In the old http://trac.assembla.com/hydrogen/wiki/coding%3Apackagingwin guide it says the following:
"For portaudio: Get http://www.portaudio.com/archives/pa_stable_v19_20071207.tar.gz and put the "portaudio" folder in your hydrogen folder."
I wasn't sure where to put this folder. I tried several locations without success. Does this mean put the extracted "portaudio" folder in the main hydrogen-0.9.4 folder (containing Sconstruct and all.pro)? Or is it supposed to be in another location.
I attempting to use the http://www.qtsoftware.com/downloads/sdk-windows-cpp with qmake and mingw32-make.
In the next post, I will detail the steps I am following to get a running build with no sound. Please let me know if you have any suggestions to get Portaudio working.
I started out from the http://trac.assembla.com/hydrogen/wiki/coding%3Apackagingwin guide and made a few changes along the way.
1. I used the 2009 Sep 14 sources from the main download page:
http://prdownloads.sf.net/hydrogen/hydrogen-0.9.4.tar.gz?download
2. I installed the QTCreator bundle and added QT and mingw32 to my path.
http://www.qtsoftware.com/downloads/sdk-windows-cpp
3. Installed pthreads as described and linked on the following page. Probably redundant, but I also installed duplicate copies of the files in the /mingw32 subfolders as well as /mingw.
http://www.mythtv.org/wiki/MythTV_on_Windows#libpthread
4. Installed libarchive to:
C:\Program Files\GnuWin32\
http://gnuwin32.sourceforge.net/packages/libarchive.htm
I did have to edit C:\Program Files\GnuWin32\include\archive_entry.h Line 325:
REPLACE:
LIBARCHIVE_DLL_IMPEXP struct archive_entry_linkresolver;
WITH:
struct archive_entry_linkresolver;
5. Install libsndfile to:
C:\Program Files\Mega-Nerd\libsndfile
http://www.mega-nerd.com/libsndfile/#Download
6. I wasn't able to find Linux version.cpp and config.h files, so I attempted to create them manually copying from Sconstruct.
(Note that my Qt path in on D: rather than the default C:. Change your file to match your own installation path, if you're following along.)
*This may be where I left out something to include Portaudio. Please let me know if there is a line I can add to this file for Portaudio. I would also appreciate if someone could post a link or copy of their Linux version.cpp and config.h files.
config.h
#ifndef HYD_CONFIG_H
#define HYD_CONFIG_H
#include
#define CONFIG_DEBUG
#ifndef QT_BEGIN_NAMESPACE
# define QT_BEGIN_NAMESPACE
#endif
#ifndef QT_END_NAMESPACE
# define QT_END_NAMESPACE
#endif
#define CONFIG_PREFIX "D:\Qt\hydrogen-0.9.4"
#define DATA_PATH "D:\Qt\hydrogen-0.9.4\data"
#endif
version.cpp
#include "version.h"
#include "config.h"
static const std::string VERSION = "0.9.4";
std::string get_version() { return VERSION; }
7a. Following the http://trac.assembla.com/hydrogen/wiki/coding%3Apackagingwin guide, I did disable portaudio the first time through. After that, I made the following edits in an attempt to get portaudio working:
gui.pro win32 section, near line 30:
INCLUDEPATH += ../portaudio
near line 35:
LIBS += "D:\Qt\2010.02.1\mingw\bin\portaudio_x86.dll"
features.pri win32 section, line 51:
H2DEFINES += PORTAUDIO_SUPPORT
7b.Downloaded http://trac.jackaudio.org/log/jack2/branches/windows/windows/Release/bin/portaudio_x86.dll?rev=2552 rev 2552 06/20/08 and put it in:
\mingw\bin
\mingw\mingw32\bin
I also use this portaudio_x86.dll file in the final running hydrogen.exe folder.
7c. Downloaded portaudio http://www.portaudio.com/archives/pa_stable_v19_20071207.tar.gz and put the extracted \portaudio folder into the main hydrogen-0.9.4 folder
7d. from the extracted folder I copied portaudio\include\portaudio.h as well as the other "win" files to the mingw\include and mingw32\include folders.
* Did I put the portaudio folder in the wrong location? Should it be in another subfolder?
* Will using the rev2552 portaudio_x86.dll in the mingw folder as well as the final hydrogen.exe running folder cause a conflict with the 20071207 source?
8. I edited gui\src\PlaylistEditor\PlaylistDialog.cpp to comment out lines 163 -173 (addSongBTN to clearPlBTN), to avoid "not declared in this scope" errors.
9. gui.pro around line 33 updated to reflect my paths to .dlls
LIBS += "C:\Program Files\GnuWin32\lib\libarchive.lib"
LIBS += "D:\Qt\2010.02.1\mingw\lib\libpthread.a"
LIBS += "D:\Qt\2010.02.1\mingw\bin\libsndfile-1.dll"
10. manually edited in patches from patches\portaudio.patch to:
libs/hydrogen/src/IO/PortAudioDriver.h
libs/hydrogen/src/IO/portaudio_driver.cpp
11. In QTCreator I opened all.pro the did "Run qmake"
12. from the command prompt in the hydrogen directory I entered:
mingw32-make
Alternatively, I also tried Build All in QTCreator with the same result.
13a. I copied the resulting folders and file to a new program folder:
Hydrogen.exe
/data
/plugins
13b. I added various dlls from the previously downloaded files and packages
libsndfile-1.dll
from C:\Program Files\Mega-Nerd\libsndfile
libarchive2.dll
bzip2.dll
zlib1.dll
from C:\Program Files\GnuWin32\bin
mingwm10.dll
QtCore4.dll
QtGui4.dll
QtNetwork4.dll
QtSvg4.dll
QtXml4.dll
from D:\Qt\2010.02.1\qt\bin
portaudio_x86.dll
downloaded from jackaudio.org
(I also tried renaming it to just portaudio.dll without success.)
pthreadGC2.dll
downloaded from redhat.com via the mythtv.org link
(I wondered if this might need to be renamed or if I should use an older version, since the old 2006 build comes with pthreadGC1.dll)
14. THAT'S IT. Running Hydrogen.exe launches the program and it seems to run, but there is no sound. Going into Preferences, Audio System and selecting PortAudio shows a "Not Compiled" message.
Any suggestions on where to go from here to get portaudio compiling and working right? What's the correct path for the extracted \portaudio folder? Which files do I need in \mingw and/or \mingw32? What changes do I need in config.h?
Thanks for your help.
Almost forgot to mention, I do get this warning during the compile:
src\hydrogen.cpp: In function 'void H2Core::audioEngine_seek(long long int, bool)':
src\hydrogen.cpp:590: warning: unknown conversion type character 'l' in format
src\hydrogen.cpp:590: warning: format '%d' expects type 'int', but argument 3 has type 'long long int'
src\hydrogen.cpp:590: warning: too many arguments for format