How is OS X development proceeding?

The place to discuss creating, porting and modifying Celestia's source code.
Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #101by selden » 02.07.2003, 19:11

Jules,

A quich google search of "imac site:nasa.gov" did not turn up any mention of a project specifically for iMacs. Can you provide more information?
Selden

Topic author
julesstoop
Posts: 408
Joined: 27.03.2002
With us: 22 years 7 months
Location: Leiden, The Netherlands

Post #102by julesstoop » 03.07.2003, 20:08

http://science.nasa.gov/headlines/y2003 ... list893686

I guess this is it(?) Maybe the advertisement agency involved just translated 'flat-screen computers' to pictures of iMacs.


[edit]
No, its on the Apple site as well now:

http://www.apple.com/hotnews/

[/edit]
Lapinism matters!
http://settuno.com/

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #103by selden » 03.07.2003, 20:34

My guess is that the exhibits use iMacs because Apple donated them and is paying to package and ship the exhibits between libraries. Remember that NASA is really strapped for cash these days. I wouldn't read too much into it.

I can't find anything specific about the model of "plasma display", though. They tend to be rather expensive. Apparently ALSC (not NASA) is paying for librarians to go to a training session (although they're mostly in conjunction with ALA meetings, where many librarians would be going anyhow).
Selden

Topic author
julesstoop
Posts: 408
Joined: 27.03.2002
With us: 22 years 7 months
Location: Leiden, The Netherlands

Post #104by julesstoop » 03.07.2003, 23:54

Still, I believe, NASA would want to run decent software on these machines, and celestia would fit in nicely with their goals.

nuff said on this subject, I guess.
Lapinism matters!
http://settuno.com/

scienceman
Posts: 30
Joined: 29.06.2003
With us: 21 years 4 months

Building from CVS; missing features

Post #105by scienceman » 10.07.2003, 00:18

Hi,

I guess I was confused about the availability of the Mac OS X version, since the celestia.sourceforge.net site downloads directory only has the link to the 1.2.5 dmg. By navigating to sourceforge.net/projects/celestia and then to the files directory, I found the 1.3.0a1 version you mentioned. Parhaps someone could fix the main site page downoads link so other peole don't make the same mistake I did?

You mentioned cvs -- how would one set up to get the cvs version? I am especially interested in the MySQL add-on, which is available so far with Windows-only oriented build procedures, but perhaps by learning how to build the main application from the latest source, I can figure out how to adapt the add-on build to Unix / Mac OS X. So forgive the uneducated question -- I have never fetched a cvs version of the source for any sourceforge project before -- could you educates us as to how this is done?

Thanks.

HankR

Post #106by HankR » 16.07.2003, 06:38

scienceman,

1. Are you familiar with the Terminal app and basic unix commands?

2. Have you installed the Apple Mac OS X developer tools?

3. Are you familiar with ProjectBuilder and InterfaceBuilder?

4. Are you familiar with Objective-C and Cocoa?

- Hank

scienceman
Posts: 30
Joined: 29.06.2003
With us: 21 years 4 months

Post #107by scienceman » 16.07.2003, 19:58

Hi,

1. Yes.

2. Yes.

3. Moderately

4. Slightly; better w/ C++, C and Java

Thanks...

HankR

Building Celestia for MacOS X

Post #108by HankR » 17.07.2003, 03:43

scienceman,

Great. You should have no trouble.

Open a Terminal window and do the following:

Code: Select all

$ cd
$ mkdir celcvs
$ cd celcvs
$ cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/celestia login
$ cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/celestia checkout celestia
$ cd celestia/macosx
$ open celestia.pbproj

Just hit return when you're prompted for the CVS login password.

When Project Builder opens, click on the "Broom" icon to clean all targets. Then click on the "Hammer and Monitor" icon to build and run. If all goes well, the build will complete successfully and the Celestia app will launch automatically.

Objective-C is a superset of standard C with a very small number of additions for object-oriented programming borrowed from Smalltalk. If you know C and Java it won't be hard to pick up. The only really weird thing is the method invocation syntax, which uses square brackets and embeds the arguments in the method name with colons. (You'll get used to it.)

To use Cocoa effectively there's a lot to learn, but there's plenty of documentation in the /Developer directory and on the Apple website. Unlike in Java, dynamic memory management requires attention: garbage collection is handled automatically, but you have to manage the reference counts manually. Otherwise, things are pretty easy.

All of the core Celestia code is C++, of course. Good luck with that.

Currently there's just one nib file for the entire GUI. I would recommend that you create new nib files for your major GUI additions, to minimize the work when it comes time to merge.

