Problems with MacOS

Previous topic - Next topic

t-spy

I've made an aplication with glbasic wich runs on windows but on a Mac computer it does nothing. Just open and closes inmediatly. I just copy the .app dir to Mac. May i did something more to run my application?.

I'm using an iMac with Snow Leopard and the latest glbasic version.

Sorry for my bad english.

MrTAToad

Does it require any media ?

Ian Price

Quote from: MrTAToad on 2011-Feb-02
Does it require any media ?

Indeed - that was my first guess too. Have you copied the Media from the Windows version into the Media folder for the Mac version? GLB doesn't copy across the Media contents, you have to do that manually.

However, lack of media desn't generally cause a program to close (on Windows anyway).
I came. I saw. I played.

MrTAToad

No, it should be - unless of course the program is designed to.

Try running the executable part from Terminal - hopefully that should show something...

doimus

#4
It's probably the permissions thingy. See this thread:

http://www.glbasic.com/forum/index.php?topic=5437.msg42586#msg42586


Or in short, the solution is this:
I'm assuming you've got GLB app called MyGame

- Open Terminal window
- navigate to the folder where MyGame.app is saved
- type "cd MyGame.app/Contents/MacOS"
- type "chmod +x MacOSX"
- type "./MacOSX" to run it (or click on app icon in Finder).

t-spy

Changed the permissions and now i have this error (i'm not using any resources):

Process:         MacOSX [5341]
Path:            /Users/angel/Downloads/pru.app/Contents/MacOS/MacOSX
Identifier:      GLBasic.com
Version:         ??? (???)
Code Type:       X86 (Native)
Parent Process:  launchd [127]

Date/Time:       2011-02-02 19:23:32.919 +0100
OS Version:      Mac OS X 10.6.6 (10J567)
Report Version:  6

Interval Since Last Report:          267364 sec
Crashes Since Last Report:           11
Per-App Crashes Since Last Report:   1
Anonymous UUID:                      91582920-4E6D-4D6E-A62F-1E580CA21653

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000
Crashed Thread:  0

Dyld Error Message:
Library not loaded:
@executable_path/../Frameworks/SDL.framework/Versions/A/SDL
Referenced from: /Users/angel/Downloads/pru.app/Contents/MacOS/MacOSX
Reason: image not found


MrTAToad

Can you check to make sure that the SDL library is in one of the Framework directories ?

t-spy

Yes. It's on the Contents\Frameworks\SDL.framework\Versions\A directory of my app.

Here is all the contents of my app.

Contents
   1.066 Info.plist
<DIR>          Resources
<DIR>          Frameworks

Contents\MacOS

   3.679.008 MacOSX

Contents\Resources

   103.013 Icon.icns

Contents\Frameworks

<DIR>          SDL_mixer.framework
<DIR>          SDL.framework

Contents\Frameworks\SDL_mixer.framework

   24 Headers
   26 Resources
   26 SDL_mixer
<DIR>          Versions

Contents\Frameworks\SDL_mixer.framework\Versions

   1 Current

Contents\Frameworks\SDL_mixer.framework\Versions\A

   3.674.436 SDL_mixer
<DIR>          Resources
<DIR>          Headers

Contents\Frameworks\SDL_mixer.framework\Versions\A\Resources

   814 Info.plist

Contents\Frameworks\SDL_mixer.framework\Versions\A\Headers

   25.516 SDL_mixer.h

Contents\Frameworks\SDL.framework

   24 Headers
   26 Resources
   20 SDL
<DIR>          Versions

Contents\Frameworks\SDL.framework\Versions

   1 Current

Contents\Frameworks\SDL.framework\Versions\A

   4.530.452 SDL
<DIR>          Resources
<DIR>          Headers

Contents\Frameworks\SDL.framework\Versions\A\Resources

   797 Info.plist
<DIR>          SDLMain.nib

Contents\Frameworks\SDL.framework\Versions\A\Resources\SDLMain.nib

   302 classes.nib
   352 info.nib
   1.701 objects.nib

Contents\Frameworks\SDL.framework\Versions\A\Headers

   4.327 begin_code.h
   1.423 close_code.h
   3.133 SDL.h
   1.875 SDL_active.h
   10.879 SDL_audio.h
   910 SDL_byteorder.h
   5.657 SDL_cdrom.h
   1.474 SDL_config.h
   2.803 SDL_config_dreamcast.h
   2.801 SDL_config_macos.h
   3.537 SDL_config_macosx.h
   3.635 SDL_config_os2.h
   4.507 SDL_config_win32.h
   869 SDL_copying.h
   2.303 SDL_cpuinfo.h
   5.653 SDL_endian.h
   1.762 SDL_error.h
   12.564 SDL_events.h
   910 SDL_getenv.h
   5.203 SDL_joystick.h
   3.885 SDL_keyboard.h
   7.160 SDL_keysym.h
   2.769 SDL_loadso.h
   2.732 SDL_main.h
   4.535 SDL_mouse.h
   5.707 SDL_mutex.h
   183 SDL_name.h
   336.232 SDL_opengl.h
   2.516 SDL_platform.h
   1.919 SDL_quit.h
   4.783 SDL_rwops.h
   15.611 SDL_stdinc.h
   5.991 SDL_syswm.h
   4.436 SDL_thread.h
   4.424 SDL_timer.h
   910 SDL_types.h
   2.557 SDL_version.h
   37.051 SDL_video.h


MrTAToad

Is the directory structure 9/pru.app/Contents/MacOS/MacOSX) correct ?

t-spy


MrTAToad

I'm just wondering why its MacOS/MacOSX

t-spy

MacOSX is te executable file. It's located on the MacOS dir and is how glbasic generate the package.

MrTAToad


Kitty Hello

I should have named it glb-macos-exe  =D :D

MrTAToad

It comes of not having a Mac to check :)