Index: NetworkEditor/SConstruct
===================================================================
--- NetworkEditor/SConstruct	(revision 10842)
+++ NetworkEditor/SConstruct	(working copy)
@@ -8,6 +8,9 @@
 options.Add(PathOption('clam_prefix', 'The prefix where CLAM was installed', ''))
 options.Add(('qt_plugins_install_path', 'Path component (without the install prefix) where to install designer plugins (tipically /lib/qt4/plugins/designer)','/bin/designer'))
 options.Add(BoolOption('verbose', 'Display the full command line instead a short command description', 'no') )
+options.Add(PathOption('external_dll_path', '(Windows only) The place where the NSIS packager takes the installed DLL from', '.'))
+if sys.platform=="linux2" :
+	options.Add(BoolOption('crossmingw', 'Using MinGW crosscompiler mode', 'no') )
 options.Add(BoolOption('with_osc', 'Adds OSC related processings. Needs liboscpack from http://www.audiomulch.com/~rossb/code/oscpack/', 'no') )
 
 def scanFiles(pattern, paths) :
@@ -25,6 +28,11 @@
 
 env.SConsignFile() # Single signature file
 
+crosscompiling = env["crossmingw"]
+isWindowsPlatform = sys.platform=='win32' or crosscompiling
+isLinuxPlatform = sys.platform=='linux' and not crosscompiling
+isDarwinPlatform = sys.platform=='darwin'
+
 CLAMInstallDir = env['clam_prefix']
 clam_sconstoolspath = os.path.join(CLAMInstallDir,'share','clam','sconstools')
 
@@ -33,6 +41,8 @@
 env.Tool('nsis', toolpath=[clam_sconstoolspath])
 if sys.platform=='darwin' : env.Tool('bundle', toolpath=[clam_sconstoolspath])
 env.Tool('dmg', toolpath=[clam_sconstoolspath])
+if crosscompiling :
+	env.Tool('crossmingw', toolpath=[clam_sconstoolspath])
 sys.path.append(clam_sconstoolspath)
 import versionInfo
 version, fullVersion = versionInfo.versionFromLocalInfo("NetworkEditor")
@@ -63,6 +73,7 @@
 	] , CLAMInstallDir)
 
 env.EnableQt4Modules([
+	'QtUiTools',
 	'QtCore',
 	'QtGui',
 	'QtOpenGL',
@@ -71,7 +82,6 @@
 #	'QtTest',
 	'QtXml',
 	'QtSvg',
-	'QtUiTools',
 	'QtDesigner',
 #	'Qt3Support',
 	], debug=False)
@@ -115,10 +125,10 @@
 uifiles = scanFiles("*.ui", sourcePaths)
 if uifiles: uiheaders = env.Uic4(source=uifiles)
 
-if sys.platform=="win32" :
+if isWindowsPlatform :
 	sources += env.RES(source=["resources/NetworkEditor.rc"])
 
-if sys.platform=='linux2' :
+if isLinuxPlatform :
 	# TODO: This should not be hardcoded neither prefix (because package install)
 	env.Append(CPPFLAGS='-DDATA_EXAMPLES_PATH="\\"/usr/share/networkeditor/example-data\\""')
 
@@ -196,7 +206,8 @@
 
 # Manual step: lupdate-qt4 *xx *ui -ts NetworkEditor_ca.ts
 tsfiles = scanFiles("*.ts", ["src/i18n/"])
-#env.NoClean(tsfiles) # TODO: this is not enough!! scan -c will delete ts files!!!
+env.Precious(tsfiles) # TODO: this is not enough!! scan -c will delete ts files!!!
+env.NoClean(tsfiles) # TODO: this is not enough!! scan -c will delete ts files!!!
 translatableSources = scanFiles('*.cxx', sourcePaths);
 translatableSources+= scanFiles('*.hxx', sourcePaths);
 translatableSources+= scanFiles('*.ui', sourcePaths);
@@ -237,24 +248,36 @@
 installTargets = [
 	env.Install( env['prefix']+path, files ) for path, files in installation.items() ]
 
-if sys.platform=='win32' :
+def absolutePosixPathToWine(dir) :
+	return 'z:'+'\\\\'.join(dir.split('/'))
+
+if isWindowsPlatform : 
+	winqtdir=env['QTDIR']
+	if crosscompiling : env['NSIS_MAKENSIS'] = 'wine ~/.wine/drive_c/Program\ Files/NSIS/makensis'
+	if crosscompiling : winqtdir = absolutePosixPathToWine(winqtdir)
+	externalDllPath = env['external_dll_path']
+	if crosscompiling : externalDllPath = absolutePosixPathToWine(externalDllPath)
+	winclampath = CLAMInstallDir
+	if crosscompiling : winclampath = absolutePosixPathToWine(winclampath)
+	if crosscompiling :
+		env.AddPostAction(programs, env.Action(["i586-mingw32msvc-strip $TARGET"]))
 	installTargets += [
 		env.Install(
 			env['prefix']+"/bin",
-			os.path.join(env['QTDIR'],'lib',"Qt"+dll+"4.dll")
+			os.path.join(env['QTDIR'],'bin',"Qt"+dll+"4.dll")
 			) for dll in 'Core', 'Gui', 'OpenGL']
 	env.Append(NSIS_OPTIONS=['/DVERSION=%s' % fullVersion ])