Have fun. Let me know if you have any problems.

- Hank

scienceman
Posts: 30
Joined: 29.06.2003
With us: 21 years 4 months

Build failures from cvs version

Post #109by scienceman » 18.07.2003, 23:03

HI,

Thanks! This went well up to the following point, for the cvs version fetched as of today. I am guessing that this is not a MacOS X - specific problem, and instead one of the vagaries of working from raw cvs?

CelestiaOpenGLView.m: In function `-[CelestiaOpenGLView mouseDown:]':
CelestiaOpenGLView.m:183: parse error before `location'
CelestiaOpenGLView.m:186: `appCore' undeclared (first use in this function)
CelestiaOpenGLView.m:186: (Each undeclared identifier is reported only once
CelestiaOpenGLView.m:186: for each function it appears in.)
CelestiaOpenGLView.m:186: `location' undeclared (first use in this function)
CelestiaOpenGLView.m: In function `-[CelestiaOpenGLView mouseUp:]':
CelestiaOpenGLView.m:197: parse error before `location'
CelestiaOpenGLView.m:200: `appCore' undeclared (first use in this function)
CelestiaOpenGLView.m:200: `location' undeclared (first use in this function)
CelestiaOpenGLView.m: In function `-[CelestiaOpenGLView mouseDragged:]':
CelestiaOpenGLView.m:210: parse error before `*'
CelestiaOpenGLView.m:212: `appCore' undeclared (first use in this function)
CelestiaOpenGLView.m: In function `-[CelestiaOpenGLView writeStringToPasteboard:]':
CelestiaOpenGLView.m:290: parse error before `*'
CelestiaOpenGLView.m:291: `appCore' undeclared (first use in this function)
CelestiaOpenGLView.m: In function `-[CelestiaOpenGLView readStringFromPasteboard:]':
CelestiaOpenGLView.m:304: parse error before `*'
CelestiaOpenGLView.m:305: `appCore' undeclared (first use in this function)
CelestiaOpenGLView.m:183: parse error before `location'
CelestiaOpenGLView.m:186: `appCore' undeclared (first use in this function)
CelestiaOpenGLView.m:186: (Each undeclared identifier is reported only once
CelestiaOpenGLView.m:186: for each function it appears in.)
CelestiaOpenGLView.m:186: `location' undeclared (first use in this function)
CelestiaOpenGLView.m:197: parse error before `location'
CelestiaOpenGLView.m:200: `appCore' undeclared (first use in this function)
CelestiaOpenGLView.m:200: `location' undeclared (first use in this function)
CelestiaOpenGLView.m:210: parse error before `*'
CelestiaOpenGLView.m:212: `appCore' undeclared (first use in this function)
CelestiaOpenGLView.m:290: parse error before `*'
CelestiaOpenGLView.m:291: `appCore' undeclared (first use in this function)
CelestiaOpenGLView.m:304: parse error before `*'
CelestiaOpenGLView.m:305: `appCore' undeclared (first use in this function)
Last edited by scienceman on 26.07.2003, 21:49, edited 1 time in total.

HankR

Post #110by HankR » 19.07.2003, 01:43

What version of MacOS X are you using?

- Hank

HankR

Post #111by HankR » 19.07.2003, 01:51

Also, was that the complete compiler error output?

- Hank

scienceman
Posts: 30
Joined: 29.06.2003
With us: 21 years 4 months

Build error for Celestia cvs

Post #112by scienceman » 20.07.2003, 04:05

Hi,

MacOS X 10.2.6 with the Dec 2002 Developer Tools.
That was the complete error output, as above.

Thx

HankR

Post #113by HankR » 21.07.2003, 01:51

Possibly your copy of the file 'CelestiaOpenGLView.m' is corrupted.
Try this:

Code: Select all

$ cd ~/celcvs/celestia/macosx
$ cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/celestia diff CelestiaOpenGLView.m

- Hank

scienceman
Posts: 30
Joined: 29.06.2003
With us: 21 years 4 months

Repeated cvs fetch, still same problem

Post #114by scienceman » 23.07.2003, 04:22

Hi,

This comparison showed no differences. Just to be sure, I wiped out the whole celcvs directory tree completely and restored it from cvs again as above. Followed all instructions exactly as above -- still with same result.

Backing up just a bit further in the error stream for clarity, here is a record of the last successfully compiled routine and its warning messages, followed by the beginning of the error messages above. Note that there is an appCore-related warning during the compilation of CelestiaController... Is this a hint?

CompileC /Users/xxxx/Development/celcvs/celestia/macosx/build/celestia.build/celestia.build/Objects-normal/ppc/CelestiaController.o
/usr/bin/gcc2 -c -F/Users/xxxx/Development/celcvs/celestia/macosx/build -I/Users/xxxx/Development/celcvs/celestia/macosx/build/include -I../src -arch ppc -fno-common -fpascal-strings -O0 -Wmost -Wno-four-char-constants -Wno-unknown-pragmas -pipe -g -precomp-trustfile /Users/xxxx/Development/celcvs/celestia/macosx/build/celestia.build/celestia.build/TrustedPrecomps.txt -Wp,-header-mapfile,/Users/xxxx/Development/celcvs/celestia/macosx/build/celestia.build/celestia.build/Celestia.hmap "-DWORDS_BIGENDIAN=1" "-DMACOSX=1" "-DPNG_SUPPORT=1" "-DSTDC_HEADERS=1" "-DCONFIG_DATA_DIR=/usr/local/share/celestia" "-DHAVE_LIBJPEG=1" "-DHAVE_LIBPNG=1" "-DPACKAGE=celestia" "-DVERSION=1.2.4" "-DMACOSX_PB=1" "-DDEBUG=1" CelestiaController.m -o /Users/xxxx/Development/celcvs/celestia/macosx/build/celestia.build/celestia.build/Objects-normal/ppc/CelestiaController.o
CelestiaController.m: In function `-[CelestiaController itemFlag:]':
CelestiaController.m:210: warning: `CelestiaSimulation' does not respond to `getTimeScale'
CelestiaController.m: In function `-[CelestiaController activateMenuItem:]':
CelestiaController.m:276: warning: local declaration of `appCore' hides instance variable

