Opened 14 years ago

Closed 14 years ago

#346 closed Bug (wontfix)

LSMinimumSystemVersion (in [3194]) is not that reliable

Reported by: cluthi81 Owned by: livings124
Priority: Low Milestone:
Component: Mac Client Version: 0.82+
Severity: Minor Keywords: minimum system version check
Cc:

Description

According to Chris Campbell, using LSMinimumSystemVersion is not reliable. Particularly, it just doesn't work on Panther! He proposes a better solution on his blog: SystemVersionCheck 1.1. in short: this is a small universal binary pre-built executable that can run on every version of Mac OS X (all the way back to 10.0) that checks for the specified minimum system version, display a meaningful dialog if the requirement is not matched or execv the application if the requirement is fulfilled.

I propose to use this instead of the weak LSMinimumSystemVersion Info.plist key. A patch suited for Transmission build system is attached. It this patch is accepted, then it would be worth translating SystemVersionCheck (sources are available, see the above link).

Attachments (1)

SystemVersionCheck.patch (5.3 KB) - added by cluthi81 14 years ago.
Use Chris Campbell's SystemVersionCheck? 1.1, requires to add Transmission-SystemVersionCheck? in the macosx directory

Download all attachments as: .zip

Change History (6)

Changed 14 years ago by cluthi81

Use Chris Campbell's SystemVersionCheck? 1.1, requires to add Transmission-SystemVersionCheck? in the macosx directory

comment:1 Changed 14 years ago by charlieMonroe

Actually I think the solution may be way easier:

In the main.m, alloc and init (then release) a NSAutoreleasePool, insert the code that was in in the +(void)initialize; and return 0; if the version is less that 10.4.0... This is easy, works on every system and is called before the app is launched. If the version is greater, return NSApplicationMain (it's already there), which initializes the application itself.

comment:2 Changed 14 years ago by cluthi81

The solution you propose doesn't work as is. You should call NSApplicationLoad() in order the alert to display. But NSApplicationLoad has been introduced in Mac OS X 10.2, so this would still not work from Cheetah to Leopard. The proposed solution works from Cheetah to Leopard. ;-)

comment:3 Changed 14 years ago by cluthi81

Some famous applications do use SystemVersionCheck. SubEthaEdit, TextWrangler (also probably BBEdit) and Sandvox are using it. So don't be afraid to use it ;-)

comment:4 Changed 14 years ago by livings124

  • Milestone 0.90 deleted
  • Priority changed from Normal to Low
  • Severity changed from Normal to Minor

comment:5 Changed 14 years ago by livings124

  • Resolution set to wontfix
  • Status changed from new to closed

For now I think the key is suitable. Doesn't seem like many, if any, will try to open it on systems below 10.3.x, and since there were no reports of it not working when the non-working check was still there, it's not a concern, so the extra code isn't necessary.

Note: See TracTickets for help on using tickets.