-	env.Append(NSIS_OPTIONS=['/DQTDIR=$QTDIR'])
-	externalsDllDir = os.environ['EXTERNALDLLDIR']
-	env.Append(NSIS_OPTIONS=['/DEXTERNALDLLDIR=%s' % externalsDllDir ])
+	env.Append(NSIS_OPTIONS=['/DQTDIR=%s'%winqtdir ])
+	env.Append(NSIS_OPTIONS=['/DEXTERNALDLLDIR=%s' % externalDllPath ])
+	env.Append(NSIS_OPTIONS=['/DCLAMINSTALLDIR=%s' % winclampath ])
 	# Get the visual studio runtimes path
 	for vcRuntimeDir in os.environ['PATH'].split(";") :
 		vcRuntimeDir = os.path.normpath(vcRuntimeDir)
 		if os.access(os.path.join(vcRuntimeDir,"msvcr71.dll"),os.R_OK) :
 			break
 	env.Append(NSIS_OPTIONS=['/DVCRUNTIMEDIR=%s' % vcRuntimeDir ])
-	win_packages = [env.Nsis( source='resources\\clam_networkeditor.nsi')]
-	env.AddPreAction(win_packages, '%s\\changeExampleDataPath.py . ..' % clam_sconstoolspath)
+	win_packages = [env.Nsis( source='resources/clam_networkeditor.nsi')]
+	env.AddPreAction(win_packages, os.path.join(clam_sconstoolspath,'changeExampleDataPath.py')+' . ..' )
 	env.Alias('package', win_packages)
 
 if sys.platform=='darwin' :
Index: NetworkEditor/resources/clam_networkeditor.nsi
===================================================================
--- NetworkEditor/resources/clam_networkeditor.nsi	(revision 10842)
+++ NetworkEditor/resources/clam_networkeditor.nsi	(working copy)
@@ -39,7 +39,7 @@
 !insertmacro MUI_UNPAGE_INSTFILES
 
 ; Language files
-!insertmacro MUI_LANGUAGE "Catalan"
+;!insertmacro MUI_LANGUAGE "Catalan"
 !insertmacro MUI_LANGUAGE "English"
 !insertmacro MUI_LANGUAGE "Spanish"
 
@@ -64,24 +64,42 @@
   File "..\NetworkEditor.exe"
   File "..\Prototyper.exe"
   File '${QTDIR}\bin\designer.exe'
-  File '${QTDIR}\lib\QtCore4.dll'
-  File '${QTDIR}\lib\QtGui4.dll'
-  File '${QTDIR}\lib\QtOpenGL4.dll'
-  File '${QTDIR}\lib\QtXml4.dll'
-  File '${QTDIR}\lib\QtNetwork4.dll'
-  File '${QTDIR}\lib\QtDesigner4.dll'
-  File '${QTDIR}\lib\QtDesignerComponents4.dll'
-  File '${QTDIR}\lib\QtAssistantClient4.dll'
-  File '${EXTERNALDLLDIR}\libsndfile.dll'
-  File '${EXTERNALDLLDIR}\ogg.dll'
-  File '${EXTERNALDLLDIR}\pthreadVCE.dll'
-  File '${EXTERNALDLLDIR}\vorbis.dll'
-  File '${EXTERNALDLLDIR}\vorbisenc.dll'
-  File '${EXTERNALDLLDIR}\vorbisfile.dll'
-  File '${EXTERNALDLLDIR}\xerces-c_2_3_0.dll'
+  File '${QTDIR}\bin\QtCore4.dll'
+  File '${QTDIR}\bin\QtGui4.dll'
+  File '${QTDIR}\bin\QtOpenGL4.dll'
+  File '${QTDIR}\bin\QtXml4.dll'
+  File '${QTDIR}\bin\QtSvg4.dll'
+  File '${QTDIR}\bin\QtNetwork4.dll'
+  File '${QTDIR}\bin\QtDesigner4.dll'
+  File '${QTDIR}\bin\QtDesignerComponents4.dll'
+  File '${QTDIR}\bin\QtAssistantClient4.dll'
+  File '${QTDIR}\bin\mingwm10.dll'
+  File '${CLAMINSTALLDIR}\lib\clam_audioio.dll'
+  File '${CLAMINSTALLDIR}\lib\clam_core.dll'
+  File '${CLAMINSTALLDIR}\lib\clam_processing.dll'
+  File '${EXTERNALDLLDIR}\libfftw3-3.dll'
+  File '${EXTERNALDLLDIR}\libogg-0.dll'
+  File '${EXTERNALDLLDIR}\libsndfile-1.dll'
+  File '${EXTERNALDLLDIR}\libvorbis-0.dll'
+  File '${EXTERNALDLLDIR}\libvorbisenc-2.dll'
+  File '${EXTERNALDLLDIR}\libvorbisfile-3.dll'
   File '${EXTERNALDLLDIR}\portaudio.dll'
-  File '${VCRUNTIMEDIR}\msvcp71.dll'
-  File '${VCRUNTIMEDIR}\msvcr71.dll'
+  File '${EXTERNALDLLDIR}\pthreadGCE2.dll'
+  ; GTK libs
+  File '${EXTERNALDLLDIR}\libxml++-2.6-2.dll'
+  File '${EXTERNALDLLDIR}\libxml2.dll'
+  File '${EXTERNALDLLDIR}\libglibmm-2.4-1.dll'
+  File '${EXTERNALDLLDIR}\libsigc-2.0-0.dll'
+  File '${EXTERNALDLLDIR}\libgobject-2.0-0.dll'
+  File '${EXTERNALDLLDIR}\libglib-2.0-0.dll'
+  File '${EXTERNALDLLDIR}\iconv.dll'
+  File '${EXTERNALDLLDIR}\intl.dll'
+  File '${EXTERNALDLLDIR}\zlib1.dll'
+  File '${EXTERNALDLLDIR}\libgmodule-2.0-0.dll'
+;  File '${EXTERNALDLLDIR}\mingwm10.dll'
+;  File '${EXTERNALDLLDIR}\pthreadVCE.dll'
+;  File '${VCRUNTIMEDIR}\msvcp71.dll'
+;  File '${VCRUNTIMEDIR}\msvcr71.dll'
   SetOutPath "$INSTDIR\bin\designer"
   File "..\CLAMWidgets.dll"
   SetOutPath "$INSTDIR\example-data\"