CompileC /Users/xxxx/Development/celcvs/celestia/macosx/build/celestia.build/celestia.build/Objects-normal/ppc/CelestiaOpenGLView.o
/usr/bin/gcc2 -c -F/Users/xxxx/Development/celcvs/celestia/macosx/build -I/Users/xxxx/Development/celcvs/celestia/macosx/build/include -I../src -arch ppc -fno-common -fpascal-strings -O0 -Wmost -Wno-four-char-constants -Wno-unknown-pragmas -pipe -g -precomp-trustfile /Users/xxxx/Development/celcvs/celestia/macosx/build/celestia.build/celestia.build/TrustedPrecomps.txt -Wp,-header-mapfile,/Users/xxxx/Development/celcvs/celestia/macosx/build/celestia.build/celestia.build/Celestia.hmap "-DWORDS_BIGENDIAN=1" "-DMACOSX=1" "-DPNG_SUPPORT=1" "-DSTDC_HEADERS=1" "-DCONFIG_DATA_DIR=/usr/local/share/celestia" "-DHAVE_LIBJPEG=1" "-DHAVE_LIBPNG=1" "-DPACKAGE=celestia" "-DVERSION=1.2.4" "-DMACOSX_PB=1" "-DDEBUG=1" CelestiaOpenGLView.m -o /Users/xxxx/Development/celcvs/celestia/macosx/build/celestia.build/celestia.build/Objects-normal/ppc/CelestiaOpenGLView.o
CelestiaOpenGLView.m: In function `-[CelestiaOpenGLView mouseDown:]':
CelestiaOpenGLView.m:183: parse error before `location'
CelestiaOpenGLView.m:186: `appCore' undeclared (first use in this function)
CelestiaOpenGLView.m:186: (Each undeclared identifier is reported only once
CelestiaOpenGLView.m:186: for each function it appears in.)
CelestiaOpenGLView.m:186: `location' undeclared (first use in this function)
CelestiaOpenGLView.m: In function `-[CelestiaOpenGLView mouseUp:]':
CelestiaOpenGLView.m:197: parse error before `location'
CelestiaOpenGLView.m:200: `appCore' undeclared (first use in this function)
CelestiaOpenGLView.m:200: `location' undeclared (first use in this function)
CelestiaOpenGLView.m: In function `-[CelestiaOpenGLView mouseDragged:]':
(etc.)

Thanks
Last edited by scienceman on 26.07.2003, 21:48, edited 1 time in total.

HankR

Post #115by HankR » 23.07.2003, 05:44

I have to confess I'm a little baffled by this.

I'm using the July 2002 Developer Tools, and the compile output I get is quite different from what you're seeing, although I get the same warnings for 'CelestiaController.m':

/usr/bin/jam -d1 JAMBASE=/Developer/Makefiles/pbx_jamfiles/ProjectBuilderJambase JAMFILE=- build ACTION=build _DEFAULT_GCC_VERSION=3.1 BUILD_STYLE=Development CPP_HEADERMAP_FILE=/Users/.../cel131/celestia/macosx/build/celestia.build/celestia.build/Celestia.hmap SRCROOT=/Users/.../cel131/celestia/macosx OBJROOT=/Users/.../cel131/celestia/macosx/build SYMROOT=/Users/.../cel131/celestia/macosx/build DSTROOT=/tmp/celestia.dst
...updating 11 target(s)...
Cp /Users/.../cel131/celestia/macosx/build/Celestia.app/Contents/PkgInfo
BuildPhase <CopyResources>Celestia.app
Completed phase <CopyResources> for <CopyResources>Celestia.app
BuildPhase <CopyFiles>Celestia.app
Completed phase <CopyFiles> for <CopyFiles>Celestia.app
CompileC /Users/.../cel131/celestia/macosx/build/celestia.build/celestia.build/Objects-normal/ppc/CelestiaController.o
CelestiaController.m: In function `-[CelestiaController itemFlag:]':
CelestiaController.m:210: warning: `CelestiaSimulation' does not respond to `getTimeScale'
CelestiaController.m: In function `-[CelestiaController activateMenuItem:]':
CelestiaController.m:276: warning: local declaration of `appCore' hides instance variable

