Browse Source

More OSX fixing, almost there

tags/1.9.4
falkTX 10 years ago
parent
commit
93b1a2cdfa
5 changed files with 97 additions and 75 deletions
  1. +52
    -30
      data/macos/build-deps.sh
  2. +37
    -39
      data/macos/build.sh
  3. +5
    -5
      data/macos/bundle.py
  4. +2
    -0
      source/bridges/Makefile
  5. +1
    -1
      source/carla_settings.py

+ 52
- 30
data/macos/build-deps.sh View File

@@ -194,7 +194,7 @@ cp -r qtbase5-mac10.6 qtbase5-mac10.6_64
cd qtbase5-mac10.6_64
export CFG_ARCH=x86_64
export QMAKESPEC=macx-clang
./configure -release -shared -opensource -confirm-license -force-pkg-config -platform macx-clang \
./configure -release -static -opensource -confirm-license -force-pkg-config -platform macx-clang \
-prefix $PREFIX -plugindir $PREFIX/lib/qt5/plugins -headerdir $PREFIX/include/qt5 \
-qt-freetype -qt-libjpeg -qt-libpng -qt-pcre -qt-sql-sqlite -qt-zlib -opengl no -qpa cocoa \
-no-directfb -no-eglfs -no-kms -no-linuxfb -no-mtdev -no-xcb -no-xcb-xlib \
@@ -219,15 +219,23 @@ export PREFIX=/opt/kxstudio
export PATH=$PREFIX/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig

export CFG_ARCH=x86_64
export QMAKESPEC=macx-clang

# ------------------------------------------------------------------------------------
# qt5-base download (5.2.1 for now)

if [ ! -d qtbase-opensource-src-5.2.1 ]; then
curl -O http://download.qt-project.org/official_releases/qt/5.2/5.2.1/submodules/qtbase-opensource-src-5.2.1.tar.gz
tar -xf qtbase-opensource-src-5.2.1.tar.gz
fi

# ------------------------------------------------------------------------------------
# qt5-base (regular, 64bit, shared, framework)

if [ ! -f qtbase5-mac10.6_shared/build-done ]; then
cp -r qtbase5-mac10.6 qtbase5-mac10.6_shared
cd qtbase5-mac10.6_shared
export CFG_ARCH=x86_64
export QMAKESPEC=macx-clang
./configure -release -shared -opensource -confirm-license -no-pkg-config -platform macx-clang -framework \
if [ ! -f qtbase-opensource-src-5.2.1/build-done ]; then
cd qtbase-opensource-src-5.2.1
./configure -release -shared -opensource -confirm-license -force-pkg-config -platform macx-clang -framework \
-prefix $PREFIX -plugindir $PREFIX/lib/qt5/plugins -headerdir $PREFIX/include/qt5 \
-qt-freetype -qt-libjpeg -qt-libpng -qt-pcre -qt-sql-sqlite -qt-zlib -opengl desktop -qpa cocoa \
-no-directfb -no-eglfs -no-kms -no-linuxfb -no-mtdev -no-xcb -no-xcb-xlib \
@@ -237,6 +245,26 @@ export QMAKESPEC=macx-clang
-no-compile-examples -nomake examples -nomake tests -make libs -make tools
make -j 2
sudo make install
sudo ln -s /opt/kxstudio/lib/QtCore.framework/Headers /opt/kxstudio/include/qt5/QtCore
sudo ln -s /opt/kxstudio/lib/QtGui.framework/Headers /opt/kxstudio/include/qt5/QtGui
sudo ln -s /opt/kxstudio/lib/QtWidgets.framework/Headers /opt/kxstudio/include/qt5/QtWidgets
touch build-done
cd ..
fi

# ------------------------------------------------------------------------------------
# qt5-mac-extras

if [ ! -d qtmacextras-opensource-src-5.2.1 ]; then
http://download.qt-project.org/official_releases/qt/5.2/5.2.1/submodules/qtmacextras-opensource-src-5.2.1.tar.gz
tar -xf qtmacextras-opensource-src-5.2.1.tar.gz
fi

if [ ! -f qtmacextras-opensource-src-5.2.1/build-done ]; then
cd qtmacextras-opensource-src-5.2.1
qmake
make -j 2
sudo make install
touch build-done
cd ..
fi
@@ -244,12 +272,13 @@ fi
# ------------------------------------------------------------------------------------
# qt5-svg

