Browse Source

A few more changes as needed for osx

tags/v2.1-rc1
falkTX 4 years ago
parent
commit
00a8f7f999
7 changed files with 63 additions and 47 deletions
  1. +6
    -11
      data/macos/build-deps-new.sh
  2. +10
    -10
      data/macos/build-deps.sh
  3. +20
    -16
      data/macos/build.sh
  4. +5
    -5
      data/macos/common.env
  5. +5
    -5
      data/macos/env.sh
  6. +7
    -0
      source/Makefile.mk
  7. +10
    -0
      source/theme/Makefile

+ 6
- 11
data/macos/build-deps-new.sh View File

@@ -70,7 +70,7 @@ export PATH=${PREFIX}/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
export PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig

export CFLAGS="-O3 -mtune=generic -msse -msse2 -mfpmath=sse -fvisibility=hidden -fdata-sections -ffunction-sections"
export CFLAGS="${CFLAGS} -fPIC -DPIC -DNDEBUG -I${PREFIX}/include -m${ARCH} -mmacosx-version-min=10.7"
export CFLAGS="${CFLAGS} -fPIC -DPIC -DNDEBUG -I${PREFIX}/include -m${ARCH} -mmacosx-version-min=10.8"
export CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden -std=gnu++11 -stdlib=libc++"

export LDFLAGS="-fdata-sections -ffunction-sections -Wl,-dead_strip -Wl,-dead_strip_dylibs"
@@ -164,6 +164,7 @@ fi

if [ ! -f libogg-${LIBOGG_VERSION}/build-done ]; then
cd libogg-${LIBOGG_VERSION}
sed -i -e 's/__MACH__/__MACH_SKIP__/' include/ogg/os_types.h
./configure --enable-static --disable-shared --prefix=${PREFIX}
make ${MAKE_ARGS}
make install
@@ -334,7 +335,7 @@ fi
# ---------------------------------------------------------------------------------------------------------------------
# build base libs

# cleanup
cleanup

export ARCH=32
build_base
@@ -350,15 +351,12 @@ export PATH=${PREFIX}/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
export PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig
export PKG_CONFIG=${TARGETDIR}/carla64/bin/pkg-config

export CFLAGS="-O3 -mtune=generic -msse -msse2 -mfpmath=sse -fPIC -DPIC -DNDEBUG -I${PREFIX}/include -m64"
export CXXFLAGS=${CFLAGS}
export LDFLAGS="-L${PREFIX}/lib -m64"
export CFLAGS="-O3 -mtune=generic -msse -msse2 -mfpmath=sse -fPIC -DPIC -DNDEBUG -I${PREFIX}/include -m64 -mmacosx-version-min=10.8"
export CXXFLAGS="${CFLAGS} -std=gnu++11 -stdlib=libc++"
export LDFLAGS="-L${PREFIX}/lib -m64 -stdlib=libc++"

export MAKE=/usr/bin/make

#export CFG_ARCH=x86_64
#export QMAKESPEC=macx-clang

# ---------------------------------------------------------------------------------------------------------------------
# qt5-base download

@@ -456,9 +454,6 @@ if [ ! -f Python-${PYTHON_VERSION}/build-done ]; then
cd ..
fi

# --enable-shared
# ar -d /Users/falktx/builds/carla/lib/python3.7/config-3.7m-darwin/libpython3.7m.a main.o

# ---------------------------------------------------------------------------------------------------------------------
# sip



+ 10
- 10
data/macos/build-deps.sh View File

@@ -334,7 +334,7 @@ fi
# ---------------------------------------------------------------------------------------------------------------------
# build base libs

cleanup
# cleanup

export ARCH=32
build_base
@@ -351,7 +351,7 @@ export PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig
export PKG_CONFIG=${TARGETDIR}/carla64/bin/pkg-config

export CFLAGS="-O3 -mtune=generic -msse -msse2 -mfpmath=sse -fPIC -DPIC -DNDEBUG -I${PREFIX}/include -m64 -mmacosx-version-min=10.8"
export CXXFLAGS="${CFLAGS} -stdlib=libc++"
export CXXFLAGS="${CFLAGS} -std=gnu++11 -stdlib=libc++"
export LDFLAGS="-L${PREFIX}/lib -m64 -stdlib=libc++"

