Browse Source

Fixup macOS 10.12 packaging

tags/v2.2.0-RC1
falkTX 4 years ago
parent
commit
078ae2be46
4 changed files with 68 additions and 3 deletions
  1. +16
    -0
      data/macos/Carla-Control_Info.plist
  2. +16
    -0
      data/macos/Carla_Info.plist
  3. +30
    -2
      data/macos/build.sh
  4. +6
    -1
      data/macos/bundle.py

+ 16
- 0
data/macos/Carla-Control_Info.plist View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>CarlaControl</string>
<key>CFBundleIconFile</key>
<string>icon.icns</string>
<key>CFBundleIdentifier</key>
<string>CarlaControl</string>
<key>NSHighResolutionCapable</key>
<true/>
</dict>
</plist>

+ 16
- 0
data/macos/Carla_Info.plist View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>Carla</string>
<key>CFBundleIconFile</key>
<string>icon.icns</string>
<key>CFBundleIdentifier</key>
<string>Carla</string>
<key>NSHighResolutionCapable</key>
<true/>
</dict>
</plist>

+ 30
- 2
data/macos/build.sh View File

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

PKG_FOLDER="Carla_2.1-macos"
PKG_FOLDER="Carla_2.2b-macos"

source data/macos/common.env

@@ -113,7 +113,6 @@ rm -f build/Carla.app/Contents/MacOS/carla-bridge-lv2-modgui
rm -f build/Carla.app/Contents/MacOS/carla-bridge-lv2-qt5

find build/ -type f -name "*.py" -delete
find build/ -type f -name "*.pyc" -delete
find build/ -type f -name "*.pyi" -delete
find build/ -type f -name "pylupdate.so" -delete
find build/ -type f -name "pyrcc.so" -delete
@@ -122,6 +121,9 @@ find build/ -type f -name "QtNetwork*" -delete
find build/ -type f -name "QtSql*" -delete
find build/ -type f -name "QtTest*" -delete
find build/ -type f -name "QtXml*" -delete
if [ "${MACOS_VERSION_MIN}" != "10.12" ]; then
find build/ -type f -name "*.pyc" -delete
fi
rm -rf build/Carla.app/Contents/MacOS/lib/PyQt5/uic
rm -rf build/Carla.app/Contents/MacOS/resources/__pycache__
rm -rf build/Carla.app/Contents/MacOS/resources/patchcanvas
@@ -132,10 +134,17 @@ rm -rf build/Carla-Control.app/Contents/MacOS/resources/__pycache__
# missed by cx-freeze
mkdir build/Carla.app/Contents/MacOS/iconengines
cp ${TARGETDIR}/carla/lib/qt5/plugins/iconengines/libqsvgicon.dylib build/Carla.app/Contents/MacOS/iconengines/
if [ "${MACOS_VERSION_MIN}" = "10.12" ]; then
mkdir build/Carla.app/Contents/MacOS/imageformats
mkdir build/Carla.app/Contents/MacOS/platforms
cp ${TARGETDIR}/carla/lib/qt5/plugins/imageformats/libq{jpeg,svg}.dylib build/Carla.app/Contents/MacOS/imageformats/
cp ${TARGETDIR}/carla/lib/qt5/plugins/platforms/libq{cocoa,minimal,offscreen}.dylib build/Carla.app/Contents/MacOS/platforms/
fi

