Skip to content

Compilation

Konstantinos Kyriakopoulos edited this page May 30, 2026 · 4 revisions

Compilation

Foo Scrobbler can be built either from Xcode or from the command line with xcodebuild.

Requirements

  • The foobar2000 SDK static libraries built and copied into lib/.
  • Your own Last.fm API key and shared secret exported in your shell environment before building.

Create your own Last.fm API account from the official Last.fm API page:

https://www.last.fm/api/account/create

Then export the values in your shell:

export LASTFM_API_KEY="your_api_key_here"
export LASTFM_API_SECRET="your_shared_secret_here"

For persistent local use, add those exports to your shell profile, for example ~/.zprofile or ~/.zshrc.

Build Static Libraries

Before building Foo Scrobbler, manually build the foobar2000 SDK static libraries and copy the resulting .a files into lib/. To do so, open the related project files in Xcode and preferably build them as universal libraries.

The main project expects these files:

lib/libfoobar2000_SDK.a
lib/libfoobar2000_SDK_helpers.a
lib/libfoobar2000_component_client.a
lib/libshared.a
lib/libpfc-Mac.a

Build With Xcode

  1. Open src/foo_scrobbler_mac.xcodeproj in Xcode.
  2. Build the project.

Xcode runs the project build script, which generates the local Last.fm API header from LASTFM_API_KEY and LASTFM_API_SECRET.

Build From Command Line

From the repository root, run:

xcodebuild \
  -project src/foo_scrobbler_mac.xcodeproj \
  -scheme foo_scrobbler_mac \
  -configuration Release \
  -derivedDataPath build/foo_scrobbler_mac_build_universal \
  ARCHS="arm64 x86_64" \
  ONLY_ACTIVE_ARCH=NO \
  build

This builds a Release universal macOS binary for both Apple Silicon and Intel.

Foo Scrobbler (foo_scrobbler_mac) Wiki

Clone this wiki locally