@@ -110,7 +128,6 @@
   System::Call 'Shell32::SHChangeNotify(i 0x8000000, i 0, i 0, i 0)'
 !undef Index
 
-  SetOutPath "$INSTDIR\example-data\"
   CreateDirectory "$SMPROGRAMS\CLAM\NetworkEditor"
   CreateDirectory "$SMPROGRAMS\CLAM\NetworkEditor\Examples"
   CreateShortCut "$SMPROGRAMS\CLAM\NetworkEditor\Examples\Tonal Analysis.lnk" "$INSTDIR\example-data\tonalAnalysis-file.clamnetwork"
Index: Annotator/vmqt/SConstruct
===================================================================
--- Annotator/vmqt/SConstruct	(revision 10842)
+++ Annotator/vmqt/SConstruct	(working copy)
@@ -5,8 +5,8 @@
 options.Add(PathOption('clam_prefix', 'The prefix where CLAM was installed', ''))
 options.Add(BoolOption('release', 'Build CLAM Annotator enabling compiler optimizations', 'no') )
 options.Add(BoolOption('verbose', 'Display the full command line instead a short command description', 'no') )
+crosscompiling=True
 
-
 def scanFiles(pattern, paths) :
 	files = []
 	for path in paths :
@@ -30,6 +30,8 @@
 env.Tool('qt4', toolpath=[clam_sconstoolspath])
 env.Tool('clam', toolpath=[clam_sconstoolspath])
 env.Tool('nsis', toolpath=[clam_sconstoolspath])
+if crosscompiling :
+	env.Tool('crossmingw', toolpath=[clam_sconstoolspath])
 
 env.SConsignFile() # Single signature file
 
@@ -127,7 +129,7 @@
 
 staticLibrary = env.StaticLibrary(target='clam_vmqt4', source=sources)
 env.Append(LIBPATH='.')
-env.Append(LIBS='clam_vmqt4')
+env.Prepend(LIBS='clam_vmqt4')
 if sys.platform == "linux2" :
 	env.Append( CCFLAGS=['-g','-O3','-fomit-frame-pointer','-Wall'] )
 examples = []
Index: Annotator/SConstruct
===================================================================
--- Annotator/SConstruct	(revision 10842)
+++ Annotator/SConstruct	(working copy)
@@ -8,8 +8,10 @@
 options.Add(PathOption('clam_prefix', 'The prefix where CLAM was installed', ''))
 options.Add(BoolOption('release', 'Enabling compiler optimizations', 'no') )
 options.Add(BoolOption('verbose', 'Display the full command line instead a short command description', 'no') )
+options.Add(PathOption('external_dll_path', '(Windows only) The place where the NSIS packager takes the installed DLL from', '.'))
+if sys.platform=="linux2" :
+	options.Add(BoolOption('crossmingw', 'Display the full command line instead a short command description', 'no') )
 
-
 def scanFiles(pattern, paths) :
 	files = []
 	for path in paths :
@@ -19,13 +21,17 @@
 def recursiveDirs(root) :
 	return filter( (lambda a : a.rfind( ".svn")==-1 ),  [ a[0] for a in os.walk(root)]  )
 
-
 env = Environment(ENV=os.environ, tools=['default'], options=options)
 options.Save('options.cache', env)
 Help(options.GenerateHelpText(env))
 
 env.SConsignFile() # Single signature file
 
+crosscompiling = env["crossmingw"]
+isWindowsPlatform = sys.platform=='win32' or crosscompiling
+isLinuxPlatform = sys.platform=='linux' and not crosscompiling
+isDarwinPlatform = sys.platform=='darwin'
+
 CLAMInstallDir = env['clam_prefix']
 clam_sconstoolspath = os.path.join(CLAMInstallDir,'share','clam','sconstools')
 CLAMVmQtPath = 'vmqt'
@@ -35,6 +41,8 @@
 env.Tool('nsis', toolpath=[clam_sconstoolspath])
 if sys.platform=='darwin' : env.Tool('bundle', toolpath=[clam_sconstoolspath])
 env.Tool('dmg', toolpath=[clam_sconstoolspath])
+if crosscompiling :
+	env.Tool('crossmingw', toolpath=[clam_sconstoolspath])
 sys.path.append(clam_sconstoolspath)
 import versionInfo
 version, fullVersion = versionInfo.versionFromLocalInfo("Annotator")
@@ -43,11 +51,10 @@
 versionInfo.generateVersionSources(os.path.join('src','MusicAnnotatorVersion'), "MusicAnnotator", fullVersion)
 
 
-
 env['CXXFILESUFFIX'] = '.cxx'
 env['QT4_UICDECLSUFFIX'] = '.hxx'
 env['QT4_MOCHPREFIX'] = os.path.join('generated','moc_')
-env['QT4_UICDECLPREFIX'] = os.path.join('generated','ui_')
+env['QT4_UICDECLPREFIX'] = os.path.join('generated','uic_')
 env['QT4_QRCCXXPREFIX'] = os.path.join('generated','qrc_')
 if not env['verbose']:
 	env['CXXCOMSTR'] = '== Compiling $SOURCE'