export MAKE=/usr/bin/make
@@ -441,9 +441,9 @@ QT59_ARGS="./configure -silent -prefix ${PREFIX} -plugindir ${PREFIX}/lib/qt5/pl
fi
make ${MAKE_ARGS}
make install
#ln -s ${PREFIX}/lib/QtCore.framework/Headers ${PREFIX}/include/qt5/QtCore
#ln -s ${PREFIX}/lib/QtGui.framework/Headers ${PREFIX}/include/qt5/QtGui
#ln -s ${PREFIX}/lib/QtWidgets.framework/Headers ${PREFIX}/include/qt5/QtWidgets
ln -s ${PREFIX}/lib/QtCore.framework/Headers ${PREFIX}/include/qt5/QtCore
ln -s ${PREFIX}/lib/QtGui.framework/Headers ${PREFIX}/include/qt5/QtGui
ln -s ${PREFIX}/lib/QtWidgets.framework/Headers ${PREFIX}/include/qt5/QtWidgets
#sed -i -e "s/ -lqtpcre/ /" ${PREFIX}/lib/pkgconfig/Qt5Core.pc
#sed -i -e "s/ '/ /" ${PREFIX}/lib/pkgconfig/Qt5Core.pc
#sed -i -e "s/ '/ /" ${PREFIX}/lib/pkgconfig/Qt5Core.pc
@@ -451,7 +451,7 @@ QT59_ARGS="./configure -silent -prefix ${PREFIX} -plugindir ${PREFIX}/lib/qt5/pl
#sed -i -e "s/ '/ /" ${PREFIX}/lib/pkgconfig/Qt5Gui.pc
#sed -i -e "s/ '/ /" ${PREFIX}/lib/pkgconfig/Qt5Widgets.pc
#sed -i -e "s/ '/ /" ${PREFIX}/lib/pkgconfig/Qt5Widgets.pc
#touch build-done
touch build-done
cd ..
fi

@@ -501,8 +501,8 @@ fi

if [ ! -f Python-${PYTHON_VERSION}/build-done ]; then
cd Python-${PYTHON_VERSION}
#sed -i -e "s/#zlib zlibmodule.c/zlib zlibmodule.c/" Modules/Setup.dist
./configure --prefix=${PREFIX}
sed -i -e "s/#zlib zlibmodule.c/zlib zlibmodule.c/" Modules/Setup.dist
./configure --prefix=${PREFIX} --enable-shared
make
make install
touch build-done
@@ -519,7 +519,7 @@ fi

if [ ! -f sip-${SIP_VERSION}/build-done ]; then
cd sip-${SIP_VERSION}
python3 configure.py
python3 configure.py # --sip-module PyQt5.sip
make ${MAKE_ARGS}
make install
touch build-done
@@ -536,7 +536,7 @@ fi

if [ ! -f PyQt5_gpl-${PYQT5_VERSION}/build-done ]; then
cd PyQt5_gpl-${PYQT5_VERSION}
python3 configure.py --confirm-license -c
python3 configure.py --concatenate --confirm-license -c
make ${MAKE_ARGS}
make install
touch build-done


+ 20
- 16
data/macos/build.sh View File

@@ -15,18 +15,18 @@ fi
# ---------------------------------------------------------------------------------------------------------------------
# set variables

PKG_FOLDER="Carla_2.1a1-macos"
PKG_FOLDER="Carla_2.1-RC1-macos"

source data/macos/common.env

export MACOS="true"

if [ $(clang -v 2>&1 | grep version | cut -d' ' -f4 | cut -d'.' -f1) -lt 9 ]; then
export MACOS_OLD="true"
export USING_JUCE="false"
else
export USING_JUCE="true"
fi
#if [ $(clang -v 2>&1 | grep version | cut -d' ' -f4 | cut -d'.' -f1) -lt 9 ]; then
# export MACOS_OLD="true"
# export USING_JUCE="false"
#else
export USING_JUCE="true"
#fi

export CC=clang
export CXX=clang++
@@ -36,29 +36,33 @@ unset CPPFLAGS
##############################################################################################
# Complete 64bit build

export CFLAGS="-I${TARGETDIR}/carla64/include -m64"
export CXXFLAGS="${CFLAGS}"
export LDFLAGS="-L${TARGETDIR}/carla64/lib -m64"
export CFLAGS="-I${TARGETDIR}/carla64/include -m64 -mmacosx-version-min=10.8"
export CXXFLAGS="${CFLAGS} -stdlib=libc++"
export LDFLAGS="-L${TARGETDIR}/carla64/lib -m64 -mmacosx-version-min=10.8"

export PATH=${TARGETDIR}/carla/bin:${TARGETDIR}/carla64/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
export PKG_CONFIG_PATH=${TARGETDIR}/carla/lib/pkgconfig:${TARGETDIR}/carla64/lib/pkgconfig

export MOC_QT5=moc
export RCC_QT5=rcc
export UIC_QT5=uic

make USING_JUCE=${USING_JUCE} ${MAKE_ARGS}

##############################################################################################
# Build 32bit bridges

export CFLAGS="-I${TARGETDIR}/carla32/include -m32"
export CXXFLAGS="${CFLAGS}"
export LDFLAGS="-L${TARGETDIR}/carla32/lib -m32"
export CFLAGS="-I${TARGETDIR}/carla32/include -m32 -mmacosx-version-min=10.8"
export CXXFLAGS="${CFLAGS} -stdlib=libc++"
export LDFLAGS="-L${TARGETDIR}/carla32/lib -m32 -mmacosx-version-min=10.8"

