David Bolton wrote:
I am attempting to build hydrogen on Windows XP.

At the moment I am using Qt 4.5.1 since I already had it installed but I will try an earlier version if needed. I also have MinGW, Python 2.5, and I installed SCons 1.2.0 today.

Cool!

I started on this a few months ago and gave up (mostly because I don't have a Win PC at the house). The attached patch (against current SVN HEAD) is as far as I got. When I stopped, I was stuck on which libraries to support (and not support) on Windows. For example... figuring out how to compile/install JACK2 and FLAC libraries on windows... and also build against them.

I hope this helps.  :-)

Peace,
Gabriel

diff --git a/Sconstruct b/Sconstruct
index a3f2d05..227fb7c 100644
--- a/Sconstruct
+++ b/Sconstruct
@@ -77,8 +77,8 @@ def get_platform_flags( opts ):
 
 	if str(env['libarchive']) == "1": cppflags.append('-DLIBARCHIVE_SUPPORT')
 
-	includes.append( './' )
-	includes.append( 'gui/src/' )
+	includes.append( '.' )
+	includes.append( 'gui/src' )
 	includes.append( '3rdparty/install/include' )
 
 	if sys.platform == 'linux2':
@@ -89,10 +89,11 @@ def get_platform_flags( opts ):
 		ldflags.append( [ '-L/sw/lib', '-F/sw/lib', '-F/sw/lib/qt4-mac/lib', '-L/usr/local/lib' ] )
 
 	elif sys.platform == "win32":
-		includes.append( '3rdparty\libsndfile-1_0_17' )
-		includes.append( 'build\pthreads\include' )
-		includes.append( '3rdparty\libarchive\include' )
-		includes.append( 'windows\timeFix' )
+		#includes.append( '3rdparty\\libsndfile-1_0_17' )
+                includes.append( '3rdparty\\install\\lib' )
+		includes.append( 'build\\pthreads\\include' )
+		includes.append( '3rdparty\\libarchive\\include' )
+		includes.append( 'windows\\timeFix' )
 	else:
 		raise Exception( "Platform '%s' not supported" % sys.platform )
 
@@ -108,7 +109,7 @@ def download_3rdparty_libs():
 	if sys.platform != "win32":
 		prefix = os.path.abspath( os.path.curdir ) + "/3rdparty/install"
 	else:
-		prefix = os.path.abspath( os.path.curdir ) + "\3rdparty\install"
+		prefix = os.path.abspath( os.path.curdir ) + "\\3rdparty\\install"
 
 
 	compile_flags = "--enable-static --disable-shared"
@@ -147,10 +148,10 @@ def download_3rdparty_libs():
 				raise Exception( "Error compiling 3rdparty libraries" )
 	else:
 		#windows
-		if not os.path.exists( "3rdparty\install\lib\libsndfile-1.dll" ):
-			Execute( "unzip 3rdparty\libsndfile.zip -d 3rdparty" )
-			Execute( "copy 3rdparty\libsndfile-1_0_17\libsndfile-1.dll 3rdparty\install\lib")
-			Execute( "copy 3rdparty\libsndfile-1_0_17\sndfile.h 3rdparty\install\lib")
+		if not os.path.exists( "3rdparty\\install\\lib\\libsndfile-1.dll" ):
+			Execute( "C:\\Data\\bin\\unzip.exe 3rdparty\\libsndfile.zip -d 3rdparty" )
+			Execute( "copy 3rdparty\\libsndfile-1_0_17\\libsndfile-1.dll 3rdparty\\install\\lib")
+			Execute( "copy 3rdparty\\libsndfile-1_0_17\\sndfile.h 3rdparty\\install\\lib")
 
 
 
@@ -271,8 +272,8 @@ def get_hydrogen_gui( lib_hydrogen , opts ):
 
 
 
-	env.Append( LIBPATH = '3rdparty\libsndfile-1_0_17' )
-	env.Append( LIBPATH = 'build\pthreads\lib' )
+	env.Append( LIBPATH = '3rdparty\\libsndfile-1_0_17' )
+	env.Append( LIBPATH = 'build\\pthreads\\lib' )
 
 	app = env.Program(target = 'hydrogen', source = src )
 
@@ -367,8 +368,6 @@ else:
 includes, a , b = get_platform_flags( opts )
 
 env = Environment(options = opts, CPPPATH = includes)
-
-
 Help(opts.GenerateHelpText(env))
 
 
diff --git a/windows/README.txt b/windows/README.txt
new file mode 100644
index 0000000..555c7ef
--- /dev/null
+++ b/windows/README.txt
@@ -0,0 +1,55 @@
+WINDOWS BUILD INSTRUCTIONS
+==========================
+
+!!!!!!!!!
+This file is currently a work in progress.  I'm working through
+it as I work through issues in getting H2 to build on Windows
+!!!!!!!!!
+
+A scaffolding build command:
+
+  scons portaudio=0 portmidi=0 libarchive=1 lrdf=0 flac=0
+
+
+STEPS TO BUILD:
+
+*. Need get the following libraries and tools:
+
+   Qt 4 SDK for Windows:  http://www.qtsoftware.com/downloads
+      (Check out the LGPL / Free downloads... not commercial)
+      This will include options to install the mingw g++ compiler.
+   Python 2.5.x: TBD
+   Scons 1.x: TBD
+   libsndfile: http://www.mega-nerd.com/libsndfile/
+   libarchive: http://gnuwin32.sourceforge.net/packages/libarchive.htm
+   pthreads:  http://sourceware.org/pthreads-win32/
+   portaudio: TBD
+   portmidi: TBD
+   flac:  TBD
+   JACK 2: TBD
+   WiX:  TBD (Note:  I currently don't have any packaging set up)
+
+*. Install each of these into the 3rdparty\install\
+   directory.  (For now)
+
+   TODO:  Give details.
+
+*. Open the Qt Command prompt (this is a Windows CMD.EXE shell
+   with several environment variables set up for building programs
+   with Qt.
+
+   Start -> Qt by Trolltech -> Qt Command Prompt
+
+   WARNING!!!  Do *NOT* use the MSYS shell (rxvt), or a Git shell,
+   or any bash or tsch shell.  You *must* use the Windows CMD.EXE
+   shell for building... and you are advised to use the shell that
+   Qt set up with proper environment variables (e.g. QTDIR).
+
+*. Enter the following commands:
+
+   C:> cd C:\path\to\hydrogen\sources
+   C:> set PATH=%PATH%;C:\path\to\Python25;C:\path\to\Python25\Scripts
+   C:> scons
+   Package the build
+   C:> cd windows
+   C:> scons
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
Hydrogen-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hydrogen-devel

Reply via email to