Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions build/crossmingw.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
""")

def find(env):
if 'CROSSMINGW_PREFIX' in env:
prefixes.insert(0, env['CROSSMINGW_PREFIX'])
for prefix in prefixes:
# First search in the SCons path and then the OS path:
if env.WhereIs(prefix + 'gcc') or SCons.Util.WhereIs(prefix + 'gcc'):
Expand Down
27 changes: 21 additions & 6 deletions build/depends.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ def configure(self, build, conf):
libs = ['portaudio']
if build.msvcdebug:
libs = ['portaudiod','portaudio-debug']
if build.crosscompile and build.platform_is_windows and build.toolchain_is_gnu:
libs = ['portaudio', 'portaudio.dll', 'portaudio-2']
if not conf.CheckLib(libs):
raise Exception('Did not find libportaudio.a, portaudio.lib, or the PortAudio-v19 development header files.')

Expand Down Expand Up @@ -187,8 +189,8 @@ def configure(self, build, conf):
# times.

qt_modules = [
'QtCore', 'QtGui', 'QtOpenGL', 'QtXml', 'QtSvg',
'QtSql', 'QtScript', 'QtXmlPatterns', 'QtNetwork'
'QtCore', 'QtGui', 'QtOpenGL', 'QtXml', 'QtSql', 'QtScript',
'QtNetwork'
#'QtUiTools', #'QtDesigner',
]

Expand Down Expand Up @@ -238,7 +240,6 @@ def configure(self, build, conf):
'QtOpenGL4',
'QtXml4',
'QtNetwork4',
'QtXmlPatterns4',
'QtSql4',
'QtScript4',]
if use_qtwebkit:
Expand Down Expand Up @@ -378,10 +379,13 @@ def configure(self, build, conf, env=None):
env.Append(CPPPATH=['#lib/%s' % self.SOUNDTOUCH_PATH])

# Check if the compiler has SSE extention enabled
# Allways the case on x64 (core instructions)
# Always the case on x64 (core instructions)
optimize = int(util.get_flags(env, 'optimize', 1))
if self.sse_enabled(build):
env.Append(CPPDEFINES='SOUNDTOUCH_ALLOW_X86_OPTIMIZATIONS')
build.env.Append(CCFLAGS = '-mmmx -msse')
env.Append(CPPDEFINES='__MMX__')
env.Append(CPPDEFINES='__SSE__')

class TagLib(Dependence):
def configure(self, build, conf):
Expand Down Expand Up @@ -736,6 +740,7 @@ def sources(self, build):
"util/stat.cpp",
"util/timer.cpp",
"util/performancetimer.cpp",
"util/version.cpp",

# Add the QRC file which compiles in some extra resources
# (prefs icons, etc.)
Expand Down Expand Up @@ -830,6 +835,9 @@ def configure(self, build, conf):
build.env.Append(CPPPATH=mixxx_lib_path)
build.env.Append(LIBPATH=mixxx_lib_path)

# Find executables (e.g. protoc) in the winlib path
build.env.AppendENVPath('PATH', mixxx_lib_path)

#Ugh, MSVC-only hack :( see
#http://www.qtforum.org/article/17883/problem-using-qstring-fromstdwstring.html
build.env.Append(CXXFLAGS = '/Zc:wchar_t-')
Expand Down Expand Up @@ -949,5 +957,12 @@ def post_dependency_check_configure(self, build, conf):
build.env.Append(LINKFLAGS = '/manifest') #Force MSVS to generate a manifest (MSVC2010)
elif build.toolchain_is_gnu:
# Makes the program not launch a shell first
build.env.Append(LINKFLAGS = '--subsystem,windows')
build.env.Append(LINKFLAGS = '-mwindows')
build.env.Append(LINKFLAGS = '-Wl,-subsystem,windows')
build.env.Append(CCFLAGS = '-mwindows')
# Enable the use of threads
build.env.Append(CCFLAGS = '-mthreads')
# Linking won't succeed without this
build.env.Append(CCFLAGS = '-fno-keep-inline-dllexport')
# Link in libz at the end, so dependent libraries find it
build.env.Append(LIBS = 'z');

2 changes: 2 additions & 0 deletions build/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,8 @@ def configure(self, build, conf):
if not self.enabled(build):
return

build.env.Append(CPPDEFINES = '__VAMP__')

# If there is no system vamp-hostdk installed, then we'll directly link
# the vamp-hostsdk.
if not conf.CheckLib(['vamp-hostsdk']):
Expand Down
31 changes: 21 additions & 10 deletions build/mixxx.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,15 @@ def __init__(self, target, machine, build, toolchain, available_features=[]):
default_qtdir = depends.Qt.DEFAULT_QTDIRS.get(self.platform, '')
qtdir = Script.ARGUMENTS.get('qtdir',
os.environ.get('QTDIR', default_qtdir))
if self.crosscompile:
crosscompile_root = Script.ARGUMENTS.get('crosscompile_root', '')

if crosscompile_root == '':
print "Your build setup indicates this is a cross-compile, but you did not specify 'crosscompile_root', which is required."
Script.Exit(1)

self.crosscompile_root = os.path.abspath(crosscompile_root)
qtdir = self.crosscompile_root

# Validate the specified qtdir exists
if not os.path.exists(qtdir):
Expand Down Expand Up @@ -156,6 +165,15 @@ def __init__(self, target, machine, build, toolchain, available_features=[]):
if self.crosscompile:
if self.platform_is_windows:
tools.append('crossmingw')

# Find the toolchain when building under Fedora.
if self.toolchain_is_gnu:
if self.machine_is_64bit:
extra_arguments['CROSSMINGW_PREFIX'] \
= 'x86_64-w64-mingw32-'
else:
extra_arguments['CROSSMINGW_PREFIX'] \
= 'i686-w64-mingw32-'
if self.platform == 'osx':
tools.append('crossosx')

Expand Down Expand Up @@ -183,16 +201,9 @@ def __init__(self, target, machine, build, toolchain, available_features=[]):
self.env.Append(LINKFLAGS = '-arch x86_64')

if self.crosscompile:
crosscompile_root = Script.ARGUMENTS.get('crosscompile_root', '')

if crosscompile_root == '':
print "Your build setup indicates this is a cross-compile, but you did not specify 'crosscompile_root', which is required."
Script.Exit(1)

crosscompile_root = os.path.abspath(crosscompile_root)
self.env.Append(CPPPATH=os.path.join(crosscompile_root, 'include'))
self.env.Append(LIBPATH=os.path.join(crosscompile_root, 'lib'))
self.env.Append(LIBPATH=os.path.join(crosscompile_root, 'bin'))
self.env.Append(CPPPATH=os.path.join(self.crosscompile_root, 'include'))
self.env.Append(LIBPATH=os.path.join(self.crosscompile_root, 'lib'))
self.env.Append(LIBPATH=os.path.join(self.crosscompile_root, 'bin'))

self.install_options()
self.virtualize_build_dir()
Expand Down
6 changes: 6 additions & 0 deletions build/nsis/Mixxx.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ Function .onInit ; Prevent multiple installer instances

FunctionEnd

!ifdef WINLIB_PATH

;-------------------------------
; Install the VC 2010 redistributable DLLs if they're not already.
Function InstallVCRedist
Expand Down Expand Up @@ -187,14 +189,18 @@ VSRedistInstalled:

FunctionEnd

!endif ; WINLIB_PATH

;--------------------------------
; The stuff to install

Section "Mixxx (required)" SecMixxx

SectionIn RO

!ifdef WINLIB_PATH
Call InstallVCRedist
!endif ; WINLIB_PATH

; Set output path to the installation directory.
SetOutPath $INSTDIR
Expand Down
Loading