Browse Source

A few more windows build preparations, all WIP

tags/v2.1-rc1
falkTX 5 years ago
parent
commit
8f0adcdec2
9 changed files with 69 additions and 68 deletions
  1. +3
    -3
      data/windows/app-console.py
  2. +3
    -3
      data/windows/app-gui.py
  3. +10
    -6
      data/windows/build-pyqt.sh
  4. +0
    -2
      data/windows/build-win.sh
  5. +47
    -46
      data/windows/pack-win.sh
  6. +5
    -5
      source/frontend/carla_app.py
  7. +0
    -1
      source/frontend/carla_database.py
  8. +0
    -1
      source/frontend/ladspa_rdf.py
  9. +1
    -1
      source/frontend/patchcanvas/__init__.py

+ 3
- 3
data/windows/app-console.py View File

@@ -14,12 +14,12 @@ from carla_host import VERSION
# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------


options = { options = {
"icon": ".\\resources\\ico\\carla.ico",
#"icon": ".\\resources\\ico\\carla.ico",
"packages": [], "packages": [],
"includes": ["re", "sip", "subprocess", "inspect"],
"includes": ["re", "subprocess", "inspect"],
"build_exe": ".\\data\\windows\\Carla\\", "build_exe": ".\\data\\windows\\Carla\\",
"optimize": True, "optimize": True,
"compressed": True
#"compressed": True
} }