I don't think these warnings have anything to do with the error reported in 'CelestiaOpenGLView.m'. The first error message in that file says there's a parse error before 'location' on line 183. The following errors are probably a consequence of the initial parse error.

I'm wondering if there might be a problem using the identifier 'location'. I don't know why it should, but try changing the identifier 'location' to 'mouseLocation' on lines 183 and 186 and see what you get.

- Hank

scienceman
Posts: 30
Joined: 29.06.2003
With us: 21 years 4 months

CelestiaOpenGLView compilation problems

Post #116by scienceman » 25.07.2003, 15:24

Tried this and a few variations. It's appCore that seems to be undefined when it gets to this point.

HankR

Post #117by HankR » 25.07.2003, 17:05

When you renamed 'location' to 'mouseLocation', what were the initial error messages?

- Hank

HankR

Post #118by HankR » 25.07.2003, 17:44

Another possibility is that the compiler is having a problem with declarations not being at the beginning of a block. Try putting the declarations of 'location' and 'appCore' and the statement that follows them in a block by enclosing them in braces {}.

- Hank

scienceman
Posts: 30
Joined: 29.06.2003
With us: 21 years 4 months

Enclosing declarations in blocks fixes compile problems

Post #119by scienceman » 26.07.2003, 20:02

Hi,

This worked. I enclosed the declarations and following single statements in blocks for all examples related to the errors listed above, and CelestiaOpenGLView.m now builds without complaint. An example is given below.

Code: Select all

{
        CelestiaAppCore *appCore = [CelestiaAppCore sharedAppCore];
        [appCore goToUrl: value ];
        }


There were 5 places (I think) at which I had to make such changes.

Odd that you didn't see this in your copy. Otherwise you could try these changes too. Any guess as to why we are seeing different results? Should I try to post the repaired code somewhere? Or will you? (But thanks for the fix.)

scienceman
Posts: 30
Joined: 29.06.2003
With us: 21 years 4 months

More on fixing compile problems, versions of Developer Tools

Post #120by scienceman » 26.07.2003, 21:34

Also had to do the same for the appCore declaration in FavoritesDrawerController.m

Answering my own question above, it looks likely that this is due to the different versions of the Developer Tools (July 2002 for you vs. Dec 2002 for me) that we are using. Based on this and the harmless nature of the changes from your suggestion, I would guess that it would be OK to put these in to the default cvs version if you want to. You might also consider updating to the newer version of Developer Tools yourself if you wish.

Now on to the next problem! In CelestiaSelection.mm, there seems to be a problem with Galaxy as a DeepSkyObject type. I get compilation failures here as follows:

    CelestiaSelection.mm: In function `struct CelestiaGalaxy * -[CelestiaSelection galaxy](CelestiaSelection *, objc_selector *)':
    CelestiaSelection.mm:91: type `Galaxy' is not a base type for type `DeepSkyObject'
    CelestiaSelection.mm:92: warning: control reaches end of non-void function `-[CelestiaSelection galaxy](CelestiaSelection *, objc_selector *)'
    ...failed CompileCplusplus /Users/.../Development/celcvs/celestia/macosx/build/celestia.build/celestia.build/Objects-normal/ppc/CelestiaSelection.o ...


On the positive side, the progress bar got over 2/3ds of the way across on the build-from-scratch status this time!


Return to “Development”