PDA

View Full Version : Carbon C++, QuickTime 7 installation


Shiamak
2006.04.14, 09:09 PM
Hi,
I have a software package that needs to include Quicktime 7 and install on OS 10. I have made some changes to the installer to make it compatible with OS 10 however I am facing problem calling the .pkg (for Quicktime 7). Fod OS9 it was easy but os 10 understands only .pkg?

Can someone send me a sample code on how to call another installer from with installer?

The installer is written in carbon C++(code worrior).

Also
certainly I need to install Quicktime on OSX but it is QuickTime 7 that i need to install/update if it is not founnd. I am fairly new to the Mac world and I have following questions

1. Using carbon C++, how do you determined if QuickTime 7 is already installed or not (0x701 etc).
2. How do you re-package (metapackage) the QuickTime7 into a installed that can be easily called from within the installer (carbon c++, codeworrior).
3. OR lets say my installer finds the QuickTime 7 is not installed then after displaying the message (as u suggested) how to I programmitcally open the Folder from the CD?
4. What is the most recent shipping version of OS 10? and how old is it?
5. Does OS 10 ( 10.1 and on) always comes with the QuickTime installed? if YES then whats the version.

DoG
2006.04.15, 03:15 AM
What exactly are you writing?

It is bad habit to include a QuickTime installer with your app, IMO. It is nowadays easily downloadable.

QuickTime's API has functions for querying the version, you should check that in your installer, and warn the user if he does not fullfill the requirements.

AFAIK, QT 7 requires OS X 10.3 anyhow, and it is likely already installed on such systems. Some version of QuickTime is included with every copy of OS X.

Taxxodium
2006.04.15, 03:35 AM
Don't install QuickTime yourself, instead check for the current installed version of QuickTime and if it's lower than the one you need, present a dialog pointing to www.apple.com/quicktime so the user can install it himself.
QuickTime has a function to check it's version, also use the Gestalt function to retrieve the current version of OS X.

1. Using carbon C++, how do you determined if QuickTime 7 is already installed or not (0x701 etc).

Check the QuickTime API Documentation at http://developer.apple.com

2. How do you re-package (metapackage) the QuickTime7 into a installed that can be easily called from within the installer (carbon c++, codeworrior).

You don't! Let the user know that they need to update QuickTime.

3. OR lets say my installer finds the QuickTime 7 is not installed then after displaying the message (as u suggested) how to I programmitcally open the Folder from the CD?

You don't include QuickTime on your CD, Apple forbids that and if they find out that you do, you're screwed.

4. What is the most recent shipping version of OS 10? and how old is it?

Mac OS X 10.4.6, couple of weeks old as of this writing.

5. Does OS 10 ( 10.1 and on) always comes with the QuickTime installed? if YES then whats the version.

Yes, depends on the version of OS X.

Shiamak
2006.04.15, 11:21 PM
Hey Guys,

I appreciate your prompt response. What i am trying to do is modify our old installer (for some reason it was written in Carbon c++) to detect OS 10 (10.2 to be precise) and also detect QuickTime 7 (i thin it is 7.0 minimum tht i need to detect).

Now I have already included the code to detect OS 10 (10.2 it is) though I would also like to know the Hex values for 10.1, 10,2.4.

As I mentioned earlier I need to include QuickTime 7 and if it is not found then call the QuickTime 7 installer that is embeded within the package.

Does anyone know the version values for QuickTime 7? hexadecimal?

for old versions of Mac OS and QuickTime you could checkout following URL for better understanding of what (version) i am asking for!!

Also to answer your question about QuickTime 7 , we as a company are obligated to include QuickTime7 in our installer atleast that is the agrrement between my company and Apple.

Thanks for your help.

BTW: all the code that I have is written in carban c++.

Shiamak
2006.04.15, 11:24 PM
oooooooops.... here is the URL

http://xhelmboyx.tripod.com/components/mac-gestalt.txt

Taxxodium
2006.04.24, 12:07 PM
Just a bump on this thread:

Hello all Mac Experts out there,

I have included following code for QuickTime 7 detection


long QTimversion;
Gestalt(gestaltQuickTime,&QTimversion);
if (QTimversion < 0x07048000)
{
SInt16 itemHit;
//itemHit = 101;
mInstallFlags |= kWantQT;
::StandardAlert(kAlertDefaultOKText,
"\pThis application requires QuickTime 7 to be installed Please install QuickTime 7 .\\QuickTime7.", NULL,
NULL, &itemHit);
::StopAlert(ALRT_TooOld, nil);
::ExitToShell();
}
The is being compiled on OS 9 though it works fine on OS 9 but when I execute the same code on OS 10.2 it does work.. An\\

