Browse Source

More osx stuff

tags/1.9.4
falkTX 10 years ago
parent
commit
cd85b5bc27
4 changed files with 57 additions and 52 deletions
  1. +46
    -44
      data/macos/build.sh
  2. +5
    -5
      source/bridges-plugin/Makefile
  3. +2
    -1
      source/carla_style.py
  4. +4
    -2
      source/utils/CarlaLv2Utils.hpp

+ 46
- 44
data/macos/build.sh View File

@@ -13,6 +13,9 @@ export CC=clang
export CXX=clang++
export CXFREEZE="/opt/carla/bin/cxfreeze --include-modules=re,sip,subprocess,inspect"

##############################################################################################
# Complete 64bit build

export CFLAGS=-m64
export CXXFLAGS=-m64
export LDLAGS=-m64
@@ -20,32 +23,28 @@ export LDLAGS=-m64
export PATH=/opt/carla/bin:/opt/carla64/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
export PKG_CONFIG_PATH=/opt/carla/lib/pkgconfig:/opt/carla64/lib/pkgconfig

make libs

exit
# make $JOBS

##############################################################################################
# Build 32bit bridges
export PATH=/opt/carla/bin:/opt/carla64/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
export PKG_CONFIG_PATH=/opt/carla/lib/pkgconfig:/opt/carla64/lib/pkgconfig

# clean?
# make clean
export CFLAGS=-m32
export CXXFLAGS=-m32
export LDLAGS=-m32

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

# Build theme
make $JOBS theme

# Build everything else
export PATH=/opt/carla64/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
export PKG_CONFIG_PATH=/opt/carla64/lib/pkgconfig
make backend $JOBS
make $JOBS
# make posix32 $JOBS

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

export PATH=/opt/carla/bin:/opt/carla64/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
export PYTHONPATH=`pwd`/source
unset CFLAGS
unset CXXFLAGS
unset LDLAGS
unset PKG_CONFIG_PATH

# cd source
@@ -55,46 +54,49 @@ cp ./source/carla ./source/Carla.pyw
python3 ./data/macos/bundle.py bdist_mac --bundle-name=Carla
rm ./source/Carla.pyw

