Open markweenwork opened 3 years ago
I honestly don't know. I don't have a Windows 10 system and I haven't tried crosss-compiling jack_mixer yet.
There are a few things that would need to be adapted in the code, e.g. signal handling and preferences saving paths.
So, volunteers needed to work on this.
thanks for the info and thanks for this tool - very useful in my opinion!! would love to be able to have the same audio setup in windows that i currently use in linux
I managed to get this working in windows 10 - i compiled using msys2 on windows 10
spent most the weekend figuring this out - will look more into this next weekend when i have some more time and see if i can find any parts that dont work - and also look at the preferences saving paths
thanks for the pointers in the right direction spotlightkid!!!
Great news!
Please share your work, when you find the time!
For the preferences path I was thinking about replacing pyxdg
with appdirs.
yes i intend to share everything!! will update next weekend!
hey sorry for delay with this - had my hard disk fail last weekend and then also my backup hardisk failed while trying to recovery my main disk lol!! ok so what I have below is instrutions on 64 bit windows to compile and run jack and jack_mixer15 from source using msys2 - I am looking to gather all dependencies together to make it easier for normal users to get this going as it is quite long winded atm
firstly the downloads needed using the versions i used are as follows
https://github.com/jackaudio/jack2-releases/releases/download/v1.9.17/jack2-win64-v1.9.17.exe https://github.com/jackaudio/jack2/archive/refs/tags/v1.9.17.tar.gz https://repo.msys2.org/distrib/x86_64/msys2-x86_64-20210228.exe https://github.com/msys2/MINGW-packages/archive/refs/heads/master.zip https://aka.ms/vs/16/release/vc_redist.x64.exe https://www.steinberg.net/asiosdk https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v7.9.5/npp.7.9.5.Installer.exe (for editing PKGBUILD and maintaing unix style end of lines)
onto how to do it instructions preceded with # msys2 prompts preceded with ? replace \<UserName> for all paths with your login username
pacman -Suy
?Proceed with installation? [Y/n] - enter Y
?To complete this update all MSYS2 processes including this terminal will be closed. Confirm to proceed [Y/n] - enter Y and restart msys2
pacman -Suy
?Proceed with installation? [Y/n] - enter Y
pacman -S mingw-w64-x86_64-toolchain
?Enter a selection (default=all): - pick 3 mingw-w64-x86_64-gcc
?Proceed with installation? [Y/n] - enter Y
pacman -S patch autoconf make gettext-devel automake libtool pkg-config unzip
?Proceed with installation? [Y/n] - enter Y
pacman -S mingw-w64-x86_64-libsystre
?Proceed with installation? [Y/n] - enter Y
pacman -S mingw-w64-x86_64-db
?Proceed with installation? [Y/n] - enter Y
pacman -S mingw-w64-x86_64-libsndfile
?Proceed with installation? [Y/n] - enter Y
pacman -S mingw-w64-x86_64-libsamplerate
?Proceed with installation? [Y/n] - enter Y
cd /home/<UserName>/MINGW-packages-master/mingw-w64-portaudio/
MINGW_INSTALLS=mingw64 makepkg-mingw -sLf
?Proceed with installation? [Y/n] - enter Y
?Proceed with installation? [Y/n] - enter Y
cd ..
mkdir mingw-w64-jack2
cd mingw-w64-jack2
cp /home/<UserName>/MINGW-packages-master/mingw-w64-portaudio/src/portaudio/include/pa_asio.h /mingw64/include/
cp /home/<UserName>/MINGW-packages-master/mingw-w64-portaudio/src/portaudio/include/portaudio.h /mingw64/include/
MINGW_INSTALLS=mingw64 makepkg-mingw -sLf
?Proceed with installation? [Y/n] - enter Y
?Proceed with installation? [Y/n] - enter Y
?Proceed with installation? [Y/n] - enter Y
pacman -S mingw-w64-x86_64-meson
?Proceed with installation? [Y/n] - enter Y
pacman -S mingw-w64-x86_64-glib2
?Proceed with installation? [Y/n] - enter Y
pacman -S mingw-w64-x86_64-cmake
?Proceed with installation? [Y/n] - enter Y
pacman -S mingw-w64-x86_64-python
?Proceed with installation? [Y/n] - enter Y
pacman -S mingw-w64-x86_64-python-gobject
?Proceed with installation? [Y/n] - enter Y
pacman -S mingw-w64-x86_64-python-cairo
?Proceed with installation? [Y/n] - enter Y
pacman -S mingw-w64-x86_64-python-xdg
?Proceed with installation? [Y/n] - enter Y
pacman -S mingw-w64-x86_64-gtk3
?Proceed with installation? [Y/n] - enter Y
pacman -S mingw-w64-x86_64-readline
?Proceed with installation? [Y/n] - enter Y
export C_INCLUDE_PATH=/mingw64/include
export PKG_CONFIG_PATH=/mingw64/lib/pkgconfig
export PATH="/mingw64/bin:/mingw64/lib/bin:/mingw64/lib:$PATH"
export LD_LIBRARY_PATH=/mingw64/lib:/mingw64/lib/bin:/mingw64/bin
export CFLAGS="-I/mingw64/include"
export CXXFLAGS="-I/mingw64/include"
export LDFLAGS="-L/mingw64/lib"
cd /home/<UserName>/jack_mixer-15/
/mingw64/bin/meson setup builddir --prefix=/mingw64 --buildtype=release
//signal(SIGUSR1, reportVolume);
signal(SIGTERM, triggerShutDown);
//signal(SIGHUP, triggerShutDown);
signal(SIGINT, triggerShutDown);
meson compile -C builddir
meson install -C builddir
from signal import signal, SIGTERM, SIGINT#, SIGKILL #react to exit signals to close the client gracefully. Or kill if the client fails to do so.
#signal.signal(signal.SIGUSR1, self.sighandler)
signal.signal(signal.SIGTERM, self.sighandler)
signal.signal(signal.SIGINT, self.sighandler)
#signal.signal(signal.SIGHUP, signal.SIG_IGN)
cp /mingw64/lib/python3.8/site-packages/jack_mixer/_jack_mixer-cpython-38.dll /mingw64/bin
cp -R /mingw64/lib/jack/ /mingw64/bin
cp /mingw64/lib/libjack64.dll /mingw64/bin
cp /mingw64/lib/libjacknet64.dll /mingw64/bin
cp /mingw64/lib/libjackserver64.dll /mingw64/bin
cd "C:\Program Files\Jack2"
jackd.exe -R -P95 -S -d portaudio -r 4800
/mingw64/bin/python jack_mixer
_realname='jack2'
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=1.9.17
pkgrel=1
pkgdesc='The next-generation JACK with SMP support (mingw-w64)'
arch=('any')
url='http://jackaudio.org/'
license=('GPL')
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc"
"${MINGW_PACKAGE_PREFIX}-pkg-config"
'python3'
'git')
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs"
"${MINGW_PACKAGE_PREFIX}-portaudio"
"${MINGW_PACKAGE_PREFIX}-opus"
"${MINGW_PACKAGE_PREFIX}-libsamplerate"
"${MINGW_PACKAGE_PREFIX}-libsndfile"
"${MINGW_PACKAGE_PREFIX}-readline")
source=(${_realname}-${pkgver}.tar.gz)
sha256sums=('SKIP')
build() {
cd "${srcdir}/${_realname}-${pkgver}"
/usr/bin/python3 waf configure "--prefix=${MINGW_PREFIX}" --celt=no
/usr/bin/python3 waf build
}
package() {
cd "${srcdir}/${_realname}-${pkgver}"
/usr/bin/python3 waf "--destdir=${pkgdir}" install
cd "${pkgdir}/${MINGW_PREFIX}"
}
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
_realname=portaudio
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=190600_20161030
pkgrel=3
pkgdesc="A free, cross-platform, open source, audio I/O library (mingw-w64)"
arch=('any')
url="http://www.portaudio.com"
license=("custom")
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config")
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs")
options=(!libtool strip staticlibs)
source=("http://www.portaudio.com/archives/pa_stable_v${pkgver}.tgz"
"fix-build.patch"
"wdmks-wasapi-dsound.patch")
sha256sums=('f5a21d7dcd6ee84397446fa1fa1a0675bb2e8a4a6dceb4305a8404698d8d1513'
'77e8438d482ad03baa5c23afbe293e8cbdb95287ff6a489515bde61231e78525'
'fd62577c6fcf2811618701d49c68d6f0de515fad26f644ccacce57a16cf11bbc'
)
prepare() {
cd ${srcdir}/${_realname}
patch -p0 -i ${srcdir}/fix-build.patch
patch -p0 -i ${srcdir}/wdmks-wasapi-dsound.patch
autoconf
}
# In order to build with ASIO-support, download the ASIOSDK2.3 from Steinberg, add
# the path below and add "asio" to --with-winapi. Both for shared and static, e.g:
# --with-asiodir=${HOME}/ASIOSDK2.3 \
# --with-winapi=wmme,directx,wasapi,wdmks,asio
# Unfortunately each build creates artefacts in the ASIO-SDK (.libs) that conflict
# with the subsequent build (shared/static, 32-/64-bit. You may need to clean out
# manually or replace the SDK with a fresh copy. You may also need to provice two
# separate copies for asiodir in the shared and static build.
build() {
export lt_cv_deplibs_check_method='pass_all'
[[ -d "build-static-${MINGW_CHOST}" ]] && rm -rf "build-static-${MINGW_CHOST}"
mkdir -p "${srcdir}/build-static-${MINGW_CHOST}"
cd "${srcdir}/build-static-${MINGW_CHOST}"
../${_realname}/configure \
--prefix=${MINGW_PREFIX} \
--build=${MINGW_CHOST} \
--host=${MINGW_CHOST} \
--target=${MINGW_CHOST} \
--disable-shared \
--enable-static \
--with-dxdir=${MINGW_PREFIX}/${MINGW_CHOST} \
--with-winapi=wmme,directx,wasapi,wdmks,asio \
--with-asiodir=/opt/asiosdkstatic
make
[[ -d "build-shared-${MINGW_CHOST}" ]] && rm -rf "build-shared-${MINGW_CHOST}"
mkdir -p "${srcdir}/build-shared-${MINGW_CHOST}"
cd "${srcdir}/build-shared-${MINGW_CHOST}"
../${_realname}/configure \
--prefix=${MINGW_PREFIX} \
--build=${MINGW_CHOST} \
--host=${MINGW_CHOST} \
--target=${MINGW_CHOST} \
--enable-shared \
--with-dxdir=${MINGW_PREFIX}/${MINGW_CHOST} \
--with-winapi=wmme,directx,wasapi,wdmks,asio \
--with-asiodir=/opt/asiosdkshared
make
}
package() {
cd "${srcdir}/build-static-${MINGW_CHOST}"
make DESTDIR="${pkgdir}" install
cd "${srcdir}/build-shared-${MINGW_CHOST}"
make DESTDIR="${pkgdir}" install
}
Thanks for that. I'll have a closer look as soon as I can.
Why do you need to build jack? Wouldn't it be enough to point meson at the jack headers?
hi i built jack because it wasnt finding the jack libs because the jack.pc file was missing from the lib/pkgconfig folder and i didnt know how to create it - building jack created this file for me if i had know how to create it or if i got a correct .pc file i could have avoided building jack
jack_mixer, now that PR #150 is merged, now uses appdir
to save preferences and mixer setting files in the correct locations, which should work on windows too, so that's one step further towards windows compatibility, I hope.
@markweenwork, thank you so much for the Jack building instructions, they are great! FYI, the process of building portaudio with ASIO support seems to have changed somewhat, at least it didn't work out of the box, but I didn't use ASIO and too was only building jack for its jack.pc
.
I normally use linux and use jack for audio routing along with jack_mixer for general volume control - I also use jack in windows and was wondering if its possible to build jack_mixer for windows 10?