Browse Source

MacOS build script and fixes

tags/1.9.4
falkTX 12 years ago
parent
commit
9168fd8ba3
5 changed files with 60 additions and 5 deletions
  1. +53
    -0
      data/macos/build.sh
  2. +2
    -0
      source/backend/engine/rtaudio-4.0.12/RtAudio.cpp
  3. +1
    -1
      source/backend/native/lfo.c
  4. +1
    -1
      source/backend/standalone/Makefile
  5. +3
    -3
      source/carla.py

+ 53
- 0
data/macos/build.sh View File

@@ -0,0 +1,53 @@
#!/bin/bash

set -e

JOBS="-j 2"

if [ ! -f Makefile ]; then
cd ../..
fi

export CC="gcc-mp-4.7"
export CXX="g++-mp-4.7"
export LDFLAGS="-L/usr/local/lib/"
export PYUIC="pyuic4-3.3"
export PYRCC="pyrcc4-3.3 -py3"

# Clean build
make clean

# Build PyQt4 resources
make $JOBS UI RES WIDGETS

# Build discovery
make $JOBS -C source/discovery MACOS=true

# Build backend
make $JOBS -C source/backend/standalone ../libcarla_standalone.dylib EXTRA_LIBS="-ldl" MACOS=true
# DGL_LIBS="-framework OpenGL -framework Cocoa" HAVE_OPENGL=true

rm -rf ./data/macos/build

# Build Mac App
# cd data/macos
# python3.3 setup.py build
# cxfreeze-3.3 --target-dir=./data/macos/Carla ./source/carla.py --include-modules=re,sip

# mkdir build/backend
# mkdir build/bridges
# mkdir build/discovery
# cp ../../source/backend/*.dylib build/backend/
# cp ../../source/discovery/carla-discovery-* build/discovery/

# cp $WINEPREFIX/drive_c/windows/syswow64/python33.dll Carla/
# cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt4/QtCore4.dll Carla/
# cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt4/QtGui4.dll Carla/
# cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt4/QtOpenGL4.dll Carla/
# cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt4/QtSvg4.dll Carla/
# cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt4/QtXml4.dll Carla/
# cp -r $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt4/plugins/imageformats/ Carla/
# cp -r $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt4/plugins/iconengines/ Carla/

# cd ../..


+ 2
- 0
source/backend/engine/rtaudio-4.0.12/RtAudio.cpp View File

@@ -403,6 +403,8 @@ unsigned int RtApi :: getStreamSampleRate( void )
#if defined(__MACOSX_CORE__)
#include <unistd.h>
// The OS X CoreAudio API is designed to use a separate callback
// procedure for each of its audio devices. A single RtAudio duplex
// stream using two different devices is supported here, though it


+ 1
- 1
source/backend/native/lfo.c View File

@@ -21,7 +21,7 @@
#include <math.h>
#include <stdlib.h>

#ifdef __MINGW32__
#ifndef __linux__
# define uint unsigned int
#endif



+ 1
- 1
source/backend/standalone/Makefile View File

@@ -135,7 +135,7 @@ debug:
$(CXX) $^ -shared $(LINK_FLAGS) $(W32_LIBS) -Wl,--output-def,$@.def -o $@ && $(STRIP) $@

../libcarla_standalone.dylib: $(OBJS) $(LIBS)
$(CXX) $^ -dynamiclib $(LINK_FLAGS) -o $@ && $(STRIP) $@
$(CXX) $^ -dynamiclib $(LINK_FLAGS) -framework CoreAudio -framework CoreMidi -framework CoreFoundation -o $@

../libcarla_standalone.so: $(OBJS) $(LIBS)
$(CXX) $^ -shared $(LINK_FLAGS) -o $@ && $(STRIP) $@


+ 3
- 3
source/carla.py View File

@@ -685,9 +685,6 @@ class CarlaMainW(QMainWindow):
self.ui = ui_carla.Ui_CarlaMainW()
self.ui.setupUi(self)

if MACOS:
self.setUnifiedTitleAndToolBarOnMac(True)

# -------------------------------------------------------------
# Internal stuff

@@ -2051,6 +2048,9 @@ class CarlaMainW(QMainWindow):
}
""" % (col1, col2))

if MACOS and not settings.value("Main/UseProTheme", True, type=bool):
self.setUnifiedTitleAndToolBarOnMac(True)

useCustomMiniCanvasPaint = bool(settings.value("Main/UseProTheme", True, type=bool) and
settings.value("Main/ProThemeColor", "Black", type=str) == "Black")



Loading…
Cancel
Save