-
Notifications
You must be signed in to change notification settings - Fork 29
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
Can't lunch the build app on OS X #42
Comments
The .app wrapper actually contains Ruby 1.9.2 so that is what it will run your game with. It shouldn't matter what version is used to build it though (It has been tested with 1.8.7, 1.9.2 & 1.9.3, though I recommend 1.9.3). The usual problem with an application not starting (.exe/.app) is that assets are being loaded based on an assumption of where the working directory is (you should always use file-relative paths). Obviously not the problem with your minimal example, of course! I don't have access to OSX myself, so I will see if I can get someone to sanity check this for you - sorry! |
@Swatto |
@jlnr Thanks for that ! I didn't know the possibility to see errors here. Here's the errors that OS X have :
Any ideas ? |
The error you are looking for should be referring to "com.example.testing" not "com.apple.launchd.peruser" since that is the main reason for setting the #url in Releasy, I think. waits for jlnr to provide wisdom |
�@Swatto: I am not sure why Console is not showing anything useful, it used to do so... @spooner Is Releasy redirecting So what I did is to run the game inside the
And sure enough, main.rb does a |
@jlnr If Releasy is in verbose mode, then it should not suppress any messages at all. I did see that line last time I looked at Releasy and thought "that shouldn't work", but since no-one had complained, I assumed it did ;) It should be an absolute, not relative path, since I don't know what dir the application has been run in - I can only assume that previous tests did work but that default directory has changed since then. I hope I didn't add that in a fit of madness after the last OSX test :$ Presumably it worked when you commented out that line (or changed it to the correct path relative to |
@spooner Do you think you can fix that or you don't know why it fails ? |
@spooner I think it'd work just fine if you replaced Also, strictly speaking, the file inside |
Hmm, it should be created as Main.rb, but I suppose that wouldn't be an error when I test it on Windows if I did get that wrong :/ The "application/main" is just running the executable the user defined. |
@Swatto I think jlnr worked it out last night. The workaround (without having to hack the generated files and until I fix Releasy :$) is to avoid having any files called "main.rb" in your game. Please confirm if this works and I'll make a proper bug report for this issue. Thanks! |
I confirm : this solve my problem with this simple test. Name a file "main.rb" breaks on OS X. Now I need to debug my real game that don't launch too. I will post here the newest version if you can help me (this will be the gift for my godson's birthday). |
I rename my "main.rb' but I can't launch it too. Sorry for the french comment but my godson want to learn programming so I explain the code of the game. |
Had a poke around: Releasy isn't a run-time dependency, so you should do this in your gemfile:
This means it won't get included in the Releasy releases or pointlessly loaded when you start the game itself, but you will need to change your rakefile:
Don't use MP3 sounds, since they aren't supported by Gosu on all platforms (e.g. I couldn't get them to work on Windows). Use Ogg Vorbis (.ogg) instead - you can use Audacity to convert them easily! |
Oh, otherwise it seemed OK. You correctly set the Chingu asset load paths and use |
Thanks for you answer. I do respectively everything :
This don't fix the problem. Here's the log that the console gives me :
If you try to build it on your computer, does it failed or not ? Could we try to fix it on my repo to avoid to spam here and take the conclusion of the modification to fix Releasy ? |
Well, it runs on Windows, now that the ogg files replaced the mp3s, which helps me ;) I tried building with Ocra and it didn't seem to like
Note that there is absolutely no reason to use Bundler inside an exe/app, since there can't be more than one version of the gems. All using it does is extend the duration of the startup phase. This is something I need to document further...eventually. |
This simple line require 'bundler/setup' unless defined?(OSX_EXECUTABLE) or ENV['OCRA_EXECUTABLE'] Fix everything. Thank you for your patience. I think you should edit your readme file with the Main.rb issue and this line too. |
Had the same issue. Try moving the app out of the dmg onto your desktop or to Applications. |
@ariejan it's looks like logic to me if the program want to write some code in the app (like high score) in the dmg, it will crash. |
You should really be writing high scores (or settings files) into somewhere like |
And how could it be done ? The arborescence of the disc is different on Mac and Windows. |
#expand_path will resolve the ~ for you to the user's home directory. You could alternatively use |
When I finally got Rake to work (after struggling with version hell for an hour or two), the app wouldn't load at all. I checked the contents of the .app package and found that there was something wrong in
The original line, which only |
Regarding Rake, you should just be able to use "bundle exec rake". I suspect, however, that I should be a lot more permissive about rake versions. |
Oops - edit: I'll also try to reproduce the |
I closed this because it should have been posted in the issue actually dealing with main.rb (#44) |
After failling to launch complex game width releasy, I decide to test width the simplest code as possible :
I write the Rakefile :
I run the build and everything seems to work :
But when I lunch the app, it closes instantly the game (no message and no error visible).
I try with ruby 1.9.2 and 1.9.1 : no difference.
For information, I'm on Mac OS 10.8.2.
The text was updated successfully, but these errors were encountered: