Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,16 @@ jobs:

- name: Package
# macOS users are expected to have Homebrew SDL2/mpv/curl installed.
# We ship the binary + Configs/Data/Library + version stamp; dylibs come from brew.
# We ship the binary + Configs/Data/Library + version stamp; SDL/mpv/curl
# dylibs come from brew. projectM dylibs come bundled in lib/ next to the
# binary (Makefile drops them there for @loader_path/lib).
run: |
TAG="${{ github.event.inputs.tag || github.ref_name }}"
DROP="Theseus-${TAG}-macos"
mkdir -p "${DROP}"
cp ~/builds/theseus/desktop/theseus "${DROP}/"
for D in Configs Data Library; do cp -R ~/builds/theseus/desktop/$D "${DROP}/$D"; done
if [ -d ~/builds/theseus/desktop/lib ]; then cp -R ~/builds/theseus/desktop/lib "${DROP}/lib"; fi
zip -r "${DROP}.zip" "${DROP}"
echo "ARCHIVE=${DROP}.zip" >> "$GITHUB_ENV"

Expand Down Expand Up @@ -103,6 +106,7 @@ jobs:
mkdir -p "${DROP}"
cp ~/builds/theseus/desktop/theseus "${DROP}/"
for D in Configs Data Library; do cp -R ~/builds/theseus/desktop/$D "${DROP}/$D"; done
if [ -d ~/builds/theseus/desktop/lib ]; then cp -R ~/builds/theseus/desktop/lib "${DROP}/lib"; fi
tar czf "${DROP}.tar.gz" "${DROP}"
echo "ARCHIVE=${DROP}.tar.gz" >> "$GITHUB_ENV"

Expand Down Expand Up @@ -164,6 +168,7 @@ jobs:
mkdir -p "${DROP}"
cp ~/builds/theseus/desktop/theseus "${DROP}/"
for D in Configs Data Library; do cp -R ~/builds/theseus/desktop/$D "${DROP}/$D"; done
if [ -d ~/builds/theseus/desktop/lib ]; then cp -R ~/builds/theseus/desktop/lib "${DROP}/lib"; fi
tar czf "${DROP}.tar.gz" "${DROP}"
echo "ARCHIVE=${DROP}.tar.gz" >> "$GITHUB_ENV"

Expand Down
15 changes: 13 additions & 2 deletions build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -526,8 +526,13 @@ MSYS2 `pacman -S mingw-w64-x86_64-curl`)
# a clean checkout to silently ship a no-milkdrop binary.)
PROJECTM_PREFIX := $(THESEUS_SRC)/third-party/projectm/install
PROJECTM_CFLAGS := -I$(PROJECTM_PREFIX)/include -DTHESEUS_HAS_MILKDROP=1
ifeq ($(UNAME_S),Darwin)
PROJECTM_RPATH := -Wl,-rpath,@loader_path/lib
else
PROJECTM_RPATH := '-Wl,-rpath,$$ORIGIN/lib'
endif
PROJECTM_LDFLAGS := -L$(PROJECTM_PREFIX)/lib -lprojectM-4 -lprojectM-4-playlist \
-Wl,-rpath,$(PROJECTM_PREFIX)/lib
$(PROJECTM_RPATH)
endif
CDAUDIO_CFLAGS := $(MPV_CFLAGS)
CDAUDIO_LDFLAGS :=
Expand Down Expand Up @@ -909,8 +914,14 @@ projectm-clean:
rm -rf $(PROJECTM_SRC)/build $(PROJECTM_SRC)/install

$(DESKTOP_TARGET): $(DESKTOP_OBJS)
@mkdir -p $(DESKTOP_DIR)
@mkdir -p $(DESKTOP_DIR) $(DESKTOP_DIR)/lib
$(DESKTOP_CXX) -o $@ $(DESKTOP_OBJS) $(DESKTOP_LDFLAGS)
@# Bundle projectM shared libs next to the binary so @loader_path/lib
@# (macOS) and $ORIGIN/lib (Linux) resolve at runtime regardless of cwd.
@for f in $(PROJECTM_PREFIX)/lib/libprojectM-4*.dylib \
$(PROJECTM_PREFIX)/lib/libprojectM-4*.so* ; do \
[ -e "$$f" ] && cp -a "$$f" $(DESKTOP_DIR)/lib/ || true ; \
done; true
@# Configs/, Data/, Library/ live next to the binary at runtime; the
@# binary CWDs into its own directory and resolves Xbox C:/Q:/E:
@# paths through them. Prefer rsync for fast incrementals; fall back
Expand Down
Loading