@@ -66,6 +73,7 @@
 	] , CLAMInstallDir)
 
 env.EnableQt4Modules([
+#	'QtUiTools',
 	'QtCore',
 	'QtGui',
 	'QtOpenGL',
@@ -74,7 +82,6 @@
 #	'QtTest',
 #	'QtXml',
 #	'QtSvg',
-#	'QtUiTools',
 #	'QtDesigner',
 #	'Qt3Support',
 	], debug=False)
@@ -85,7 +92,7 @@
 }
 
 sourcePaths = [
-	'src',
+	os.path.join('src'),
 	os.path.join('src','generated'),
 	os.path.join('src','InstantViews'),
 	os.path.join('src','InstantViews','generated'),
@@ -119,12 +126,12 @@
 uifiles = scanFiles("*.ui", sourcePaths)
 if uifiles: uiheaders = env.Uic4(source=uifiles)
 
-if sys.platform=="win32" :
+if isWindowsPlatform :
 	sources += env.RES(source=["resources/Annotator.rc"])
 
 env.Append(CPPPATH=includePaths)
 env.Append(LIBPATH=[CLAMVmQtPath])
-env.Append(LIBS="clam_vmqt4")
+env.Prepend(LIBS="clam_vmqt4")
 if sys.platform=='darwin' :
 	env.Append(CPPFLAGS='-DRESOURCES_BASE="\\"Annotator.app/Contents/Resources\\""')
 else :
@@ -152,18 +159,27 @@
 	'example-data/Chords.pro'
 	]
 
+pluginDefines=['-DQT_PLUGIN','-DQT_NO_DEBUG','-DQT_CORE_LIB','-DQT_GUI_LIB','-DQT_OPENGL_LIB','-DQT_XML_LIB','-DQDESIGNER_EXPORT_WIDGETS','-D_REENTRANT']
+env.AppendUnique(CPPFLAGS=pluginDefines)
+
 chordSources = scanFiles("*.cxx", ["src/ChordExtractor"])
 chordSources = filter ( (lambda a : a.rfind( "Test")==-1 ),  chordSources )
 chordSources = filter ( (lambda a : a.rfind( "cppunit")==-1 ),  chordSources )
 
 programs += [ env.Program(target='ChordExtractor', source = chordSources) ]
 
