Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instructions for installation on MacOS #36

Open
bjornte opened this issue Apr 24, 2019 · 5 comments
Open

Instructions for installation on MacOS #36

bjornte opened this issue Apr 24, 2019 · 5 comments
Assignees

Comments

@bjornte
Copy link

bjornte commented Apr 24, 2019

Is the application available for installation on MacOS? If so, are there any instructions for how to install it?

If the app is in a finished state, should a link be added to the Wikipedia.org page?

(I'm struggling to understand the GitHub structure, so forgive me for these naïve questions 😊)

@dougmencken
Copy link
Owner

dougmencken commented Feb 12, 2023

In fact, this project began initially to adapt Jorge’s code for Mac OS X PowerPC (up to 10.5) ....
There’s this script
https://github.com/dougmencken/HeadOverHeels/blob/master/build-osx.sh
since 0f41682

@dougmencken dougmencken self-assigned this Feb 12, 2023
@vookimedlo
Copy link

With small updates, this project can be built easily on the macos sonoma. However, the resulting binary does not behave well. Full screen does not work, and if you get the correct rendering in the first room, you are lucky.

For compilation just install the dependent libraries via homebrew. Fix the two errors in ISM.cpp (by adding const keyword at the line beginning.) and build the game.

autoreconf -f -ii
CXX="g++" CC="gcc" CPPFLAGS="-I/opt/homebrew/include $CPPFLAGS" LDFLAGS="-L/opt/homebrew/lib $LDFLAGS" ./configure --prefix=`pwd`/in --enable-debug --with-allegro5
make
make install

Dependant libraries:

otool -L headoverheels
headoverheels:
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1336.0.0)
	/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.12)
	/opt/homebrew/opt/libpng/lib/libpng16.16.dylib (compatibility version 57.0.0, current version 57.0.0)
	/opt/homebrew/opt/libvorbis/lib/libvorbis.0.dylib (compatibility version 5.0.0, current version 5.9.0)
	/opt/homebrew/opt/libvorbis/lib/libvorbisenc.2.dylib (compatibility version 3.0.0, current version 3.12.0)
	/opt/homebrew/opt/libvorbis/lib/libvorbisfile.3.dylib (compatibility version 7.0.0, current version 7.8.0)
	/opt/homebrew/opt/libogg/lib/libogg.0.dylib (compatibility version 9.0.0, current version 9.5.0)
	/opt/homebrew/opt/tinyxml2/lib/libtinyxml2.9.dylib (compatibility version 9.0.0, current version 9.0.0)
	/opt/homebrew/opt/allegro/lib/liballegro.5.2.dylib (compatibility version 5.2.0, current version 5.2.8)
	/opt/homebrew/opt/allegro/lib/liballegro_audio.5.2.dylib (compatibility version 5.2.0, current version 5.2.8)
	/opt/homebrew/opt/allegro/lib/liballegro_acodec.5.2.dylib (compatibility version 5.2.0, current version 5.2.8)
	/opt/homebrew/opt/allegro/lib/liballegro_image.5.2.dylib (compatibility version 5.2.0, current version 5.2.8)
	/opt/homebrew/opt/allegro/lib/liballegro_font.5.2.dylib (compatibility version 5.2.0, current version 5.2.8)
	/opt/homebrew/opt/allegro/lib/liballegro_primitives.5.2.dylib (compatibility version 5.2.0, current version 5.2.8)
	/opt/homebrew/opt/allegro/lib/liballegro_main.5.2.dylib (compatibility version 5.2.0, current version 5.2.8)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1600.151.0)

@dougmencken
Copy link
Owner

the two errors in ISM.cpp (by adding const keyword at the line beginning.)

which are these two errors ?

@vookimedlo
Copy link

which are these two errors ?

ism.cpp, line 127

        char* lastdot = std::strrchr ( nameFromPath( pathToGame ).c_str(), '.' );

shall be

        const char* lastdot = std::strrchr ( nameFromPath( pathToGame ).c_str(), '.' );

ism.cpp, line 201

                char* lastdot = std::strrchr ( filename.c_str() , '.' );

shall be

                const char* lastdot = std::strrchr ( filename.c_str() , '.' );

dougmencken added a commit that referenced this issue Oct 3, 2023
@dougmencken
Copy link
Owner

dougmencken commented Oct 3, 2023

const is now there
370fa63

as for why was it needed ?....

c_str () returns const char* (a pointer to constant) not just char* without const,
and the version of std::strrchr (https://en.cppreference.com/w/cpp/string/byte/strrchr) to be used for a const char* first argument returns const char* as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants