Poppy icon indicating copy to clipboard operation
Poppy copied to clipboard

Build script for macOS

Open TidbitSoftware opened this issue 1 year ago • 5 comments

I have successfully compiled on macOS (Intel-based machine) and am posting here the build script I used, including documentation on external packages installed via Homebrew. Hope it saves someone else some time!

#!/bin/bash

# Installed dependencies with,
#
#	brew install opencv sdl2 sdl2_image sdl12-compat
#
# Usage:
#
#	cd Poppy
#	src/poppy img1.png img2.png imgN.png
#
# NOTE: Uncomment PREFIX line and set to desired install location, and 
# uncomment `make install` line to install. Default install location is 
# <POPPY_SRC>/src/src.
#
# Sources:
# - https://github.com/kallaballa/Poppy
#

#PREFIX="<INSTALL_PATH>/install" # Set to location where external package should be installed

# Download source
git clone https://github.com/kallaballa/Poppy.git

# Move source into 'src' directory
mv Poppy src
rm -rf Poppy

# Patch Makefile
sed -i'' -e 's|SDL_image|SDL2_image|' src/Makefile

# Compile and install
cd src
make -j 4
#make install

TidbitSoftware avatar Aug 19 '23 21:08 TidbitSoftware

Very nice! Thank you! I will include it somehow.

kallaballa avatar Aug 24 '23 04:08 kallaballa

Thank you for these instructions. I managed to compile on Mac M1. No need for the sed command and I installed SDL and not SDL2 via brew.

lasconic avatar Nov 30 '23 09:11 lasconic

@lasconic I'm happy to hear it was useful!

TidbitSoftware avatar Nov 30 '23 18:11 TidbitSoftware

Thank you for these instructions. I managed to compile on Mac M1. No need for the sed command and I installed SDL and not SDL2 via brew.

Hello, @lasconic I've tried (several times) but I'm still stucked with:

In file included from poppy.cpp:2: ./canvas.hpp:5:10: fatal error: 'SDL/SDL.h' file not found #include <SDL/SDL.h>

I've uninstalled and reinstalled SDL2 with brew without success.

Any idea? I would like to be able to run this without having to run it on a virtual machine...

Thanks!

Réponse en français possible ;) Bonne journée!

sverspecht avatar Jul 02 '24 13:07 sverspecht

you need SDL1.3 :)

kallaballa avatar Aug 06 '24 10:08 kallaballa