Author Topic: Getting Started on a Mac  (Read 1638 times)

HylianLikely

  • Newbie
  • *
  • Posts: 2
    • View Profile
Getting Started on a Mac
« on: April 10, 2015, 09:33:45 pm »
If anyone could help, it would be greatly appreciated

I am completely new to this and I am falling at the first hurdle, I am used to searching for workarounds and answers being a mac user, so hopefully someone out there can help out!


It is running Solarus that I can't get to work, I started by installing and following the fantastic video tutorial by ChristophoZS (https://www.youtube.com/watch?v=T9mEFmRVlBQ) and it is at the 4:33 mark that I receive the below error message:

Jamie$ /Users/Jamie/Documents/Solarus\ Game\ Maker/solarus-1.3.1-OSX/solarus/solarus ; exit;
dyld: Library not loaded: @rpath/libluajit-5.1.2.0.2.dylib
  Referenced from: /Users/Jamie/Documents/Solarus Game Maker/solarus-1.3.1-OSX/solarus/solarus
  Reason: image not found
Trace/BPT trap: 5
logout

[Process completed]


I have created a data file and quest and placed it in the root with the exe, to no avail.

Searching the net I discovered some information about the required frameworks, I have downloaded these and placed them in the /library/frameworks folder - I also located them within the solarus_bundle folder, within the contents of the solarus.app


I have come across another post on the forum:
 Topic: Solarus XD fails to execute on Mac OS X: dyld: Library not loaded: /usr/local/li  (Read 1022 times)

@vlag explains something needs to be added the framework file, but I really don't know where to start - if anyone could post a step by step solution to this issue I feel it would help alot of people, not just myself! As it has been read 1022 times it seems others are having the same issue

Forgive my naivety on the subject, I'm sure @vlag's soloution works, but as someone who has no prior experience in this territory I am struggling to follow - I'd really like to get started creating a Zelda game!

Thank you

vlag

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: Getting Started on a Mac
« Reply #1 on: April 13, 2015, 05:57:44 pm »
Hi,

Ok here is an exemple of what you have to do to unlock the situation :)

Actually, you just have to change a dependency path into the Solarus binary.
To do so, just open a Terminal (clic the glass on top right corner and type "Terminal"), and then copy/paste the following (I assume that the Solarus bundle is placed on the desktop and is named "Solarus.app", but you can change the following path if needed) :

install_name_tool -id @rpath/libluajit-5.1.2.0.2.dylib ~/Desktop/Solarus.app/Contents/Frameworks/libluajit-5.1.2.0.2.dylib
install_name_tool -change /usr/local/lib/libluajit-5.1.2.dylib @rpath/libluajit-5.1.2.0.2.dylib ~/Desktop/Solarus.app/Contents/Resources/Solarus

(I can't test right now, I'll edit this message if I did any typing mistake).


It should do the trick.

HylianLikely

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Getting Started on a Mac
« Reply #2 on: April 18, 2015, 10:55:24 pm »

Hi vlag,

Thank you for the response!  :D Still unfortunately no luck, double clicking and no launch.

I did get the message below in the terminal, so thought it may work:

Usage: /Library/Developer/CommandLineTools/usr/bin/install_name_tool [-change old new] ... [-rpath old new] ... [-add_rpath new] ... [-delete_rpath old] ... [-id name] input


Not sure what I am doing incorrectly, it isn't very clear for Mac users - I have downloaded Zelda Solarus DX, which seems to have the libluajit-5.1.2.0.2.dylib file inside, and that launches fine!

Perhaps I should wait until there is an update which fixes this

froggy77

  • Full Member
  • ***
  • Posts: 137
    • View Profile
Re: Getting Started on a Mac
« Reply #3 on: April 19, 2015, 07:54:20 pm »
Im' not a MAC user, but in general, if you get this kind of messages in a terminal, it means that you type something wrong in your command.
I see in your first post /Users/Jamie/Documents/Solarus Game Maker/solarus-1.3.1-OSX/solarus/solarus
Maybe you have spaces in the name of your path and install_name_tool considers that there are too many arguments in the command.

So if I were you, I would try renaming "Solarus Game Maker" by "Solarus_Game_Maker"
or just add double quote to your path "/Users/Jamie/Documents/Solarus Game Maker/solarus-1.3.1-OSX/solarus/solarus"

vlag

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: Getting Started on a Mac
« Reply #4 on: April 29, 2015, 04:34:26 pm »
Sorry I'm late again :)

In the meantime I just noticed that you were not using the OSX bundle, which explain why the command doesn't work, assuming that files path were correct.

In this case, you have to install each libraries and frameworks for a developer usage.
Basically, you just have to copy each .dylib files into /usr/local/lib (/usr is an hidden folder with the graphical interface), and each .framework folders into /Library/Frameworks.

There is just an extra step for .dylib files, you have to download the source code of each ones and for the given version, and copy each "include" folders into /usr/local/include.