if [ ! -d qtsvg-opensource-src-5.3.0 ]; then
curl -O http://download.qt-project.org/official_releases/qt/5.3/5.3.0/submodules/qtsvg-opensource-src-5.3.0.tar.gz
if [ ! -d qtsvg-opensource-src-5.2.1 ]; then
curl -O http://download.qt-project.org/official_releases/qt/5.2/5.2.1/submodules/qtsvg-opensource-src-5.2.1.tar.gz
tar -xf qtsvg-opensource-src-5.2.1.tar.gz
fi

if [ ! -f qtsvg-opensource-src-5.3.0/build-done ]; then
cd qtsvg-opensource-src-5.3.0
if [ ! -f qtsvg-opensource-src-5.2.1/build-done ]; then
cd qtsvg-opensource-src-5.2.1
qmake
make -j 2
sudo make install
@@ -277,13 +306,13 @@ fi
# ------------------------------------------------------------------------------------
# sip

if [ ! -d sip-4.16-snapshot-f6acb8ed7b65 ]; then
curl -O http://www.riverbankcomputing.co.uk/static/Downloads/sip4/sip-4.16-snapshot-f6acb8ed7b65.tar.gz
tar -xf sip-4.16-snapshot-f6acb8ed7b65.tar.gz
if [ ! -d sip-4.15.5 ]; then
curl -L http://sourceforge.net/projects/pyqt/files/sip/sip-4.15.5/sip-4.15.5.tar.gz -o sip-4.15.5.tar.gz
tar -xf sip-4.15.5.tar.gz
fi

if [ ! -f sip-4.16-snapshot-f6acb8ed7b65/build-done ]; then
cd sip-4.16-snapshot-f6acb8ed7b65
if [ ! -f sip-4.15.5/build-done ]; then
cd sip-4.15.5
python3 configure.py
make
sudo make install
@@ -294,13 +323,13 @@ fi
# ------------------------------------------------------------------------------------
# pyqt5

if [ ! -d PyQt-gpl-5.3-snapshot-f6e83c05f2a1 ]; then
curl -O http://www.riverbankcomputing.co.uk/static/Downloads/PyQt5/PyQt-gpl-5.3-snapshot-f6e83c05f2a1.tar.gz
tar -xf PyQt-gpl-5.3-snapshot-f6e83c05f2a1.tar.gz
if [ ! -d PyQt-gpl-5.2.1 ]; then
curl -L http://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-5.2.1/PyQt-gpl-5.2.1.tar.gz -o PyQt-gpl-5.2.1.tar.gz
tar -xf PyQt-gpl-5.2.1.tar.gz
fi

if [ ! -f PyQt-gpl-5.3-snapshot-f6e83c05f2a1/build-done ]; then
cd PyQt-gpl-5.3-snapshot-f6e83c05f2a1
if [ ! -f PyQt-gpl-5.2.1/build-done ]; then
cd PyQt-gpl-5.2.1
python3 configure.py --confirm-license
make
sudo make install
@@ -308,8 +337,6 @@ touch build-done
cd ..
fi

exit 0

# ------------------------------------------------------------------------------------
# cxfreeze

@@ -318,8 +345,9 @@ curl -L http://download.sourceforge.net/cx-freeze/cx_Freeze-4.3.3.tar.gz -o cx_F
tar -xf cx_Freeze-4.3.3.tar.gz
fi

if [ ! -d cx_Freeze-4.3.3/build-done ]; then
if [ ! -f cx_Freeze-4.3.3/build-done ]; then
cd cx_Freeze-4.3.3
sed -i -e 's/"python%s.%s"/"python%s.%sm"/' setup.py
python3 setup.py build
sudo python3 setup.py install --prefix=$PREFIX
touch build-done
@@ -327,9 +355,3 @@ cd ..
fi

# ------------------------------------------------------------------------------------
# switch back to gcc

export CC=gcc
export CXX=g++

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

+ 37
- 39
data/macos/build.sh View File

@@ -13,49 +13,47 @@ export CC=clang
export CXX=clang++
export CXFREEZE=/opt/kxstudio/bin/cxfreeze

# Build python stuff
export PATH=/opt/kxstudio/bin:/opt/kxstudio64/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
export PKG_CONFIG_PATH=/opt/kxstudio64/lib/pkgconfig
# # Build python stuff
# export PATH=/opt/kxstudio/bin:/opt/kxstudio64/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
# export PKG_CONFIG_PATH=/opt/kxstudio/lib/pkgconfig:/opt/kxstudio64/lib/pkgconfig
# make $JOBS UI RES WIDGETS