# continuing...
cd build/Carla.app/Contents/MacOS
for f in `find . -type f | grep -e Q -e libq -e carlastyle.dylib`; do
if [ "${MACOS_VERSION_MIN}" = "10.12" ] && (echo "$f" | grep -q pyc); then continue; fi
install_name_tool -change "@rpath/QtCore.framework/Versions/5/QtCore" @executable_path/QtCore $f
install_name_tool -change "@rpath/QtGui.framework/Versions/5/QtGui" @executable_path/QtGui $f
install_name_tool -change "@rpath/QtOpenGL.framework/Versions/5/QtOpenGL" @executable_path/QtOpenGL $f
@@ -144,10 +153,20 @@ install_name_tool -change "@rpath/QtSvg.framework/Versions/5/QtSvg"
install_name_tool -change "@rpath/QtWidgets.framework/Versions/5/QtWidgets" @executable_path/QtWidgets $f
install_name_tool -change "@rpath/QtMacExtras.framework/Versions/5/QtMacExtras" @executable_path/QtMacExtras $f
done
if [ "${MACOS_VERSION_MIN}" = "10.12" ]; then
cp ${TARGETDIR}/carla/lib/QtCore.framework/Versions/5/QtCore .
cp ${TARGETDIR}/carla/lib/QtGui.framework/Versions/5/QtGui .
cp ${TARGETDIR}/carla/lib/QtOpenGL.framework/Versions/5/QtOpenGL .
cp ${TARGETDIR}/carla/lib/QtPrintSupport.framework/Versions/5/QtPrintSupport .
cp ${TARGETDIR}/carla/lib/QtSvg.framework/Versions/5/QtSvg .
cp ${TARGETDIR}/carla/lib/QtWidgets.framework/Versions/5/QtWidgets .
cp ${TARGETDIR}/carla/lib/QtMacExtras.framework/Versions/5/QtMacExtras .
fi
cd ../../../..

cd build/Carla-Control.app/Contents/MacOS
for f in `find . -type f | grep -e Q -e libq -e carlastyle.dylib`; do
if [ "${MACOS_VERSION_MIN}" = "10.12" ] && (echo "$f" | grep -q pyc); then continue; fi
install_name_tool -change "@rpath/QtCore.framework/Versions/5/QtCore" @executable_path/QtCore $f
install_name_tool -change "@rpath/QtGui.framework/Versions/5/QtGui" @executable_path/QtGui $f
install_name_tool -change "@rpath/QtOpenGL.framework/Versions/5/QtOpenGL" @executable_path/QtOpenGL $f
@@ -156,6 +175,15 @@ install_name_tool -change "@rpath/QtSvg.framework/Versions/5/QtSvg"
install_name_tool -change "@rpath/QtWidgets.framework/Versions/5/QtWidgets" @executable_path/QtWidgets $f
install_name_tool -change "@rpath/QtMacExtras.framework/Versions/5/QtMacExtras" @executable_path/QtMacExtras $f
done
if [ "${MACOS_VERSION_MIN}" = "10.12" ]; then
cp ${TARGETDIR}/carla/lib/QtCore.framework/Versions/5/QtCore .
cp ${TARGETDIR}/carla/lib/QtGui.framework/Versions/5/QtGui .
cp ${TARGETDIR}/carla/lib/QtOpenGL.framework/Versions/5/QtOpenGL .
cp ${TARGETDIR}/carla/lib/QtPrintSupport.framework/Versions/5/QtPrintSupport .
cp ${TARGETDIR}/carla/lib/QtSvg.framework/Versions/5/QtSvg .
cp ${TARGETDIR}/carla/lib/QtWidgets.framework/Versions/5/QtWidgets .
cp ${TARGETDIR}/carla/lib/QtMacExtras.framework/Versions/5/QtMacExtras .
fi
cd ../../../..

mv build/carla-plugin.app/Contents/MacOS/carla-plugin build/Carla.app/Contents/MacOS/resources/


+ 6
- 1
data/macos/bundle.py View File

@@ -14,6 +14,8 @@ from carla_host import VERSION

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

SCRIPT_NAME = getenv("SCRIPT_NAME")

options = {
"zip_include_packages": ["*"],
"zip_exclude_packages": ["PyQt5"],
@@ -25,10 +27,13 @@ boptions = {
"iconfile": "./resources/ico/carla.icns"
}

if SCRIPT_NAME in ("Carla", "Carla-Control"):
boptions["custom_info_plist"] = "./data/macos/%s_Info.plist" % SCRIPT_NAME

setup(name = "Carla",
version = VERSION,
description = "Carla Plugin Host",
options = {"build_exe": options, "bdist_mac": boptions},
executables = [Executable("./source/frontend/%s.pyw" % getenv("SCRIPT_NAME"))])
executables = [Executable("./source/frontend/%s.pyw" % SCRIPT_NAME)])

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

Loading…
Cancel
Save