Am 29.12.2011 um 03:45 schrieb Josh Dye:
Thx, I'll admit that I don't always write clean code. I applied all your patches


0001-Fixed-the-language-selection-of-Pingus.app.patch
0002-Added-a-link-to-the-MacOS_X_Compiling-wiki-page.patch
0003-Implemented-language-detection-for-Mac-OS-X.patch
0004-Removed-the-wrapper-script-from-the-app-bundle.patch
data-dir-check.patch

They all work, so I committed them to GIT

Thanks. One little wish for the future though: please use "git am" to apply such patches (like written in the initial mail about the language detection patch), since this keeps commit messages, authorship and the logical grouping of the changes. Now the history looks like this:
------8<------8<-----
commit 093d3eb273a01ed27f45d96f9c252be1046b8849
Author: Josh Dye <josh.jpeng...@gmail.com>
Date:   Wed Dec 28 18:42:46 2011 -0800

    Alot of code cleanups relating to OSX by Jonas
------8<------8<-----

While it could have been:
------8<------8<-----
commit 8f75c9ad1ce56bdf0201788088cad5287537a2f3
Author: jonas <jo...@fs.ei.tum.de>
Date:   Thu Dec 29 02:35:26 2011 +0100

    Removed the wrapper script from the app bundle

    Since the pingus executable is now by itself capable of finding the
data in the bundle as well as to detect the preferred language there
    is no need for the wrapper anymore.

commit 311149eea07cc303e4dc5207b5da69d60416549c
Author: jonas <jo...@fs.ei.tum.de>
Date:   Thu Dec 29 02:02:48 2011 +0100

    Implemented language detection for Mac OS X

    If an application is started via Finder the LC_MESSAGES is not set
    (at least not here in Leopard) so we fetch the first entry of the
    preferred languages from the global preferences.

commit fde6540558f110fdd74400fbf67d030c2822fd9a
Author: jonas <jo...@fs.ei.tum.de>
Date:   Wed Dec 28 23:15:51 2011 +0100

    Added a link to the MacOS_X_Compiling wiki page

commit 2e6c2843fb85dbd082f960eb4f87079199feda78
Author: jonas <jo...@fs.ei.tum.de>
Date:   Tue Dec 27 21:47:04 2011 +0100

    Fixed the language selection of Pingus.app

Due to missing escape chars the language got already selected at compile time. Now the current language is selected at run time of the lancher script.
------8<-----8<-----

From my experience a clean history with informative comments can help a lot when trying to understand foreign code, review changes and fix bugs.

bye,
Jonas


On Dec 28, 2011, at 6:08 PM, Jonas Bähr wrote:

Am 29.12.2011 um 02:10 schrieb Josh Dye:
I'll look at that right now, I didn't even think about that. Just found a fix, will test and commit
<osx.patch>

I've got some minor enhancements to the patch (cleaned patch attached):
*) stick to the current coding-style
*) Check the bundle path only when needed
*) make sure the CFURLRef is always freed when used
*) give the helper method a comprehensive name and make it a static bool

Thanks for your work,
bye,
Jonas
<data-dir-check.patch>


On Dec 28, 2011, at 3:12 PM, Jonas Bähr wrote:

Am 28.12.2011 um 23:22 schrieb Jonas Bähr:
Am 28.12.2011 um 20:19 schrieb Josh Dye:
It has major GFX problems, at least on my compi=uter, the build that I am doing has the same problems- I want to make sure it's not just my computer-- http://www.mediafire.com/?gl4gzlnt1faj565

PS-- I'm not sure if your build system will work anymore
http://code.google.com/p/pingus/wiki/MacOS_X_Compiling

It is still working, I just checked.

There is something else that now stopped working though: launching pingus from the source dir (without specifying the -- datadir) While this is not critical, it's annoying. Responsible for that are the changes 54d9e1e9 and 6ee7570b. What do you think about a check, whether the application was executed from a bundle or not? Or checking if "data" exists in either location before setting it? Don't get me wrong, the ability to use the bundle's resource dir out of the box is nice (removes the need for a wrapper script) but loosing the option to simply start pingus during development is not so nice.

