User talk:Nicfagn

From Stellarium Wiki
Jump to: navigation, search

Contents

Building Universal Binaries

Nic,

I've updated the page to include both our procedures and to indicate the dependency on Fink and SDL.

Please check one thing in your build -

As a workaround you can copy the libgnuintl.h.in file in the stellarium-0.8.1/intl folder to a file named libgnuintl.h in the same folder and replace in it the string @HAVE_POSIX_PRINTF@ with the string HAVE_POSIX_PRINTF. 

Should probably be:

As a workaround you can copy the libgnuintl.h.in file in the stellarium-0.8.1/intl folder to a file named libgnuintl.h in the same folder and replace in it the string @HAVE_POSIX_PRINTF@ with 1.

--Mheinz 06:13, 30 September 2006 (PDT)


I updated the instructions for building without Fink so that they are less of an hack. What do you think?

--Nicfagn 00:51, 2 October 2006 (PDT)

New changes

The new changes are really good, Nic - I've avoided modifying configure scripts in the past because it can get really hairy, but it looks like you found a very simple fix.

Actually, you've kind of inspired me. I'll take a look at configure and autogen.sh (the script that creates configure) and see if I can create a "real" darwin target so that we don't have to do any of these hacks in the future.

--Mheinz 04:07, 2 October 2006 (PDT)

In my experiments I also achieved the same result applying the modification to configure.ac (the much shorter file that is the source of configure) and running autoconf. This generated a little different configure script but still working for the xcode project. That should be the way to go on Mac OS X, but it is up to the main project maintainers to evaluate its suitability.

In the meantime and as a simpler workaround I preferred the direct configure manipulation.

--Nicfagn 10:23, 2 October 2006 (PDT)

Still having build problems...

Nic,

Check your build - the builds I get still have problems - the cursor keys and other non-printable keys (like cmd-q) do not work; this was a problem with an earlier Stellarium build that is fixed in the "real" 0.8.1 release.

Do you see this problem or is it something unique to machine?

Also, I discovered that sound doesn't work in any mac release *anyway* so I don't know why we even bother compiling with the SDL framework. When you try to run an audio script, no sound is produced, and there are console messages that "compiled without sound support".

--Mheinz 05:30, 2 October 2006 (PDT)


I did a quick check for the keys you mentioned and they all works on my system. I can pan with arrow keys and quit the app with cmd-q.

About audio, I knew it was planned from SDL-Mixer inclusion, but I never tried it. When I'll have some spare time to try I'll let you know if it works for me.

Nic--Nicfagn 10:28, 2 October 2006 (PDT)

Sound definitely won't work because it isn't defined in macosx/config.h; when I turned it on, the sound would play, but then stellarium would crash on a double-free. An update on the arrow keys: They work for me during normal operation, but they do *not* work when I am in the menu. With the released version of Stellarium, I can select a menu item (for scripting) by pressing m, then down arrow till the item I want appears. With the version I built, the arrow key does not work in that case.

--Mheinz 03:35, 3 October 2006 (PDT)

Sound: it does not work for any version, built or downloaded, both on Intel or PowerPc Macs.

Keys: is the same for me, I'm quite new to Stellarium and don't use most of it's functions, so I din't notice. I found that the unicode value of the pressed key doesn't match the expected SDL key constant, perhaps a configuration problem, don't know...

I hacked it so it works, in the handleKeys method of stelapp.cpp I changed the line:

if (ui->handle_keys_tui(unicode, tuiv)) return 1;

to:

if (ui->handle_keys_tui(key, tuiv)) return 1;

so the ascii code is used for confrontation, but the unicode value was surely there for something!

--Nicfagn 06:04, 3 October 2006 (PDT)

Build problems solved.

Nigel just put in a patch that fixes the menu key problems. If you know how to use the patch command, you should be able to cut-and-paste the following diff and patch stellarium. If you don't know patch, you can still update the source by going to line 340 in stelapp.cpp and adding the lines that have the plus marks.

Index: stelapp.cpp 
===================================================================
RCS file: /cvsroot/stellarium/stellarium/src/stelapp.cpp,v
retrieving revision 1.36
diff -c -w -r1.36 stelapp.cpp
*** stelapp.cpp 13 Sep 2006 15:55:24 -0000  1.36
--- stelapp.cpp 5 Oct 2006 11:21:43 -0000
***************
*** 337,346 ****
--- 337,364 ----
           SelectedScriptDirectory = SelectedScript = "";
           return 1;
       }
+ #ifdef MACOSX
+       if ( key == SDLK_LEFT ||  
+            key == SDLK_RIGHT || 
+            key == SDLK_UP || 
+            key == SDLK_DOWN || 
+            key == SDLK_BACKSPACE ) {
+           if (ui->handle_keys_tui(key, tuiv)) return 1;
+       }       
+ #endif
       if (ui->handle_keys_tui(unicode, tuiv)) return 1;
       return 1;
   }
+ #ifdef MACOSX 
+   if ( key == SDLK_LEFT || 
+        key == SDLK_RIGHT || 
+        key == SDLK_UP || 
+        key == SDLK_DOWN || 
+        key == SDLK_BACKSPACE ) {
+       if (ui->handle_keys(key, mod, key, state)) return 1;
+   }
+ #endif
   if (ui->handle_keys(key, mod, unicode, state)) return 1;
   if (state == S_GUI_PRESSED)

--Mheinz 04:25, 5 October 2006 (PDT)


Great, hopefully this means that an official universal release of the latest and greatest Stellarium is not too far away!

Cheers --Nicfagn 09:39, 5 October 2006 (PDT)

Personal tools
Namespaces
Variants
Actions
in this wiki
other languages
Toolbox