export PATH=${TARGETDIR}/carla32/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
export PKG_CONFIG_PATH=${TARGETDIR}/carla32/lib/pkgconfig

# FIXME install old xcode in new macos
if [ MACOS_OLD = "true" ]; then
make USING_JUCE=${USING_JUCE} posix32 ${MAKE_ARGS}
fi
#if [ MACOS_OLD = "true" ]; then
make USING_JUCE=${USING_JUCE} posix32 ${MAKE_ARGS}
#fi

##############################################################################################
# Build Mac App


+ 5
- 5
data/macos/common.env View File

@@ -18,14 +18,14 @@ PYLIBLO_VERSION=0.9.2
CXFREEZE_VERSION=5.1.1

if [ -n "$DEPS_NEW" ]; then
QT5_VERSION=5.12.4
QT5_MVERSION=5.12
QT5_VERSION=5.12.4
QT5_MVERSION=5.12
PYQT5_VERSION=5.13.1
SIP_VERSION=4.19.19
NUITKA_VERSION=0.6.4
NUITKA_VERSION=0.6.4
else
QT5_VERSION=5.9.8
QT5_MVERSION=5.9
QT5_VERSION=5.9.8
QT5_MVERSION=5.9
SIP_VERSION=4.19.13
PYQT5_VERSION=5.9.2
fi


+ 5
- 5
data/macos/env.sh View File

@@ -7,8 +7,8 @@ source data/macos/common.env

export CC=clang
export CXX=clang++
export CFLAGS="-I${TARGETDIR}/carla64/include -m64 -stdlib=libc++ -mmacosx-version-min=10.8"
export CXXFLAGS="${CFLAGS}"
export CFLAGS="-I${TARGETDIR}/carla64/include -m64 -mmacosx-version-min=10.8"
export CXXFLAGS="${CFLAGS} -stdlib=libc++"
export LDFLAGS="-L${TARGETDIR}/carla64/lib -m64 -stdlib=libc++"
unset CPPFLAGS

@@ -21,6 +21,6 @@ export MACOS="true"
export PATH=${TARGETDIR}/carla/bin:${TARGETDIR}/carla64/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
export PKG_CONFIG_PATH=${TARGETDIR}/carla/lib/pkgconfig:${TARGETDIR}/carla64/lib/pkgconfig

#export DEFAULT_QT=5
#export PYRCC5=$TARGETDIR/carla/bin/pyrcc5
#export PYUIC5=$TARGETDIR/carla/bin/pyuic5
export MOC_QT5=moc
export RCC_QT5=rcc
export UIC_QT5=uic

+ 7
- 0
source/Makefile.mk View File

@@ -323,6 +323,12 @@ PYUIC ?= $(PYUIC5)

ifeq ($(HAVE_QT5),true)
HAVE_THEME = true
else
ifeq ($(MACOS),true)
ifeq ($(HAVE_PYQT),true)
HAVE_THEME = true
endif
endif
endif

# ---------------------------------------------------------------------------------------------------------------------
@@ -517,6 +523,7 @@ JUCE_CORE_LIBS = -framework AppKit
JUCE_EVENTS_LIBS = -framework AppKit
JUCE_GRAPHICS_LIBS = -framework Cocoa -framework QuartzCore
JUCE_GUI_BASICS_LIBS = -framework Cocoa
JUCE_GUI_EXTRA_LIBS = -framework IOKit
else
RTAUDIO_FLAGS += -D__MACOSX_CORE__
RTAUDIO_LIBS += -framework CoreAudio


+ 10
- 0
source/theme/Makefile View File

@@ -26,6 +26,16 @@ ifeq ($(HAVE_QT5),true)
QT5_CXX_FLAGS = $(BUILD_CXX_FLAGS) $(shell pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets)
QT5_LINK_FLAGS = $(NON_STATIC_LINK_FLAGS) $(shell pkg-config --libs Qt5Core Qt5Gui Qt5Widgets)
QT5_STYLES_DIR = $(shell pkg-config --variable=libdir Qt5Core)/qt5/plugins/styles
else
ifeq ($(MACOS),true)
ifeq ($(HAVE_PYQT),true)
HAVE_QT5=true
MAC_BUILDS_PREFIX = ~/builds/carla
QT5_CXX_FLAGS = $(BUILD_CXX_FLAGS) -I $(MAC_BUILDS_PREFIX)/include/qt5
QT5_LINK_FLAGS = $(NON_STATIC_LINK_FLAGS) -F $(MAC_BUILDS_PREFIX)/lib -framework QtCore -framework QtGui -framework QtWidgets
QT5_STYLES_DIR = $(MAC_BUILDS_PREFIX)/lib/qt5/plugins/styles
endif
endif
endif

# ---------------------------------------------------------------------------------------------------------------------


Loading…
Cancel
Save