bye,
Jonas

also referenced the wiki page in my INSTALL.macosx. I'm sure it'll be helpfull for those who want to do everything by hand. See the attached patches. It also fixes the compile-time/run- time language detection issue Andy ran into.

bye,
Jonas
<macosx-build-fixes.tar.bz2>


My x86_64 build (new build system) http://www.mediafire.com/?tf1kv01f6qzqaec


On Dec 27, 2011, at 11:32 AM, Jonas Bähr wrote:

Hi,

Am 27.12.2011 um 19:55 schrieb Andy Milne:

Thanks for the Mac port. But, sorry to report it has a couple of problems: 1. It crashes as soon as I click on the play checkbox of any level that I select.

Please try to start pingus in a terminal, maybe it reports some errors there. To do so, cd to the folder containing Pingus.app (e.g. "cd / Applications/Games/"), then execute "Pingus.app/Contents/MacOS/ pingus"
Here I get the following output:
--------8<--------8<--------
$ Pingus.app/Contents/MacOS/pingus
Welcome to Pingus 0.7.6!
========================
userdir:                 /Users/jonas/.pingus/
datadir:                 Pingus.app/Contents//data
language:                German (de)
sound support:           enabled
music support:           enabled
fullscreen:              disabled

2011-12-27 20:30:10.229 pingus[328:613] Warning once: This application, or a library it uses, is using NSQuickDrawView, which has been deprecated. Apps should cease use of QuickDraw and move to Quartz.
--------8<--------8<--------

2. It defaults to German, which is ok, but the --language option does not work to change it.

Sorry, that's my fault. I just saw that the language was selected at compile time instead of run time. To fix it, open "Pingus.app/Contents/MacOS/pingus" using a text editor and change the second line to "lang=<what you need>".
Currently the line reads "lang=de" but it should be:
------8<--------8<------
lang=`defaults read .GlobalPreferences AppleLanguages | tr -d [:space:] | cut -c2-3`
------8<--------8<------
Apparently I missed to escape the back ticks, so this was executed while I build pingus already. Another problem with this language detection is, that it only works with two-letter codes, so something like "pt_BR" won't be detect correctly.

Which version of OSX should it work with? I'm running 64bit 10.7.2

I build it on 32 bit intel, using 10.5 "Leopard". Here I can play levels but some graphics are missing.

bye,
Jonas




On Tue, Dec 27, 2011 at 5:33 AM, Ingo Ruhnke <grum...@gmail.com> wrote: On 24 December 2011 23:45, Ingo Ruhnke <grum...@gmail.com> wrote:
Pingus 0.7.6 is out, not much changes to the core game, but 10 brand
new Xmas themed levels.

* added new SVG icons for Pingus
* added 10 new xmas themed levels
* added ability to sort levelsets by priority

Download: http://pingus.seul.org

Jonas Bähr <jonas.ba...@web.de> build a MacOSX port of it, available at:

http://pingus.googlecode.com/files/Pingus-0.7.6.dmg

--
Blog:     http://grumbel.blogspot.com/
JabberID: xmpp:grum...@jabber.org
ICQ:      59461927

_______________________________________________
Pingus-Devel mailing list
Pingus-Devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/pingus-devel



_______________________________________________
Pingus-Devel mailing list
Pingus-Devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/pingus-devel


_______________________________________________
Pingus-Devel mailing list
Pingus-Devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/pingus-devel

_______________________________________________
Pingus-Devel mailing list
Pingus-Devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/pingus-devel


_______________________________________________
Pingus-Devel mailing list
Pingus-Devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/pingus-devel

_______________________________________________
Pingus-Devel mailing list
Pingus-Devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/pingus-devel

_______________________________________________
Pingus-Devel mailing list
Pingus-Devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/pingus-devel


_______________________________________________
Pingus-Devel mailing list
Pingus-Devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/pingus-devel


_______________________________________________
Pingus-Devel mailing list
Pingus-Devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/pingus-devel

Reply via email to