AlbanBedel / scummc

A Scumm Compiler
GNU General Public License v2.0
129 stars 19 forks source link

"Problems" compiling on MacOS #11

Open juanmcasillas opened 5 years ago

juanmcasillas commented 5 years ago

Hello,

I managed to compile all the things, except the boxeditor and costview (due the gtk2.4 requirement). It's posible to downgrade the gtk version to something like 2.24 or upgrading it to gtk3 ? macOs with brew is something "weird" about releases and compiling outside libraries.

Thanks for your work.

AlbanBedel commented 5 years ago

I'm sorry but I don't have much time for SummC nowadays. If somebody else like to do it a PR to port these tools to Gtk3 would be welcome.

juanmcasillas commented 5 years ago

Hello!

I manage to compile it using the available gtk distro (brew install gtk+) on MacOs Sierra 10.12.6

It's a little clunky, but it works. You should put the script in the build dir (scummc-0.2.1/build.iMac/x86_64-darwin-LLVM-8.1.0-debug) and it compiles boxeditand costview. Also generates the costview_help.h. Maybe touching a little the Makefile should work, but I'm not a Makefile expert, sorry.

I attach the shell script below, hope it helps.

Kind Regards, Juan M. Casillas

screenshot

build_gtk.sh.zip

idleberg commented 2 years ago

I've been fascinated by ScummC for a while but never used it myself. I have recently created this Homebrew tap to make installing ScummC on macOS easier. However, at this point only the binaries are installed. Due to my lack of experience with ScummC, I'm looking forward to feedback to be able to complete the formula!

star-light-1 commented 10 months ago

Hello,

I managed to compile this project on macOS (Apple Silicon) with the following steps.

  1. Update ./configure to allow arm64/aarch64:
--- a/configure
+++ b/configure
@@ -373,7 +373,7 @@ fi
 ##

 case "$cpu" in 
-    i[3-9]86|x86_64|alpha)
+    i[3-9]86|x86_64|alpha|arm64|aarch64)
  1. Fix incorrect path in Makefile.target:
--- a/Makefile.target
+++ b/Makefile.target
@@ -160,7 +160,7 @@ $(foreach lib,$(LIBS),$(eval $(call LIB_template,$(lib))))

 ## Generated help messages
 ifneq ($(XSLTPROC),)
-%_help.h: $(SRCDIR)/man/%.xml $(SRCDIR)/man/header.xslt
+%_help.h: $(SRCDIR)/man/tools/%.xml $(SRCDIR)/man/header.xslt
        @echo "Generating $@ for $(TARGET)"  $(MSGLOG)
        $(call CMD_template,$(XSLTPROC) $(SRCDIR)/man/header.xslt $< > $@,$(LOG))
 else
  1. Install dependencies (assuming your're using homebrew):
brew install bison gtk make
  1. Default macOS versions of bison and make are outdated, use homebrew versions instead:
export PATH="/opt/homebrew/opt/bison/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/bison/lib"
export PATH="/opt/homebrew/opt/make/libexec/gnubin:$PATH"
  1. Build:
make distclean
./configure
make

Binaries can then be found in ./build.HOSTNAME/arm64-darwin-clang-CLANGVERSION-debug/

  1. Build example game:
cd examples/openquest
make tentacle

This builds the example game such that it can be detected as "Day of the Tentacle" by ScummVM.