-
-
Save cfstras/f741087c77a899d5f77eb4664c5b4a70 to your computer and use it in GitHub Desktop.
| #!/bin/bash | |
| # Notes on building Mumble on an M1 mac | |
| set -euo pipefail | |
| ARM=(arch -arm64) | |
| BREW=( | |
| /opt/homebrew/bin/brew | |
| ) | |
| BUILD_DIR=build | |
| FLAGS=( | |
| # add this if you want to build and debug with XCode | |
| #-G Xcode | |
| -Dice=off | |
| # Build with debug or release | |
| -DCMAKE_BUILD_TYPE=Release | |
| ) | |
| ## If you want error output... | |
| #export VERBOSE=1 | |
| function install_packages() { | |
| function brewUp() { | |
| if "${BREW[@]}" ls --versions "$1"; then | |
| "${BREW[@]}" upgrade "$1" | |
| else | |
| "${BREW[@]}" install "$1" | |
| fi | |
| } | |
| "${BREW[@]}" update | |
| export HOMEBREW_NO_AUTO_UPDATE=1 | |
| brewUp cmake | |
| brewUp pkg-config | |
| brewUp qt5 | |
| brewUp boost | |
| brewUp libogg | |
| brewUp libvorbis | |
| brewUp flac | |
| brewUp libsndfile | |
| brewUp protobuf | |
| brewUp openssl | |
| brewUp ice | |
| } | |
| make_links() { | |
| if [[ -f /opt/homebrew/opt/qt5/ ]]; then | |
| sudo ln -fs /opt/homebrew/opt /usr/local/opt | |
| fi | |
| } | |
| function clean() { | |
| rm -rf $BUILD_DIR | |
| } | |
| function mkdirs() { | |
| mkdir -p $BUILD_DIR | |
| cd $BUILD_DIR | |
| } | |
| function configure() { | |
| "${ARM[@]}" cmake "${FLAGS[@]}" .. | |
| } | |
| function build() { | |
| "${ARM[@]}" cmake --build . -j5 | |
| } | |
| ( | |
| set -x | |
| ## You can comment-out individual steps if you don't want to re-run them. | |
| install_packages | |
| clean | |
| mkdirs | |
| make_links | |
| configure | |
| build | |
| ) | |
| echo | |
| echo "Done! your app is in $BUILD_DIR/Mumble.app" | |
| echo "... (Or, if you built with XCode, in build/Debug/Mumble.app/Contents/MacOS/Mumble)" |
@jason-green-io you might need to install python and/or python3 using brew install, I forgot to put it into the script since I already had it installed.
I have those installed already as well:
greener@enderdragon mumble % brew install python3
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core and homebrew/cask).
==> Updated Formulae
Updated 21 formulae.
==> New Casks
sparrow
==> Updated Casks
Updated 22 casks.
Warning: [email protected] 3.9.5 is already installed and up-to-date.
To reinstall 3.9.5, run:
brew reinstall [email protected]
greener@enderdragon mumble % brew install python
Warning: [email protected] 3.9.5 is already installed and up-to-date.
To reinstall 3.9.5, run:
brew reinstall [email protected]
greener@enderdragon mumble %
Newer cmake uses a different module to find python.
Progress:
greener@enderdragon mumble % git diff cmake/qt-utils.cmake
diff --git a/cmake/qt-utils.cmake b/cmake/qt-utils.cmake
index fc7327540..707128ef5 100644
--- a/cmake/qt-utils.cmake
+++ b/cmake/qt-utils.cmake
@@ -3,7 +3,7 @@
# that can be found in the LICENSE file at the root of the
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
-include(FindPythonInterpreter)
+include(FindPython3)
function(include_qt_plugin TARGET SCOPE PLUGIN)
set(PATH "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_plugin_import.cpp")Now onto poco which doesn't seem available for aarm64 on brew.
Edit: poco not pogo
brew install --build-from-source poco
Smooth sailing from then on.
Can someone provide a binary for M1? I'm running a 256GB base model and I'm already low on disk space. So I would like to avoid installing all the dependencies.
@tristan-k I recommend using the regular amd64 version with rosetta. The native build still has a lot of problems that make it pretty unusable (crashes when switching audio devices, no hotkey support, …)
See „Caveats“ here: mumble-voip/mumble#4765
Thanks for the heads-up. I guess will have to wait then. If you need someone for testing just holler.
Has anything changed for this script to longer work?