-"""
 onsetSources = scanFiles("*.cpp", ["src/OnsetExtractor"])
 onsetSources = filter ( (lambda a : a.rfind( "Test")==-1 ),  onsetSources )
 onsetSources = filter ( (lambda a : a.rfind( "cppunit")==-1 ),  onsetSources )
-programs += [ env.Program(target='OnsetExtractor', source = onsetSources, LIBS=['fftw3','sndfile']) ]
-"""
+fftwlib = "fftw3-3"
+fftwlibpath = []
+sndfilelib = 'sndfile'
+if sys.platform=="win32" or crosscompiling :
+	fftwlib="fftw3-3"
+	fftwlibpath.append("../../fftw3/lib")
+	fftwlibpath.append("../../libsndfile/lib")
+	sndfilelib = 'libsndfile'
+programs += [ env.Program(target='OnsetExtractor', source = onsetSources, LIBS=[fftwlib,sndfilelib], LIBPATH=fftwlibpath) ]
 
 env.Uic4(source="SimacServicesClient/GUI.ui")
 bocaClientSources = [
@@ -177,6 +193,7 @@
 # Manual step: lupdate-qt4 *xx *ui -ts Annotator_ca.ts
 tsfiles = scanFiles("*.ts", ["src/i18n/"])
 env.Precious(tsfiles) # TODO: this is not enough!! scan -c will delete ts files!!!
+env.NoClean(tsfiles) # TODO: this is not enough!! scan -c will delete ts files!!!
 translatableSources = scanFiles('*.cxx', sourcePaths);
 translatableSources+= scanFiles('*.hxx', sourcePaths);
 translatableSources+= scanFiles('*.ui', sourcePaths);
@@ -209,23 +226,33 @@
 installTargets = [
 	env.Install( env['prefix']+path, files ) for path, files in installation.items() ]
 
-if sys.platform=='win32' : 
+def absolutePosixPathToWine(dir) :
+	return 'z:'+'\\\\'.join(dir.split('/'))
+
+if isWindowsPlatform : 
+	winqtdir=env['QTDIR']
+	if crosscompiling : env['NSIS_MAKENSIS'] = 'wine ~/.wine/drive_c/Program\ Files/NSIS/makensis'
+	if crosscompiling : winqtdir = absolutePosixPathToWine(winqtdir)
+	externalDllPath = env['external_dll_path']
+	if crosscompiling : externalDllPath = absolutePosixPathToWine(externalDllPath)
+	winclampath = CLAMInstallDir
+	if crosscompiling : winclampath = absolutePosixPathToWine(winclampath)
 	installTargets += [
 		env.Install(
 			env['prefix']+"/bin", 
-			os.path.join(env['QTDIR'],'lib',"Qt"+dll+"4.dll")
+			os.path.join(env['QTDIR'],'bin',"Qt"+dll+"4.dll")
 			) for dll in 'Core', 'Gui', 'OpenGL']
 	env.Append(NSIS_OPTIONS=['/DVERSION=%s' % fullVersion ])
-	env.Append(NSIS_OPTIONS=['/DQTDIR=$QTDIR'])
-	externalsDllDir = os.environ['EXTERNALDLLDIR']
-	env.Append(NSIS_OPTIONS=['/DEXTERNALDLLDIR=%s' % externalsDllDir ])
+	env.Append(NSIS_OPTIONS=['/DQTDIR=%s'%winqtdir ])
+	env.Append(NSIS_OPTIONS=['/DEXTERNALDLLDIR=%s' % externalDllPath ])
+	env.Append(NSIS_OPTIONS=['/DCLAMINSTALLDIR=%s' % winclampath ])
 	# Get the visual studio runtimes path
 	for vcRuntimeDir in os.environ['PATH'].split(";") :
 		vcRuntimeDir = os.path.normpath(vcRuntimeDir)
 		if os.access(os.path.join(vcRuntimeDir,"msvcr71.dll"),os.R_OK) :
 			break
 	env.Append(NSIS_OPTIONS=['/DVCRUNTIMEDIR=%s' % vcRuntimeDir ])
-	win_packages = [env.Nsis( source='resources\\clam_annotator.nsi')]
+	win_packages = [env.Nsis( source='resources/clam_annotator.nsi')]
 	env.Alias('package', win_packages)
 
 if sys.platform=='darwin' :
Index: Annotator/resources/clam_annotator.nsi
===================================================================
--- Annotator/resources/clam_annotator.nsi	(revision 10842)
+++ Annotator/resources/clam_annotator.nsi	(working copy)
@@ -40,7 +40,7 @@
 !insertmacro MUI_UNPAGE_INSTFILES
 
 ; Language files
-!insertmacro MUI_LANGUAGE "Catalan"
+;!insertmacro MUI_LANGUAGE "Catalan"
 !insertmacro MUI_LANGUAGE "English"
 !insertmacro MUI_LANGUAGE "Spanish"
 
@@ -63,28 +63,48 @@
   SetOutPath "$INSTDIR\bin"
   SetOverwrite ifnewer
   File "..\Annotator.exe"
-  CreateDirectory "$SMPROGRAMS\CLAM\Annotator"
-  CreateShortCut "$SMPROGRAMS\CLAM\Annotator\Annotator.lnk" "$INSTDIR\bin\Annotator.exe"
   File "..\ClamExtractorExample.exe"
   File "..\ChordExtractor.exe"
   File "..\BocaClient.exe"
-  File "..\SimacServicesClient\dist\BocaTaskManager.exe"
-  File "..\SimacServicesClient\dist\library.zip"
-  File "..\SimacServicesClient\dist\w9xpopen.exe"
-  File '${QTDIR}\lib\QtCore4.dll'
-  File '${QTDIR}\lib\QtGui4.dll'
-  File '${QTDIR}\lib\QtOpenGL4.dll'
-  File '${EXTERNALDLLDIR}\libsndfile.dll'
-  File '${EXTERNALDLLDIR}\ogg.dll'
-  File '${EXTERNALDLLDIR}\pthreadVCE.dll'
-  File '${EXTERNALDLLDIR}\qt-mt322.dll'
-  File '${EXTERNALDLLDIR}\vorbis.dll'
-  File '${EXTERNALDLLDIR}\vorbisenc.dll'
-  File '${EXTERNALDLLDIR}\vorbisfile.dll'
-  File '${EXTERNALDLLDIR}\xerces-c_2_3_0.dll'
-  File '${VCRUNTIMEDIR}\msvcp71.dll'
-  File '${VCRUNTIMEDIR}\msvcr71.dll'
-  CreateShortCut "$DESKTOP\Annotator.lnk" "$INSTDIR\bin\Annotator.exe"
+  ; TODO: readd the boca task manager
+;  File "..\SimacServicesClient\dist\BocaTaskManager.exe"
+;  File "..\SimacServicesClient\dist\library.zip"
+;  File "..\SimacServicesClient\dist\w9xpopen.exe"
+  File '${QTDIR}\bin\QtCore4.dll'
+  File '${QTDIR}\bin\QtGui4.dll'
+  File '${QTDIR}\bin\QtOpenGL4.dll'
+;  File '${QTDIR}\bin\QtXml4.dll'
+;  File '${QTDIR}\bin\QtSvg4.dll'
+;  File '${QTDIR}\bin\QtNetwork4.dll'
+;  File '${QTDIR}\bin\QtDesigner4.dll'
+;  File '${QTDIR}\bin\QtDesignerComponents4.dll'
+;  File '${QTDIR}\bin\QtAssistantClient4.dll'
+  File '${QTDIR}\bin\mingwm10.dll'
+  File '${CLAMINSTALLDIR}\lib\clam_audioio.dll'
+  File '${CLAMINSTALLDIR}\lib\clam_core.dll'
+  File '${CLAMINSTALLDIR}\lib\clam_processing.dll'
+  File '${EXTERNALDLLDIR}\libfftw3-3.dll'
+  File '${EXTERNALDLLDIR}\libogg-0.dll'
+  File '${EXTERNALDLLDIR}\libsndfile-1.dll'
+  File '${EXTERNALDLLDIR}\libvorbis-0.dll'
+  File '${EXTERNALDLLDIR}\libvorbisenc-2.dll'
+  File '${EXTERNALDLLDIR}\libvorbisfile-3.dll'
+  File '${EXTERNALDLLDIR}\portaudio.dll'
+  File '${EXTERNALDLLDIR}\pthreadGCE2.dll'
+  ; GTK libs
+  File '${EXTERNALDLLDIR}\libxml++-2.6-2.dll'
+  File '${EXTERNALDLLDIR}\libxml2.dll'
+  File '${EXTERNALDLLDIR}\libglibmm-2.4-1.dll'
+  File '${EXTERNALDLLDIR}\libsigc-2.0-0.dll'
+  File '${EXTERNALDLLDIR}\libgobject-2.0-0.dll'
+  File '${EXTERNALDLLDIR}\libglib-2.0-0.dll'
+  File '${EXTERNALDLLDIR}\iconv.dll'
+  File '${EXTERNALDLLDIR}\intl.dll'
+  File '${EXTERNALDLLDIR}\zlib1.dll'
+  File '${EXTERNALDLLDIR}\libgmodule-2.0-0.dll'
+;  File '${EXTERNALDLLDIR}\pthreadVCE.dll'
+;  File '${VCRUNTIMEDIR}\msvcp71.dll'
+;  File '${VCRUNTIMEDIR}\msvcr71.dll'
   SetOutPath "$INSTDIR\example-data\"
   File "..\example-data\CLAMDescriptors.sc"
   File "..\example-data\CLAMDescriptors.pro"
@@ -122,6 +142,9 @@
   System::Call 'Shell32::SHChangeNotify(i 0x8000000, i 0, i 0, i 0)'
 !undef Index
 
+  CreateDirectory "$SMPROGRAMS\CLAM\Annotator"
+  CreateShortCut "$SMPROGRAMS\CLAM\Annotator\Annotator.lnk" "$INSTDIR\bin\Annotator.exe"
+  CreateShortCut "$DESKTOP\Annotator.lnk" "$INSTDIR\bin\Annotator.exe"
 
 
 SectionEnd
Index: CLAM/scons/sconstools/qt4.py
===================================================================
--- CLAM/scons/sconstools/qt4.py	(revision 10842)
+++ CLAM/scons/sconstools/qt4.py	(working copy)
@@ -57,6 +57,7 @@
 
 qrcinclude_re = re.compile(r'<file>([^<]*)</file>', re.M)
 
+crosscompiling=True
 
 header_extensions = [".h", ".hxx", ".hpp", ".hh"]
 if SCons.Util.case_sensitive_suffixes('.h', '.H'):
@@ -409,7 +410,7 @@
 		self.AppendUnique(CPPFLAGS=['-DQT_GUI_LIB'])
 
 	debugSuffix = ''
-	if sys.platform == "linux2" :
+	if sys.platform == "linux2" and not crosscompiling :
 		if debug : debugSuffix = '_debug'
 		for module in modules :
 			if module not in pclessModules : continue
@@ -420,7 +421,7 @@
 		pcmodules = [module+debugSuffix for module in modules if module not in pclessModules ]
 		self.ParseConfig('pkg-config %s --libs --cflags'% ' '.join(pcmodules))
 		return
-	if sys.platform == "win32" :
+	if sys.platform == "win32" or crosscompiling :
 		if debug : debugSuffix = 'd'
 		self.AppendUnique(LIBS=[lib+'4'+debugSuffix for lib in modules if lib not in staticModules])
 		self.PrependUnique(LIBS=[lib+debugSuffix for lib in modules if lib in staticModules])
Index: CLAM/scons/sconstools/nsis.py
===================================================================
--- CLAM/scons/sconstools/nsis.py	(revision 10842)
+++ CLAM/scons/sconstools/nsis.py	(working copy)
@@ -1,4 +1,4 @@
-import re
+import re, os
 import SCons.Util
 nsisFiles_re = re.compile(r'^\s*File "([^"]*)"', re.M)
 
@@ -16,9 +16,12 @@
 
 	env['NSIS_MAKENSIS'] = 'makensis'
 	env['NSIS_OPTIONS'] = ''
+	def winToLocalReformat(path) :
+		return os.path.join(*path.split("\\"))
 	def scanNsisContent(node, env, path, arg):
 		contents = node.get_contents()
 		includes = nsisFiles_re.findall(contents)
+		includes = [ winToLocalReformat(include) for include in includes ]
 		return filter(lambda x: x.rfind('*')==-1, includes)
 	nsisscanner = env.Scanner(name = 'nsisfile',
 		function = scanNsisContent,
Index: CLAM/scons/libs/clam_build_helpers.py
===================================================================
--- CLAM/scons/libs/clam_build_helpers.py	(revision 10842)
+++ CLAM/scons/libs/clam_build_helpers.py	(working copy)
@@ -5,6 +5,8 @@
 
 import shelve  #TODO needed
 
+crosscompiling=True
+
 def generate_copy_files( target, source, env ) :
 	if sys.platform == 'win32' :
 		copyCmd = 'copy'
@@ -133,7 +135,11 @@
 def pkg_config_check_existence(context, *args, **kwargs):
 	name = kwargs['name']
 	context.Message( 'Checking for %s registered in pkg-config... ' % name )
-	ret = context.TryAction('pkg-config --exists \'%s\'' % name)[0]
+	if crosscompiling : 
+		pkgconfig = 'wine pkg-config'
+	else :
+		pkgconfig = 'pkg-config'
+	ret = context.TryAction('%s --exists \'%s\'' % (pkgconfig,name))[0]
 	context.Result( ret )
 	return ret
 
@@ -255,7 +261,11 @@
 
 def check_pkg_config(context, *args, **kwords):
 	context.Message( 'Checking for pkg-config... ' )
-	ret, _  = context.TryAction('pkg-config --help')
+	if crosscompiling : 
+		pkgconfig = 'wine pkg-config'
+	else :
+		pkgconfig = 'pkg-config'
+	ret, _  = context.TryAction(pkgconfig + ' --help') 
 	context.Result( ret )
 	return ret
 
@@ -281,8 +291,8 @@
 		out = open(out_file, 'w' )
 
 		print >> out, "prefix = %s"%env['prefix']
-		print >> out, "libdir = %s\\lib"%env['prefix']
-		print >> out, "includedir = %s\\include"%env['prefix']
+		print >> out, "libdir = ${prefix}\\lib"
+		print >> out, "includedir = ${prefix}\\include"
 		print >> out
 		print >> out, "Name: %s"%self.name
 		print >> out, "Version: %s"%self.version
@@ -347,7 +357,7 @@
 	env.Prepend(LIBPATH=['../%s'%module for module in moduleDependencies])
 	#audioio_env.Append( ARFLAGS= ['/OPT:NOREF', '/OPT:NOICF', '/DEBUG'] )
 
-	if sys.platform != 'win32' :
+	if sys.platform != 'win32' and not crosscompiling :
 		return posix_lib_rules( name, version, headers , sources, install_dirs, env )
 	else :
 		return win32_lib_rules( name, version, headers , sources, install_dirs, env )
@@ -419,10 +429,13 @@
 	return tgt, install_tgt
 
 def win32_lib_rules( name, version, headers, sources, install_dirs, env, moduleDependencies =[] ) :
-	static_lib = env.Library( 'clam_' + name, sources )
-	tgt = env.Alias(name, static_lib)
+	if crosscompiling :
+		lib = env.SharedLibrary( 'clam_' + name, sources)
+	else :
+		lib = env.Library( 'clam_' + name, sources )
+	tgt = env.Alias(name, lib)
 	lib_descriptor = env.File( 'clam_'+name+'.pc' )
-	install_static = env.Install( install_dirs.lib, static_lib )
+	install_static = env.Install( install_dirs.lib, lib )
 	install_descriptor = env.Install( install_dirs.lib+'/pkgconfig', lib_descriptor )
 	install_headers = env.Install( install_dirs.inc+'/CLAM', headers )
 	install_tgt = env.Alias('install_'+name, [install_headers,install_static,install_descriptor])
@@ -451,7 +464,7 @@
 }
 """
 
-if sys.platform == 'win32' :
+if sys.platform == 'win32' or crosscompiling :
 	package_checks['check_xerces_c'] = ThoroughPackageCheck( 'xerces-c', 'c++', 'xerces-c_2', xerces_test_code )
 else :
 	package_checks['check_xerces_c'] = ThoroughPackageCheck( 'xerces-c', 'c++', 'xerces-c', xerces_test_code )
Index: CLAM/scons/libs/core/SConscript
===================================================================
--- CLAM/scons/libs/core/SConscript	(revision 10842)
+++ CLAM/scons/libs/core/SConscript	(working copy)
@@ -4,6 +4,8 @@
 
 Import('core_env version install_dirs')
 
+crosscompiling=True
+
 def define_module_contents(env) :
 	if not os.path.exists('src') :
 		os.mkdir('src')
@@ -33,7 +35,7 @@
 		'externals/CbLib',
 		]
 
-	if sys.platform == 'win32' :
+	if sys.platform == 'win32' or crosscompiling :
 		folders.append('src/Defines/Windows')
 	else :
 		folders.append('src/Defines/Unix')	
@@ -47,7 +49,7 @@
 		'FreewheelingNetworkPlayer',
 		]
 
-	if sys.platform == 'win32' :
+	if sys.platform == 'win32' or crosscompiling :
 		blacklist.append( 'Watchdog.+' )
 
 	if core_env['xmlbackend'] == 'xercesc' :
Index: CLAM/scons/libs/audioio/SConscript
===================================================================
--- CLAM/scons/libs/audioio/SConscript	(revision 10842)
+++ CLAM/scons/libs/audioio/SConscript	(working copy)
@@ -4,6 +4,8 @@
 
 Import('audioio_env version install_dirs')
 
+crosscompiling=True
+
 def define_module_contents(env) :
 	if not os.path.exists('src') :
 		os.mkdir('src')
@@ -42,11 +44,13 @@
 	if env['with_portmidi'] :
 		folders.append( 'src/Tools/PortMIDI' )
 
-	if sys.platform == 'linux2' :
+	if crosscompiling :
+		pass
+	elif sys.platform == 'linux2' :
 		if env['with_alsa'] :
 			folders.append( 'src/Tools/MIDIIO/Linux' )
 			folders.append( 'src/Tools/AudioIO/Linux')
-	elif sys.platform == 'win32':
+	elif sys.platform == 'win32' :
 		if env['audio_backend'] == 'rtaudio' :
 			print('using rtaudio')
 			folders += ['src/Tools/AudioIO/RtAudio'] #, 'src/Defines/Windows/CLAM_windows.h']
@@ -78,6 +82,7 @@
 		'main.cxx',
 		'GUIAudioApplication.*xx',
 		]
+	env.AppendUnique(LDFLAGS=["-Wl,--exclude-libs,ogg.lib"])
 
 	file_retriever = FileRetriever( '../../..', folders, blacklist )
 
Index: CLAM/scripts/clam_testfarm_client_osx.py
===================================================================
--- CLAM/scripts/clam_testfarm_client_osx.py	(revision 10842)
+++ CLAM/scripts/clam_testfarm_client_osx.py	(working copy)
@@ -37,6 +37,8 @@
 	'installPath': '$HOME/local',
 	'qt3dir':'',
 	'qt4dir':'/usr/local/Trolltech/Qt-4.2.2/',
+	'packageWildcard':'*.dmg',
+	'downloadPlatform':'mac',
 }
 
 client = Client(localDefinitions['name'])
@@ -96,7 +98,6 @@
 	"cd %(sandbox)s/CLAM/examples"%localDefinitions,
 	"scons clam_prefix=%(installPath)s"%localDefinitions,
 ] )
-
 clam.add_subtask("CLAM Plugins compilation", [
 	"cd %(sandbox)s/CLAM/examples/PluginExample"%localDefinitions,
 	"scons clam_prefix=%(installPath)s"%localDefinitions,
@@ -107,13 +108,11 @@
 	"cd %(sandbox)s/SMSTools"%localDefinitions,
 	"scons prefix=%(installPath)s clam_prefix=%(installPath)s"%localDefinitions,
 	"%(sandbox)s/CLAM/scons/sconstools/changeExampleDataPath.py %(installPath)s/share/smstools "%localDefinitions,
-	"rm -f *.dmg",
+	"rm -f %(packageWildcard)s"%localDefinitions,
 	"scons package",
-	"ls *svn1* > /dev/null || scp *.dmg clamadm@www.iua.upf.edu:download/mac/svnsnapshots/",
+	"ls *svn1* > /dev/null || scp %(packageWildcard)s clamadm@www.iua.upf.edu:download/%(downloadPlatform)s/svnsnapshots/"%localDefinitions,
 	'ls *svn1* > /dev/null || slogin clamadm@www.iua.upf.edu scripts/regenerateDownloadDirsIndex.py',
 ] )
-
-
 clam.add_subtask('vmqt4 compilation and examples', [
 	{CMD: "echo setting QTDIR to qt4 path ", INFO: set_qtdir_to_qt4},
 	"cd %(sandbox)s/Annotator/vmqt"%localDefinitions,
@@ -124,9 +123,9 @@
 	{CMD: "echo setting QTDIR to qt4 path ", INFO: set_qtdir_to_qt4},
 	"cd %(sandbox)s/Annotator"%localDefinitions,
 	"scons clam_vmqt4_path=vmqt prefix=%(installPath)s clam_prefix=%(installPath)s"%localDefinitions,
-	"rm -f *.dmg",
+	"rm -f %(packageWildcard)s"%localDefinitions,
 	"scons package",
-	"ls *svn1* > /dev/null || scp *.dmg clamadm@www.iua.upf.edu:download/mac/svnsnapshots/",
+	"ls *svn1* > /dev/null || scp %(packageWildcard)s clamadm@www.iua.upf.edu:download/%(downloadPlatform)s/svnsnapshots/"%localDefinitions,
 	'ls *svn1* > /dev/null || slogin clamadm@www.iua.upf.edu scripts/regenerateDownloadDirsIndex.py',
 ] )
 
@@ -135,9 +134,9 @@
 	"cd %(sandbox)s/NetworkEditor"%localDefinitions,
 	"scons prefix=%(installPath)s clam_prefix=%(installPath)s"%localDefinitions,
 	"%(sandbox)s/CLAM/scons/sconstools/changeExampleDataPath.py %(installPath)s/share/smstools "%localDefinitions,
-	"rm -f *.dmg",
+	"rm -f %(packageWildcard)s"%localDefinitions,
 	"scons package",
-	"ls *svn1* > /dev/null || scp *.dmg clamadm@www.iua.upf.edu:download/mac/svnsnapshots/",
+	"ls *svn1* > /dev/null || scp %(packageWildcard)s clamadm@www.iua.upf.edu:download/%(downloadPlatform)s/svnsnapshots/"%localDefinitions,
 	'ls *svn1* > /dev/null || slogin clamadm@www.iua.upf.edu scripts/regenerateDownloadDirsIndex.py',
 ] )
 
Index: CLAM/src/Standard/Array.cxx
===================================================================
--- CLAM/src/Standard/Array.cxx	(revision 10842)
+++ CLAM/src/Standard/Array.cxx	(working copy)
@@ -23,6 +23,7 @@
 
 namespace CLAM
 {
+
 #define CLAM_NUMERIC_ARRAY_INITIALIZATION(Type)          \
 template<>                                              \
 void Array<Type>::InitializeElement(int i)              \
@@ -30,7 +31,7 @@
     mpData[i]=0;                                        \
 }                                                       \
 
-
+/*
 CLAM_NUMERIC_ARRAY_INITIALIZATION(unsigned long)
 CLAM_NUMERIC_ARRAY_INITIALIZATION(unsigned int)
 CLAM_NUMERIC_ARRAY_INITIALIZATION(unsigned short)
@@ -41,10 +42,10 @@
 CLAM_NUMERIC_ARRAY_INITIALIZATION(signed char)
 CLAM_NUMERIC_ARRAY_INITIALIZATION(double)
 CLAM_NUMERIC_ARRAY_INITIALIZATION(float)
+*/
 
+/// And fast spetialization for basic types
 
-/** And fast spetialization for basic types */
-
 #define CLAM_FAST_ARRAY_SPECIALIZATIONS(TYPE)                           \
 template<>                                                             \
 void Array<TYPE >::CopyDataBlock(int first, int last,                  \
@@ -89,6 +90,7 @@
             (mSize-where-1)*sizeof(TYPE));                             \
 }                                                                      \
 
+/*
 CLAM_FAST_ARRAY_SPECIALIZATIONS(unsigned long)
 CLAM_FAST_ARRAY_SPECIALIZATIONS(unsigned int)
 CLAM_FAST_ARRAY_SPECIALIZATIONS(unsigned short)
@@ -99,7 +101,7 @@
 CLAM_FAST_ARRAY_SPECIALIZATIONS(signed char)
 CLAM_FAST_ARRAY_SPECIALIZATIONS(double)
 CLAM_FAST_ARRAY_SPECIALIZATIONS(float)
+*/
 
-
 }
 
Index: CLAM/SConstruct
===================================================================
--- CLAM/SConstruct	(revision 10842)
+++ CLAM/SConstruct	(working copy)
@@ -9,7 +9,7 @@
 from clam_build_helpers import *
 from clam_dependent_libs_checks import *
 # TODO: Must solve the dependency loop of options and platforms
-crosscompiling = False
+crosscompiling = True
 isWindowsPlatform = sys.platform=='win32' or crosscompiling
 isLinuxPlatform = sys.platform=='linux2' and not crosscompiling
 isDarwinPlatform = sys.platform=='darwin'