# Build theme
rm -rf incs
mkdir incs
ln -s /opt/kxstudio/lib/QtCore.framework/Headers incs/QtCore
ln -s /opt/kxstudio/lib/QtGui.framework/Headers incs/QtGui
ln -s /opt/kxstudio/lib/QtWidgets.framework/Headers incs/QtWidgets
export CXXFLAGS="-I`pwd`/incs"
export LDFLAGS="-F/opt/kxstudio/lib/ -framework QtCore -framework QtGui -framework QtWidgets"
make $JOBS theme
rm -rf incs
unset CXXFLAGS
unset LDFLAGS
exit 0

# Build backend
export PATH=/opt/kxstudio64/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
export PKG_CONFIG_PATH=/opt/kxstudio64/lib/pkgconfig
make $JOBS backend discovery plugin

cd ../..
exit 0
#
# # Build theme
# make -C source/modules/theme clean
# make $JOBS theme
#
# # Build everything else
# export PATH=/opt/kxstudio64/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
# export PKG_CONFIG_PATH=/opt/kxstudio64/lib/pkgconfig
# make backend $JOBS
# make $JOBS

# Build Mac App
rm -rf ./data/macos/Carla
export PATH=/opt/kxstudio/bin:/opt/kxstudio64/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
export PYTHONPATH=`pwd`/source
unset PKG_CONFIG_PATH

# cd source
rm -rf ./build

cp ./source/carla ./source/Carla.pyw
python3 ./data/macos/bundle.py bdist_mac --bundle-name=Carla
rm ./source/Carla.pyw

cp ./source/carla ./source/carla.pyw
# python3 ./data/macos/bundle.py bdist_mac --bundle-name=Carla
$CXFREEZE --include-modules=re,sip,subprocess,inspect --target-dir=./data/macos/Carla ./source/carla.pyw
rm ./source/carla.pyw
cd build

cd data/macos
mkdir Carla.app/Contents/MacOS/backend
mkdir Carla.app/Contents/MacOS/bridges
mkdir Carla.app/Contents/MacOS/discovery
cp ../source/backend/*.dylib Carla.app/Contents/MacOS/backend/
cp ../source/bridges/carla-bridge-* Carla.app/Contents/MacOS/bridges/
cp ../source/discovery/carla-discovery-* Carla.app/Contents/MacOS/discovery/
cp -r ../source/modules/theme/styles Carla.app/Contents/MacOS/

mkdir Carla/backend
mkdir Carla/bridges
mkdir Carla/discovery
cp ../../source/backend/*.dylib Carla/backend/
cp ../../source/bridges/carla-bridge-* Carla/bridges/
cp ../../source/discovery/carla-discovery-* Carla/discovery/
cp -r ../../source/modules/theme/styles Carla/
cd Carla.app/Contents/MacOS/styles
install_name_tool -change "/opt/kxstudio/lib/QtCore.framework/Versions/5/QtCore" @loader_path/../QtCore carlastyle.dylib
install_name_tool -change "/opt/kxstudio/lib/QtGui.framework/Versions/5/QtGui" @loader_path/../QtGui carlastyle.dylib
install_name_tool -change "/opt/kxstudio/lib/QtWidgets.framework/Versions/5/QtWidgets" @loader_path/../QtWidgets carlastyle.dylib
cd ../../../..

cd ../..
cd ..

+ 5
- 5
data/macos/bundle.py View File

@@ -9,18 +9,18 @@ from cx_Freeze import setup, Executable
# ------------------------------------------------------------------------------------------------------------
# Imports (Custom Stuff)

# from carla_host import *
from carla_host import *

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

options = {
options = {
"packages": ["re", "sip", "subprocess", "inspect"]
}

setup(name = "Carla",
version = "1.9.3",
version = VERSION,
description = "Carla Plugin Host",
options = {"bdist_exe": options},
executables = [Executable("./source/carla.pyw")])
options = {"build_exe": options},
executables = [Executable("./source/Carla.pyw")])

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

+ 2
- 0
source/bridges/Makefile View File

@@ -172,6 +172,7 @@ LINK_UI_VST_X11_FLAGS = $(LINK_UI_FLAGS) -ldl

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

ifneq ($(MACOS_OR_WIN32),true)
ifeq ($(HAVE_GTK2),true)
TARGETS += ui_lv2-gtk2
endif
@@ -187,6 +188,7 @@ endif
ifeq ($(HAVE_QT5),true)
TARGETS += ui_lv2-qt5
endif
endif

ifeq ($(HAVE_X11),true)
# TARGETS += ui_lv2-x11


+ 1
- 1
source/carla_settings.py View File

@@ -849,7 +849,7 @@ if __name__ == '__main__':

initHost("Settings", None, False)

gui = CarlaSettingsW(None, True, True)
gui = CarlaSettingsW(None, True, True, True)
gui.show()

sys.exit(app.exec_())

Loading…
Cancel
Save