setup(name = "Carla", setup(name = "Carla",


+ 3
- 3
data/windows/app-gui.py View File

@@ -14,12 +14,12 @@ from carla_host import VERSION
# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------


options = { options = {
"icon": ".\\resources\\ico\\carla.ico",
#"icon": ".\\resources\\ico\\carla.ico",
"packages": [], "packages": [],
"includes": ["re", "sip", "subprocess", "inspect"],
"includes": ["re", "subprocess", "inspect"],
"build_exe": ".\\data\\windows\\Carla\\", "build_exe": ".\\data\\windows\\Carla\\",
"optimize": True, "optimize": True,
"compressed": True
#"compressed": True
} }


setup(name = "Carla", setup(name = "Carla",


+ 10
- 6
data/windows/build-pyqt.sh View File

@@ -117,9 +117,11 @@ pushd "${PKGDIR}"
# wget -c http://repo.msys2.org/mingw/i686/mingw-w64-i686-libwebp-1.0.3-1-any.pkg.tar.xz # wget -c http://repo.msys2.org/mingw/i686/mingw-w64-i686-libwebp-1.0.3-1-any.pkg.tar.xz
# wget -c http://repo.msys2.org/mingw/i686/mingw-w64-i686-libxml2-2.9.9-2-any.pkg.tar.xz # wget -c http://repo.msys2.org/mingw/i686/mingw-w64-i686-libxml2-2.9.9-2-any.pkg.tar.xz
# wget -c http://repo.msys2.org/mingw/i686/mingw-w64-i686-libxslt-1.1.33-1-any.pkg.tar.xz # wget -c http://repo.msys2.org/mingw/i686/mingw-w64-i686-libxslt-1.1.33-1-any.pkg.tar.xz
wget -c http://repo.msys2.org/mingw/i686/mingw-w64-i686-xz-5.2.4-1-any.pkg.tar.xz
wget -c http://repo.msys2.org/mingw/i686/mingw-w64-i686-jasper-2.0.16-1-any.pkg.tar.xz
wget -c http://repo.msys2.org/mingw/i686/mingw-w64-i686-libtiff-4.0.9-2-any.pkg.tar.xz
# wget -c http://repo.msys2.org/mingw/i686/mingw-w64-i686-xz-5.2.4-1-any.pkg.tar.xz
# wget -c http://repo.msys2.org/mingw/i686/mingw-w64-i686-jasper-2.0.16-1-any.pkg.tar.xz
# wget -c http://repo.msys2.org/mingw/i686/mingw-w64-i686-libtiff-4.0.9-2-any.pkg.tar.xz
# wget -c http://repo.msys2.org/mingw/i686/mingw-w64-i686-python3-nuitka-0.6.4-1-any.pkg.tar.xz
wget -c http://repo.msys2.org/mingw/i686/mingw-w64-i686-python3-cx_Freeze-5.1.1-3-any.pkg.tar.xz


# wget -c # wget -c


@@ -168,9 +170,11 @@ pushd "${TARGETDIR}/msys2-${CPUARCH}"
# tar xf "${PKGDIR}/mingw-w64-i686-libwebp-1.0.3-1-any.pkg.tar.xz" # tar xf "${PKGDIR}/mingw-w64-i686-libwebp-1.0.3-1-any.pkg.tar.xz"
# tar xf "${PKGDIR}/mingw-w64-i686-libxml2-2.9.9-2-any.pkg.tar.xz" # tar xf "${PKGDIR}/mingw-w64-i686-libxml2-2.9.9-2-any.pkg.tar.xz"
# tar xf "${PKGDIR}/mingw-w64-i686-libxslt-1.1.33-1-any.pkg.tar.xz" # tar xf "${PKGDIR}/mingw-w64-i686-libxslt-1.1.33-1-any.pkg.tar.xz"
tar xf "${PKGDIR}/mingw-w64-i686-xz-5.2.4-1-any.pkg.tar.xz"
tar xf "${PKGDIR}/mingw-w64-i686-jasper-2.0.16-1-any.pkg.tar.xz"
tar xf "${PKGDIR}/mingw-w64-i686-libtiff-4.0.9-2-any.pkg.tar.xz"
# tar xf "${PKGDIR}/mingw-w64-i686-xz-5.2.4-1-any.pkg.tar.xz"
# tar xf "${PKGDIR}/mingw-w64-i686-jasper-2.0.16-1-any.pkg.tar.xz"
# tar xf "${PKGDIR}/mingw-w64-i686-libtiff-4.0.9-2-any.pkg.tar.xz"
# tar xf "${PKGDIR}/mingw-w64-i686-python3-nuitka-0.6.4-1-any.pkg.tar.xz"
tar xf "${PKGDIR}/mingw-w64-i686-python3-cx_Freeze-5.1.1-3-any.pkg.tar.xz"


# tar xf "${PKGDIR}/" # tar xf "${PKGDIR}/"




+ 0
- 2
data/windows/build-win.sh View File

@@ -82,8 +82,6 @@ export WINEARCH=win${ARCH}
export WINEDEBUG=-all export WINEDEBUG=-all
export WINEPREFIX=~/.winepy3_x${ARCH} export WINEPREFIX=~/.winepy3_x${ARCH}
export PYTHON_EXE="wine ${MSYS2_PREFIX}/bin/python.exe" export PYTHON_EXE="wine ${MSYS2_PREFIX}/bin/python.exe"

# export CXFREEZE="$PYTHON_EXE C:\\\\Python34\\\\Scripts\\\\cxfreeze"
export PYRCC="$PYTHON_EXE -m PyQt5.pyrcc_main" export PYRCC="$PYTHON_EXE -m PyQt5.pyrcc_main"
export PYUIC="$PYTHON_EXE -m PyQt5.uic.pyuic" export PYUIC="$PYTHON_EXE -m PyQt5.uic.pyuic"




+ 47
- 46
data/windows/pack-win.sh View File

@@ -53,8 +53,10 @@ local _ARCH_PREFIX="${2}"
local _MINGW_PREFIX="${3}-w64-mingw32" local _MINGW_PREFIX="${3}-w64-mingw32"


export PREFIX=${TARGETDIR}/carla-w${_ARCH_PREFIX} export PREFIX=${TARGETDIR}/carla-w${_ARCH_PREFIX}
export PATH=/opt/mingw${_ARCH}/bin:${PREFIX}/bin/usr/sbin:/usr/bin:/sbin:/bin
export PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig
export MSYS2_PREFIX="${TARGETDIR}/msys2-${CPUARCH}/mingw${ARCH}"

export PATH=${PREFIX}/bin:/usr/sbin:/usr/bin:/sbin:/bin
export PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig:${MSYS2_PREFIX}/lib/pkgconfig


export AR=${_MINGW_PREFIX}-ar export AR=${_MINGW_PREFIX}-ar
export CC=${_MINGW_PREFIX}-gcc export CC=${_MINGW_PREFIX}-gcc
@@ -63,15 +65,9 @@ export STRIP=${_MINGW_PREFIX}-strip
export WINDRES=${_MINGW_PREFIX}-windres export WINDRES=${_MINGW_PREFIX}-windres


export CFLAGS="-DPTW32_STATIC_LIB -DFLUIDSYNTH_NOT_A_DLL" export CFLAGS="-DPTW32_STATIC_LIB -DFLUIDSYNTH_NOT_A_DLL"
export CFLAGS="${CFLAGS} -I${PREFIX}/include -I/opt/mingw${_ARCH}/include -I/opt/mingw${_ARCH}/${_MINGW_PREFIX}/include"

if [ x"${ARCH}" != x"32" ]; then
export CFLAGS="${CFLAGS} -mtune=generic -msse -msse2"
fi

export CFLAGS="${CFLAGS} -I${PREFIX}/include"
export CXXFLAGS="${CFLAGS}" export CXXFLAGS="${CFLAGS}"
export LDFLAGS="-L${PREFIX}/lib -L/opt/mingw${_ARCH}/lib -L/opt/mingw${_ARCH}/${_MINGW_PREFIX}/lib"

export LDFLAGS="-L${PREFIX}/lib"
} }


# --------------------------------------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------------------------------------
@@ -79,15 +75,11 @@ export LDFLAGS="-L${PREFIX}/lib -L/opt/mingw${_ARCH}/lib -L/opt/mingw${_ARCH}/${
export_vars "${ARCH}" "${ARCH_PREFIX}" "${CPUARCH}" export_vars "${ARCH}" "${ARCH_PREFIX}" "${CPUARCH}"


export WINEARCH=win${ARCH} export WINEARCH=win${ARCH}
export WINEDEBUG=-all
# export WINEDEBUG=-all
export WINEPREFIX=~/.winepy3_x${ARCH} export WINEPREFIX=~/.winepy3_x${ARCH}
export PYTHON_EXE="wine C:\\\\Python34\\\\python.exe"

export CXFREEZE="$PYTHON_EXE C:\\\\Python34\\\\Scripts\\\\cxfreeze"
export PYUIC="$PYTHON_EXE -m PyQt5.uic.pyuic"
export PYRCC="wine C:\\\\Python34\\\\Lib\\\\site-packages\\\\PyQt5\\\\pyrcc5.exe"

export PYTHONPATH=$(pwd)/source/frontend
export PYTHON_EXE="wine ${MSYS2_PREFIX}/bin/python.exe"
export CXFREEZE="$PYTHON_EXE ${MSYS2_PREFIX}/bin/cxfreeze"
export PYTHONPATH="$(pwd)/source/frontend" # ;${MSYS2_PREFIX}/lib/python3.7


rm -rf ./data/windows/Carla ./data/windows/Carla.lv2 ./data/windows/Carla.vst rm -rf ./data/windows/Carla ./data/windows/Carla.lv2 ./data/windows/Carla.vst
mkdir -p ./data/windows/Carla/Debug mkdir -p ./data/windows/Carla/Debug
@@ -101,10 +93,15 @@ cd data/windows/


rm -rf dist rm -rf dist
$CXFREEZE ../../bin/resources/bigmeter-ui $CXFREEZE ../../bin/resources/bigmeter-ui
mv dist/lib/library.zip dist/lib/library-bigmeter.zip
$CXFREEZE ../../bin/resources/midipattern-ui $CXFREEZE ../../bin/resources/midipattern-ui
mv dist/lib/library.zip dist/lib/library-midipattern.zip
$CXFREEZE ../../bin/resources/notes-ui $CXFREEZE ../../bin/resources/notes-ui
mv dist/lib/library.zip dist/lib/library-notes.zip
$CXFREEZE ../../bin/resources/carla-plugin $CXFREEZE ../../bin/resources/carla-plugin
mv dist/lib/library.zip dist/lib/library-carla1.zip
$CXFREEZE ../../bin/resources/carla-plugin-patchbay $CXFREEZE ../../bin/resources/carla-plugin-patchbay
mv dist/lib/library.zip dist/lib/library-carla2.zip


cp ../../bin/*.dll Carla/ cp ../../bin/*.dll Carla/
cp ../../bin/*.exe Carla/ cp ../../bin/*.exe Carla/
@@ -112,29 +109,41 @@ rm Carla/carla-discovery-native.exe
rm Carla/carla-lv2-export.exe rm Carla/carla-lv2-export.exe
rm Carla/carla-native-plugin.exe rm Carla/carla-native-plugin.exe


rm -f Carla/PyQt5.Qsci.pyd Carla/PyQt5.QtNetwork.pyd Carla/PyQt5.QtSql.pyd Carla/PyQt5.QtTest.pyd Carla/PyQt5.QtXml.pyd
rm -f dist/PyQt5.Qsci.pyd dist/PyQt5.QtNetwork.pyd dist/PyQt5.QtSql.pyd dist/PyQt5.QtTest.pyd dist/PyQt5.QtXml.pyd
# rm -f Carla/PyQt5.Qsci.pyd Carla/PyQt5.QtNetwork.pyd Carla/PyQt5.QtSql.pyd Carla/PyQt5.QtTest.pyd Carla/PyQt5.QtXml.pyd
# rm -f dist/PyQt5.Qsci.pyd dist/PyQt5.QtNetwork.pyd dist/PyQt5.QtSql.pyd dist/PyQt5.QtTest.pyd dist/PyQt5.QtXml.pyd


cp $WINEPREFIX/drive_c/Python34/python34.dll Carla/
cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/icu*.dll Carla/
cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/libEGL.dll Carla/
cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/libGLESv2.dll Carla/
cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5Core.dll Carla/
cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5Gui.dll Carla/
cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5Widgets.dll Carla/
cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5OpenGL.dll Carla/
cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5Svg.dll Carla/
# cp $WINEPREFIX/drive_c/Python34/python34.dll Carla/
# cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/icu*.dll Carla/
# cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/libEGL.dll Carla/
# cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/libGLESv2.dll Carla/
# cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5Core.dll Carla/
# cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5Gui.dll Carla/
# cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5Widgets.dll Carla/
# cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5OpenGL.dll Carla/
# cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5Svg.dll Carla/


mv dist Carla/resources mv dist Carla/resources
cp $WINEPREFIX/drive_c/Python34/python34.dll Carla/resources/
cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/icu*.dll Carla/resources/
cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/libEGL.dll Carla/resources/
cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/libGLESv2.dll Carla/resources/
cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5Core.dll Carla/resources/
cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5Gui.dll Carla/resources/
cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5Widgets.dll Carla/resources/
cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5OpenGL.dll Carla/resources/
cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5Svg.dll Carla/resources/
mkdir Carla/resources/lib/_tmp
pushd Carla/resources/lib/_tmp
unzip -o ../library-bigmeter.zip
unzip -o ../library-midipattern.zip
unzip -o ../library-notes.zip
unzip -o ../library-carla1.zip
unzip -o ../library-carla2.zip
zip -r -9 ../library.zip *.pyc
popd
rm -r Carla/resources/lib/_tmp
rm Carla/resources/lib/library-*.zip

# cp $WINEPREFIX/drive_c/Python34/python34.dll Carla/resources/
# cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/icu*.dll Carla/resources/
# cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/libEGL.dll Carla/resources/
# cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/libGLESv2.dll Carla/resources/
# cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5Core.dll Carla/resources/
# cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5Gui.dll Carla/resources/
# cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5Widgets.dll Carla/resources/
# cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5OpenGL.dll Carla/resources/
# cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5Svg.dll Carla/resources/


mkdir Carla.lv2 mkdir Carla.lv2
cp Carla/*.exe Carla.lv2/ cp Carla/*.exe Carla.lv2/
@@ -173,19 +182,11 @@ chmod +x Carla.exe
# Cleanup # Cleanup
rm -f Carla.zip CarlaControl.zip rm -f Carla.zip CarlaControl.zip


if [ x"${ARCH}" = x"32" ]; then
VCARCH="86"
else
VCARCH="${ARCH}"
fi

# Create release zip # Create release zip
rm -rf ${PKG_FOLDER} rm -rf ${PKG_FOLDER}
mkdir ${PKG_FOLDER} mkdir ${PKG_FOLDER}
mkdir ${PKG_FOLDER}/vcredist
cp -r Carla.exe Carla.lv2 Carla.vst README.txt ${PKG_FOLDER} cp -r Carla.exe Carla.lv2 Carla.vst README.txt ${PKG_FOLDER}
unix2dos ${PKG_FOLDER}/README.txt unix2dos ${PKG_FOLDER}/README.txt
cp ~/.cache/winetricks/vcrun2010/vcredist_x${VCARCH}.exe ${PKG_FOLDER}/vcredist
zip -r -9 ${PKG_FOLDER}.zip ${PKG_FOLDER} zip -r -9 ${PKG_FOLDER}.zip ${PKG_FOLDER}


cd ../.. cd ../..

+ 5
- 5
source/frontend/carla_app.py View File

@@ -37,17 +37,17 @@ class CarlaApplication(object):
pathBinaries, pathResources = getPaths(libPrefix) pathBinaries, pathResources = getPaths(libPrefix)


# Needed for MacOS and Windows # Needed for MacOS and Windows
if os.path.exists(CWD) and (MACOS or WINDOWS):
QApplication.addLibraryPath(CWD)
#if os.path.exists(CWD) and (MACOS or WINDOWS):
#QApplication.addLibraryPath(CWD)


# Needed for local wine build # Needed for local wine build
if WINDOWS and CWD.endswith(("frontend", "resources")) and os.getenv("CXFREEZE") is None: if WINDOWS and CWD.endswith(("frontend", "resources")) and os.getenv("CXFREEZE") is None:
QApplication.addLibraryPath("H:\\builds\\msys2-i686\\mingw32\\share\\qt5\\plugins") QApplication.addLibraryPath("H:\\builds\\msys2-i686\\mingw32\\share\\qt5\\plugins")


# Use binary dir as library path (except in Windows)
if os.path.exists(pathBinaries) and not WINDOWS:
# Use binary dir as library path
if os.path.exists(pathBinaries):
QApplication.addLibraryPath(pathBinaries) QApplication.addLibraryPath(pathBinaries)
stylesDir = pathBinaries
stylesDir = pathBinaries if not WINDOWS else "" # FIXME


# If style is not available we can still fake it # If style is not available we can still fake it
else: else:


+ 0
- 1
source/frontend/carla_database.py View File

@@ -154,7 +154,6 @@ PyPluginInfo = {
'parameters.outs': 0 'parameters.outs': 0
} }


global gDiscoveryProcess
gDiscoveryProcess = None gDiscoveryProcess = None


def findWinePrefix(filename, recursionLimit = 10): def findWinePrefix(filename, recursionLimit = 10):


+ 0
- 1
source/frontend/ladspa_rdf.py View File

@@ -331,7 +331,6 @@ def get_c_unit_type(value):
# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Global objects # Global objects


global LADSPA_RDF_PATH, LADSPA_Plugins
LADSPA_RDF_PATH = ("/usr/share/ladspa/rdf", "/usr/local/share/ladspa/rdf") LADSPA_RDF_PATH = ("/usr/share/ladspa/rdf", "/usr/local/share/ladspa/rdf")
LADSPA_Plugins = [] LADSPA_Plugins = []




+ 1
- 1
source/frontend/patchcanvas/__init__.py View File

@@ -144,7 +144,7 @@ class Canvas(object):
self.size_rect = QRectF() self.size_rect = QRectF()


def callback(self, action, value1, value2, value_str): def callback(self, action, value1, value2, value_str):
print("Canvas::callback({}, {}, {}, {})".fmt(action, value1, value2, value_str))
print("Canvas::callback({}, {}, {}, {})".format(action, value1, value2, value_str))


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




Loading…
Cancel
Save