diff --git a/BUILD.md b/BUILD.md index c6db723..cb289ec 100644 --- a/BUILD.md +++ b/BUILD.md @@ -55,16 +55,6 @@ Supersonic is available in the AUR and can be built either manually with `makepk ### Build -#### Homebrew setup -* Make sure header and library include paths include the dir in which homebrew installs headers/dylibs (may differ dep. on OS/Homebrew version) - - ``export C_INCLUDE_PATH=/opt/homebrew/include:$C_INCLUDE_PATH`` - - ``export LIBRARY_PATH=/opt/homebrew/lib:$LIBRARY_PATH`` - -#### Macports setup -* Make sure header and library include paths include the dir in which macports installs headers/dylibs - - ``export C_INCLUDE_PATH=/opt/local/include:$C_INCLUDE_PATH`` - - ``export LIBRARY_PATH=/opt/local/lib:$LIBRARY_PATH`` - #### Building the application * clone the repo, CD into the repo root, and run ``make build`` * (note that the first build will take some time as it will download and build the UI library) diff --git a/Makefile b/Makefile index b4cb945..62f9090 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ build: # so the last 3 cmds move it over manually. This is a bit fragile though # since it assumes a specific location and version of the dependency package_macos: - CGO_CFLAGS="-I/usr/local/include -I/opt/homebrew/include" CGO_LDFLAGS="-L/usr/local/lib -L/opt/homebrew/lib" fyne package -os darwin -tags migrated_fynedo + fyne package -os darwin -tags migrated_fynedo bundledeps_macos_homebrew: dylibbundler -od -b -x ./Supersonic.app/Contents/MacOS/supersonic -d ./Supersonic.app/Contents/Frameworks/ -p @executable_path/../Frameworks/ diff --git a/backend/mpmedia_mac.go b/backend/mpmedia_mac.go index 84fdd6f..e6d36ab 100644 --- a/backend/mpmedia_mac.go +++ b/backend/mpmedia_mac.go @@ -7,8 +7,8 @@ package backend **/ /* -#cgo CFLAGS: -x objective-c -#cgo LDFLAGS: -framework Cocoa -framework MediaPlayer +#cgo CFLAGS: -x objective-c -I/opt/homebrew/include -I/opt/local/include +#cgo LDFLAGS: -framework Cocoa -framework MediaPlayer -L/opt/homebrew/lib -L/opt/local/lib #include "mpmediabridge.h" */ import ( diff --git a/backend/player/mpv/peaks_mac.go b/backend/player/mpv/peaks_mac.go new file mode 100644 index 0000000..29ffe95 --- /dev/null +++ b/backend/player/mpv/peaks_mac.go @@ -0,0 +1,7 @@ +package mpv + +/* +#cgo CFLAGS: -I/opt/homebrew/include -I/opt/local/include +#cgo LDFLAGS: -L/opt/homebrew/lib -L/opt/local/lib +*/ +import "C"