Build on a mac without environment variables

This commit is contained in:
Andy Williams
2025-08-22 11:32:34 +01:00
parent a8f252de33
commit ffe4fa61ee
4 changed files with 10 additions and 13 deletions
-10
View File
@@ -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)
+1 -1
View File
@@ -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/
+2 -2
View File
@@ -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 (
+7
View File
@@ -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"