Issues with running the samples..

New to Moai? Get started here with our best tips and tutorials.

Issues with running the samples..

Postby rachid.abdul » Wed Aug 10, 2011 2:35 pm

I can't seem to get any of the samples to run. As if the "run.sh" files aren't executing at all. The only thing it does is opens up an Xcode editor but does nothing else. I've been told to change the .sh extension to a .command extension which did allow it to execute but then returns "moai: command not found" response. Any ideas on what i should do next?



I'm coming from a PC background so pardon my lack of knowlege on how all this stuff on the Mac works.



Thanks!
rachid.abdul
 
Posts: 2
Joined: Wed Aug 10, 2011 9:23 pm

Issues with running the samples..

Postby josh » Thu Aug 11, 2011 7:11 am

Dolomite said:

I can't seem to get any of the samples to run. As if the "run.sh" files aren't executing at all. The only thing it does is opens up an Xcode editor but does nothing else. I've been told to change the .sh extension to a .command extension which did allow it to execute but then returns "moai: command not found" response. Any ideas on what i should do next?



I'm coming from a PC background so pardon my lack of knowlege on how all this stuff on the Mac works.



Thanks!




To execute run.sh files, you can't think of them like batch files in Windows. You actually have to execute them from the command line. To do this, open Terminal, navigate to the folder and do the command ./run.sh

This will execute the file properly. Let me know if you still run into issues.
josh
 
Posts: 36
Joined: Sat Apr 02, 2011 10:51 pm

Issues with running the samples..

Postby rachid.abdul » Thu Aug 11, 2011 2:13 pm

Ahh, thanks it works now! Smile
rachid.abdul
 
Posts: 2
Joined: Wed Aug 10, 2011 9:23 pm

Re: Issues with running the samples..

Postby Flink » Wed Jun 13, 2012 8:15 pm

I have the same problem, but even if i run the run.sh from the terminal it just open xcode and nothing happends, anyone know what's going on here?
Flink
 
Posts: 4
Joined: Wed Jun 13, 2012 7:59 pm

Re: Issues with running the samples..

Postby ibisum » Thu Jun 14, 2012 1:22 am

I've never seen a run.sh script open the XCode app before .. which one are you running?

In my case, I simply drop to terminal and either run.sh, or just plain "moai main.lua", since I've put the Mac OSX moai host in my PATH anyway .. works great.
;
--
ibisum@gmail.com
Got a MOAI snippet? Please consider adding it to http://moaisnippets.info
User avatar
ibisum
 
Posts: 1024
Joined: Mon Oct 17, 2011 1:11 am
Location: Vienna, Austria

Re: Issues with running the samples..

Postby Flink » Thu Jun 14, 2012 1:34 am

It worked if I moved the osx host to the same location at the main file and then just "moai main.lua", thou there's nothing appearing on the screen. it should be the animation basic sample....
Flink
 
Posts: 4
Joined: Wed Jun 13, 2012 7:59 pm

Re: Issues with running the samples..

Postby ibisum » Thu Jun 14, 2012 1:41 am

Something is definitely wrong with your technique. Build the OSX host binary, moai (& moai-untz if necessary) and put them somewhere in your PATH. To avoid confusion, I use /Users/ibisum/bin as my "personal archive of tools and binaries", and I recommend you do something similar. In my .bashrc, I have:

export PATH=$PATH:/Users/ibisum/bin/

.. and I have the 'moai' executable in that directory.

Then, go to one of the samples folders, where the main.lua is, and simply type 'moai main.lua' - no need to copy the binary around, etc. It should Just Plain Work. If it doesn't, you're doing something weird and different..
;
--
ibisum@gmail.com
Got a MOAI snippet? Please consider adding it to http://moaisnippets.info
User avatar
ibisum
 
Posts: 1024
Joined: Mon Oct 17, 2011 1:11 am
Location: Vienna, Austria

Re: Issues with running the samples..

Postby Flink » Thu Jun 14, 2012 4:02 am

So, I'm not that used to working on the mac, so could you explain about the .bashrc file?
Thou I built new host binaries and tried those to but with the same result, just a blank screen.

Just to check, there's nothing I need to do before starting developing that I've might not have done?
Flink
 
Posts: 4
Joined: Wed Jun 13, 2012 7:59 pm

Re: Issues with running the samples..

Postby ibisum » Thu Jun 14, 2012 4:58 am

The .bashrc (or .profile) file is there for customizations to things like your PATH that you want to make permanent. If you don't know what you're doing with the .bashrc or PATH, then its probably best to not tweak it too much .. but it can definitely be handy to have your own local User ~/bin folder to put tools like MOAI in.

I can't honestly say that I know whats going on in your case - as long as you've built the moai binary, things should 'just work' when you try to run it with a sample project. Maybe you can tell us more about what you did to build the binary - perhaps there's something non-obvious in that process which might provide a clue.
;
--
ibisum@gmail.com
Got a MOAI snippet? Please consider adding it to http://moaisnippets.info
User avatar
ibisum
 
Posts: 1024
Joined: Mon Oct 17, 2011 1:11 am
Location: Vienna, Austria

Re: Issues with running the samples..

Postby Flink » Thu Jun 14, 2012 7:47 am

I just opened the xcode project for the host and built it right away, both debug & release, didn't make any changes to it.

Thou I'm starting to think there's some other problem since both my own built binary and the original one is acting the same, maybe something related to my mac and not moai....
Flink
 
Posts: 4
Joined: Wed Jun 13, 2012 7:59 pm


Return to New Users

Who is online

Users browsing this forum: No registered users and 2 guests

x