Any Ideas?
I really appreciate any hint or clue to figure this issue out.
TIA

Shiamak
2006.04.25, 12:20 AM
Toxxidoium,

you mentioned
"Don't install QuickTime yourself, instead check for the current installed version of QuickTime and if it's lower than the one you need, present a dialog pointing to www.apple.com/quicktime so the user can install it himself.
QuickTime has a function to check it's version, also use the Gestalt function to retrieve the current version of OS X.

"

Could you please tell me know to achive this (including how to open a URL)?

Taxxodium
2006.04.25, 01:20 AM
My Carbon knowledge is too rusty to tell you something useful.

There are some interesting articles and code examples at http://developer.apple.com/documentation/Carbon/index.html

You probably need Launch Services to achieve this.

akb825
2006.04.25, 12:56 PM
Instead of spamming us with new threads, why don't you just reply to this one? They're just going to continue to get locked.

Anyways, to see what the version is, why not just print out the version number on a Mac with QuickTime 7? If you print it out in hex, it should be pretty easy to see if it's different from what you expect.

Shiamak
2006.04.27, 04:59 PM
Hi,

I have been able to get around the quicktime version problem however I am still facing problem if QuickTime does not exits.

Take a look at the following code
OSErr result = Gestalt(gestaltQuickTimeVersion, &QuicTversion);

result will have the value of noErr if QuickTime exists and will return the version value, I wanna know what value result will hold if QuickTime does not exists at all.

I have tried

if (result != noErr) but this doesnt work.

Any ideas?

Taxxodium
2006.04.27, 05:27 PM
Took me 2 seconds to find:

http://developer.apple.com/documentation/QuickTime/INMAC/QT/iqMovieToolbox.10.htm

Shiamak
2006.04.27, 06:03 PM
It may have taken you "2 seconds" to find but you didnt say anything different then the code I published in my last thread (see above).

As i said result!=noErr is the same as returning True of false..my problem is this method doesnt work..


so I am looking for any other way of doing the same!

OneSadCookie
2006.04.28, 04:30 AM
QuickTime *always* exists on Mac OS X... what environment are you in that you have to consider the case that it doesn't? And if you have access to such an environment, why can't you just check what it does return?

Shiamak
2006.04.28, 01:24 PM
You are indeed write the Quicktime (7.0) does get installed when you install OS 10. but its not like one can not remove it!!

I am consering this scenario cause there is a likelyhood of user "manually" removing the Quicktime. the environment is OS 10.4.

I cant check the return value cause my debug environement is broked and I dont know if there is something called Sprintf() or anything else that willl display LONG value correctly.

Thanks



"OneSadCookie" wrote:

QuickTime *always* exists on Mac OS X... what environment are you in that you have to consider the case that it doesn't? And if you have access to such an environment, why can't you just check what it does return?

Taxxodium
2006.04.28, 02:51 PM
I am consering this scenario cause there is a likelyhood of user "manually" removing the Quicktime. the environment is OS 10.4.


If the user can remove QuickTime in OS X, then he must be a really good hacker...

And also:

http://jesus.edot-studios.com/stuff/spelling.jpg

Shiamak
2006.04.28, 03:54 PM
Thanks for being my "humen Spell checker"...I appreciate your concern for english language.

I am not why one would need to be a hacker to be able to install QuickTime 7 on OS X?? I thought QuickTime 7 installs ONLY on OS 10.


Anyways perhaps there has been some mis-communication between you and me.

For the movement I am gona have to assume that "user" will not uninstall the QuickTime application to get release out.


Thanks so much for all your help and support.

Taxxodium
2006.04.28, 04:11 PM
Oops, I meant "remove QuickTime". QuickTime is built very deep into the system, so uninstalling QuickTime would make your system very unstable.

In other words, only check for the version number and act on it as appropiate.

unknown
2006.04.28, 04:53 PM
heheh


ignore these letters

OneSadCookie
2006.04.28, 05:45 PM
You *can* remove QuickTime --

sudo rm -rf /System/Library/Frameworks/QuickTime.framework

However, your machine will be unusable afterwards. Do not do this at home, folks!

Shiamak
2006.04.28, 06:33 PM
Aite... One more question though..

If I remove(trash it) QuickTime.app (or whatever the filename is for Quicktime 7), what does it mean? Is it as good as UNINSTALLING the quicktime application?


Thanks

OneSadCookie
2006.04.28, 08:07 PM
Read what I wrote.

You *cannot* remove QuickTime from your Mac OS X installation without making your computer *unusable*.

You *can* remove the QuickTime player, but that is completely irrelevant -- it just uses QuickTime.