cp ./source/carla-plugin ./source/carla-plugin.pyw
cp ./source/modules/native-plugins/resources/bigmeter-ui ./source/bigmeter-ui.pyw
cp ./source/modules/native-plugins/resources/notes-ui ./source/notes-ui.pyw
$CXFREEZE --target-dir=./build/plugin/ ./source/carla-plugin.pyw
$CXFREEZE --target-dir=./build/plugin/ ./source/bigmeter-ui.pyw
$CXFREEZE --target-dir=./build/plugin/ ./source/notes-ui.pyw
rm ./source/*.pyw
#cp ./source/modules/native-plugins/resources/carla-plugin ./source/carla-plugin.pyw
#cp ./source/modules/native-plugins/resources/bigmeter-ui ./source/bigmeter-ui.pyw
#cp ./source/modules/native-plugins/resources/notes-ui ./source/notes-ui.pyw
#$CXFREEZE --target-dir=./build/plugin/ ./source/carla-plugin.pyw
#$CXFREEZE --target-dir=./build/plugin/ ./source/bigmeter-ui.pyw
#$CXFREEZE --target-dir=./build/plugin/ ./source/notes-ui.pyw
#rm ./source/*.pyw

cd build

mkdir Carla.app/Contents/MacOS/backend
mkdir Carla.app/Contents/MacOS/bridges
mkdir Carla.app/Contents/MacOS/discovery
mkdir Carla.app/Contents/MacOS/styles
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 ../source/modules/theme/styles/* Carla.app/Contents/MacOS/styles/
cp -r ../source/modules/native-plugins/resources Carla.app/Contents/MacOS/
mkdir -p Carla.app/Contents/MacOS
mkdir -p Carla.app/Contents/MacOS/styles
cp ../bin/*.dylib Carla.app/Contents/MacOS/
cp ../bin/carla-bridge-* Carla.app/Contents/MacOS/
cp ../bin/carla-discovery-* Carla.app/Contents/MacOS/
cp ../bin/styles/* Carla.app/Contents/MacOS/styles/
#cp -r ../bin/resources Carla.app/Contents/MacOS/

find . -type f -name "*.py" -delete
mv plugin/* Carla.app/Contents/MacOS/resources/
rmdir plugin
#find . -type f -name "*.py" -delete
#mv plugin/* Carla.app/Contents/MacOS/resources/
#rmdir plugin

cd Carla.app/Contents/MacOS/styles
install_name_tool -change "/opt/carla/lib/QtCore.framework/Versions/5/QtCore" @loader_path/../QtCore carlastyle.dylib
install_name_tool -change "/opt/carla/lib/QtGui.framework/Versions/5/QtGui" @loader_path/../QtGui carlastyle.dylib
install_name_tool -change "/opt/carla/lib/QtWidgets.framework/Versions/5/QtWidgets" @loader_path/../QtWidgets carlastyle.dylib
install_name_tool -change "/opt/carla/lib/QtCore.framework/Versions/5/QtCore" @executable_path/QtCore carlastyle.dylib
install_name_tool -change "/opt/carla/lib/QtGui.framework/Versions/5/QtGui" @executable_path/QtGui carlastyle.dylib
install_name_tool -change "/opt/carla/lib/QtWidgets.framework/Versions/5/QtWidgets" @executable_path/QtWidgets carlastyle.dylib
cd ../../../..

exit

mkdir ../build-lv2
cd ../build-lv2

cp -r ../source/plugin/carla-native.lv2/ carla-native.lv2
cp -r ../bin/carla-native.lv2/ carla-native.lv2
rm -r ./carla-native.lv2/resources
cp -r ../build/Carla.app/Contents/MacOS/resources/ carla-native.lv2/resources

mkdir carla-native.lv2/resources/styles
cp ../source/bridges/carla-bridge-* carla-native.lv2/resources/
cp ../source/discovery/carla-discovery-* carla-native.lv2/resources/
cp ../build/Carla.app/Contents/MacOS/styles/* carla-native.lv2/resources/styles/
rm -rf carla-native.lv2/styles
mkdir carla-native.lv2/styles
cp ../bin/carla-bridge-* carla-native.lv2/
cp ../bin/carla-discovery-* carla-native.lv2/
cp ../build/Carla.app/Contents/MacOS/styles/* carla-native.lv2/styles/

cd ..

##############################################################################################

+ 5
- 5
source/bridges-plugin/Makefile View File

@@ -161,7 +161,7 @@ LIBS_NATIVE += \
endif

../../bin/carla-bridge-native: $(OBJS_NATIVE) $(LIBS_NATIVE)
$(CXX) $(OBJS_NATIVE) -Wl,--start-group $(LIBS_NATIVE) -Wl,--end-group $(NATIVE_LINK_FLAGS) -o $@
$(CXX) $(OBJS_NATIVE) $(LIBS_START) $(LIBS_NATIVE) $(LIBS_END) $(NATIVE_LINK_FLAGS) -o $@

%__native.o: %.cpp
$(CXX) $< $(NATIVE_BUILD_FLAGS) -c -o $@
@@ -219,7 +219,7 @@ LIBS_POSIX32 += \
endif

../../bin/carla-bridge-posix32: $(OBJS_POSIX32) $(LIBS_POSIX32)
$(CXX) $(OBJS_POSIX32) -Wl,--start-group $(LIBS_POSIX32) -Wl,--end-group $(POSIX_LINK_FLAGS) $(POSIX_32BIT_FLAGS) -o $@
$(CXX) $(OBJS_POSIX32) $(LIBS_START) $(LIBS_POSIX32) $(LIBS_END) $(POSIX_LINK_FLAGS) $(POSIX_32BIT_FLAGS) -o $@

%__posix32.o: %.cpp
$(CXX) $< $(POSIX_BUILD_FLAGS) $(POSIX_32BIT_FLAGS) -c -o $@
@@ -277,7 +277,7 @@ LIBS_POSIX64 += \
endif

../../bin/carla-bridge-posix64: $(OBJS_POSIX64) $(LIBS_POSIX64)
$(CXX) $(OBJS_POSIX64) -Wl,--start-group $(LIBS_POSIX64) -Wl,--end-group $(POSIX_LINK_FLAGS) $(POSIX_64BIT_FLAGS) -o $@
$(CXX) $(OBJS_POSIX64) $(LIBS_START) $(LIBS_POSIX64) $(LIBS_END) $(POSIX_LINK_FLAGS) $(POSIX_64BIT_FLAGS) -o $@

%__posix64.o: %.cpp
$(CXX) $< $(POSIX_BUILD_FLAGS) $(POSIX_64BIT_FLAGS) -c -o $@
@@ -332,7 +332,7 @@ LIBS_WIN32 += \
../modules/juce_gui_basics.win32.a

../../bin/carla-bridge-win32.exe: $(OBJS_WIN32) $(LIBS_WIN32) ../modules/jackbridge-win32.dll
$(CXX) $(OBJS_WIN32) -Wl,--start-group $(LIBS_WIN32) -Wl,--end-group $(WIN_LINK_FLAGS) $(WIN_32BIT_FLAGS) -ljackbridge-win32 -o $@
$(CXX) $(OBJS_WIN32) $(LIBS_START) $(LIBS_WIN32) $(LIBS_END) $(WIN_LINK_FLAGS) $(WIN_32BIT_FLAGS) -ljackbridge-win32 -o $@

%__win32.o: %.cpp
$(CXX) $< $(WIN_BUILD_FLAGS) $(WIN_32BIT_FLAGS) -c -o $@
@@ -387,7 +387,7 @@ LIBS_WIN64 += \
../modules/juce_gui_basics.win64.a

../../bin/carla-bridge-win64.exe: $(OBJS_WIN64) $(LIBS_WIN64) ../modules/jackbridge-win64.dll
$(CXX) $(OBJS_WIN64) -Wl,--start-group $(LIBS_WIN64) -Wl,--end-group $(WIN_LINK_FLAGS) $(WIN_64BIT_FLAGS) -ljackbridge-win64 -o $@
$(CXX) $(OBJS_WIN64) $(LIBS_START) $(LIBS_WIN64) $(LIBS_END) $(WIN_LINK_FLAGS) $(WIN_64BIT_FLAGS) -ljackbridge-win64 -o $@

%__win64.o: %.cpp
$(CXX) $< $(WIN_BUILD_FLAGS) $(WIN_64BIT_FLAGS) -c -o $@


+ 2
- 1
source/carla_style.py View File

@@ -42,6 +42,7 @@ from carla_shared import *
class CarlaApplication(object):
def __init__(self, appName = "Carla2", libPrefix = None):
object.__init__(self)
print("on init")

# try to find styles dir
stylesDir = ""
@@ -92,7 +93,7 @@ class CarlaApplication(object):
QApplication.setFont(customFont)

# fix Qt5 not finding plarform dir on Windows
if WINDOWS:
if MACOS or WINDOWS:
QApplication.addLibraryPath(CWD)

# set style


+ 4
- 2
source/utils/CarlaLv2Utils.hpp View File

@@ -20,8 +20,10 @@

#include "CarlaUtils.hpp"

#undef NULL
#define NULL nullptr
#ifndef nullptr
# undef NULL
# define NULL nullptr
#endif

#include "lv2/lv2.h"
#include "lv2/atom.h"


Loading…
Cancel
Save